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++

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#pragma once
#include "ZxAxisHelperFloat.h"
// 对数类
class I_PLOTBASE_EXPORT ZxAxisHelperFloatLog : public ZxAxisHelperFloat
{
Q_OBJECT
public:
static const int g_logScaleCount = 8;
static const double 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, 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:
};