dRonin  adbada4
dRonin GCS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
configplugin.h
Go to the documentation of this file.
1 
12 /*
13  * This program is free software; you can redistribute it and/or modify
14  * it under the terms of the GNU General Public License as published by
15  * the Free Software Foundation; either version 3 of the License, or
16  * (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful, but
19  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
20  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  * for more details.
22  *
23  * You should have received a copy of the GNU General Public License along
24  * with this program; if not, see <http://www.gnu.org/licenses/>
25  */
26 #ifndef CONFIGPLUGIN_H
27 #define CONFIGPLUGIN_H
28 
30 #include <coreplugin/icore.h>
34 #include "objectpersistence.h"
35 #include "config_global.h"
36 
37 #include <QMessageBox>
38 
40 
41 class CONFIG_EXPORT ConfigPlugin : public ExtensionSystem::IPlugin
42 {
43  Q_OBJECT
44  Q_PLUGIN_METADATA(IID "org.dronin.plugins.Config")
45 
46 public:
47  ConfigPlugin();
48  ~ConfigPlugin();
49 
50  UAVObjectManager *getObjectManager();
51  void extensionsInitialized();
52  bool initialize(const QStringList &arguments, QString *errorString);
53  void shutdown();
54 
55 signals:
56  void launchSetupWizard();
57 
58 private slots:
59  void eraseAllSettings();
60  void onAutopilotConnect();
61  void onAutopilotDisconnect();
62  void eraseDone(UAVObject *);
63  void eraseFailed();
64 
65 private:
67  Core::Command *cmd;
68  bool settingsErased;
69 
70  static const int FLASH_ERASE_TIMEOUT_MS = 45000;
71 };
72 
73 #endif // CONFIGPLUGIN_H
virtual void extensionsInitialized()=0
virtual bool initialize(const QStringList &arguments, QString *errorString)=0
The class Command represents an action like a menu item, tool button, or shortcut. You don't create Command objects directly, instead use {ActionManager::registerAction()} to register an action and retrieve a Command. The Command object represents the user visible action and its properties. If multiple actions are registered with the same ID (but different contexts) the returned Command is the shared one between these actions.
Definition: command.h:43
Base class for all plugins.
Definition: iplugin.h:45
virtual void shutdown()
Definition: iplugin.h:55