##// END OF EJS Templates
Adds override keywor
Alexandre Leroux -
r218:905d9d13cf8a
parent child
Show More
@@ -1,44 +1,44
1 1 #ifndef SCIQLOP_VISUALIZATIONGRAPHWIDGET_H
2 2 #define SCIQLOP_VISUALIZATIONGRAPHWIDGET_H
3 3
4 4 #include "Visualization/IVisualizationWidget.h"
5 5
6 6 #include <QWidget>
7 7
8 8 #include <memory>
9 9
10 10 #include <Common/spimpl.h>
11 11
12 12 class Variable;
13 13
14 14 namespace Ui {
15 15 class VisualizationGraphWidget;
16 16 } // namespace Ui
17 17
18 18 class VisualizationGraphWidget : public QWidget, public IVisualizationWidget {
19 19 Q_OBJECT
20 20
21 21 public:
22 22 explicit VisualizationGraphWidget(const QString &name = {}, QWidget *parent = 0);
23 23 virtual ~VisualizationGraphWidget();
24 24
25 25 void addVariable(std::shared_ptr<Variable> variable);
26 26
27 27 // IVisualizationWidget interface
28 28 void accept(IVisualizationWidgetVisitor *visitor) override;
29 29 bool canDrop(const Variable &variable) const override;
30 30 void close() override;
31 QString name() const;
31 QString name() const override;
32 32
33 33 private:
34 34 Ui::VisualizationGraphWidget *ui;
35 35
36 36 class VisualizationGraphWidgetPrivate;
37 37 spimpl::unique_impl_ptr<VisualizationGraphWidgetPrivate> impl;
38 38
39 39 private slots:
40 40 /// Slot called when a mouse wheel was made, to perform some processing before the zoom is done
41 41 void onMouseWheel(QWheelEvent *event) noexcept;
42 42 };
43 43
44 44 #endif // SCIQLOP_VISUALIZATIONGRAPHWIDGET_H
@@ -1,53 +1,53
1 1 #ifndef SCIQLOP_VISUALIZATIONWIDGET_H
2 2 #define SCIQLOP_VISUALIZATIONWIDGET_H
3 3
4 4 #include "Visualization/IVisualizationWidget.h"
5 5
6 6 #include <QLoggingCategory>
7 7 #include <QWidget>
8 8
9 9 class Variable;
10 10 class VisualizationTabWidget;
11 11
12 12 Q_DECLARE_LOGGING_CATEGORY(LOG_VisualizationWidget)
13 13
14 14 namespace Ui {
15 15 class VisualizationWidget;
16 16 } // namespace Ui
17 17
18 18 class VisualizationWidget : public QWidget, public IVisualizationWidget {
19 19 Q_OBJECT
20 20
21 21 public:
22 22 explicit VisualizationWidget(QWidget *parent = 0);
23 23 virtual ~VisualizationWidget();
24 24
25 25 /// Add a zone widget
26 26 virtual void addTab(VisualizationTabWidget *tabWidget);
27 27
28 28 /// Create a tab using a Variable
29 29 VisualizationTabWidget *createTab();
30 30
31 31 /// Remove a tab
32 32 void removeTab(VisualizationTabWidget *tab);
33 33
34 34 // IVisualizationWidget interface
35 35 void accept(IVisualizationWidgetVisitor *visitor) override;
36 36 bool canDrop(const Variable &variable) const override;
37 37 void close() override;
38 QString name() const;
38 QString name() const override;
39 39
40 40 public slots:
41 41 /**
42 42 * Displays a variable in a new graph of a new zone of the current tab
43 43 * @param variable the variable to display
44 44 * @todo this is a temporary method that will be replaced by own actions for each type of
45 45 * visualization widget
46 46 */
47 47 void displayVariable(std::shared_ptr<Variable> variable) noexcept;
48 48
49 49 private:
50 50 Ui::VisualizationWidget *ui;
51 51 };
52 52
53 53 #endif // VISUALIZATIONWIDGET_H
General Comments 0
You need to be logged in to leave comments. Login now