##// END OF EJS Templates
Removes the default tab from .ui and adds it manually...
Removes the default tab from .ui and adds it manually This allows to generate a default name for the tab

File last commit:

r198:2c59e95cf3ce
r199:0f1ccb97ea85
Show More
VisualizationTabWidget.cpp
56 lines | 1.3 KiB | text/x-c | CppLexer
/ gui / src / Visualization / VisualizationTabWidget.cpp
mv visualization -> Visualization...
r95 #include "Visualization/VisualizationTabWidget.h"
Creation of VisualizationWidget, VizualizationTabWidget, VisualizationZoneWidget, VisualizationGraphWidget
r58 #include "ui_VisualizationTabWidget.h"
Add the visualization gui classes
r118 #include "Visualization/VisualizationZoneWidget.h"
Alexandre Leroux
Adds a name for a tab...
r198 struct VisualizationTabWidget::VisualizationTabWidgetPrivate {
explicit VisualizationTabWidgetPrivate(const QString &name) : m_Name{name} {}
Add the visualization gui classes
r118
Alexandre Leroux
Adds a name for a tab...
r198 QString m_Name;
};
VisualizationTabWidget::VisualizationTabWidget(const QString &name, QWidget *parent)
: QWidget{parent},
ui{new Ui::VisualizationTabWidget},
impl{spimpl::make_unique_impl<VisualizationTabWidgetPrivate>(name)}
Creation of VisualizationWidget, VizualizationTabWidget, VisualizationZoneWidget, VisualizationGraphWidget
r58 {
ui->setupUi(this);
}
VisualizationTabWidget::~VisualizationTabWidget()
{
delete ui;
}
Add the visualization gui classes
r118
void VisualizationTabWidget::addZone(VisualizationZoneWidget *zoneWidget)
{
this->layout()->addWidget(zoneWidget);
}
VisualizationZoneWidget *VisualizationTabWidget::createZone()
{
add {} missing
r120 auto zoneWidget = new VisualizationZoneWidget{this};
Add the visualization gui classes
r118 this->addZone(zoneWidget);
return zoneWidget;
}
void VisualizationTabWidget::removeZone(VisualizationZoneWidget *zone)
{
}
void VisualizationTabWidget::accept(IVisualizationWidget *visitor)
{
// TODO: manage the visitor
}
void VisualizationTabWidget::close()
{
// The main view cannot be directly closed.
return;
}
Add const and override
r119 QString VisualizationTabWidget::name() const
Add the visualization gui classes
r118 {
Alexandre Leroux
Adds a name for a tab...
r198 return impl->m_Name;
Add the visualization gui classes
r118 }