VisualizationWidget.h
67 lines
| 1.9 KiB
| text/x-c
|
CLexer
r58 | #ifndef SCIQLOP_VISUALIZATIONWIDGET_H | |||
#define SCIQLOP_VISUALIZATIONWIDGET_H | ||||
r118 | #include "Visualization/IVisualizationWidget.h" | |||
r1347 | #include <Data/DateTimeRange.h> | |||
r118 | ||||
r88 | #include <QLoggingCategory> | |||
r58 | #include <QWidget> | |||
r1049 | #include <Common/spimpl.h> | |||
Alexandre Leroux
|
r219 | Q_DECLARE_LOGGING_CATEGORY(LOG_VisualizationWidget) | ||
Alexandre Leroux
|
r248 | class QMenu; | ||
r1420 | class Variable2; | |||
r118 | class VisualizationTabWidget; | |||
r1049 | class VisualizationSelectionZoneManager; | |||
r118 | ||||
r1420 | namespace Ui | |||
{ | ||||
r58 | class VisualizationWidget; | |||
} // namespace Ui | ||||
r1420 | class VisualizationWidget : public QWidget, public IVisualizationWidget | |||
{ | ||||
r58 | Q_OBJECT | |||
public: | ||||
r1420 | explicit VisualizationWidget(QWidget* parent = 0); | |||
r58 | virtual ~VisualizationWidget(); | |||
r1049 | /// Returns the class which manage the selection of selection zone across the visualization | |||
r1420 | VisualizationSelectionZoneManager& selectionZoneManager() const; | |||
r1049 | ||||
r1420 | VisualizationTabWidget* currentTabWidget() const; | |||
r1136 | ||||
r118 | // IVisualizationWidget interface | |||
r1420 | void accept(IVisualizationWidgetVisitor* visitor) override; | |||
bool canDrop(Variable2& variable) const override; | ||||
bool contains(Variable2& 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 | */ | ||
r1420 | void attachVariableMenu( | |||
QMenu* menu, const QVector<std::shared_ptr<Variable2>>& variables) noexcept; | ||||
Alexandre Leroux
|
r175 | |||
Alexandre Leroux
|
r334 | /// Slot called when a variable is about to be deleted from SciQlop | ||
r1420 | void onVariableAboutToBeDeleted(std::shared_ptr<Variable2> variable) noexcept; | |||
Alexandre Leroux
|
r334 | |||
r1420 | void onRangeChanged(std::shared_ptr<Variable2> variable, const DateTimeRange& range) noexcept; | |||
r437 | ||||
Alexandre Leroux
|
r738 | protected: | ||
r1420 | void closeEvent(QCloseEvent* event) override; | |||
Alexandre Leroux
|
r738 | |||
r58 | private: | |||
r1420 | Ui::VisualizationWidget* ui; | |||
r1049 | ||||
class VisualizationWidgetPrivate; | ||||
spimpl::unique_impl_ptr<VisualizationWidgetPrivate> impl; | ||||
r58 | }; | |||
#endif // VISUALIZATIONWIDGET_H | ||||