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