@@ -27,12 +27,10 QTCOMMERCIALCHART_USE_NAMESPACE | |||||
27 | QChartsPlugin::QChartsPlugin(QObject *parent) : |
|
27 | QChartsPlugin::QChartsPlugin(QObject *parent) : | |
28 | QObject(parent) |
|
28 | QObject(parent) | |
29 | { |
|
29 | { | |
30 | // TODO Auto-generated constructor stub |
|
|||
31 | } |
|
30 | } | |
32 |
|
31 | |||
33 | QChartsPlugin::~QChartsPlugin() |
|
32 | QChartsPlugin::~QChartsPlugin() | |
34 | { |
|
33 | { | |
35 | // TODO Auto-generated destructor stub |
|
|||
36 | } |
|
34 | } | |
37 |
|
35 | |||
38 | QString QChartsPlugin::name() const |
|
36 | QString QChartsPlugin::name() const |
@@ -34,7 +34,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||||
34 | //TODO: optimize : remove points which are not visible |
|
34 | //TODO: optimize : remove points which are not visible | |
35 |
|
35 | |||
36 | AreaChartItem::AreaChartItem(QAreaSeries *areaSeries, QGraphicsItem* item) |
|
36 | AreaChartItem::AreaChartItem(QAreaSeries *areaSeries, QGraphicsItem* item) | |
37 |
: ChartItem(areaSeries->d_func(),item), |
|
37 | : ChartItem(areaSeries->d_func(),item), | |
38 | m_series(areaSeries), |
|
38 | m_series(areaSeries), | |
39 | m_upper(0), |
|
39 | m_upper(0), | |
40 | m_lower(0), |
|
40 | m_lower(0), |
@@ -212,10 +212,8 QAbstractSeries::SeriesType QAreaSeries::type() const | |||||
212 | void QAreaSeries::setUpperSeries(QLineSeries *series) |
|
212 | void QAreaSeries::setUpperSeries(QLineSeries *series) | |
213 | { |
|
213 | { | |
214 | Q_D(QAreaSeries); |
|
214 | Q_D(QAreaSeries); | |
215 |
if(d->m_upperSeries!=series) |
|
215 | if (d->m_upperSeries != series) | |
216 | d->m_upperSeries = series; |
|
216 | d->m_upperSeries = series; | |
217 | //TODO: |
|
|||
218 | } |
|
|||
219 | } |
|
217 | } | |
220 |
|
218 | |||
221 | QLineSeries *QAreaSeries::upperSeries() const |
|
219 | QLineSeries *QAreaSeries::upperSeries() const |
@@ -75,7 +75,6 void ChartCategoryAxisX::updateGeometry() | |||||
75 | void ChartCategoryAxisX::handleAxisUpdated() |
|
75 | void ChartCategoryAxisX::handleAxisUpdated() | |
76 | { |
|
76 | { | |
77 | updateGeometry(); |
|
77 | updateGeometry(); | |
78 | //TODO :: ChartAxis::handleAxisUpdated(); |
|
|||
79 | } |
|
78 | } | |
80 |
|
79 | |||
81 | QSizeF ChartCategoryAxisX::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const |
|
80 | QSizeF ChartCategoryAxisX::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const |
@@ -75,7 +75,6 void ChartCategoryAxisY::updateGeometry() | |||||
75 | void ChartCategoryAxisY::handleAxisUpdated() |
|
75 | void ChartCategoryAxisY::handleAxisUpdated() | |
76 | { |
|
76 | { | |
77 | updateGeometry(); |
|
77 | updateGeometry(); | |
78 | //TODO:: ChartAxis::handleAxisUpdated(); |
|
|||
79 | } |
|
78 | } | |
80 |
|
79 | |||
81 | QSizeF ChartCategoryAxisY::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const |
|
80 | QSizeF ChartCategoryAxisY::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const |
@@ -427,14 +427,10 void ChartAxis::handleRangeChanged(qreal min, qreal max) | |||||
427 |
|
427 | |||
428 | QStringList ChartAxis::createValueLabels(qreal min, qreal max, int ticks,const QString& format) |
|
428 | QStringList ChartAxis::createValueLabels(qreal min, qreal max, int ticks,const QString& format) | |
429 | { |
|
429 | { | |
430 | //TODO: Q_ASSERT(m_max > m_min); |
|
|||
431 | //TODO: Q_ASSERT(ticks > 1); |
|
|||
432 |
|
||||
433 | QStringList labels; |
|
430 | QStringList labels; | |
434 |
|
431 | |||
435 |
if(max <= min || ticks < 1) |
|
432 | if (max <= min || ticks < 1) | |
436 | return labels; |
|
433 | return labels; | |
437 | } |
|
|||
438 |
|
434 | |||
439 | int n = qMax(int(-qFloor(log10((max - min) / (ticks - 1)))), 0); |
|
435 | int n = qMax(int(-qFloor(log10((max - min) / (ticks - 1)))), 0); | |
440 | n++; |
|
436 | n++; | |
@@ -517,11 +513,9 QStringList ChartAxis::createLogValueLabels(qreal min, qreal max, qreal base, in | |||||
517 |
|
513 | |||
518 | QStringList ChartAxis::createDateTimeLabels(qreal min, qreal max,int ticks,const QString& format) |
|
514 | QStringList ChartAxis::createDateTimeLabels(qreal min, qreal max,int ticks,const QString& format) | |
519 | { |
|
515 | { | |
520 | //TODO: Q_ASSERT(m_max > m_min); |
|
|||
521 | //TODO: Q_ASSERT(ticks > 1); |
|
|||
522 | QStringList labels; |
|
516 | QStringList labels; | |
523 |
|
517 | |||
524 | if(max <= min || ticks < 1) { |
|
518 | if (max <= min || ticks < 1) { | |
525 | return labels; |
|
519 | return labels; | |
526 | } |
|
520 | } | |
527 |
|
521 |
@@ -468,7 +468,7 QPen QAbstractAxis::linePen() const | |||||
468 | return d_ptr->m_axisPen; |
|
468 | return d_ptr->m_axisPen; | |
469 | } |
|
469 | } | |
470 |
|
470 | |||
471 | //TODO: remove me |
|
471 | //TODO: remove me 2.0 | |
472 | void QAbstractAxis::setLinePenColor(QColor color) |
|
472 | void QAbstractAxis::setLinePenColor(QColor color) | |
473 | { |
|
473 | { | |
474 | QPen p = d_ptr->m_axisPen; |
|
474 | QPen p = d_ptr->m_axisPen; | |
@@ -614,7 +614,7 int QAbstractAxis::labelsAngle() const | |||||
614 | { |
|
614 | { | |
615 | return d_ptr->m_labelsAngle; |
|
615 | return d_ptr->m_labelsAngle; | |
616 | } |
|
616 | } | |
617 | //TODO: remove me |
|
617 | //TODO: remove me 2.0 | |
618 | void QAbstractAxis::setLabelsColor(QColor color) |
|
618 | void QAbstractAxis::setLabelsColor(QColor color) | |
619 | { |
|
619 | { | |
620 | QBrush b = d_ptr->m_labelsBrush; |
|
620 | QBrush b = d_ptr->m_labelsBrush; | |
@@ -956,7 +956,6 void QAbstractAxisPrivate::initializeTheme(ChartTheme* theme, bool forced) | |||||
956 | if (forced || pen == m_titlePen){ |
|
956 | if (forced || pen == m_titlePen){ | |
957 | q_ptr->setTitlePen(Qt::NoPen);// Noen for performance reasons |
|
957 | q_ptr->setTitlePen(Qt::NoPen);// Noen for performance reasons | |
958 | } |
|
958 | } | |
959 | //TODO: discuss with Tero |
|
|||
960 | if (forced || font == m_titleFont){ |
|
959 | if (forced || font == m_titleFont){ | |
961 | QFont font(m_labelsFont); |
|
960 | QFont font(m_labelsFont); | |
962 | font.setBold(true); |
|
961 | font.setBold(true); |
@@ -43,7 +43,6 class QTCOMMERCIALCHART_EXPORT QAbstractAxis : public QObject | |||||
43 | Q_PROPERTY(bool labelsVisible READ labelsVisible WRITE setLabelsVisible NOTIFY labelsVisibleChanged) |
|
43 | Q_PROPERTY(bool labelsVisible READ labelsVisible WRITE setLabelsVisible NOTIFY labelsVisibleChanged) | |
44 | Q_PROPERTY(QPen labelsPen READ labelsPen WRITE setLabelsPen NOTIFY labelsPenChanged) |
|
44 | Q_PROPERTY(QPen labelsPen READ labelsPen WRITE setLabelsPen NOTIFY labelsPenChanged) | |
45 | Q_PROPERTY(QBrush labelsBrush READ labelsBrush WRITE setLabelsBrush NOTIFY labelsBrushChanged) |
|
45 | Q_PROPERTY(QBrush labelsBrush READ labelsBrush WRITE setLabelsBrush NOTIFY labelsBrushChanged) | |
46 | //TODO: fix labels angles to work with layout |
|
|||
47 | Q_PROPERTY(int labelsAngle READ labelsAngle WRITE setLabelsAngle NOTIFY labelsAngleChanged) |
|
46 | Q_PROPERTY(int labelsAngle READ labelsAngle WRITE setLabelsAngle NOTIFY labelsAngleChanged) | |
48 | Q_PROPERTY(QFont labelsFont READ labelsFont WRITE setLabelsFont NOTIFY labelsFontChanged) |
|
47 | Q_PROPERTY(QFont labelsFont READ labelsFont WRITE setLabelsFont NOTIFY labelsFontChanged) | |
49 | Q_PROPERTY(QColor labelsColor READ labelsColor WRITE setLabelsColor NOTIFY labelsColorChanged) |
|
48 | Q_PROPERTY(QColor labelsColor READ labelsColor WRITE setLabelsColor NOTIFY labelsColorChanged) | |
@@ -146,7 +145,7 public: | |||||
146 | void setShadesBorderColor(QColor color); |
|
145 | void setShadesBorderColor(QColor color); | |
147 | QColor shadesBorderColor() const; |
|
146 | QColor shadesBorderColor() const; | |
148 |
|
147 | |||
149 | Qt::Orientation orientation(); //TODO: missing const <- BC |
|
148 | Qt::Orientation orientation(); //TODO: missing const <- BC (2.0) | |
150 | Qt::Alignment alignment() const; |
|
149 | Qt::Alignment alignment() const; | |
151 |
|
150 | |||
152 | //range handling |
|
151 | //range handling |
@@ -60,7 +60,7 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: deprec |
|
63 | //TODO: deprecated! (2.0) | |
64 | void setNiceNumbersEnabled(bool enable = true); |
|
64 | void setNiceNumbersEnabled(bool enable = true); | |
65 | bool niceNumbersEnabled() const; |
|
65 | bool niceNumbersEnabled() const; | |
66 |
|
66 |
@@ -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; //TODO: this deprec |
|
64 | bool m_niceNumbersEnabled; //TODO: this deprecated (2.0) | |
65 | Q_DECLARE_PUBLIC(QValueAxis) |
|
65 | Q_DECLARE_PUBLIC(QValueAxis) | |
66 | }; |
|
66 | }; | |
67 |
|
67 |
@@ -216,8 +216,6 QRectF ChartLayout::calculateAxisGeometry(const QRectF &geometry, const QList<Ch | |||||
216 | qreal bottomOffset = 0; |
|
216 | qreal bottomOffset = 0; | |
217 |
|
217 | |||
218 | foreach(ChartElement *axisElement , axes) { |
|
218 | foreach(ChartElement *axisElement , axes) { | |
219 |
|
||||
220 | //TODO fixme |
|
|||
221 | ChartAxis* axis = qobject_cast<ChartAxis*>(axisElement); |
|
219 | ChartAxis* axis = qobject_cast<ChartAxis*>(axisElement); | |
222 |
|
220 | |||
223 | if (!axis->isVisible()) |
|
221 | if (!axis->isVisible()) |
@@ -31,7 +31,7 | |||||
31 | #define CHARTPRESENTER_H |
|
31 | #define CHARTPRESENTER_H | |
32 |
|
32 | |||
33 | #include "qchartglobal.h" |
|
33 | #include "qchartglobal.h" | |
34 |
#include "qchart.h" //bec |
|
34 | #include "qchart.h" //because of QChart::ChartThemeId | |
35 | #include <QRectF> |
|
35 | #include <QRectF> | |
36 | #include <QMargins> |
|
36 | #include <QMargins> | |
37 |
|
37 |
@@ -204,11 +204,6 QChart *QAbstractSeries::chart() const | |||||
204 | return d_ptr->m_chart; |
|
204 | return d_ptr->m_chart; | |
205 | } |
|
205 | } | |
206 |
|
206 | |||
207 | //void QAbstractSeries::adjustView() |
|
|||
208 | //{ |
|
|||
209 | // //TODO: |
|
|||
210 | //} |
|
|||
211 |
|
||||
212 | /*! |
|
207 | /*! | |
213 | \brief Sets the visibility of the series to true |
|
208 | \brief Sets the visibility of the series to true | |
214 |
|
209 |
@@ -118,8 +118,6 QChart::QChart(QGraphicsItem *parent, Qt::WindowFlags wFlags) | |||||
118 | { |
|
118 | { | |
119 | d_ptr->m_legend = new LegendScroller(this); |
|
119 | d_ptr->m_legend = new LegendScroller(this); | |
120 | setTheme(QChart::ChartThemeLight); |
|
120 | setTheme(QChart::ChartThemeLight); | |
121 | //TODO: what is that ? |
|
|||
122 | //connect(d_ptr->m_presenter, SIGNAL(marginsChanged(QRectF)), this, SIGNAL(marginsChanged(QRectF))); |
|
|||
123 | setLayout(d_ptr->m_presenter->layout()); |
|
121 | setLayout(d_ptr->m_presenter->layout()); | |
124 | } |
|
122 | } | |
125 |
|
123 | |||
@@ -451,7 +449,7 QRectF QChart::plotArea() const | |||||
451 |
|
449 | |||
452 | ///*! |
|
450 | ///*! | |
453 | // TODO: Dummy. |
|
451 | // TODO: Dummy. | |
454 |
// Adj |
|
452 | // Adjust the ranges of the axes so that all the data of the specified \a series is visible | |
455 | // */ |
|
453 | // */ | |
456 | //void QChart::adjustViewToSeries(QAbstractSeries* series) |
|
454 | //void QChart::adjustViewToSeries(QAbstractSeries* series) | |
457 | //{ |
|
455 | //{ |
@@ -50,14 +50,12 void tst_QAbstractAxis::cleanup() | |||||
50 | void tst_QAbstractAxis::qabstractaxis() |
|
50 | void tst_QAbstractAxis::qabstractaxis() | |
51 | { |
|
51 | { | |
52 | QCOMPARE(m_axis->linePen(), QPen()); |
|
52 | QCOMPARE(m_axis->linePen(), QPen()); | |
53 | //TODO QCOMPARE(m_axis->axisPenColor(), QColor()); |
|
|||
54 | QCOMPARE(m_axis->gridLinePen(), QPen()); |
|
53 | QCOMPARE(m_axis->gridLinePen(), QPen()); | |
55 | QCOMPARE(m_axis->isLineVisible(), true); |
|
54 | QCOMPARE(m_axis->isLineVisible(), true); | |
56 | QCOMPARE(m_axis->isGridLineVisible(), true); |
|
55 | QCOMPARE(m_axis->isGridLineVisible(), true); | |
57 | QCOMPARE(m_axis->isVisible(), true); |
|
56 | QCOMPARE(m_axis->isVisible(), true); | |
58 | QCOMPARE(m_axis->labelsAngle(), 0); |
|
57 | QCOMPARE(m_axis->labelsAngle(), 0); | |
59 | QCOMPARE(m_axis->labelsBrush(), QBrush()); |
|
58 | QCOMPARE(m_axis->labelsBrush(), QBrush()); | |
60 | //TODO QCOMPARE(m_axis->labelsColor(), QColor()); |
|
|||
61 | QCOMPARE(m_axis->labelsFont(), QFont()); |
|
59 | QCOMPARE(m_axis->labelsFont(), QFont()); | |
62 | QCOMPARE(m_axis->labelsPen(), QPen()); |
|
60 | QCOMPARE(m_axis->labelsPen(), QPen()); | |
63 | QCOMPARE(m_axis->labelsVisible(), true); |
|
61 | QCOMPARE(m_axis->labelsVisible(), true); | |
@@ -82,9 +80,7 void tst_QAbstractAxis::qabstractaxis() | |||||
82 | m_axis->setShadesPen(QPen()); |
|
80 | m_axis->setShadesPen(QPen()); | |
83 | m_axis->setShadesVisible(false); |
|
81 | m_axis->setShadesVisible(false); | |
84 | m_axis->setVisible(false); |
|
82 | m_axis->setVisible(false); | |
85 | //TODO QCOMPARE(m_axis->shadesBorderColor(), QColor()); |
|
|||
86 | //TODO QCOMPARE(m_axis->shadesBrush(), QBrush()); |
|
83 | //TODO QCOMPARE(m_axis->shadesBrush(), QBrush()); | |
87 | //TODO QCOMPARE(m_axis->shadesColor(), QColor()); |
|
|||
88 | QCOMPARE(m_axis->shadesPen(), QPen()); |
|
84 | QCOMPARE(m_axis->shadesPen(), QPen()); | |
89 | QCOMPARE(m_axis->shadesVisible(), false); |
|
85 | QCOMPARE(m_axis->shadesVisible(), false); | |
90 | m_axis->show(); |
|
86 | m_axis->show(); |
@@ -118,7 +118,6 QList<QAbstractSeries*> Engine::addSeries(QAbstractSeries::SeriesType type) | |||||
118 | } |
|
118 | } | |
119 | case QAbstractSeries::SeriesTypeBar: |
|
119 | case QAbstractSeries::SeriesTypeBar: | |
120 | { |
|
120 | { | |
121 | //TODO: fix me |
|
|||
122 | QBarSeries *bar = new QBarSeries(); |
|
121 | QBarSeries *bar = new QBarSeries(); | |
123 | setupBarSeries(bar,keys,minRow,maxRow); |
|
122 | setupBarSeries(bar,keys,minRow,maxRow); | |
124 | result << bar; |
|
123 | result << bar; |
@@ -202,7 +202,6 void MainWidget::addSeries() | |||||
202 |
|
202 | |||
203 | QList<RealList> MainWidget::generateTestData(int columnCount, int rowCount, QString dataCharacteristics) |
|
203 | QList<RealList> MainWidget::generateTestData(int columnCount, int rowCount, QString dataCharacteristics) | |
204 | { |
|
204 | { | |
205 | // TODO: dataCharacteristics |
|
|||
206 | QList<RealList> testData; |
|
205 | QList<RealList> testData; | |
207 | for (int j(0); j < columnCount; j++) { |
|
206 | for (int j(0); j < columnCount; j++) { | |
208 | QList <qreal> newColumn; |
|
207 | QList <qreal> newColumn; |
General Comments 0
You need to be logged in to leave comments.
Login now