bar_p.h
33 lines
| 703 B
| text/x-c
|
CLexer
sauimone
|
r56 | #ifndef BAR_H | ||
#define BAR_H | ||||
#include "qchartglobal.h" | ||||
Michal Klocek
|
r679 | #include <QGraphicsRectItem> | ||
sauimone
|
r56 | |||
QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||||
sauimone
|
r280 | // Single visual bar item of chart | ||
Michal Klocek
|
r679 | class Bar : public QObject, public QGraphicsRectItem | ||
sauimone
|
r56 | { | ||
sauimone
|
r256 | Q_OBJECT | ||
sauimone
|
r56 | public: | ||
sauimone
|
r425 | Bar(QString category, QGraphicsItem *parent=0); | ||
sauimone
|
r74 | |||
sauimone
|
r56 | public: | ||
sauimone
|
r256 | void mousePressEvent(QGraphicsSceneMouseEvent *event); | ||
sauimone
|
r276 | void hoverEnterEvent(QGraphicsSceneHoverEvent *event); | ||
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event); | ||||
sauimone
|
r256 | |||
Q_SIGNALS: | ||||
sauimone
|
r425 | void clicked(QString category); | ||
void rightClicked(QString category); | ||||
sauimone
|
r283 | void hoverEntered(QPoint pos); | ||
void hoverLeaved(); | ||||
sauimone
|
r56 | |||
private: | ||||
sauimone
|
r425 | QString mCategory; | ||
sauimone
|
r56 | }; | ||
QTCOMMERCIALCHART_END_NAMESPACE | ||||
#endif // BAR_H | ||||