VisualizationTabWidget.h
53 lines
| 1.4 KiB
| text/x-c
|
CLexer
r58 | #ifndef SCIQLOP_VISUALIZATIONTABWIDGET_H | |||
#define SCIQLOP_VISUALIZATIONTABWIDGET_H | ||||
r118 | #include "Visualization/IVisualizationWidget.h" | |||
|
r198 | #include <Common/spimpl.h> | ||
|
r219 | #include <QLoggingCategory> | ||
r58 | #include <QWidget> | |||
|
r219 | Q_DECLARE_LOGGING_CATEGORY(LOG_VisualizationTabWidget) | ||
|
r203 | class Variable; | ||
r118 | class VisualizationZoneWidget; | |||
r58 | namespace Ui { | |||
class VisualizationTabWidget; | ||||
} // namespace Ui | ||||
r118 | class VisualizationTabWidget : public QWidget, public IVisualizationWidget { | |||
r58 | Q_OBJECT | |||
public: | ||||
|
r198 | explicit VisualizationTabWidget(const QString &name = {}, QWidget *parent = 0); | ||
r58 | virtual ~VisualizationTabWidget(); | |||
r118 | /// Add a zone widget | |||
void addZone(VisualizationZoneWidget *zoneWidget); | ||||
|
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 | ||||
|
r207 | void accept(IVisualizationWidgetVisitor *visitor) override; | ||
|
r209 | bool canDrop(const Variable &variable) const override; | ||
r119 | QString name() const override; | |||
r118 | ||||
r58 | private: | |||
Ui::VisualizationTabWidget *ui; | ||||
|
r198 | |||
class VisualizationTabWidgetPrivate; | ||||
spimpl::unique_impl_ptr<VisualizationTabWidgetPrivate> impl; | ||||
r58 | }; | |||
#endif // SCIQLOP_VISUALIZATIONTABWIDGET_H | ||||