LP-56 - Better txpid option namings, fix tabs-spaces, tooltips. headers, variable...
[librepilot.git] / ground / openpilotgcs / src / plugins / coreplugin / coreimpl.h
blob671c248a2478ea278e202be5c0bc866aee736a9a
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 QSettings *settings(QSettings::Scope scope = QSettings::UserScope) const;
64 SettingsDatabase *settingsDatabase() const;
65 void readMainSettings(QSettings *qs, bool workspaceDiffOnly);
66 void saveMainSettings(QSettings *qs);
67 void readSettings(IConfigurablePlugin *plugin, QSettings *qs = 0);
68 void saveSettings(IConfigurablePlugin *plugin, QSettings *qs = 0);
69 void deleteSettings();
71 QString resourcePath() const;
73 IContext *currentContextObject() const;
75 QMainWindow *mainWindow() const;
77 // adds and removes additional active contexts, this context is appended to the
78 // currently active contexts. call updateContext after changing
79 void addAdditionalContext(int context);
80 void removeAdditionalContext(int context);
81 bool hasContext(int context) const;
82 void addContextObject(IContext *contex);
83 void removeContextObject(IContext *contex);
85 void updateContext();
87 void openFiles(const QStringList &fileNames);
89 private:
90 MainWindow *m_mainwindow;
91 friend class MainWindow;
93 } // namespace Internal
94 } // namespace Core
96 #endif // COREIMPL_H