VisualizationZoneWidget.h
45 lines
| 1.2 KiB
| text/x-c
|
CLexer
r58 | #ifndef SCIQLOP_VISUALIZATIONZONEWIDGET_H | |||
#define SCIQLOP_VISUALIZATIONZONEWIDGET_H | ||||
r118 | #include "Visualization/IVisualizationWidget.h" | |||
r58 | #include <QWidget> | |||
namespace Ui { | ||||
class VisualizationZoneWidget; | ||||
} // Ui | ||||
Alexandre Leroux
|
r203 | class Variable; | ||
Alexandre Leroux
|
r197 | class VisualizationGraphWidget; | ||
r118 | class VisualizationZoneWidget : public QWidget, public IVisualizationWidget { | |||
r58 | Q_OBJECT | |||
public: | ||||
Alexandre Leroux
|
r197 | explicit VisualizationZoneWidget(const QString &name = {}, QWidget *parent = 0); | ||
r58 | virtual ~VisualizationZoneWidget(); | |||
r118 | /// Add a graph widget | |||
void addGraph(VisualizationGraphWidget *graphWidget); | ||||
Alexandre Leroux
|
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 | ||||
/// Remove a graph | ||||
void removeGraph(VisualizationGraphWidget *graph); | ||||
// IVisualizationWidget interface | ||||
Alexandre Leroux
|
r207 | void accept(IVisualizationWidgetVisitor *visitor) override; | ||
Alexandre Leroux
|
r209 | bool canDrop(const Variable &variable) const override; | ||
r119 | void close() override; | |||
QString name() const override; | ||||
r118 | ||||
r58 | private: | |||
Ui::VisualizationZoneWidget *ui; | ||||
}; | ||||
#endif // SCIQLOP_VISUALIZATIONZONEWIDGET_H | ||||