mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-01 09:24:10 +01:00
OP-1331 uncrustified
This commit is contained in:
parent
846146ca80
commit
fe60509ffa
@ -84,6 +84,7 @@ void MyTabbedStackWidget::insertTab(const int index, QWidget *tab, const QIcon &
|
|||||||
{
|
{
|
||||||
// create and insert item
|
// create and insert item
|
||||||
QListWidgetItem *item = new QListWidgetItem(icon, label);
|
QListWidgetItem *item = new QListWidgetItem(icon, label);
|
||||||
|
|
||||||
item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
|
item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
|
||||||
item->setTextAlignment(Qt::AlignHCenter | Qt::AlignBottom);
|
item->setTextAlignment(Qt::AlignHCenter | Qt::AlignBottom);
|
||||||
item->setToolTip(label);
|
item->setToolTip(label);
|
||||||
|
@ -165,9 +165,10 @@ void ConfigGadgetWidget::resizeEvent(QResizeEvent *event)
|
|||||||
void ConfigGadgetWidget::onAutopilotDisconnect()
|
void ConfigGadgetWidget::onAutopilotDisconnect()
|
||||||
{
|
{
|
||||||
QWidget *qwd = new DefaultAttitudeWidget(this);
|
QWidget *qwd = new DefaultAttitudeWidget(this);
|
||||||
|
|
||||||
stackWidget->replaceTab(ConfigGadgetWidget::sensors, qwd);
|
stackWidget->replaceTab(ConfigGadgetWidget::sensors, qwd);
|
||||||
|
|
||||||
qwd = new DefaultHwSettingsWidget(this);
|
qwd = new DefaultHwSettingsWidget(this);
|
||||||
stackWidget->replaceTab(ConfigGadgetWidget::hardware, qwd);
|
stackWidget->replaceTab(ConfigGadgetWidget::hardware, qwd);
|
||||||
|
|
||||||
emit autopilotDisconnected();
|
emit autopilotDisconnected();
|
||||||
@ -187,14 +188,14 @@ void ConfigGadgetWidget::onAutopilotConnect()
|
|||||||
QWidget *qwd = new ConfigCCAttitudeWidget(this);
|
QWidget *qwd = new ConfigCCAttitudeWidget(this);
|
||||||
stackWidget->replaceTab(ConfigGadgetWidget::sensors, qwd);
|
stackWidget->replaceTab(ConfigGadgetWidget::sensors, qwd);
|
||||||
|
|
||||||
qwd = new ConfigCCHWWidget(this);
|
qwd = new ConfigCCHWWidget(this);
|
||||||
stackWidget->replaceTab(ConfigGadgetWidget::hardware, qwd);
|
stackWidget->replaceTab(ConfigGadgetWidget::hardware, qwd);
|
||||||
} else if ((board & 0xff00) == 0x0900) {
|
} else if ((board & 0xff00) == 0x0900) {
|
||||||
// Revolution family
|
// Revolution family
|
||||||
QWidget *qwd = new ConfigRevoWidget(this);
|
QWidget *qwd = new ConfigRevoWidget(this);
|
||||||
stackWidget->replaceTab(ConfigGadgetWidget::sensors, qwd);
|
stackWidget->replaceTab(ConfigGadgetWidget::sensors, qwd);
|
||||||
|
|
||||||
qwd = new ConfigRevoHWWidget(this);
|
qwd = new ConfigRevoHWWidget(this);
|
||||||
stackWidget->replaceTab(ConfigGadgetWidget::hardware, qwd);
|
stackWidget->replaceTab(ConfigGadgetWidget::hardware, qwd);
|
||||||
} else {
|
} else {
|
||||||
// Unknown board
|
// Unknown board
|
||||||
|
@ -389,7 +389,7 @@ void ConfigTaskWidget::widgetsContentsChanged()
|
|||||||
foreach(ShadowWidgetBinding * shadow, binding->shadows()) {
|
foreach(ShadowWidgetBinding * shadow, binding->shadows()) {
|
||||||
if (shadow->widget() == emitter) {
|
if (shadow->widget() == emitter) {
|
||||||
WidgetBinding tmpBinding(shadow->widget(), binding->object(), binding->field(),
|
WidgetBinding tmpBinding(shadow->widget(), binding->object(), binding->field(),
|
||||||
binding->index(), shadow->scale(), shadow->isLimited());
|
binding->index(), shadow->scale(), shadow->isLimited());
|
||||||
value = getVariantFromWidget(emitter, &tmpBinding);
|
value = getVariantFromWidget(emitter, &tmpBinding);
|
||||||
checkWidgetsLimits(emitter, binding->field(), binding->index(), shadow->isLimited(), value, shadow->scale());
|
checkWidgetsLimits(emitter, binding->field(), binding->index(), shadow->isLimited(), value, shadow->scale());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user