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