VisualizationWidget.h
53 lines
| 1.4 KiB
| text/x-c
|
CLexer
r58 | #ifndef SCIQLOP_VISUALIZATIONWIDGET_H | |||
#define SCIQLOP_VISUALIZATIONWIDGET_H | ||||
r118 | #include "Visualization/IVisualizationWidget.h" | |||
r88 | #include <QLoggingCategory> | |||
r58 | #include <QWidget> | |||
Alexandre Leroux
|
r219 | Q_DECLARE_LOGGING_CATEGORY(LOG_VisualizationWidget) | ||
Alexandre Leroux
|
r175 | class Variable; | ||
r118 | class VisualizationTabWidget; | |||
r58 | namespace Ui { | |||
class VisualizationWidget; | ||||
} // namespace Ui | ||||
r118 | class VisualizationWidget : public QWidget, public IVisualizationWidget { | |||
r58 | Q_OBJECT | |||
public: | ||||
explicit VisualizationWidget(QWidget *parent = 0); | ||||
virtual ~VisualizationWidget(); | ||||
r118 | /// Add a zone widget | |||
virtual void addTab(VisualizationTabWidget *tabWidget); | ||||
/// Create a tab using a Variable | ||||
VisualizationTabWidget *createTab(); | ||||
/// Remove a tab | ||||
void removeTab(VisualizationTabWidget *tab); | ||||
// IVisualizationWidget interface | ||||
Alexandre Leroux
|
r207 | void accept(IVisualizationWidgetVisitor *visitor) override; | ||
Alexandre Leroux
|
r209 | bool canDrop(const Variable &variable) const override; | ||
r119 | void close() override; | |||
Alexandre Leroux
|
r218 | QString name() const override; | ||
r118 | ||||
Alexandre Leroux
|
r175 | public slots: | ||
/** | ||||
* Displays a variable in a new graph of a new zone of the current tab | ||||
* @param variable the variable to display | ||||
* @todo this is a temporary method that will be replaced by own actions for each type of | ||||
* visualization widget | ||||
*/ | ||||
void displayVariable(std::shared_ptr<Variable> variable) noexcept; | ||||
r58 | private: | |||
Ui::VisualizationWidget *ui; | ||||
}; | ||||
#endif // VISUALIZATIONWIDGET_H | ||||