##// END OF EJS Templates
renamed QValueAxis related files
Marek Rosa -
r1805:3a0e948c9274
parent child
Show More
@@ -22,7 +22,7
22 #include <QtDeclarative/qdeclarative.h>
22 #include <QtDeclarative/qdeclarative.h>
23 #include "qchart.h"
23 #include "qchart.h"
24 #include "qabstractaxis.h"
24 #include "qabstractaxis.h"
25 #include "qvaluesaxis.h"
25 #include "qvalueaxis.h"
26 #include "qbarcategoriesaxis.h"
26 #include "qbarcategoriesaxis.h"
27 #include "declarativechart.h"
27 #include "declarativechart.h"
28 #include "declarativexypoint.h"
28 #include "declarativexypoint.h"
@@ -26,7 +26,7
26 #include "domain_p.h"
26 #include "domain_p.h"
27 #include "chartdataset_p.h"
27 #include "chartdataset_p.h"
28 #include "charttheme_p.h"
28 #include "charttheme_p.h"
29 #include "qvaluesaxis.h"
29 #include "qvalueaxis.h"
30
30
31 QTCOMMERCIALCHART_BEGIN_NAMESPACE
31 QTCOMMERCIALCHART_BEGIN_NAMESPACE
32
32
@@ -1,13 +1,13
1 #Subdirectiores are defined here, because qt creator doesn't handle nested include(foo.pri) chains very well.
1 #Subdirectiores are defined here, because qt creator doesn't handle nested include(foo.pri) chains very well.
2
2
3 INCLUDEPATH += $$PWD \
3 INCLUDEPATH += $$PWD \
4 $$PWD/valuesaxis \
4 $$PWD/valueaxis \
5 $$PWD/categoriesaxis \
5 $$PWD/categoriesaxis \
6 $$PWD/intervalsaxis \
6 $$PWD/intervalsaxis \
7 $$PWD/datetimeaxis
7 $$PWD/datetimeaxis
8
8
9 DEPENDPATH += $$PWD \
9 DEPENDPATH += $$PWD \
10 $$PWD/valuesaxis \
10 $$PWD/valueaxis \
11 $$PWD/categoriesaxis \
11 $$PWD/categoriesaxis \
12 $$PWD/intervalsaxis \
12 $$PWD/intervalsaxis \
13 $$PWD/datetimeaxis
13 $$PWD/datetimeaxis
@@ -15,9 +15,9 DEPENDPATH += $$PWD \
15 SOURCES += \
15 SOURCES += \
16 $$PWD/chartaxis.cpp \
16 $$PWD/chartaxis.cpp \
17 $$PWD/qabstractaxis.cpp \
17 $$PWD/qabstractaxis.cpp \
18 $$PWD/valuesaxis/chartvaluesaxisx.cpp \
18 $$PWD/valueaxis/chartvalueaxisx.cpp \
19 $$PWD/valuesaxis/chartvaluesaxisy.cpp \
19 $$PWD/valueaxis/chartvalueaxisy.cpp \
20 $$PWD/valuesaxis/qvaluesaxis.cpp \
20 $$PWD/valueaxis/qvalueaxis.cpp \
21 $$PWD/categoriesaxis/chartcategoriesaxisx.cpp \
21 $$PWD/categoriesaxis/chartcategoriesaxisx.cpp \
22 $$PWD/categoriesaxis/chartcategoriesaxisy.cpp \
22 $$PWD/categoriesaxis/chartcategoriesaxisy.cpp \
23 $$PWD/categoriesaxis/qbarcategoriesaxis.cpp \
23 $$PWD/categoriesaxis/qbarcategoriesaxis.cpp \
@@ -31,9 +31,9 SOURCES += \
31 PRIVATE_HEADERS += \
31 PRIVATE_HEADERS += \
32 $$PWD/chartaxis_p.h \
32 $$PWD/chartaxis_p.h \
33 $$PWD/qabstractaxis_p.h \
33 $$PWD/qabstractaxis_p.h \
34 $$PWD/valuesaxis/chartvaluesaxisx_p.h \
34 $$PWD/valueaxis/chartvalueaxisx_p.h \
35 $$PWD/valuesaxis/chartvaluesaxisy_p.h \
35 $$PWD/valueaxis/chartvalueaxisy_p.h \
36 $$PWD/valuesaxis/qvaluesaxis_p.h \
36 $$PWD/valueaxis/qvalueaxis_p.h \
37 $$PWD/categoriesaxis/chartcategoriesaxisx_p.h \
37 $$PWD/categoriesaxis/chartcategoriesaxisx_p.h \
38 $$PWD/categoriesaxis/chartcategoriesaxisy_p.h \
38 $$PWD/categoriesaxis/chartcategoriesaxisy_p.h \
39 $$PWD/categoriesaxis/qbarcategoriesaxis_p.h \
39 $$PWD/categoriesaxis/qbarcategoriesaxis_p.h \
@@ -46,7 +46,7 PRIVATE_HEADERS += \
46
46
47 PUBLIC_HEADERS += \
47 PUBLIC_HEADERS += \
48 $$PWD/qabstractaxis.h \
48 $$PWD/qabstractaxis.h \
49 $$PWD/valuesaxis/qvaluesaxis.h \
49 $$PWD/valueaxis/qvalueaxis.h \
50 $$PWD/categoriesaxis/qbarcategoriesaxis.h \
50 $$PWD/categoriesaxis/qbarcategoriesaxis.h \
51 $$PWD/intervalsaxis/qintervalsaxis.h \
51 $$PWD/intervalsaxis/qintervalsaxis.h \
52 $$PWD/datetimeaxis/qdatetimeaxis.h
52 $$PWD/datetimeaxis/qdatetimeaxis.h
@@ -22,7 +22,7
22 #define QCATEGORIESAXIS_H
22 #define QCATEGORIESAXIS_H
23
23
24 #include "qabstractaxis.h"
24 #include "qabstractaxis.h"
25 #include "qvaluesaxis.h"
25 #include "qvalueaxis.h"
26
26
27 QTCOMMERCIALCHART_BEGIN_NAMESPACE
27 QTCOMMERCIALCHART_BEGIN_NAMESPACE
28
28
@@ -31,7 +31,7
31 #define QIntervalsAxis_P_H
31 #define QIntervalsAxis_P_H
32
32
33 #include "qintervalsaxis.h"
33 #include "qintervalsaxis.h"
34 #include "qvaluesaxis_p.h"
34 #include "qvalueaxis_p.h"
35
35
36 QTCOMMERCIALCHART_BEGIN_NAMESPACE
36 QTCOMMERCIALCHART_BEGIN_NAMESPACE
37
37
@@ -18,10 +18,10
18 **
18 **
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 #include "chartvaluesaxisx_p.h"
21 #include "chartvalueaxisx_p.h"
22 #include "qabstractaxis.h"
22 #include "qabstractaxis.h"
23 #include "chartpresenter_p.h"
23 #include "chartpresenter_p.h"
24 #include "qvaluesaxis.h"
24 #include "qvalueaxis.h"
25 #include <QGraphicsLayout>
25 #include <QGraphicsLayout>
26 #include <QFontMetrics>
26 #include <QFontMetrics>
27 #include <qmath.h>
27 #include <qmath.h>
@@ -30,16 +30,16 static int label_padding = 5;
30
30
31 QTCOMMERCIALCHART_BEGIN_NAMESPACE
31 QTCOMMERCIALCHART_BEGIN_NAMESPACE
32
32
33 ChartValuesAxisX::ChartValuesAxisX(QAbstractAxis *axis,ChartPresenter *presenter) : ChartAxis(axis,presenter),
33 ChartValueAxisX::ChartValueAxisX(QAbstractAxis *axis,ChartPresenter *presenter) : ChartAxis(axis,presenter),
34 m_tickCount(0)
34 m_tickCount(0)
35 {
35 {
36 }
36 }
37
37
38 ChartValuesAxisX::~ChartValuesAxisX()
38 ChartValueAxisX::~ChartValueAxisX()
39 {
39 {
40 }
40 }
41
41
42 QVector<qreal> ChartValuesAxisX::calculateLayout() const
42 QVector<qreal> ChartValueAxisX::calculateLayout() const
43 {
43 {
44 Q_ASSERT(m_tickCount>=2);
44 Q_ASSERT(m_tickCount>=2);
45
45
@@ -54,7 +54,7 QVector<qreal> ChartValuesAxisX::calculateLayout() const
54 return points;
54 return points;
55 }
55 }
56
56
57 void ChartValuesAxisX::updateGeometry()
57 void ChartValueAxisX::updateGeometry()
58 {
58 {
59 const QVector<qreal>& layout = ChartAxis::layout();
59 const QVector<qreal>& layout = ChartAxis::layout();
60
60
@@ -109,7 +109,7 void ChartValuesAxisX::updateGeometry()
109 }
109 }
110 }
110 }
111
111
112 void ChartValuesAxisX::handleAxisUpdated()
112 void ChartValueAxisX::handleAxisUpdated()
113 {
113 {
114 //TODO:: fix this
114 //TODO:: fix this
115 QValueAxis* axis = qobject_cast<QValueAxis*>(m_chartAxis);
115 QValueAxis* axis = qobject_cast<QValueAxis*>(m_chartAxis);
@@ -37,11 +37,11 QTCOMMERCIALCHART_BEGIN_NAMESPACE
37 class QAbstractAxis;
37 class QAbstractAxis;
38 class ChartPresenter;
38 class ChartPresenter;
39
39
40 class ChartValuesAxisX : public ChartAxis
40 class ChartValueAxisX : public ChartAxis
41 {
41 {
42 public:
42 public:
43 ChartValuesAxisX(QAbstractAxis *axis, ChartPresenter *presenter);
43 ChartValueAxisX(QAbstractAxis *axis, ChartPresenter *presenter);
44 ~ChartValuesAxisX();
44 ~ChartValueAxisX();
45
45
46 AxisType axisType() const { return X_AXIS;}
46 AxisType axisType() const { return X_AXIS;}
47
47
@@ -18,10 +18,10
18 **
18 **
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 #include "chartvaluesaxisy_p.h"
21 #include "chartvalueaxisy_p.h"
22 #include "qabstractaxis.h"
22 #include "qabstractaxis.h"
23 #include "chartpresenter_p.h"
23 #include "chartpresenter_p.h"
24 #include "qvaluesaxis.h"
24 #include "qvalueaxis.h"
25 #include <QGraphicsLayout>
25 #include <QGraphicsLayout>
26 #include <QFontMetrics>
26 #include <QFontMetrics>
27 #include <qmath.h>
27 #include <qmath.h>
@@ -30,16 +30,16 static int label_padding = 5;
30
30
31 QTCOMMERCIALCHART_BEGIN_NAMESPACE
31 QTCOMMERCIALCHART_BEGIN_NAMESPACE
32
32
33 ChartValuesAxisY::ChartValuesAxisY(QAbstractAxis *axis,ChartPresenter *presenter) : ChartAxis(axis,presenter),
33 ChartValueAxisY::ChartValueAxisY(QAbstractAxis *axis,ChartPresenter *presenter) : ChartAxis(axis,presenter),
34 m_tickCount(0)
34 m_tickCount(0)
35 {
35 {
36 }
36 }
37
37
38 ChartValuesAxisY::~ChartValuesAxisY()
38 ChartValueAxisY::~ChartValueAxisY()
39 {
39 {
40 }
40 }
41
41
42 QVector<qreal> ChartValuesAxisY::calculateLayout() const
42 QVector<qreal> ChartValueAxisY::calculateLayout() const
43 {
43 {
44 Q_ASSERT(m_tickCount>=2);
44 Q_ASSERT(m_tickCount>=2);
45
45
@@ -55,7 +55,7 QVector<qreal> ChartValuesAxisY::calculateLayout() const
55 return points;
55 return points;
56 }
56 }
57
57
58 void ChartValuesAxisY::updateGeometry()
58 void ChartValueAxisY::updateGeometry()
59 {
59 {
60 const QVector<qreal> &layout = ChartAxis::layout();
60 const QVector<qreal> &layout = ChartAxis::layout();
61 m_minWidth = 0;
61 m_minWidth = 0;
@@ -114,7 +114,7 void ChartValuesAxisY::updateGeometry()
114 }
114 }
115 }
115 }
116
116
117 void ChartValuesAxisY::handleAxisUpdated()
117 void ChartValueAxisY::handleAxisUpdated()
118 {
118 {
119 //TODO:: fix this
119 //TODO:: fix this
120 QValueAxis* axis = qobject_cast<QValueAxis*>(m_chartAxis);
120 QValueAxis* axis = qobject_cast<QValueAxis*>(m_chartAxis);
@@ -37,11 +37,11 QTCOMMERCIALCHART_BEGIN_NAMESPACE
37 class QAbstractAxis;
37 class QAbstractAxis;
38 class ChartPresenter;
38 class ChartPresenter;
39
39
40 class ChartValuesAxisY : public ChartAxis
40 class ChartValueAxisY : public ChartAxis
41 {
41 {
42 public:
42 public:
43 ChartValuesAxisY(QAbstractAxis *axis, ChartPresenter *presenter);
43 ChartValueAxisY(QAbstractAxis *axis, ChartPresenter *presenter);
44 ~ChartValuesAxisY();
44 ~ChartValueAxisY();
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 "qvaluesaxis.h"
21 #include "qvalueaxis.h"
22 #include "qvaluesaxis_p.h"
22 #include "qvalueaxis_p.h"
23 #include "chartvaluesaxisx_p.h"
23 #include "chartvalueaxisx_p.h"
24 #include "chartvaluesaxisy_p.h"
24 #include "chartvalueaxisy_p.h"
25 #include "domain_p.h"
25 #include "domain_p.h"
26 #include "chartdataset_p.h"
26 #include "chartdataset_p.h"
27 #include <qmath.h>
27 #include <qmath.h>
@@ -318,9 +318,9 ChartAxis* QValueAxisPrivate::createGraphics(ChartPresenter* presenter)
318 {
318 {
319 Q_Q(QValueAxis);
319 Q_Q(QValueAxis);
320 if(m_orientation == Qt::Vertical){
320 if(m_orientation == Qt::Vertical){
321 return new ChartValuesAxisY(q,presenter);
321 return new ChartValueAxisY(q,presenter);
322 }else{
322 }else{
323 return new ChartValuesAxisX(q,presenter);
323 return new ChartValueAxisX(q,presenter);
324 }
324 }
325
325
326 }
326 }
@@ -378,7 +378,7 qreal QValueAxisPrivate::niceNumber(qreal x,bool ceiling) const
378 return q*z;
378 return q*z;
379 }
379 }
380
380
381 #include "moc_qvaluesaxis.cpp"
381 #include "moc_qvalueaxis.cpp"
382 #include "moc_qvaluesaxis_p.cpp"
382 #include "moc_qvalueaxis_p.cpp"
383
383
384 QTCOMMERCIALCHART_END_NAMESPACE
384 QTCOMMERCIALCHART_END_NAMESPACE
1 NO CONTENT: file renamed from src/axis/valuesaxis/qvaluesaxis.h to src/axis/valueaxis/qvalueaxis.h
NO CONTENT: file renamed from src/axis/valuesaxis/qvaluesaxis.h to src/axis/valueaxis/qvalueaxis.h
@@ -30,7 +30,7
30 #ifndef QVALUESAXIS_P_H
30 #ifndef QVALUESAXIS_P_H
31 #define QVALUESAXIS_P_H
31 #define QVALUESAXIS_P_H
32
32
33 #include "qvaluesaxis.h"
33 #include "qvalueaxis.h"
34 #include "qabstractaxis_p.h"
34 #include "qabstractaxis_p.h"
35
35
36 QTCOMMERCIALCHART_BEGIN_NAMESPACE
36 QTCOMMERCIALCHART_BEGIN_NAMESPACE
@@ -26,7 +26,7
26 #include "legendmarker_p.h"
26 #include "legendmarker_p.h"
27 #include "chartdataset_p.h"
27 #include "chartdataset_p.h"
28 #include "charttheme_p.h"
28 #include "charttheme_p.h"
29 #include "qvaluesaxis.h"
29 #include "qvalueaxis.h"
30 #include "qbarcategoriesaxis.h"
30 #include "qbarcategoriesaxis.h"
31
31
32 QTCOMMERCIALCHART_BEGIN_NAMESPACE
32 QTCOMMERCIALCHART_BEGIN_NAMESPACE
@@ -24,7 +24,7
24 #include "chartdataset_p.h"
24 #include "chartdataset_p.h"
25 #include "charttheme_p.h"
25 #include "charttheme_p.h"
26 #include "baranimation_p.h"
26 #include "baranimation_p.h"
27 #include "qvaluesaxis.h"
27 #include "qvalueaxis.h"
28 #include "qbarcategoriesaxis.h"
28 #include "qbarcategoriesaxis.h"
29
29
30 QTCOMMERCIALCHART_BEGIN_NAMESPACE
30 QTCOMMERCIALCHART_BEGIN_NAMESPACE
@@ -23,7 +23,7
23 #include "percentbarchartitem_p.h"
23 #include "percentbarchartitem_p.h"
24 #include "chartdataset_p.h"
24 #include "chartdataset_p.h"
25 #include "charttheme_p.h"
25 #include "charttheme_p.h"
26 #include "qvaluesaxis.h"
26 #include "qvalueaxis.h"
27 #include "percentbaranimation_p.h"
27 #include "percentbaranimation_p.h"
28
28
29 QTCOMMERCIALCHART_BEGIN_NAMESPACE
29 QTCOMMERCIALCHART_BEGIN_NAMESPACE
@@ -23,7 +23,7
23 #include "stackedbarchartitem_p.h"
23 #include "stackedbarchartitem_p.h"
24 #include "chartdataset_p.h"
24 #include "chartdataset_p.h"
25 #include "charttheme_p.h"
25 #include "charttheme_p.h"
26 #include "qvaluesaxis.h"
26 #include "qvalueaxis.h"
27 #include "stackedbaranimation_p.h"
27 #include "stackedbaranimation_p.h"
28
28
29 QTCOMMERCIALCHART_BEGIN_NAMESPACE
29 QTCOMMERCIALCHART_BEGIN_NAMESPACE
@@ -20,9 +20,9
20
20
21 #include "chartdataset_p.h"
21 #include "chartdataset_p.h"
22 #include "qchart.h"
22 #include "qchart.h"
23 #include "qvaluesaxis.h"
23 #include "qvalueaxis.h"
24 #include "qbarcategoriesaxis.h"
24 #include "qbarcategoriesaxis.h"
25 #include "qvaluesaxis_p.h"
25 #include "qvalueaxis_p.h"
26 #include "qintervalsaxis.h"
26 #include "qintervalsaxis.h"
27 #include "qdatetimeaxis.h"
27 #include "qdatetimeaxis.h"
28 #include "qabstractseries_p.h"
28 #include "qabstractseries_p.h"
@@ -22,7 +22,7
22 #include "qxyseries_p.h"
22 #include "qxyseries_p.h"
23 #include "domain_p.h"
23 #include "domain_p.h"
24 #include "legendmarker_p.h"
24 #include "legendmarker_p.h"
25 #include "qvaluesaxis.h"
25 #include "qvalueaxis.h"
26
26
27 QTCOMMERCIALCHART_BEGIN_NAMESPACE
27 QTCOMMERCIALCHART_BEGIN_NAMESPACE
28
28
@@ -33,7 +33,7
33 #include "qchartglobal.h"
33 #include "qchartglobal.h"
34 #include "chartitem_p.h"
34 #include "chartitem_p.h"
35 #include "xyanimation_p.h"
35 #include "xyanimation_p.h"
36 #include "qvaluesaxis.h"
36 #include "qvalueaxis.h"
37 #include <QPen>
37 #include <QPen>
38
38
39 QTCOMMERCIALCHART_BEGIN_NAMESPACE
39 QTCOMMERCIALCHART_BEGIN_NAMESPACE
@@ -20,7 +20,7 SUBDIRS += \
20 qhorizontalbarseries \
20 qhorizontalbarseries \
21 qhorizontalstackedbarseries \
21 qhorizontalstackedbarseries \
22 qhorizontalpercentbarseries \
22 qhorizontalpercentbarseries \
23 qvaluesaxis \
23 qvalueaxis \
24 qintervalsaxis \
24 qintervalsaxis \
25 qdatetimeaxis \
25 qdatetimeaxis \
26 qbarcategoriesaxis
26 qbarcategoriesaxis
@@ -20,7 +20,7
20
20
21 #include <QtTest/QtTest>
21 #include <QtTest/QtTest>
22 #include <qabstractaxis.h>
22 #include <qabstractaxis.h>
23 #include <qvaluesaxis.h>
23 #include <qvalueaxis.h>
24 #include <qbarcategoriesaxis.h>
24 #include <qbarcategoriesaxis.h>
25 #include <qlineseries.h>
25 #include <qlineseries.h>
26 #include <qareaseries.h>
26 #include <qareaseries.h>
@@ -29,7 +29,7
29 #include <qbarseries.h>
29 #include <qbarseries.h>
30 #include <qpercentbarseries.h>
30 #include <qpercentbarseries.h>
31 #include <qstackedbarseries.h>
31 #include <qstackedbarseries.h>
32 #include <qvaluesaxis.h>
32 #include <qvalueaxis.h>
33 #include <qbarcategoriesaxis.h>
33 #include <qbarcategoriesaxis.h>
34
34
35 QTCOMMERCIALCHART_USE_NAMESPACE
35 QTCOMMERCIALCHART_USE_NAMESPACE
@@ -23,7 +23,7
23 #include <qlineseries.h>
23 #include <qlineseries.h>
24 #include <cmath>
24 #include <cmath>
25 #include <tst_definitions.h>
25 #include <tst_definitions.h>
26 #include <qvaluesaxis.h>
26 #include <qvalueaxis.h>
27
27
28 QTCOMMERCIALCHART_USE_NAMESPACE
28 QTCOMMERCIALCHART_USE_NAMESPACE
29
29
@@ -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_qvaluesaxis.cpp ../qabstractaxis/tst_qabstractaxis.cpp
5 SOURCES += tst_qvalueaxis.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 "qvaluesaxis.h"
22 #include "qvalueaxis.h"
23 #include <qlineseries.h>
23 #include <qlineseries.h>
24
24
25 class tst_QValueAxis: public tst_QAbstractAxis
25 class tst_QValueAxis: 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 qvaluesaxis_data();
36 void qvalueaxis_data();
37 void qvaluesaxis();
37 void qvalueaxis();
38 void max_raw_data();
38 void max_raw_data();
39 void max_raw();
39 void max_raw();
40 void max_data();
40 void max_data();
@@ -94,11 +94,11 void tst_QValueAxis::cleanup()
94 tst_QAbstractAxis::cleanup();
94 tst_QAbstractAxis::cleanup();
95 }
95 }
96
96
97 void tst_QValueAxis::qvaluesaxis_data()
97 void tst_QValueAxis::qvalueaxis_data()
98 {
98 {
99 }
99 }
100
100
101 void tst_QValueAxis::qvaluesaxis()
101 void tst_QValueAxis::qvalueaxis()
102 {
102 {
103 qabstractaxis();
103 qabstractaxis();
104
104
@@ -411,5 +411,5 void tst_QValueAxis::autoscale()
411 }
411 }
412
412
413 QTEST_MAIN(tst_QValueAxis)
413 QTEST_MAIN(tst_QValueAxis)
414 #include "tst_qvaluesaxis.moc"
414 #include "tst_qvalueaxis.moc"
415
415
General Comments 0
You need to be logged in to leave comments. Login now