##// END OF EJS Templates
Added insert, remove and other common methodds to QDonutGroup. Donut example added
Added insert, remove and other common methodds to QDonutGroup. Donut example added

File last commit:

r1584:900775017aef
r1693:8b01a00ae1fe
Show More
legendmarker_p.h
144 lines | 3.9 KiB | text/x-c | CLexer
Jani Honkonen
Add license headers
r794 /****************************************************************************
**
** Copyright (C) 2012 Digia Plc
** All rights reserved.
** For any questions to Digia, please use contact form at http://qt.digia.com
**
** This file is part of the Qt Commercial Charts Add-on.
**
** $QT_BEGIN_LICENSE$
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia.
**
** If you have questions regarding the use of this file, please use
** contact form at http://qt.digia.com
** $QT_END_LICENSE$
**
****************************************************************************/
unknown
Added missing warning about private implementation
r1366 // W A R N I N G
// -------------
//
// This file is not part of the QtCommercial Chart API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
sauimone
Separated legend marker to private header. Added signals for left and right mouse click
r547 #ifndef LEGENDMARKER_P_H
#define LEGENDMARKER_P_H
#include "qchartglobal.h"
#include <QGraphicsObject>
#include <QBrush>
sauimone
layout fix to legend. Documented legend functions.
r724 #include <QPen>
sauimone
Adaptive layout to legend. Tries to fit all items inside given maximum size
r626 #include <QGraphicsSimpleTextItem>
Michal Klocek
Refactors layout managment...
r1534 #include <QGraphicsLayoutItem>
sauimone
Separated legend marker to private header. Added signals for left and right mouse click
r547
QTCOMMERCIALCHART_BEGIN_NAMESPACE
Tero Ahola
Renamed QSeries to QAbstractSeries
r988 class QAbstractSeries;
Michal Klocek
Refactor qledgend handling...
r855 class QAreaSeries;
class QXYSeries;
sauimone
more intelligent legend. fixed compiler warning in bar.cpp
r565 class QBarSet;
sauimone
QBarSeries to QAbstractBarSeries
r1584 class QAbstractBarSeries;
sauimone
more intelligent legend. fixed compiler warning in bar.cpp
r565 class QPieSlice;
Michal Klocek
Refactor qledgend handling...
r855 class QLegend;
class QPieSeries;
sauimone
Separated legend marker to private header. Added signals for left and right mouse click
r547
Michal Klocek
Refactors layout managment...
r1534 class LegendMarker : public QGraphicsObject, public QGraphicsLayoutItem
sauimone
Separated legend marker to private header. Added signals for left and right mouse click
r547 {
Q_OBJECT
Michal Klocek
Refactors layout managment...
r1534 Q_INTERFACES(QGraphicsLayoutItem)
sauimone
Separated legend marker to private header. Added signals for left and right mouse click
r547 public:
Tero Ahola
Renamed QSeries to QAbstractSeries
r988 explicit LegendMarker(QAbstractSeries *m_series, QLegend *parent);
sauimone
more intelligent legend. fixed compiler warning in bar.cpp
r565
sauimone
legend fixes
r766 void setPen(const QPen &pen);
sauimone
layout fix to legend. Documented legend functions.
r724 QPen pen() const;
Michal Klocek
Refactors layout managment...
r1534
sauimone
legend fixes
r766 void setBrush(const QBrush &brush);
sauimone
more intelligent legend. fixed compiler warning in bar.cpp
r565 QBrush brush() const;
sauimone
legend font fix
r1522 void setFont(const QFont &font);
QFont font() const;
Michal Klocek
Refactor qledgend handling...
r855 void setLabel(const QString label);
QString label() const;
Michal Klocek
Refactors layout managment...
r1534
sauimone
legend theme fix
r1527 void setLabelBrush(const QBrush &brush);
QBrush labelBrush() const;
Michal Klocek
Refactor qledgend handling...
r855
Tero Ahola
Renamed QSeries to QAbstractSeries
r988 QAbstractSeries *series() const { return m_series;}
sauimone
Legend can handle removing of series
r576
Michal Klocek
Refactors layout managment...
r1534 void setGeometry(const QRectF& rect);
sauimone
Separated legend marker to private header. Added signals for left and right mouse click
r547
QRectF boundingRect() const;
Michal Klocek
Refactors layout managment...
r1534 void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
QSizeF sizeHint (Qt::SizeHint which, const QSizeF& constraint) const;
sauimone
Adaptive layout to legend. Tries to fit all items inside given maximum size
r626
Michal Klocek
Refactor qledgend handling...
r855 protected:
sauimone
Separated legend marker to private header. Added signals for left and right mouse click
r547 // From QGraphicsObject
void mousePressEvent(QGraphicsSceneMouseEvent *event);
sauimone
removed handlethemechange for legend. Too complex solution. Legend now listens the changed signals from series
r587 public Q_SLOTS:
Michal Klocek
Refactor qledgend handling...
r855 virtual void updated() = 0;
sauimone
removed handlethemechange for legend. Too complex solution. Legend now listens the changed signals from series
r587
Michal Klocek
Refactor qledgend handling...
r855 protected:
Tero Ahola
Renamed QSeries to QAbstractSeries
r988 QAbstractSeries *m_series;
Michal Klocek
Refactor qledgend handling...
r855 QRectF m_markerRect;
sauimone
legend marker pointer fix
r778 QRectF m_boundingRect;
Michal Klocek
Refactor qledgend handling...
r855 QLegend* m_legend;
QGraphicsSimpleTextItem *m_textItem;
QGraphicsRectItem *m_rectItem;
Michal Klocek
Refactors layout managment...
r1534 qreal m_margin;
qreal m_space;
sauimone
legend marker pointer fix
r778
Michal Klocek
Refactor qledgend handling...
r855 };
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class XYLegendMarker : public LegendMarker
{
public:
XYLegendMarker(QXYSeries *series, QLegend *legend);
protected:
void updated();
private:
QXYSeries *m_series;
};
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class AreaLegendMarker : public LegendMarker
{
public:
AreaLegendMarker(QAreaSeries *series, QLegend *legend);
protected:
void updated();
private:
QAreaSeries *m_series;
};
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class BarLegendMarker : public LegendMarker
{
public:
sauimone
QBarSeries to QAbstractBarSeries
r1584 BarLegendMarker(QAbstractBarSeries *barseries, QBarSet *barset,QLegend *legend);
Michal Klocek
Refactor qledgend handling...
r855 protected:
void updated();
private:
sauimone
legend marker pointer fix
r778 QBarSet *m_barset;
Michal Klocek
Refactor qledgend handling...
r855 };
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class PieLegendMarker : public LegendMarker
{
public:
PieLegendMarker(QPieSeries *pieSeries, QPieSlice *pieslice, QLegend *legend);
protected:
void updated();
private:
sauimone
legend marker pointer fix
r778 QPieSlice *m_pieslice;
sauimone
Separated legend marker to private header. Added signals for left and right mouse click
r547 };
QTCOMMERCIALCHART_END_NAMESPACE
#endif // LEGENDMARKER_P_H