From f04afbebdb7b1af8c437f93f87c4db9323acebf8 2012-08-22 12:57:40 From: Marek Rosa Date: 2012-08-22 12:57:40 Subject: [PATCH] Renamed QCategoryAxis related files --- diff --git a/doc/src/classes.qdoc b/doc/src/classes.qdoc index eb5ac31..313136d 100644 --- a/doc/src/classes.qdoc +++ b/doc/src/classes.qdoc @@ -34,7 +34,7 @@
  • QAbstractAxis
  • QValueAxis
  • QBarCategoryAxis
  • -
  • QIntervalsAxis
  • +
  • QCategoryAxis
  • QLegend
  • QAbstractSeries
  • QChartGlobal
  • diff --git a/src/axis/axis.pri b/src/axis/axis.pri index 94046bf..935e724 100644 --- a/src/axis/axis.pri +++ b/src/axis/axis.pri @@ -3,13 +3,13 @@ INCLUDEPATH += $$PWD \ $$PWD/valueaxis \ $$PWD/barcategoryaxis \ - $$PWD/intervalsaxis \ + $$PWD/categoryaxis \ $$PWD/datetimeaxis DEPENDPATH += $$PWD \ $$PWD/valueaxis \ $$PWD/barcategoryaxis \ - $$PWD/intervalsaxis \ + $$PWD/categoryaxis \ $$PWD/datetimeaxis SOURCES += \ @@ -21,9 +21,9 @@ SOURCES += \ $$PWD/barcategoryaxis/chartbarcategoryaxisx.cpp \ $$PWD/barcategoryaxis/chartbarcategoryaxisy.cpp \ $$PWD/barcategoryaxis/qbarcategoryaxis.cpp \ - $$PWD/intervalsaxis/chartintervalsaxisx.cpp \ - $$PWD/intervalsaxis/chartintervalsaxisy.cpp \ - $$PWD/intervalsaxis/qintervalsaxis.cpp \ + $$PWD/categoryaxis/chartcategoryaxisx.cpp \ + $$PWD/categoryaxis/chartcategoryaxisy.cpp \ + $$PWD/categoryaxis/qcategoryaxis.cpp \ $$PWD/datetimeaxis/chartdatetimeaxisx.cpp \ $$PWD/datetimeaxis/chartdatetimeaxisy.cpp \ $$PWD/datetimeaxis/qdatetimeaxis.cpp @@ -37,9 +37,9 @@ PRIVATE_HEADERS += \ $$PWD/barcategoryaxis/chartbarcategoryaxisx_p.h \ $$PWD/barcategoryaxis/chartbarcategoryaxisy_p.h \ $$PWD/barcategoryaxis/qbarcategoryaxis_p.h \ - $$PWD/intervalsaxis/chartintervalsaxisx_p.h \ - $$PWD/intervalsaxis/chartintervalsaxisy_p.h \ - $$PWD/intervalsaxis/qintervalsaxis_p.h \ + $$PWD/categoryaxis/chartcategoryaxisx_p.h \ + $$PWD/categoryaxis/chartcategoryaxisy_p.h \ + $$PWD/categoryaxis/qcategoryaxis_p.h \ $$PWD/datetimeaxis/chartdatetimeaxisx_p.h \ $$PWD/datetimeaxis/chartdatetimeaxisy_p.h \ $$PWD/datetimeaxis/qdatetimeaxis_p.h @@ -48,5 +48,5 @@ PUBLIC_HEADERS += \ $$PWD/qabstractaxis.h \ $$PWD/valueaxis/qvalueaxis.h \ $$PWD/barcategoryaxis/qbarcategoryaxis.h \ - $$PWD/intervalsaxis/qintervalsaxis.h \ + $$PWD/categoryaxis/qcategoryaxis.h \ $$PWD/datetimeaxis/qdatetimeaxis.h diff --git a/src/axis/intervalsaxis/chartintervalsaxisx.cpp b/src/axis/categoryaxis/chartcategoryaxisx.cpp similarity index 93% rename from src/axis/intervalsaxis/chartintervalsaxisx.cpp rename to src/axis/categoryaxis/chartcategoryaxisx.cpp index 0c05feb..43b2a5b 100644 --- a/src/axis/intervalsaxis/chartintervalsaxisx.cpp +++ b/src/axis/categoryaxis/chartcategoryaxisx.cpp @@ -18,8 +18,8 @@ ** ****************************************************************************/ -#include "chartintervalsaxisx_p.h" -#include "qintervalsaxis.h" +#include "chartcategoryaxisx_p.h" +#include "qcategoryaxis.h" #include "qabstractaxis.h" #include "chartpresenter_p.h" #include @@ -30,15 +30,15 @@ static int label_padding = 5; QTCOMMERCIALCHART_BEGIN_NAMESPACE -ChartIntervalAxisX::ChartIntervalAxisX(QAbstractAxis *axis,ChartPresenter *presenter) : ChartAxis(axis,presenter) +ChartCategoryAxisX::ChartCategoryAxisX(QAbstractAxis *axis,ChartPresenter *presenter) : ChartAxis(axis,presenter) { } -ChartIntervalAxisX::~ChartIntervalAxisX() +ChartCategoryAxisX::~ChartCategoryAxisX() { } -QVector ChartIntervalAxisX::calculateLayout() const +QVector ChartCategoryAxisX::calculateLayout() const { QCategoryAxis *axis = qobject_cast(m_chartAxis); int tickCount = axis->intervalsLabels().count() + 1; @@ -62,7 +62,7 @@ QVector ChartIntervalAxisX::calculateLayout() const return points; } -void ChartIntervalAxisX::updateGeometry() +void ChartCategoryAxisX::updateGeometry() { const QVector& layout = ChartAxis::layout(); @@ -121,7 +121,7 @@ void ChartIntervalAxisX::updateGeometry() } } -void ChartIntervalAxisX::handleAxisUpdated() +void ChartCategoryAxisX::handleAxisUpdated() { updateGeometry(); ChartAxis::handleAxisUpdated(); diff --git a/src/axis/intervalsaxis/chartintervalsaxisx_p.h b/src/axis/categoryaxis/chartcategoryaxisx_p.h similarity index 93% rename from src/axis/intervalsaxis/chartintervalsaxisx_p.h rename to src/axis/categoryaxis/chartcategoryaxisx_p.h index 987dc1b..a3ff02b 100644 --- a/src/axis/intervalsaxis/chartintervalsaxisx_p.h +++ b/src/axis/categoryaxis/chartcategoryaxisx_p.h @@ -37,11 +37,11 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE class QAbstractAxis; class ChartPresenter; -class ChartIntervalAxisX : public ChartAxis +class ChartCategoryAxisX : public ChartAxis { public: - ChartIntervalAxisX(QAbstractAxis *axis, ChartPresenter *presenter); - ~ChartIntervalAxisX(); + ChartCategoryAxisX(QAbstractAxis *axis, ChartPresenter *presenter); + ~ChartCategoryAxisX(); AxisType axisType() const { return X_AXIS;} diff --git a/src/axis/intervalsaxis/chartintervalsaxisy.cpp b/src/axis/categoryaxis/chartcategoryaxisy.cpp similarity index 93% rename from src/axis/intervalsaxis/chartintervalsaxisy.cpp rename to src/axis/categoryaxis/chartcategoryaxisy.cpp index 24df9fe..1b5317e 100644 --- a/src/axis/intervalsaxis/chartintervalsaxisy.cpp +++ b/src/axis/categoryaxis/chartcategoryaxisy.cpp @@ -18,8 +18,8 @@ ** ****************************************************************************/ -#include "chartintervalsaxisy_p.h" -#include "qintervalsaxis.h" +#include "chartcategoryaxisy_p.h" +#include "qcategoryaxis.h" #include "qabstractaxis.h" #include "chartpresenter_p.h" #include @@ -31,15 +31,15 @@ static int label_padding = 5; QTCOMMERCIALCHART_BEGIN_NAMESPACE -ChartIntervalAxisY::ChartIntervalAxisY(QAbstractAxis *axis,ChartPresenter *presenter) : ChartAxis(axis,presenter) +ChartCategoryAxisY::ChartCategoryAxisY(QAbstractAxis *axis,ChartPresenter *presenter) : ChartAxis(axis,presenter) { } -ChartIntervalAxisY::~ChartIntervalAxisY() +ChartCategoryAxisY::~ChartCategoryAxisY() { } -QVector ChartIntervalAxisY::calculateLayout() const +QVector ChartCategoryAxisY::calculateLayout() const { QCategoryAxis *axis = qobject_cast(m_chartAxis); int tickCount = axis->intervalsLabels().count() + 1; @@ -63,7 +63,7 @@ QVector ChartIntervalAxisY::calculateLayout() const return points; } -void ChartIntervalAxisY::updateGeometry() +void ChartCategoryAxisY::updateGeometry() { const QVector &layout = ChartAxis::layout(); m_minWidth = 0; @@ -128,7 +128,7 @@ void ChartIntervalAxisY::updateGeometry() } } -void ChartIntervalAxisY::handleAxisUpdated() +void ChartCategoryAxisY::handleAxisUpdated() { updateGeometry(); ChartAxis::handleAxisUpdated(); diff --git a/src/axis/intervalsaxis/chartintervalsaxisy_p.h b/src/axis/categoryaxis/chartcategoryaxisy_p.h similarity index 93% rename from src/axis/intervalsaxis/chartintervalsaxisy_p.h rename to src/axis/categoryaxis/chartcategoryaxisy_p.h index 791b962..66c466b 100644 --- a/src/axis/intervalsaxis/chartintervalsaxisy_p.h +++ b/src/axis/categoryaxis/chartcategoryaxisy_p.h @@ -37,11 +37,11 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE class QAbstractAxis; class ChartPresenter; -class ChartIntervalAxisY : public ChartAxis +class ChartCategoryAxisY : public ChartAxis { public: - ChartIntervalAxisY(QAbstractAxis *axis, ChartPresenter *presenter); - ~ChartIntervalAxisY(); + ChartCategoryAxisY(QAbstractAxis *axis, ChartPresenter *presenter); + ~ChartCategoryAxisY(); AxisType axisType() const { return Y_AXIS;} diff --git a/src/axis/intervalsaxis/qintervalsaxis.cpp b/src/axis/categoryaxis/qcategoryaxis.cpp similarity index 88% rename from src/axis/intervalsaxis/qintervalsaxis.cpp rename to src/axis/categoryaxis/qcategoryaxis.cpp index 430d394..f693acf 100644 --- a/src/axis/intervalsaxis/qintervalsaxis.cpp +++ b/src/axis/categoryaxis/qcategoryaxis.cpp @@ -18,10 +18,10 @@ ** ****************************************************************************/ -#include "qintervalsaxis.h" -#include "qintervalsaxis_p.h" -#include "chartintervalsaxisx_p.h" -#include "chartintervalsaxisy_p.h" +#include "qcategoryaxis.h" +#include "qcategoryaxis_p.h" +#include "chartcategoryaxisx_p.h" +#include "chartcategoryaxisy_p.h" #include #include @@ -33,15 +33,8 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE */ /*! - \qmlclass Axis QCategoryAxis + \qmlclass CategoryAxis QCategoryAxis \brief The Axis element is used for manipulating chart's axes. - - Axis can be setup to show axis line with tick marks, grid lines and shades. - - To access Axes you can use ChartView API. For example: - \code - // TODO :) - \endcode */ /*! @@ -237,13 +230,13 @@ ChartAxis* QCategoryAxisPrivate::createGraphics(ChartPresenter* presenter) { Q_Q(QCategoryAxis); if(m_orientation == Qt::Vertical){ - return new ChartIntervalAxisY(q,presenter); + return new ChartCategoryAxisY(q,presenter); }else{ - return new ChartIntervalAxisX(q,presenter); + return new ChartCategoryAxisX(q,presenter); } } -#include "moc_qintervalsaxis.cpp" -#include "moc_qintervalsaxis_p.cpp" +#include "moc_qcategoryaxis.cpp" +#include "moc_qcategoryaxis_p.cpp" QTCOMMERCIALCHART_END_NAMESPACE diff --git a/src/axis/intervalsaxis/qintervalsaxis.h b/src/axis/categoryaxis/qcategoryaxis.h similarity index 100% rename from src/axis/intervalsaxis/qintervalsaxis.h rename to src/axis/categoryaxis/qcategoryaxis.h diff --git a/src/axis/intervalsaxis/qintervalsaxis_p.h b/src/axis/categoryaxis/qcategoryaxis_p.h similarity index 98% rename from src/axis/intervalsaxis/qintervalsaxis_p.h rename to src/axis/categoryaxis/qcategoryaxis_p.h index ed4cb7d..57b1678 100644 --- a/src/axis/intervalsaxis/qintervalsaxis_p.h +++ b/src/axis/categoryaxis/qcategoryaxis_p.h @@ -30,7 +30,7 @@ #ifndef QCATEGORYAXIS_P_H #define QCATEGORYAXIS_P_H -#include "qintervalsaxis.h" +#include "qcategoryaxis.h" #include "qvalueaxis_p.h" QTCOMMERCIALCHART_BEGIN_NAMESPACE diff --git a/src/chartdataset.cpp b/src/chartdataset.cpp index dab92a6..0cdfae6 100644 --- a/src/chartdataset.cpp +++ b/src/chartdataset.cpp @@ -23,7 +23,7 @@ #include "qvalueaxis.h" #include "qbarcategoryaxis.h" #include "qvalueaxis_p.h" -#include "qintervalsaxis.h" +#include "qcategoryaxis.h" #include "qdatetimeaxis.h" #include "qabstractseries_p.h" #include "qabstractbarseries.h" diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro index fe9e7b9..dec5190 100644 --- a/tests/auto/auto.pro +++ b/tests/auto/auto.pro @@ -21,7 +21,7 @@ SUBDIRS += \ qhorizontalstackedbarseries \ qhorizontalpercentbarseries \ qvalueaxis \ - qintervalsaxis \ + qcategoryaxis \ qdatetimeaxis \ qbarcategoryaxis diff --git a/tests/auto/qintervalsaxis/qintervalsaxis.pro b/tests/auto/qcategoryaxis/qcategoryaxis.pro similarity index 80% rename from tests/auto/qintervalsaxis/qintervalsaxis.pro rename to tests/auto/qcategoryaxis/qcategoryaxis.pro index 20a4976..3f662bb 100644 --- a/tests/auto/qintervalsaxis/qintervalsaxis.pro +++ b/tests/auto/qcategoryaxis/qcategoryaxis.pro @@ -2,4 +2,4 @@ error( "Couldn't find the auto.pri file!" ) } HEADERS += ../qabstractaxis/tst_qabstractaxis.h -SOURCES += tst_qintervalsaxis.cpp ../qabstractaxis/tst_qabstractaxis.cpp +SOURCES += tst_qcategoryaxis.cpp ../qabstractaxis/tst_qabstractaxis.cpp diff --git a/tests/auto/qintervalsaxis/tst_qintervalsaxis.cpp b/tests/auto/qcategoryaxis/tst_qcategoryaxis.cpp similarity index 96% rename from tests/auto/qintervalsaxis/tst_qintervalsaxis.cpp rename to tests/auto/qcategoryaxis/tst_qcategoryaxis.cpp index 0948a2f..d7f9f48 100644 --- a/tests/auto/qintervalsaxis/tst_qintervalsaxis.cpp +++ b/tests/auto/qcategoryaxis/tst_qcategoryaxis.cpp @@ -19,7 +19,7 @@ ****************************************************************************/ #include "../qabstractaxis/tst_qabstractaxis.h" -#include "qintervalsaxis.h" +#include "qcategoryaxis.h" #include class tst_QCategoryAxis: public tst_QAbstractAxis @@ -33,8 +33,8 @@ public slots: void cleanup(); private slots: - void qintervalsaxis_data(); - void qintervalsaxis(); + void qcategoryaxis_data(); + void qcategoryaxis(); void max_raw_data(); void max_raw(); @@ -90,11 +90,11 @@ void tst_QCategoryAxis::cleanup() tst_QAbstractAxis::cleanup(); } -void tst_QCategoryAxis::qintervalsaxis_data() +void tst_QCategoryAxis::qcategoryaxis_data() { } -void tst_QCategoryAxis::qintervalsaxis() +void tst_QCategoryAxis::qcategoryaxis() { qabstractaxis(); @@ -300,5 +300,5 @@ void tst_QCategoryAxis::interval() } QTEST_MAIN(tst_QCategoryAxis) -#include "tst_qintervalsaxis.moc" +#include "tst_qcategoryaxis.moc"