##// END OF EJS Templates
Adds missing Q_ENUMS to qchartview
Michal Klocek -
r1108:078789d37b16
parent child
Show More
@@ -1,71 +1,71
1 /****************************************************************************
1 /****************************************************************************
2 **
2 **
3 ** Copyright (C) 2012 Digia Plc
3 ** Copyright (C) 2012 Digia Plc
4 ** All rights reserved.
4 ** All rights reserved.
5 ** For any questions to Digia, please use contact form at http://qt.digia.com
5 ** For any questions to Digia, please use contact form at http://qt.digia.com
6 **
6 **
7 ** This file is part of the Qt Commercial Charts Add-on.
7 ** This file is part of the Qt Commercial Charts Add-on.
8 **
8 **
9 ** $QT_BEGIN_LICENSE$
9 ** $QT_BEGIN_LICENSE$
10 ** Licensees holding valid Qt Commercial licenses may use this file in
10 ** Licensees holding valid Qt Commercial licenses may use this file in
11 ** accordance with the Qt Commercial License Agreement provided with the
11 ** accordance with the Qt Commercial License Agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia.
13 ** a written agreement between you and Digia.
14 **
14 **
15 ** If you have questions regarding the use of this file, please use
15 ** If you have questions regarding the use of this file, please use
16 ** contact form at http://qt.digia.com
16 ** contact form at http://qt.digia.com
17 ** $QT_END_LICENSE$
17 ** $QT_END_LICENSE$
18 **
18 **
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 #ifndef QCHARTVIEW_H
21 #ifndef QCHARTVIEW_H
22 #define QCHARTVIEW_H
22 #define QCHARTVIEW_H
23
23
24 #include <QAxis>
24 #include <QAxis>
25 #include <QAbstractSeries>
25 #include <QAbstractSeries>
26 #include <QChart>
26 #include <QChart>
27 #include <QGraphicsView>
27 #include <QGraphicsView>
28
28
29 class QGraphicsScene;
29 class QGraphicsScene;
30 class QRubberBand;
30 class QRubberBand;
31
31
32 QTCOMMERCIALCHART_BEGIN_NAMESPACE
32 QTCOMMERCIALCHART_BEGIN_NAMESPACE
33
33
34 struct QChartViewPrivate;
34 struct QChartViewPrivate;
35
35
36 class QTCOMMERCIALCHART_EXPORT QChartView : public QGraphicsView
36 class QTCOMMERCIALCHART_EXPORT QChartView : public QGraphicsView
37 {
37 {
38 Q_OBJECT
38 Q_OBJECT
39
39 Q_ENUMS(RubberBand)
40 public:
40 public:
41
41
42 enum RubberBand{
42 enum RubberBand{
43 NoRubberBand = 0x0,
43 NoRubberBand = 0x0,
44 VerticalRubberBand = 0x1,
44 VerticalRubberBand = 0x1,
45 HorizonalRubberBand = 0x2,
45 HorizonalRubberBand = 0x2,
46 RectangleRubberBand = 0x3
46 RectangleRubberBand = 0x3
47 };
47 };
48
48
49 Q_DECLARE_FLAGS(RubberBands, RubberBand)
49 Q_DECLARE_FLAGS(RubberBands, RubberBand)
50
50
51 explicit QChartView(QChart *chart,QWidget *parent = 0);
51 explicit QChartView(QChart *chart,QWidget *parent = 0);
52 ~QChartView();
52 ~QChartView();
53
53
54 void setRubberBand(const RubberBands& rubberBands);
54 void setRubberBand(const RubberBands& rubberBands);
55 RubberBands rubberBand() const;
55 RubberBands rubberBand() const;
56 QChart* chart() const;
56 QChart* chart() const;
57
57
58 protected:
58 protected:
59 void resizeEvent(QResizeEvent *event);
59 void resizeEvent(QResizeEvent *event);
60 void mousePressEvent(QMouseEvent *event);
60 void mousePressEvent(QMouseEvent *event);
61 void mouseMoveEvent(QMouseEvent *event);
61 void mouseMoveEvent(QMouseEvent *event);
62 void mouseReleaseEvent(QMouseEvent *event);
62 void mouseReleaseEvent(QMouseEvent *event);
63
63
64 protected:
64 protected:
65 QScopedPointer<QChartViewPrivate> d_ptr;
65 QScopedPointer<QChartViewPrivate> d_ptr;
66 Q_DISABLE_COPY(QChartView)
66 Q_DISABLE_COPY(QChartView)
67 };
67 };
68
68
69 QTCOMMERCIALCHART_END_NAMESPACE
69 QTCOMMERCIALCHART_END_NAMESPACE
70
70
71 #endif // QCHARTWIDGET_H
71 #endif // QCHARTWIDGET_H
General Comments 0
You need to be logged in to leave comments. Login now