##// END OF EJS Templates
QPieLegenmarkerPrivate added
sauimone -
r2166:2e5b385aa170
parent child
Show More
@@ -0,0 +1,61
1 /****************************************************************************
2 **
3 ** Copyright (C) 2012 Digia Plc
4 ** All rights reserved.
5 ** For any questions to Digia, please use contact form at http://qt.digia.com
6 **
7 ** This file is part of the Qt Commercial Charts Add-on.
8 **
9 ** $QT_BEGIN_LICENSE$
10 ** Licensees holding valid Qt Commercial licenses may use this file in
11 ** accordance with the Qt Commercial License Agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia.
14 **
15 ** If you have questions regarding the use of this file, please use
16 ** contact form at http://qt.digia.com
17 ** $QT_END_LICENSE$
18 **
19 ****************************************************************************/
20
21 // W A R N I N G
22 // -------------
23 //
24 // This file is not part of the QtCommercial Chart API. It exists purely as an
25 // implementation detail. This header file may change from version to
26 // version without notice, or even be removed.
27 //
28 // We mean it.
29
30 #ifndef QPIELEGENDMARKER_P_H
31 #define QPIELEGENDMARKER_P_H
32
33 #include "qchartglobal.h"
34 #include "qlegendmarker_p.h"
35 #include "legendmarkeritem_p.h"
36
37 QTCOMMERCIALCHART_BEGIN_NAMESPACE
38
39 class QPieLegendMarker;
40
41 class QPieLegendMarkerPrivate : public QLegendMarkerPrivate
42 {
43 Q_OBJECT
44 public:
45 explicit QPieLegendMarkerPrivate(QAbstractSeries *series, QPieLegendMarker *q);
46 virtual ~QPieLegendMarkerPrivate();
47
48 public Q_SLOTS:
49 virtual void updated() {};
50
51 private:
52 QPieLegendMarker *q_ptr;
53 PieLegendMarkerItem *m_item;
54
55 friend class QLegendPrivate; // TODO: Is this needed?
56 Q_DECLARE_PUBLIC(QPieLegendMarker)
57 };
58
59 QTCOMMERCIALCHART_END_NAMESPACE
60
61 #endif // QPIELEGENDMARKER_P_H
@@ -15,7 +15,8 PRIVATE_HEADERS += \
15 $$PWD/qlegend_p.h \
15 $$PWD/qlegend_p.h \
16 $$PWD/legendlayout_p.h \
16 $$PWD/legendlayout_p.h \
17 $$PWD/qlegendmarker_p.h \
17 $$PWD/qlegendmarker_p.h \
18 $$PWD/legendmarkeritem_p.h
18 $$PWD/legendmarkeritem_p.h \
19 $$PWD/qpielegendmarker_p.h
19
20
20
21
21 PUBLIC_HEADERS += \
22 PUBLIC_HEADERS += \
@@ -110,6 +110,11 QLegendMarkerPrivate::QLegendMarkerPrivate(QAbstractSeries *series, QLegendMarke
110 m_item = new LegendMarkerItem(m_series);
110 m_item = new LegendMarkerItem(m_series);
111 }
111 }
112
112
113 QLegendMarkerPrivate::~QLegendMarkerPrivate()
114 {
115 }
116
117
113 #include "moc_qlegendmarker.cpp"
118 #include "moc_qlegendmarker.cpp"
114 #include "moc_qlegendmarker_p.cpp"
119 #include "moc_qlegendmarker_p.cpp"
115
120
@@ -57,6 +57,7 class QLegendMarkerPrivate : public QObject
57 Q_OBJECT
57 Q_OBJECT
58 public:
58 public:
59 explicit QLegendMarkerPrivate(QAbstractSeries *series, QLegendMarker *q);
59 explicit QLegendMarkerPrivate(QAbstractSeries *series, QLegendMarker *q);
60 virtual ~QLegendMarkerPrivate();
60 /*
61 /*
61 void setPen(const QPen &pen);
62 void setPen(const QPen &pen);
62 QPen pen() const;
63 QPen pen() const;
@@ -19,6 +19,7
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 #include "qpielegendmarker.h"
21 #include "qpielegendmarker.h"
22 #include "qpielegendmarker_p.h"
22 #include <QPieSeries>
23 #include <QPieSeries>
23
24
24 QTCOMMERCIALCHART_BEGIN_NAMESPACE
25 QTCOMMERCIALCHART_BEGIN_NAMESPACE
@@ -44,7 +45,18 void QPieLegendMarker::updated()
44 setLabel(m_slice->label());
45 setLabel(m_slice->label());
45 }
46 }
46
47
48 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
49
50 QPieLegendMarkerPrivate::QPieLegendMarkerPrivate(QAbstractSeries *series, QPieLegendMarker *q) :
51 QLegendMarkerPrivate(series, q)
52 {
53 }
54
55 QPieLegendMarkerPrivate::~QPieLegendMarkerPrivate()
56 {
57 }
58
47 #include "moc_qpielegendmarker.cpp"
59 #include "moc_qpielegendmarker.cpp"
48 //#include "moc_qpielegendmarker_p.cpp"
60 #include "moc_qpielegendmarker_p.cpp"
49
61
50 QTCOMMERCIALCHART_END_NAMESPACE
62 QTCOMMERCIALCHART_END_NAMESPACE
@@ -24,6 +24,7
24 #include <QChartGlobal>
24 #include <QChartGlobal>
25 #include <QLegendMarker>
25 #include <QLegendMarker>
26 #include <QPieSlice>
26 #include <QPieSlice>
27 #include "qpielegendmarker_p.h"
27
28
28 QTCOMMERCIALCHART_BEGIN_NAMESPACE
29 QTCOMMERCIALCHART_BEGIN_NAMESPACE
29
30
@@ -44,8 +45,7 public:
44 //public Q_SLOTS:
45 //public Q_SLOTS:
45
46
46 private:
47 private:
47 // TODO:
48 QScopedPointer<QPieLegendMarkerPrivate> d_ptr;
48 // QScopedPointer<QPieLegendMarkerPrivate> d_ptr;
49 Q_DISABLE_COPY(QPieLegendMarker)
49 Q_DISABLE_COPY(QPieLegendMarker)
50
50
51 // TODO: PIMPL
51 // TODO: PIMPL
General Comments 0
You need to be logged in to leave comments. Login now