qaxis.h
112 lines
| 3.0 KiB
| text/x-c
|
CLexer
Jani Honkonen
|
r794 | /**************************************************************************** | ||
** | ||||
** Copyright (C) 2012 Digia Plc | ||||
** All rights reserved. | ||||
** For any questions to Digia, please use contact form at http://qt.digia.com | ||||
** | ||||
** This file is part of the Qt Commercial Charts Add-on. | ||||
** | ||||
** $QT_BEGIN_LICENSE$ | ||||
** Licensees holding valid Qt Commercial licenses may use this file in | ||||
** accordance with the Qt Commercial License Agreement provided with the | ||||
** Software or, alternatively, in accordance with the terms contained in | ||||
** a written agreement between you and Digia. | ||||
** | ||||
** If you have questions regarding the use of this file, please use | ||||
** contact form at http://qt.digia.com | ||||
** $QT_END_LICENSE$ | ||||
** | ||||
****************************************************************************/ | ||||
Michal Klocek
|
r1006 | #ifndef QAXIS_H | ||
#define QAXIS_H | ||||
Michal Klocek
|
r72 | |||
Jani Honkonen
|
r697 | #include <qchartglobal.h> | ||
Michal Klocek
|
r1032 | #include <qaxiscategories.h> | ||
Michal Klocek
|
r140 | #include <QPen> | ||
Michal Klocek
|
r176 | #include <QFont> | ||
Michal Klocek
|
r140 | |||
Michal Klocek
|
r85 | QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||
Michal Klocek
|
r1006 | class QAxisPrivate; | ||
Michal Klocek
|
r963 | |||
Michal Klocek
|
r1006 | class QTCOMMERCIALCHART_EXPORT QAxis : public QObject | ||
Michal Klocek
|
r72 | { | ||
Michal Klocek
|
r223 | Q_OBJECT | ||
Tero Ahola
|
r1096 | Q_PROPERTY(bool labelsVisible READ labelsVisible WRITE setLabelsVisible) | ||
Tero Ahola
|
r1139 | Q_PROPERTY(qreal min READ min WRITE setMin) | ||
Q_PROPERTY(qreal max READ max WRITE setMax) | ||||
Tero Ahola
|
r1096 | |||
Michal Klocek
|
r72 | public: | ||
Michal Klocek
|
r678 | |||
Michal Klocek
|
r1006 | QAxis(QObject *parent =0); | ||
~QAxis(); | ||||
Michal Klocek
|
r140 | |||
Michal Klocek
|
r223 | //axis handling | ||
Michal Klocek
|
r963 | bool isAxisVisible() const; | ||
Tero Ahola
|
r987 | void setAxisVisible(bool visible = true); | ||
sauimone
|
r745 | void setAxisPen(const QPen &pen); | ||
Michal Klocek
|
r963 | QPen axisPen() const; | ||
Michal Klocek
|
r140 | |||
Michal Klocek
|
r223 | //grid handling | ||
Michal Klocek
|
r963 | bool isGridLineVisible() const; | ||
Tero Ahola
|
r987 | void setGridLineVisible(bool visible = true); | ||
sauimone
|
r745 | void setGridLinePen(const QPen &pen); | ||
Michal Klocek
|
r963 | QPen gridLinePen() const; | ||
Michal Klocek
|
r140 | |||
Michal Klocek
|
r223 | //labels handling | ||
Michal Klocek
|
r963 | bool labelsVisible() const; | ||
Tero Ahola
|
r987 | void setLabelsVisible(bool visible = true); | ||
sauimone
|
r745 | void setLabelsPen(const QPen &pen); | ||
Michal Klocek
|
r963 | QPen labelsPen() const; | ||
sauimone
|
r745 | void setLabelsBrush(const QBrush &brush); | ||
Michal Klocek
|
r963 | QBrush labelsBrush() const; | ||
sauimone
|
r745 | void setLabelsFont(const QFont &font); | ||
Michal Klocek
|
r963 | QFont labelsFont() const; | ||
Michal Klocek
|
r223 | void setLabelsAngle(int angle); | ||
Michal Klocek
|
r963 | int labelsAngle() const; | ||
Michal Klocek
|
r176 | |||
Michal Klocek
|
r223 | //shades handling | ||
Michal Klocek
|
r963 | bool shadesVisible() const; | ||
Tero Ahola
|
r987 | void setShadesVisible(bool visible = true); | ||
sauimone
|
r745 | void setShadesPen(const QPen &pen); | ||
Michal Klocek
|
r963 | QPen shadesPen() const; | ||
sauimone
|
r745 | void setShadesBrush(const QBrush &brush); | ||
Michal Klocek
|
r963 | QBrush shadesBrush() const; | ||
Michal Klocek
|
r188 | void setShadesOpacity(qreal opacity); | ||
Michal Klocek
|
r963 | qreal shadesOpacity() const; | ||
Michal Klocek
|
r188 | |||
Michal Klocek
|
r223 | //range handling | ||
void setMin(qreal min); | ||||
Michal Klocek
|
r963 | qreal min() const; | ||
Michal Klocek
|
r223 | void setMax(qreal max); | ||
Michal Klocek
|
r963 | qreal max() const; | ||
Michal Klocek
|
r223 | void setRange(qreal min, qreal max); | ||
//ticks handling | ||||
void setTicksCount(int count); | ||||
Michal Klocek
|
r963 | int ticksCount() const; | ||
Michal Klocek
|
r445 | |||
Tero Ahola
|
r987 | void setNiceNumbersEnabled(bool enable = true); | ||
bool niceNumbersEnabled() const; | ||||
Michal Klocek
|
r678 | |||
Michal Klocek
|
r1032 | QAxisCategories* categories(); | ||
Michal Klocek
|
r223 | |||
Michal Klocek
|
r534 | void show(); | ||
void hide(); | ||||
sauimone
|
r775 | Q_SIGNALS: | ||
Michal Klocek
|
r223 | void minChanged(qreal min); | ||
void maxChanged(qreal max); | ||||
Michal Klocek
|
r554 | void rangeChanged(qreal min, qreal max); | ||
void ticksCountChanged(int count); | ||||
Michal Klocek
|
r439 | |||
Michal Klocek
|
r85 | private: | ||
Michal Klocek
|
r1006 | QScopedPointer<QAxisPrivate> d_ptr; | ||
Q_DISABLE_COPY(QAxis); | ||||
Michal Klocek
|
r963 | friend class ChartDataSet; | ||
Michal Klocek
|
r1006 | friend class ChartAxis; | ||
Michal Klocek
|
r72 | }; | ||
Michal Klocek
|
r85 | QTCOMMERCIALCHART_END_NAMESPACE | ||
Michal Klocek
|
r72 | #endif /* QCHARTAXIS_H_ */ | ||