VisualizationTabWidget.h
54 lines
| 1.5 KiB
| text/x-c
|
CLexer
r58 | #ifndef SCIQLOP_VISUALIZATIONTABWIDGET_H | |||
#define SCIQLOP_VISUALIZATIONTABWIDGET_H | ||||
r111 | #include "Visualization/IVisualizationWidget.h" | |||
Alexandre Leroux
|
r184 | #include <Common/spimpl.h> | ||
Alexandre Leroux
|
r204 | #include <QLoggingCategory> | ||
r58 | #include <QWidget> | |||
Alexandre Leroux
|
r204 | Q_DECLARE_LOGGING_CATEGORY(LOG_VisualizationTabWidget) | ||
Alexandre Leroux
|
r189 | class Variable; | ||
r111 | class VisualizationZoneWidget; | |||
r58 | namespace Ui { | |||
class VisualizationTabWidget; | ||||
} // namespace Ui | ||||
r111 | class VisualizationTabWidget : public QWidget, public IVisualizationWidget { | |||
r58 | Q_OBJECT | |||
public: | ||||
Alexandre Leroux
|
r184 | explicit VisualizationTabWidget(const QString &name = {}, QWidget *parent = 0); | ||
r58 | virtual ~VisualizationTabWidget(); | |||
r111 | /// Add a zone widget | |||
void addZone(VisualizationZoneWidget *zoneWidget); | ||||
Alexandre Leroux
|
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 | ||||
// IVisualizationWidget interface | ||||
Alexandre Leroux
|
r192 | void accept(IVisualizationWidgetVisitor *visitor) override; | ||
Alexandre Leroux
|
r194 | bool canDrop(const Variable &variable) const override; | ||
Alexandre Leroux
|
r301 | bool contains(const Variable &variable) const override; | ||
r112 | QString name() const override; | |||
r111 | ||||
r58 | private: | |||
Alexandre Leroux
|
r284 | /// @return the layout of tab in which zones are added | ||
QLayout &tabLayout() const noexcept; | ||||
r58 | Ui::VisualizationTabWidget *ui; | |||
Alexandre Leroux
|
r184 | |||
class VisualizationTabWidgetPrivate; | ||||
spimpl::unique_impl_ptr<VisualizationTabWidgetPrivate> impl; | ||||
r58 | }; | |||
#endif // SCIQLOP_VISUALIZATIONTABWIDGET_H | ||||