VisualizationZoneWidget.cpp
50 lines
| 1.1 KiB
| text/x-c
|
CppLexer
r93 | #include "Visualization/VisualizationZoneWidget.h" | |||
r58 | #include "ui_VisualizationZoneWidget.h" | |||
r111 | #include "Visualization/VisualizationGraphWidget.h" | |||
Alexandre Leroux
|
r183 | VisualizationZoneWidget::VisualizationZoneWidget(const QString &name, QWidget *parent) | ||
r89 | : QWidget{parent}, ui{new Ui::VisualizationZoneWidget} | |||
r58 | { | |||
ui->setupUi(this); | ||||
Alexandre Leroux
|
r183 | |||
ui->zoneNameLabel->setText(name); | ||||
r58 | } | |||
VisualizationZoneWidget::~VisualizationZoneWidget() | ||||
{ | ||||
delete ui; | ||||
} | ||||
r111 | ||||
void VisualizationZoneWidget::addGraph(VisualizationGraphWidget *graphWidget) | ||||
{ | ||||
ui->visualizationZoneFrame->layout()->addWidget(graphWidget); | ||||
} | ||||
VisualizationGraphWidget *VisualizationZoneWidget::createGraph() | ||||
{ | ||||
r113 | auto graphWidget = new VisualizationGraphWidget{this}; | |||
r111 | this->addGraph(graphWidget); | |||
return graphWidget; | ||||
} | ||||
void VisualizationZoneWidget::removeGraph(VisualizationGraphWidget *graph) | ||||
{ | ||||
} | ||||
void VisualizationZoneWidget::accept(IVisualizationWidget *visitor) | ||||
{ | ||||
// TODO: manage the visitor | ||||
} | ||||
void VisualizationZoneWidget::close() | ||||
{ | ||||
// The main view cannot be directly closed. | ||||
return; | ||||
} | ||||
r112 | QString VisualizationZoneWidget::name() const | |||
r111 | { | |||
Alexandre Leroux
|
r183 | return ui->zoneNameLabel->text(); | ||
r111 | } | |||