##// END OF EJS Templates
Creates the slot to display the created variable in the Visualization widget...
Alexandre Leroux -
r162:81ea5016bbcd
parent child
Show More
@@ -27,6 +27,8
27 #include <SidePane/SqpSidePane.h>
27 #include <SidePane/SqpSidePane.h>
28 #include <SqpApplication.h>
28 #include <SqpApplication.h>
29 #include <TimeWidget/TimeWidget.h>
29 #include <TimeWidget/TimeWidget.h>
30 #include <Variable/Variable.h>
31 #include <Visualization/VisualizationController.h>
30
32
31 #include <QAction>
33 #include <QAction>
32 #include <QDate>
34 #include <QDate>
@@ -172,6 +174,10 MainWindow::MainWindow(QWidget *parent)
172 connect(&sqpApp->dataSourceController(), SIGNAL(dataSourceItemSet(DataSourceItem *)),
174 connect(&sqpApp->dataSourceController(), SIGNAL(dataSourceItemSet(DataSourceItem *)),
173 m_Ui->dataSourceWidget, SLOT(addDataSource(DataSourceItem *)));
175 m_Ui->dataSourceWidget, SLOT(addDataSource(DataSourceItem *)));
174
176
177 qRegisterMetaType<std::shared_ptr<Variable> >();
178 connect(&sqpApp->visualizationController(), SIGNAL(variableCreated(std::shared_ptr<Variable>)),
179 m_Ui->view, SLOT(displayVariable(std::shared_ptr<Variable>)));
180
175 /* QLopGUI::registerMenuBar(menuBar());
181 /* QLopGUI::registerMenuBar(menuBar());
176 this->setWindowIcon(QIcon(":/sciqlopLOGO.svg"));
182 this->setWindowIcon(QIcon(":/sciqlopLOGO.svg"));
177 this->m_progressWidget = new QWidget();
183 this->m_progressWidget = new QWidget();
@@ -6,6 +6,7
6 #include <QLoggingCategory>
6 #include <QLoggingCategory>
7 #include <QWidget>
7 #include <QWidget>
8
8
9 class Variable;
9 class VisualizationTabWidget;
10 class VisualizationTabWidget;
10
11
11 Q_DECLARE_LOGGING_CATEGORY(LOG_VisualizationWidget)
12 Q_DECLARE_LOGGING_CATEGORY(LOG_VisualizationWidget)
@@ -35,6 +36,15 public:
35 void close() override;
36 void close() override;
36 QString name() const;
37 QString name() const;
37
38
39 public slots:
40 /**
41 * Displays a variable in a new graph of a new zone of the current tab
42 * @param variable the variable to display
43 * @todo this is a temporary method that will be replaced by own actions for each type of
44 * visualization widget
45 */
46 void displayVariable(std::shared_ptr<Variable> variable) noexcept;
47
38 private:
48 private:
39 Ui::VisualizationWidget *ui;
49 Ui::VisualizationWidget *ui;
40 };
50 };
@@ -78,3 +78,8 QString VisualizationWidget::name() const
78 {
78 {
79 return QStringLiteral("MainView");
79 return QStringLiteral("MainView");
80 }
80 }
81
82 void VisualizationWidget::displayVariable(std::shared_ptr<Variable> variable) noexcept
83 {
84 /// @todo ALX : add variable in a new graph
85 }
General Comments 0
You need to be logged in to leave comments. Login now