summaryrefslogtreecommitdiffstats
path: root/examples/charts/chartsgallery/interactionsview.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/charts/chartsgallery/interactionsview.h')
-rw-r--r--examples/charts/chartsgallery/interactionsview.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/examples/charts/chartsgallery/interactionsview.h b/examples/charts/chartsgallery/interactionsview.h
new file mode 100644
index 00000000..04a27b41
--- /dev/null
+++ b/examples/charts/chartsgallery/interactionsview.h
@@ -0,0 +1,27 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#ifndef INTERACTIONSVIEW_H
+#define INTERACTIONSVIEW_H
+
+#include <QChartView>
+#include <QPoint>
+
+class InteractionsChart;
+
+class InteractionsView : public QChartView
+{
+public:
+ InteractionsView(InteractionsChart *chart, QWidget *parent = nullptr);
+
+protected:
+ void mousePressEvent(QMouseEvent *event);
+ void mouseMoveEvent(QMouseEvent *event);
+ void mouseReleaseEvent(QMouseEvent *event);
+
+private:
+ InteractionsChart *m_chart = nullptr;
+ QPoint m_mousePos;
+};
+
+#endif