mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
removed all the pushbutton stylesheets, hid all the apply buttons
This commit is contained in:
parent
06e9fe0a28
commit
1d1ef0dfce
@ -33,12 +33,19 @@
|
||||
#include <QDebug>
|
||||
#include <QDesktopServices>
|
||||
#include <QUrl>
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
#include <coreplugin/generalsettings.h>
|
||||
|
||||
ConfigCameraStabilizationWidget::ConfigCameraStabilizationWidget(QWidget *parent) : ConfigTaskWidget(parent)
|
||||
{
|
||||
// TODO: this widget should use the addUAVObjectToWidgetRelation()
|
||||
m_camerastabilization = new Ui_CameraStabilizationWidget();
|
||||
m_camerastabilization->setupUi(this);
|
||||
|
||||
ExtensionSystem::PluginManager *pm=ExtensionSystem::PluginManager::instance();
|
||||
Core::Internal::GeneralSettings * settings=pm->getObject<Core::Internal::GeneralSettings>();
|
||||
if(!settings->useExpertMode())
|
||||
m_camerastabilization->camerastabilizationSaveRAM->setVisible(false);
|
||||
|
||||
QComboBox *outputs[3] = {
|
||||
m_camerastabilization->rollChannel,
|
||||
|
@ -35,6 +35,8 @@
|
||||
#include <QUrl>
|
||||
#include "accels.h"
|
||||
#include "gyros.h"
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
#include <coreplugin/generalsettings.h>
|
||||
|
||||
ConfigCCAttitudeWidget::ConfigCCAttitudeWidget(QWidget *parent) :
|
||||
ConfigTaskWidget(parent),
|
||||
@ -43,7 +45,11 @@ ConfigCCAttitudeWidget::ConfigCCAttitudeWidget(QWidget *parent) :
|
||||
ui->setupUi(this);
|
||||
connect(ui->zeroBias,SIGNAL(clicked()),this,SLOT(startAccelCalibration()));
|
||||
|
||||
|
||||
ExtensionSystem::PluginManager *pm=ExtensionSystem::PluginManager::instance();
|
||||
Core::Internal::GeneralSettings * settings=pm->getObject<Core::Internal::GeneralSettings>();
|
||||
if(!settings->useExpertMode())
|
||||
ui->applyButton->setVisible(false);
|
||||
|
||||
addApplySaveButtons(ui->applyButton,ui->saveButton);
|
||||
addUAVObject("AttitudeSettings");
|
||||
|
||||
|
@ -41,6 +41,9 @@
|
||||
#include <utils/stylehelper.h>
|
||||
#include <QMessageBox>
|
||||
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
#include <coreplugin/generalsettings.h>
|
||||
|
||||
#define ACCESS_MIN_MOVE -3
|
||||
#define ACCESS_MAX_MOVE 3
|
||||
#define STICK_MIN_MOVE -8
|
||||
@ -53,7 +56,14 @@ ConfigInputWidget::ConfigInputWidget(QWidget *parent) : ConfigTaskWidget(parent)
|
||||
receiverActivityObj=ReceiverActivity::GetInstance(getObjectManager());
|
||||
m_config = new Ui_InputWidget();
|
||||
m_config->setupUi(this);
|
||||
|
||||
addApplySaveButtons(m_config->saveRCInputToRAM,m_config->saveRCInputToSD);
|
||||
|
||||
ExtensionSystem::PluginManager *pm=ExtensionSystem::PluginManager::instance();
|
||||
Core::Internal::GeneralSettings * settings=pm->getObject<Core::Internal::GeneralSettings>();
|
||||
if(!settings->useExpertMode())
|
||||
m_config->saveRCInputToRAM->setVisible(false);
|
||||
|
||||
addApplySaveButtons(m_config->saveRCInputToRAM,m_config->saveRCInputToSD);
|
||||
|
||||
//Generate the rows of buttons in the input channel form GUI
|
||||
|
@ -46,15 +46,20 @@
|
||||
#include "systemalarms.h"
|
||||
#include "systemsettings.h"
|
||||
#include "uavsettingsimportexport/uavsettingsimportexportfactory.h"
|
||||
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
#include <coreplugin/generalsettings.h>
|
||||
|
||||
ConfigOutputWidget::ConfigOutputWidget(QWidget *parent) : ConfigTaskWidget(parent),wasItMe(false)
|
||||
{
|
||||
m_config = new Ui_OutputWidget();
|
||||
m_config->setupUi(this);
|
||||
|
||||
ExtensionSystem::PluginManager *pm=ExtensionSystem::PluginManager::instance();
|
||||
Core::Internal::GeneralSettings * settings=pm->getObject<Core::Internal::GeneralSettings>();
|
||||
if(!settings->useExpertMode())
|
||||
m_config->saveRCOutputToRAM->setVisible(false);
|
||||
|
||||
|
||||
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
|
||||
|
||||
|
||||
UAVSettingsImportExportFactory * importexportplugin = pm->getObject<UAVSettingsImportExportFactory>();
|
||||
|
@ -36,17 +36,27 @@
|
||||
#include <QUrl>
|
||||
#include <QList>
|
||||
|
||||
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
#include <coreplugin/generalsettings.h>
|
||||
|
||||
|
||||
ConfigStabilizationWidget::ConfigStabilizationWidget(QWidget *parent) : ConfigTaskWidget(parent)
|
||||
{
|
||||
m_stabilization = new Ui_StabilizationWidget();
|
||||
m_stabilization->setupUi(this);
|
||||
|
||||
|
||||
ExtensionSystem::PluginManager *pm=ExtensionSystem::PluginManager::instance();
|
||||
Core::Internal::GeneralSettings * settings=pm->getObject<Core::Internal::GeneralSettings>();
|
||||
if(!settings->useExpertMode())
|
||||
m_stabilization->saveStabilizationToRAM_6->setVisible(false);
|
||||
|
||||
|
||||
|
||||
autoLoadWidgets();
|
||||
realtimeUpdates=new QTimer(this);
|
||||
connect(m_stabilization->realTimeUpdates_6,SIGNAL(stateChanged(int)),this,SLOT(realtimeUpdatesSlot(int)));
|
||||
//connect(m_stabilization->realTimeUpdates_7,SIGNAL(stateChanged(int)),this,SLOT(realtimeUpdatesSlot(int)));
|
||||
connect(realtimeUpdates,SIGNAL(timeout()),this,SLOT(apply()));
|
||||
|
||||
connect(m_stabilization->checkBox_7,SIGNAL(stateChanged(int)),this,SLOT(linkCheckBoxes(int)));
|
||||
@ -58,21 +68,7 @@ ConfigStabilizationWidget::ConfigStabilizationWidget(QWidget *parent) : ConfigTa
|
||||
|
||||
disableMouseWheelEvents();
|
||||
|
||||
// This is needed because new style tries to compact things as much as possible in grid
|
||||
// and on OSX the widget sizes of PushButtons is reported incorrectly:
|
||||
// https://bugreports.qt-project.org/browse/QTBUG-14591
|
||||
// m_stabilization->saveStabilizationToRAM_6->setAttribute(Qt::WA_LayoutUsesWidgetRect);
|
||||
// m_stabilization->saveStabilizationToSD_6->setAttribute(Qt::WA_LayoutUsesWidgetRect);
|
||||
// m_stabilization->stabilizationReloadBoardData_6->setAttribute(Qt::WA_LayoutUsesWidgetRect);
|
||||
// m_stabilization->pushButton_2->setAttribute(Qt::WA_LayoutUsesWidgetRect);
|
||||
// m_stabilization->pushButton_3->setAttribute(Qt::WA_LayoutUsesWidgetRect);
|
||||
// m_stabilization->pushButton_4->setAttribute(Qt::WA_LayoutUsesWidgetRect);
|
||||
// m_stabilization->pushButton_19->setAttribute(Qt::WA_LayoutUsesWidgetRect);
|
||||
// m_stabilization->pushButton_20->setAttribute(Qt::WA_LayoutUsesWidgetRect);
|
||||
// m_stabilization->pushButton_21->setAttribute(Qt::WA_LayoutUsesWidgetRect);
|
||||
// m_stabilization->pushButton_22->setAttribute(Qt::WA_LayoutUsesWidgetRect);
|
||||
// m_stabilization->pushButton_23->setAttribute(Qt::WA_LayoutUsesWidgetRect);
|
||||
// m_stabilization->pushButton_24->setAttribute(Qt::WA_LayoutUsesWidgetRect);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -28,11 +28,18 @@
|
||||
#include "configtxpidwidget.h"
|
||||
#include "txpidsettings.h"
|
||||
#include "hwsettings.h"
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
#include <coreplugin/generalsettings.h>
|
||||
|
||||
ConfigTxPIDWidget::ConfigTxPIDWidget(QWidget *parent) : ConfigTaskWidget(parent)
|
||||
{
|
||||
m_txpid = new Ui_TxPIDWidget();
|
||||
m_txpid->setupUi(this);
|
||||
|
||||
ExtensionSystem::PluginManager *pm=ExtensionSystem::PluginManager::instance();
|
||||
Core::Internal::GeneralSettings * settings=pm->getObject<Core::Internal::GeneralSettings>();
|
||||
if(!settings->useExpertMode())
|
||||
m_txpid->Apply->setVisible(false);
|
||||
|
||||
addApplySaveButtons(m_txpid->Apply, m_txpid->Save);
|
||||
|
||||
|
@ -41,6 +41,9 @@
|
||||
#include "systemsettings.h"
|
||||
#include "mixersettings.h"
|
||||
#include "actuatorsettings.h"
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
#include <coreplugin/generalsettings.h>
|
||||
|
||||
|
||||
/**
|
||||
Helper delegate for the custom mixer editor table.
|
||||
@ -97,6 +100,11 @@ ConfigVehicleTypeWidget::ConfigVehicleTypeWidget(QWidget *parent) : ConfigTaskWi
|
||||
{
|
||||
m_aircraft = new Ui_AircraftWidget();
|
||||
m_aircraft->setupUi(this);
|
||||
|
||||
ExtensionSystem::PluginManager *pm=ExtensionSystem::PluginManager::instance();
|
||||
Core::Internal::GeneralSettings * settings=pm->getObject<Core::Internal::GeneralSettings>();
|
||||
if(!settings->useExpertMode())
|
||||
m_aircraft->saveAircraftToRAM->setVisible(false);
|
||||
|
||||
addApplySaveButtons(m_aircraft->saveAircraftToRAM,m_aircraft->saveAircraftToSD);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user