From d8ce755cfdd73c976a9359dc6b7b77b913bac301 Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Sat, 2 Feb 2013 15:58:47 +0100 Subject: [PATCH 01/12] OP-833 gcs options dialog polishing: - increased width of splitter handle from default (6) to 9 - removed bottom Line widget --- .../src/plugins/coreplugin/dialogs/settingsdialog.ui | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/coreplugin/dialogs/settingsdialog.ui b/ground/openpilotgcs/src/plugins/coreplugin/dialogs/settingsdialog.ui index aad114f84..a51d7dee0 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/dialogs/settingsdialog.ui +++ b/ground/openpilotgcs/src/plugins/coreplugin/dialogs/settingsdialog.ui @@ -25,6 +25,9 @@ Qt::Horizontal + + 9 + @@ -59,13 +62,6 @@ - - - - Qt::Horizontal - - - From 96651e302a0beff5963edbce2f1aaea72b886b0e Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Sat, 2 Feb 2013 16:03:54 +0100 Subject: [PATCH 02/12] OP-833 gcs options dialog polishing: zeroed margin of top level widget --- .../plugins/coreplugin/dialogs/shortcutsettings.ui | 3 +++ .../src/plugins/coreplugin/generalsettings.ui | 3 +++ .../src/plugins/coreplugin/uavgadgetoptionspage.ui | 3 +++ .../src/plugins/coreplugin/workspacesettings.ui | 13 ++----------- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/coreplugin/dialogs/shortcutsettings.ui b/ground/openpilotgcs/src/plugins/coreplugin/dialogs/shortcutsettings.ui index 2bfd9bcfa..61eeaf951 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/dialogs/shortcutsettings.ui +++ b/ground/openpilotgcs/src/plugins/coreplugin/dialogs/shortcutsettings.ui @@ -11,6 +11,9 @@ + + 0 + diff --git a/ground/openpilotgcs/src/plugins/coreplugin/generalsettings.ui b/ground/openpilotgcs/src/plugins/coreplugin/generalsettings.ui index 8861aa752..6eda799c1 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/generalsettings.ui +++ b/ground/openpilotgcs/src/plugins/coreplugin/generalsettings.ui @@ -11,6 +11,9 @@ + + 0 + diff --git a/ground/openpilotgcs/src/plugins/coreplugin/uavgadgetoptionspage.ui b/ground/openpilotgcs/src/plugins/coreplugin/uavgadgetoptionspage.ui index 6aa3765c1..17ed44812 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/uavgadgetoptionspage.ui +++ b/ground/openpilotgcs/src/plugins/coreplugin/uavgadgetoptionspage.ui @@ -20,6 +20,9 @@ + + 0 + diff --git a/ground/openpilotgcs/src/plugins/coreplugin/workspacesettings.ui b/ground/openpilotgcs/src/plugins/coreplugin/workspacesettings.ui index 1c98fa4c2..3287e88d8 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/workspacesettings.ui +++ b/ground/openpilotgcs/src/plugins/coreplugin/workspacesettings.ui @@ -20,16 +20,7 @@ Form - - 12 - - - 0 - - - 12 - - + 0 @@ -48,7 +39,7 @@ 0 0 - 444 + 468 436 From 03ca63978b5795504420c7d668ce97fabd5c3b64 Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Sat, 2 Feb 2013 16:06:13 +0100 Subject: [PATCH 03/12] OP-833 gcs options dialog polishing: - zeroed margin of top level widget - chnaged size policy of scrollArea from Expanding to Minimum to get a tighter fit --- .../ipconnection/ipconnectionoptionspage.ui | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/ipconnection/ipconnectionoptionspage.ui b/ground/openpilotgcs/src/plugins/ipconnection/ipconnectionoptionspage.ui index 26df94b66..fa45e7726 100644 --- a/ground/openpilotgcs/src/plugins/ipconnection/ipconnectionoptionspage.ui +++ b/ground/openpilotgcs/src/plugins/ipconnection/ipconnectionoptionspage.ui @@ -14,20 +14,17 @@ Form - - 12 - - - 0 - - - 12 - - + 0 + + + 0 + 0 + + QFrame::NoFrame @@ -42,8 +39,8 @@ 0 0 - 390 - 154 + 429 + 125 From 6b3e0c7ee3b04c924db48f4a1206568e1fc7f18f Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Sat, 2 Feb 2013 16:08:37 +0100 Subject: [PATCH 04/12] OP-833 gcs options dialog polishing: zeroed margin of top level widget --- .../plugins/notify/notifypluginoptionspage.ui | 27 +++---------------- .../serialconnection/serialpluginoptions.ui | 3 +++ 2 files changed, 6 insertions(+), 24 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/notify/notifypluginoptionspage.ui b/ground/openpilotgcs/src/plugins/notify/notifypluginoptionspage.ui index 39e0c4c5b..5c325be41 100644 --- a/ground/openpilotgcs/src/plugins/notify/notifypluginoptionspage.ui +++ b/ground/openpilotgcs/src/plugins/notify/notifypluginoptionspage.ui @@ -20,16 +20,7 @@ Form - - 12 - - - 0 - - - 12 - - + 0 @@ -48,26 +39,14 @@ 0 0 - 584 + 608 483 - + 0 - - 12 - - - 0 - - - 0 - - - - diff --git a/ground/openpilotgcs/src/plugins/serialconnection/serialpluginoptions.ui b/ground/openpilotgcs/src/plugins/serialconnection/serialpluginoptions.ui index 912099bac..eb0847ef4 100644 --- a/ground/openpilotgcs/src/plugins/serialconnection/serialpluginoptions.ui +++ b/ground/openpilotgcs/src/plugins/serialconnection/serialpluginoptions.ui @@ -14,6 +14,9 @@ Form + + 0 + From 3ab33cf16396c279e4d5296259ad8addc45bb2c4 Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Sat, 2 Feb 2013 16:09:53 +0100 Subject: [PATCH 05/12] OP-833 gcs options dialog polishing: - createOptionsPage() now returns NULL to avoid having empty page in Options dialog - removed Gadget from gadget name - added some TODOs for for further cleanups --- .../openpilotgcs/src/plugins/config/configgadgetfactory.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/config/configgadgetfactory.cpp b/ground/openpilotgcs/src/plugins/config/configgadgetfactory.cpp index a927f2179..ef2d8b2b0 100644 --- a/ground/openpilotgcs/src/plugins/config/configgadgetfactory.cpp +++ b/ground/openpilotgcs/src/plugins/config/configgadgetfactory.cpp @@ -35,7 +35,7 @@ #include ConfigGadgetFactory::ConfigGadgetFactory(QObject *parent) : - IUAVGadgetFactory(QString("ConfigGadget"), tr("Config Gadget"), parent), + IUAVGadgetFactory(QString("ConfigGadget"), tr("Config"), parent), gadgetWidget(0) { } @@ -69,14 +69,16 @@ Core::IUAVGadget* ConfigGadgetFactory::createGadget(QWidget *parent) return new ConfigGadget(QString("ConfigGadget"), gadgetWidget, parent); } +// TODO should be removed as ConfigGadgetConfiguration is an empty class IUAVGadgetConfiguration *ConfigGadgetFactory::createConfiguration(QSettings* qSettings) { return new ConfigGadgetConfiguration(QString("ConfigGadget"), qSettings); } +// TODO should be removed as ConfigGadgetConfiguration is an empty class IOptionsPage *ConfigGadgetFactory::createOptionsPage(IUAVGadgetConfiguration *config) { - return new ConfigGadgetOptionsPage(qobject_cast(config)); + return 0; //new ConfigGadgetOptionsPage(qobject_cast(config)); } void ConfigGadgetFactory::startInputWizard() From 69fb6f6de33438ab6c0671247610630676710d8f Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Wed, 6 Feb 2013 23:27:05 +0100 Subject: [PATCH 06/12] OP-833 gcs options dialog polishing: zeroed margin of top level widget --- .../src/plugins/gcscontrol/gcscontrolgadgetoptionspage.ui | 3 +++ .../src/plugins/gpsdisplay/gpsdisplaygadgetoptionspage.ui | 3 +++ .../openpilotgcs/src/plugins/opmap/opmapgadgetoptionspage.ui | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ground/openpilotgcs/src/plugins/gcscontrol/gcscontrolgadgetoptionspage.ui b/ground/openpilotgcs/src/plugins/gcscontrol/gcscontrolgadgetoptionspage.ui index 9b4ec36c1..8821dfae3 100644 --- a/ground/openpilotgcs/src/plugins/gcscontrol/gcscontrolgadgetoptionspage.ui +++ b/ground/openpilotgcs/src/plugins/gcscontrol/gcscontrolgadgetoptionspage.ui @@ -50,6 +50,9 @@ + + 0 + diff --git a/ground/openpilotgcs/src/plugins/gpsdisplay/gpsdisplaygadgetoptionspage.ui b/ground/openpilotgcs/src/plugins/gpsdisplay/gpsdisplaygadgetoptionspage.ui index be60f1651..e81d13ed6 100644 --- a/ground/openpilotgcs/src/plugins/gpsdisplay/gpsdisplaygadgetoptionspage.ui +++ b/ground/openpilotgcs/src/plugins/gpsdisplay/gpsdisplaygadgetoptionspage.ui @@ -50,6 +50,9 @@ + + 0 + diff --git a/ground/openpilotgcs/src/plugins/opmap/opmapgadgetoptionspage.ui b/ground/openpilotgcs/src/plugins/opmap/opmapgadgetoptionspage.ui index fde5fd44b..82719de57 100644 --- a/ground/openpilotgcs/src/plugins/opmap/opmapgadgetoptionspage.ui +++ b/ground/openpilotgcs/src/plugins/opmap/opmapgadgetoptionspage.ui @@ -57,7 +57,7 @@ - 12 + 0 From 6cbad966d01f48cb8ba869f7f2593b2b34427aa5 Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Thu, 21 Feb 2013 02:04:53 +0100 Subject: [PATCH 07/12] OP-833 removed spurious plot entry in Uptime Scope Gadget --- .../openpilotgcs/default_configurations/OpenPilotGCS.xml | 9 +-------- .../default_configurations/OpenPilotGCS_wide.xml | 9 +-------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/ground/openpilotgcs/share/openpilotgcs/default_configurations/OpenPilotGCS.xml b/ground/openpilotgcs/share/openpilotgcs/default_configurations/OpenPilotGCS.xml index 7dbaa53c6..ee759e048 100644 --- a/ground/openpilotgcs/share/openpilotgcs/default_configurations/OpenPilotGCS.xml +++ b/ground/openpilotgcs/share/openpilotgcs/default_configurations/OpenPilotGCS.xml @@ -2497,14 +2497,7 @@ 0 0 - - 0 - 0 - 1 - 0 - 0 - - 2 + 1 1 800 diff --git a/ground/openpilotgcs/share/openpilotgcs/default_configurations/OpenPilotGCS_wide.xml b/ground/openpilotgcs/share/openpilotgcs/default_configurations/OpenPilotGCS_wide.xml index 0f9405f36..86d7bd642 100644 --- a/ground/openpilotgcs/share/openpilotgcs/default_configurations/OpenPilotGCS_wide.xml +++ b/ground/openpilotgcs/share/openpilotgcs/default_configurations/OpenPilotGCS_wide.xml @@ -2465,14 +2465,7 @@ 0 0 - - 0 - 0 - 1 - 0 - 0 - - 2 + 1 1 800 From 1859fd4ca5b377e253e1d84e6d4a94e944f60b27 Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Sat, 9 Mar 2013 17:26:40 +0100 Subject: [PATCH 08/12] OP-833 minor options page cleanup: removed some uneeded separator lines --- .../openpilotgcs/src/plugins/dial/dialgadgetoptionspage.ui | 7 ------- .../src/plugins/notify/notifypluginoptionspage.ui | 7 ------- .../openpilotgcs/src/plugins/pfd/pfdgadgetoptionspage.ui | 7 ------- 3 files changed, 21 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/dial/dialgadgetoptionspage.ui b/ground/openpilotgcs/src/plugins/dial/dialgadgetoptionspage.ui index 14d4b54f2..cbb904f56 100644 --- a/ground/openpilotgcs/src/plugins/dial/dialgadgetoptionspage.ui +++ b/ground/openpilotgcs/src/plugins/dial/dialgadgetoptionspage.ui @@ -110,13 +110,6 @@ - - - - Qt::Horizontal - - - diff --git a/ground/openpilotgcs/src/plugins/notify/notifypluginoptionspage.ui b/ground/openpilotgcs/src/plugins/notify/notifypluginoptionspage.ui index 5c325be41..a4b53c2cf 100644 --- a/ground/openpilotgcs/src/plugins/notify/notifypluginoptionspage.ui +++ b/ground/openpilotgcs/src/plugins/notify/notifypluginoptionspage.ui @@ -284,13 +284,6 @@ p, li { white-space: pre-wrap; } - - - - Qt::Horizontal - - - diff --git a/ground/openpilotgcs/src/plugins/pfd/pfdgadgetoptionspage.ui b/ground/openpilotgcs/src/plugins/pfd/pfdgadgetoptionspage.ui index 86e92c283..1373d2d3c 100644 --- a/ground/openpilotgcs/src/plugins/pfd/pfdgadgetoptionspage.ui +++ b/ground/openpilotgcs/src/plugins/pfd/pfdgadgetoptionspage.ui @@ -115,13 +115,6 @@ - - - - Qt::Horizontal - - - From 21c581bacd41d99bd6536bc7a31b37603bda3b67 Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Sun, 10 Mar 2013 21:02:00 +0100 Subject: [PATCH 09/12] OP-833 minor options page cleanup: removed some uneeded separator lines --- .../src/plugins/gcscontrol/gcscontrolgadgetoptionspage.ui | 7 ------- .../src/plugins/qmlview/qmlviewgadgetoptionspage.ui | 7 ------- 2 files changed, 14 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/gcscontrol/gcscontrolgadgetoptionspage.ui b/ground/openpilotgcs/src/plugins/gcscontrol/gcscontrolgadgetoptionspage.ui index 8821dfae3..958945ffe 100644 --- a/ground/openpilotgcs/src/plugins/gcscontrol/gcscontrolgadgetoptionspage.ui +++ b/ground/openpilotgcs/src/plugins/gcscontrol/gcscontrolgadgetoptionspage.ui @@ -160,13 +160,6 @@ - - - - Qt::Horizontal - - - diff --git a/ground/openpilotgcs/src/plugins/qmlview/qmlviewgadgetoptionspage.ui b/ground/openpilotgcs/src/plugins/qmlview/qmlviewgadgetoptionspage.ui index d23bcad19..ed90d1a09 100644 --- a/ground/openpilotgcs/src/plugins/qmlview/qmlviewgadgetoptionspage.ui +++ b/ground/openpilotgcs/src/plugins/qmlview/qmlviewgadgetoptionspage.ui @@ -47,13 +47,6 @@ 0 - - - - Qt::Horizontal - - - From 90fbf9bdab59a826d015cc34e91d0747f5ef68bb Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Sun, 17 Mar 2013 19:34:33 +0100 Subject: [PATCH 10/12] OP-833 removed unused ConfigGadgetConfiguration and ConfigGadgetOptionsPages classes --- .../src/plugins/config/config.pro | 14 ++--- .../src/plugins/config/configgadget.cpp | 7 +-- .../config/configgadgetconfiguration.cpp | 45 ---------------- .../config/configgadgetconfiguration.h | 45 ---------------- .../plugins/config/configgadgetfactory.cpp | 32 +++--------- .../src/plugins/config/configgadgetfactory.h | 6 +-- .../config/configgadgetoptionspage.cpp | 52 ------------------- .../plugins/config/configgadgetoptionspage.h | 51 ------------------ 8 files changed, 13 insertions(+), 239 deletions(-) delete mode 100644 ground/openpilotgcs/src/plugins/config/configgadgetconfiguration.cpp delete mode 100644 ground/openpilotgcs/src/plugins/config/configgadgetconfiguration.h delete mode 100644 ground/openpilotgcs/src/plugins/config/configgadgetoptionspage.cpp delete mode 100644 ground/openpilotgcs/src/plugins/config/configgadgetoptionspage.h diff --git a/ground/openpilotgcs/src/plugins/config/config.pro b/ground/openpilotgcs/src/plugins/config/config.pro index 0bb6cdbcc..d0c1929ef 100644 --- a/ground/openpilotgcs/src/plugins/config/config.pro +++ b/ground/openpilotgcs/src/plugins/config/config.pro @@ -8,10 +8,8 @@ INCLUDEPATH += ../../libs/eigen OTHER_FILES += Config.pluginspec HEADERS += configplugin.h \ - configgadgetconfiguration.h \ configgadgetwidget.h \ configgadgetfactory.h \ - configgadgetoptionspage.h \ configgadget.h \ fancytabwidget.h \ configinputwidget.h \ @@ -40,11 +38,10 @@ HEADERS += configplugin.h \ mixercurve.h \ dblspindelegate.h \ configautotunewidget.h + SOURCES += configplugin.cpp \ - configgadgetconfiguration.cpp \ configgadgetwidget.cpp \ configgadgetfactory.cpp \ - configgadgetoptionspage.cpp \ configgadget.cpp \ fancytabwidget.cpp \ configinputwidget.cpp \ @@ -74,6 +71,7 @@ SOURCES += configplugin.cpp \ mixercurve.cpp \ dblspindelegate.cpp \ configautotunewidget.cpp + FORMS += airframe.ui \ cc_hw_settings.ui \ pro_hw_settings.ui \ @@ -92,11 +90,5 @@ FORMS += airframe.ui \ pipxtreme.ui \ mixercurve.ui \ autotune.ui + RESOURCES += configgadget.qrc - - - - - - - diff --git a/ground/openpilotgcs/src/plugins/config/configgadget.cpp b/ground/openpilotgcs/src/plugins/config/configgadget.cpp index e3ff07130..dc1ca4721 100644 --- a/ground/openpilotgcs/src/plugins/config/configgadget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configgadget.cpp @@ -26,11 +26,9 @@ */ #include "configgadget.h" #include "configgadgetwidget.h" -#include "configgadgetconfiguration.h" ConfigGadget::ConfigGadget(QString classId, ConfigGadgetWidget *widget, QWidget *parent) : - IUAVGadget(classId, parent), - m_widget(widget) + IUAVGadget(classId, parent), m_widget(widget) { } @@ -39,8 +37,7 @@ ConfigGadget::~ConfigGadget() delete m_widget; } -void ConfigGadget::loadConfiguration(IUAVGadgetConfiguration* config) +void ConfigGadget::loadConfiguration(IUAVGadgetConfiguration *config) { Q_UNUSED(config); } - diff --git a/ground/openpilotgcs/src/plugins/config/configgadgetconfiguration.cpp b/ground/openpilotgcs/src/plugins/config/configgadgetconfiguration.cpp deleted file mode 100644 index 05a62aa6a..000000000 --- a/ground/openpilotgcs/src/plugins/config/configgadgetconfiguration.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/** - ****************************************************************************** - * - * @file configgadgetconfiguration.cpp - * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. - * @addtogroup GCSPlugins GCS Plugins - * @{ - * @addtogroup ConfigPlugin Config Plugin - * @{ - * @brief The Configuration Gadget used to update settings in the firmware - *****************************************************************************/ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#include "configgadgetconfiguration.h" - -ConfigGadgetConfiguration::ConfigGadgetConfiguration(QString classId, QSettings* qSettings, QObject *parent) : - IUAVGadgetConfiguration(classId, parent) -{ - Q_UNUSED(qSettings); - -} - -IUAVGadgetConfiguration *ConfigGadgetConfiguration::clone() -{ - ConfigGadgetConfiguration *m = new ConfigGadgetConfiguration(this->classId()); - return m; -} - -void ConfigGadgetConfiguration::saveConfig(QSettings* settings) const { - - Q_UNUSED(settings) -} diff --git a/ground/openpilotgcs/src/plugins/config/configgadgetconfiguration.h b/ground/openpilotgcs/src/plugins/config/configgadgetconfiguration.h deleted file mode 100644 index 44257c60a..000000000 --- a/ground/openpilotgcs/src/plugins/config/configgadgetconfiguration.h +++ /dev/null @@ -1,45 +0,0 @@ -/** - ****************************************************************************** - * - * @file configgadgetfactory.h - * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. - * @addtogroup GCSPlugins GCS Plugins - * @{ - * @addtogroup ConfigPlugin Config Plugin - * @{ - * @brief The Configuration Gadget used to update settings in the firmware - *****************************************************************************/ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#ifndef CONFIGGADGETCONFIGURATION_H -#define CONFIGGADGETCONFIGURATION_H - -#include - -using namespace Core; - -class ConfigGadgetConfiguration : public IUAVGadgetConfiguration -{ - Q_OBJECT - -public: - explicit ConfigGadgetConfiguration(QString classId, QSettings* qSettings = 0, QObject *parent = 0); - void saveConfig(QSettings* settings) const; - IUAVGadgetConfiguration *clone(); - -}; - -#endif // CONFIGGADGETCONFIGURATION_H diff --git a/ground/openpilotgcs/src/plugins/config/configgadgetfactory.cpp b/ground/openpilotgcs/src/plugins/config/configgadgetfactory.cpp index ef2d8b2b0..aef634008 100644 --- a/ground/openpilotgcs/src/plugins/config/configgadgetfactory.cpp +++ b/ground/openpilotgcs/src/plugins/config/configgadgetfactory.cpp @@ -26,8 +26,6 @@ */ #include "configgadgetfactory.h" #include "configgadget.h" -#include "configgadgetconfiguration.h" -#include "configgadgetoptionspage.h" #include #include #include @@ -35,8 +33,7 @@ #include ConfigGadgetFactory::ConfigGadgetFactory(QObject *parent) : - IUAVGadgetFactory(QString("ConfigGadget"), tr("Config"), parent), - gadgetWidget(0) + IUAVGadgetFactory(QString("ConfigGadget"), tr("Config"), parent), gadgetWidget(0) { } @@ -44,18 +41,16 @@ ConfigGadgetFactory::~ConfigGadgetFactory() { } -Core::IUAVGadget* ConfigGadgetFactory::createGadget(QWidget *parent) +Core::IUAVGadget *ConfigGadgetFactory::createGadget(QWidget *parent) { gadgetWidget = new ConfigGadgetWidget(parent); // Add Menu entry - Core::ActionManager* am = Core::ICore::instance()->actionManager(); - Core::ActionContainer* ac = am->actionContainer(Core::Constants::M_TOOLS); + Core::ActionManager *am = Core::ICore::instance()->actionManager(); + Core::ActionContainer *ac = am->actionContainer(Core::Constants::M_TOOLS); - Core::Command* cmd = am->registerAction(new QAction(this), - "ConfigPlugin.ShowInputWizard", - QList() << - Core::Constants::C_GLOBAL_ID); + Core::Command *cmd = am->registerAction(new QAction(this), "ConfigPlugin.ShowInputWizard", + QList() << Core::Constants::C_GLOBAL_ID); cmd->setDefaultKeySequence(QKeySequence("Ctrl+R")); cmd->action()->setText(tr("Radio Setup Wizard")); @@ -69,22 +64,9 @@ Core::IUAVGadget* ConfigGadgetFactory::createGadget(QWidget *parent) return new ConfigGadget(QString("ConfigGadget"), gadgetWidget, parent); } -// TODO should be removed as ConfigGadgetConfiguration is an empty class -IUAVGadgetConfiguration *ConfigGadgetFactory::createConfiguration(QSettings* qSettings) -{ - return new ConfigGadgetConfiguration(QString("ConfigGadget"), qSettings); -} - -// TODO should be removed as ConfigGadgetConfiguration is an empty class -IOptionsPage *ConfigGadgetFactory::createOptionsPage(IUAVGadgetConfiguration *config) -{ - return 0; //new ConfigGadgetOptionsPage(qobject_cast(config)); -} - void ConfigGadgetFactory::startInputWizard() { - if(gadgetWidget) - { + if (gadgetWidget) { Core::ModeManager::instance()->activateModeByWorkspaceName("Configuration"); gadgetWidget->startInputWizard(); } diff --git a/ground/openpilotgcs/src/plugins/config/configgadgetfactory.h b/ground/openpilotgcs/src/plugins/config/configgadgetfactory.h index f44f2c02a..a6bd08de6 100644 --- a/ground/openpilotgcs/src/plugins/config/configgadgetfactory.h +++ b/ground/openpilotgcs/src/plugins/config/configgadgetfactory.h @@ -31,7 +31,6 @@ #include "configgadgetwidget.h" #include "config_global.h" - namespace Core { class IUAVGadget; class IUAVGadgetFactory; @@ -43,19 +42,16 @@ class CONFIG_EXPORT ConfigGadgetFactory: public Core::IUAVGadgetFactory { Q_OBJECT public: - ConfigGadgetFactory(QObject *parent = 0); ~ConfigGadgetFactory(); IUAVGadget *createGadget(QWidget *parent); - IUAVGadgetConfiguration *createConfiguration(QSettings* qSettings); - IOptionsPage *createOptionsPage(IUAVGadgetConfiguration *config); public slots: void startInputWizard(); private: - ConfigGadgetWidget* gadgetWidget; + ConfigGadgetWidget *gadgetWidget; }; #endif // CONFIGGADGETFACTORY_H diff --git a/ground/openpilotgcs/src/plugins/config/configgadgetoptionspage.cpp b/ground/openpilotgcs/src/plugins/config/configgadgetoptionspage.cpp deleted file mode 100644 index eb4209874..000000000 --- a/ground/openpilotgcs/src/plugins/config/configgadgetoptionspage.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/** - ****************************************************************************** - * - * @file configgadgetoptionspage.cpp - * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. - * @addtogroup GCSPlugins GCS Plugins - * @{ - * @addtogroup ConfigPlugin Config Plugin - * @{ - * @brief The Configuration Gadget used to update settings in the firmware - *****************************************************************************/ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#include "configgadgetoptionspage.h" - -#include - -ConfigGadgetOptionsPage::ConfigGadgetOptionsPage(ConfigGadgetConfiguration *config, QObject *parent) -{ -//todo:implement - Q_UNUSED(config); - Q_UNUSED(parent); -} - -QWidget *ConfigGadgetOptionsPage::createPage(QWidget *parent) -{ - //todo:implement - Q_UNUSED(parent); - return new QWidget; -} - -void ConfigGadgetOptionsPage::apply() -{ - //todo:implement -} - -void ConfigGadgetOptionsPage::finish(){ - //todo:implement -} diff --git a/ground/openpilotgcs/src/plugins/config/configgadgetoptionspage.h b/ground/openpilotgcs/src/plugins/config/configgadgetoptionspage.h deleted file mode 100644 index 91396a294..000000000 --- a/ground/openpilotgcs/src/plugins/config/configgadgetoptionspage.h +++ /dev/null @@ -1,51 +0,0 @@ -/** - ****************************************************************************** - * - * @file configgadgetoptionspage.h - * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. - * @addtogroup GCSPlugins GCS Plugins - * @{ - * @addtogroup ConfigPlugin Config Plugin - * @{ - * @brief The Configuration Gadget used to update settings in the firmware - *****************************************************************************/ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#ifndef CONFIGGADGETOPTIONSPAGE_H -#define CONFIGGADGETOPTIONSPAGE_H - -#include "coreplugin/dialogs/ioptionspage.h" - -namespace Core { -class IUAVGadgetConfiguration; -} -using namespace Core; - -class ConfigGadgetConfiguration; - -class ConfigGadgetOptionsPage : public IOptionsPage -{ -public: - Q_OBJECT - public: - explicit ConfigGadgetOptionsPage(ConfigGadgetConfiguration *config, QObject *parent = 0); - QWidget *createPage(QWidget *parent); - void apply(); - void finish(); - -}; - -#endif // CONFIGGADGETOPTIONSPAGE_H From 8af1af6afa0eb9e2c733bf0f88eab84fcacbc52d Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Thu, 21 Mar 2013 01:26:29 +0100 Subject: [PATCH 11/12] OP-833 cleaned up individual gadget options pages --- .../plugins/coreplugin/workspacesettings.ui | 155 ++++---- .../src/plugins/dial/dialgadgetoptionspage.ui | 182 ++++----- .../ipconnection/ipconnectionoptionspage.ui | 49 +-- .../lineardial/lineardialgadgetoptionspage.ui | 351 +++++++++--------- .../plugins/notify/notifypluginoptionspage.ui | 90 ++--- 5 files changed, 411 insertions(+), 416 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/coreplugin/workspacesettings.ui b/ground/openpilotgcs/src/plugins/coreplugin/workspacesettings.ui index 3287e88d8..206f7acdd 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/workspacesettings.ui +++ b/ground/openpilotgcs/src/plugins/coreplugin/workspacesettings.ui @@ -79,36 +79,6 @@ - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 10 - - - - - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans'; font-size:8pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Note:</span> A restart is needed for changes to number of workspaces to take effect.</p></body></html> - - - - - - @@ -125,40 +95,6 @@ p, li { white-space: pre-wrap; } - - - - - - 1 - - - - Top - - - - - Bottom - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - @@ -166,6 +102,29 @@ p, li { white-space: pre-wrap; } + + + + + 0 + 0 + + + + 1 + + + + Top + + + + + Bottom + + + + @@ -173,6 +132,19 @@ p, li { white-space: pre-wrap; } + + + + Qt::Horizontal + + + + 40 + 20 + + + + @@ -195,33 +167,10 @@ p, li { white-space: pre-wrap; } - - - - Qt::Horizontal - - - - 0 - 20 - - - - - - - - Change details of workspace: - - - - - - - + 0 0 @@ -237,6 +186,36 @@ p, li { white-space: pre-wrap; } + + + + Change details of workspace: + + + + + + + + 0 + 0 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + diff --git a/ground/openpilotgcs/src/plugins/dial/dialgadgetoptionspage.ui b/ground/openpilotgcs/src/plugins/dial/dialgadgetoptionspage.ui index cbb904f56..a54ebfb57 100644 --- a/ground/openpilotgcs/src/plugins/dial/dialgadgetoptionspage.ui +++ b/ground/openpilotgcs/src/plugins/dial/dialgadgetoptionspage.ui @@ -47,6 +47,42 @@ 0 + + + + 6 + + + QLayout::SetMaximumSize + + + 0 + + + + + + 0 + 0 + + + + Dial SVG: + + + + + + + + 0 + 0 + + + + + + @@ -79,6 +115,52 @@ + + + + 0 + + + + + + 0 + 0 + + + + Dial font: + + + + + + + + 0 + 0 + + + + Select... + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + @@ -103,13 +185,6 @@ - - - - Qt::Horizontal - - - @@ -128,19 +203,6 @@ - - - - Qt::Horizontal - - - - 40 - 20 - - - - @@ -183,12 +245,25 @@ + + + + Qt::Horizontal + + + + 40 + 20 + + + + - 10 + 0 @@ -273,7 +348,7 @@ - 10 + 0 @@ -311,13 +386,6 @@ - - - - Qt::Horizontal - - - @@ -690,62 +758,6 @@ - - - - 10 - - - QLayout::SetMaximumSize - - - 10 - - - - - - 0 - 0 - - - - Dial SVG: - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - Dial font: - - - - - - - Select... - - - - - diff --git a/ground/openpilotgcs/src/plugins/ipconnection/ipconnectionoptionspage.ui b/ground/openpilotgcs/src/plugins/ipconnection/ipconnectionoptionspage.ui index fa45e7726..8c6ffd5c0 100644 --- a/ground/openpilotgcs/src/plugins/ipconnection/ipconnectionoptionspage.ui +++ b/ground/openpilotgcs/src/plugins/ipconnection/ipconnectionoptionspage.ui @@ -53,30 +53,34 @@ IP Network Telemetry - + Host Name/Number - + - - - - Qt::Horizontal + + + + Port - - - 40 - 20 - - - + - + + + + 1 + + + 999999 + + + + TCP connection @@ -90,23 +94,6 @@ - - - - Port - - - - - - - 1 - - - 999999 - - - diff --git a/ground/openpilotgcs/src/plugins/lineardial/lineardialgadgetoptionspage.ui b/ground/openpilotgcs/src/plugins/lineardial/lineardialgadgetoptionspage.ui index 06c14c183..1d9f91afb 100644 --- a/ground/openpilotgcs/src/plugins/lineardial/lineardialgadgetoptionspage.ui +++ b/ground/openpilotgcs/src/plugins/lineardial/lineardialgadgetoptionspage.ui @@ -47,6 +47,148 @@ 0 + + + + 6 + + + QLayout::SetMaximumSize + + + 0 + + + + + Dial SVG: + + + + + + + + 0 + 0 + + + + + + + + + + 0 + + + + + + 0 + 0 + + + + Dial font: + + + + + + + Select... + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Use OpenGL + + + true + + + + + + + + + Qt::Horizontal + + + + + + + + + + 0 + 0 + + + + Input: + + + + + + + ObjectName + + + + + + + + 0 + 0 + + + + + + + + ObjectField + + + + + + + + 0 + 0 + + + + + + @@ -254,138 +396,6 @@ - - - - 0 - - - - - - 0 - 0 - - - - Dial font: - - - - - - - Select... - - - - - - - Decimal places: - - - - - - - 99 - - - - - - - Factor: - - - - - - - 6 - - - -10000.000000000000000 - - - 100000.000000000000000 - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - Qt::Horizontal - - - - - - - - - - 0 - 0 - - - - Input: - - - - - - - ObjectName - - - - - - - - 0 - 0 - - - - - - - - ObjectField - - - - - - - - 0 - 0 - - - - - - @@ -456,54 +466,57 @@ - - - - - Use OpenGL - - - true - - - - - - - - - Qt::Horizontal - - - - - - - 10 - - - QLayout::SetMaximumSize - + - 10 + 0 - + - Dial SVG: + Decimal places: - - - - 0 - 0 - + + + 99 + + + + Factor: + + + + + + + 6 + + + -10000.000000000000000 + + + 100000.000000000000000 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + diff --git a/ground/openpilotgcs/src/plugins/notify/notifypluginoptionspage.ui b/ground/openpilotgcs/src/plugins/notify/notifypluginoptionspage.ui index a4b53c2cf..d54b4bfe1 100644 --- a/ground/openpilotgcs/src/plugins/notify/notifypluginoptionspage.ui +++ b/ground/openpilotgcs/src/plugins/notify/notifypluginoptionspage.ui @@ -54,7 +54,7 @@ - 12 + 9 @@ -108,19 +108,6 @@ - - - - Qt::Horizontal - - - - 40 - 20 - - - - @@ -172,9 +159,6 @@ - - - @@ -229,8 +213,8 @@ Sound Collection - - + + true @@ -249,35 +233,55 @@ - - - - - 0 - 0 - + + + + 0 - - Language - - - - - - - - 147 - 0 - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + + + + + 0 + 0 + + + + Language + + + + + + + + 147 + 0 + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Select the sound collection</span></p></body></html> - - + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + From f00a972e0ea43480e65fdfb8a6225d6956327b38 Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Sun, 24 Mar 2013 17:09:59 +0100 Subject: [PATCH 12/12] OP-833 cleaned up individual gadget options pages: dial and linear dial --- .../src/plugins/dial/dialgadgetoptionspage.ui | 210 ++++++++---------- .../lineardial/lineardialgadgetoptionspage.ui | 98 ++++---- 2 files changed, 154 insertions(+), 154 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/dial/dialgadgetoptionspage.ui b/ground/openpilotgcs/src/plugins/dial/dialgadgetoptionspage.ui index a54ebfb57..e327e5a63 100644 --- a/ground/openpilotgcs/src/plugins/dial/dialgadgetoptionspage.ui +++ b/ground/openpilotgcs/src/plugins/dial/dialgadgetoptionspage.ui @@ -61,7 +61,7 @@ - + 0 0 @@ -83,6 +83,46 @@ + + + + 0 + + + + + + 0 + 0 + + + + Dial font: + + + + + + + Select... + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + @@ -115,76 +155,6 @@ - - - - 0 - - - - - - 0 - 0 - - - - Dial font: - - - - - - - - 0 - 0 - - - - Select... - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - Use OpenGL for rendering. Will lower CPU usage, depending on the capabilities of your graphics card, but might slightly alter the look & feel of the dial. - - - Use OpenGL - - - - - - - When checked, the Dial plugin will make needle moves smoother by simulating inertia. - - - Smooth updates - - - - - @@ -395,19 +365,6 @@ - - - - Qt::Horizontal - - - - 40 - 20 - - - - @@ -435,12 +392,25 @@ + + + + Qt::Horizontal + + + + 40 + 20 + + + + - 10 + 0 @@ -525,7 +495,7 @@ - 10 + 0 @@ -563,13 +533,6 @@ - - - - Qt::Horizontal - - - @@ -579,19 +542,6 @@ - - - - Qt::Horizontal - - - - 40 - 20 - - - - @@ -619,12 +569,25 @@ + + + + Qt::Horizontal + + + + 40 + 20 + + + + - 10 + 0 @@ -709,7 +672,7 @@ - 10 + 0 @@ -747,17 +710,34 @@ - - - - Qt::Horizontal - - - + + + + + + Use OpenGL for rendering. Will lower CPU usage, depending on the capabilities of your graphics card, but might slightly alter the look & feel of the dial. + + + Use OpenGL + + + + + + + When checked, the Dial plugin will make needle moves smoother by simulating inertia. + + + Smooth updates + + + + + diff --git a/ground/openpilotgcs/src/plugins/lineardial/lineardialgadgetoptionspage.ui b/ground/openpilotgcs/src/plugins/lineardial/lineardialgadgetoptionspage.ui index 1d9f91afb..1b8353d29 100644 --- a/ground/openpilotgcs/src/plugins/lineardial/lineardialgadgetoptionspage.ui +++ b/ground/openpilotgcs/src/plugins/lineardial/lineardialgadgetoptionspage.ui @@ -85,7 +85,7 @@ - + 0 0 @@ -103,7 +103,7 @@ - + Qt::Horizontal @@ -118,17 +118,57 @@ - + + + 0 + - + - Use OpenGL - - - true + Decimal places: + + + + 99 + + + + + + + Factor: + + + + + + + 6 + + + -10000.000000000000000 + + + 100000.000000000000000 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + @@ -466,41 +506,21 @@ - - - 0 + + + Qt::Horizontal + + + + - + - Decimal places: + Use OpenGL - - - - - - 99 - - - - - - - Factor: - - - - - - - 6 - - - -10000.000000000000000 - - - 100000.000000000000000 + + true