Merged in f5soh/librepilot/update_credits (pull request #529)
[librepilot.git] / ground / gcs / src / plugins / coreplugin / coreimpl.h
blobcdb4effbde7f32218aa9f27e4f9ee00058c4a721
1 /**
2 ******************************************************************************
4 * @file coreimpl.h
5 * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
6 * Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009.
7 * @addtogroup GCSPlugins GCS Plugins
8 * @{
9 * @addtogroup CorePlugin Core Plugin
10 * @{
11 * @brief The Core GCS plugin
12 *****************************************************************************/
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 3 of the License, or
17 * (at your option) any later version.
19 * This program is distributed in the hope that it will be useful, but
20 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
21 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 * for more details.
24 * You should have received a copy of the GNU General Public License along
25 * with this program; if not, write to the Free Software Foundation, Inc.,
26 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 #ifndef COREIMPL_H
30 #define COREIMPL_H
32 #include "icore.h"
33 #include "mainwindow.h"
35 namespace Core {
36 namespace Internal {
37 class CoreImpl : public ICore {
38 Q_OBJECT
40 public:
41 CoreImpl(MainWindow *mainwindow);
42 ~CoreImpl() {}
44 bool showOptionsDialog(const QString &group = QString(),
45 const QString &page = QString(),
46 QWidget *parent = 0);
47 bool showWarningWithOptions(const QString &title, const QString &text,
48 const QString &details = QString(),
49 const QString &settingsCategory = QString(),
50 const QString &settingsId = QString(),
51 QWidget *parent = 0);
53 ActionManager *actionManager() const;
54 UniqueIDManager *uniqueIDManager() const;
55 MessageManager *messageManager() const;
56 ConnectionManager *connectionManager() const;
57 UAVGadgetInstanceManager *uavGadgetInstanceManager() const;
58 VariableManager *variableManager() const;
59 ThreadManager *threadManager() const;
60 ModeManager *modeManager() const;
61 MimeDatabase *mimeDatabase() const;
63 SettingsDatabase *settingsDatabase() const;
65 void readMainSettings(QSettings &settings, bool workspaceDiffOnly);
66 void saveMainSettings(QSettings &settings) const;
67 void readSettings(IConfigurablePlugin *plugin);
68 void saveSettings(IConfigurablePlugin *plugin) const;
69 void readSettings(IConfigurablePlugin *plugin, QSettings &settings);
70 void saveSettings(IConfigurablePlugin *plugin, QSettings &settings) const;
71 void deleteSettings();
73 QString resourcePath() const;
75 IContext *currentContextObject() const;
77 QMainWindow *mainWindow() const;
79 // adds and removes additional active contexts, this context is appended to the
80 // currently active contexts. call updateContext after changing
81 void addAdditionalContext(int context);
82 void removeAdditionalContext(int context);
83 bool hasContext(int context) const;
84 void addContextObject(IContext *contex);
85 void removeContextObject(IContext *contex);
87 void updateContext();
89 void openFiles(const QStringList &fileNames);
91 private:
92 MainWindow *m_mainwindow;
93 friend class MainWindow;
95 } // namespace Internal
96 } // namespace Core
98 #endif // COREIMPL_H