@@ -28,17 +28,17 static int label_padding = 5; | |||
|
28 | 28 | |
|
29 | 29 | QTCOMMERCIALCHART_BEGIN_NAMESPACE |
|
30 | 30 | |
|
31 |
ChartCategor |
|
|
31 | ChartBarCategoryAxisX::ChartBarCategoryAxisX(QBarCategoryAxis *axis,ChartPresenter *presenter) : ChartAxis(axis,presenter), | |
|
32 | 32 | m_categoriesAxis(axis) |
|
33 | 33 | { |
|
34 | 34 | |
|
35 | 35 | } |
|
36 | 36 | |
|
37 |
ChartCategor |
|
|
37 | ChartBarCategoryAxisX::~ChartBarCategoryAxisX() | |
|
38 | 38 | { |
|
39 | 39 | } |
|
40 | 40 | |
|
41 |
QVector<qreal> ChartCategor |
|
|
41 | QVector<qreal> ChartBarCategoryAxisX::calculateLayout() const | |
|
42 | 42 | { |
|
43 | 43 | int count = m_categoriesAxis->d_ptr->count(); |
|
44 | 44 | |
@@ -69,7 +69,7 QVector<qreal> ChartCategoriesAxisX::calculateLayout() const | |||
|
69 | 69 | return points; |
|
70 | 70 | } |
|
71 | 71 | |
|
72 |
QStringList ChartCategor |
|
|
72 | QStringList ChartBarCategoryAxisX::createCategoryLabels(const QVector<qreal>& layout) const | |
|
73 | 73 | { |
|
74 | 74 | QStringList result; |
|
75 | 75 | qreal d = (m_max - m_min)/m_rect.width(); |
@@ -88,7 +88,7 QStringList ChartCategoriesAxisX::createCategoryLabels(const QVector<qreal>& lay | |||
|
88 | 88 | } |
|
89 | 89 | |
|
90 | 90 | |
|
91 |
void ChartCategor |
|
|
91 | void ChartBarCategoryAxisX::updateGeometry() | |
|
92 | 92 | { |
|
93 | 93 | const QVector<qreal>& layout = ChartAxis::layout(); |
|
94 | 94 | |
@@ -148,7 +148,7 void ChartCategoriesAxisX::updateGeometry() | |||
|
148 | 148 | } |
|
149 | 149 | } |
|
150 | 150 | |
|
151 |
void ChartCategor |
|
|
151 | void ChartBarCategoryAxisX::handleAxisUpdated() | |
|
152 | 152 | { |
|
153 | 153 | if(m_categoriesAxis->categories()!=m_categories) |
|
154 | 154 | { |
@@ -38,11 +38,11 class QAbstractAxis; | |||
|
38 | 38 | class ChartPresenter; |
|
39 | 39 | class QBarCategoryAxis; |
|
40 | 40 | |
|
41 |
class ChartCategor |
|
|
41 | class ChartBarCategoryAxisX : public ChartAxis | |
|
42 | 42 | { |
|
43 | 43 | public: |
|
44 |
ChartCategor |
|
|
45 |
~ChartCategor |
|
|
44 | ChartBarCategoryAxisX(QBarCategoryAxis *axis, ChartPresenter *presenter); | |
|
45 | ~ChartBarCategoryAxisX(); | |
|
46 | 46 | |
|
47 | 47 | AxisType axisType() const { return X_AXIS;} |
|
48 | 48 |
@@ -28,16 +28,16 static int label_padding = 5; | |||
|
28 | 28 | |
|
29 | 29 | QTCOMMERCIALCHART_BEGIN_NAMESPACE |
|
30 | 30 | |
|
31 |
ChartCategor |
|
|
31 | ChartBarCategoryAxisY::ChartBarCategoryAxisY(QBarCategoryAxis *axis,ChartPresenter *presenter) : ChartAxis(axis,presenter), | |
|
32 | 32 | m_categoriesAxis(axis) |
|
33 | 33 | { |
|
34 | 34 | } |
|
35 | 35 | |
|
36 |
ChartCategor |
|
|
36 | ChartBarCategoryAxisY::~ChartBarCategoryAxisY() | |
|
37 | 37 | { |
|
38 | 38 | } |
|
39 | 39 | |
|
40 |
QVector<qreal> ChartCategor |
|
|
40 | QVector<qreal> ChartBarCategoryAxisY::calculateLayout() const | |
|
41 | 41 | { |
|
42 | 42 | int count = m_categoriesAxis->d_ptr->count(); |
|
43 | 43 | |
@@ -68,7 +68,7 QVector<qreal> ChartCategoriesAxisY::calculateLayout() const | |||
|
68 | 68 | return points; |
|
69 | 69 | } |
|
70 | 70 | |
|
71 |
QStringList ChartCategor |
|
|
71 | QStringList ChartBarCategoryAxisY::createCategoryLabels(const QVector<qreal>& layout) const | |
|
72 | 72 | { |
|
73 | 73 | QStringList result; |
|
74 | 74 | qreal d = (m_max - m_min)/m_rect.height(); |
@@ -86,7 +86,7 QStringList ChartCategoriesAxisY::createCategoryLabels(const QVector<qreal>& lay | |||
|
86 | 86 | return result; |
|
87 | 87 | } |
|
88 | 88 | |
|
89 |
void ChartCategor |
|
|
89 | void ChartBarCategoryAxisY::updateGeometry() | |
|
90 | 90 | { |
|
91 | 91 | const QVector<qreal>& layout = ChartAxis::layout(); |
|
92 | 92 | |
@@ -147,7 +147,7 void ChartCategoriesAxisY::updateGeometry() | |||
|
147 | 147 | } |
|
148 | 148 | } |
|
149 | 149 | |
|
150 |
void ChartCategor |
|
|
150 | void ChartBarCategoryAxisY::handleAxisUpdated() | |
|
151 | 151 | { |
|
152 | 152 | |
|
153 | 153 | if(m_categoriesAxis->categories()!=m_categories) |
@@ -38,11 +38,11 class QAbstractAxis; | |||
|
38 | 38 | class QBarCategoryAxis; |
|
39 | 39 | class ChartPresenter; |
|
40 | 40 | |
|
41 |
class ChartCategor |
|
|
41 | class ChartBarCategoryAxisY : public ChartAxis | |
|
42 | 42 | { |
|
43 | 43 | public: |
|
44 |
ChartCategor |
|
|
45 |
~ChartCategor |
|
|
44 | ChartBarCategoryAxisY(QBarCategoryAxis *axis, ChartPresenter *presenter); | |
|
45 | ~ChartBarCategoryAxisY(); | |
|
46 | 46 | |
|
47 | 47 | AxisType axisType() const { return Y_AXIS;} |
|
48 | 48 |
@@ -446,9 +446,9 ChartAxis* QBarCategoryAxisPrivate::createGraphics(ChartPresenter* presenter) | |||
|
446 | 446 | { |
|
447 | 447 | Q_Q(QBarCategoryAxis); |
|
448 | 448 | if(m_orientation == Qt::Vertical){ |
|
449 |
return new ChartCategor |
|
|
449 | return new ChartBarCategoryAxisY(q,presenter); | |
|
450 | 450 | }else{ |
|
451 |
return new ChartCategor |
|
|
451 | return new ChartBarCategoryAxisX(q,presenter); | |
|
452 | 452 | } |
|
453 | 453 | } |
|
454 | 454 |
@@ -70,8 +70,8 Q_SIGNALS: | |||
|
70 | 70 | private: |
|
71 | 71 | Q_DECLARE_PRIVATE(QBarCategoryAxis) |
|
72 | 72 | Q_DISABLE_COPY(QBarCategoryAxis) |
|
73 |
friend class ChartCategor |
|
|
74 |
friend class ChartCategor |
|
|
73 | friend class ChartBarCategoryAxisX; | |
|
74 | friend class ChartBarCategoryAxisY; | |
|
75 | 75 | }; |
|
76 | 76 | |
|
77 | 77 | QTCOMMERCIALCHART_END_NAMESPACE |
General Comments 0
You need to be logged in to leave comments.
Login now