##// END OF EJS Templates
oops. LegendMarkerType enum wasn't public
sauimone -
r2180:b2787196de9b
parent child
Show More
@@ -1,91 +1,92
1 1 /****************************************************************************
2 2 **
3 3 ** Copyright (C) 2012 Digia Plc
4 4 ** All rights reserved.
5 5 ** For any questions to Digia, please use contact form at http://qt.digia.com
6 6 **
7 7 ** This file is part of the Qt Commercial Charts Add-on.
8 8 **
9 9 ** $QT_BEGIN_LICENSE$
10 10 ** Licensees holding valid Qt Commercial licenses may use this file in
11 11 ** accordance with the Qt Commercial License Agreement provided with the
12 12 ** Software or, alternatively, in accordance with the terms contained in
13 13 ** a written agreement between you and Digia.
14 14 **
15 15 ** If you have questions regarding the use of this file, please use
16 16 ** contact form at http://qt.digia.com
17 17 ** $QT_END_LICENSE$
18 18 **
19 19 ****************************************************************************/
20 20
21 21 #ifndef QLEGENDMARKER_H
22 22 #define QLEGENDMARKER_H
23 23
24 24 #include <QChartGlobal>
25 25 #include <QObject>
26 26 #include <QPen>
27 27 #include <QBrush>
28 28 #include <QFont>
29 29
30 30 QTCOMMERCIALCHART_BEGIN_NAMESPACE
31 31
32 32 class QLegendMarkerPrivate;
33 33 class QAbstractSeries;
34 34 class QLegend;
35 35
36 36 class QTCOMMERCIALCHART_EXPORT QLegendMarker : public QObject
37 37 {
38 38 Q_OBJECT
39 39
40 public:
40 41 enum LegendMarkerType {
41 42 LegendMarkerTypeArea,
42 43 LegendMarkerTypeBar,
43 44 LegendMarkerTypePie,
44 45 LegendMarkerTypeXY
45 46 };
46 47
47 48 // TODO:
48 49 // Q_PROPERTY(QString label READ label WRITE setlabel NOTIFY labelChanged);
49 50 // Q_PROPERTY(QPen pen READ pen WRITE setPen NOTIFY penChanged);
50 51 // Q_PROPERTY(QBrush brush READ brush WRITE setBrush NOTIFY brushChanged);
51 52
52 53 public:
53 54 virtual ~QLegendMarker();
54 55 virtual LegendMarkerType type() = 0;
55 56
56 57 QString label() const;
57 58 void setLabel(const QString &label);
58 59
59 60 QBrush labelBrush() const;
60 61 void setLabelBrush(const QBrush &brush);
61 62
62 63 QFont font() const;
63 64 void setFont(const QFont &font);
64 65
65 66 QPen pen() const;
66 67 void setPen(const QPen &pen);
67 68
68 69 QBrush brush() const;
69 70 void setBrush(const QBrush &brush);
70 71
71 72 bool isVisible() const;
72 73 void setVisible(bool visible);
73 74
74 75 protected:
75 76 explicit QLegendMarker(QLegendMarkerPrivate &d, QObject *parent = 0);
76 77
77 78 Q_SIGNALS:
78 79 void clicked();
79 80 void hovered(bool status);
80 81
81 82 protected:
82 83 QScopedPointer<QLegendMarkerPrivate> d_ptr;
83 84 Q_DISABLE_COPY(QLegendMarker)
84 85 friend class QLegendPrivate;
85 86 friend class QLegendMarkerPrivate;
86 87 friend class LegendLayout;
87 88 };
88 89
89 90 QTCOMMERCIALCHART_END_NAMESPACE
90 91
91 92 #endif // QLEGENDMARKER_H
General Comments 0
You need to be logged in to leave comments. Login now