##// END OF EJS Templates
make piechartdrilldown compile again
make piechartdrilldown compile again

File last commit:

r794:4c76de65bbac
r798:2c85b9e659bd
Show More
legendmarker_p.h
94 lines | 2.4 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;
sauimone
more intelligent legend. fixed compiler warning in bar.cpp
r565 class QBarSet;
class QPieSlice;
sauimone
Separated legend marker to private header. Added signals for left and right mouse click
r547
sauimone
more intelligent legend. fixed compiler warning in bar.cpp
r565 // TODO: split this to 3 different markers for series, barset and pieslice. Current implementation is easier to misuse...
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:
sauimone
legend fixes
r766 LegendMarker(QSeries *series, QGraphicsItem *parent = 0);
LegendMarker(QSeries *series, QBarSet *barset, QGraphicsItem *parent = 0);
LegendMarker(QSeries *series, QPieSlice *pieslice, QGraphicsItem *parent = 0);
sauimone
Adaptive layout to legend. Tries to fit all items inside given maximum size
r626
void setPos(qreal x, qreal y);
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;
sauimone
Separated legend marker to private header. Added signals for left and right mouse click
r547 void setName(const QString name);
QString name() const;
sauimone
Legend can handle removing of series
r576 QSeries* series() const;
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;
sauimone
Adaptive layout to legend. Tries to fit all items inside given maximum size
r626 void layoutChanged();
sauimone
Separated legend marker to private header. Added signals for left and right mouse click
r547 public:
// From QGraphicsObject
void mousePressEvent(QGraphicsSceneMouseEvent *event);
Q_SIGNALS:
sauimone
legend fixes
r766 void clicked(QSeries *series, Qt::MouseButton button);
void clicked(QBarSet *barset, Qt::MouseButton button);
void clicked(QPieSlice *pieslice, Qt::MouseButton button);
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:
void changed();
sauimone
Separated legend marker to private header. Added signals for left and right mouse click
r547 private:
sauimone
legend marker pointer fix
r778 QPointF m_pos;
QSize m_size;
QRectF m_boundingRect;
QRectF m_markerBoundingRect;
QBrush m_brush;
QPen m_pen;
QSeries *m_series;
QBarSet *m_barset;
QPieSlice *m_pieslice;
QGraphicsSimpleTextItem *m_textItem;
sauimone
fixed bug in legend name drawing
r585
sauimone
Separated legend marker to private header. Added signals for left and right mouse click
r547 };
QTCOMMERCIALCHART_END_NAMESPACE
#endif // LEGENDMARKER_P_H