1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-17 02:52:12 +01:00

fixed the hw settings apply button autofill, removed commented lines from the config_cc_hw_widget.cpp file

This commit is contained in:
Chris Pember 2012-07-21 12:28:55 -07:00
parent a53158bec1
commit 54dae87017
2 changed files with 72 additions and 13 deletions

View File

@ -6,17 +6,14 @@
<rect>
<x>0</x>
<y>0</y>
<width>691</width>
<height>849</height>
<width>592</width>
<height>763</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="spacing">
<number>12</number>
</property>
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
@ -110,8 +107,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>661</width>
<height>652</height>
<width>547</width>
<height>651</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
@ -445,12 +442,76 @@
</item>
<item>
<widget class="QPushButton" name="saveTelemetryToRAM">
<property name="palette">
<palette>
<active>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="0">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>232</red>
<green>232</green>
<blue>232</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="0">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>232</red>
<green>232</green>
<blue>232</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>232</red>
<green>232</green>
<blue>232</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>232</red>
<green>232</green>
<blue>232</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="toolTip">
<string>Send to OpenPilot but don't write in SD.
Beware of not locking yourself out!</string>
</property>
<property name="autoFillBackground">
<bool>true</bool>
<bool>false</bool>
</property>
<property name="styleSheet">
<string notr="true"/>

View File

@ -35,11 +35,9 @@
#include <QtGui/QPushButton>
#include <QDesktopServices>
#include <QUrl>
////Added to allow expert mode
#include <extensionsystem/pluginmanager.h>
#include <coreplugin/generalsettings.h>
////
ConfigCCHWWidget::ConfigCCHWWidget(QWidget *parent) : ConfigTaskWidget(parent)
{
@ -48,12 +46,12 @@ ConfigCCHWWidget::ConfigCCHWWidget(QWidget *parent) : ConfigTaskWidget(parent)
m_telemetry->label_2->setPixmap(QPixmap(":/configgadget/images/coptercontrol.svg"));
////Added to allow expert mode
ExtensionSystem::PluginManager *pm=ExtensionSystem::PluginManager::instance();
Core::Internal::GeneralSettings * settings=pm->getObject<Core::Internal::GeneralSettings>();
if(!settings->useExpertMode())
m_telemetry->saveTelemetryToRAM->setVisible(false);
//////////////////////////////////
addApplySaveButtons(m_telemetry->saveTelemetryToRAM,m_telemetry->saveTelemetryToSD);
addUAVObjectToWidgetRelation("HwSettings","CC_FlexiPort",m_telemetry->cbFlexi);