qchartaxis.h
103 lines
| 2.6 KiB
| text/x-c
|
CLexer
/ src / qchartaxis.h
|
r72 | #ifndef QCHARTAXIS_H_ | ||
#define QCHARTAXIS_H_ | ||||
|
r445 | #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: | ||
|
r223 | QChartAxis(QObject* parent =0); | ||
~QChartAxis(); | ||||
|
r140 | |||
|
r223 | //axis handling | ||
|
r85 | bool isAxisVisible() const { return m_axisVisible;}; | ||
void setAxisVisible(bool visible); | ||||
|
r140 | void setAxisPen(const QPen& pen); | ||
|
r176 | QPen axisPen() const { return m_axisPen;}; | ||
|
r140 | |||
|
r223 | //grid handling | ||
|
r176 | bool isGridVisible() const { return m_gridVisible;}; | ||
|
r85 | void setGridVisible(bool visible); | ||
|
r176 | void setGridPen(const QPen& pen); | ||
QPen gridPen() const {return m_gridPen;} | ||||
|
r140 | |||
|
r223 | //labels handling | ||
|
r365 | bool labelsVisible() const { return m_labelsVisible;}; | ||
|
r85 | void setLabelsVisible(bool visible); | ||
|
r176 | void setLabelsPen(const QPen& pen); | ||
QPen labelsPen() const { return m_labelsPen;} | ||||
void setLabelsBrush(const QBrush& brush); | ||||
QBrush labelsBrush() const { return m_labelsBrush;} | ||||
void setLabelsFont(const QFont& font); | ||||
|
r331 | QFont labelsFont() const { return m_labelsFont;} | ||
|
r223 | void setLabelsAngle(int angle); | ||
int labelsAngle() const { return m_labelsAngle;}; | ||||
|
r176 | |||
|
r223 | //shades handling | ||
|
r365 | bool shadesVisible() const { return m_shadesVisible;}; | ||
|
r176 | void setShadesVisible(bool visible); | ||
void setShadesPen(const QPen& pen); | ||||
QPen shadesPen() const { return m_shadesPen;} | ||||
void setShadesBrush(const QBrush& brush); | ||||
QBrush shadesBrush() const { return m_shadesBrush;} | ||||
|
r188 | void setShadesOpacity(qreal opacity); | ||
qreal shadesOpacity() const { return m_shadesOpacity;} | ||||
|
r223 | //range handling | ||
void setMin(qreal min); | ||||
qreal min() const { return m_min;}; | ||||
void setMax(qreal max); | ||||
qreal max() const { return m_max;}; | ||||
void setRange(qreal min, qreal max); | ||||
//ticks handling | ||||
void setTicksCount(int count); | ||||
int ticksCount() const { return m_ticksCount;} | ||||
|
r445 | |||
QChartAxisCategories& categories() { return m_category; } | ||||
|
r223 | |||
signals: | ||||
void minChanged(qreal min); | ||||
void maxChanged(qreal max); | ||||
|
r439 | void rangeChanged(qreal min, qreal max); | ||
|
r445 | //interal signal | ||
|
r439 | void updated(); | ||
//internal slot | ||||
public slots: | ||||
void handleAxisRangeChanged(qreal min, qreal max); | ||||
|
r140 | |||
|
r85 | private: | ||
bool m_axisVisible; | ||||
|
r140 | QPen m_axisPen; | ||
QBrush m_axisBrush; | ||||
|
r176 | bool m_gridVisible; | ||
QPen m_gridPen; | ||||
|
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; | ||
|
r72 | }; | ||
|
r85 | QTCOMMERCIALCHART_END_NAMESPACE | ||
|
r72 | #endif /* QCHARTAXIS_H_ */ | ||