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