##// END OF EJS Templates
Partly reimplemented Graph event handling + bugfix...
Partly reimplemented Graph event handling + bugfix - Now pure UX scroll doesn't affect variable delta T - Now all events are captured by VisualizationGraphWidget(VGW) this avoid that QCP intercept them then FW them to VGW which interact back with QCP - Non transformation events a broken for now - Added keyboard navigation Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>

File last commit:

r1351:d755f1f0a484
r1362:0033c08c242f Pybind11
Show More
SqpApplication.cpp
196 lines | 6.8 KiB | text/x-c | CppLexer
/ gui / src / SqpApplication.cpp
Initialisation de l'application multithread avec le spimpl....
r21 #include "SqpApplication.h"
Adds a a gui controller class to manage global actions across the application.
r1076 #include <Actions/ActionsGuiController.h>
Thibaud Rabillard
Fix wrong merge
r1087 #include <Catalogue/CatalogueController.h>
Alexandre Leroux
Makes the connection between Data source controller and Variable controller...
r169 #include <Data/IDataProvider.h>
Initialisation de l'application multithread avec le spimpl....
r21 #include <DataSource/DataSourceController.h>
Rename "DragDropHelper" in "DragDropGuiController"
r1075 #include <DragAndDrop/DragDropGuiController.h>
Intialization of network controller
r339 #include <Network/NetworkController.h>
Initialisation de l'application multithread avec le spimpl....
r21 #include <QThread>
Time widget is now used with the variable createion request
r193 #include <Time/TimeController.h>
Alexandre Leroux
Makes the connection between Variable controller and Visualization controller...
r170 #include <Variable/Variable.h>
All the codebase is modified to build with new Variable Controller...
r1348 #include <Variable/VariableController2.h>
#include <Variable/VariableModel2.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()
All the codebase is modified to build with new Variable Controller...
r1348 : m_VariableController{std::make_shared<VariableController2>()},
Toolbar for interactions modes
r957 m_PlotInterractionMode(SqpApplication::PlotsInteractionMode::None),
m_PlotCursorMode(SqpApplication::PlotsCursorMode::NoCursor)
Alexandre Leroux
Minor fixes...
r32 {
Alexandre Leroux
Makes the connection between Data source controller and Variable controller...
r169 // /////////////////////////////// //
// Connections between controllers //
// /////////////////////////////// //
// VariableController <-> DataSourceController
All the codebase is modified to build with new Variable Controller...
r1348 connect(&m_DataSourceController,
Ported Mock plugin to new IDataProvider interface compatible with...
r1350 &DataSourceController::createVariable,[](const QString &variableName,
const QVariantHash &variableMetadata,
std::shared_ptr<IDataProvider> variableProvider)
{
sqpApp->variableController().createVariable(variableName,variableMetadata,variableProvider,sqpApp->timeController().dateTime());
});
Alexandre Leroux
Makes the connection between Data source controller and Variable controller...
r169
Alexandre Leroux
Makes the connection between Variable controller and Visualization controller...
r170 // VariableController <-> VisualizationController
All the codebase is modified to build with new Variable Controller...
r1348 // connect(m_VariableController.get(),
// SIGNAL(variableAboutToBeDeleted(std::shared_ptr<Variable>)),
// m_VisualizationController.get(),
// SIGNAL(variableAboutToBeDeleted(std::shared_ptr<Variable>)), Qt::DirectConnection);
Alexandre Leroux
Makes the connection between Variable controller and Visualization controller...
r170
All the codebase is modified to build with new Variable Controller...
r1348 // connect(m_VariableController.get(),
// SIGNAL(rangeChanged(std::shared_ptr<Variable>, const DateTimeRange &)),
// m_VisualizationController.get(),
// SIGNAL(rangeChanged(std::shared_ptr<Variable>, const DateTimeRange &)));
Add connection logical for the rescale operation
r437
Time widget is now used with the variable createion request
r193
All the codebase is modified to build with new Variable Controller...
r1348 m_DataSourceController.moveToThread(&m_DataSourceControllerThread);
Add a name for all thread
r429 m_DataSourceControllerThread.setObjectName("DataSourceControllerThread");
All the codebase is modified to build with new Variable Controller...
r1348 m_NetworkController.moveToThread(&m_NetworkControllerThread);
Add a name for all thread
r429 m_NetworkControllerThread.setObjectName("NetworkControllerThread");
All the codebase is modified to build with new Variable Controller...
r1348 m_VisualizationController.moveToThread(&m_VisualizationControllerThread);
Add a name for all thread
r429 m_VisualizationControllerThread.setObjectName("VsualizationControllerThread");
Merge branch 'feature/NetworkController' into develop...
r374
Time widget is now used with the variable createion request
r193 // Additionnal init
Some WIP refactoring, trying to remove TimeController object...
r1345 //m_VariableController->setTimeController(m_TimeController.get());
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 {
m_DataSourceControllerThread.quit();
m_DataSourceControllerThread.wait();
Add the visualization controller
r53
Intialization of network controller
r339 m_NetworkControllerThread.quit();
m_NetworkControllerThread.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
All the codebase is modified to build with new Variable Controller...
r1348 DataSourceController m_DataSourceController;
std::shared_ptr<VariableController2> m_VariableController;
TimeController m_TimeController;
NetworkController m_NetworkController;
VisualizationController m_VisualizationController;
CatalogueController m_CatalogueController;
Adds a a gui controller class to manage global actions across the application.
r1076
Initialisation de l'application multithread avec le spimpl....
r21 QThread m_DataSourceControllerThread;
Intialization of network controller
r339 QThread m_NetworkControllerThread;
add missing visualization thread call
r55 QThread m_VisualizationControllerThread;
New helper class for the drag&drop
r837
All the codebase is modified to build with new Variable Controller...
r1348 DragDropGuiController m_DragDropGuiController;
ActionsGuiController m_ActionsGuiController;
Toolbar for interactions modes
r957
SqpApplication::PlotsInteractionMode m_PlotInterractionMode;
SqpApplication::PlotsCursorMode m_PlotCursorMode;
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 {
Implement the network controller to permit the execution of a request...
r389 qCDebug(LOG_SqpApplication()) << tr("SqpApplication construction") << QThread::currentThread();
Initialisation de l'application multithread avec le spimpl....
r21
Add Qt::AA_EnableHighDpiScaling and QCP::phFastPolylines
r1320 QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
Initialisation de l'application multithread avec le spimpl....
r21 connect(&impl->m_DataSourceControllerThread, &QThread::started,
All the codebase is modified to build with new Variable Controller...
r1348 &impl->m_DataSourceController, &DataSourceController::initialize);
Initialisation de l'application multithread avec le spimpl....
r21 connect(&impl->m_DataSourceControllerThread, &QThread::finished,
All the codebase is modified to build with new Variable Controller...
r1348 &impl->m_DataSourceController, &DataSourceController::finalize);
Initialisation de l'application multithread avec le spimpl....
r21
All the codebase is modified to build with new Variable Controller...
r1348 connect(&impl->m_NetworkControllerThread, &QThread::started, &impl->m_NetworkController,
Intialization of network controller
r339 &NetworkController::initialize);
All the codebase is modified to build with new Variable Controller...
r1348 connect(&impl->m_NetworkControllerThread, &QThread::finished, &impl->m_NetworkController,
Intialization of network controller
r339 &NetworkController::finalize);
add missing visualization thread call
r55 connect(&impl->m_VisualizationControllerThread, &QThread::started,
All the codebase is modified to build with new Variable Controller...
r1348 &impl->m_VisualizationController, &VisualizationController::initialize);
add missing visualization thread call
r55 connect(&impl->m_VisualizationControllerThread, &QThread::finished,
All the codebase is modified to build with new Variable Controller...
r1348 &impl->m_VisualizationController, &VisualizationController::finalize);
Add the visualization controller
r53
Initialisation de l'application multithread avec le spimpl....
r21 impl->m_DataSourceControllerThread.start();
Intialization of network controller
r339 impl->m_NetworkControllerThread.start();
add missing visualization thread call
r55 impl->m_VisualizationControllerThread.start();
All the codebase is modified to build with new Variable Controller...
r1348 impl->m_CatalogueController.initialize();
Initialisation de l'application multithread avec le spimpl....
r21 }
MR for linux compilation
r845 SqpApplication::~SqpApplication()
{
}
Initialisation de l'application multithread avec le spimpl....
r21
MR for linux compilation
r845 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 {
All the codebase is modified to build with new Variable Controller...
r1348 return impl->m_DataSourceController;
Alexandre Leroux
Add access to DataSourceController from SqpApplication
r33 }
Add the visualization controller
r53
Intialization of network controller
r339 NetworkController &SqpApplication::networkController() noexcept
{
All the codebase is modified to build with new Variable Controller...
r1348 return impl->m_NetworkController;
Intialization of network controller
r339 }
Time widget is now used with the variable createion request
r193 TimeController &SqpApplication::timeController() noexcept
{
All the codebase is modified to build with new Variable Controller...
r1348 return impl->m_TimeController;
Time widget is now used with the variable createion request
r193 }
All the codebase is modified to build with new Variable Controller...
r1348 VariableController2 &SqpApplication::variableController() noexcept
Alexandre Leroux
Inits variable controller and adds it to the SciQlop app
r111 {
return *impl->m_VariableController;
}
All the codebase is modified to build with new Variable Controller...
r1348 std::shared_ptr<VariableController2> SqpApplication::variableControllerOwner() noexcept
{
return impl->m_VariableController;
}
//VariableModel2 &SqpApplication::variableModel() noexcept
//{
// return impl->m_VariableModel;
//}
Alexandre Leroux
Make access to controllers non-const (maybe the controller will be modified)
r116 VisualizationController &SqpApplication::visualizationController() noexcept
Add the visualization controller
r53 {
All the codebase is modified to build with new Variable Controller...
r1348 return impl->m_VisualizationController;
Add the visualization controller
r53 }
New helper class for the drag&drop
r837
Add catalogue controller to SqpApplication
r1144 CatalogueController &SqpApplication::catalogueController() noexcept
{
All the codebase is modified to build with new Variable Controller...
r1348 return impl->m_CatalogueController;
Add catalogue controller to SqpApplication
r1144 }
Rename "DragDropHelper" in "DragDropGuiController"
r1075 DragDropGuiController &SqpApplication::dragDropGuiController() noexcept
New helper class for the drag&drop
r837 {
All the codebase is modified to build with new Variable Controller...
r1348 return impl->m_DragDropGuiController;
New helper class for the drag&drop
r837 }
Toolbar for interactions modes
r957
Adds a a gui controller class to manage global actions across the application.
r1076 ActionsGuiController &SqpApplication::actionsGuiController() noexcept
{
All the codebase is modified to build with new Variable Controller...
r1348 return impl->m_ActionsGuiController;
Adds a a gui controller class to manage global actions across the application.
r1076 }
Toolbar for interactions modes
r957 SqpApplication::PlotsInteractionMode SqpApplication::plotsInteractionMode() const
{
return impl->m_PlotInterractionMode;
}
void SqpApplication::setPlotsInteractionMode(SqpApplication::PlotsInteractionMode mode)
{
impl->m_PlotInterractionMode = mode;
}
SqpApplication::PlotsCursorMode SqpApplication::plotsCursorMode() const
{
return impl->m_PlotCursorMode;
}
void SqpApplication::setPlotsCursorMode(SqpApplication::PlotsCursorMode mode)
{
impl->m_PlotCursorMode = mode;
}