##// END OF EJS Templates
Sets the name of the plugin for products and components...
Sets the name of the plugin for products and components Since there is only one common root in the data source widget, it is no longer possible to retrieve on the fly the name of the plugin in which a component or product is located. This name is therefore attached to their creation.

File last commit:

r1000:e2eaf1b200e7
r1076:9c3bb5e93c54
Show More
SqpApplication.h
67 lines | 2.2 KiB | text/x-c | CLexer
#ifndef SCIQLOP_SQPAPPLICATION_H
#define SCIQLOP_SQPAPPLICATION_H
#include "SqpApplication.h"
#include <QApplication>
#include <QLoggingCategory>
#include <Common/spimpl.h>
Q_DECLARE_LOGGING_CATEGORY(LOG_SqpApplication)
#if defined(sqpApp)
#undef sqpApp
#endif
#define sqpApp (static_cast<SqpApplication *>(QCoreApplication::instance()))
class DataSourceController;
class NetworkController;
class TimeController;
class VariableController;
class VisualizationController;
class DragDropHelper;
/**
* @brief The SqpApplication class aims to make the link between SciQlop
* and its plugins. This is the intermediate class that SciQlop has to use
* in the way to connect a data source. Please first use load method to initialize
* a plugin specified by its metadata name (JSON plugin source) then others specifics
* method will be able to access it.
* You can load a data source driver plugin then create a data source.
*/
class SqpApplication : public QApplication {
Q_OBJECT
public:
explicit SqpApplication(int &argc, char **argv);
virtual ~SqpApplication();
void initialize();
/// Accessors for the differents sciqlop controllers
DataSourceController &dataSourceController() noexcept;
NetworkController &networkController() noexcept;
TimeController &timeController() noexcept;
VariableController &variableController() noexcept;
VisualizationController &visualizationController() noexcept;
/// Accessors for the differents sciqlop helpers, these helpers classes are like controllers but
/// doesn't live in a thread and access gui
DragDropHelper &dragDropHelper() noexcept;
enum class PlotsInteractionMode { None, ZoomBox, DragAndDrop, SelectionZones };
enum class PlotsCursorMode { NoCursor, Vertical, Temporal, Horizontal, Cross };
PlotsInteractionMode plotsInteractionMode() const;
void setPlotsInteractionMode(PlotsInteractionMode mode);
PlotsCursorMode plotsCursorMode() const;
void setPlotsCursorMode(PlotsCursorMode mode);
private:
class SqpApplicationPrivate;
spimpl::unique_impl_ptr<SqpApplicationPrivate> impl;
};
#endif // SCIQLOP_SQPAPPLICATION_H