VisualizationTabWidget.h
51 lines
| 1.4 KiB
| text/x-c
|
CLexer
r58 | #ifndef SCIQLOP_VISUALIZATIONTABWIDGET_H | |||
#define SCIQLOP_VISUALIZATIONTABWIDGET_H | ||||
r118 | #include "Visualization/IVisualizationWidget.h" | |||
Alexandre Leroux
|
r198 | #include <Common/spimpl.h> | ||
r58 | #include <QWidget> | |||
Alexandre Leroux
|
r203 | class Variable; | ||
r118 | class VisualizationZoneWidget; | |||
r58 | namespace Ui { | |||
class VisualizationTabWidget; | ||||
} // namespace Ui | ||||
r118 | class VisualizationTabWidget : public QWidget, public IVisualizationWidget { | |||
r58 | Q_OBJECT | |||
public: | ||||
Alexandre Leroux
|
r198 | explicit VisualizationTabWidget(const QString &name = {}, QWidget *parent = 0); | ||
r58 | virtual ~VisualizationTabWidget(); | |||
r118 | /// Add a zone widget | |||
void addZone(VisualizationZoneWidget *zoneWidget); | ||||
Alexandre Leroux
|
r201 | /** | ||
* Creates a zone using a variable. The variable will be displayed in a new graph of the new | ||||
* zone. | ||||
* @param variable the variable for which to create the zone | ||||
* @return the pointer to the created zone | ||||
*/ | ||||
VisualizationZoneWidget *createZone(std::shared_ptr<Variable> variable); | ||||
r118 | ||||
/// Remove a zone | ||||
void removeZone(VisualizationZoneWidget *zone); | ||||
// 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::VisualizationTabWidget *ui; | ||||
Alexandre Leroux
|
r198 | |||
class VisualizationTabWidgetPrivate; | ||||
spimpl::unique_impl_ptr<VisualizationTabWidgetPrivate> impl; | ||||
r58 | }; | |||
#endif // SCIQLOP_VISUALIZATIONTABWIDGET_H | ||||