##// 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
VisualizationTabWidget.h
51 lines | 1.4 KiB | text/x-c | CLexer
#ifndef SCIQLOP_VISUALIZATIONTABWIDGET_H
#define SCIQLOP_VISUALIZATIONTABWIDGET_H
#include "Visualization/IVisualizationWidget.h"
#include <Common/spimpl.h>
#include <QWidget>
class Variable;
class VisualizationZoneWidget;
namespace Ui {
class VisualizationTabWidget;
} // namespace Ui
class VisualizationTabWidget : public QWidget, public IVisualizationWidget {
Q_OBJECT
public:
explicit VisualizationTabWidget(const QString &name = {}, QWidget *parent = 0);
virtual ~VisualizationTabWidget();
/// Add a zone widget
void addZone(VisualizationZoneWidget *zoneWidget);
/**
* Creates a zone using a variable. The variable will be displayed in a new graph of the new
* zone.
* @param variable the variable for which to create the zone
* @return the pointer to the created zone
*/
VisualizationZoneWidget *createZone(std::shared_ptr<Variable> variable);
/// Remove a zone
void removeZone(VisualizationZoneWidget *zone);
// IVisualizationWidget interface
void accept(IVisualizationWidgetVisitor *visitor) override;
bool canDrop(const Variable &variable) const override;
void close() override;
QString name() const override;
private:
Ui::VisualizationTabWidget *ui;
class VisualizationTabWidgetPrivate;
spimpl::unique_impl_ptr<VisualizationTabWidgetPrivate> impl;
};
#endif // SCIQLOP_VISUALIZATIONTABWIDGET_H