VisualizationWidget.h
51 lines
| 1.5 KiB
| text/x-c
|
CLexer
r58 | #ifndef SCIQLOP_VISUALIZATIONWIDGET_H | |||
#define SCIQLOP_VISUALIZATIONWIDGET_H | ||||
r111 | #include "Visualization/IVisualizationWidget.h" | |||
r471 | #include <Data/SqpRange.h> | |||
r111 | ||||
r87 | #include <QLoggingCategory> | |||
r58 | #include <QWidget> | |||
Alexandre Leroux
|
r204 | Q_DECLARE_LOGGING_CATEGORY(LOG_VisualizationWidget) | ||
Alexandre Leroux
|
r231 | class QMenu; | ||
Alexandre Leroux
|
r162 | class Variable; | ||
r111 | class VisualizationTabWidget; | |||
r58 | namespace Ui { | |||
class VisualizationWidget; | ||||
} // namespace Ui | ||||
r111 | class VisualizationWidget : public QWidget, public IVisualizationWidget { | |||
r58 | Q_OBJECT | |||
public: | ||||
explicit VisualizationWidget(QWidget *parent = 0); | ||||
virtual ~VisualizationWidget(); | ||||
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; | ||
Alexandre Leroux
|
r203 | QString name() const override; | ||
r111 | ||||
Alexandre Leroux
|
r162 | public slots: | ||
/** | ||||
Alexandre Leroux
|
r266 | * Attaches to a menu the menu relative to the visualization of variables | ||
Alexandre Leroux
|
r231 | * @param menu the parent menu of the generated menu | ||
Alexandre Leroux
|
r266 | * @param variables the variables for which to generate the menu | ||
Alexandre Leroux
|
r162 | */ | ||
Alexandre Leroux
|
r266 | void attachVariableMenu(QMenu *menu, | ||
const QVector<std::shared_ptr<Variable> > &variables) noexcept; | ||||
Alexandre Leroux
|
r162 | |||
Alexandre Leroux
|
r308 | /// Slot called when a variable is about to be deleted from SciQlop | ||
void onVariableAboutToBeDeleted(std::shared_ptr<Variable> variable) noexcept; | ||||
r471 | void onRangeChanged(std::shared_ptr<Variable> variable, const SqpRange &range) noexcept; | |||
r403 | ||||
r58 | private: | |||
Ui::VisualizationWidget *ui; | ||||
}; | ||||
#endif // VISUALIZATIONWIDGET_H | ||||