@@ -22,7 +22,6 | |||
|
22 | 22 | #include "qareaseries_p.h" |
|
23 | 23 | #include "qlineseries.h" |
|
24 | 24 | #include "areachartitem_p.h" |
|
25 | #include "legendmarker_p.h" | |
|
26 | 25 | #include "domain_p.h" |
|
27 | 26 | #include "chartdataset_p.h" |
|
28 | 27 | #include "charttheme_p.h" |
@@ -377,13 +376,6 ChartElement *QAreaSeriesPrivate::createGraphics(ChartPresenter *presenter) | |||
|
377 | 376 | return area; |
|
378 | 377 | } |
|
379 | 378 | |
|
380 | QList<LegendMarker *> QAreaSeriesPrivate::createLegendMarker(QLegend *legend) | |
|
381 | { | |
|
382 | Q_Q(QAreaSeries); | |
|
383 | QList<LegendMarker *> list; | |
|
384 | return list << new AreaLegendMarker(q, legend); | |
|
385 | } | |
|
386 | ||
|
387 | 379 | QList<QLegendMarker*> QAreaSeriesPrivate::createLegendMarkers(QLegend* legend) |
|
388 | 380 | { |
|
389 | 381 | Q_Q(QAreaSeries); |
@@ -45,7 +45,6 public: | |||
|
45 | 45 | |
|
46 | 46 | void scaleDomain(Domain &domain); |
|
47 | 47 | ChartElement *createGraphics(ChartPresenter *presenter); |
|
48 | QList<LegendMarker *> createLegendMarker(QLegend *legend); | |
|
49 | 48 | QList<QLegendMarker*> createLegendMarkers(QLegend* legend); |
|
50 | 49 | void initializeAxis(QAbstractAxis *axis); |
|
51 | 50 |
@@ -23,7 +23,6 | |||
|
23 | 23 | #include "qbarset.h" |
|
24 | 24 | #include "qbarset_p.h" |
|
25 | 25 | #include "domain_p.h" |
|
26 | #include "legendmarker_p.h" | |
|
27 | 26 | #include "chartdataset_p.h" |
|
28 | 27 | #include "charttheme_p.h" |
|
29 | 28 | #include "qvalueaxis.h" |
@@ -649,18 +648,6 ChartElement *QAbstractBarSeriesPrivate::createGraphics(ChartPresenter *presente | |||
|
649 | 648 | return 0; |
|
650 | 649 | } |
|
651 | 650 | |
|
652 | QList<LegendMarker *> QAbstractBarSeriesPrivate::createLegendMarker(QLegend *legend) | |
|
653 | { | |
|
654 | Q_Q(QAbstractBarSeries); | |
|
655 | QList<LegendMarker *> markers; | |
|
656 | foreach (QBarSet *set, q->barSets()) { | |
|
657 | BarLegendMarker* marker = new BarLegendMarker(q, set, legend); | |
|
658 | markers << marker; | |
|
659 | } | |
|
660 | ||
|
661 | return markers; | |
|
662 | } | |
|
663 | ||
|
664 | 651 | QList<QLegendMarker*> QAbstractBarSeriesPrivate::createLegendMarkers(QLegend* legend) |
|
665 | 652 | { |
|
666 | 653 | Q_Q(QAbstractBarSeries); |
@@ -56,7 +56,6 public: | |||
|
56 | 56 | |
|
57 | 57 | void scaleDomain(Domain &domain); |
|
58 | 58 | ChartElement *createGraphics(ChartPresenter *presenter); |
|
59 | QList<LegendMarker *> createLegendMarker(QLegend *legend); | |
|
60 | 59 | QList<QLegendMarker*> createLegendMarkers(QLegend* legend); |
|
61 | 60 | |
|
62 | 61 | void initializeAxis(QAbstractAxis *axis); |
@@ -24,7 +24,6 | |||
|
24 | 24 | #include "chartaxis_p.h" |
|
25 | 25 | #include "charttitle_p.h" |
|
26 | 26 | #include "chartbackground_p.h" |
|
27 | #include "legendmarker_p.h" | |
|
28 | 27 | #include <QDebug> |
|
29 | 28 | |
|
30 | 29 | QTCOMMERCIALCHART_BEGIN_NAMESPACE |
@@ -3,7 +3,6 DEPENDPATH += $$PWD | |||
|
3 | 3 | |
|
4 | 4 | SOURCES += \ |
|
5 | 5 | $$PWD/qlegend.cpp \ |
|
6 | $$PWD/legendmarker.cpp \ | |
|
7 | 6 | $$PWD/legendlayout.cpp \ |
|
8 | 7 | $$PWD/qlegendmarker.cpp \ |
|
9 | 8 | $$PWD/qpielegendmarker.cpp \ |
@@ -13,7 +12,6 SOURCES += \ | |||
|
13 | 12 | $$PWD/qarealegendmarker.cpp |
|
14 | 13 | |
|
15 | 14 | PRIVATE_HEADERS += \ |
|
16 | $$PWD/legendmarker_p.h \ | |
|
17 | 15 | $$PWD/legendscroller_p.h \ |
|
18 | 16 | $$PWD/qlegend_p.h \ |
|
19 | 17 | $$PWD/legendlayout_p.h \ |
@@ -20,7 +20,6 | |||
|
20 | 20 | |
|
21 | 21 | #include "legendlayout_p.h" |
|
22 | 22 | #include "chartpresenter_p.h" |
|
23 | //#include "legendmarker_p.h" | |
|
24 | 23 | #include "qlegend_p.h" |
|
25 | 24 | #include "chartlayout_p.h" |
|
26 | 25 |
@@ -62,7 +62,6 QAreaLegendMarkerPrivate::QAreaLegendMarkerPrivate(QAreaLegendMarker *q, QAreaSe | |||
|
62 | 62 | QLegendMarkerPrivate(q,legend), |
|
63 | 63 | m_series(series) |
|
64 | 64 | { |
|
65 | qDebug() << "QAreaLegendMarkerPrivate created"; | |
|
66 | 65 | QObject::connect(m_series->d_func(),SIGNAL(updated()), this, SLOT(updated())); |
|
67 | 66 | QObject::connect(m_series, SIGNAL(nameChanged()), this, SLOT(updated())); |
|
68 | 67 | updated(); |
@@ -76,7 +75,6 QAreaLegendMarkerPrivate::~QAreaLegendMarkerPrivate() | |||
|
76 | 75 | |
|
77 | 76 | void QAreaLegendMarkerPrivate::updated() |
|
78 | 77 | { |
|
79 | qDebug() << "QAreaLegendMarkerPrivate::updated"; | |
|
80 | 78 | m_item->setBrush(m_series->brush()); |
|
81 | 79 | m_item->setLabel(m_series->name()); |
|
82 | 80 | } |
@@ -24,7 +24,6 | |||
|
24 | 24 | #include <QLegendMarker> |
|
25 | 25 | #include <QAbstractBarSeries> |
|
26 | 26 | #include <QBarSet> |
|
27 | //#include "qbarlegendmarker_p.h" | |
|
28 | 27 | |
|
29 | 28 | QTCOMMERCIALCHART_BEGIN_NAMESPACE |
|
30 | 29 |
@@ -24,7 +24,6 | |||
|
24 | 24 | #include "qabstractseries_p.h" |
|
25 | 25 | #include "qchart_p.h" |
|
26 | 26 | #include "legendlayout_p.h" |
|
27 | #include "legendmarker_p.h" // TODO: deprecated | |
|
28 | 27 | #include "qxyseries.h" |
|
29 | 28 | #include "qlineseries.h" |
|
30 | 29 | #include "qareaseries.h" |
@@ -265,10 +264,11 QPen QLegend::pen() const | |||
|
265 | 264 | |
|
266 | 265 | void QLegend::setFont(const QFont &font) |
|
267 | 266 | { |
|
268 |
if (d_ptr->m_font != font) |
|
|
267 | if (d_ptr->m_font != font) | |
|
269 | 268 | d_ptr->m_font = font; |
|
270 | foreach (LegendMarker *marker, d_ptr->markers()) | |
|
271 | marker->setFont(d_ptr->m_font); | |
|
269 | ||
|
270 | foreach (QLegendMarker *marker, d_ptr->legendMarkers()) { | |
|
271 | marker->setFont(d_ptr->m_font); | |
|
272 | 272 | layout()->invalidate(); |
|
273 | 273 | emit fontChanged(font); |
|
274 | 274 | } |
@@ -300,7 +300,7 void QLegend::setLabelBrush(const QBrush &brush) | |||
|
300 | 300 | { |
|
301 | 301 | if (d_ptr->m_labelBrush != brush) { |
|
302 | 302 | d_ptr->m_labelBrush = brush; |
|
303 |
foreach (LegendMarker *marker, d_ptr-> |
|
|
303 | foreach (QLegendMarker *marker, d_ptr->legendMarkers()) { | |
|
304 | 304 | marker->setLabelBrush(d_ptr->m_labelBrush); |
|
305 | 305 | // Note: The pen of the marker rectangle could be exposed in the public QLegend API |
|
306 | 306 | // instead of mapping it from label brush color |
@@ -38,7 +38,6 class QChart; | |||
|
38 | 38 | class ChartPresenter; |
|
39 | 39 | class QAbstractSeries; |
|
40 | 40 | class LegendLayout; |
|
41 | class LegendMarker; | |
|
42 | 41 | class Domain; |
|
43 | 42 | class QLegendMarker; |
|
44 | 43 | |
@@ -53,11 +52,10 public: | |||
|
53 | 52 | QPointF offset() const; |
|
54 | 53 | int roundness(qreal size); |
|
55 | 54 | |
|
56 | QList<LegendMarker*> markers() { return m_markers; } // TODO: this will be removed | |
|
57 | 55 | QGraphicsItemGroup* items() { return m_items; } |
|
58 | 56 | |
|
59 | 57 | // New stuff: |
|
60 |
QList<QLegendMarker*> legendMarkers() { return m_legendMarkers; } |
|
|
58 | QList<QLegendMarker*> legendMarkers() { return m_legendMarkers; } | |
|
61 | 59 | void appendSeries(QAbstractSeries* series); |
|
62 | 60 | void removeSeries(QAbstractSeries* series); |
|
63 | 61 | |
@@ -73,7 +71,6 private: | |||
|
73 | 71 | LegendLayout *m_layout; |
|
74 | 72 | QChart* m_chart; |
|
75 | 73 | QGraphicsItemGroup* m_items; |
|
76 | QList<LegendMarker*> m_markers; // TODO: this will be removed | |
|
77 | 74 | Qt::Alignment m_alignment; |
|
78 | 75 | QBrush m_brush; |
|
79 | 76 | QPen m_pen; |
@@ -25,7 +25,6 | |||
|
25 | 25 | #include <QLegendMarker> |
|
26 | 26 | #include <QPieSeries> |
|
27 | 27 | #include <QPieSlice> |
|
28 | //#include "qpielegendmarker_p.h" | |
|
29 | 28 | |
|
30 | 29 | QTCOMMERCIALCHART_BEGIN_NAMESPACE |
|
31 | 30 |
@@ -25,7 +25,6 | |||
|
25 | 25 | #include "pieslicedata_p.h" |
|
26 | 26 | #include "chartdataset_p.h" |
|
27 | 27 | #include "charttheme_p.h" |
|
28 | #include "legendmarker_p.h" | |
|
29 | 28 | #include "qabstractaxis.h" |
|
30 | 29 | #include "pieanimation_p.h" |
|
31 | 30 | |
@@ -851,20 +850,8 ChartElement *QPieSeriesPrivate::createGraphics(ChartPresenter *presenter) | |||
|
851 | 850 | return pie; |
|
852 | 851 | } |
|
853 | 852 | |
|
854 | QList<LegendMarker *> QPieSeriesPrivate::createLegendMarker(QLegend *legend) | |
|
855 | { | |
|
856 | Q_Q(QPieSeries); | |
|
857 | QList<LegendMarker *> markers; | |
|
858 | foreach (QPieSlice *slice, q->slices()) { | |
|
859 | PieLegendMarker* marker = new PieLegendMarker(q, slice, legend); | |
|
860 | markers << marker; | |
|
861 | } | |
|
862 | return markers; | |
|
863 | } | |
|
864 | ||
|
865 | 853 | QList<QLegendMarker*> QPieSeriesPrivate::createLegendMarkers(QLegend* legend) |
|
866 | 854 | { |
|
867 | // Q_UNUSED(legend); | |
|
868 | 855 | Q_Q(QPieSeries); |
|
869 | 856 | QList<QLegendMarker*> markers; |
|
870 | 857 | foreach(QPieSlice* slice, q->slices()) { |
@@ -46,7 +46,6 public: | |||
|
46 | 46 | |
|
47 | 47 | void scaleDomain(Domain &domain); |
|
48 | 48 | ChartElement *createGraphics(ChartPresenter *presenter); |
|
49 | QList<LegendMarker *> createLegendMarker(QLegend *legend); | |
|
50 | 49 | QList<QLegendMarker *> createLegendMarkers(QLegend *legend); |
|
51 | 50 | void initializeAxis(QAbstractAxis *axis); |
|
52 | 51 | QAbstractAxis::AxisType defaultAxisType(Qt::Orientation orientation) const; |
@@ -52,7 +52,6 public: | |||
|
52 | 52 | |
|
53 | 53 | virtual void scaleDomain(Domain &domain) = 0; |
|
54 | 54 | virtual ChartElement *createGraphics(ChartPresenter *presenter) = 0; |
|
55 | virtual QList<LegendMarker *> createLegendMarker(QLegend *legend) = 0; | |
|
56 | 55 | virtual QList<QLegendMarker*> createLegendMarkers(QLegend* legend) = 0; |
|
57 | 56 | virtual void initializeAxis(QAbstractAxis *axis) = 0; |
|
58 | 57 | virtual QAbstractAxis::AxisType defaultAxisType(Qt::Orientation) const = 0; |
@@ -21,7 +21,6 | |||
|
21 | 21 | #include "qxyseries.h" |
|
22 | 22 | #include "qxyseries_p.h" |
|
23 | 23 | #include "domain_p.h" |
|
24 | #include "legendmarker_p.h" | |
|
25 | 24 | #include "qvalueaxis.h" |
|
26 | 25 | |
|
27 | 26 | #include "qxylegendmarker.h" |
@@ -449,13 +448,6 void QXYSeriesPrivate::scaleDomain(Domain &domain) | |||
|
449 | 448 | domain.setRange(minX, maxX, minY, maxY); |
|
450 | 449 | } |
|
451 | 450 | |
|
452 | QList<LegendMarker *> QXYSeriesPrivate::createLegendMarker(QLegend *legend) | |
|
453 | { | |
|
454 | Q_Q(QXYSeries); | |
|
455 | QList<LegendMarker *> list; | |
|
456 | return list << new XYLegendMarker(q, legend); | |
|
457 | } | |
|
458 | ||
|
459 | 451 | QList<QLegendMarker*> QXYSeriesPrivate::createLegendMarkers(QLegend* legend) |
|
460 | 452 | { |
|
461 | 453 | Q_Q(QXYSeries); |
@@ -45,7 +45,6 public: | |||
|
45 | 45 | QXYSeriesPrivate(QXYSeries *q); |
|
46 | 46 | |
|
47 | 47 | void scaleDomain(Domain &domain); |
|
48 | QList<LegendMarker *> createLegendMarker(QLegend *legend); | |
|
49 | 48 | QList<QLegendMarker*> createLegendMarkers(QLegend* legend); |
|
50 | 49 | |
|
51 | 50 | void initializeAxis(QAbstractAxis *axis); |
@@ -53,9 +52,6 public: | |||
|
53 | 52 | |
|
54 | 53 | Q_SIGNALS: |
|
55 | 54 | void updated(); |
|
56 | // void pointReplaced(int index); | |
|
57 | // void pointRemoved(int index); | |
|
58 | // void pointAdded(int index); | |
|
59 | 55 | |
|
60 | 56 | protected: |
|
61 | 57 | QVector<QPointF> m_points; |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now