You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nmWATI/Include/iPlot/iPlotBase/Helper/ZxAxisHelperDoubleLog.h

60 lines
1.8 KiB
C

#pragma once
#include "ZxAxisHelperDouble.h"
// 对数类
class I_PLOTBASE_EXPORT ZxAxisHelperDoubleLog : public ZxAxisHelperDouble
{
Q_OBJECT
public:
static const int g_logScaleCount = 8;
static const double g_logScaleRatios[g_logScaleCount];
public:
explicit ZxAxisHelperDoubleLog(ZxSubAxisBase* p);
~ZxAxisHelperDoubleLog();
protected:
// Plot网格线
virtual void drawGrids(QPainter* painter, QRectF& rtInner);
// 绘制函数
virtual void drawTickAndTags(QPainter* painter, QRectF& rt);
virtual void drawOneTickTag(QPainter* painter, double fPos, QString s);
// 取得待显示的刻度文本标识
virtual QMap<double, QString> getTickInfos();
// 预估大小
virtual QRectF getPreferedTickSumRect(QPainter* painter);
virtual void adjustPreferedSize(double& w, double& h);
private:
// 幂指数方式显示10的多少次幂
void drawOneTickTagEx(QPainter* painter, double fPos, QString s);
// 获取绘制的位置信息
virtual void locateOneTickTag(QPainter* painter, double fPos, QString s, \
QRectF& rt, int& flag);
// 获取绘制的位置信息Base
void locateOneTickBaseTag(QPainter* painter, double fPos, \
QString s, \
QRectF& rtBase, \
int& flag);
// 获取绘制的位置信息Index
void locateOneTickIndexTag(QPainter* painter, double fPos, \
QString s, \
QRectF& rtBase, QRectF& rtIndex, \
int& flag);
// 进一步调整
void adjustTickLocation(QPainter* painter, \
QRectF& rtBase, QRectF& rtIndex);
public slots:
protected:
};