linechartitem_p.h
64 lines
| 1.6 KiB
| text/x-c
|
CLexer
Jani Honkonen
|
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$ | ||||
** | ||||
****************************************************************************/ | ||||
Michal Klocek
|
r144 | #ifndef LINECHARTITEM_H | ||
#define LINECHARTITEM_H | ||||
Michal Klocek
|
r21 | |||
Tero Ahola
|
r30 | #include "qchartglobal.h" | ||
Michal Klocek
|
r465 | #include "xychartitem_p.h" | ||
Michal Klocek
|
r139 | #include <QPen> | ||
Michal Klocek
|
r21 | |||
Tero Ahola
|
r30 | QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||
Michal Klocek
|
r21 | |||
Michal Klocek
|
r349 | class QLineSeries; | ||
Michal Klocek
|
r677 | class ChartPresenter; | ||
Michal Klocek
|
r21 | |||
Michal Klocek
|
r465 | class LineChartItem : public XYChartItem | ||
Michal Klocek
|
r21 | { | ||
Michal Klocek
|
r131 | Q_OBJECT | ||
Michal Klocek
|
r21 | public: | ||
sauimone
|
r743 | explicit LineChartItem(QLineSeries *series,ChartPresenter *presenter); | ||
~LineChartItem() {}; | ||||
Michal Klocek
|
r21 | |||
//from QGraphicsItem | ||||
Michal Klocek
|
r67 | QRectF boundingRect() const; | ||
Tero Ahola
|
r108 | void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); | ||
Michal Klocek
|
r131 | QPainterPath shape() const; | ||
Michal Klocek
|
r139 | |||
sauimone
|
r775 | public Q_SLOTS: | ||
Michal Klocek
|
r392 | void handleUpdated(); | ||
Michal Klocek
|
r21 | |||
Michal Klocek
|
r464 | protected: | ||
Michal Klocek
|
r557 | void setLayout(QVector<QPointF>& points); | ||
Michal Klocek
|
r464 | |||
Michal Klocek
|
r465 | private: | ||
Marek Rosa
|
r419 | QLineSeries* m_series; | ||
Michal Klocek
|
r391 | QGraphicsItemGroup m_items; | ||
Michal Klocek
|
r465 | QPainterPath m_path; | ||
QRectF m_rect; | ||||
Michal Klocek
|
r544 | QPen m_linePen; | ||
QPen m_pointPen; | ||||
bool m_pointsVisible; | ||||
Michal Klocek
|
r131 | |||
Michal Klocek
|
r21 | }; | ||
Tero Ahola
|
r30 | QTCOMMERCIALCHART_END_NAMESPACE | ||
Michal Klocek
|
r21 | |||
#endif | ||||