##// END OF EJS Templates
Fixed: QAbstractItemModel could be forward declaration
Fixed: QAbstractItemModel could be forward declaration

File last commit:

r855:e561e621da22
r862:203182eed8aa
Show More
legendmarker_p.h
128 lines | 3.3 KiB | text/x-c | CLexer
/ src / legendmarker_p.h
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$
**
****************************************************************************/
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>
sauimone
Separated legend marker to private header. Added signals for left and right mouse click
r547
QTCOMMERCIALCHART_BEGIN_NAMESPACE
class QSeries;
Michal Klocek
Refactor qledgend handling...
r855 class QAreaSeries;
class QXYSeries;
sauimone
more intelligent legend. fixed compiler warning in bar.cpp
r565 class QBarSet;
Michal Klocek
Refactor qledgend handling...
r855 class QBarSeries;
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
class LegendMarker : public QGraphicsObject
{
Q_OBJECT
sauimone
more intelligent legend. fixed compiler warning in bar.cpp
r565
sauimone
Separated legend marker to private header. Added signals for left and right mouse click
r547 public:
Michal Klocek
Refactor qledgend handling...
r855 explicit LegendMarker(QSeries* 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;
sauimone
legend fixes
r766 void setBrush(const QBrush &brush);
sauimone
more intelligent legend. fixed compiler warning in bar.cpp
r565 QBrush brush() const;
Michal Klocek
Refactor qledgend handling...
r855 void setSize(const QSize& size);
sauimone
Separated legend marker to private header. Added signals for left and right mouse click
r547
Michal Klocek
Refactor qledgend handling...
r855 void setLabel(const QString label);
QString label() const;
QSeries* series() const { return m_series;}
sauimone
Legend can handle removing of series
r576
sauimone
Separated legend marker to private header. Added signals for left and right mouse click
r547 void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
QRectF boundingRect() const;
Michal Klocek
Refactor qledgend handling...
r855 void updateLayout();
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);
Q_SIGNALS:
Michal Klocek
Refactor qledgend handling...
r855 void selected();
sauimone
Separated legend marker to private header. Added signals for left and right mouse click
r547
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:
QSeries* m_series;
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;
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:
BarLegendMarker(QBarSeries *barseires, QBarSet *barset,QLegend *legend);
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