qlegend.h
49 lines
| 1.1 KiB
| text/x-c
|
CLexer
/ src / qlegend.h
sauimone
|
r524 | #ifndef QLEGEND_H | ||
#define QLEGEND_H | ||||
#include "qchartglobal.h" | ||||
#include "qseries.h" | ||||
#include <QGraphicsObject> | ||||
QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||||
class Domain; | ||||
sauimone
|
r529 | class LegendMarker; | ||
sauimone
|
r524 | |||
sauimone
|
r529 | class QTCOMMERCIALCHART_EXPORT QLegend : public QGraphicsObject | ||
sauimone
|
r524 | { | ||
Q_OBJECT | ||||
public: | ||||
explicit QLegend(QGraphicsItem *parent = 0); | ||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0); | ||||
QRectF boundingRect() const; | ||||
sauimone
|
r540 | void setBackgroundBrush(const QBrush& brush); | ||
QBrush backgroundBrush() const; | ||||
sauimone
|
r524 | signals: | ||
sauimone
|
r547 | // for interactions. | ||
void clicked(QSeries* series, QString name); | ||||
void rightClicked(QSeries* series, QString name); | ||||
sauimone
|
r524 | public slots: | ||
void handleSeriesAdded(QSeries* series,Domain* domain); | ||||
void handleSeriesRemoved(QSeries* series); | ||||
sauimone
|
r529 | void handleGeometryChanged(const QRectF& size); | ||
sauimone
|
r524 | |||
private: | ||||
sauimone
|
r529 | void dataChanged(); | ||
void layoutChanged(); | ||||
sauimone
|
r524 | |||
QRectF mBoundingRect; | ||||
QList<QSeries*> mSeriesList; | ||||
sauimone
|
r529 | QList<LegendMarker*> mMarkers; | ||
sauimone
|
r540 | |||
QBrush mBackgroundBrush; | ||||
sauimone
|
r524 | }; | ||
QTCOMMERCIALCHART_END_NAMESPACE | ||||
#endif // QLEGEND_H | ||||