qchartview.h
74 lines
| 2.0 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
|
r1541 | #include <QAbstractAxis> | ||
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 | |||
Jani Honkonen
|
r2097 | enum RubberBand { | ||
Michal Klocek
|
r746 | 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); | ||
Jani Honkonen
|
r2097 | explicit QChartView(QChart *chart, QWidget *parent = 0); | ||
Michal Klocek
|
r746 | ~QChartView(); | ||
Michal Klocek
|
r155 | |||
Michal Klocek
|
r746 | void setRubberBand(const RubberBands& rubberBands); | ||
RubberBands rubberBand() const; | ||||
Jani Honkonen
|
r2056 | |||
Michal Klocek
|
r746 | QChart* chart() const; | ||
Jani Honkonen
|
r2056 | void setChart(QChart *chart); | ||
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 | ||||
Jani Honkonen
|
r2046 | #endif // QCHARTVIEW_H | ||