##// END OF EJS Templates
Added support for adding and removing data with model. Updated the example
Added support for adding and removing data with model. Updated the example

File last commit:

r425:85842e6c8dba
r545:366c5163e81a
Show More
bar_p.h
56 lines | 1.2 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
#include "qchartglobal.h"
sauimone
Bug fix for bar presenters. It appears that order of childItems may change. Relying on order caused crash
r256 #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
sauimone
barcharts: added legend to model. added signals for hover events (for tooltip). updated examples
r280 // Single visual bar item of chart
sauimone
Bug fix for bar presenters. It appears that order of childItems may change. Relying on order caused crash
r256 class Bar : public QGraphicsObject
sauimone
Integrating bar chart. Cleaned up old implementation. TODO: show this in test application. how?
r56 {
sauimone
Bug fix for bar presenters. It appears that order of childItems may change. Relying on order caused crash
r256 Q_OBJECT
sauimone
Integrating bar chart. Cleaned up old implementation. TODO: show this in test application. how?
r56 public:
sauimone
Better way to enable features to user. Do less, but expose signals to user and allow user to descide what to do.
r425 Bar(QString category, QGraphicsItem *parent=0);
sauimone
BarGroup and Bar as ChartItems instead of GraphicItems
r74
sauimone
making bar as qobject causes crash for some reason. rewinding back a bit...
r247 public: // from ChartItem
void setSize(const QSizeF &size);
sauimone
Integrating bar chart. Cleaned up old implementation. TODO: show this in test application. how?
r56
// Layout Stuff
sauimone
barcharts: added legend to model. added signals for hover events (for tooltip). updated examples
r280 void resize(qreal w, qreal h);
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
Bug fix for bar presenters. It appears that order of childItems may change. Relying on order caused crash
r256 void mousePressEvent(QGraphicsSceneMouseEvent *event);
sauimone
updated barchart examples. minor fixes
r276 void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
sauimone
Bug fix for bar presenters. It appears that order of childItems may change. Relying on order caused crash
r256
Q_SIGNALS:
sauimone
Better way to enable features to user. Do less, but expose signals to user and allow user to descide what to do.
r425 void clicked(QString category);
void rightClicked(QString category);
sauimone
tooltip for barcharts
r283 void hoverEntered(QPoint pos);
void hoverLeaved();
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
Better way to enable features to user. Do less, but expose signals to user and allow user to descide what to do.
r425 QString mCategory;
sauimone
Integrating bar chart. Cleaned up old implementation. TODO: show this in test application. how?
r56 };
QTCOMMERCIALCHART_END_NAMESPACE
#endif // BAR_H