##// END OF EJS Templates
Fixed QChartGlobal include statement in QLegend header
Tero Ahola -
r1836:acc40072f562
parent child
Show More
@@ -1,111 +1,111
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 QLEGEND_H
22 22 #define QLEGEND_H
23 23
24 #include <QChartGlobal>
24 #include <qchartglobal.h>
25 25 #include <QGraphicsWidget>
26 26 #include <QPen>
27 27 #include <QBrush>
28 28
29 29 QTCOMMERCIALCHART_BEGIN_NAMESPACE
30 30
31 31 class Domain;
32 32 class LegendMarker;
33 33 class QPieSlice;
34 34 class QXYSeries;
35 35 class QBarSet;
36 36 class QAbstractBarSeries;
37 37 class QPieSeries;
38 38 class QAreaSeries;
39 39 class LegendScrollButton;
40 40 class QChart;
41 41 class QLegendPrivate;
42 42
43 43 class QTCOMMERCIALCHART_EXPORT QLegend : public QGraphicsWidget
44 44 {
45 45 Q_OBJECT
46 46 Q_PROPERTY(Qt::Alignment alignment READ alignment WRITE setAlignment)
47 47 Q_PROPERTY(bool backgroundVisible READ isBackgroundVisible WRITE setBackgroundVisible NOTIFY backgroundVisibleChanged)
48 48 Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
49 49 Q_PROPERTY(QColor borderColor READ borderColor WRITE setBorderColor NOTIFY borderColorChanged)
50 50 Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY fontChanged)
51 51 Q_PROPERTY(QColor labelColor READ labelColor WRITE setLabelColor NOTIFY labelColorChanged)
52 52
53 53 private:
54 54 explicit QLegend(QChart *chart);
55 55
56 56 public:
57 57 ~QLegend();
58 58
59 59 void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
60 60
61 61 void setBrush(const QBrush &brush);
62 62 QBrush brush() const;
63 63 void setColor(QColor color);
64 64 QColor color();
65 65
66 66 void setPen(const QPen &pen);
67 67 QPen pen() const;
68 68 void setBorderColor(QColor color);
69 69 QColor borderColor();
70 70
71 71 void setFont(const QFont &font);
72 72 QFont font() const;
73 73 void setLabelBrush(const QBrush &brush);
74 74 QBrush labelBrush() const;
75 75
76 76 void setLabelColor(QColor color);
77 77 QColor labelColor() const;
78 78
79 79 void setAlignment(Qt::Alignment alignment);
80 80 Qt::Alignment alignment() const;
81 81
82 82 void detachFromChart();
83 83 void attachToChart();
84 84 bool isAttachedToChart();
85 85
86 86 void setBackgroundVisible(bool visible = true);
87 87 bool isBackgroundVisible() const;
88 88
89 89
90 90 protected:
91 91 void hideEvent(QHideEvent *event);
92 92 void showEvent(QShowEvent *event);
93 93
94 94 Q_SIGNALS:
95 95 void backgroundVisibleChanged(bool visible);
96 96 void colorChanged(QColor color);
97 97 void borderColorChanged(QColor color);
98 98 void fontChanged(QFont font);
99 99 void labelColorChanged(QColor color);
100 100
101 101 private:
102 102 QScopedPointer<QLegendPrivate> d_ptr;
103 103 Q_DISABLE_COPY(QLegend)
104 104 friend class LegendScroller;
105 105 friend class LegendLayout;
106 106 friend class ChartLayout;
107 107 };
108 108
109 109 QTCOMMERCIALCHART_END_NAMESPACE
110 110
111 111 #endif // QLEGEND_H
General Comments 0
You need to be logged in to leave comments. Login now