VisualizationGraphWidget.cpp
47 lines
| 1.1 KiB
| text/x-c
|
CppLexer
r95 | #include "Visualization/VisualizationGraphWidget.h" | |||
r58 | #include "ui_VisualizationGraphWidget.h" | |||
r118 | #include <Variable/Variable.h> | |||
#include <unordered_map> | ||||
struct VisualizationGraphWidget::VisualizationGraphWidgetPrivate { | ||||
// 1 variable -> n qcpplot | ||||
std::unordered_map<std::shared_ptr<Variable>, std::unique_ptr<QCPAbstractPlottable> > | ||||
m_VariableToPlotMap; | ||||
}; | ||||
r58 | VisualizationGraphWidget::VisualizationGraphWidget(QWidget *parent) | |||
r120 | : QWidget{parent}, | |||
ui{new Ui::VisualizationGraphWidget}, | ||||
r118 | impl{spimpl::make_unique_impl<VisualizationGraphWidgetPrivate>()} | |||
r58 | { | |||
ui->setupUi(this); | ||||
} | ||||
VisualizationGraphWidget::~VisualizationGraphWidget() | ||||
{ | ||||
delete ui; | ||||
} | ||||
r118 | ||||
void VisualizationGraphWidget::addVariable(std::shared_ptr<Variable> variable) | ||||
{ | ||||
// todo: first check is variable contains data then check how many plot have to be created | ||||
} | ||||
void VisualizationGraphWidget::accept(IVisualizationWidget *visitor) | ||||
{ | ||||
// TODO: manage the visitor | ||||
} | ||||
void VisualizationGraphWidget::close() | ||||
{ | ||||
// The main view cannot be directly closed. | ||||
return; | ||||
} | ||||
r119 | QString VisualizationGraphWidget::name() const | |||
r118 | { | |||
return QStringLiteral("MainView"); | ||||
} | ||||