VisualizationWidget.h
44 lines
| 1.2 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
|
r248 | class QMenu; | ||
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 | // IVisualizationWidget interface | |||
Alexandre Leroux
|
r207 | void accept(IVisualizationWidgetVisitor *visitor) override; | ||
Alexandre Leroux
|
r209 | bool canDrop(const Variable &variable) const override; | ||
Alexandre Leroux
|
r218 | QString name() const override; | ||
r118 | ||||
Alexandre Leroux
|
r175 | public slots: | ||
/** | ||||
Alexandre Leroux
|
r288 | * Attaches to a menu the menu relative to the visualization of variables | ||
Alexandre Leroux
|
r248 | * @param menu the parent menu of the generated menu | ||
Alexandre Leroux
|
r288 | * @param variables the variables for which to generate the menu | ||
Alexandre Leroux
|
r175 | */ | ||
Alexandre Leroux
|
r288 | void attachVariableMenu(QMenu *menu, | ||
const QVector<std::shared_ptr<Variable> > &variables) noexcept; | ||||
Alexandre Leroux
|
r175 | |||
r58 | private: | |||
Ui::VisualizationWidget *ui; | ||||
}; | ||||
#endif // VISUALIZATIONWIDGET_H | ||||