##// END OF EJS Templates
Defines actions for a data source items...
Defines actions for a data source items DataSourceItemAction is an object that will be connected to a QAction. When the QAction will be triggered, the DataSourceItemAction will be executed

File last commit:

r116:b680d9f3a133
r144:7a9a79ed3b02
Show More
SqpApplication.cpp
91 lines | 3.3 KiB | text/x-c | CppLexer
/ gui / src / SqpApplication.cpp
Initialisation de l'application multithread avec le spimpl....
r21 #include "SqpApplication.h"
#include <DataSource/DataSourceController.h>
#include <QThread>
Alexandre Leroux
Inits variable controller and adds it to the SciQlop app
r111 #include <Variable/VariableController.h>
Add the visualization controller
r53 #include <Visualization/VisualizationController.h>
Initialisation de l'application multithread avec le spimpl....
r21
Q_LOGGING_CATEGORY(LOG_SqpApplication, "SqpApplication")
class SqpApplication::SqpApplicationPrivate {
public:
add missing visualization thread call
r55 SqpApplicationPrivate()
: m_DataSourceController{std::make_unique<DataSourceController>()},
Alexandre Leroux
Inits variable controller and adds it to the SciQlop app
r111 m_VariableController{std::make_unique<VariableController>()},
add missing visualization thread call
r55 m_VisualizationController{std::make_unique<VisualizationController>()}
Alexandre Leroux
Minor fixes...
r32 {
m_DataSourceController->moveToThread(&m_DataSourceControllerThread);
Alexandre Leroux
Inits variable controller and adds it to the SciQlop app
r111 m_VariableController->moveToThread(&m_VariableControllerThread);
add missing visualization thread call
r55 m_VisualizationController->moveToThread(&m_VisualizationControllerThread);
Alexandre Leroux
Minor fixes...
r32 }
Ajout des règles vera++
r24 virtual ~SqpApplicationPrivate()
Ajout de la méthode wait pour éviter de détruire un thread en cours...
r22 {
Alexandre Leroux
Minor fixes...
r32 qCInfo(LOG_SqpApplication()) << tr("SqpApplicationPrivate destruction");
Ajout de la méthode wait pour éviter de détruire un thread en cours...
r22 m_DataSourceControllerThread.quit();
m_DataSourceControllerThread.wait();
Add the visualization controller
r53
Alexandre Leroux
Inits variable controller and adds it to the SciQlop app
r111 m_VariableControllerThread.quit();
m_VariableControllerThread.wait();
add missing visualization thread call
r55 m_VisualizationControllerThread.quit();
m_VisualizationControllerThread.wait();
Ajout de la méthode wait pour éviter de détruire un thread en cours...
r22 }
Initialisation de l'application multithread avec le spimpl....
r21
std::unique_ptr<DataSourceController> m_DataSourceController;
Alexandre Leroux
Inits variable controller and adds it to the SciQlop app
r111 std::unique_ptr<VariableController> m_VariableController;
Add the visualization controller
r53 std::unique_ptr<VisualizationController> m_VisualizationController;
Initialisation de l'application multithread avec le spimpl....
r21 QThread m_DataSourceControllerThread;
Alexandre Leroux
Inits variable controller and adds it to the SciQlop app
r111 QThread m_VariableControllerThread;
add missing visualization thread call
r55 QThread m_VisualizationControllerThread;
Initialisation de l'application multithread avec le spimpl....
r21 };
SqpApplication::SqpApplication(int &argc, char **argv)
Alexandre Leroux
Minor fixes...
r32 : QApplication{argc, argv}, impl{spimpl::make_unique_impl<SqpApplicationPrivate>()}
Initialisation de l'application multithread avec le spimpl....
r21 {
Alexandre Leroux
Minor fixes...
r32 qCInfo(LOG_SqpApplication()) << tr("SqpApplication construction");
Initialisation de l'application multithread avec le spimpl....
r21
connect(&impl->m_DataSourceControllerThread, &QThread::started,
impl->m_DataSourceController.get(), &DataSourceController::initialize);
connect(&impl->m_DataSourceControllerThread, &QThread::finished,
impl->m_DataSourceController.get(), &DataSourceController::finalize);
Alexandre Leroux
Inits variable controller and adds it to the SciQlop app
r111 connect(&impl->m_VariableControllerThread, &QThread::started, impl->m_VariableController.get(),
&VariableController::initialize);
connect(&impl->m_VariableControllerThread, &QThread::finished, impl->m_VariableController.get(),
&VariableController::finalize);
add missing visualization thread call
r55 connect(&impl->m_VisualizationControllerThread, &QThread::started,
impl->m_VisualizationController.get(), &VisualizationController::initialize);
connect(&impl->m_VisualizationControllerThread, &QThread::finished,
impl->m_VisualizationController.get(), &VisualizationController::finalize);
Add the visualization controller
r53
Initialisation de l'application multithread avec le spimpl....
r21 impl->m_DataSourceControllerThread.start();
Alexandre Leroux
Inits variable controller and adds it to the SciQlop app
r111 impl->m_VariableControllerThread.start();
add missing visualization thread call
r55 impl->m_VisualizationControllerThread.start();
Initialisation de l'application multithread avec le spimpl....
r21 }
SqpApplication::~SqpApplication()
{
}
void SqpApplication::initialize()
{
}
Alexandre Leroux
Add access to DataSourceController from SqpApplication
r33
Alexandre Leroux
Make access to controllers non-const (maybe the controller will be modified)
r116 DataSourceController &SqpApplication::dataSourceController() noexcept
Alexandre Leroux
Add access to DataSourceController from SqpApplication
r33 {
return *impl->m_DataSourceController;
}
Add the visualization controller
r53
Alexandre Leroux
Make access to controllers non-const (maybe the controller will be modified)
r116 VariableController &SqpApplication::variableController() noexcept
Alexandre Leroux
Inits variable controller and adds it to the SciQlop app
r111 {
return *impl->m_VariableController;
}
Alexandre Leroux
Make access to controllers non-const (maybe the controller will be modified)
r116 VisualizationController &SqpApplication::visualizationController() noexcept
Add the visualization controller
r53 {
return *impl->m_VisualizationController;
}