##// END OF EJS Templates
Fixed bug in setting chart theme...
Fixed bug in setting chart theme The bug was that if you first add a series, then change theme and then restore the original theme, the color of the series was changed even though it should have been restored to match the original color.

File last commit:

r280:9b4c1980ee18
r312:0677c9dd6d92
Show More
barvalue_p.h
54 lines | 1.0 KiB | text/x-c | CLexer
#ifndef BARVALUE_P_H
#define BARVALUE_P_H
#include "qchartglobal.h"
#include <QGraphicsObject>
#include <QPen>
QTCOMMERCIALCHART_BEGIN_NAMESPACE
class QBarSet;
// Visual class for floating bar values
// TODO: fonts, colors etc.
// By default these are not visible.
class BarValue : public QGraphicsObject
{
Q_OBJECT
public:
BarValue(QBarSet &set, QGraphicsItem *parent = 0);
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);
// Propably not needed.
// bool belongsToSet(QBarSet *set);
// From QGraphicsItem
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
QRectF boundingRect() const;
public Q_SLOTS:
void toggleVisible();
private:
QBarSet& mBarSet;
QPen mPen;
QString mValueString;
qreal mXpos;
qreal mYpos;
qreal mWidth;
qreal mHeight;
};
QTCOMMERCIALCHART_END_NAMESPACE
#endif // BARVALUE_P_H