31 #include <QtCore/QDir>
32 #include <QtCore/QCoreApplication>
38 static CoreImpl *m_instance =
nullptr;
44 using namespace Core::Internal;
54 m_mainwindow = mainwindow;
99 return m_mainwindow->
settings(scope);
103 #define SHARE_PATH "/../Resources"
105 #define SHARE_PATH "/../share"
110 return QDir::cleanPath(QCoreApplication::applicationDirPath() + QLatin1String(SHARE_PATH));
GlobalMessaging * globalMessaging() const
void addContextObject(IContext *contex)
Registers an additional context object.
ModeManager * modeManager() const
Returns the application's mode manager.
void openFiles(const QStringList &fileNames)
Open all files from a list of fileNames like it would be done if they were given to the GCS on the co...
void removeAdditionalContext(int context)
Removes the given context from the list of currently active contexts.
bool hasContext(int context) const
Returns if the given context is currently one of the active contexts.
UniqueIDManager * uniqueIDManager() const
Returns the application's id manager.
Core::GlobalMessaging * globalMessaging() const
void addAdditionalContext(int context)
Register additional context to be currently active.
UAVGadgetInstanceManager * uavGadgetInstanceManager() const
The ICore class allows access to the different part that make up the basic functionality of the GCS...
void removeContextObject(IContext *contex)
Unregisters a context object from the list of know contexts.
void addAdditionalContext(int context)
bool hasContext(int context) const
void saveMainSettings(QSettings *qs)
IContext * currentContextObject() const
QMainWindow * mainWindow() const
Returns the main application window.
void saveSettings(QSettings *qs=nullptr)
ActionManager * actionManager() const
Returns the application's action manager.
Core::ModeManager * modeManager() const
UAVGadgetInstanceManager * uavGadgetInstanceManager() const
void saveSettings(IConfigurablePlugin *plugin, QSettings *qs=nullptr)
static ICore * instance()
Core::BoardManager * boardManager() const
QSettings * settings(QSettings::Scope scope=QSettings::UserScope) const
Returns the application's main settings object.
void readSettings(IConfigurablePlugin *plugin, QSettings *qs=nullptr)
bool showOptionsDialog(const QString &group=QString(), const QString &page=QString(), QWidget *parent=nullptr)
Opens the application options/preferences dialog with preselected page in a specified group...
bool showOptionsDialog(const QString &category=QString(), const QString &page=QString(), QWidget *parent=nullptr)
Core::ConnectionManager * connectionManager() const
void readSettings(QSettings *qs=nullptr, bool workspaceDiffOnly=false)
The action manager is responsible for registration of menus and menu items and keyboard shortcuts...
CoreImpl(MainWindow *mainwindow)
BoardManager * boardManager() const
void updateContext()
Update the list of active contexts after adding or removing additional ones.
QSettings * settings(QSettings::Scope scope) const
void readMainSettings(QSettings *qs, bool workspaceDiffOnly)
Core::UniqueIDManager * uniqueIDManager() const
void addContextObject(IContext *contex)
void removeContextObject(IContext *contex)
ConnectionManager * connectionManager() const
void removeAdditionalContext(int context)
Core::ActionManager * actionManager() const
IContext * currentContextObject() const
Returns the context object of the current main context.
QString resourcePath() const
Returns the absolute path that is used for resources like project templates and the debugger macros...