VisualizationTabWidget.h
51 lines
| 1.4 KiB
| text/x-c
|
CLexer
r58 | #ifndef SCIQLOP_VISUALIZATIONTABWIDGET_H | |||
#define SCIQLOP_VISUALIZATIONTABWIDGET_H | ||||
r111 | #include "Visualization/IVisualizationWidget.h" | |||
|
r184 | #include <Common/spimpl.h> | ||
r58 | #include <QWidget> | |||
|
r189 | class Variable; | ||
r111 | class VisualizationZoneWidget; | |||
r58 | namespace Ui { | |||
class VisualizationTabWidget; | ||||
} // namespace Ui | ||||
r111 | class VisualizationTabWidget : public QWidget, public IVisualizationWidget { | |||
r58 | Q_OBJECT | |||
public: | ||||
|
r184 | explicit VisualizationTabWidget(const QString &name = {}, QWidget *parent = 0); | ||
r58 | virtual ~VisualizationTabWidget(); | |||
r111 | /// Add a zone widget | |||
void addZone(VisualizationZoneWidget *zoneWidget); | ||||
|
r187 | /** | ||
* 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); | ||||
r111 | ||||
/// Remove a zone | ||||
void removeZone(VisualizationZoneWidget *zone); | ||||
// IVisualizationWidget interface | ||||
|
r192 | void accept(IVisualizationWidgetVisitor *visitor) override; | ||
|
r194 | bool canDrop(const Variable &variable) const override; | ||
r112 | void close() override; | |||
QString name() const override; | ||||
r111 | ||||
r58 | private: | |||
Ui::VisualizationTabWidget *ui; | ||||
|
r184 | |||
class VisualizationTabWidgetPrivate; | ||||
spimpl::unique_impl_ptr<VisualizationTabWidgetPrivate> impl; | ||||
r58 | }; | |||
#endif // SCIQLOP_VISUALIZATIONTABWIDGET_H | ||||