##// END OF EJS Templates

File last commit:

r267:8eda47151036
r269:05d1d227ed47 merge
Show More
barvalue_p.h
49 lines | 1006 B | text/x-c | CLexer
sauimone
Floating values to bar charts
r263 #ifndef BARVALUE_P_H
#define BARVALUE_P_H
#include "qchartglobal.h"
#include <QGraphicsItem>
#include <QPen>
QTCOMMERCIALCHART_BEGIN_NAMESPACE
sauimone
toggling of floating values. still bit buggy
r267 class QBarSet;
sauimone
Floating values to bar charts
r263
// Visual class for floating bar values
// TODO: fonts, colors etc.
// By default these are not visible.
sauimone
toggling of floating values. still bit buggy
r267 class BarValue : public QGraphicsItem // TODO: public QGraphicsObject for signals?
sauimone
Floating values to bar charts
r263 {
public:
sauimone
toggling of floating values. still bit buggy
r267 BarValue(QBarSet &set, QGraphicsItem *parent = 0);
sauimone
Floating values to bar charts
r263
void setValueString(QString str);
QString valueString();
void setPen(const QPen& pen);
const QPen& pen();
void resize(qreal w, qreal h);
void setPos(qreal x, qreal y);
sauimone
toggling of floating values. still bit buggy
r267 bool belongsToSet(QBarSet *set);
sauimone
Floating values to bar charts
r263 // From QGraphicsItem
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
QRectF boundingRect() const;
private:
sauimone
toggling of floating values. still bit buggy
r267 QBarSet& mBarSet;
sauimone
Floating values to bar charts
r263 QPen mPen;
QString mValueString;
qreal mXpos;
qreal mYpos;
qreal mWidth;
qreal mHeight;
};
QTCOMMERCIALCHART_END_NAMESPACE
#endif // BARVALUE_P_H