VisualizationTabWidget.h
50 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> | ||
Alexandre Leroux
|
r219 | #include <QLoggingCategory> | ||
r58 | #include <QWidget> | |||
Alexandre Leroux
|
r219 | Q_DECLARE_LOGGING_CATEGORY(LOG_VisualizationTabWidget) | ||
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 | ||||
// IVisualizationWidget interface | ||||
Alexandre Leroux
|
r207 | void accept(IVisualizationWidgetVisitor *visitor) override; | ||
Alexandre Leroux
|
r209 | bool canDrop(const Variable &variable) const override; | ||
r119 | 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 | ||||