##// END OF EJS Templates
Adds compilation fix
Michal Klocek -
r1565:bb5fd78a0401
parent child
Show More
@@ -1,65 +1,65
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 // W A R N I N G
21 // W A R N I N G
22 // -------------
22 // -------------
23 //
23 //
24 // This file is not part of the QtCommercial Chart API. It exists purely as an
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
25 // implementation detail. This header file may change from version to
26 // version without notice, or even be removed.
26 // version without notice, or even be removed.
27 //
27 //
28 // We mean it.
28 // We mean it.
29
29
30 #ifndef BAR_H
30 #ifndef BAR_H
31 #define BAR_H
31 #define BAR_H
32
32
33 #include "qchartglobal.h"
33 #include "qchartglobal.h"
34 #include <QGraphicsRectItem>
34 #include <QGraphicsRectItem>
35
35
36 QTCOMMERCIALCHART_BEGIN_NAMESPACE
36 QTCOMMERCIALCHART_BEGIN_NAMESPACE
37
37
38 class QBarSet;
38 class QBarSet;
39
39
40 // Single visual bar item of chart
40 // Single visual bar item of chart
41 class Bar : public QObject, public QGraphicsRectItem
41 class Bar : public QObject, public QGraphicsRectItem
42 {
42 {
43 Q_OBJECT
43 Q_OBJECT
44 public:
44 public:
45 Bar(QBarSet *barset, int index, QGraphicsItem *parent = 0);
45 Bar(QBarSet *barset, int index, QGraphicsItem *parent = 0);
46 ~Bar();
46 ~Bar();
47
47
48 public:
48 public:
49 void mousePressEvent(QGraphicsSceneMouseEvent *event);
49 void mousePressEvent(QGraphicsSceneMouseEvent *event);
50 void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
50 void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
51 void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
51 void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
52
52
53 Q_SIGNALS:
53 Q_SIGNALS:
54 void clicked(int index, QBarSet *barset);
54 void clicked(int index, QBarSet *barset);
55 void hovered(bool status, QBarSet *barset);
55 void hovered(bool status, QBarSet *barset);
56
56
57 private:
57 private:
58 int m_index;
58 int m_index;
59 bool m_hovering;
60 QBarSet *m_barset;
59 QBarSet *m_barset;
60 bool m_hovering;
61 };
61 };
62
62
63 QTCOMMERCIALCHART_END_NAMESPACE
63 QTCOMMERCIALCHART_END_NAMESPACE
64
64
65 #endif // BAR_H
65 #endif // BAR_H
General Comments 0
You need to be logged in to leave comments. Login now