VisualizationGraphWidget.h
44 lines
| 1.1 KiB
| text/x-c
|
CLexer
r58 | #ifndef SCIQLOP_VISUALIZATIONGRAPHWIDGET_H | |||
#define SCIQLOP_VISUALIZATIONGRAPHWIDGET_H | ||||
r111 | #include "Visualization/IVisualizationWidget.h" | |||
r58 | #include <QWidget> | |||
r111 | #include <memory> | |||
#include <Common/spimpl.h> | ||||
class Variable; | ||||
r58 | namespace Ui { | |||
class VisualizationGraphWidget; | ||||
} // namespace Ui | ||||
r111 | class VisualizationGraphWidget : public QWidget, public IVisualizationWidget { | |||
r58 | Q_OBJECT | |||
public: | ||||
|
r191 | explicit VisualizationGraphWidget(const QString &name = {}, QWidget *parent = 0); | ||
r58 | virtual ~VisualizationGraphWidget(); | |||
r111 | void addVariable(std::shared_ptr<Variable> variable); | |||
// IVisualizationWidget interface | ||||
|
r192 | void accept(IVisualizationWidgetVisitor *visitor) override; | ||
|
r194 | bool canDrop(const Variable &variable) const override; | ||
r112 | void close() override; | |||
QString name() const; | ||||
r111 | ||||
r58 | private: | |||
Ui::VisualizationGraphWidget *ui; | ||||
r111 | ||||
class VisualizationGraphWidgetPrivate; | ||||
spimpl::unique_impl_ptr<VisualizationGraphWidgetPrivate> impl; | ||||
|
r166 | |||
private slots: | ||||
/// Slot called when a mouse wheel was made, to perform some processing before the zoom is done | ||||
void onMouseWheel(QWheelEvent *event) noexcept; | ||||
r58 | }; | |||
#endif // SCIQLOP_VISUALIZATIONGRAPHWIDGET_H | ||||