##// END OF EJS Templates
signals and slots for bars and sets
signals and slots for bars and sets

File last commit:

r239:b700ad3a5165
r239:b700ad3a5165
Show More
bar_p.h
56 lines | 1.0 KiB | text/x-c | CLexer
sauimone
Integrating bar chart. Cleaned up old implementation. TODO: show this in test application. how?
r56 #ifndef BAR_H
#define BAR_H
sauimone
signals and slots for bars and sets
r239 //#include "chartitem_p.h"
sauimone
Integrating bar chart. Cleaned up old implementation. TODO: show this in test application. how?
r56 #include "qchartglobal.h"
sauimone
signals and slots for bars and sets
r239 #include <QGraphicsObject>
sauimone
brush support for bargroups
r183 #include <QPen>
#include <QBrush>
sauimone
Integrating bar chart. Cleaned up old implementation. TODO: show this in test application. how?
r56
QTCOMMERCIALCHART_BEGIN_NAMESPACE
// Single bar item of chart
sauimone
signals and slots for bars and sets
r239 class Bar : public QGraphicsObject
sauimone
Integrating bar chart. Cleaned up old implementation. TODO: show this in test application. how?
r56 {
sauimone
signals and slots for bars and sets
r239 Q_OBJECT
sauimone
Integrating bar chart. Cleaned up old implementation. TODO: show this in test application. how?
r56 public:
Tero Ahola
Refactored themes; now enabled for line, scatter and pies...
r103 Bar(QGraphicsItem *parent=0);
sauimone
BarGroup and Bar as ChartItems instead of GraphicItems
r74
sauimone
signals and slots for bars and sets
r239 public:
sauimone
Integrating bar chart. Cleaned up old implementation. TODO: show this in test application. how?
r56
// Layout Stuff
sauimone
brush support for bargroups
r183 void resize(qreal w, qreal h); // Size of bar.
sauimone
Integrating bar chart. Cleaned up old implementation. TODO: show this in test application. how?
r56 void setPos(qreal x, qreal y);
sauimone
brush support for bargroups
r183 void setPen(QPen pen);
void setBrush(QBrush brush);
sauimone
Integrating bar chart. Cleaned up old implementation. TODO: show this in test application. how?
r56
public:
sauimone
signals and slots for bars and sets
r239 // From QGraphicsItem
sauimone
Integrating bar chart. Cleaned up old implementation. TODO: show this in test application. how?
r56 void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
QRectF boundingRect() const;
sauimone
signals and slots for bars and sets
r239 void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
void mousePressEvent(QGraphicsSceneMouseEvent *event);
Q_SIGNALS:
void clicked();
void hoverEnter();
void hoverLeave();
sauimone
Integrating bar chart. Cleaned up old implementation. TODO: show this in test application. how?
r56
private:
sauimone
theme interface to barcharts. some minor fixes
r113 qreal mHeight;
qreal mWidth;
sauimone
Integrating bar chart. Cleaned up old implementation. TODO: show this in test application. how?
r56 qreal mXpos;
qreal mYpos;
sauimone
BarGroup and Bar as ChartItems instead of GraphicItems
r74
sauimone
brush support for bargroups
r183 QBrush mBrush;
QPen mPen;
sauimone
Integrating bar chart. Cleaned up old implementation. TODO: show this in test application. how?
r56 };
QTCOMMERCIALCHART_END_NAMESPACE
#endif // BAR_H