-
Notifications
You must be signed in to change notification settings - Fork 9
/
zoomablechartwidget.h
50 lines (37 loc) · 1.08 KB
/
zoomablechartwidget.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef ZOOMABLECHARTWIDGET_H
#define ZOOMABLECHARTWIDGET_H
#include "zoomablechart.h"
#include "zoomablechartview.h"
#include <QRubberBand>
#include <QWidget>
#include <QtCharts/QChart>
#include <QtCharts/QLineSeries>
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QT_CHARTS_USE_NAMESPACE
#endif
namespace Ui {
class ZoomableChartWidget;
}
class ZoomableChartWidget : public QWidget
{
Q_OBJECT
public:
explicit ZoomableChartWidget(QWidget *parent = nullptr);
~ZoomableChartWidget();
ZoomableChart *chart() const;
ZoomableChartView *chartView() const;
void addToolWidget(QWidget *widget);
public slots:
void setSeriesVisible(QAbstractSeries *series, bool visible = true);
private slots:
void on_comboBoxZoomMode_activated(int index);
void legendMarkerClicked();
void legendMarkerHovered(bool hover);
void seriesAdded(QAbstractSeries *series);
void seriesRemoved(QAbstractSeries *series);
void on_toolButtonFitInView_clicked();
private:
Ui::ZoomableChartWidget *ui;
ZoomableChart *m_chart = nullptr;
};
#endif // ZOOMABLECHARTWIDGET_H