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

OP-935 Adds Responsiveness sliders to basic stabilization screen.

This commit is contained in:
Fredrik Arvidsson 2013-05-05 12:45:35 +02:00
parent 1758885266
commit 176bd3c4f7
15 changed files with 4408 additions and 2449 deletions

View File

@ -1,18 +1 @@
/* Windows styles */
QGroupBox {
border: 1px solid gray;
border-radius: 3px;
margin-top: 1ex;
padding: 1ex 0px 0px 0px;
font-size: 11px;
font-weight: bold;
}
QGroupBox::title {
subcontrol-origin: margin;
subcontrol-position: top left;
left: 7px;
top: -1ex;
padding: 0px 3px;
}

View File

@ -67,49 +67,49 @@ ConfigGadgetWidget::ConfigGadgetWidget(QWidget *parent) : QWidget(parent)
QIcon *icon = new QIcon();
icon->addFile(":/configgadget/images/hardware_normal.png", QSize(), QIcon::Normal, QIcon::Off);
icon->addFile(":/configgadget/images/hardware_selected.png", QSize(), QIcon::Selected, QIcon::Off);
qwd = new DefaultHwSettingsWidget(this);
qwd = new DefaultHwSettingsWidget(this);
ftw->insertTab(ConfigGadgetWidget::hardware, qwd, *icon, QString("Hardware"));
icon = new QIcon();
icon->addFile(":/configgadget/images/vehicle_normal.png", QSize(), QIcon::Normal, QIcon::Off);
icon->addFile(":/configgadget/images/vehicle_selected.png", QSize(), QIcon::Selected, QIcon::Off);
qwd = new ConfigVehicleTypeWidget(this);
qwd = new ConfigVehicleTypeWidget(this);
ftw->insertTab(ConfigGadgetWidget::aircraft, qwd, *icon, QString("Vehicle"));
icon = new QIcon();
icon->addFile(":/configgadget/images/input_normal.png", QSize(), QIcon::Normal, QIcon::Off);
icon->addFile(":/configgadget/images/input_selected.png", QSize(), QIcon::Selected, QIcon::Off);
qwd = new ConfigInputWidget(this);
qwd = new ConfigInputWidget(this);
ftw->insertTab(ConfigGadgetWidget::input, qwd, *icon, QString("Input"));
icon = new QIcon();
icon->addFile(":/configgadget/images/output_normal.png", QSize(), QIcon::Normal, QIcon::Off);
icon->addFile(":/configgadget/images/output_selected.png", QSize(), QIcon::Selected, QIcon::Off);
qwd = new ConfigOutputWidget(this);
qwd = new ConfigOutputWidget(this);
ftw->insertTab(ConfigGadgetWidget::output, qwd, *icon, QString("Output"));
icon = new QIcon();
icon->addFile(":/configgadget/images/ins_normal.png", QSize(), QIcon::Normal, QIcon::Off);
icon->addFile(":/configgadget/images/ins_selected.png", QSize(), QIcon::Selected, QIcon::Off);
qwd = new DefaultAttitudeWidget(this);
qwd = new DefaultAttitudeWidget(this);
ftw->insertTab(ConfigGadgetWidget::sensors, qwd, *icon, QString("Attitude"));
icon = new QIcon();
icon->addFile(":/configgadget/images/stabilization_normal.png", QSize(), QIcon::Normal, QIcon::Off);
icon->addFile(":/configgadget/images/stabilization_selected.png", QSize(), QIcon::Selected, QIcon::Off);
qwd = new ConfigStabilizationWidget(this);
qwd = new ConfigStabilizationWidget(this);
ftw->insertTab(ConfigGadgetWidget::stabilization, qwd, *icon, QString("Stabilization"));
icon = new QIcon();
icon->addFile(":/configgadget/images/camstab_normal.png", QSize(), QIcon::Normal, QIcon::Off);
icon->addFile(":/configgadget/images/camstab_selected.png", QSize(), QIcon::Selected, QIcon::Off);
qwd = new ConfigCameraStabilizationWidget(this);
qwd = new ConfigCameraStabilizationWidget(this);
ftw->insertTab(ConfigGadgetWidget::camerastabilization, qwd, *icon, QString("Camera Stab"));
icon = new QIcon();
icon->addFile(":/configgadget/images/txpid_normal.png", QSize(), QIcon::Normal, QIcon::Off);
icon->addFile(":/configgadget/images/txpid_selected.png", QSize(), QIcon::Selected, QIcon::Off);
qwd = new ConfigTxPIDWidget(this);
qwd = new ConfigTxPIDWidget(this);
ftw->insertTab(ConfigGadgetWidget::txpid, qwd, *icon, QString("TxPID"));
ftw->setCurrentIndex(ConfigGadgetWidget::hardware);
@ -117,29 +117,29 @@ ConfigGadgetWidget::ConfigGadgetWidget(QWidget *parent) : QWidget(parent)
// Listen to autopilot connection events
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
TelemetryManager* telMngr = pm->getObject<TelemetryManager>();
TelemetryManager *telMngr = pm->getObject<TelemetryManager>();
connect(telMngr, SIGNAL(connected()), this, SLOT(onAutopilotConnect()));
connect(telMngr, SIGNAL(disconnected()), this, SLOT(onAutopilotDisconnect()));
// And check whether by any chance we are not already connected
if (telMngr->isConnected()) {
onAutopilotConnect();
onAutopilotConnect();
}
help = 0;
connect(ftw,SIGNAL(currentAboutToShow(int,bool*)), this, SLOT(tabAboutToChange(int,bool*)));
connect(ftw, SIGNAL(currentAboutToShow(int, bool *)), this, SLOT(tabAboutToChange(int, bool *)));
// Connect to the PipXStatus object updates
UAVObjectManager *objManager = pm->getObject<UAVObjectManager>();
oplinkStatusObj = dynamic_cast<UAVDataObject*>(objManager->getObject("OPLinkStatus"));
if (oplinkStatusObj != NULL ) {
connect(oplinkStatusObj, SIGNAL(objectUpdated(UAVObject*)), this, SLOT(updateOPLinkStatus(UAVObject*)));
oplinkStatusObj = dynamic_cast<UAVDataObject *>(objManager->getObject("OPLinkStatus"));
if (oplinkStatusObj != NULL) {
connect(oplinkStatusObj, SIGNAL(objectUpdated(UAVObject *)), this, SLOT(updateOPLinkStatus(UAVObject *)));
} else {
qDebug() << "Error: Object is unknown (OPLinkStatus).";
qDebug() << "Error: Object is unknown (OPLinkStatus).";
}
// Create the timer that is used to timeout the connection to the OPLink.
oplinkTimeout = new QTimer(this);
oplinkTimeout = new QTimer(this);
connect(oplinkTimeout, SIGNAL(timeout()), this, SLOT(onOPLinkDisconnect()));
oplinkConnected = false;
}
@ -152,7 +152,7 @@ ConfigGadgetWidget::~ConfigGadgetWidget()
void ConfigGadgetWidget::startInputWizard()
{
ftw->setCurrentIndex(ConfigGadgetWidget::input);
ConfigInputWidget* inputWidget = dynamic_cast<ConfigInputWidget*>(ftw->getWidget(ConfigGadgetWidget::input));
ConfigInputWidget *inputWidget = dynamic_cast<ConfigInputWidget *>(ftw->getWidget(ConfigGadgetWidget::input));
Q_ASSERT(inputWidget);
inputWidget->startInputWizard();
}
@ -162,11 +162,12 @@ void ConfigGadgetWidget::resizeEvent(QResizeEvent *event)
QWidget::resizeEvent(event);
}
void ConfigGadgetWidget::onAutopilotDisconnect() {
void ConfigGadgetWidget::onAutopilotDisconnect()
{
int selectedIndex = ftw->currentIndex();
QIcon *icon = new QIcon();
icon->addFile(":/configgadget/images/ins_normal.png", QSize(), QIcon::Normal, QIcon::Off);
icon->addFile(":/configgadget/images/ins_selected.png", QSize(), QIcon::Selected, QIcon::Off);
QWidget *qwd = new DefaultAttitudeWidget(this);
@ -176,7 +177,7 @@ void ConfigGadgetWidget::onAutopilotDisconnect() {
icon = new QIcon();
icon->addFile(":/configgadget/images/hardware_normal.png", QSize(), QIcon::Normal, QIcon::Off);
icon->addFile(":/configgadget/images/hardware_selected.png", QSize(), QIcon::Selected, QIcon::Off);
qwd = new DefaultHwSettingsWidget(this);
qwd = new DefaultHwSettingsWidget(this);
ftw->removeTab(ConfigGadgetWidget::hardware);
ftw->insertTab(ConfigGadgetWidget::hardware, qwd, *icon, QString("Hardware"));
@ -185,20 +186,20 @@ void ConfigGadgetWidget::onAutopilotDisconnect() {
emit autopilotDisconnected();
}
void ConfigGadgetWidget::onAutopilotConnect() {
qDebug()<<"ConfigGadgetWidget onAutopilotConnect";
void ConfigGadgetWidget::onAutopilotConnect()
{
qDebug() << "ConfigGadgetWidget onAutopilotConnect";
// First of all, check what Board type we are talking to, and
// if necessary, remove/add tabs in the config gadget:
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
UAVObjectUtilManager* utilMngr = pm->getObject<UAVObjectUtilManager>();
UAVObjectUtilManager *utilMngr = pm->getObject<UAVObjectUtilManager>();
if (utilMngr) {
int selectedIndex = ftw->currentIndex();
int board = utilMngr->getBoardModel();
if ((board & 0xff00) == 1024) {
// CopterControl family
QIcon *icon = new QIcon();
QIcon *icon = new QIcon();
icon->addFile(":/configgadget/images/ins_normal.png", QSize(), QIcon::Normal, QIcon::Off);
icon->addFile(":/configgadget/images/ins_selected.png", QSize(), QIcon::Selected, QIcon::Off);
QWidget *qwd = new ConfigCCAttitudeWidget(this);
@ -208,14 +209,13 @@ void ConfigGadgetWidget::onAutopilotConnect() {
icon = new QIcon();
icon->addFile(":/configgadget/images/hardware_normal.png", QSize(), QIcon::Normal, QIcon::Off);
icon->addFile(":/configgadget/images/hardware_selected.png", QSize(), QIcon::Selected, QIcon::Off);
qwd = new ConfigCCHWWidget(this);
qwd = new ConfigCCHWWidget(this);
ftw->removeTab(ConfigGadgetWidget::hardware);
ftw->insertTab(ConfigGadgetWidget::hardware, qwd, *icon, QString("Hardware"));
} else if ((board & 0xff00) == 0x0900) {
// Revolution family
QIcon *icon = new QIcon();
QIcon *icon = new QIcon();
icon->addFile(":/configgadget/images/ins_normal.png", QSize(), QIcon::Normal, QIcon::Off);
icon->addFile(":/configgadget/images/ins_selected.png", QSize(), QIcon::Selected, QIcon::Off);
QWidget *qwd = new ConfigRevoWidget(this);
@ -225,35 +225,33 @@ void ConfigGadgetWidget::onAutopilotConnect() {
icon = new QIcon();
icon->addFile(":/configgadget/images/hardware_normal.png", QSize(), QIcon::Normal, QIcon::Off);
icon->addFile(":/configgadget/images/hardware_selected.png", QSize(), QIcon::Selected, QIcon::Off);
qwd = new ConfigRevoHWWidget(this);
qwd = new ConfigRevoHWWidget(this);
ftw->removeTab(ConfigGadgetWidget::hardware);
ftw->insertTab(ConfigGadgetWidget::hardware, qwd, *icon, QString("Hardware"));
} else {
//Unknown board
// Unknown board
qDebug() << "Unknown board " << board;
}
ftw->setCurrentIndex(selectedIndex);
ftw->setCurrentIndex(selectedIndex);
}
emit autopilotConnected();
}
void ConfigGadgetWidget::tabAboutToChange(int i, bool * proceed)
void ConfigGadgetWidget::tabAboutToChange(int i, bool *proceed)
{
Q_UNUSED(i);
*proceed = true;
ConfigTaskWidget * wid = qobject_cast<ConfigTaskWidget *>(ftw->currentWidget());
if(!wid) {
ConfigTaskWidget *wid = qobject_cast<ConfigTaskWidget *>(ftw->currentWidget());
if (!wid) {
return;
}
if(wid->isDirty())
{
int ans=QMessageBox::warning(this,tr("Unsaved changes"),tr("The tab you are leaving has unsaved changes,"
"if you proceed they will be lost."
"Do you still want to proceed?"),QMessageBox::Yes,QMessageBox::No);
if(ans==QMessageBox::No) {
*proceed=false;
if (wid->isDirty()) {
int ans = QMessageBox::warning(this, tr("Unsaved changes"), tr("The tab you are leaving has unsaved changes,"
"if you proceed they will be lost."
"Do you still want to proceed?"), QMessageBox::Yes, QMessageBox::No);
if (ans == QMessageBox::No) {
*proceed = false;
} else {
wid->setDirty(false);
}
@ -261,14 +259,13 @@ void ConfigGadgetWidget::tabAboutToChange(int i, bool * proceed)
}
/*!
\brief Called by updates to @OPLinkStatus
*/
\brief Called by updates to @OPLinkStatus
*/
void ConfigGadgetWidget::updateOPLinkStatus(UAVObject *)
{
// Restart the disconnection timer.
oplinkTimeout->start(5000);
if (!oplinkConnected)
{
if (!oplinkConnected) {
qDebug() << "ConfigGadgetWidget onOPLinkConnect";
QIcon *icon = new QIcon();
@ -281,9 +278,10 @@ void ConfigGadgetWidget::updateOPLinkStatus(UAVObject *)
}
}
void ConfigGadgetWidget::onOPLinkDisconnect() {
qDebug()<<"ConfigGadgetWidget onOPLinkDisconnect";
oplinkTimeout->stop();
ftw->removeTab(ConfigGadgetWidget::oplink);
oplinkConnected = false;
void ConfigGadgetWidget::onOPLinkDisconnect()
{
qDebug() << "ConfigGadgetWidget onOPLinkDisconnect";
oplinkTimeout->stop();
ftw->removeTab(ConfigGadgetWidget::oplink);
oplinkConnected = false;
}

View File

@ -45,9 +45,10 @@ ConfigStabilizationWidget::ConfigStabilizationWidget(QWidget *parent) : ConfigTa
ui->setupUi(this);
ExtensionSystem::PluginManager* pm = ExtensionSystem::PluginManager::instance();
Core::Internal::GeneralSettings* settings = pm->getObject<Core::Internal::GeneralSettings>();
if(!settings->useExpertMode()) {
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
Core::Internal::GeneralSettings *settings = pm->getObject<Core::Internal::GeneralSettings>();
if (!settings->useExpertMode()) {
ui->saveStabilizationToRAM_6->setVisible(false);
}
@ -56,18 +57,18 @@ ConfigStabilizationWidget::ConfigStabilizationWidget(QWidget *parent) : ConfigTa
realtimeUpdates = new QTimer(this);
connect(realtimeUpdates, SIGNAL(timeout()), this, SLOT(apply()));
connect(ui->realTimeUpdates_6, SIGNAL(stateChanged(int)), this, SLOT(realtimeUpdatesSlot(int)));
connect(ui->realTimeUpdates_6, SIGNAL(toggled(bool)), this, SLOT(realtimeUpdatesSlot(bool)));
addWidget(ui->realTimeUpdates_6);
connect(ui->realTimeUpdates_8, SIGNAL(stateChanged(int)), this, SLOT(realtimeUpdatesSlot(int)));
connect(ui->realTimeUpdates_8, SIGNAL(toggled(bool)), this, SLOT(realtimeUpdatesSlot(bool)));
addWidget(ui->realTimeUpdates_8);
connect(ui->checkBox_7, SIGNAL(stateChanged(int)), this, SLOT(linkCheckBoxes(int)));
connect(ui->checkBox_7, SIGNAL(toggled(bool)), this, SLOT(linkCheckBoxes(bool)));
addWidget(ui->checkBox_7);
connect(ui->checkBox_2, SIGNAL(stateChanged(int)), this, SLOT(linkCheckBoxes(int)));
connect(ui->checkBox_2, SIGNAL(toggled(bool)), this, SLOT(linkCheckBoxes(bool)));
addWidget(ui->checkBox_2);
connect(ui->checkBox_8, SIGNAL(stateChanged(int)), this, SLOT(linkCheckBoxes(int)));
connect(ui->checkBox_8, SIGNAL(toggled(bool)), this, SLOT(linkCheckBoxes(bool)));
addWidget(ui->checkBox_8);
connect(ui->checkBox_3, SIGNAL(stateChanged(int)), this, SLOT(linkCheckBoxes(int)));
connect(ui->checkBox_3, SIGNAL(toggled(bool)), this, SLOT(linkCheckBoxes(bool)));
addWidget(ui->checkBox_3);
addWidget(ui->pushButton_2);
@ -80,7 +81,12 @@ ConfigStabilizationWidget::ConfigStabilizationWidget(QWidget *parent) : ConfigTa
addWidget(ui->pushButton_22);
addWidget(ui->pushButton_23);
connect(this, SIGNAL(widgetContentsChanged(QWidget*)), this, SLOT(processLinkedWidgets(QWidget*)));
addWidget(ui->basicResponsivenessGroupBox);
connect(ui->basicResponsivenessGroupBox, SIGNAL(toggled(bool)), this, SLOT(linkCheckBoxes(bool)));
addWidget(ui->advancedResponsivenessGroupBox);
connect(ui->advancedResponsivenessGroupBox, SIGNAL(toggled(bool)), this, SLOT(linkCheckBoxes(bool)));
connect(this, SIGNAL(widgetContentsChanged(QWidget *)), this, SLOT(processLinkedWidgets(QWidget *)));
// Link by default
ui->checkBox_7->setChecked(true);
@ -95,100 +101,91 @@ ConfigStabilizationWidget::~ConfigStabilizationWidget()
// Do nothing
}
void ConfigStabilizationWidget::realtimeUpdatesSlot(int value)
{
ui->realTimeUpdates_6->setCheckState((Qt::CheckState)value);
ui->realTimeUpdates_8->setCheckState((Qt::CheckState)value);
if(value == Qt::Checked && !realtimeUpdates->isActive()) {
void ConfigStabilizationWidget::refreshWidgetsValues(UAVObject *o)
{
ConfigTaskWidget::refreshWidgetsValues(o);
ui->basicResponsivenessGroupBox->setChecked(ui->rateRollKp_3->value() == ui->ratePitchKp_4->value() &&
ui->rateRollKi_3->value() == ui->ratePitchKi_4->value());
}
void ConfigStabilizationWidget::realtimeUpdatesSlot(bool value)
{
ui->realTimeUpdates_6->setChecked(value);
ui->realTimeUpdates_8->setChecked(value);
if (value && !realtimeUpdates->isActive()) {
realtimeUpdates->start(300);
}
else if(value == Qt::Unchecked) {
} else {
realtimeUpdates->stop();
}
}
void ConfigStabilizationWidget::linkCheckBoxes(int value)
void ConfigStabilizationWidget::linkCheckBoxes(bool value)
{
if(sender() == ui->checkBox_7) {
ui->checkBox_3->setCheckState((Qt::CheckState)value);
}
else if(sender() == ui->checkBox_3) {
ui->checkBox_7->setCheckState((Qt::CheckState)value);
}
else if(sender( )== ui->checkBox_8) {
ui->checkBox_2->setCheckState((Qt::CheckState)value);
}
else if(sender() == ui->checkBox_2) {
ui->checkBox_8->setCheckState((Qt::CheckState)value);
if (sender() == ui->checkBox_7) {
ui->checkBox_3->setChecked(value);
} else if (sender() == ui->checkBox_3) {
ui->checkBox_7->setChecked(value);
} else if (sender() == ui->checkBox_8) {
ui->checkBox_2->setChecked(value);
} else if (sender() == ui->checkBox_2) {
ui->checkBox_8->setChecked(value);
} else if (sender() == ui->basicResponsivenessGroupBox) {
ui->advancedResponsivenessGroupBox->setChecked(!value);
if(value) {
processLinkedWidgets(ui->AttitudeResponsivenessSlider);
processLinkedWidgets(ui->RateResponsivenessSlider);
}
} else if (sender() == ui->advancedResponsivenessGroupBox) {
ui->basicResponsivenessGroupBox->setChecked(!value);
}
}
void ConfigStabilizationWidget::processLinkedWidgets(QWidget * widget)
void ConfigStabilizationWidget::processLinkedWidgets(QWidget *widget)
{
if(ui->checkBox_7->checkState()==Qt::Checked)
{
if(widget== ui->RateRollKp_2)
{
if (ui->checkBox_7->isChecked()) {
if (widget == ui->RateRollKp_2) {
ui->RatePitchKp->setValue(ui->RateRollKp_2->value());
}
else if(widget== ui->RateRollKi_2)
{
} else if (widget == ui->RateRollKi_2) {
ui->RatePitchKi->setValue(ui->RateRollKi_2->value());
}
else if(widget== ui->RateRollILimit_2)
{
} else if (widget == ui->RateRollILimit_2) {
ui->RatePitchILimit->setValue(ui->RateRollILimit_2->value());
}
else if(widget== ui->RatePitchKp)
{
} else if (widget == ui->RatePitchKp) {
ui->RateRollKp_2->setValue(ui->RatePitchKp->value());
}
else if(widget== ui->RatePitchKi)
{
} else if (widget == ui->RatePitchKi) {
ui->RateRollKi_2->setValue(ui->RatePitchKi->value());
}
else if(widget== ui->RatePitchILimit)
{
} else if (widget == ui->RatePitchILimit) {
ui->RateRollILimit_2->setValue(ui->RatePitchILimit->value());
}
else if(widget== ui->RollRateKd)
{
} else if (widget == ui->RollRateKd) {
ui->PitchRateKd->setValue(ui->RollRateKd->value());
}
else if(widget== ui->PitchRateKd)
{
} else if (widget == ui->PitchRateKd) {
ui->RollRateKd->setValue(ui->PitchRateKd->value());
}
}
if(ui->checkBox_8->checkState()==Qt::Checked)
{
if(widget== ui->AttitudeRollKp)
{
if (ui->checkBox_8->isChecked()) {
if (widget == ui->AttitudeRollKp) {
ui->AttitudePitchKp_2->setValue(ui->AttitudeRollKp->value());
}
else if(widget== ui->AttitudeRollKi)
{
} else if (widget == ui->AttitudeRollKi) {
ui->AttitudePitchKi_2->setValue(ui->AttitudeRollKi->value());
}
else if(widget== ui->AttitudeRollILimit)
{
} else if (widget == ui->AttitudeRollILimit) {
ui->AttitudePitchILimit_2->setValue(ui->AttitudeRollILimit->value());
}
else if(widget== ui->AttitudePitchKp_2)
{
} else if (widget == ui->AttitudePitchKp_2) {
ui->AttitudeRollKp->setValue(ui->AttitudePitchKp_2->value());
}
else if(widget== ui->AttitudePitchKi_2)
{
} else if (widget == ui->AttitudePitchKi_2) {
ui->AttitudeRollKi->setValue(ui->AttitudePitchKi_2->value());
}
else if(widget== ui->AttitudePitchILimit_2)
{
} else if (widget == ui->AttitudePitchILimit_2) {
ui->AttitudeRollILimit->setValue(ui->AttitudePitchILimit_2->value());
}
}
if(ui->basicResponsivenessGroupBox->isChecked()) {
if (widget == ui->AttitudeResponsivenessSlider) {
ui->ratePitchKp_4->setValue(ui->AttitudeResponsivenessSlider->value());
} else if (widget == ui->RateResponsivenessSlider) {
ui->ratePitchKi_4->setValue(ui->RateResponsivenessSlider->value());
}
}
}

View File

@ -48,9 +48,13 @@ public:
private:
Ui_StabilizationWidget *ui;
QTimer * realtimeUpdates;
protected slots:
void refreshWidgetsValues(UAVObject *o = NULL);
private slots:
void realtimeUpdatesSlot(int);
void linkCheckBoxes(int value);
void realtimeUpdatesSlot(bool value);
void linkCheckBoxes(bool value);
void processLinkedWidgets(QWidget*);
};

View File

@ -108,30 +108,3 @@ void ConfigTxPIDWidget::saveSettings()
UAVObject *obj = HwSettings::GetInstance(getObjectManager());
saveObjectToSD(obj);
}
void ConfigTxPIDWidget::enableControls(bool enable)
{
/*
m_txpid->PID1->setEnabled(enable);
m_txpid->PID2->setEnabled(enable);
m_txpid->PID3->setEnabled(enable);
m_txpid->Input1->setEnabled(enable);
m_txpid->Input2->setEnabled(enable);
m_txpid->Input3->setEnabled(enable);
m_txpid->MinPID1->setEnabled(enable);
m_txpid->MinPID2->setEnabled(enable);
m_txpid->MinPID3->setEnabled(enable);
m_txpid->MaxPID1->setEnabled(enable);
m_txpid->MaxPID2->setEnabled(enable);
m_txpid->MaxPID3->setEnabled(enable);
m_txpid->ThrottleMin->setEnabled(enable);
m_txpid->ThrottleMax->setEnabled(enable);
m_txpid->UpdateMode->setEnabled(enable);
*/
ConfigTaskWidget::setEnabled(enable);
}

View File

@ -44,7 +44,6 @@ private slots:
void refreshValues();
void applySettings();
void saveSettings();
void enableControls(bool enable);
};
#endif // CONFIGTXPIDWIDGET_H

View File

@ -4,15 +4,14 @@
#include "manualcontrolsettings.h"
#include "gcsreceiver.h"
inputChannelForm::inputChannelForm(QWidget *parent,bool showlegend) :
inputChannelForm::inputChannelForm(QWidget *parent, bool showlegend) :
ConfigTaskWidget(parent),
ui(new Ui::inputChannelForm)
{
ui->setupUi(this);
//The first time through the loop, keep the legend. All other times, delete it.
if(!showlegend)
{
// The first time through the loop, keep the legend. All other times, delete it.
if (!showlegend) {
layout()->removeWidget(ui->legend0);
layout()->removeWidget(ui->legend1);
layout()->removeWidget(ui->legend2);
@ -27,19 +26,18 @@ inputChannelForm::inputChannelForm(QWidget *parent,bool showlegend) :
delete ui->legend4;
delete ui->legend5;
delete ui->legend6;
}
connect(ui->channelMin,SIGNAL(valueChanged(int)),this,SLOT(minMaxUpdated()));
connect(ui->channelMax,SIGNAL(valueChanged(int)),this,SLOT(minMaxUpdated()));
connect(ui->channelGroup,SIGNAL(currentIndexChanged(int)),this,SLOT(groupUpdated()));
connect(ui->channelNeutral,SIGNAL(valueChanged(int)), this, SLOT(neutralUpdated(int)));
connect(ui->channelMin, SIGNAL(valueChanged(int)), this, SLOT(minMaxUpdated()));
connect(ui->channelMax, SIGNAL(valueChanged(int)), this, SLOT(minMaxUpdated()));
connect(ui->channelGroup, SIGNAL(currentIndexChanged(int)), this, SLOT(groupUpdated()));
connect(ui->channelNeutral, SIGNAL(valueChanged(int)), this, SLOT(neutralUpdated(int)));
// This is awkward but since we want the UI to be a dropdown but the field is not an enum
// it breaks the UAUVObject widget relation of the task gadget. Running the data through
// a spin box fixes this
connect(ui->channelNumberDropdown,SIGNAL(currentIndexChanged(int)),this,SLOT(channelDropdownUpdated(int)));
connect(ui->channelNumber,SIGNAL(valueChanged(int)),this,SLOT(channelNumberUpdated(int)));
connect(ui->channelNumberDropdown, SIGNAL(currentIndexChanged(int)), this, SLOT(channelDropdownUpdated(int)));
connect(ui->channelNumber, SIGNAL(valueChanged(int)), this, SLOT(channelNumberUpdated(int)));
disableMouseWheelEvents();
}
@ -54,26 +52,28 @@ void inputChannelForm::setName(QString &name)
{
ui->channelName->setText(name);
QFontMetrics metrics(ui->channelName->font());
int width=metrics.width(name)+5;
foreach(inputChannelForm * form,parent()->findChildren<inputChannelForm*>())
{
if(form==this)
int width = metrics.width(name) + 5;
foreach(inputChannelForm * form, parent()->findChildren<inputChannelForm *>()) {
if (form == this) {
continue;
if(form->ui->channelName->minimumSize().width()<width)
form->ui->channelName->setMinimumSize(width,0);
else
width=form->ui->channelName->minimumSize().width();
}
if (form->ui->channelName->minimumSize().width() < width) {
form->ui->channelName->setMinimumSize(width, 0);
} else {
width = form->ui->channelName->minimumSize().width();
}
}
ui->channelName->setMinimumSize(width,0);
ui->channelName->setMinimumSize(width, 0);
}
/**
* Update the direction of the slider and boundaries
*/
* Update the direction of the slider and boundaries
*/
void inputChannelForm::minMaxUpdated()
{
bool reverse = ui->channelMin->value() > ui->channelMax->value();
if(reverse) {
if (reverse) {
ui->channelNeutral->setMinimum(ui->channelMax->value());
ui->channelNeutral->setMaximum(ui->channelMin->value());
} else {
@ -91,11 +91,11 @@ void inputChannelForm::neutralUpdated(int newval)
}
/**
* Update the channel options based on the selected receiver type
*
* I fully admit this is terrible practice to embed data within UI
* like this. Open to suggestions. JC 2011-09-07
*/
* Update the channel options based on the selected receiver type
*
* I fully admit this is terrible practice to embed data within UI
* like this. Open to suggestions. JC 2011-09-07
*/
void inputChannelForm::groupUpdated()
{
ui->channelNumberDropdown->clear();
@ -103,7 +103,7 @@ void inputChannelForm::groupUpdated()
quint8 count = 0;
switch(ui->channelGroup->currentIndex()) {
switch (ui->channelGroup->currentIndex()) {
case -1: // Nothing selected
count = 0;
break;
@ -129,24 +129,25 @@ void inputChannelForm::groupUpdated()
Q_ASSERT(0);
}
for (int i = 0; i < count; i++)
ui->channelNumberDropdown->addItem(QString(tr("Chan %1").arg(i+1)));
for (int i = 0; i < count; i++) {
ui->channelNumberDropdown->addItem(QString(tr("Chan %1").arg(i + 1)));
}
ui->channelNumber->setMaximum(count);
ui->channelNumber->setMinimum(0);
}
/**
* Update the dropdown from the hidden control
*/
* Update the dropdown from the hidden control
*/
void inputChannelForm::channelDropdownUpdated(int newval)
{
ui->channelNumber->setValue(newval);
}
/**
* Update the hidden control from the dropdown
*/
* Update the hidden control from the dropdown
*/
void inputChannelForm::channelNumberUpdated(int newval)
{
ui->channelNumberDropdown->setCurrentIndex(newval);

View File

@ -38,7 +38,7 @@ MixerCurve::MixerCurve(QWidget *parent) :
m_mixerUI->setupUi(this);
// setup some convienence pointers
m_curve = m_mixerUI->CurveWidget;
m_curve = m_mixerUI->CurveWidget;
m_settings = m_mixerUI->CurveSettings;
@ -56,10 +56,10 @@ MixerCurve::MixerCurve(QWidget *parent) :
// wire up our signals
connect(m_mixerUI->CurveType, SIGNAL(currentIndexChanged(int)), this, SLOT(CurveTypeChanged()));
connect(m_mixerUI->ResetCurve, SIGNAL(clicked()), this, SLOT(ResetCurve()));
connect(m_mixerUI->PopupCurve, SIGNAL(clicked()),this,SLOT(PopupCurve()));
connect(m_mixerUI->PopupCurve, SIGNAL(clicked()), this, SLOT(PopupCurve()));
connect(m_mixerUI->GenerateCurve, SIGNAL(clicked()), this, SLOT(GenerateCurve()));
connect(m_curve, SIGNAL(curveUpdated()), this, SLOT(UpdateSettingsTable()));
connect(m_settings, SIGNAL(cellChanged(int,int)), this, SLOT(SettingsTableChanged()));
connect(m_settings, SIGNAL(cellChanged(int, int)), this, SLOT(SettingsTableChanged()));
connect(m_mixerUI->CurveMin, SIGNAL(valueChanged(double)), this, SLOT(CurveMinChanged(double)));
connect(m_mixerUI->CurveMax, SIGNAL(valueChanged(double)), this, SLOT(CurveMaxChanged(double)));
connect(m_mixerUI->CurveStep, SIGNAL(valueChanged(double)), this, SLOT(GenerateCurve()));
@ -79,26 +79,26 @@ void MixerCurve::setMixerType(MixerCurveType curveType)
m_mixerUI->CurveMax->setMaximum(1.0);
switch (m_curveType) {
case MixerCurve::MIXERCURVE_THROTTLE:
{
m_mixerUI->SettingsGroup->setTitle("Throttle Curve");
m_curve->setRange(0.0, 1.0);
m_mixerUI->CurveMin->setMinimum(0.0);
m_mixerUI->CurveMax->setMinimum(0.0);
break;
}
case MixerCurve::MIXERCURVE_PITCH:
{
m_mixerUI->SettingsGroup->setTitle("Pitch Curve");
m_curve->setRange(-1.0, 1.0);
m_mixerUI->CurveMin->setMinimum(-1.0);
m_mixerUI->CurveMax->setMinimum(-1.0);
break;
}
case MixerCurve::MIXERCURVE_THROTTLE:
{
m_mixerUI->SettingsGroup->setTitle("Throttle Curve");
m_curve->setRange(0.0, 1.0);
m_mixerUI->CurveMin->setMinimum(0.0);
m_mixerUI->CurveMax->setMinimum(0.0);
break;
}
case MixerCurve::MIXERCURVE_PITCH:
{
m_mixerUI->SettingsGroup->setTitle("Pitch Curve");
m_curve->setRange(-1.0, 1.0);
m_mixerUI->CurveMin->setMinimum(-1.0);
m_mixerUI->CurveMax->setMinimum(-1.0);
break;
}
}
m_spinDelegate->setRange(m_mixerUI->CurveMin->minimum(), m_mixerUI->CurveMax->maximum());
for (int i=0; i<MixerCurveWidget::NODE_NUMELEM; i++) {
for (int i = 0; i < MixerCurveWidget::NODE_NUMELEM; i++) {
m_settings->setItemDelegateForRow(i, m_spinDelegate);
}
@ -121,7 +121,7 @@ void MixerCurve::PopupCurve()
m_mixerUI->SettingsGroup->show();
m_mixerUI->PopupCurve->hide();
PopupWidget* popup = new PopupWidget();
PopupWidget *popup = new PopupWidget();
popup->popUp(this);
m_mixerUI->SettingsGroup->hide();
@ -130,7 +130,7 @@ void MixerCurve::PopupCurve()
void MixerCurve::UpdateCurveUI()
{
//get the user settings
// get the user settings
QString curveType = m_mixerUI->CurveType->currentText();
@ -138,7 +138,7 @@ void MixerCurve::UpdateCurveUI()
m_mixerUI->CurveStep->setMaximum(100.0);
m_mixerUI->CurveStep->setSingleStep(1.00);
//set default visible
// set default visible
m_mixerUI->minLabel->setVisible(true);
m_mixerUI->CurveMin->setVisible(true);
m_mixerUI->maxLabel->setVisible(false);
@ -146,8 +146,7 @@ void MixerCurve::UpdateCurveUI()
m_mixerUI->stepLabel->setVisible(false);
m_mixerUI->CurveStep->setVisible(false);
if ( curveType.compare("Flat")==0)
{
if (curveType.compare("Flat") == 0) {
m_mixerUI->minLabel->setVisible(false);
m_mixerUI->CurveMin->setVisible(false);
m_mixerUI->stepLabel->setVisible(true);
@ -157,13 +156,11 @@ void MixerCurve::UpdateCurveUI()
m_mixerUI->CurveStep->setSingleStep(0.01);
m_mixerUI->CurveStep->setValue(m_mixerUI->CurveMax->value() / 2);
}
if ( curveType.compare("Linear")==0)
{
if (curveType.compare("Linear") == 0) {
m_mixerUI->maxLabel->setVisible(true);
m_mixerUI->CurveMax->setVisible(true);
}
if ( curveType.compare("Step")==0)
{
if (curveType.compare("Step") == 0) {
m_mixerUI->maxLabel->setVisible(true);
m_mixerUI->CurveMax->setVisible(true);
m_mixerUI->stepLabel->setText("Step at");
@ -172,8 +169,7 @@ void MixerCurve::UpdateCurveUI()
m_mixerUI->CurveStep->setMinimum(1.0);
}
if ( curveType.compare("Exp")==0)
{
if (curveType.compare("Exp") == 0) {
m_mixerUI->maxLabel->setVisible(true);
m_mixerUI->CurveMax->setVisible(true);
m_mixerUI->stepLabel->setText("Power");
@ -182,13 +178,12 @@ void MixerCurve::UpdateCurveUI()
m_mixerUI->CurveStep->setMinimum(1.0);
}
if ( curveType.compare("Log")==0)
{
if (curveType.compare("Log") == 0) {
m_mixerUI->maxLabel->setVisible(true);
m_mixerUI->CurveMax->setVisible(true);
m_mixerUI->stepLabel->setText("Power");
m_mixerUI->stepLabel->setVisible(true);
m_mixerUI->CurveStep->setVisible(true);
m_mixerUI->CurveStep->setVisible(true);
m_mixerUI->CurveStep->setMinimum(1.0);
}
@ -197,61 +192,52 @@ void MixerCurve::UpdateCurveUI()
void MixerCurve::GenerateCurve()
{
double scale;
double newValue;
double scale;
double newValue;
//get the user settings
double value1 = getCurveMin();
double value2 = getCurveMax();
double value3 = getCurveStep();
// get the user settings
double value1 = getCurveMin();
double value2 = getCurveMax();
double value3 = getCurveStep();
QString CurveType = m_mixerUI->CurveType->currentText();
QString CurveType = m_mixerUI->CurveType->currentText();
QList<double> points;
QList<double> points;
for (int i=0; i<MixerCurveWidget::NODE_NUMELEM; i++)
{
scale =((double)i/(double)(MixerCurveWidget::NODE_NUMELEM - 1));
for (int i = 0; i < MixerCurveWidget::NODE_NUMELEM; i++) {
scale = ((double)i / (double)(MixerCurveWidget::NODE_NUMELEM - 1));
if ( CurveType.compare("Flat")==0)
{
points.append(value3);
}
if ( CurveType.compare("Linear")==0)
{
newValue =value1 +(scale*(value2-value1));
points.append(newValue);
}
if ( CurveType.compare("Step")==0)
{
if (scale*100<value3)
{
points.append(value1);
}
else
{
points.append(value2);
}
}
if ( CurveType.compare("Exp")==0)
{
newValue =value1 +(((exp(scale*(value3/10))-1))/(exp((value3/10))-1)*(value2-value1));
points.append(newValue);
}
if ( CurveType.compare("Log")==0)
{
newValue = value1 +(((log(scale*(value3*2)+1))/(log(1+(value3*2))))*(value2-value1));
points.append(newValue);
}
}
if (CurveType.compare("Flat") == 0) {
points.append(value3);
}
if (CurveType.compare("Linear") == 0) {
newValue = value1 + (scale * (value2 - value1));
points.append(newValue);
}
if (CurveType.compare("Step") == 0) {
if (scale * 100 < value3) {
points.append(value1);
} else {
points.append(value2);
}
}
if (CurveType.compare("Exp") == 0) {
newValue = value1 + (((exp(scale * (value3 / 10)) - 1)) / (exp((value3 / 10)) - 1) * (value2 - value1));
points.append(newValue);
}
if (CurveType.compare("Log") == 0) {
newValue = value1 + (((log(scale * (value3 * 2) + 1)) / (log(1 + (value3 * 2)))) * (value2 - value1));
points.append(newValue);
}
}
setCurve(&points);
setCurve(&points);
}
/**
Wrappers for mixercurvewidget.
*/
void MixerCurve::initCurve (const QList<double>* points)
Wrappers for mixercurvewidget.
*/
void MixerCurve::initCurve(const QList<double> *points)
{
m_curve->setCurve(points);
UpdateSettingsTable();
@ -269,11 +255,12 @@ void MixerCurve::initLinearCurve(int numPoints, double maxValue, double minValue
m_curve->initLinearCurve(numPoints, maxValue, minValue);
if (m_spinDelegate)
if (m_spinDelegate) {
m_spinDelegate->setRange(minValue, maxValue);
}
}
void MixerCurve::setCurve(const QList<double>* points)
void MixerCurve::setCurve(const QList<double> *points)
{
m_curve->setCurve(points);
UpdateSettingsTable();
@ -281,7 +268,7 @@ void MixerCurve::setCurve(const QList<double>* points)
void MixerCurve::setMin(double value)
{
//m_curve->setMin(value);
// m_curve->setMin(value);
m_mixerUI->CurveMin->setMinimum(value);
}
@ -292,7 +279,7 @@ double MixerCurve::getMin()
void MixerCurve::setMax(double value)
{
//m_curve->setMax(value);
// m_curve->setMax(value);
m_mixerUI->CurveMax->setMaximum(value);
}
@ -326,11 +313,11 @@ void MixerCurve::UpdateSettingsTable()
QList<double> points = m_curve->getCurve();
int ptCnt = points.count();
for (int i=0; i<ptCnt; i++)
{
QTableWidgetItem* item = m_settings->item(i, 0);
if (item)
item->setText(QString().sprintf("%.2f",points.at( (ptCnt - 1) - i )));
for (int i = 0; i < ptCnt; i++) {
QTableWidgetItem *item = m_settings->item(i, 0);
if (item) {
item->setText(QString().sprintf("%.2f", points.at((ptCnt - 1) - i)));
}
}
}
@ -338,12 +325,12 @@ void MixerCurve::SettingsTableChanged()
{
QList<double> points;
for (int i=0; i < m_settings->rowCount(); i++)
{
QTableWidgetItem* item = m_settings->item(i, 0);
for (int i = 0; i < m_settings->rowCount(); i++) {
QTableWidgetItem *item = m_settings->item(i, 0);
if (item)
if (item) {
points.push_front(item->text().toDouble());
}
}
m_mixerUI->CurveMin->setValue(points.first());
@ -369,7 +356,7 @@ void MixerCurve::CurveMinChanged(double value)
void MixerCurve::CurveMaxChanged(double value)
{
// the max changed so redraw the curve
// mixercurvewidget::setCurve will trim any points above max
// mixercurvewidget::setCurve will trim any points above max
QList<double> points = m_curve->getCurve();
points.removeLast();
points.append(value);
@ -381,23 +368,25 @@ void MixerCurve::showEvent(QShowEvent *event)
Q_UNUSED(event);
m_settings->resizeColumnsToContents();
m_settings->setColumnWidth(0,(m_settings->width()- m_settings->verticalHeader()->width()));
m_settings->setColumnWidth(0, (m_settings->width() - m_settings->verticalHeader()->width()));
int h = (m_settings->height() - m_settings->horizontalHeader()->height()) / m_settings->rowCount();
for (int i=0; i<m_settings->rowCount(); i++)
int h = (m_settings->height() - m_settings->horizontalHeader()->height()) / m_settings->rowCount();
for (int i = 0; i < m_settings->rowCount(); i++) {
m_settings->setRowHeight(i, h);
}
m_curve->showEvent(event);
}
void MixerCurve::resizeEvent(QResizeEvent* event)
void MixerCurve::resizeEvent(QResizeEvent *event)
{
m_settings->resizeColumnsToContents();
m_settings->setColumnWidth(0,(m_settings->width() - m_settings->verticalHeader()->width()));
m_settings->setColumnWidth(0, (m_settings->width() - m_settings->verticalHeader()->width()));
int h = (m_settings->height() - m_settings->horizontalHeader()->height()) / m_settings->rowCount();
for (int i=0; i<m_settings->rowCount(); i++)
int h = (m_settings->height() - m_settings->horizontalHeader()->height()) / m_settings->rowCount();
for (int i = 0; i < m_settings->rowCount(); i++) {
m_settings->setRowHeight(i, h);
}
m_curve->resizeEvent(event);
}

View File

@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>1076</width>
<width>1075</width>
<height>834</height>
</rect>
</property>
@ -589,6 +589,9 @@
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<property name="lineWidth">
<number>0</number>
</property>
@ -600,11 +603,2023 @@
<rect>
<x>0</x>
<y>0</y>
<width>1046</width>
<width>1045</width>
<height>751</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="spacing">
<number>9</number>
</property>
<property name="topMargin">
<number>9</number>
</property>
<item>
<widget class="QGroupBox" name="basicResponsivenessGroupBox">
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="title">
<string>Responsiveness</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
<property name="flat">
<bool>false</bool>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout_7" rowstretch="0,0">
<property name="margin">
<number>12</number>
</property>
<item row="0" column="4">
<widget class="QPushButton" name="pushButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Default</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="4">
<spacer name="horizontalSpacer_37">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="0" colspan="5">
<widget class="QGroupBox" name="groupBox_7">
<property name="styleSheet">
<string>QGroupBox{border: 0px;}</string>
</property>
<property name="title">
<string/>
</property>
<property name="flat">
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout_10">
<property name="leftMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item row="0" column="3">
<widget class="QLabel" name="label_143">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>16</height>
</size>
</property>
<property name="palette">
<palette>
<active>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>14</red>
<green>200</green>
<blue>14</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>6</red>
<green>150</green>
<blue>6</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Light">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>58</red>
<green>58</green>
<blue>58</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>48</red>
<green>48</green>
<blue>48</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>19</red>
<green>19</green>
<blue>19</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>26</red>
<green>26</green>
<blue>26</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>14</red>
<green>200</green>
<blue>14</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>6</red>
<green>150</green>
<blue>6</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>14</red>
<green>200</green>
<blue>14</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>6</red>
<green>150</green>
<blue>6</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>19</red>
<green>19</green>
<blue>19</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>220</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>14</red>
<green>200</green>
<blue>14</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>6</red>
<green>150</green>
<blue>6</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Light">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>58</red>
<green>58</green>
<blue>58</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>48</red>
<green>48</green>
<blue>48</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>19</red>
<green>19</green>
<blue>19</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>26</red>
<green>26</green>
<blue>26</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>14</red>
<green>200</green>
<blue>14</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>6</red>
<green>150</green>
<blue>6</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>14</red>
<green>200</green>
<blue>14</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>6</red>
<green>150</green>
<blue>6</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>19</red>
<green>19</green>
<blue>19</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>220</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>14</red>
<green>200</green>
<blue>14</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>6</red>
<green>150</green>
<blue>6</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Light">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>58</red>
<green>58</green>
<blue>58</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>48</red>
<green>48</green>
<blue>48</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>19</red>
<green>19</green>
<blue>19</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>26</red>
<green>26</green>
<blue>26</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>14</red>
<green>200</green>
<blue>14</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>6</red>
<green>150</green>
<blue>6</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>14</red>
<green>200</green>
<blue>14</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>6</red>
<green>150</green>
<blue>6</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>39</red>
<green>39</green>
<blue>39</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>220</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="styleSheet">
<string notr="true">background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(14, 200, 14, 255), stop:0.78607 rgba(6, 150, 6 , 255));
color: rgb(255, 255, 255);
border-radius: 5;</string>
</property>
<property name="text">
<string>Snappy</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="6">
<widget class="QSpinBox" name="spinBox">
<property name="minimumSize">
<size>
<width>50</width>
<height>22</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>50</width>
<height>22</height>
</size>
</property>
<property name="minimum">
<number>10</number>
</property>
<property name="maximum">
<number>500</number>
</property>
<property name="value">
<number>150</number>
</property>
<property name="objrelation" stdset="0">
<stringlist>
<string>objname:StabilizationSettings</string>
<string>fieldname:RollMax</string>
<string>haslimits:no</string>
<string>scale:1</string>
<string>buttongroup:6,20</string>
</stringlist>
</property>
</widget>
</item>
<item row="2" column="1" colspan="5">
<widget class="QSlider" name="RateResponsivenessSlider">
<property name="minimum">
<number>100</number>
</property>
<property name="maximum">
<number>800</number>
</property>
<property name="value">
<number>450</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="tickPosition">
<enum>QSlider::TicksBelow</enum>
</property>
<property name="tickInterval">
<number>25</number>
</property>
<property name="objrelation" stdset="0">
<stringlist>
<string>objname:StabilizationSettings</string>
<string>fieldname:ManualRate</string>
<string>element:Roll</string>
<string>haslimits:no</string>
<string>scale:1</string>
<string>buttongroup:6,20</string>
</stringlist>
</property>
</widget>
</item>
<item row="0" column="2">
<spacer name="horizontalSpacer_50">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="6">
<widget class="QSpinBox" name="spinBox_2">
<property name="minimumSize">
<size>
<width>50</width>
<height>22</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>50</width>
<height>22</height>
</size>
</property>
<property name="minimum">
<number>100</number>
</property>
<property name="maximum">
<number>800</number>
</property>
<property name="value">
<number>300</number>
</property>
<property name="objrelation" stdset="0">
<stringlist>
<string>objname:StabilizationSettings</string>
<string>fieldname:ManualRate</string>
<string>element:Roll</string>
<string>haslimits:no</string>
<string>scale:1</string>
<string>buttongroup:6,20</string>
</stringlist>
</property>
</widget>
</item>
<item row="0" column="4">
<spacer name="horizontalSpacer_51">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_142">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>16</height>
</size>
</property>
<property name="palette">
<palette>
<active>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>34</red>
<green>34</green>
<blue>200</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>6</red>
<green>6</green>
<blue>150</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Light">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>58</red>
<green>58</green>
<blue>58</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>48</red>
<green>48</green>
<blue>48</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>19</red>
<green>19</green>
<blue>19</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>26</red>
<green>26</green>
<blue>26</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>34</red>
<green>34</green>
<blue>200</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>6</red>
<green>6</green>
<blue>150</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>34</red>
<green>34</green>
<blue>200</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>6</red>
<green>6</green>
<blue>150</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>19</red>
<green>19</green>
<blue>19</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>220</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>34</red>
<green>34</green>
<blue>200</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>6</red>
<green>6</green>
<blue>150</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Light">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>58</red>
<green>58</green>
<blue>58</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>48</red>
<green>48</green>
<blue>48</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>19</red>
<green>19</green>
<blue>19</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>26</red>
<green>26</green>
<blue>26</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>34</red>
<green>34</green>
<blue>200</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>6</red>
<green>6</green>
<blue>150</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>34</red>
<green>34</green>
<blue>200</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>6</red>
<green>6</green>
<blue>150</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>19</red>
<green>19</green>
<blue>19</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>220</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>34</red>
<green>34</green>
<blue>200</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>6</red>
<green>6</green>
<blue>150</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Light">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>58</red>
<green>58</green>
<blue>58</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>48</red>
<green>48</green>
<blue>48</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>19</red>
<green>19</green>
<blue>19</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>26</red>
<green>26</green>
<blue>26</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>34</red>
<green>34</green>
<blue>200</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>6</red>
<green>6</green>
<blue>150</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>34</red>
<green>34</green>
<blue>200</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>6</red>
<green>6</green>
<blue>150</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>39</red>
<green>39</green>
<blue>39</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>220</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="styleSheet">
<string notr="true">background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(34, 34, 200, 255), stop:0.78607 rgba(6, 6, 150, 255));
color: rgb(255, 255, 255);
border-radius: 5;</string>
</property>
<property name="text">
<string>Moderate</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="5">
<widget class="QLabel" name="label_144">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>16</height>
</size>
</property>
<property name="palette">
<palette>
<active>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>200</red>
<green>14</green>
<blue>14</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>160</red>
<green>6</green>
<blue>6</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Light">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>58</red>
<green>58</green>
<blue>58</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>48</red>
<green>48</green>
<blue>48</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>19</red>
<green>19</green>
<blue>19</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>26</red>
<green>26</green>
<blue>26</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>200</red>
<green>14</green>
<blue>14</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>160</red>
<green>6</green>
<blue>6</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>200</red>
<green>14</green>
<blue>14</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>160</red>
<green>6</green>
<blue>6</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>19</red>
<green>19</green>
<blue>19</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>220</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>200</red>
<green>14</green>
<blue>14</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>160</red>
<green>6</green>
<blue>6</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Light">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>58</red>
<green>58</green>
<blue>58</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>48</red>
<green>48</green>
<blue>48</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>19</red>
<green>19</green>
<blue>19</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>26</red>
<green>26</green>
<blue>26</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>200</red>
<green>14</green>
<blue>14</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>160</red>
<green>6</green>
<blue>6</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>200</red>
<green>14</green>
<blue>14</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>160</red>
<green>6</green>
<blue>6</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>19</red>
<green>19</green>
<blue>19</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>220</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>200</red>
<green>14</green>
<blue>14</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>160</red>
<green>6</green>
<blue>6</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Light">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>58</red>
<green>58</green>
<blue>58</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>48</red>
<green>48</green>
<blue>48</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>19</red>
<green>19</green>
<blue>19</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>26</red>
<green>26</green>
<blue>26</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>200</red>
<green>14</green>
<blue>14</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>160</red>
<green>6</green>
<blue>6</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>200</red>
<green>14</green>
<blue>14</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>160</red>
<green>6</green>
<blue>6</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>39</red>
<green>39</green>
<blue>39</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>220</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="styleSheet">
<string notr="true">background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(200, 14, 14, 255), stop:0.78607 rgba(160 , 6, 6 , 255));
color: rgb(255, 255, 255);
border-radius: 5;</string>
</property>
<property name="text">
<string>Insane</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label">
<property name="minimumSize">
<size>
<width>78</width>
<height>16</height>
</size>
</property>
<property name="text">
<string>Attitude mode</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_2">
<property name="minimumSize">
<size>
<width>78</width>
<height>16</height>
</size>
</property>
<property name="text">
<string>Rate mode</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="1" column="1" colspan="5">
<widget class="QSlider" name="AttitudeResponsivenessSlider">
<property name="minimum">
<number>10</number>
</property>
<property name="maximum">
<number>500</number>
</property>
<property name="singleStep">
<number>1</number>
</property>
<property name="value">
<number>255</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="tickPosition">
<enum>QSlider::TicksBelow</enum>
</property>
<property name="tickInterval">
<number>25</number>
</property>
<property name="objrelation" stdset="0">
<stringlist>
<string>objname:StabilizationSettings</string>
<string>fieldname:RollMax</string>
<string>haslimits:no</string>
<string>scale:1</string>
<string>buttongroup:6,20</string>
</stringlist>
</property>
</widget>
</item>
<item row="3" column="1" colspan="5">
<widget class="QSlider" name="RateYawResponsivenessSlider">
<property name="minimum">
<number>100</number>
</property>
<property name="maximum">
<number>800</number>
</property>
<property name="value">
<number>450</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="tickPosition">
<enum>QSlider::TicksBelow</enum>
</property>
<property name="tickInterval">
<number>25</number>
</property>
<property name="objrelation" stdset="0">
<stringlist>
<string>objname:StabilizationSettings</string>
<string>fieldname:ManualRate</string>
<string>element:Yaw</string>
<string>haslimits:no</string>
<string>scale:1</string>
<string>buttongroup:6,20</string>
</stringlist>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_5">
<property name="minimumSize">
<size>
<width>78</width>
<height>16</height>
</size>
</property>
<property name="text">
<string>Rate mode yaw</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="3" column="6">
<widget class="QSpinBox" name="spinBox_5">
<property name="minimumSize">
<size>
<width>50</width>
<height>22</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>50</width>
<height>22</height>
</size>
</property>
<property name="minimum">
<number>100</number>
</property>
<property name="maximum">
<number>800</number>
</property>
<property name="value">
<number>300</number>
</property>
<property name="objrelation" stdset="0">
<stringlist>
<string>objname:StabilizationSettings</string>
<string>fieldname:ManualRate</string>
<string>element:Yaw</string>
<string>haslimits:no</string>
<string>scale:1</string>
<string>buttongroup:6,20</string>
</stringlist>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="RateStabilizationGroup_15">
<property name="sizePolicy">
@ -1157,7 +3172,7 @@
<bool>false</bool>
</property>
<property name="styleSheet">
<string notr="true"/>
<string notr="true">QGroupBox{border: 0px;}</string>
</property>
<property name="title">
<string/>
@ -1166,569 +3181,15 @@
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout_11" columnstretch="0,1,0,1,0,1,0">
<item row="0" column="0">
<spacer name="horizontalSpacer_44">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_138">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>16</height>
</size>
</property>
<property name="palette">
<palette>
<active>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>74</red>
<green>74</green>
<blue>74</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>36</red>
<green>36</green>
<blue>36</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Light">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>58</red>
<green>58</green>
<blue>58</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>48</red>
<green>48</green>
<blue>48</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>19</red>
<green>19</green>
<blue>19</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>26</red>
<green>26</green>
<blue>26</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>74</red>
<green>74</green>
<blue>74</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>36</red>
<green>36</green>
<blue>36</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>74</red>
<green>74</green>
<blue>74</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>36</red>
<green>36</green>
<blue>36</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>19</red>
<green>19</green>
<blue>19</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>220</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>74</red>
<green>74</green>
<blue>74</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>36</red>
<green>36</green>
<blue>36</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Light">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>58</red>
<green>58</green>
<blue>58</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>48</red>
<green>48</green>
<blue>48</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>19</red>
<green>19</green>
<blue>19</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>26</red>
<green>26</green>
<blue>26</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>74</red>
<green>74</green>
<blue>74</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>36</red>
<green>36</green>
<blue>36</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>74</red>
<green>74</green>
<blue>74</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>36</red>
<green>36</green>
<blue>36</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>19</red>
<green>19</green>
<blue>19</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>220</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>74</red>
<green>74</green>
<blue>74</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>36</red>
<green>36</green>
<blue>36</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Light">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>58</red>
<green>58</green>
<blue>58</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>48</red>
<green>48</green>
<blue>48</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>19</red>
<green>19</green>
<blue>19</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>26</red>
<green>26</green>
<blue>26</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>74</red>
<green>74</green>
<blue>74</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>36</red>
<green>36</green>
<blue>36</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>74</red>
<green>74</green>
<blue>74</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>36</red>
<green>36</green>
<blue>36</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>39</red>
<green>39</green>
<blue>39</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>220</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="styleSheet">
<string notr="true">background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255));
color: rgb(255, 255, 255);
border-radius: 5;</string>
</property>
<property name="text">
<string>Roll</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<property name="leftMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item row="0" column="2">
<spacer name="horizontalSpacer_16">
<property name="orientation">
@ -1742,555 +3203,18 @@ border-radius: 5;</string>
</property>
</spacer>
</item>
<item row="0" column="3">
<widget class="QLabel" name="label_139">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
<item row="0" column="0">
<spacer name="horizontalSpacer_44">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="minimumSize">
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>16</height>
<width>40</width>
<height>20</height>
</size>
</property>
<property name="palette">
<palette>
<active>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>74</red>
<green>74</green>
<blue>74</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>36</red>
<green>36</green>
<blue>36</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Light">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>58</red>
<green>58</green>
<blue>58</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>48</red>
<green>48</green>
<blue>48</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>19</red>
<green>19</green>
<blue>19</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>26</red>
<green>26</green>
<blue>26</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>74</red>
<green>74</green>
<blue>74</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>36</red>
<green>36</green>
<blue>36</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>74</red>
<green>74</green>
<blue>74</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>36</red>
<green>36</green>
<blue>36</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>19</red>
<green>19</green>
<blue>19</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>220</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>74</red>
<green>74</green>
<blue>74</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>36</red>
<green>36</green>
<blue>36</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Light">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>58</red>
<green>58</green>
<blue>58</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>48</red>
<green>48</green>
<blue>48</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>19</red>
<green>19</green>
<blue>19</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>26</red>
<green>26</green>
<blue>26</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>74</red>
<green>74</green>
<blue>74</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>36</red>
<green>36</green>
<blue>36</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>74</red>
<green>74</green>
<blue>74</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>36</red>
<green>36</green>
<blue>36</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>19</red>
<green>19</green>
<blue>19</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>220</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>74</red>
<green>74</green>
<blue>74</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>36</red>
<green>36</green>
<blue>36</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Light">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>58</red>
<green>58</green>
<blue>58</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>48</red>
<green>48</green>
<blue>48</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>19</red>
<green>19</green>
<blue>19</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>26</red>
<green>26</green>
<blue>26</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>74</red>
<green>74</green>
<blue>74</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>36</red>
<green>36</green>
<blue>36</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>74</red>
<green>74</green>
<blue>74</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>36</red>
<green>36</green>
<blue>36</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>39</red>
<green>39</green>
<blue>39</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>220</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="styleSheet">
<string notr="true">background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255));
color: rgb(255, 255, 255);
border-radius: 5;</string>
</property>
<property name="text">
<string>Pitch</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</spacer>
</item>
<item row="0" column="4">
<spacer name="horizontalSpacer_20">
@ -2855,45 +3779,557 @@ border-radius: 5;</string>
</property>
</widget>
</item>
<item row="0" column="6">
<spacer name="horizontalSpacer_45">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_141">
<item row="0" column="3">
<widget class="QLabel" name="label_139">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>78</width>
<width>0</width>
<height>16</height>
</size>
</property>
<property name="palette">
<palette>
<active>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>74</red>
<green>74</green>
<blue>74</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>36</red>
<green>36</green>
<blue>36</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Light">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>58</red>
<green>58</green>
<blue>58</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>48</red>
<green>48</green>
<blue>48</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>19</red>
<green>19</green>
<blue>19</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>26</red>
<green>26</green>
<blue>26</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>74</red>
<green>74</green>
<blue>74</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>36</red>
<green>36</green>
<blue>36</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>74</red>
<green>74</green>
<blue>74</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>36</red>
<green>36</green>
<blue>36</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>19</red>
<green>19</green>
<blue>19</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>220</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>74</red>
<green>74</green>
<blue>74</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>36</red>
<green>36</green>
<blue>36</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Light">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>58</red>
<green>58</green>
<blue>58</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>48</red>
<green>48</green>
<blue>48</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>19</red>
<green>19</green>
<blue>19</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>26</red>
<green>26</green>
<blue>26</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>74</red>
<green>74</green>
<blue>74</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>36</red>
<green>36</green>
<blue>36</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>74</red>
<green>74</green>
<blue>74</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>36</red>
<green>36</green>
<blue>36</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>19</red>
<green>19</green>
<blue>19</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>220</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>74</red>
<green>74</green>
<blue>74</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>36</red>
<green>36</green>
<blue>36</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Light">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>58</red>
<green>58</green>
<blue>58</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>48</red>
<green>48</green>
<blue>48</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>19</red>
<green>19</green>
<blue>19</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>26</red>
<green>26</green>
<blue>26</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>74</red>
<green>74</green>
<blue>74</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>36</red>
<green>36</green>
<blue>36</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>74</red>
<green>74</green>
<blue>74</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>36</red>
<green>36</green>
<blue>36</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>39</red>
<green>39</green>
<blue>39</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>220</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="styleSheet">
<string notr="true"/>
<string notr="true">background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255));
color: rgb(255, 255, 255);
border-radius: 5;</string>
</property>
<property name="text">
<string>Proportional</string>
<string>Pitch</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="1">
<item row="2" column="1">
<widget class="QSlider" name="horizontalSlider_76">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
@ -2947,7 +4383,7 @@ Then lower the value by 5 or so.</string>
</property>
</widget>
</item>
<item row="1" column="2">
<item row="2" column="2">
<widget class="QSpinBox" name="spinBox_7">
<property name="minimumSize">
<size>
@ -2986,97 +4422,32 @@ Then lower the value by 5 or so.</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QSlider" name="PitchPSlider">
<item row="2" column="0">
<widget class="QLabel" name="label_141">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>25</height>
<width>78</width>
<height>16</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="toolTip">
<string>Slowly raise Proportional until you start seeing clear oscillations when you fly.
Then lower the value by 5 or so.</string>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="maximum">
<number>100</number>
<property name="text">
<string>Proportional</string>
</property>
<property name="sliderPosition">
<number>50</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="tickPosition">
<enum>QSlider::TicksBelow</enum>
</property>
<property name="tickInterval">
<number>25</number>
</property>
<property name="objrelation" stdset="0">
<stringlist>
<string>objname:StabilizationSettings</string>
<string>fieldname:PitchRatePID</string>
<string>element:Kp</string>
<string>haslimits:yes</string>
<string>scale:0.0001</string>
<string>buttongroup:1,10</string>
</stringlist>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="1" column="4">
<widget class="QSpinBox" name="spinBox_PitchRateP">
<property name="minimumSize">
<size>
<width>50</width>
<height>22</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>50</width>
<height>22</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="toolTip">
<string>Slowly raise Proportional until you start seeing clear oscillations when you fly.
Then lower the value by 5 or so.</string>
</property>
<property name="maximum">
<number>200</number>
</property>
<property name="value">
<number>200</number>
</property>
<property name="objrelation" stdset="0">
<stringlist>
<string>objname:StabilizationSettings</string>
<string>fieldname:PitchRatePID</string>
<string>element:Kp</string>
<string>haslimits:yes</string>
<string>scale:0.0001</string>
<string>buttongroup:1,10</string>
</stringlist>
</property>
</widget>
</item>
<item row="1" column="5">
<item row="2" column="5">
<widget class="QSlider" name="horizontalSlider_78">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
@ -3127,7 +4498,97 @@ Then lower the value by 5 or so.</string>
</property>
</widget>
</item>
<item row="1" column="6">
<item row="2" column="3">
<widget class="QSlider" name="PitchPSlider">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>25</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="toolTip">
<string>Slowly raise Proportional until you start seeing clear oscillations when you fly.
Then lower the value by 5 or so.</string>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="maximum">
<number>100</number>
</property>
<property name="sliderPosition">
<number>50</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="tickPosition">
<enum>QSlider::TicksBelow</enum>
</property>
<property name="tickInterval">
<number>25</number>
</property>
<property name="objrelation" stdset="0">
<stringlist>
<string>objname:StabilizationSettings</string>
<string>fieldname:PitchRatePID</string>
<string>element:Kp</string>
<string>haslimits:yes</string>
<string>scale:0.0001</string>
<string>buttongroup:1,10</string>
</stringlist>
</property>
</widget>
</item>
<item row="2" column="4">
<widget class="QSpinBox" name="spinBox_PitchRateP">
<property name="minimumSize">
<size>
<width>50</width>
<height>22</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>50</width>
<height>22</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="toolTip">
<string>Slowly raise Proportional until you start seeing clear oscillations when you fly.
Then lower the value by 5 or so.</string>
</property>
<property name="maximum">
<number>200</number>
</property>
<property name="value">
<number>200</number>
</property>
<property name="objrelation" stdset="0">
<stringlist>
<string>objname:StabilizationSettings</string>
<string>fieldname:PitchRatePID</string>
<string>element:Kp</string>
<string>haslimits:yes</string>
<string>scale:0.0001</string>
<string>buttongroup:1,10</string>
</stringlist>
</property>
</widget>
</item>
<item row="2" column="6">
<widget class="QSpinBox" name="spinBox_12">
<property name="minimumSize">
<size>
@ -3166,26 +4627,7 @@ Then lower the value by 5 or so.</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_145">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string>Integral</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="2" column="1">
<item row="3" column="1">
<widget class="QSlider" name="horizontalSlider_79">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
@ -3236,7 +4678,26 @@ value as the Kp.</string>
</property>
</widget>
</item>
<item row="2" column="2">
<item row="3" column="0">
<widget class="QLabel" name="label_145">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string>Integral</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QSpinBox" name="spinBox_8">
<property name="minimumSize">
<size>
@ -3275,59 +4736,8 @@ value as the Kp.</string>
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="QSlider" name="horizontalSlider_80">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>25</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="toolTip">
<string>As a rule of thumb, you can set the Integral at roughly the same
value as the Kp.</string>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="maximum">
<number>100</number>
</property>
<property name="sliderPosition">
<number>50</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="tickPosition">
<enum>QSlider::TicksBelow</enum>
</property>
<property name="tickInterval">
<number>25</number>
</property>
<property name="objrelation" stdset="0">
<stringlist>
<string>objname:StabilizationSettings</string>
<string>fieldname:PitchRatePID</string>
<string>element:Ki</string>
<string>haslimits:yes</string>
<string>scale:0.0001</string>
<string>buttongroup:1,10</string>
</stringlist>
</property>
</widget>
</item>
<item row="2" column="4">
<widget class="QSpinBox" name="spinBox_9">
<item row="3" column="6">
<widget class="QSpinBox" name="spinBox_10">
<property name="minimumSize">
<size>
<width>50</width>
@ -3356,7 +4766,7 @@ value as the Kp.</string>
<property name="objrelation" stdset="0">
<stringlist>
<string>objname:StabilizationSettings</string>
<string>fieldname:PitchRatePID</string>
<string>fieldname:YawRatePID</string>
<string>element:Ki</string>
<string>haslimits:yes</string>
<string>scale:0.0001</string>
@ -3365,7 +4775,7 @@ value as the Kp.</string>
</property>
</widget>
</item>
<item row="2" column="5">
<item row="3" column="5">
<widget class="QSlider" name="horizontalSlider_81">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
@ -3416,8 +4826,59 @@ value as the Kp.</string>
</property>
</widget>
</item>
<item row="2" column="6">
<widget class="QSpinBox" name="spinBox_10">
<item row="3" column="3">
<widget class="QSlider" name="horizontalSlider_80">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>25</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="toolTip">
<string>As a rule of thumb, you can set the Integral at roughly the same
value as the Kp.</string>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="maximum">
<number>100</number>
</property>
<property name="sliderPosition">
<number>50</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="tickPosition">
<enum>QSlider::TicksBelow</enum>
</property>
<property name="tickInterval">
<number>25</number>
</property>
<property name="objrelation" stdset="0">
<stringlist>
<string>objname:StabilizationSettings</string>
<string>fieldname:PitchRatePID</string>
<string>element:Ki</string>
<string>haslimits:yes</string>
<string>scale:0.0001</string>
<string>buttongroup:1,10</string>
</stringlist>
</property>
</widget>
</item>
<item row="3" column="4">
<widget class="QSpinBox" name="spinBox_9">
<property name="minimumSize">
<size>
<width>50</width>
@ -3446,7 +4907,7 @@ value as the Kp.</string>
<property name="objrelation" stdset="0">
<stringlist>
<string>objname:StabilizationSettings</string>
<string>fieldname:YawRatePID</string>
<string>fieldname:PitchRatePID</string>
<string>element:Ki</string>
<string>haslimits:yes</string>
<string>scale:0.0001</string>
@ -3455,6 +4916,569 @@ value as the Kp.</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_138">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>16</height>
</size>
</property>
<property name="palette">
<palette>
<active>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>74</red>
<green>74</green>
<blue>74</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>36</red>
<green>36</green>
<blue>36</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Light">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>58</red>
<green>58</green>
<blue>58</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>48</red>
<green>48</green>
<blue>48</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>19</red>
<green>19</green>
<blue>19</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>26</red>
<green>26</green>
<blue>26</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>74</red>
<green>74</green>
<blue>74</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>36</red>
<green>36</green>
<blue>36</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>74</red>
<green>74</green>
<blue>74</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>36</red>
<green>36</green>
<blue>36</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>19</red>
<green>19</green>
<blue>19</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>220</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>74</red>
<green>74</green>
<blue>74</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>36</red>
<green>36</green>
<blue>36</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Light">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>58</red>
<green>58</green>
<blue>58</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>48</red>
<green>48</green>
<blue>48</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>19</red>
<green>19</green>
<blue>19</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>26</red>
<green>26</green>
<blue>26</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>74</red>
<green>74</green>
<blue>74</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>36</red>
<green>36</green>
<blue>36</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>74</red>
<green>74</green>
<blue>74</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>36</red>
<green>36</green>
<blue>36</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>19</red>
<green>19</green>
<blue>19</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>220</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>74</red>
<green>74</green>
<blue>74</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>36</red>
<green>36</green>
<blue>36</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Light">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>58</red>
<green>58</green>
<blue>58</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>48</red>
<green>48</green>
<blue>48</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>19</red>
<green>19</green>
<blue>19</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>26</red>
<green>26</green>
<blue>26</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>74</red>
<green>74</green>
<blue>74</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>36</red>
<green>36</green>
<blue>36</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="LinearGradientPattern">
<gradient startx="0.507000000000000" starty="0.000000000000000" endx="0.507000000000000" endy="0.772000000000000" type="LinearGradient" spread="ReflectSpread" coordinatemode="ObjectBoundingMode">
<gradientstop position="0.208955000000000">
<color alpha="255">
<red>74</red>
<green>74</green>
<blue>74</blue>
</color>
</gradientstop>
<gradientstop position="0.786070000000000">
<color alpha="255">
<red>36</red>
<green>36</green>
<blue>36</blue>
</color>
</gradientstop>
</gradient>
</brush>
</colorrole>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>39</red>
<green>39</green>
<blue>39</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>220</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="styleSheet">
<string notr="true">background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255));
color: rgb(255, 255, 255);
border-radius: 5;</string>
</property>
<property name="text">
<string>Roll</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="6">
<spacer name="horizontalSpacer_45">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
@ -4510,7 +6534,7 @@ value as the Kp.</string>
<bool>false</bool>
</property>
<property name="styleSheet">
<string notr="true"/>
<string notr="true">QGroupBox{border: 0px;}</string>
</property>
<property name="title">
<string/>
@ -4519,6 +6543,15 @@ value as the Kp.</string>
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout_12" columnstretch="0,1,0,1,0,1,0">
<property name="leftMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item row="0" column="1">
<widget class="QLabel" name="label_150">
<property name="sizePolicy">
@ -6978,7 +9011,7 @@ border-radius: 5;</string>
<rect>
<x>0</x>
<y>0</y>
<width>1046</width>
<width>1045</width>
<height>751</height>
</rect>
</property>
@ -6986,8 +9019,11 @@ border-radius: 5;</string>
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_16">
<property name="spacing">
<number>9</number>
</property>
<property name="margin">
<number>12</number>
<number>9</number>
</property>
<item>
<widget class="QGroupBox" name="RateStabilizationGroup_8">
@ -7524,7 +9560,7 @@ border-radius: 5;</string>
</palette>
</property>
<property name="title">
<string>Rate Stabization Coefficients (Inner Loop)</string>
<string>Rate Stabilization Coefficients (Inner Loop)</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
@ -8033,7 +10069,7 @@ border-radius: 5;</string>
<bool>false</bool>
</property>
<property name="styleSheet">
<string notr="true"/>
<string notr="true">QGroupBox{border: 0px;}</string>
</property>
<property name="title">
<string/>
@ -8045,8 +10081,11 @@ border-radius: 5;</string>
<property name="leftMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>9</number>
<number>0</number>
</property>
<item row="3" column="4">
<widget class="QDoubleSpinBox" name="PitchRateKd">
@ -10849,7 +12888,7 @@ Then lower the value by 20% or so.</string>
<bool>false</bool>
</property>
<property name="title">
<string>Attitude Stabization Coefficients (Outer Loop)</string>
<string>Attitude Stabilization Coefficients (Outer Loop)</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
@ -11358,7 +13397,7 @@ Then lower the value by 20% or so.</string>
<bool>false</bool>
</property>
<property name="styleSheet">
<string notr="true"/>
<string notr="true">QGroupBox{border: 0px;}</string>
</property>
<property name="title">
<string/>
@ -11370,6 +13409,12 @@ Then lower the value by 20% or so.</string>
<property name="leftMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item row="0" column="0">
<spacer name="horizontalSpacer_8">
<property name="orientation">
@ -13442,7 +15487,7 @@ border-radius: 5;</string>
</widget>
</item>
<item>
<widget class="QGroupBox" name="RateStabilizationGroup_6">
<widget class="QGroupBox" name="advancedResponsivenessGroupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
@ -13976,11 +16021,17 @@ border-radius: 5;</string>
</palette>
</property>
<property name="title">
<string>Stick Range and Limits</string>
<string>Stick Responsiveness</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QGridLayout" name="gridLayout_18">
<property name="margin">
<number>12</number>
@ -14475,7 +16526,7 @@ border-radius: 5;</string>
<bool>false</bool>
</property>
<property name="styleSheet">
<string notr="true"/>
<string notr="true">QGroupBox{border: 0px;}</string>
</property>
<property name="title">
<string/>
@ -14487,6 +16538,12 @@ border-radius: 5;</string>
<property name="leftMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<property name="verticalSpacing">
<number>0</number>
</property>
@ -15944,7 +18001,7 @@ border-radius: 5;</string>
<string notr="true"/>
</property>
<property name="text">
<string>Full stick angle (deg)</string>
<string>Attitude mode response (deg)</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
@ -16746,7 +18803,7 @@ border-radius: 5;</string>
<string notr="true"/>
</property>
<property name="text">
<string>Full stick rate (deg/s)</string>
<string>Rate mode response (deg/s)</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
@ -16901,13 +18958,16 @@ border-radius: 5;</string>
<rect>
<x>0</x>
<y>0</y>
<width>1046</width>
<width>1045</width>
<height>751</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_9">
<property name="spacing">
<number>9</number>
</property>
<property name="margin">
<number>12</number>
<number>9</number>
</property>
<item>
<widget class="QGroupBox" name="groupBox_4">
@ -16986,12 +19046,24 @@ border-radius: 5;</string>
</item>
<item row="1" column="0" colspan="2">
<widget class="QGroupBox" name="groupBox">
<property name="styleSheet">
<string>QGroupBox{border: 0px;}</string>
</property>
<property name="flat">
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<property name="margin">
<number>12</number>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>9</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item row="0" column="1">
<widget class="QLabel" name="label_50">
@ -19823,6 +21895,9 @@ border-radius: 5;</string>
</disabled>
</palette>
</property>
<property name="styleSheet">
<string>QGroupBox{border: 0px;}</string>
</property>
<property name="title">
<string/>
</property>
@ -19830,8 +21905,17 @@ border-radius: 5;</string>
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout_8" columnstretch="0,0,1,0,1,0,1,0">
<property name="margin">
<number>12</number>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>9</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item row="1" column="4">
<widget class="QDoubleSpinBox" name="RatePitchILimit">
@ -22962,7 +25046,7 @@ border-radius: 5;</string>
<bool>false</bool>
</property>
<property name="styleSheet">
<string notr="true"/>
<string notr="true">QGroupBox{border: 0px;}</string>
</property>
<property name="title">
<string/>
@ -22971,8 +25055,17 @@ border-radius: 5;</string>
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout_14" columnstretch="0,1,0,1,0,1,0">
<property name="margin">
<number>12</number>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>9</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item row="1" column="2">
<spacer name="horizontalSpacer_41">

View File

@ -32,44 +32,45 @@
/**
* Constructor
*/
ConfigTaskWidget::ConfigTaskWidget(QWidget *parent) : QWidget(parent),isConnected(false),allowWidgetUpdates(true),smartsave(NULL),dirty(false),outOfLimitsStyle("background-color: rgb(255, 0, 0);"),timeOut(NULL)
ConfigTaskWidget::ConfigTaskWidget(QWidget *parent) : QWidget(parent), isConnected(false), allowWidgetUpdates(true), smartsave(NULL), dirty(false), outOfLimitsStyle("background-color: rgb(255, 0, 0);"), timeOut(NULL)
{
pm = ExtensionSystem::PluginManager::instance();
objManager = pm->getObject<UAVObjectManager>();
TelemetryManager* telMngr = pm->getObject<TelemetryManager>();
utilMngr = pm->getObject<UAVObjectUtilManager>();
connect(telMngr, SIGNAL(connected()), this, SLOT(onAutopilotConnect()),Qt::UniqueConnection);
connect(telMngr, SIGNAL(disconnected()), this, SLOT(onAutopilotDisconnect()),Qt::UniqueConnection);
connect(telMngr, SIGNAL(connected()), this, SIGNAL(autoPilotConnected()),Qt::UniqueConnection);
connect(telMngr, SIGNAL(disconnected()), this, SIGNAL(autoPilotDisconnected()),Qt::UniqueConnection);
UAVSettingsImportExportFactory * importexportplugin = pm->getObject<UAVSettingsImportExportFactory>();
connect(importexportplugin,SIGNAL(importAboutToBegin()),this,SLOT(invalidateObjects()));
TelemetryManager *telMngr = pm->getObject<TelemetryManager>();
utilMngr = pm->getObject<UAVObjectUtilManager>();
connect(telMngr, SIGNAL(connected()), this, SLOT(onAutopilotConnect()), Qt::UniqueConnection);
connect(telMngr, SIGNAL(disconnected()), this, SLOT(onAutopilotDisconnect()), Qt::UniqueConnection);
connect(telMngr, SIGNAL(connected()), this, SIGNAL(autoPilotConnected()), Qt::UniqueConnection);
connect(telMngr, SIGNAL(disconnected()), this, SIGNAL(autoPilotDisconnected()), Qt::UniqueConnection);
UAVSettingsImportExportFactory *importexportplugin = pm->getObject<UAVSettingsImportExportFactory>();
connect(importexportplugin, SIGNAL(importAboutToBegin()), this, SLOT(invalidateObjects()));
}
/**
* Add a widget to the dirty detection pool
* @param widget to add to the detection pool
*/
void ConfigTaskWidget::addWidget(QWidget * widget)
void ConfigTaskWidget::addWidget(QWidget *widget)
{
addUAVObjectToWidgetRelation("","",widget);
addUAVObjectToWidgetRelation("", "", widget);
}
/**
* Add an object to the management system
* @param objectName name of the object to add to the management system
*/
void ConfigTaskWidget::addUAVObject(QString objectName,QList<int> * reloadGroups)
void ConfigTaskWidget::addUAVObject(QString objectName, QList<int> *reloadGroups)
{
addUAVObjectToWidgetRelation(objectName,"",NULL,0,1,false,reloadGroups);
addUAVObjectToWidgetRelation(objectName, "", NULL, 0, 1, false, reloadGroups);
}
void ConfigTaskWidget::addUAVObject(UAVObject *objectName, QList<int> *reloadGroups)
{
QString objstr;
if(objectName)
objstr=objectName->getName();
addUAVObject(objstr, reloadGroups);
if (objectName) {
objstr = objectName->getName();
}
addUAVObject(objstr, reloadGroups);
}
/**
* Add an UAVObject field to widget relation to the management system
@ -78,25 +79,29 @@ void ConfigTaskWidget::addUAVObject(UAVObject *objectName, QList<int> *reloadGro
* @param widget pointer to the widget whitch will display/define the field value
* @param index index of the field element to add to this relation
*/
void ConfigTaskWidget::addUAVObjectToWidgetRelation(QString object, QString field, QWidget * widget, QString index)
void ConfigTaskWidget::addUAVObjectToWidgetRelation(QString object, QString field, QWidget *widget, QString index)
{
UAVObject *obj=NULL;
UAVObjectField *_field=NULL;
obj = objManager->getObject(QString(object));
UAVObject *obj = NULL;
UAVObjectField *_field = NULL;
obj = objManager->getObject(QString(object));
Q_ASSERT(obj);
_field = obj->getField(QString(field));
Q_ASSERT(_field);
addUAVObjectToWidgetRelation(object,field,widget,_field->getElementNames().indexOf(index));
addUAVObjectToWidgetRelation(object, field, widget, _field->getElementNames().indexOf(index));
}
void ConfigTaskWidget::addUAVObjectToWidgetRelation(UAVObject *obj, UAVObjectField * field, QWidget *widget, QString index)
void ConfigTaskWidget::addUAVObjectToWidgetRelation(UAVObject *obj, UAVObjectField *field, QWidget *widget, QString index)
{
QString objstr;
QString fieldstr;
if(obj)
objstr=obj->getName();
if(field)
fieldstr=field->getName();
if (obj) {
objstr = obj->getName();
}
if (field) {
fieldstr = field->getName();
}
addUAVObjectToWidgetRelation(objstr, fieldstr, widget, index);
}
/**
@ -112,38 +117,45 @@ void ConfigTaskWidget::addUAVObjectToWidgetRelation(UAVObject *obj, UAVObjectFie
*/
void ConfigTaskWidget::addUAVObjectToWidgetRelation(QString object, QString field, QWidget *widget, QString element, double scale, bool isLimited, QList<int> *defaultReloadGroups, quint32 instID)
{
UAVObject *obj=objManager->getObject(QString(object),instID);
UAVObject *obj = objManager->getObject(QString(object), instID);
Q_ASSERT(obj);
UAVObjectField *_field;
int index=0;
if(!field.isEmpty() && obj)
{
int index = 0;
if (!field.isEmpty() && obj) {
_field = obj->getField(QString(field));
if(!element.isEmpty())
index=_field->getElementNames().indexOf(QString(element));
if (!element.isEmpty()) {
index = _field->getElementNames().indexOf(QString(element));
}
}
addUAVObjectToWidgetRelation(object, field, widget,index,scale,isLimited,defaultReloadGroups,instID);
addUAVObjectToWidgetRelation(object, field, widget, index, scale, isLimited, defaultReloadGroups, instID);
}
void ConfigTaskWidget::addUAVObjectToWidgetRelation(UAVObject *obj, UAVObjectField *field, QWidget *widget, QString element, double scale, bool isLimited, QList<int> *defaultReloadGroups, quint32 instID)
{
QString objstr;
QString fieldstr;
if(obj)
objstr=obj->getName();
if(field)
fieldstr=field->getName();
if (obj) {
objstr = obj->getName();
}
if (field) {
fieldstr = field->getName();
}
addUAVObjectToWidgetRelation(objstr, fieldstr, widget, element, scale, isLimited, defaultReloadGroups, instID);
}
void ConfigTaskWidget::addUAVObjectToWidgetRelation(UAVObject * obj,UAVObjectField * field, QWidget * widget, int index,double scale,bool isLimited,QList<int>* defaultReloadGroups, quint32 instID)
void ConfigTaskWidget::addUAVObjectToWidgetRelation(UAVObject *obj, UAVObjectField *field, QWidget *widget, int index, double scale, bool isLimited, QList<int> *defaultReloadGroups, quint32 instID)
{
QString objstr;
QString fieldstr;
if(obj)
objstr=obj->getName();
if(field)
fieldstr=field->getName();
addUAVObjectToWidgetRelation(objstr,fieldstr,widget,index,scale,isLimited,defaultReloadGroups,instID);
if (obj) {
objstr = obj->getName();
}
if (field) {
fieldstr = field->getName();
}
addUAVObjectToWidgetRelation(objstr, fieldstr, widget, index, scale, isLimited, defaultReloadGroups, instID);
}
/**
@ -157,63 +169,55 @@ void ConfigTaskWidget::addUAVObjectToWidgetRelation(UAVObject * obj,UAVObjectFie
* @param defaultReloadGroups default and reload groups this relation belongs to
* @param instID instance ID of the object used on this relation
*/
void ConfigTaskWidget::addUAVObjectToWidgetRelation(QString object, QString field, QWidget * widget, int index,double scale,bool isLimited,QList<int>* defaultReloadGroups, quint32 instID)
void ConfigTaskWidget::addUAVObjectToWidgetRelation(QString object, QString field, QWidget *widget, int index, double scale, bool isLimited, QList<int> *defaultReloadGroups, quint32 instID)
{
if(addShadowWidget(object,field,widget,index,scale,isLimited,defaultReloadGroups,instID))
if (addShadowWidget(object, field, widget, index, scale, isLimited, defaultReloadGroups, instID)) {
return;
UAVObject *obj=NULL;
UAVObjectField *_field=NULL;
if(!object.isEmpty())
{
obj = objManager->getObject(QString(object),instID);
Q_ASSERT(obj);
objectUpdates.insert(obj,true);
connect(obj, SIGNAL(objectUpdated(UAVObject*)),this, SLOT(objectUpdated(UAVObject*)));
connect(obj, SIGNAL(objectUpdated(UAVObject*)), this, SLOT(refreshWidgetsValues(UAVObject*)), Qt::UniqueConnection);
}
if(!field.isEmpty() && obj)
UAVObject *obj = NULL;
UAVObjectField *_field = NULL;
if (!object.isEmpty()) {
obj = objManager->getObject(QString(object), instID);
Q_ASSERT(obj);
objectUpdates.insert(obj, true);
connect(obj, SIGNAL(objectUpdated(UAVObject *)), this, SLOT(objectUpdated(UAVObject *)));
connect(obj, SIGNAL(objectUpdated(UAVObject *)), this, SLOT(refreshWidgetsValues(UAVObject *)), Qt::UniqueConnection);
}
if (!field.isEmpty() && obj) {
_field = obj->getField(QString(field));
objectToWidget * ow=new objectToWidget();
ow->field=_field;
ow->object=obj;
ow->widget=widget;
ow->index=index;
ow->scale=scale;
ow->isLimited=isLimited;
}
objectToWidget *ow = new objectToWidget();
ow->field = _field;
ow->object = obj;
ow->widget = widget;
ow->index = index;
ow->scale = scale;
ow->isLimited = isLimited;
objOfInterest.append(ow);
if(obj)
{
if(smartsave)
{
smartsave->addObject((UAVDataObject*)obj);
if (obj) {
if (smartsave) {
smartsave->addObject((UAVDataObject *)obj);
}
}
if(widget==NULL)
{
if(defaultReloadGroups && obj)
{
foreach(int i,*defaultReloadGroups)
{
if(this->defaultReloadGroups.contains(i))
{
if (widget == NULL) {
if (defaultReloadGroups && obj) {
foreach(int i, *defaultReloadGroups) {
if (this->defaultReloadGroups.contains(i)) {
this->defaultReloadGroups.value(i)->append(ow);
}
else
{
this->defaultReloadGroups.insert(i,new QList<objectToWidget*>());
} else {
this->defaultReloadGroups.insert(i, new QList<objectToWidget *>());
this->defaultReloadGroups.value(i)->append(ow);
}
}
}
}
else
{
connectWidgetUpdatesToSlot(widget,SLOT(widgetsContentsChanged()));
if(defaultReloadGroups)
addWidgetToDefaultReloadGroups(widget,defaultReloadGroups);
shadowsList.insert(widget,ow);
loadWidgetLimits(widget,_field,index,isLimited,scale);
} else {
connectWidgetUpdatesToSlot(widget, SLOT(widgetsContentsChanged()));
if (defaultReloadGroups) {
addWidgetToDefaultReloadGroups(widget, defaultReloadGroups);
}
shadowsList.insert(widget, ow);
loadWidgetLimits(widget, _field, index, isLimited, scale);
}
}
/**
@ -221,20 +225,20 @@ void ConfigTaskWidget::addUAVObjectToWidgetRelation(QString object, QString fiel
*/
ConfigTaskWidget::~ConfigTaskWidget()
{
if(smartsave)
if (smartsave) {
delete smartsave;
foreach(QList<objectToWidget*>* pointer,defaultReloadGroups.values())
{
if(pointer)
}
foreach(QList<objectToWidget *> *pointer, defaultReloadGroups.values()) {
if (pointer) {
delete pointer;
}
}
foreach (objectToWidget* oTw, objOfInterest)
{
if(oTw)
foreach(objectToWidget * oTw, objOfInterest) {
if (oTw) {
delete oTw;
}
}
if(timeOut)
{
if (timeOut) {
delete timeOut;
timeOut = NULL;
}
@ -245,7 +249,8 @@ void ConfigTaskWidget::saveObjectToSD(UAVObject *obj)
// saveObjectToSD is now handled by the UAVUtils plugin in one
// central place (and one central queue)
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
UAVObjectUtilManager* utilMngr = pm->getObject<UAVObjectUtilManager>();
UAVObjectUtilManager *utilMngr = pm->getObject<UAVObjectUtilManager>();
utilMngr->saveObjectToSD(obj);
}
@ -253,9 +258,11 @@ void ConfigTaskWidget::saveObjectToSD(UAVObject *obj)
* Util function to get a pointer to the object manager
* @return pointer to the UAVObjectManager
*/
UAVObjectManager* ConfigTaskWidget::getObjectManager() {
UAVObjectManager *ConfigTaskWidget::getObjectManager()
{
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
UAVObjectManager * objMngr = pm->getObject<UAVObjectManager>();
UAVObjectManager *objMngr = pm->getObject<UAVObjectManager>();
Q_ASSERT(objMngr);
return objMngr;
}
@ -267,8 +274,10 @@ UAVObjectManager* ConfigTaskWidget::getObjectManager() {
double ConfigTaskWidget::listMean(QList<double> list)
{
double accum = 0;
for(int i = 0; i < list.size(); i++)
for (int i = 0; i < list.size(); i++) {
accum += list[i];
}
return accum / list.size();
}
@ -280,15 +289,17 @@ double ConfigTaskWidget::listMean(QList<double> list)
double ConfigTaskWidget::listVar(QList<double> list)
{
double mean_accum = 0;
double var_accum = 0;
double var_accum = 0;
double mean;
for(int i = 0; i < list.size(); i++)
for (int i = 0; i < list.size(); i++) {
mean_accum += list[i];
}
mean = mean_accum / list.size();
for(int i = 0; i < list.size(); i++)
for (int i = 0; i < list.size(); i++) {
var_accum += (list[i] - mean) * (list[i] - mean);
}
// Use unbiased estimator
return var_accum / (list.size() - 1);
@ -299,26 +310,26 @@ double ConfigTaskWidget::listVar(QList<double> list)
void ConfigTaskWidget::onAutopilotDisconnect()
{
isConnected=false;
isConnected = false;
enableControls(false);
invalidateObjects();
}
void ConfigTaskWidget::forceConnectedState()//dynamic widgets don't recieve the connected signal. This should be called instead.
void ConfigTaskWidget::forceConnectedState() // dynamic widgets don't recieve the connected signal. This should be called instead.
{
isConnected=true;
isConnected = true;
setDirty(false);
}
void ConfigTaskWidget::onAutopilotConnect()
{
if (utilMngr)
currentBoard = utilMngr->getBoardModel();//TODO REMEMBER TO ADD THIS TO FORCE CONNECTED FUNC ON CC3D_RELEASE
if (utilMngr) {
currentBoard = utilMngr->getBoardModel(); // TODO REMEMBER TO ADD THIS TO FORCE CONNECTED FUNC ON CC3D_RELEASE
}
invalidateObjects();
isConnected=true;
foreach(objectToWidget * ow,objOfInterest)
{
loadWidgetLimits(ow->widget,ow->field,ow->index,ow->isLimited,ow->scale);
isConnected = true;
foreach(objectToWidget * ow, objOfInterest) {
loadWidgetLimits(ow->widget, ow->field, ow->index, ow->isLimited, ow->scale);
}
setDirty(false);
enableControls(true);
@ -330,16 +341,15 @@ void ConfigTaskWidget::onAutopilotConnect()
*/
void ConfigTaskWidget::populateWidgets()
{
bool dirtyBack=dirty;
bool dirtyBack = dirty;
emit populateWidgetsRequested();
foreach(objectToWidget * ow,objOfInterest)
{
if(ow->object==NULL || ow->field==NULL || ow->widget==NULL)
{
foreach(objectToWidget * ow, objOfInterest) {
if (ow->object == NULL || ow->field == NULL || ow->widget == NULL) {
// do nothing
} else {
setWidgetFromField(ow->widget, ow->field, ow->index, ow->scale, ow->isLimited);
}
else
setWidgetFromField(ow->widget,ow->field,ow->index,ow->scale,ow->isLimited);
}
setDirty(dirtyBack);
}
@ -348,28 +358,24 @@ void ConfigTaskWidget::populateWidgets()
* object field added to the framework pool
* Overwrite this if you need to change the default behavior
*/
void ConfigTaskWidget::refreshWidgetsValues(UAVObject * obj)
void ConfigTaskWidget::refreshWidgetsValues(UAVObject *obj)
{
if (!allowWidgetUpdates)
if (!allowWidgetUpdates) {
return;
}
bool dirtyBack=dirty;
bool dirtyBack = dirty;
emit refreshWidgetsValuesRequested();
foreach(objectToWidget * ow,objOfInterest)
{
if(ow->object==NULL || ow->field==NULL || ow->widget==NULL)
{
//do nothing
foreach(objectToWidget * ow, objOfInterest) {
if (ow->object == NULL || ow->field == NULL || ow->widget == NULL) {
// do nothing
} else {
if (ow->object == obj || obj == NULL) {
setWidgetFromField(ow->widget, ow->field, ow->index, ow->scale, ow->isLimited);
}
}
else
{
if(ow->object==obj || obj==NULL)
setWidgetFromField(ow->widget,ow->field,ow->index,ow->scale,ow->isLimited);
}
}
setDirty(dirtyBack);
}
/**
* SLOT function used to update the uavobject fields from widgets with relation to
@ -379,15 +385,11 @@ void ConfigTaskWidget::refreshWidgetsValues(UAVObject * obj)
void ConfigTaskWidget::updateObjectsFromWidgets()
{
emit updateObjectsFromWidgetsRequested();
foreach(objectToWidget * ow,objOfInterest)
{
if(ow->object==NULL || ow->field==NULL)
{
foreach(objectToWidget * ow, objOfInterest) {
if (ow->object == NULL || ow->field == NULL) {} else {
setFieldFromWidget(ow->widget, ow->field, ow->index, ow->scale);
}
else
setFieldFromWidget(ow->widget,ow->field,ow->index,ow->scale);
}
}
/**
@ -396,9 +398,11 @@ void ConfigTaskWidget::updateObjectsFromWidgets()
*/
void ConfigTaskWidget::helpButtonPressed()
{
QString url=helpButtonList.value((QPushButton*)sender(),QString());
if(!url.isEmpty())
QDesktopServices::openUrl( QUrl(url, QUrl::StrictMode) );
QString url = helpButtonList.value((QPushButton *)sender(), QString());
if (!url.isEmpty()) {
QDesktopServices::openUrl(QUrl(url, QUrl::StrictMode));
}
}
/**
* Add update and save buttons to the form
@ -408,25 +412,23 @@ void ConfigTaskWidget::helpButtonPressed()
*/
void ConfigTaskWidget::addApplySaveButtons(QPushButton *update, QPushButton *save)
{
if(!smartsave)
{
smartsave=new smartSaveButton();
connect(smartsave,SIGNAL(preProcessOperations()), this, SLOT(updateObjectsFromWidgets()));
connect(smartsave,SIGNAL(saveSuccessfull()),this,SLOT(clearDirty()));
connect(smartsave,SIGNAL(beginOp()),this,SLOT(disableObjUpdates()));
connect(smartsave,SIGNAL(endOp()),this,SLOT(enableObjUpdates()));
if (!smartsave) {
smartsave = new smartSaveButton();
connect(smartsave, SIGNAL(preProcessOperations()), this, SLOT(updateObjectsFromWidgets()));
connect(smartsave, SIGNAL(saveSuccessfull()), this, SLOT(clearDirty()));
connect(smartsave, SIGNAL(beginOp()), this, SLOT(disableObjUpdates()));
connect(smartsave, SIGNAL(endOp()), this, SLOT(enableObjUpdates()));
}
if(update && save)
smartsave->addButtons(save,update);
else if (update)
if (update && save) {
smartsave->addButtons(save, update);
} else if (update) {
smartsave->addApplyButton(update);
else if (save)
} else if (save) {
smartsave->addSaveButton(save);
if(objOfInterest.count()>0)
{
foreach(objectToWidget * oTw,objOfInterest)
{
smartsave->addObject((UAVDataObject*)oTw->object);
}
if (objOfInterest.count() > 0) {
foreach(objectToWidget * oTw, objOfInterest) {
smartsave->addObject((UAVDataObject *)oTw->object);
}
}
updateEnableControls();
@ -439,18 +441,18 @@ void ConfigTaskWidget::addApplySaveButtons(QPushButton *update, QPushButton *sav
*/
void ConfigTaskWidget::enableControls(bool enable)
{
if(smartsave) {
if (smartsave) {
smartsave->enableControls(enable);
}
foreach (QPushButton *button, reloadButtonList) {
foreach(QPushButton * button, reloadButtonList) {
button->setEnabled(enable);
}
foreach(objectToWidget *ow,objOfInterest) {
if(ow->widget) {
foreach(objectToWidget * ow, objOfInterest) {
if (ow->widget) {
ow->widget->setEnabled(enable);
foreach (shadow *sh, ow->shadowsList) {
foreach(shadow * sh, ow->shadowsList) {
sh->widget->setEnabled(enable);
}
}
@ -462,16 +464,13 @@ void ConfigTaskWidget::enableControls(bool enable)
*/
void ConfigTaskWidget::forceShadowUpdates()
{
foreach(objectToWidget * oTw,objOfInterest)
{
foreach (shadow * sh, oTw->shadowsList)
{
disconnectWidgetUpdatesToSlot((QWidget*)sh->widget, SLOT(widgetsContentsChanged()));
foreach(objectToWidget * oTw, objOfInterest) {
foreach(shadow * sh, oTw->shadowsList) {
disconnectWidgetUpdatesToSlot((QWidget *)sh->widget, SLOT(widgetsContentsChanged()));
checkWidgetsLimits(sh->widget, oTw->field, oTw->index, sh->isLimited, getVariantFromWidget(oTw->widget, oTw->scale, oTw->getUnits()), sh->scale);
setWidgetFromVariant(sh->widget, getVariantFromWidget(oTw->widget, oTw->scale, oTw->getUnits()), sh->scale);
emit widgetContentsChanged((QWidget*)sh->widget);
connectWidgetUpdatesToSlot((QWidget*)sh->widget, SLOT(widgetsContentsChanged()));
emit widgetContentsChanged((QWidget *)sh->widget);
connectWidgetUpdatesToSlot((QWidget *)sh->widget, SLOT(widgetsContentsChanged()));
}
}
setDirty(true);
@ -481,49 +480,44 @@ void ConfigTaskWidget::forceShadowUpdates()
*/
void ConfigTaskWidget::widgetsContentsChanged()
{
emit widgetContentsChanged((QWidget*)sender());
emit widgetContentsChanged((QWidget *)sender());
double scale;
objectToWidget * oTw= shadowsList.value((QWidget*)sender(),NULL);
if(oTw)
{
if(oTw->widget==(QWidget*)sender())
{
scale=oTw->scale;
checkWidgetsLimits((QWidget*)sender(), oTw->field, oTw->index, oTw->isLimited, getVariantFromWidget((QWidget*)sender(), oTw->scale, oTw->getUnits()), oTw->scale);
}
else
{
foreach (shadow * sh, oTw->shadowsList)
{
if(sh->widget==(QWidget*)sender())
{
scale=sh->scale;
checkWidgetsLimits((QWidget*)sender(), oTw->field, oTw->index, sh->isLimited, getVariantFromWidget((QWidget*)sender(), scale, oTw->getUnits()), scale);
objectToWidget *oTw = shadowsList.value((QWidget *)sender(), NULL);
if (oTw) {
if (oTw->widget == (QWidget *)sender()) {
scale = oTw->scale;
checkWidgetsLimits((QWidget *)sender(), oTw->field, oTw->index, oTw->isLimited, getVariantFromWidget((QWidget *)sender(),
oTw->scale, oTw->getUnits()), oTw->scale);
} else {
foreach(shadow * sh, oTw->shadowsList) {
if (sh->widget == (QWidget *)sender()) {
scale = sh->scale;
checkWidgetsLimits((QWidget *)sender(), oTw->field, oTw->index, sh->isLimited, getVariantFromWidget((QWidget *)sender(),
scale, oTw->getUnits()), scale);
}
}
}
if(oTw->widget!=(QWidget *)sender())
{
disconnectWidgetUpdatesToSlot((QWidget*)oTw->widget, SLOT(widgetsContentsChanged()));
checkWidgetsLimits(oTw->widget, oTw->field, oTw->index, oTw->isLimited, getVariantFromWidget((QWidget*)sender(), scale, oTw->getUnits()), oTw->scale);
setWidgetFromVariant(oTw->widget, getVariantFromWidget((QWidget*)sender(), scale, oTw->getUnits()), oTw->scale);
emit widgetContentsChanged((QWidget*)oTw->widget);
connectWidgetUpdatesToSlot((QWidget*)oTw->widget, SLOT(widgetsContentsChanged()));
if (oTw->widget != (QWidget *)sender()) {
disconnectWidgetUpdatesToSlot((QWidget *)oTw->widget, SLOT(widgetsContentsChanged()));
checkWidgetsLimits(oTw->widget, oTw->field, oTw->index, oTw->isLimited, getVariantFromWidget((QWidget *)sender(), scale, oTw->getUnits()), oTw->scale);
setWidgetFromVariant(oTw->widget, getVariantFromWidget((QWidget *)sender(), scale, oTw->getUnits()), oTw->scale);
emit widgetContentsChanged((QWidget *)oTw->widget);
connectWidgetUpdatesToSlot((QWidget *)oTw->widget, SLOT(widgetsContentsChanged()));
}
foreach (shadow * sh, oTw->shadowsList)
{
if(sh->widget!=(QWidget*)sender())
{
disconnectWidgetUpdatesToSlot((QWidget*)sh->widget,SLOT(widgetsContentsChanged()));
checkWidgetsLimits(sh->widget, oTw->field, oTw->index, sh->isLimited, getVariantFromWidget((QWidget*)sender(), scale, oTw->getUnits()), sh->scale);
setWidgetFromVariant(sh->widget, getVariantFromWidget((QWidget*)sender(), scale, oTw->getUnits()), sh->scale);
emit widgetContentsChanged((QWidget*)sh->widget);
connectWidgetUpdatesToSlot((QWidget*)sh->widget,SLOT(widgetsContentsChanged()));
foreach(shadow * sh, oTw->shadowsList) {
if (sh->widget != (QWidget *)sender()) {
disconnectWidgetUpdatesToSlot((QWidget *)sh->widget, SLOT(widgetsContentsChanged()));
checkWidgetsLimits(sh->widget, oTw->field, oTw->index, sh->isLimited, getVariantFromWidget((QWidget *)sender(), scale, oTw->getUnits()), sh->scale);
setWidgetFromVariant(sh->widget, getVariantFromWidget((QWidget *)sender(), scale, oTw->getUnits()), sh->scale);
emit widgetContentsChanged((QWidget *)sh->widget);
connectWidgetUpdatesToSlot((QWidget *)sh->widget, SLOT(widgetsContentsChanged()));
}
}
}
if(smartsave)
if (smartsave) {
smartsave->resetIcons();
}
setDirty(true);
}
/**
@ -539,7 +533,7 @@ void ConfigTaskWidget::clearDirty()
*/
void ConfigTaskWidget::setDirty(bool value)
{
dirty=value;
dirty = value;
}
/**
* Checks if the form is dirty (unsaved changes)
@ -547,10 +541,11 @@ void ConfigTaskWidget::setDirty(bool value)
*/
bool ConfigTaskWidget::isDirty()
{
if(isConnected)
if (isConnected) {
return dirty;
else
} else {
return false;
}
}
/**
* SLOT function used to disable widget contents changes when related object field changes
@ -558,9 +553,10 @@ bool ConfigTaskWidget::isDirty()
void ConfigTaskWidget::disableObjUpdates()
{
allowWidgetUpdates = false;
foreach(objectToWidget * obj,objOfInterest)
{
if(obj->object)disconnect(obj->object, SIGNAL(objectUpdated(UAVObject*)), this, SLOT(refreshWidgetsValues(UAVObject*)));
foreach(objectToWidget * obj, objOfInterest) {
if (obj->object) {
disconnect(obj->object, SIGNAL(objectUpdated(UAVObject *)), this, SLOT(refreshWidgetsValues(UAVObject *)));
}
}
}
/**
@ -569,10 +565,10 @@ void ConfigTaskWidget::disableObjUpdates()
void ConfigTaskWidget::enableObjUpdates()
{
allowWidgetUpdates = true;
foreach(objectToWidget * obj,objOfInterest)
{
if(obj->object)
connect(obj->object, SIGNAL(objectUpdated(UAVObject*)), this, SLOT(refreshWidgetsValues(UAVObject*)), Qt::UniqueConnection);
foreach(objectToWidget * obj, objOfInterest) {
if (obj->object) {
connect(obj->object, SIGNAL(objectUpdated(UAVObject *)), this, SLOT(refreshWidgetsValues(UAVObject *)), Qt::UniqueConnection);
}
}
}
/**
@ -581,7 +577,7 @@ void ConfigTaskWidget::enableObjUpdates()
*/
void ConfigTaskWidget::objectUpdated(UAVObject *obj)
{
objectUpdates[obj]=true;
objectUpdates[obj] = true;
}
/**
* Checks if all objects added to the pool have already been updated
@ -589,13 +585,12 @@ void ConfigTaskWidget::objectUpdated(UAVObject *obj)
*/
bool ConfigTaskWidget::allObjectsUpdated()
{
qDebug()<<"ConfigTaskWidge:allObjectsUpdated called";
bool ret=true;
foreach(UAVObject *obj, objectUpdates.keys())
{
ret=ret & objectUpdates[obj];
qDebug() << "ConfigTaskWidge:allObjectsUpdated called";
bool ret = true;
foreach(UAVObject * obj, objectUpdates.keys()) {
ret = ret & objectUpdates[obj];
}
qDebug()<<"Returned:"<<ret;
qDebug() << "Returned:" << ret;
return ret;
}
/**
@ -605,18 +600,16 @@ bool ConfigTaskWidget::allObjectsUpdated()
*/
void ConfigTaskWidget::addHelpButton(QPushButton *button, QString url)
{
helpButtonList.insert(button,url);
connect(button,SIGNAL(clicked()),this,SLOT(helpButtonPressed()));
helpButtonList.insert(button, url);
connect(button, SIGNAL(clicked()), this, SLOT(helpButtonPressed()));
}
/**
* Invalidates all the uav objects "is updated" flag
*/
void ConfigTaskWidget::invalidateObjects()
{
foreach(UAVObject *obj, objectUpdates.keys())
{
objectUpdates[obj]=false;
foreach(UAVObject * obj, objectUpdates.keys()) {
objectUpdates[obj] = false;
}
}
/**
@ -624,16 +617,18 @@ void ConfigTaskWidget::invalidateObjects()
*/
void ConfigTaskWidget::apply()
{
if(smartsave)
if (smartsave) {
smartsave->apply();
}
}
/**
* SLOT call this to save changes to uav objects
*/
void ConfigTaskWidget::save()
{
if(smartsave)
if (smartsave) {
smartsave->save();
}
}
/**
* Adds a new shadow widget
@ -641,50 +636,47 @@ void ConfigTaskWidget::save()
* This function doesn't have to be used directly, addUAVObjectToWidgetRelation will call it if a previous relation exhists.
* @return returns false if the shadow widget relation failed to be added (no previous relation exhisted)
*/
bool ConfigTaskWidget::addShadowWidget(QString object, QString field, QWidget *widget, int index, double scale, bool isLimited,QList<int>* defaultReloadGroups,quint32 instID)
bool ConfigTaskWidget::addShadowWidget(QString object, QString field, QWidget *widget, int index, double scale, bool isLimited,
QList<int> *defaultReloadGroups, quint32 instID)
{
foreach(objectToWidget * oTw,objOfInterest)
{
if(!oTw->object || !oTw->widget || !oTw->field)
foreach(objectToWidget * oTw, objOfInterest) {
if (!oTw->object || !oTw->widget || !oTw->field) {
continue;
if(oTw->object->getName()==object && oTw->field->getName()==field && oTw->index==index && oTw->object->getInstID()==instID)
{
shadow * sh=NULL;
//prefer anything else to QLabel
if(qobject_cast<QLabel *>(oTw->widget) && !qobject_cast<QLabel *>(widget))
{
sh=new shadow;
sh->isLimited=oTw->isLimited;
sh->scale=oTw->scale;
sh->widget=oTw->widget;
oTw->isLimited=isLimited;
oTw->scale=scale;
oTw->widget=widget;
}
if (oTw->object->getName() == object && oTw->field->getName() == field && oTw->index == index && oTw->object->getInstID() == instID) {
shadow *sh = NULL;
// prefer anything else to QLabel
if (qobject_cast<QLabel *>(oTw->widget) && !qobject_cast<QLabel *>(widget)) {
sh = new shadow;
sh->isLimited = oTw->isLimited;
sh->scale = oTw->scale;
sh->widget = oTw->widget;
oTw->isLimited = isLimited;
oTw->scale = scale;
oTw->widget = widget;
}
//prefer QDoubleSpinBox to anything else
else if(!qobject_cast<QDoubleSpinBox *>(oTw->widget) && qobject_cast<QDoubleSpinBox *>(widget))
{
sh=new shadow;
sh->isLimited=oTw->isLimited;
sh->scale=oTw->scale;
sh->widget=oTw->widget;
oTw->isLimited=isLimited;
oTw->scale=scale;
oTw->widget=widget;
// prefer QDoubleSpinBox to anything else
else if (!qobject_cast<QDoubleSpinBox *>(oTw->widget) && qobject_cast<QDoubleSpinBox *>(widget)) {
sh = new shadow;
sh->isLimited = oTw->isLimited;
sh->scale = oTw->scale;
sh->widget = oTw->widget;
oTw->isLimited = isLimited;
oTw->scale = scale;
oTw->widget = widget;
} else {
sh = new shadow;
sh->isLimited = isLimited;
sh->scale = scale;
sh->widget = widget;
}
else
{
sh=new shadow;
sh->isLimited=isLimited;
sh->scale=scale;
sh->widget=widget;
}
shadowsList.insert(widget,oTw);
shadowsList.insert(widget, oTw);
oTw->shadowsList.append(sh);
connectWidgetUpdatesToSlot(widget,SLOT(widgetsContentsChanged()));
if(defaultReloadGroups)
addWidgetToDefaultReloadGroups(widget,defaultReloadGroups);
loadWidgetLimits(widget,oTw->field,oTw->index,isLimited,scale);
connectWidgetUpdatesToSlot(widget, SLOT(widgetsContentsChanged()));
if (defaultReloadGroups) {
addWidgetToDefaultReloadGroups(widget, defaultReloadGroups);
}
loadWidgetLimits(widget, oTw->field, oTw->index, isLimited, scale);
return true;
}
}
@ -696,118 +688,115 @@ bool ConfigTaskWidget::addShadowWidget(QString object, QString field, QWidget *w
*/
void ConfigTaskWidget::autoLoadWidgets()
{
QPushButton * saveButtonWidget=NULL;
QPushButton * applyButtonWidget=NULL;
foreach(QWidget * widget,this->findChildren<QWidget*>())
{
QVariant info=widget->property("objrelation");
if(info.isValid())
{
QPushButton *saveButtonWidget = NULL;
QPushButton *applyButtonWidget = NULL;
foreach(QWidget * widget, this->findChildren<QWidget *>()) {
QVariant info = widget->property("objrelation");
if (info.isValid()) {
uiRelationAutomation uiRelation;
uiRelation.buttonType=none;
uiRelation.scale=1;
uiRelation.element=QString();
uiRelation.haslimits=false;
foreach(QString str, info.toStringList())
{
QString prop=str.split(":").at(0);
QString value=str.split(":").at(1);
if(prop== "objname")
uiRelation.objname=value;
else if(prop== "fieldname")
uiRelation.fieldname=value;
else if(prop=="element")
uiRelation.element=value;
else if(prop== "scale")
{
if(value=="null")
uiRelation.scale=1;
else
uiRelation.scale=value.toDouble();
}
else if(prop== "haslimits")
{
if(value=="yes")
uiRelation.haslimits=true;
else
uiRelation.haslimits=false;
}
else if(prop== "button")
{
if(value=="save")
uiRelation.buttonType=save_button;
else if(value=="apply")
uiRelation.buttonType=apply_button;
else if(value=="reload")
uiRelation.buttonType=reload_button;
else if(value=="default")
uiRelation.buttonType=default_button;
else if(value=="help")
uiRelation.buttonType=help_button;
}
else if(prop== "buttongroup")
{
foreach(QString s,value.split(","))
{
uiRelation.buttonType = none;
uiRelation.scale = 1;
uiRelation.element = QString();
uiRelation.haslimits = false;
foreach(QString str, info.toStringList()) {
QString prop = str.split(":").at(0);
QString value = str.split(":").at(1);
if (prop == "objname") {
uiRelation.objname = value;
} else if (prop == "fieldname") {
uiRelation.fieldname = value;
} else if (prop == "element") {
uiRelation.element = value;
} else if (prop == "scale") {
if (value == "null") {
uiRelation.scale = 1;
} else {
uiRelation.scale = value.toDouble();
}
} else if (prop == "haslimits") {
if (value == "yes") {
uiRelation.haslimits = true;
} else {
uiRelation.haslimits = false;
}
} else if (prop == "button") {
if (value == "save") {
uiRelation.buttonType = save_button;
} else if (value == "apply") {
uiRelation.buttonType = apply_button;
} else if (value == "reload") {
uiRelation.buttonType = reload_button;
} else if (value == "default") {
uiRelation.buttonType = default_button;
} else if (value == "help") {
uiRelation.buttonType = help_button;
}
} else if (prop == "buttongroup") {
foreach(QString s, value.split(",")) {
uiRelation.buttonGroup.append(s.toInt());
}
} else if (prop == "url") {
uiRelation.url = str.mid(str.indexOf(":") + 1);
}
else if(prop=="url")
uiRelation.url=str.mid(str.indexOf(":")+1);
}
if(!uiRelation.buttonType==none)
{
QPushButton * button=NULL;
switch(uiRelation.buttonType)
{
if (!uiRelation.buttonType == none) {
QPushButton *button = NULL;
switch (uiRelation.buttonType) {
case save_button:
saveButtonWidget=qobject_cast<QPushButton *>(widget);
if(saveButtonWidget)
addApplySaveButtons(NULL,saveButtonWidget);
saveButtonWidget = qobject_cast<QPushButton *>(widget);
if (saveButtonWidget) {
addApplySaveButtons(NULL, saveButtonWidget);
}
break;
case apply_button:
applyButtonWidget=qobject_cast<QPushButton *>(widget);
if(applyButtonWidget)
addApplySaveButtons(applyButtonWidget,NULL);
applyButtonWidget = qobject_cast<QPushButton *>(widget);
if (applyButtonWidget) {
addApplySaveButtons(applyButtonWidget, NULL);
}
break;
case default_button:
button=qobject_cast<QPushButton *>(widget);
if(button)
addDefaultButton(button,uiRelation.buttonGroup.at(0));
button = qobject_cast<QPushButton *>(widget);
if (button) {
addDefaultButton(button, uiRelation.buttonGroup.at(0));
}
break;
case reload_button:
button=qobject_cast<QPushButton *>(widget);
if(button)
addReloadButton(button,uiRelation.buttonGroup.at(0));
button = qobject_cast<QPushButton *>(widget);
if (button) {
addReloadButton(button, uiRelation.buttonGroup.at(0));
}
break;
case help_button:
button=qobject_cast<QPushButton *>(widget);
if(button)
addHelpButton(button,uiRelation.url);
button = qobject_cast<QPushButton *>(widget);
if (button) {
addHelpButton(button, uiRelation.url);
}
break;
default:
break;
}
}
else
{
QWidget * wid=qobject_cast<QWidget *>(widget);
if(wid)
addUAVObjectToWidgetRelation(uiRelation.objname,uiRelation.fieldname,wid,uiRelation.element,uiRelation.scale,uiRelation.haslimits,&uiRelation.buttonGroup);
} else {
QWidget *wid = qobject_cast<QWidget *>(widget);
if (wid) {
addUAVObjectToWidgetRelation(uiRelation.objname, uiRelation.fieldname, wid, uiRelation.element, uiRelation.scale, uiRelation.haslimits, &uiRelation.buttonGroup);
}
}
}
}
refreshWidgetsValues();
forceShadowUpdates();
foreach(objectToWidget * ow,objOfInterest)
{
if(ow->widget)
qDebug()<<"Master:"<<ow->widget->objectName();
foreach(shadow * sh,ow->shadowsList)
{
if(sh->widget)
qDebug()<<"Child"<<sh->widget->objectName();
foreach(objectToWidget * ow, objOfInterest) {
if (ow->widget) {
qDebug() << "Master:" << ow->widget->objectName();
}
foreach(shadow * sh, ow->shadowsList) {
if (sh->widget) {
qDebug() << "Child" << sh->widget->objectName();
}
}
}
}
@ -817,32 +806,26 @@ void ConfigTaskWidget::autoLoadWidgets()
* @param widget pointer to the widget to be added to the groups
* @param groups list of the groups on which to add the widget
*/
void ConfigTaskWidget::addWidgetToDefaultReloadGroups(QWidget *widget, QList<int> * groups)
void ConfigTaskWidget::addWidgetToDefaultReloadGroups(QWidget *widget, QList<int> *groups)
{
foreach(objectToWidget * oTw,objOfInterest)
{
bool addOTW=false;
if(oTw->widget==widget)
addOTW=true;
else
{
foreach(shadow * sh, oTw->shadowsList)
{
if(sh->widget==widget)
addOTW=true;
foreach(objectToWidget * oTw, objOfInterest) {
bool addOTW = false;
if (oTw->widget == widget) {
addOTW = true;
} else {
foreach(shadow * sh, oTw->shadowsList) {
if (sh->widget == widget) {
addOTW = true;
}
}
}
if(addOTW)
{
foreach(int i,*groups)
{
if(defaultReloadGroups.contains(i))
{
if (addOTW) {
foreach(int i, *groups) {
if (defaultReloadGroups.contains(i)) {
defaultReloadGroups.value(i)->append(oTw);
}
else
{
defaultReloadGroups.insert(i,new QList<objectToWidget*>());
} else {
defaultReloadGroups.insert(i, new QList<objectToWidget *>());
defaultReloadGroups.value(i)->append(oTw);
}
}
@ -856,8 +839,8 @@ void ConfigTaskWidget::addWidgetToDefaultReloadGroups(QWidget *widget, QList<int
*/
void ConfigTaskWidget::addDefaultButton(QPushButton *button, int buttonGroup)
{
button->setProperty("group",buttonGroup);
connect(button,SIGNAL(clicked()),this,SLOT(defaultButtonClicked()));
button->setProperty("group", buttonGroup);
connect(button, SIGNAL(clicked()), this, SLOT(defaultButtonClicked()));
}
/**
* Adds a button to a reload group
@ -866,24 +849,25 @@ void ConfigTaskWidget::addDefaultButton(QPushButton *button, int buttonGroup)
*/
void ConfigTaskWidget::addReloadButton(QPushButton *button, int buttonGroup)
{
button->setProperty("group",buttonGroup);
button->setProperty("group", buttonGroup);
reloadButtonList.append(button);
connect(button,SIGNAL(clicked()),this,SLOT(reloadButtonClicked()));
connect(button, SIGNAL(clicked()), this, SLOT(reloadButtonClicked()));
}
/**
* Called when a default button is clicked
*/
void ConfigTaskWidget::defaultButtonClicked()
{
int group=sender()->property("group").toInt();
int group = sender()->property("group").toInt();
emit defaultRequested(group);
QList<objectToWidget*> * list=defaultReloadGroups.value(group);
foreach(objectToWidget * oTw,*list)
{
if(!oTw->object || !oTw->field)
QList<objectToWidget *> *list = defaultReloadGroups.value(group);
foreach(objectToWidget * oTw, *list) {
if (!oTw->object || !oTw->field) {
continue;
UAVDataObject * temp=((UAVDataObject*)oTw->object)->dirtyClone();
setWidgetFromField(oTw->widget,temp->getField(oTw->field->getName()),oTw->index,oTw->scale,oTw->isLimited);
}
UAVDataObject *temp = ((UAVDataObject *)oTw->object)->dirtyClone();
setWidgetFromField(oTw->widget, temp->getField(oTw->field->getName()), oTw->index, oTw->scale, oTw->isLimited);
}
}
/**
@ -891,145 +875,114 @@ void ConfigTaskWidget::defaultButtonClicked()
*/
void ConfigTaskWidget::reloadButtonClicked()
{
if(timeOut)
if (timeOut) {
return;
int group=sender()->property("group").toInt();
QList<objectToWidget*> * list=defaultReloadGroups.value(group,NULL);
if(!list)
}
int group = sender()->property("group").toInt();
QList<objectToWidget *> *list = defaultReloadGroups.value(group, NULL);
if (!list) {
return;
ObjectPersistence* objper = dynamic_cast<ObjectPersistence*>( getObjectManager()->getObject(ObjectPersistence::NAME) );
timeOut=new QTimer(this);
QEventLoop * eventLoop=new QEventLoop(this);
connect(timeOut, SIGNAL(timeout()),eventLoop,SLOT(quit()));
connect(objper, SIGNAL(objectUpdated(UAVObject*)), eventLoop, SLOT(quit()));
}
ObjectPersistence *objper = dynamic_cast<ObjectPersistence *>(getObjectManager()->getObject(ObjectPersistence::NAME));
timeOut = new QTimer(this);
QEventLoop *eventLoop = new QEventLoop(this);
connect(timeOut, SIGNAL(timeout()), eventLoop, SLOT(quit()));
connect(objper, SIGNAL(objectUpdated(UAVObject *)), eventLoop, SLOT(quit()));
QList<temphelper> temp;
foreach(objectToWidget * oTw,*list)
{
if (oTw->object != NULL)
{
foreach(objectToWidget * oTw, *list) {
if (oTw->object != NULL) {
temphelper value;
value.objid=oTw->object->getObjID();
value.objinstid=oTw->object->getInstID();
if(temp.contains(value))
value.objid = oTw->object->getObjID();
value.objinstid = oTw->object->getInstID();
if (temp.contains(value)) {
continue;
else
} else {
temp.append(value);
}
ObjectPersistence::DataFields data;
data.Operation = ObjectPersistence::OPERATION_LOAD;
data.Selection = ObjectPersistence::SELECTION_SINGLEOBJECT;
data.ObjectID = oTw->object->getObjID();
data.Operation = ObjectPersistence::OPERATION_LOAD;
data.Selection = ObjectPersistence::SELECTION_SINGLEOBJECT;
data.ObjectID = oTw->object->getObjID();
data.InstanceID = oTw->object->getInstID();
objper->setData(data);
objper->updated();
timeOut->start(500);
eventLoop->exec();
if(timeOut->isActive())
{
if (timeOut->isActive()) {
oTw->object->requestUpdate();
if(oTw->widget)
setWidgetFromField(oTw->widget,oTw->field,oTw->index,oTw->scale,oTw->isLimited);
if (oTw->widget) {
setWidgetFromField(oTw->widget, oTw->field, oTw->index, oTw->scale, oTw->isLimited);
}
}
timeOut->stop();
}
}
if(eventLoop)
{
if (eventLoop) {
delete eventLoop;
eventLoop=NULL;
eventLoop = NULL;
}
if(timeOut)
{
if (timeOut) {
delete timeOut;
timeOut=NULL;
timeOut = NULL;
}
}
/**
* Connects widgets "contents changed" signals to a slot
*/
void ConfigTaskWidget::connectWidgetUpdatesToSlot(QWidget * widget,const char* function)
void ConfigTaskWidget::connectWidgetUpdatesToSlot(QWidget *widget, const char *function)
{
if(!widget)
if (!widget) {
return;
if(QComboBox * cb=qobject_cast<QComboBox *>(widget))
{
connect(cb,SIGNAL(currentIndexChanged(int)),this,function);
}
else if(QSlider * cb=qobject_cast<QSlider *>(widget))
{
connect(cb,SIGNAL(valueChanged(int)),this,function);
if (QComboBox * cb = qobject_cast<QComboBox *>(widget)) {
connect(cb, SIGNAL(currentIndexChanged(int)), this, function);
} else if (QSlider * cb = qobject_cast<QSlider *>(widget)) {
connect(cb, SIGNAL(valueChanged(int)), this, function);
} else if (MixerCurveWidget * cb = qobject_cast<MixerCurveWidget *>(widget)) {
connect(cb, SIGNAL(curveUpdated()), this, function);
} else if (QTableWidget * cb = qobject_cast<QTableWidget *>(widget)) {
connect(cb, SIGNAL(cellChanged(int, int)), this, function);
} else if (QSpinBox * cb = qobject_cast<QSpinBox *>(widget)) {
connect(cb, SIGNAL(valueChanged(int)), this, function);
} else if (QDoubleSpinBox * cb = qobject_cast<QDoubleSpinBox *>(widget)) {
connect(cb, SIGNAL(valueChanged(double)), this, function);
} else if (QCheckBox * cb = qobject_cast<QCheckBox *>(widget)) {
connect(cb, SIGNAL(stateChanged(int)), this, function);
} else if (QPushButton * cb = qobject_cast<QPushButton *>(widget)) {
connect(cb, SIGNAL(clicked()), this, function);
} else {
qDebug() << __FUNCTION__ << "widget to uavobject relation not implemented" << widget->metaObject()->className();
}
else if(MixerCurveWidget * cb=qobject_cast<MixerCurveWidget *>(widget))
{
connect(cb,SIGNAL(curveUpdated()),this,function);
}
else if(QTableWidget * cb=qobject_cast<QTableWidget *>(widget))
{
connect(cb,SIGNAL(cellChanged(int,int)),this,function);
}
else if(QSpinBox * cb=qobject_cast<QSpinBox *>(widget))
{
connect(cb,SIGNAL(valueChanged(int)),this,function);
}
else if(QDoubleSpinBox * cb=qobject_cast<QDoubleSpinBox *>(widget))
{
connect(cb,SIGNAL(valueChanged(double)),this,function);
}
else if(QCheckBox * cb=qobject_cast<QCheckBox *>(widget))
{
connect(cb,SIGNAL(stateChanged(int)),this,function);
}
else if(QPushButton * cb=qobject_cast<QPushButton *>(widget))
{
connect(cb,SIGNAL(clicked()),this,function);
}
else
qDebug()<<__FUNCTION__<<"widget to uavobject relation not implemented"<<widget->metaObject()->className();
}
/**
* Disconnects widgets "contents changed" signals to a slot
*/
void ConfigTaskWidget::disconnectWidgetUpdatesToSlot(QWidget * widget,const char* function)
void ConfigTaskWidget::disconnectWidgetUpdatesToSlot(QWidget *widget, const char *function)
{
if(!widget)
if (!widget) {
return;
if(QComboBox * cb=qobject_cast<QComboBox *>(widget))
{
disconnect(cb,SIGNAL(currentIndexChanged(int)),this,function);
}
else if(QSlider * cb=qobject_cast<QSlider *>(widget))
{
disconnect(cb,SIGNAL(valueChanged(int)),this,function);
if (QComboBox * cb = qobject_cast<QComboBox *>(widget)) {
disconnect(cb, SIGNAL(currentIndexChanged(int)), this, function);
} else if (QSlider * cb = qobject_cast<QSlider *>(widget)) {
disconnect(cb, SIGNAL(valueChanged(int)), this, function);
} else if (MixerCurveWidget * cb = qobject_cast<MixerCurveWidget *>(widget)) {
disconnect(cb, SIGNAL(curveUpdated()), this, function);
} else if (QTableWidget * cb = qobject_cast<QTableWidget *>(widget)) {
disconnect(cb, SIGNAL(cellChanged(int, int)), this, function);
} else if (QSpinBox * cb = qobject_cast<QSpinBox *>(widget)) {
disconnect(cb, SIGNAL(valueChanged(int)), this, function);
} else if (QDoubleSpinBox * cb = qobject_cast<QDoubleSpinBox *>(widget)) {
disconnect(cb, SIGNAL(valueChanged(double)), this, function);
} else if (QCheckBox * cb = qobject_cast<QCheckBox *>(widget)) {
disconnect(cb, SIGNAL(stateChanged(int)), this, function);
} else if (QPushButton * cb = qobject_cast<QPushButton *>(widget)) {
disconnect(cb, SIGNAL(clicked()), this, function);
} else {
qDebug() << __FUNCTION__ << "widget to uavobject relation not implemented" << widget->metaObject()->className();
}
else if(MixerCurveWidget * cb=qobject_cast<MixerCurveWidget *>(widget))
{
disconnect(cb,SIGNAL(curveUpdated()),this,function);
}
else if(QTableWidget * cb=qobject_cast<QTableWidget *>(widget))
{
disconnect(cb,SIGNAL(cellChanged(int,int)),this,function);
}
else if(QSpinBox * cb=qobject_cast<QSpinBox *>(widget))
{
disconnect(cb,SIGNAL(valueChanged(int)),this,function);
}
else if(QDoubleSpinBox * cb=qobject_cast<QDoubleSpinBox *>(widget))
{
disconnect(cb,SIGNAL(valueChanged(double)),this,function);
}
else if(QCheckBox * cb=qobject_cast<QCheckBox *>(widget))
{
disconnect(cb,SIGNAL(stateChanged(int)),this,function);
}
else if(QPushButton * cb=qobject_cast<QPushButton *>(widget))
{
disconnect(cb,SIGNAL(clicked()),this,function);
}
else
qDebug()<<__FUNCTION__<<"widget to uavobject relation not implemented"<<widget->metaObject()->className();
}
/**
* Sets a widget value from an UAVObject field
@ -1039,18 +992,18 @@ void ConfigTaskWidget::disconnectWidgetUpdatesToSlot(QWidget * widget,const char
* @param scale scale to be used on the assignement
* @return returns true if the assignement was successfull
*/
bool ConfigTaskWidget::setFieldFromWidget(QWidget * widget,UAVObjectField * field,int index,double scale)
bool ConfigTaskWidget::setFieldFromWidget(QWidget *widget, UAVObjectField *field, int index, double scale)
{
if(!widget || !field)
if (!widget || !field) {
return false;
}
QVariant ret = getVariantFromWidget(widget, scale, field->getUnits());
if(ret.isValid())
{
field->setValue(ret,index);
if (ret.isValid()) {
field->setValue(ret, index);
return true;
}
{
qDebug()<<__FUNCTION__<<"widget to uavobject relation not implemented"<<widget->metaObject()->className();
qDebug() << __FUNCTION__ << "widget to uavobject relation not implemented" << widget->metaObject()->className();
return false;
}
}
@ -1062,38 +1015,27 @@ bool ConfigTaskWidget::setFieldFromWidget(QWidget * widget,UAVObjectField * fiel
*/
QVariant ConfigTaskWidget::getVariantFromWidget(QWidget *widget, double scale, QString units)
{
if(QComboBox * cb=qobject_cast<QComboBox *>(widget))
{
if (QComboBox * cb = qobject_cast<QComboBox *>(widget)) {
return (QString)cb->currentText();
}
else if(QDoubleSpinBox * cb=qobject_cast<QDoubleSpinBox *>(widget))
{
return (double)(cb->value()* scale);
}
else if(QSpinBox * cb=qobject_cast<QSpinBox *>(widget))
{
return (double)(cb->value()* scale);
}
else if(QSlider * cb=qobject_cast<QSlider *>(widget))
{
return(double)(cb->value()* scale);
}
else if(QCheckBox * cb=qobject_cast<QCheckBox *>(widget))
{
return (QString)(cb->isChecked()?"TRUE":"FALSE");
}
else if(QLineEdit * cb=qobject_cast<QLineEdit *>(widget))
{
} else if (QDoubleSpinBox * cb = qobject_cast<QDoubleSpinBox *>(widget)) {
return (double)(cb->value() * scale);
} else if (QSpinBox * cb = qobject_cast<QSpinBox *>(widget)) {
return (double)(cb->value() * scale);
} else if (QSlider * cb = qobject_cast<QSlider *>(widget)) {
return (double)(cb->value() * scale);
} else if (QCheckBox * cb = qobject_cast<QCheckBox *>(widget)) {
return (QString)(cb->isChecked() ? "TRUE" : "FALSE");
} else if (QLineEdit * cb = qobject_cast<QLineEdit *>(widget)) {
QString value = (QString)cb->displayText();
if(units == "hex") {
if (units == "hex") {
bool ok;
return value.toUInt(&ok, 16);
} else {
return value;
}
}
else
} else {
return QVariant();
}
}
/**
* Sets a widget from a variant
@ -1105,55 +1047,43 @@ QVariant ConfigTaskWidget::getVariantFromWidget(QWidget *widget, double scale, Q
*/
bool ConfigTaskWidget::setWidgetFromVariant(QWidget *widget, QVariant value, double scale, QString units)
{
if(QComboBox * cb=qobject_cast<QComboBox *>(widget))
{
if (QComboBox * cb = qobject_cast<QComboBox *>(widget)) {
cb->setCurrentIndex(cb->findText(value.toString()));
return true;
}
else if(QLabel * cb=qobject_cast<QLabel *>(widget))
{
if(scale==0)
} else if (QLabel * cb = qobject_cast<QLabel *>(widget)) {
if (scale == 0) {
cb->setText(value.toString());
else
cb->setText(QString::number((value.toDouble()/scale)));
} else {
cb->setText(QString::number((value.toDouble() / scale)));
}
return true;
}
else if(QDoubleSpinBox * cb=qobject_cast<QDoubleSpinBox *>(widget))
{
cb->setValue((double)(value.toDouble()/scale));
} else if (QDoubleSpinBox * cb = qobject_cast<QDoubleSpinBox *>(widget)) {
cb->setValue((double)(value.toDouble() / scale));
return true;
}
else if(QSpinBox * cb=qobject_cast<QSpinBox *>(widget))
{
cb->setValue((int)qRound(value.toDouble()/scale));
} else if (QSpinBox * cb = qobject_cast<QSpinBox *>(widget)) {
cb->setValue((int)qRound(value.toDouble() / scale));
return true;
}
else if(QSlider * cb=qobject_cast<QSlider *>(widget))
{
cb->setValue((int)qRound(value.toDouble()/scale));
} else if (QSlider * cb = qobject_cast<QSlider *>(widget)) {
cb->setValue((int)qRound(value.toDouble() / scale));
return true;
}
else if(QCheckBox * cb=qobject_cast<QCheckBox *>(widget))
{
bool bvalue=value.toString()=="TRUE";
} else if (QCheckBox * cb = qobject_cast<QCheckBox *>(widget)) {
bool bvalue = value.toString() == "TRUE";
cb->setChecked(bvalue);
return true;
}
else if(QLineEdit * cb=qobject_cast<QLineEdit *>(widget))
{
if ((scale== 0) || (scale == 1)) {
if(units == "hex") {
} else if (QLineEdit * cb = qobject_cast<QLineEdit *>(widget)) {
if ((scale == 0) || (scale == 1)) {
if (units == "hex") {
cb->setText(QString::number(value.toUInt(), 16).toUpper());
} else {
cb->setText(value.toString());
}
} else {
cb->setText(QString::number((value.toDouble()/scale)));
cb->setText(QString::number((value.toDouble() / scale)));
}
return true;
}
else
} else {
return false;
}
}
/**
@ -1177,185 +1107,154 @@ bool ConfigTaskWidget::setWidgetFromVariant(QWidget *widget, QVariant value, dou
* @param hasLimits set to true if you want to limit the values (check wiki)
* @return returns true if the assignement was successfull
*/
bool ConfigTaskWidget::setWidgetFromField(QWidget * widget,UAVObjectField * field,int index,double scale,bool hasLimits)
bool ConfigTaskWidget::setWidgetFromField(QWidget *widget, UAVObjectField *field, int index, double scale, bool hasLimits)
{
if(!widget || !field)
if (!widget || !field) {
return false;
if(QComboBox * cb=qobject_cast<QComboBox *>(widget))
{
if(cb->count()==0)
loadWidgetLimits(cb,field,index,hasLimits,scale);
}
QVariant var=field->getValue(index);
checkWidgetsLimits(widget,field,index,hasLimits,var,scale);
bool ret = setWidgetFromVariant(widget, var, scale, field->getUnits());
if(ret)
if (QComboBox * cb = qobject_cast<QComboBox *>(widget)) {
if (cb->count() == 0) {
loadWidgetLimits(cb, field, index, hasLimits, scale);
}
}
QVariant var = field->getValue(index);
checkWidgetsLimits(widget, field, index, hasLimits, var, scale);
bool ret = setWidgetFromVariant(widget, var, scale, field->getUnits());
if (ret) {
return true;
else
{
qDebug()<<__FUNCTION__<<"widget to uavobject relation not implemented"<<widget->metaObject()->className();
} else {
qDebug() << __FUNCTION__ << "widget to uavobject relation not implemented" << widget->metaObject()->className();
return false;
}
}
void ConfigTaskWidget::checkWidgetsLimits(QWidget * widget,UAVObjectField * field,int index,bool hasLimits, QVariant value, double scale)
void ConfigTaskWidget::checkWidgetsLimits(QWidget *widget, UAVObjectField *field, int index, bool hasLimits, QVariant value, double scale)
{
if(!hasLimits)
if (!hasLimits) {
return;
if(!field->isWithinLimits(value,index,currentBoard))
{
if(!widget->property("styleBackup").isValid())
widget->setProperty("styleBackup",widget->styleSheet());
widget->setStyleSheet(outOfLimitsStyle);
widget->setProperty("wasOverLimits",(bool)true);
if(QComboBox * cb=qobject_cast<QComboBox *>(widget))
{
if(cb->findText(value.toString())==-1)
cb->addItem(value.toString());
}
else if(QDoubleSpinBox * cb=qobject_cast<QDoubleSpinBox *>(widget))
{
if((double)(value.toDouble()/scale)>cb->maximum())
{
cb->setMaximum((double)(value.toDouble()/scale));
}
else if((double)(value.toDouble()/scale)<cb->minimum())
{
cb->setMinimum((double)(value.toDouble()/scale));
}
}
else if(QSpinBox * cb=qobject_cast<QSpinBox *>(widget))
{
if((int)qRound(value.toDouble()/scale)>cb->maximum())
{
cb->setMaximum((int)qRound(value.toDouble()/scale));
}
else if((int)qRound(value.toDouble()/scale)<cb->minimum())
{
cb->setMinimum((int)qRound(value.toDouble()/scale));
}
}
else if(QSlider * cb=qobject_cast<QSlider *>(widget))
{
if((int)qRound(value.toDouble()/scale)>cb->maximum())
{
cb->setMaximum((int)qRound(value.toDouble()/scale));
}
else if((int)qRound(value.toDouble()/scale)<cb->minimum())
{
cb->setMinimum((int)qRound(value.toDouble()/scale));
}
}
}
else if(widget->property("wasOverLimits").isValid())
{
if(widget->property("wasOverLimits").toBool())
{
widget->setProperty("wasOverLimits",(bool)false);
if(widget->property("styleBackup").isValid())
{
QString style=widget->property("styleBackup").toString();
if (!field->isWithinLimits(value, index, currentBoard)) {
if (!widget->property("styleBackup").isValid()) {
widget->setProperty("styleBackup", widget->styleSheet());
}
widget->setStyleSheet(outOfLimitsStyle);
widget->setProperty("wasOverLimits", (bool)true);
if (QComboBox * cb = qobject_cast<QComboBox *>(widget)) {
if (cb->findText(value.toString()) == -1) {
cb->addItem(value.toString());
}
} else if (QDoubleSpinBox * cb = qobject_cast<QDoubleSpinBox *>(widget)) {
if ((double)(value.toDouble() / scale) > cb->maximum()) {
cb->setMaximum((double)(value.toDouble() / scale));
} else if ((double)(value.toDouble() / scale) < cb->minimum()) {
cb->setMinimum((double)(value.toDouble() / scale));
}
} else if (QSpinBox * cb = qobject_cast<QSpinBox *>(widget)) {
if ((int)qRound(value.toDouble() / scale) > cb->maximum()) {
cb->setMaximum((int)qRound(value.toDouble() / scale));
} else if ((int)qRound(value.toDouble() / scale) < cb->minimum()) {
cb->setMinimum((int)qRound(value.toDouble() / scale));
}
} else if (QSlider * cb = qobject_cast<QSlider *>(widget)) {
if ((int)qRound(value.toDouble() / scale) > cb->maximum()) {
cb->setMaximum((int)qRound(value.toDouble() / scale));
} else if ((int)qRound(value.toDouble() / scale) < cb->minimum()) {
cb->setMinimum((int)qRound(value.toDouble() / scale));
}
}
} else if (widget->property("wasOverLimits").isValid()) {
if (widget->property("wasOverLimits").toBool()) {
widget->setProperty("wasOverLimits", (bool)false);
if (widget->property("styleBackup").isValid()) {
QString style = widget->property("styleBackup").toString();
widget->setStyleSheet(style);
}
loadWidgetLimits(widget,field,index,hasLimits,scale);
loadWidgetLimits(widget, field, index, hasLimits, scale);
}
}
}
void ConfigTaskWidget::loadWidgetLimits(QWidget * widget,UAVObjectField * field,int index,bool hasLimits,double scale)
{
if(!widget || !field)
void ConfigTaskWidget::loadWidgetLimits(QWidget *widget, UAVObjectField *field, int index, bool hasLimits, double scale)
{
if (!widget || !field) {
return;
if(QComboBox * cb=qobject_cast<QComboBox *>(widget))
{
}
if (QComboBox * cb = qobject_cast<QComboBox *>(widget)) {
cb->clear();
QStringList option=field->getOptions();
if(hasLimits)
{
foreach(QString str,option)
{
if(field->isWithinLimits(str,index,currentBoard))
QStringList option = field->getOptions();
if (hasLimits) {
foreach(QString str, option) {
if (field->isWithinLimits(str, index, currentBoard)) {
cb->addItem(str);
}
}
}
else
} else {
cb->addItems(option);
}
}
if(!hasLimits)
if (!hasLimits) {
return;
else if(QDoubleSpinBox * cb=qobject_cast<QDoubleSpinBox *>(widget))
{
if(field->getMaxLimit(index).isValid())
{
cb->setMaximum((double)(field->getMaxLimit(index,currentBoard).toDouble()/scale));
} else if (QDoubleSpinBox * cb = qobject_cast<QDoubleSpinBox *>(widget)) {
if (field->getMaxLimit(index).isValid()) {
cb->setMaximum((double)(field->getMaxLimit(index, currentBoard).toDouble() / scale));
}
if(field->getMinLimit(index,currentBoard).isValid())
{
cb->setMinimum((double)(field->getMinLimit(index,currentBoard).toDouble()/scale));
if (field->getMinLimit(index, currentBoard).isValid()) {
cb->setMinimum((double)(field->getMinLimit(index, currentBoard).toDouble() / scale));
}
}
else if(QSpinBox * cb=qobject_cast<QSpinBox *>(widget))
{
if(field->getMaxLimit(index,currentBoard).isValid())
{
cb->setMaximum((int)qRound(field->getMaxLimit(index,currentBoard).toDouble()/scale));
} else if (QSpinBox * cb = qobject_cast<QSpinBox *>(widget)) {
if (field->getMaxLimit(index, currentBoard).isValid()) {
cb->setMaximum((int)qRound(field->getMaxLimit(index, currentBoard).toDouble() / scale));
}
if(field->getMinLimit(index,currentBoard).isValid())
{
cb->setMinimum((int)qRound(field->getMinLimit(index,currentBoard).toDouble()/scale));
if (field->getMinLimit(index, currentBoard).isValid()) {
cb->setMinimum((int)qRound(field->getMinLimit(index, currentBoard).toDouble() / scale));
}
}
else if(QSlider * cb=qobject_cast<QSlider *>(widget))
{
if(field->getMaxLimit(index,currentBoard).isValid())
{
cb->setMaximum((int)qRound(field->getMaxLimit(index,currentBoard).toDouble()/scale));
} else if (QSlider * cb = qobject_cast<QSlider *>(widget)) {
if (field->getMaxLimit(index, currentBoard).isValid()) {
cb->setMaximum((int)qRound(field->getMaxLimit(index, currentBoard).toDouble() / scale));
}
if(field->getMinLimit(index,currentBoard).isValid())
{
cb->setMinimum((int)(field->getMinLimit(index,currentBoard).toDouble()/scale));
if (field->getMinLimit(index, currentBoard).isValid()) {
cb->setMinimum((int)(field->getMinLimit(index, currentBoard).toDouble() / scale));
}
}
}
void ConfigTaskWidget::updateEnableControls()
{
TelemetryManager* telMngr = pm->getObject<TelemetryManager>();
TelemetryManager *telMngr = pm->getObject<TelemetryManager>();
Q_ASSERT(telMngr);
enableControls(telMngr->isConnected());
}
void ConfigTaskWidget::disableMouseWheelEvents()
{
//Disable mouse wheel events
foreach( QSpinBox * sp, findChildren<QSpinBox*>() ) {
sp->installEventFilter( this );
// Disable mouse wheel events
foreach(QSpinBox * sp, findChildren<QSpinBox *>()) {
sp->installEventFilter(this);
}
foreach( QDoubleSpinBox * sp, findChildren<QDoubleSpinBox*>() ) {
sp->installEventFilter( this );
foreach(QDoubleSpinBox * sp, findChildren<QDoubleSpinBox *>()) {
sp->installEventFilter(this);
}
foreach( QSlider * sp, findChildren<QSlider*>() ) {
sp->installEventFilter( this );
foreach(QSlider * sp, findChildren<QSlider *>()) {
sp->installEventFilter(this);
}
foreach( QComboBox * sp, findChildren<QComboBox*>() ) {
sp->installEventFilter( this );
foreach(QComboBox * sp, findChildren<QComboBox *>()) {
sp->installEventFilter(this);
}
}
bool ConfigTaskWidget::eventFilter( QObject * obj, QEvent * evt ) {
//Filter all wheel events, and ignore them
if ( evt->type() == QEvent::Wheel &&
(qobject_cast<QAbstractSpinBox*>( obj ) ||
qobject_cast<QComboBox*>( obj ) ||
qobject_cast<QAbstractSlider*>( obj ) ))
{
bool ConfigTaskWidget::eventFilter(QObject *obj, QEvent *evt)
{
// Filter all wheel events, and ignore them
if (evt->type() == QEvent::Wheel &&
(qobject_cast<QAbstractSpinBox *>(obj) ||
qobject_cast<QComboBox *>(obj) ||
qobject_cast<QAbstractSlider *>(obj))) {
evt->ignore();
return true;
}
return QWidget::eventFilter( obj, evt );
return QWidget::eventFilter(obj, evt);
}
/**
@}
@}
*/
@}
@}
*/

View File

@ -48,53 +48,49 @@
#include <QUrl>
#include <QEvent>
class UAVOBJECTWIDGETUTILS_EXPORT ConfigTaskWidget: public QWidget
{
class UAVOBJECTWIDGETUTILS_EXPORT ConfigTaskWidget : public QWidget {
Q_OBJECT
public:
struct shadow
{
QWidget * widget;
double scale;
bool isLimited;
struct shadow {
QWidget *widget;
double scale;
bool isLimited;
};
struct objectToWidget
{
UAVObject * object;
UAVObjectField * field;
QWidget * widget;
struct objectToWidget {
UAVObject *object;
UAVObjectField *field;
QWidget *widget;
int index;
double scale;
double scale;
bool isLimited;
QList<shadow *> shadowsList;
QString getUnits() const {
QString getUnits() const
{
if (field) {
return field->getUnits();
}
return QString("");
return QString("");
}
};
struct temphelper
{
struct temphelper {
quint32 objid;
quint32 objinstid;
bool operator==(const temphelper& lhs)
bool operator==(const temphelper & lhs)
{
return (lhs.objid==this->objid && lhs.objinstid==this->objinstid);
return lhs.objid == this->objid && lhs.objinstid == this->objinstid;
}
};
enum buttonTypeEnum {none,save_button,apply_button,reload_button,default_button,help_button};
struct uiRelationAutomation
{
QString objname;
QString fieldname;
QString element;
QString url;
enum buttonTypeEnum { none, save_button, apply_button, reload_button, default_button, help_button };
struct uiRelationAutomation {
QString objname;
QString fieldname;
QString element;
QString url;
buttonTypeEnum buttonType;
QList<int> buttonGroup;
QList<int> buttonGroup;
double scale;
bool haslimits;
};
@ -103,37 +99,37 @@ public:
virtual ~ConfigTaskWidget();
void disableMouseWheelEvents();
bool eventFilter( QObject * obj, QEvent * evt );
bool eventFilter(QObject *obj, QEvent *evt);
void saveObjectToSD(UAVObject *obj);
UAVObjectManager* getObjectManager();
UAVObjectManager *getObjectManager();
static double listMean(QList<double> list);
static double listVar(QList<double> list);
void addUAVObject(QString objectName, QList<int> *reloadGroups=NULL);
void addUAVObject(UAVObject * objectName, QList<int> *reloadGroups=NULL);
void addUAVObject(QString objectName, QList<int> *reloadGroups = NULL);
void addUAVObject(UAVObject *objectName, QList<int> *reloadGroups = NULL);
void addWidget(QWidget * widget);
void addWidget(QWidget *widget);
void addUAVObjectToWidgetRelation(QString object,QString field,QWidget * widget,int index=0,double scale=1,bool isLimited=false,QList<int>* defaultReloadGroups=0,quint32 instID=0);
void addUAVObjectToWidgetRelation(UAVObject *obj, UAVObjectField * field, QWidget *widget, int index=0, double scale=1, bool isLimited=false, QList<int> *defaultReloadGroups=0, quint32 instID=0);
void addUAVObjectToWidgetRelation(QString object, QString field, QWidget *widget, int index = 0, double scale = 1, bool isLimited = false, QList<int> *defaultReloadGroups = 0, quint32 instID = 0);
void addUAVObjectToWidgetRelation(UAVObject *obj, UAVObjectField *field, QWidget *widget, int index = 0, double scale = 1, bool isLimited = false, QList<int> *defaultReloadGroups = 0, quint32 instID = 0);
void addUAVObjectToWidgetRelation(QString object,QString field,QWidget * widget,QString element,double scale,bool isLimited=false,QList<int>* defaultReloadGroups=0,quint32 instID=0);
void addUAVObjectToWidgetRelation(UAVObject *obj, UAVObjectField * field,QWidget * widget,QString element,double scale,bool isLimited=false,QList<int>* defaultReloadGroups=0,quint32 instID=0);
void addUAVObjectToWidgetRelation(QString object, QString field, QWidget *widget, QString element, double scale, bool isLimited = false, QList<int> *defaultReloadGroups = 0, quint32 instID = 0);
void addUAVObjectToWidgetRelation(UAVObject *obj, UAVObjectField *field, QWidget *widget, QString element, double scale, bool isLimited = false, QList<int> *defaultReloadGroups = 0, quint32 instID = 0);
void addUAVObjectToWidgetRelation(QString object, QString field, QWidget *widget, QString index);
void addUAVObjectToWidgetRelation(UAVObject *obj, UAVObjectField * field, QWidget *widget, QString index);
void addUAVObjectToWidgetRelation(UAVObject *obj, UAVObjectField *field, QWidget *widget, QString index);
//BUTTONS//
void addApplySaveButtons(QPushButton * update,QPushButton * save);
void addReloadButton(QPushButton * button,int buttonGroup);
void addDefaultButton(QPushButton * button,int buttonGroup);
// BUTTONS//
void addApplySaveButtons(QPushButton *update, QPushButton *save);
void addReloadButton(QPushButton *button, int buttonGroup);
void addDefaultButton(QPushButton *button, int buttonGroup);
//////////
void addWidgetToDefaultReloadGroups(QWidget * widget, QList<int> *groups);
void addWidgetToDefaultReloadGroups(QWidget *widget, QList<int> *groups);
bool addShadowWidget(QWidget * masterWidget, QWidget * shadowWidget,double shadowScale=1,bool shadowIsLimited=false);
bool addShadowWidget(QString object,QString field,QWidget * widget,int index=0,double scale=1,bool isLimited=false, QList<int> *defaultReloadGroups=NULL, quint32 instID=0);
bool addShadowWidget(QWidget *masterWidget, QWidget *shadowWidget, double shadowScale = 1, bool shadowIsLimited = false);
bool addShadowWidget(QString object, QString field, QWidget *widget, int index = 0, double scale = 1, bool isLimited = false, QList<int> *defaultReloadGroups = NULL, quint32 instID = 0);
void autoLoadWidgets();
@ -141,8 +137,11 @@ public:
void setDirty(bool value);
bool allObjectsUpdated();
void setOutOfLimitsStyle(QString style){outOfLimitsStyle=style;}
void addHelpButton(QPushButton * button,QString url);
void setOutOfLimitsStyle(QString style)
{
outOfLimitsStyle = style;
}
void addHelpButton(QPushButton *button, QString url);
void forceShadowUpdates();
void forceConnectedState();
public slots:
@ -152,21 +151,21 @@ public slots:
void apply();
void save();
signals:
//fired when a widgets contents changes
void widgetContentsChanged(QWidget * widget);
//fired when the framework requests that the widgets values be populated, use for custom behaviour
// fired when a widgets contents changes
void widgetContentsChanged(QWidget *widget);
// fired when the framework requests that the widgets values be populated, use for custom behaviour
void populateWidgetsRequested();
//fired when the framework requests that the widgets values be refreshed, use for custom behaviour
// fired when the framework requests that the widgets values be refreshed, use for custom behaviour
void refreshWidgetsValuesRequested();
//fired when the framework requests that the UAVObject values be updated from the widgets value, use for custom behaviour
// fired when the framework requests that the UAVObject values be updated from the widgets value, use for custom behaviour
void updateObjectsFromWidgetsRequested();
//fired when the autopilot connects
// fired when the autopilot connects
void autoPilotConnected();
//fired when the autopilot disconnects
// fired when the autopilot disconnects
void autoPilotDisconnected();
void defaultRequested(int group);
private slots:
void objectUpdated(UAVObject*);
void objectUpdated(UAVObject *);
void defaultButtonClicked();
void reloadButtonClicked();
private:
@ -174,15 +173,15 @@ private:
bool isConnected;
bool allowWidgetUpdates;
QStringList objectsList;
QList <objectToWidget*> objOfInterest;
QList <objectToWidget *> objOfInterest;
ExtensionSystem::PluginManager *pm;
UAVObjectManager *objManager;
UAVObjectUtilManager* utilMngr;
UAVObjectUtilManager *utilMngr;
smartSaveButton *smartsave;
QMap<UAVObject *,bool> objectUpdates;
QMap<int,QList<objectToWidget*> *> defaultReloadGroups;
QMap<QWidget *,objectToWidget*> shadowsList;
QMap<QPushButton *,QString> helpButtonList;
QMap<UAVObject *, bool> objectUpdates;
QMap<int, QList<objectToWidget *> *> defaultReloadGroups;
QMap<QWidget *, objectToWidget *> shadowsList;
QMap<QPushButton *, QString> helpButtonList;
QList<QPushButton *> reloadButtonList;
bool dirty;
bool setFieldFromWidget(QWidget *widget, UAVObjectField *field, int index, double scale);
@ -194,7 +193,7 @@ private:
void disconnectWidgetUpdatesToSlot(QWidget *widget, const char *function);
void loadWidgetLimits(QWidget *widget, UAVObjectField *field, int index, bool hasLimits, double sclale);
QString outOfLimitsStyle;
QTimer * timeOut;
QTimer *timeOut;
protected slots:
virtual void disableObjUpdates();
@ -202,14 +201,13 @@ protected slots:
virtual void clearDirty();
virtual void widgetsContentsChanged();
virtual void populateWidgets();
virtual void refreshWidgetsValues(UAVObject * obj=NULL);
virtual void refreshWidgetsValues(UAVObject *obj = NULL);
virtual void updateObjectsFromWidgets();
virtual void helpButtonPressed();
protected:
virtual void enableControls(bool enable);
void checkWidgetsLimits(QWidget *widget, UAVObjectField *field, int index, bool hasLimits, QVariant value, double scale);
void updateEnableControls();
};
#endif // CONFIGTASKWIDGET_H

View File

@ -39,8 +39,7 @@ QT_BEGIN_NAMESPACE
class QGraphicsSceneMouseEvent;
QT_END_NAMESPACE
class MixerNode : public QObject,public QGraphicsItem
{
class MixerNode : public QObject, public QGraphicsItem {
Q_OBJECT
public:
MixerNode(MixerCurveWidget *graphWidget);
@ -48,15 +47,37 @@ public:
QList<Edge *> edges() const;
enum { Type = UserType + 10 };
int type() const { return Type; }
int type() const
{
return Type;
}
void verticalMove(bool flag);
void setPositiveColor(QColor color = "#609FF2") {positiveColor = color; }
void setNegativeColor(QColor color = "#EF5F5F") {negativeColor = color; }
void setImage(QImage img) { image = img; }
void setDrawNode(bool draw) { drawNode = draw; }
void setDrawText(bool draw) { drawText = draw; }
void setPositiveColor(QColor color = "#609FF2")
{
positiveColor = color;
}
void setNegativeColor(QColor color = "#EF5F5F")
{
negativeColor = color;
}
void setImage(QImage img)
{
image = img;
}
void setDrawNode(bool draw)
{
drawNode = draw;
}
void setDrawText(bool draw)
{
drawText = draw;
}
QRectF boundingRect() const;
QPainterPath shape() const;
@ -69,25 +90,24 @@ protected:
void mousePressEvent(QGraphicsSceneMouseEvent *event);
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
private:
QList<Edge *> edgeList;
QPointF newPos;
MixerCurveWidget* graph;
QList<Edge *> edgeList;
QPointF newPos;
MixerCurveWidget *graph;
QColor positiveColor;
QColor neutralColor;
QColor negativeColor;
QColor disabledColor;
QColor disabledTextColor;
QColor positiveColor;
QColor neutralColor;
QColor negativeColor;
QColor disabledColor;
QColor disabledTextColor;
QImage image;
bool vertical;
bool drawNode;
bool drawText;
int index;
QImage image;
bool vertical;
bool drawNode;
bool drawText;
int index;
};
#endif // MIXERCURVEPOINT_H
#endif // MIXERCURVEPOINT_H

View File

@ -37,57 +37,54 @@
#include "mixercurveline.h"
#include "uavobjectwidgetutils_global.h"
class UAVOBJECTWIDGETUTILS_EXPORT MixerCurveWidget : public QGraphicsView
{
class UAVOBJECTWIDGETUTILS_EXPORT MixerCurveWidget : public QGraphicsView {
Q_OBJECT
public:
MixerCurveWidget(QWidget *parent = 0);
~MixerCurveWidget();
~MixerCurveWidget();
friend class MixerCurve;
void itemMoved(double itemValue); // Callback when a point is moved, to be updated
void initCurve (const QList<double>* points);
QList<double> getCurve();
void initLinearCurve(int numPoints, double maxValue = 1, double minValue = 0);
void setCurve(const QList<double>* points);
void setMin(double value);
double getMin();
void setMax(double value);
double getMax();
double setRange(double min, double max);
void itemMoved(double itemValue); // Callback when a point is moved, to be updated
void initCurve(const QList<double> *points);
QList<double> getCurve();
void initLinearCurve(int numPoints, double maxValue = 1, double minValue = 0);
void setCurve(const QList<double> *points);
void setMin(double value);
double getMin();
void setMax(double value);
double getMax();
double setRange(double min, double max);
static const int NODE_NUMELEM = 5;
static const int NODE_NUMELEM = 5;
signals:
void curveUpdated();
void curveMinChanged(double value);
void curveMaxChanged(double value);
void curveUpdated();
void curveMinChanged(double value);
void curveMaxChanged(double value);
private slots:
private:
QGraphicsSvgItem *plot;
QGraphicsSvgItem *plot;
QList<Edge*> edgeList;
QList<MixerNode*> nodeList;
QList<Edge *> edgeList;
QList<MixerNode *> nodeList;
double curveMin;
double curveMax;
bool curveUpdating;
double curveMin;
double curveMax;
bool curveUpdating;
void initNodes(int numPoints);
void setPositiveColor(QString color);
void setNegativeColor(QString color);
void initNodes(int numPoints);
void setPositiveColor(QString color);
void setNegativeColor(QString color);
void resizeCommands();
void resizeCommands();
protected:
void showEvent(QShowEvent *event);
void resizeEvent(QResizeEvent *event);
void changeEvent(QEvent *event);
};
#endif /* MIXERCURVEWIDGET_H_ */

View File

@ -12,19 +12,24 @@ namespace Ui {
class PopupWidget;
}
class UAVOBJECTWIDGETUTILS_EXPORT PopupWidget : public QDialog
{
class UAVOBJECTWIDGETUTILS_EXPORT PopupWidget : public QDialog {
Q_OBJECT
public:
explicit PopupWidget(QWidget *parent = 0);
void popUp(QWidget* widget = 0);
void setWidget(QWidget* widget);
QWidget* getWidget() { return m_widget; }
QHBoxLayout* getLayout() { return m_layout; }
signals:
void popUp(QWidget *widget = 0);
void setWidget(QWidget *widget);
QWidget *getWidget()
{
return m_widget;
}
QHBoxLayout *getLayout()
{
return m_layout;
}
public slots:
bool close();
void done(int result);
@ -33,12 +38,12 @@ private slots:
void closePopup();
private:
QHBoxLayout* m_layout;
QWidget* m_widget;
QWidget* m_widgetParent;
QPushButton* m_closeButton;
int m_widgetWidth;
int m_widgetHeight;
QHBoxLayout *m_layout;
QWidget *m_widget;
QWidget *m_widgetParent;
QPushButton *m_closeButton;
int m_widgetWidth;
int m_widgetHeight;
};
#endif // POPUPWIDGET_H

View File

@ -37,14 +37,15 @@
#include "uavobjectutilmanager.h"
#include <QObject>
#include <QDebug>
class smartSaveButton:public QObject
{
enum buttonTypeEnum {save_button,apply_button};
class smartSaveButton : public QObject {
enum buttonTypeEnum { save_button, apply_button };
public:
Q_OBJECT
public:
smartSaveButton();
void addButtons(QPushButton * save,QPushButton * apply);
void addButtons(QPushButton *save, QPushButton *apply);
void setObjects(QList<UAVDataObject *>);
void addObject(UAVDataObject *);
void clearObjects();
@ -53,32 +54,34 @@ public:
void addApplyButton(QPushButton *apply);
void addSaveButton(QPushButton *save);
void resetIcons();
signals:
void preProcessOperations();
void saveSuccessfull();
void beginOp();
void endOp();
public slots:
void apply();
void save();
private slots:
void processClick();
void processOperation(QPushButton *button, bool save);
void transaction_finished(UAVObject* obj, bool result);
void saving_finished(int,bool);
void transaction_finished(UAVObject *obj, bool result);
void saving_finished(int, bool);
private:
quint32 current_objectID;
UAVDataObject * current_object;
UAVDataObject *current_object;
bool up_result;
bool sv_result;
QEventLoop loop;
QList<UAVDataObject *> objects;
QMap<QPushButton *,buttonTypeEnum> buttonList;
protected:
QMap<QPushButton *, buttonTypeEnum> buttonList;
public slots:
void enableControls(bool value);
};