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/ZxAxisHelperFloatLog.h

60 lines
1.8 KiB
C

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