##// END OF EJS Templates
Renamed QCategoryAxis related files
Marek Rosa -
r1817:f04afbebdb7b
parent child
Show More
@@ -34,7 +34,7
34 <li><a href="qabstractaxis.html">QAbstractAxis</a></li>
34 <li><a href="qabstractaxis.html">QAbstractAxis</a></li>
35 <li><a href="qvalueaxis.html">QValueAxis</a></li>
35 <li><a href="qvalueaxis.html">QValueAxis</a></li>
36 <li><a href="qbarcategoryaxis.html">QBarCategoryAxis</a></li>
36 <li><a href="qbarcategoryaxis.html">QBarCategoryAxis</a></li>
37 <li><a href="qintervalsaxis.html">QIntervalsAxis</a></li>
37 <li><a href="qcategoryaxis.html">QCategoryAxis</a></li>
38 <li><a href="qlegend.html">QLegend</a></li>
38 <li><a href="qlegend.html">QLegend</a></li>
39 <li><a href="qabstractseries.html">QAbstractSeries</a></li>
39 <li><a href="qabstractseries.html">QAbstractSeries</a></li>
40 <li><a href="qchartglobal.html">QChartGlobal</a></li>
40 <li><a href="qchartglobal.html">QChartGlobal</a></li>
@@ -3,13 +3,13
3 INCLUDEPATH += $$PWD \
3 INCLUDEPATH += $$PWD \
4 $$PWD/valueaxis \
4 $$PWD/valueaxis \
5 $$PWD/barcategoryaxis \
5 $$PWD/barcategoryaxis \
6 $$PWD/intervalsaxis \
6 $$PWD/categoryaxis \
7 $$PWD/datetimeaxis
7 $$PWD/datetimeaxis
8
8
9 DEPENDPATH += $$PWD \
9 DEPENDPATH += $$PWD \
10 $$PWD/valueaxis \
10 $$PWD/valueaxis \
11 $$PWD/barcategoryaxis \
11 $$PWD/barcategoryaxis \
12 $$PWD/intervalsaxis \
12 $$PWD/categoryaxis \
13 $$PWD/datetimeaxis
13 $$PWD/datetimeaxis
14
14
15 SOURCES += \
15 SOURCES += \
@@ -21,9 +21,9 SOURCES += \
21 $$PWD/barcategoryaxis/chartbarcategoryaxisx.cpp \
21 $$PWD/barcategoryaxis/chartbarcategoryaxisx.cpp \
22 $$PWD/barcategoryaxis/chartbarcategoryaxisy.cpp \
22 $$PWD/barcategoryaxis/chartbarcategoryaxisy.cpp \
23 $$PWD/barcategoryaxis/qbarcategoryaxis.cpp \
23 $$PWD/barcategoryaxis/qbarcategoryaxis.cpp \
24 $$PWD/intervalsaxis/chartintervalsaxisx.cpp \
24 $$PWD/categoryaxis/chartcategoryaxisx.cpp \
25 $$PWD/intervalsaxis/chartintervalsaxisy.cpp \
25 $$PWD/categoryaxis/chartcategoryaxisy.cpp \
26 $$PWD/intervalsaxis/qintervalsaxis.cpp \
26 $$PWD/categoryaxis/qcategoryaxis.cpp \
27 $$PWD/datetimeaxis/chartdatetimeaxisx.cpp \
27 $$PWD/datetimeaxis/chartdatetimeaxisx.cpp \
28 $$PWD/datetimeaxis/chartdatetimeaxisy.cpp \
28 $$PWD/datetimeaxis/chartdatetimeaxisy.cpp \
29 $$PWD/datetimeaxis/qdatetimeaxis.cpp
29 $$PWD/datetimeaxis/qdatetimeaxis.cpp
@@ -37,9 +37,9 PRIVATE_HEADERS += \
37 $$PWD/barcategoryaxis/chartbarcategoryaxisx_p.h \
37 $$PWD/barcategoryaxis/chartbarcategoryaxisx_p.h \
38 $$PWD/barcategoryaxis/chartbarcategoryaxisy_p.h \
38 $$PWD/barcategoryaxis/chartbarcategoryaxisy_p.h \
39 $$PWD/barcategoryaxis/qbarcategoryaxis_p.h \
39 $$PWD/barcategoryaxis/qbarcategoryaxis_p.h \
40 $$PWD/intervalsaxis/chartintervalsaxisx_p.h \
40 $$PWD/categoryaxis/chartcategoryaxisx_p.h \
41 $$PWD/intervalsaxis/chartintervalsaxisy_p.h \
41 $$PWD/categoryaxis/chartcategoryaxisy_p.h \
42 $$PWD/intervalsaxis/qintervalsaxis_p.h \
42 $$PWD/categoryaxis/qcategoryaxis_p.h \
43 $$PWD/datetimeaxis/chartdatetimeaxisx_p.h \
43 $$PWD/datetimeaxis/chartdatetimeaxisx_p.h \
44 $$PWD/datetimeaxis/chartdatetimeaxisy_p.h \
44 $$PWD/datetimeaxis/chartdatetimeaxisy_p.h \
45 $$PWD/datetimeaxis/qdatetimeaxis_p.h
45 $$PWD/datetimeaxis/qdatetimeaxis_p.h
@@ -48,5 +48,5 PUBLIC_HEADERS += \
48 $$PWD/qabstractaxis.h \
48 $$PWD/qabstractaxis.h \
49 $$PWD/valueaxis/qvalueaxis.h \
49 $$PWD/valueaxis/qvalueaxis.h \
50 $$PWD/barcategoryaxis/qbarcategoryaxis.h \
50 $$PWD/barcategoryaxis/qbarcategoryaxis.h \
51 $$PWD/intervalsaxis/qintervalsaxis.h \
51 $$PWD/categoryaxis/qcategoryaxis.h \
52 $$PWD/datetimeaxis/qdatetimeaxis.h
52 $$PWD/datetimeaxis/qdatetimeaxis.h
@@ -18,8 +18,8
18 **
18 **
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 #include "chartintervalsaxisx_p.h"
21 #include "chartcategoryaxisx_p.h"
22 #include "qintervalsaxis.h"
22 #include "qcategoryaxis.h"
23 #include "qabstractaxis.h"
23 #include "qabstractaxis.h"
24 #include "chartpresenter_p.h"
24 #include "chartpresenter_p.h"
25 #include <QGraphicsLayout>
25 #include <QGraphicsLayout>
@@ -30,15 +30,15 static int label_padding = 5;
30
30
31 QTCOMMERCIALCHART_BEGIN_NAMESPACE
31 QTCOMMERCIALCHART_BEGIN_NAMESPACE
32
32
33 ChartIntervalAxisX::ChartIntervalAxisX(QAbstractAxis *axis,ChartPresenter *presenter) : ChartAxis(axis,presenter)
33 ChartCategoryAxisX::ChartCategoryAxisX(QAbstractAxis *axis,ChartPresenter *presenter) : ChartAxis(axis,presenter)
34 {
34 {
35 }
35 }
36
36
37 ChartIntervalAxisX::~ChartIntervalAxisX()
37 ChartCategoryAxisX::~ChartCategoryAxisX()
38 {
38 {
39 }
39 }
40
40
41 QVector<qreal> ChartIntervalAxisX::calculateLayout() const
41 QVector<qreal> ChartCategoryAxisX::calculateLayout() const
42 {
42 {
43 QCategoryAxis *axis = qobject_cast<QCategoryAxis *>(m_chartAxis);
43 QCategoryAxis *axis = qobject_cast<QCategoryAxis *>(m_chartAxis);
44 int tickCount = axis->intervalsLabels().count() + 1;
44 int tickCount = axis->intervalsLabels().count() + 1;
@@ -62,7 +62,7 QVector<qreal> ChartIntervalAxisX::calculateLayout() const
62 return points;
62 return points;
63 }
63 }
64
64
65 void ChartIntervalAxisX::updateGeometry()
65 void ChartCategoryAxisX::updateGeometry()
66 {
66 {
67 const QVector<qreal>& layout = ChartAxis::layout();
67 const QVector<qreal>& layout = ChartAxis::layout();
68
68
@@ -121,7 +121,7 void ChartIntervalAxisX::updateGeometry()
121 }
121 }
122 }
122 }
123
123
124 void ChartIntervalAxisX::handleAxisUpdated()
124 void ChartCategoryAxisX::handleAxisUpdated()
125 {
125 {
126 updateGeometry();
126 updateGeometry();
127 ChartAxis::handleAxisUpdated();
127 ChartAxis::handleAxisUpdated();
@@ -37,11 +37,11 QTCOMMERCIALCHART_BEGIN_NAMESPACE
37 class QAbstractAxis;
37 class QAbstractAxis;
38 class ChartPresenter;
38 class ChartPresenter;
39
39
40 class ChartIntervalAxisX : public ChartAxis
40 class ChartCategoryAxisX : public ChartAxis
41 {
41 {
42 public:
42 public:
43 ChartIntervalAxisX(QAbstractAxis *axis, ChartPresenter *presenter);
43 ChartCategoryAxisX(QAbstractAxis *axis, ChartPresenter *presenter);
44 ~ChartIntervalAxisX();
44 ~ChartCategoryAxisX();
45
45
46 AxisType axisType() const { return X_AXIS;}
46 AxisType axisType() const { return X_AXIS;}
47
47
@@ -18,8 +18,8
18 **
18 **
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 #include "chartintervalsaxisy_p.h"
21 #include "chartcategoryaxisy_p.h"
22 #include "qintervalsaxis.h"
22 #include "qcategoryaxis.h"
23 #include "qabstractaxis.h"
23 #include "qabstractaxis.h"
24 #include "chartpresenter_p.h"
24 #include "chartpresenter_p.h"
25 #include <QGraphicsLayout>
25 #include <QGraphicsLayout>
@@ -31,15 +31,15 static int label_padding = 5;
31
31
32 QTCOMMERCIALCHART_BEGIN_NAMESPACE
32 QTCOMMERCIALCHART_BEGIN_NAMESPACE
33
33
34 ChartIntervalAxisY::ChartIntervalAxisY(QAbstractAxis *axis,ChartPresenter *presenter) : ChartAxis(axis,presenter)
34 ChartCategoryAxisY::ChartCategoryAxisY(QAbstractAxis *axis,ChartPresenter *presenter) : ChartAxis(axis,presenter)
35 {
35 {
36 }
36 }
37
37
38 ChartIntervalAxisY::~ChartIntervalAxisY()
38 ChartCategoryAxisY::~ChartCategoryAxisY()
39 {
39 {
40 }
40 }
41
41
42 QVector<qreal> ChartIntervalAxisY::calculateLayout() const
42 QVector<qreal> ChartCategoryAxisY::calculateLayout() const
43 {
43 {
44 QCategoryAxis *axis = qobject_cast<QCategoryAxis *>(m_chartAxis);
44 QCategoryAxis *axis = qobject_cast<QCategoryAxis *>(m_chartAxis);
45 int tickCount = axis->intervalsLabels().count() + 1;
45 int tickCount = axis->intervalsLabels().count() + 1;
@@ -63,7 +63,7 QVector<qreal> ChartIntervalAxisY::calculateLayout() const
63 return points;
63 return points;
64 }
64 }
65
65
66 void ChartIntervalAxisY::updateGeometry()
66 void ChartCategoryAxisY::updateGeometry()
67 {
67 {
68 const QVector<qreal> &layout = ChartAxis::layout();
68 const QVector<qreal> &layout = ChartAxis::layout();
69 m_minWidth = 0;
69 m_minWidth = 0;
@@ -128,7 +128,7 void ChartIntervalAxisY::updateGeometry()
128 }
128 }
129 }
129 }
130
130
131 void ChartIntervalAxisY::handleAxisUpdated()
131 void ChartCategoryAxisY::handleAxisUpdated()
132 {
132 {
133 updateGeometry();
133 updateGeometry();
134 ChartAxis::handleAxisUpdated();
134 ChartAxis::handleAxisUpdated();
@@ -37,11 +37,11 QTCOMMERCIALCHART_BEGIN_NAMESPACE
37 class QAbstractAxis;
37 class QAbstractAxis;
38 class ChartPresenter;
38 class ChartPresenter;
39
39
40 class ChartIntervalAxisY : public ChartAxis
40 class ChartCategoryAxisY : public ChartAxis
41 {
41 {
42 public:
42 public:
43 ChartIntervalAxisY(QAbstractAxis *axis, ChartPresenter *presenter);
43 ChartCategoryAxisY(QAbstractAxis *axis, ChartPresenter *presenter);
44 ~ChartIntervalAxisY();
44 ~ChartCategoryAxisY();
45
45
46 AxisType axisType() const { return Y_AXIS;}
46 AxisType axisType() const { return Y_AXIS;}
47
47
@@ -18,10 +18,10
18 **
18 **
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 #include "qintervalsaxis.h"
21 #include "qcategoryaxis.h"
22 #include "qintervalsaxis_p.h"
22 #include "qcategoryaxis_p.h"
23 #include "chartintervalsaxisx_p.h"
23 #include "chartcategoryaxisx_p.h"
24 #include "chartintervalsaxisy_p.h"
24 #include "chartcategoryaxisy_p.h"
25 #include <qmath.h>
25 #include <qmath.h>
26 #include <QDebug>
26 #include <QDebug>
27
27
@@ -33,15 +33,8 QTCOMMERCIALCHART_BEGIN_NAMESPACE
33 */
33 */
34
34
35 /*!
35 /*!
36 \qmlclass Axis QCategoryAxis
36 \qmlclass CategoryAxis QCategoryAxis
37 \brief The Axis element is used for manipulating chart's axes.
37 \brief The Axis element is used for manipulating chart's axes.
38
39 Axis can be setup to show axis line with tick marks, grid lines and shades.
40
41 To access Axes you can use ChartView API. For example:
42 \code
43 // TODO :)
44 \endcode
45 */
38 */
46
39
47 /*!
40 /*!
@@ -237,13 +230,13 ChartAxis* QCategoryAxisPrivate::createGraphics(ChartPresenter* presenter)
237 {
230 {
238 Q_Q(QCategoryAxis);
231 Q_Q(QCategoryAxis);
239 if(m_orientation == Qt::Vertical){
232 if(m_orientation == Qt::Vertical){
240 return new ChartIntervalAxisY(q,presenter);
233 return new ChartCategoryAxisY(q,presenter);
241 }else{
234 }else{
242 return new ChartIntervalAxisX(q,presenter);
235 return new ChartCategoryAxisX(q,presenter);
243 }
236 }
244 }
237 }
245
238
246 #include "moc_qintervalsaxis.cpp"
239 #include "moc_qcategoryaxis.cpp"
247 #include "moc_qintervalsaxis_p.cpp"
240 #include "moc_qcategoryaxis_p.cpp"
248
241
249 QTCOMMERCIALCHART_END_NAMESPACE
242 QTCOMMERCIALCHART_END_NAMESPACE
1 NO CONTENT: file renamed from src/axis/intervalsaxis/qintervalsaxis.h to src/axis/categoryaxis/qcategoryaxis.h
NO CONTENT: file renamed from src/axis/intervalsaxis/qintervalsaxis.h to src/axis/categoryaxis/qcategoryaxis.h
@@ -30,7 +30,7
30 #ifndef QCATEGORYAXIS_P_H
30 #ifndef QCATEGORYAXIS_P_H
31 #define QCATEGORYAXIS_P_H
31 #define QCATEGORYAXIS_P_H
32
32
33 #include "qintervalsaxis.h"
33 #include "qcategoryaxis.h"
34 #include "qvalueaxis_p.h"
34 #include "qvalueaxis_p.h"
35
35
36 QTCOMMERCIALCHART_BEGIN_NAMESPACE
36 QTCOMMERCIALCHART_BEGIN_NAMESPACE
@@ -23,7 +23,7
23 #include "qvalueaxis.h"
23 #include "qvalueaxis.h"
24 #include "qbarcategoryaxis.h"
24 #include "qbarcategoryaxis.h"
25 #include "qvalueaxis_p.h"
25 #include "qvalueaxis_p.h"
26 #include "qintervalsaxis.h"
26 #include "qcategoryaxis.h"
27 #include "qdatetimeaxis.h"
27 #include "qdatetimeaxis.h"
28 #include "qabstractseries_p.h"
28 #include "qabstractseries_p.h"
29 #include "qabstractbarseries.h"
29 #include "qabstractbarseries.h"
@@ -21,7 +21,7 SUBDIRS += \
21 qhorizontalstackedbarseries \
21 qhorizontalstackedbarseries \
22 qhorizontalpercentbarseries \
22 qhorizontalpercentbarseries \
23 qvalueaxis \
23 qvalueaxis \
24 qintervalsaxis \
24 qcategoryaxis \
25 qdatetimeaxis \
25 qdatetimeaxis \
26 qbarcategoryaxis
26 qbarcategoryaxis
27
27
@@ -2,4 +2,4
2 error( "Couldn't find the auto.pri file!" )
2 error( "Couldn't find the auto.pri file!" )
3 }
3 }
4 HEADERS += ../qabstractaxis/tst_qabstractaxis.h
4 HEADERS += ../qabstractaxis/tst_qabstractaxis.h
5 SOURCES += tst_qintervalsaxis.cpp ../qabstractaxis/tst_qabstractaxis.cpp
5 SOURCES += tst_qcategoryaxis.cpp ../qabstractaxis/tst_qabstractaxis.cpp
@@ -19,7 +19,7
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 #include "../qabstractaxis/tst_qabstractaxis.h"
21 #include "../qabstractaxis/tst_qabstractaxis.h"
22 #include "qintervalsaxis.h"
22 #include "qcategoryaxis.h"
23 #include <qlineseries.h>
23 #include <qlineseries.h>
24
24
25 class tst_QCategoryAxis: public tst_QAbstractAxis
25 class tst_QCategoryAxis: public tst_QAbstractAxis
@@ -33,8 +33,8 public slots:
33 void cleanup();
33 void cleanup();
34
34
35 private slots:
35 private slots:
36 void qintervalsaxis_data();
36 void qcategoryaxis_data();
37 void qintervalsaxis();
37 void qcategoryaxis();
38
38
39 void max_raw_data();
39 void max_raw_data();
40 void max_raw();
40 void max_raw();
@@ -90,11 +90,11 void tst_QCategoryAxis::cleanup()
90 tst_QAbstractAxis::cleanup();
90 tst_QAbstractAxis::cleanup();
91 }
91 }
92
92
93 void tst_QCategoryAxis::qintervalsaxis_data()
93 void tst_QCategoryAxis::qcategoryaxis_data()
94 {
94 {
95 }
95 }
96
96
97 void tst_QCategoryAxis::qintervalsaxis()
97 void tst_QCategoryAxis::qcategoryaxis()
98 {
98 {
99 qabstractaxis();
99 qabstractaxis();
100
100
@@ -300,5 +300,5 void tst_QCategoryAxis::interval()
300 }
300 }
301
301
302 QTEST_MAIN(tst_QCategoryAxis)
302 QTEST_MAIN(tst_QCategoryAxis)
303 #include "tst_qintervalsaxis.moc"
303 #include "tst_qcategoryaxis.moc"
304
304
General Comments 0
You need to be logged in to leave comments. Login now