@@ -66,9 +66,6 Q_DECLARE_METATYPE(QList<QAbstractAxis *>) | |||||
66 |
|
66 | |||
67 | #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) |
|
67 | #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) | |
68 |
|
68 | |||
69 | // NOTE: Hackish fixes for Qt5 (beta2). |
|
|||
70 | // These should not be needed or at least they are not needed in Qt4. |
|
|||
71 |
|
||||
72 | Q_DECLARE_METATYPE(DeclarativeChart *) |
|
69 | Q_DECLARE_METATYPE(DeclarativeChart *) | |
73 | Q_DECLARE_METATYPE(DeclarativePolarChart *) |
|
70 | Q_DECLARE_METATYPE(DeclarativePolarChart *) | |
74 | Q_DECLARE_METATYPE(DeclarativeMargins *) |
|
71 | Q_DECLARE_METATYPE(DeclarativeMargins *) |
@@ -58,11 +58,6 void AxisAnimation::setValues(QVector<qreal> &oldLayout, QVector<qreal> &newLayo | |||||
58 | { |
|
58 | { | |
59 | if (state() != QAbstractAnimation::Stopped) stop(); |
|
59 | if (state() != QAbstractAnimation::Stopped) stop(); | |
60 |
|
60 | |||
61 | // TODO: cannot return even if layout is empty |
|
|||
62 | // New layout is not set properly without it (crash) |
|
|||
63 | // if (newLayout.count() == 0) |
|
|||
64 | // return; |
|
|||
65 |
|
||||
66 | switch (m_type) { |
|
61 | switch (m_type) { | |
67 | case ZoomOutAnimation: { |
|
62 | case ZoomOutAnimation: { | |
68 | QRectF rect = m_axis->gridGeometry(); |
|
63 | QRectF rect = m_axis->gridGeometry(); |
@@ -31,8 +31,6 | |||||
31 |
|
31 | |||
32 | QTCOMMERCIALCHART_BEGIN_NAMESPACE |
|
32 | QTCOMMERCIALCHART_BEGIN_NAMESPACE | |
33 |
|
33 | |||
34 | //TODO: optimize : remove points which are not visible |
|
|||
35 |
|
||||
36 | AreaChartItem::AreaChartItem(QAreaSeries *areaSeries, QGraphicsItem* item) |
|
34 | AreaChartItem::AreaChartItem(QAreaSeries *areaSeries, QGraphicsItem* item) | |
37 | : ChartItem(areaSeries->d_func(),item), |
|
35 | : ChartItem(areaSeries->d_func(),item), | |
38 | m_series(areaSeries), |
|
36 | m_series(areaSeries), |
@@ -68,7 +68,6 QVector<qreal> ChartCategoryAxisX::calculateLayout() const | |||||
68 |
|
68 | |||
69 | void ChartCategoryAxisX::updateGeometry() |
|
69 | void ChartCategoryAxisX::updateGeometry() | |
70 | { |
|
70 | { | |
71 | //TODO: this is not optimal when many categories :( , create only visible lables |
|
|||
72 | setLabels(m_axis->categoriesLabels() << ""); |
|
71 | setLabels(m_axis->categoriesLabels() << ""); | |
73 | HorizontalAxis::updateGeometry(); |
|
72 | HorizontalAxis::updateGeometry(); | |
74 | } |
|
73 | } |
@@ -238,7 +238,6 void PolarChartAxisAngular::createItems(int count) | |||||
238 | { |
|
238 | { | |
239 | if (arrowItems().count() == 0) { |
|
239 | if (arrowItems().count() == 0) { | |
240 | // angular axis line |
|
240 | // angular axis line | |
241 | // TODO: need class similar to LineArrowItem for click handling? |
|
|||
242 | QGraphicsEllipseItem *arrow = new QGraphicsEllipseItem(presenter()->rootItem()); |
|
241 | QGraphicsEllipseItem *arrow = new QGraphicsEllipseItem(presenter()->rootItem()); | |
243 | arrow->setPen(axis()->linePen()); |
|
242 | arrow->setPen(axis()->linePen()); | |
244 | arrowGroup()->addToGroup(arrow); |
|
243 | arrowGroup()->addToGroup(arrow); | |
@@ -395,8 +394,6 qreal PolarChartAxisAngular::preferredAxisRadius(const QSizeF &maxSize) | |||||
395 |
|
394 | |||
396 | QRectF PolarChartAxisAngular::moveLabelToPosition(qreal angularCoordinate, QPointF labelPoint, QRectF labelRect) const |
|
395 | QRectF PolarChartAxisAngular::moveLabelToPosition(qreal angularCoordinate, QPointF labelPoint, QRectF labelRect) const | |
397 | { |
|
396 | { | |
398 | // TODO use fuzzy compare for "==" cases? |
|
|||
399 | // TODO Adjust the rect position near 0, 90, 180, and 270 angles for smoother animation? |
|
|||
400 | if (angularCoordinate == 0.0) |
|
397 | if (angularCoordinate == 0.0) | |
401 | labelRect.moveCenter(labelPoint + QPointF(0, -labelRect.height() / 2.0)); |
|
398 | labelRect.moveCenter(labelPoint + QPointF(0, -labelRect.height() / 2.0)); | |
402 | else if (angularCoordinate < 90.0) |
|
399 | else if (angularCoordinate < 90.0) |
@@ -468,7 +468,6 QPen QAbstractAxis::linePen() const | |||||
468 | return d_ptr->m_axisPen; |
|
468 | return d_ptr->m_axisPen; | |
469 | } |
|
469 | } | |
470 |
|
470 | |||
471 | //TODO: remove me 2.0 |
|
|||
472 | void QAbstractAxis::setLinePenColor(QColor color) |
|
471 | void QAbstractAxis::setLinePenColor(QColor color) | |
473 | { |
|
472 | { | |
474 | QPen p = d_ptr->m_axisPen; |
|
473 | QPen p = d_ptr->m_axisPen; | |
@@ -620,7 +619,6 int QAbstractAxis::labelsAngle() const | |||||
620 | { |
|
619 | { | |
621 | return d_ptr->m_labelsAngle; |
|
620 | return d_ptr->m_labelsAngle; | |
622 | } |
|
621 | } | |
623 | //TODO: remove me 2.0 |
|
|||
624 | void QAbstractAxis::setLabelsColor(QColor color) |
|
622 | void QAbstractAxis::setLabelsColor(QColor color) | |
625 | { |
|
623 | { | |
626 | QBrush b = d_ptr->m_labelsBrush; |
|
624 | QBrush b = d_ptr->m_labelsBrush; | |
@@ -878,8 +876,6 void QAbstractAxis::setRange(const QVariant &min, const QVariant &max) | |||||
878 | /*! |
|
876 | /*! | |
879 | Returns the orientation in which the axis is being used (Vertical or Horizontal) |
|
877 | Returns the orientation in which the axis is being used (Vertical or Horizontal) | |
880 | */ |
|
878 | */ | |
881 | // NOTE: should have const but it breaks BC: |
|
|||
882 | // http://techbase.kde.org/Policies/Binary_Compatibility_Examples#Change_the_CV-qualifiers_of_a_member_function |
|
|||
883 | Qt::Orientation QAbstractAxis::orientation() |
|
879 | Qt::Orientation QAbstractAxis::orientation() | |
884 | { |
|
880 | { | |
885 | return d_ptr->orientation(); |
|
881 | return d_ptr->orientation(); | |
@@ -944,7 +940,6 void QAbstractAxisPrivate::setAlignment( Qt::Alignment alignment) | |||||
944 |
|
940 | |||
945 | void QAbstractAxisPrivate::initializeTheme(ChartTheme* theme, bool forced) |
|
941 | void QAbstractAxisPrivate::initializeTheme(ChartTheme* theme, bool forced) | |
946 | { |
|
942 | { | |
947 | //TODO: introduce axis brush |
|
|||
948 | if (forced || QChartPrivate::defaultPen() == m_axisPen) |
|
943 | if (forced || QChartPrivate::defaultPen() == m_axisPen) | |
949 | q_ptr->setLinePen(theme->axisLinePen()); |
|
944 | q_ptr->setLinePen(theme->axisLinePen()); | |
950 |
|
945 |
@@ -145,7 +145,7 public: | |||||
145 | void setShadesBorderColor(QColor color); |
|
145 | void setShadesBorderColor(QColor color); | |
146 | QColor shadesBorderColor() const; |
|
146 | QColor shadesBorderColor() const; | |
147 |
|
147 | |||
148 |
Qt::Orientation orientation(); |
|
148 | Qt::Orientation orientation(); | |
149 | Qt::Alignment alignment() const; |
|
149 | Qt::Alignment alignment() const; | |
150 |
|
150 | |||
151 | //range handling |
|
151 | //range handling |
@@ -60,7 +60,6 public: | |||||
60 | void setLabelFormat(const QString &format); |
|
60 | void setLabelFormat(const QString &format); | |
61 | QString labelFormat() const; |
|
61 | QString labelFormat() const; | |
62 |
|
62 | |||
63 | //TODO: deprecated! (2.0) |
|
|||
64 | void setNiceNumbersEnabled(bool enable = true); |
|
63 | void setNiceNumbersEnabled(bool enable = true); | |
65 | bool niceNumbersEnabled() const; |
|
64 | bool niceNumbersEnabled() const; | |
66 |
|
65 |
@@ -61,7 +61,7 private: | |||||
61 | int m_tickCount; |
|
61 | int m_tickCount; | |
62 | QString m_format; |
|
62 | QString m_format; | |
63 | bool m_applying; |
|
63 | bool m_applying; | |
64 |
bool m_niceNumbersEnabled; |
|
64 | bool m_niceNumbersEnabled; | |
65 | Q_DECLARE_PUBLIC(QValueAxis) |
|
65 | Q_DECLARE_PUBLIC(QValueAxis) | |
66 | }; |
|
66 | }; | |
67 |
|
67 |
@@ -136,7 +136,6 public: | |||||
136 |
|
136 | |||
137 | void startAnimation(ChartAnimation *animation); |
|
137 | void startAnimation(ChartAnimation *animation); | |
138 |
|
138 | |||
139 | //TODO refactor |
|
|||
140 | void setState(State state,QPointF point); |
|
139 | void setState(State state,QPointF point); | |
141 | State state() const { return m_state; } |
|
140 | State state() const { return m_state; } | |
142 | QPointF statePoint() const { return m_statePoint; } |
|
141 | QPointF statePoint() const { return m_statePoint; } |
@@ -172,9 +172,6 QList<QGradient> ChartThemeManager::generateSeriesGradients(const QList<QColor>& | |||||
172 | qreal h = color.hsvHueF(); |
|
172 | qreal h = color.hsvHueF(); | |
173 | qreal s = color.hsvSaturationF(); |
|
173 | qreal s = color.hsvSaturationF(); | |
174 |
|
174 | |||
175 | // TODO: tune the algorithm to give nice results with most base colors defined in |
|
|||
176 | // most themes. The rest of the gradients we can define manually in theme specific |
|
|||
177 | // implementation. |
|
|||
178 | QColor start = color; |
|
175 | QColor start = color; | |
179 | start.setHsvF(h, 0.0, 1.0); |
|
176 | start.setHsvF(h, 0.0, 1.0); | |
180 | g.setColorAt(0.0, start); |
|
177 | g.setColorAt(0.0, start); |
@@ -38,15 +38,8 | |||||
38 |
|
38 | |||
39 | QTCOMMERCIALCHART_BEGIN_NAMESPACE |
|
39 | QTCOMMERCIALCHART_BEGIN_NAMESPACE | |
40 |
|
40 | |||
41 | // TODO: check these |
|
|||
42 | class QAbstractSeries; |
|
41 | class QAbstractSeries; | |
43 | class QAreaSeries; |
|
|||
44 | class QXYSeries; |
|
|||
45 | class QBarSet; |
|
|||
46 | class QAbstractBarSeries; |
|
|||
47 | class QPieSlice; |
|
|||
48 | class QLegend; |
|
42 | class QLegend; | |
49 | class QPieSeries; |
|
|||
50 |
|
43 | |||
51 | class QLegendMarker; |
|
44 | class QLegendMarker; | |
52 | class LegendMarkerItem; |
|
45 | class LegendMarkerItem; |
@@ -189,7 +189,6 void ScatterChartItem::handleUpdated() | |||||
189 | setOpacity(m_series->opacity()); |
|
189 | setOpacity(m_series->opacity()); | |
190 |
|
190 | |||
191 | if (recreate) { |
|
191 | if (recreate) { | |
192 | // TODO: optimize handleUpdate to recreate points only in case shape changed |
|
|||
193 | deletePoints(count); |
|
192 | deletePoints(count); | |
194 | createPoints(count); |
|
193 | createPoints(count); | |
195 |
|
194 |
@@ -31,8 +31,6 | |||||
31 |
|
31 | |||
32 | QTCOMMERCIALCHART_BEGIN_NAMESPACE |
|
32 | QTCOMMERCIALCHART_BEGIN_NAMESPACE | |
33 |
|
33 | |||
34 | //TODO: optimize : remove points which are not visible |
|
|||
35 |
|
||||
36 | XYChart::XYChart(QXYSeries *series, QGraphicsItem *item): |
|
34 | XYChart::XYChart(QXYSeries *series, QGraphicsItem *item): | |
37 | ChartItem(series->d_func(),item), |
|
35 | ChartItem(series->d_func(),item), | |
38 | m_series(series), |
|
36 | m_series(series), |
General Comments 0
You need to be logged in to leave comments.
Login now