##// END OF EJS Templates
Adds tst_qchartview draft
Adds tst_qchartview draft

File last commit:

r766:a9c9a730026d
r774:de60163b4c1f
Show More
qlegend.h
111 lines | 2.8 KiB | text/x-c | CLexer
sauimone
framework for legend
r524 #ifndef QLEGEND_H
#define QLEGEND_H
Jani Honkonen
Change includes in public headers from #include "xxx" -> #include <xxx>
r697 #include <qchartglobal.h>
sauimone
framework for legend
r524 #include <QGraphicsObject>
sauimone
minor code review fixes
r762 #include <QPen>
#include <QBrush>
sauimone
framework for legend
r524
QTCOMMERCIALCHART_BEGIN_NAMESPACE
class Domain;
sauimone
First version of legend. Simple markers and serie names. Using drilldown as example for now.
r529 class LegendMarker;
sauimone
more intelligent legend. fixed compiler warning in bar.cpp
r565 class QPieSlice;
class QXYSeries;
class QBarSet;
class QBarSeries;
class QPieSeries;
sauimone
Scrolling logic to legend
r716 class LegendScrollButton;
sauimone
minor code review fixes
r762 class QSeries;
sauimone
framework for legend
r524
sauimone
legend fixes
r766 // TODO: This as widget
sauimone
First version of legend. Simple markers and serie names. Using drilldown as example for now.
r529 class QTCOMMERCIALCHART_EXPORT QLegend : public QGraphicsObject
sauimone
framework for legend
r524 {
Q_OBJECT
public:
sauimone
legend fixes
r766 // We only support these alignments (for now)
enum Layout {
LayoutTop = Qt::AlignTop,
LayoutBottom = Qt::AlignBottom,
LayoutLeft = Qt::AlignLeft,
LayoutRight = Qt::AlignRight
sauimone
legend layouting change
r616 };
sauimone
framework for legend
r524 explicit QLegend(QGraphicsItem *parent = 0);
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
QRectF boundingRect() const;
Tero Ahola
Code review: Fixed simple issues in Bar and Legend
r737 void setBrush(const QBrush &brush);
Michal Klocek
Adds force option to chartTheme...
r645 QBrush brush() const;
Tero Ahola
Code review: Fixed simple issues in Bar and Legend
r737 void setPen(const QPen &pen);
Michal Klocek
Adds force option to chartTheme...
r645 QPen pen() const;
sauimone
background to legend, theme applies
r540
sauimone
legend fixes
r766 void setAlignmnent(QLegend::Layout alignment);
QLegend::Layout alignment() const;
sauimone
legend layouting change
r616
QSizeF maximumSize() const;
void setMaximumSize(const QSizeF size);
sauimone
legend scaling with chart
r582
sauimone
layout fix to legend. Documented legend functions.
r724 QSizeF size() const;
sauimone
Adaptive layout to legend. Tries to fit all items inside given maximum size
r626 void setSize(const QSizeF size);
void setPos(const QPointF &pos);
sauimone
framework for legend
r524 signals:
sauimone
Separated legend marker to private header. Added signals for left and right mouse click
r547 // for interactions.
Tero Ahola
Code review: Fixed simple issues in Bar and Legend
r737 void clicked(QSeries *series, Qt::MouseButton button);
void clicked(QBarSet *barset, Qt::MouseButton button);
void clicked(QPieSlice *slice, Qt::MouseButton button);
sauimone
Separated legend marker to private header. Added signals for left and right mouse click
r547
sauimone
framework for legend
r524 public slots:
sauimone
layout fix to legend. Documented legend functions.
r724 // PIMPL --->
Tero Ahola
Code review: Fixed simple issues in Bar and Legend
r737 void handleSeriesAdded(QSeries *series, Domain *domain);
void handleSeriesRemoved(QSeries *series);
void handleAdded(QList<QPieSlice *> slices);
void handleRemoved(QList<QPieSlice *> slices);
sauimone
Added handling for pieslice add/remove to legend
r637 void handleMarkerDestroyed();
Tero Ahola
Code review: Fixed simple issues in Bar and Legend
r737 void handleScrollButtonClicked(QGraphicsSceneMouseEvent *event);
sauimone
layout fix to legend. Documented legend functions.
r724 // PIMPL <---
sauimone
framework for legend
r524
private:
sauimone
more intelligent legend. fixed compiler warning in bar.cpp
r565 // PIMPL --->
Tero Ahola
Code review: Fixed simple issues in Bar and Legend
r737 void connectSeries(QSeries *series);
void disconnectSeries(QSeries *series);
void createMarkers(QSeries *series);
void appendMarkers(QXYSeries *series); // All line series are derived from QXYSeries, so this works for now
void appendMarkers(QBarSeries *series);
void appendMarkers(QPieSeries *series);
void deleteMarkers(QSeries *series);
sauimone
layout fix to legend. Documented legend functions.
r724 void updateLayout();
Tero Ahola
Code review: Fixed simple issues in Bar and Legend
r737 void rescaleScrollButtons(const QSize &size);
sauimone
Scrolling logic to legend
r716 QSizeF maximumMarkerSize();
sauimone
layout fix to legend. Documented legend functions.
r724 void checkFirstMarkerBounds();
sauimone
Scrolling logic to legend
r716 bool scrollButtonsVisible();
sauimone
more intelligent legend. fixed compiler warning in bar.cpp
r565
sauimone
legend fixes
r766 QPointF m_pos;
QSizeF m_size;
QSizeF m_minimumSize;
QSizeF m_maximumSize;
sauimone
Adaptive layout to legend. Tries to fit all items inside given maximum size
r626
sauimone
legend fixes
r766 QList<LegendMarker *> m_markers;
sauimone
background to legend, theme applies
r540
Michal Klocek
Adds force option to chartTheme...
r645 QBrush m_brush;
QPen m_pen;
sauimone
legend fixes
r766 QLegend::Layout m_alignment;
sauimone
Scrolling logic to legend
r716
int mFirstMarker;
sauimone
legend fixes
r766 LegendScrollButton *m_scrollButtonLeft;
LegendScrollButton *m_scrollButtonRight;
LegendScrollButton *m_scrollButtonUp;
LegendScrollButton *m_scrollButtonDown;
sauimone
Scrolling logic to legend
r716
sauimone
legend fixes
r766 qreal m_margin;
sauimone
Scrolling logic to legend
r716 // <--- PIMPL
sauimone
framework for legend
r524 };
QTCOMMERCIALCHART_END_NAMESPACE
#endif // QLEGEND_H