VisualizationZoneWidget.h
52 lines
| 1.4 KiB
| text/x-c
|
CLexer
r58 | #ifndef SCIQLOP_VISUALIZATIONZONEWIDGET_H | |||
#define SCIQLOP_VISUALIZATIONZONEWIDGET_H | ||||
r118 | #include "Visualization/IVisualizationWidget.h" | |||
|
r219 | #include <QLoggingCategory> | ||
r58 | #include <QWidget> | |||
r539 | #include <memory> | |||
#include <Common/spimpl.h> | ||||
|
r219 | Q_DECLARE_LOGGING_CATEGORY(LOG_VisualizationZoneWidget) | ||
r58 | namespace Ui { | |||
class VisualizationZoneWidget; | ||||
} // Ui | ||||
|
r203 | class Variable; | ||
|
r197 | class VisualizationGraphWidget; | ||
r118 | class VisualizationZoneWidget : public QWidget, public IVisualizationWidget { | |||
r58 | Q_OBJECT | |||
public: | ||||
|
r197 | explicit VisualizationZoneWidget(const QString &name = {}, QWidget *parent = 0); | ||
r58 | virtual ~VisualizationZoneWidget(); | |||
r118 | /// Add a graph widget | |||
void addGraph(VisualizationGraphWidget *graphWidget); | ||||
|
r200 | /** | ||
* Creates a graph using a variable. The variable will be displayed in the new graph. | ||||
* @param variable the variable for which to create the graph | ||||
* @return the pointer to the created graph | ||||
*/ | ||||
VisualizationGraphWidget *createGraph(std::shared_ptr<Variable> variable); | ||||
r118 | ||||
// IVisualizationWidget interface | ||||
|
r207 | void accept(IVisualizationWidgetVisitor *visitor) override; | ||
|
r209 | bool canDrop(const Variable &variable) const override; | ||
|
r327 | bool contains(const Variable &variable) const override; | ||
r119 | QString name() const override; | |||
r118 | ||||
r58 | private: | |||
Ui::VisualizationZoneWidget *ui; | ||||
r539 | ||||
class VisualizationZoneWidgetPrivate; | ||||
spimpl::unique_impl_ptr<VisualizationZoneWidgetPrivate> impl; | ||||
r58 | }; | |||
#endif // SCIQLOP_VISUALIZATIONZONEWIDGET_H | ||||