##// END OF EJS Templates
Creates a interface that defines a variable container...
Creates a interface that defines a variable container - A variable container is an entity that can eventually accomodate a variable (for example, from a menu or d'n'd) - The interfaces declares canDrop() method, that will be used to create a menu for a variable containing only the containers available for it, or to enable/disable d'n'd of this variable on a container - Each visualization widget is a variable container, so it implements canDrop() method

File last commit:

r209:7ef1d04a5917
r209:7ef1d04a5917
Show More
VisualizationGraphWidget.h
44 lines | 1.1 KiB | text/x-c | CLexer
/ gui / include / Visualization / VisualizationGraphWidget.h
#ifndef SCIQLOP_VISUALIZATIONGRAPHWIDGET_H
#define SCIQLOP_VISUALIZATIONGRAPHWIDGET_H
#include "Visualization/IVisualizationWidget.h"
#include <QWidget>
#include <memory>
#include <Common/spimpl.h>
class Variable;
namespace Ui {
class VisualizationGraphWidget;
} // namespace Ui
class VisualizationGraphWidget : public QWidget, public IVisualizationWidget {
Q_OBJECT
public:
explicit VisualizationGraphWidget(const QString &name = {}, QWidget *parent = 0);
virtual ~VisualizationGraphWidget();
void addVariable(std::shared_ptr<Variable> variable);
// IVisualizationWidget interface
void accept(IVisualizationWidgetVisitor *visitor) override;
bool canDrop(const Variable &variable) const override;
void close() override;
QString name() const;
private:
Ui::VisualizationGraphWidget *ui;
class VisualizationGraphWidgetPrivate;
spimpl::unique_impl_ptr<VisualizationGraphWidgetPrivate> impl;
private slots:
/// Slot called when a mouse wheel was made, to perform some processing before the zoom is done
void onMouseWheel(QWheelEvent *event) noexcept;
};
#endif // SCIQLOP_VISUALIZATIONGRAPHWIDGET_H