VisualizationGraphWidget.h
56 lines
| 1.4 KiB
| text/x-c
|
CLexer
r58 | #ifndef SCIQLOP_VISUALIZATIONGRAPHWIDGET_H | |||
#define SCIQLOP_VISUALIZATIONGRAPHWIDGET_H | ||||
r118 | #include "Visualization/IVisualizationWidget.h" | |||
Alexandre Leroux
|
r219 | #include <QLoggingCategory> | ||
r58 | #include <QWidget> | |||
r118 | #include <memory> | |||
#include <Common/spimpl.h> | ||||
Alexandre Leroux
|
r219 | Q_DECLARE_LOGGING_CATEGORY(LOG_VisualizationGraphWidget) | ||
Alexandre Leroux
|
r227 | class QCPRange; | ||
r118 | class Variable; | |||
r58 | namespace Ui { | |||
class VisualizationGraphWidget; | ||||
} // namespace Ui | ||||
r118 | class VisualizationGraphWidget : public QWidget, public IVisualizationWidget { | |||
r58 | Q_OBJECT | |||
public: | ||||
Alexandre Leroux
|
r205 | explicit VisualizationGraphWidget(const QString &name = {}, QWidget *parent = 0); | ||
r58 | virtual ~VisualizationGraphWidget(); | |||
r118 | void addVariable(std::shared_ptr<Variable> variable); | |||
// IVisualizationWidget interface | ||||
Alexandre Leroux
|
r207 | void accept(IVisualizationWidgetVisitor *visitor) override; | ||
Alexandre Leroux
|
r209 | bool canDrop(const Variable &variable) const override; | ||
r119 | void close() override; | |||
Alexandre Leroux
|
r218 | QString name() const override; | ||
r118 | ||||
r235 | void updateDisplay(std::shared_ptr<Variable> variable); | |||
r58 | private: | |||
Ui::VisualizationGraphWidget *ui; | ||||
r118 | ||||
class VisualizationGraphWidgetPrivate; | ||||
spimpl::unique_impl_ptr<VisualizationGraphWidgetPrivate> impl; | ||||
Alexandre Leroux
|
r179 | |||
private slots: | ||||
Alexandre Leroux
|
r227 | |||
void onRangeChanged(const QCPRange &t1, const QCPRange &t2); | ||||
Alexandre Leroux
|
r179 | /// Slot called when a mouse wheel was made, to perform some processing before the zoom is done | ||
void onMouseWheel(QWheelEvent *event) noexcept; | ||||
r235 | ||||
void onDataCacheVariableUpdated(); | ||||
r58 | }; | |||
#endif // SCIQLOP_VISUALIZATIONGRAPHWIDGET_H | ||||