qchartview.h
72 lines
| 1.9 KiB
| text/x-c
|
CLexer
/ src / qchartview.h
Michal Klocek
|
r746 | /**************************************************************************** | ||
** | ||||
** 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$ | ||||
** | ||||
****************************************************************************/ | ||||
#ifndef QCHARTVIEW_H | ||||
#define QCHARTVIEW_H | ||||
Michal Klocek
|
r1006 | #include <QAxis> | ||
Tero Ahola
|
r988 | #include <QAbstractSeries> | ||
Michal Klocek
|
r746 | #include <QChart> | ||
Michal Klocek
|
r58 | #include <QGraphicsView> | ||
class QGraphicsScene; | ||||
Michal Klocek
|
r136 | class QRubberBand; | ||
Michal Klocek
|
r58 | |||
QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||||
Jani Honkonen
|
r1296 | class QChartViewPrivate; | ||
Michal Klocek
|
r58 | |||
class QTCOMMERCIALCHART_EXPORT QChartView : public QGraphicsView | ||||
{ | ||||
Tero Ahola
|
r584 | Q_OBJECT | ||
Michal Klocek
|
r1108 | Q_ENUMS(RubberBand) | ||
Michal Klocek
|
r58 | public: | ||
Michal Klocek
|
r136 | |||
Michal Klocek
|
r746 | enum RubberBand{ | ||
NoRubberBand = 0x0, | ||||
VerticalRubberBand = 0x1, | ||||
HorizonalRubberBand = 0x2, | ||||
RectangleRubberBand = 0x3 | ||||
}; | ||||
Michal Klocek
|
r122 | |||
Michal Klocek
|
r746 | Q_DECLARE_FLAGS(RubberBands, RubberBand) | ||
Michal Klocek
|
r531 | |||
Michal Klocek
|
r1290 | explicit QChartView(QWidget *parent = 0); | ||
Michal Klocek
|
r746 | explicit QChartView(QChart *chart,QWidget *parent = 0); | ||
~QChartView(); | ||||
Michal Klocek
|
r155 | |||
Michal Klocek
|
r746 | void setRubberBand(const RubberBands& rubberBands); | ||
RubberBands rubberBand() const; | ||||
QChart* chart() const; | ||||
sauimone
|
r529 | |||
Michal Klocek
|
r136 | protected: | ||
Michal Klocek
|
r746 | void resizeEvent(QResizeEvent *event); | ||
Michal Klocek
|
r136 | void mousePressEvent(QMouseEvent *event); | ||
void mouseMoveEvent(QMouseEvent *event); | ||||
void mouseReleaseEvent(QMouseEvent *event); | ||||
Michal Klocek
|
r746 | protected: | ||
QScopedPointer<QChartViewPrivate> d_ptr; | ||||
Michal Klocek
|
r58 | Q_DISABLE_COPY(QChartView) | ||
}; | ||||
QTCOMMERCIALCHART_END_NAMESPACE | ||||
#endif // QCHARTWIDGET_H | ||||