qchartaxis.h
114 lines
| 3.0 KiB
| text/x-c
|
CLexer
|
r72 | #ifndef QCHARTAXIS_H_ | ||
#define QCHARTAXIS_H_ | ||||
|
r697 | #include <qchartglobal.h> | ||
#include <qchartaxiscategories.h> | ||||
|
r140 | #include <QPen> | ||
|
r176 | #include <QFont> | ||
|
r140 | |||
|
r85 | QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||
|
r223 | class QTCOMMERCIALCHART_EXPORT QChartAxis : public QObject | ||
|
r72 | { | ||
|
r223 | Q_OBJECT | ||
|
r72 | public: | ||
|
r678 | |||
|
r745 | QChartAxis(QObject *parent =0); | ||
|
r223 | ~QChartAxis(); | ||
|
r140 | |||
|
r223 | //axis handling | ||
|
r760 | bool isAxisVisible() const { return m_axisVisible; } | ||
|
r85 | void setAxisVisible(bool visible); | ||
|
r745 | void setAxisPen(const QPen &pen); | ||
|
r760 | QPen axisPen() const { return m_axisPen; } | ||
|
r140 | |||
|
r223 | //grid handling | ||
|
r760 | bool isGridLineVisible() const { return m_gridLineVisible; } | ||
|
r535 | void setGridLineVisible(bool visible); | ||
|
r745 | void setGridLinePen(const QPen &pen); | ||
|
r760 | QPen gridLinePen() const { return m_gridLinePen; } | ||
|
r140 | |||
|
r223 | //labels handling | ||
|
r760 | bool labelsVisible() const { return m_labelsVisible; } | ||
|
r85 | void setLabelsVisible(bool visible); | ||
|
r745 | void setLabelsPen(const QPen &pen); | ||
|
r176 | QPen labelsPen() const { return m_labelsPen;} | ||
|
r745 | void setLabelsBrush(const QBrush &brush); | ||
|
r760 | QBrush labelsBrush() const { return m_labelsBrush; } | ||
|
r745 | void setLabelsFont(const QFont &font); | ||
|
r760 | QFont labelsFont() const { return m_labelsFont; } | ||
|
r223 | void setLabelsAngle(int angle); | ||
|
r760 | int labelsAngle() const { return m_labelsAngle; } | ||
|
r176 | |||
|
r223 | //shades handling | ||
|
r760 | bool shadesVisible() const { return m_shadesVisible; } | ||
|
r176 | void setShadesVisible(bool visible); | ||
|
r745 | void setShadesPen(const QPen &pen); | ||
|
r760 | QPen shadesPen() const { return m_shadesPen; } | ||
|
r745 | void setShadesBrush(const QBrush &brush); | ||
|
r760 | QBrush shadesBrush() const { return m_shadesBrush; } | ||
|
r188 | void setShadesOpacity(qreal opacity); | ||
|
r760 | qreal shadesOpacity() const { return m_shadesOpacity; } | ||
|
r188 | |||
|
r223 | //range handling | ||
void setMin(qreal min); | ||||
|
r760 | qreal min() const { return m_min; } | ||
|
r223 | void setMax(qreal max); | ||
|
r760 | qreal max() const { return m_max; } | ||
|
r223 | void setRange(qreal min, qreal max); | ||
//ticks handling | ||||
void setTicksCount(int count); | ||||
int ticksCount() const { return m_ticksCount;} | ||||
|
r445 | |||
|
r687 | void setNiceNumbers(bool enabled); | ||
bool niceNumbers() const { return m_niceNumbers;} | ||||
|
r678 | |||
|
r497 | QChartAxisCategories* categories() { return &m_category; } | ||
|
r223 | |||
|
r534 | void show(); | ||
void hide(); | ||||
|
r775 | Q_SIGNALS: | ||
|
r223 | void minChanged(qreal min); | ||
void maxChanged(qreal max); | ||||
|
r554 | void rangeChanged(qreal min, qreal max); | ||
void ticksCountChanged(int count); | ||||
|
r439 | |||
|
r445 | //interal signal | ||
|
r439 | void updated(); | ||
|
r687 | void changed(qreal min, qreal max, int tickCount,bool niceNumbers); | ||
|
r439 | //internal slot | ||
|
r775 | public Q_SLOTS: | ||
|
r678 | void handleAxisRangeChanged(qreal min, qreal max,int count); | ||
|
r140 | |||
|
r85 | private: | ||
bool m_axisVisible; | ||||
|
r140 | QPen m_axisPen; | ||
QBrush m_axisBrush; | ||||
|
r535 | bool m_gridLineVisible; | ||
QPen m_gridLinePen; | ||||
|
r176 | |||
|
r85 | bool m_labelsVisible; | ||
|
r176 | QPen m_labelsPen; | ||
QBrush m_labelsBrush; | ||||
QFont m_labelsFont; | ||||
|
r223 | int m_labelsAngle; | ||
|
r176 | |||
bool m_shadesVisible; | ||||
QPen m_shadesPen; | ||||
QBrush m_shadesBrush; | ||||
|
r188 | qreal m_shadesOpacity; | ||
|
r223 | qreal m_min; | ||
qreal m_max; | ||||
|
r188 | |||
|
r223 | int m_ticksCount; | ||
|
r445 | QChartAxisCategories m_category; | ||
|
r678 | |||
|
r687 | bool m_niceNumbers; | ||
|
r72 | }; | ||
|
r85 | QTCOMMERCIALCHART_END_NAMESPACE | ||
|
r72 | #endif /* QCHARTAXIS_H_ */ | ||