mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-29 07:24:13 +01:00
OP-984 Uncrustify.
This commit is contained in:
parent
cd5fb01d7e
commit
3d8e3eb823
@ -49,7 +49,7 @@ ConfigStabilizationWidget::ConfigStabilizationWidget(QWidget *parent) : ConfigTa
|
||||
ui = new Ui_StabilizationWidget();
|
||||
ui->setupUi(this);
|
||||
|
||||
StabilizationSettings* stabSettings = qobject_cast<StabilizationSettings*>(getObject("StabilizationSettings"));
|
||||
StabilizationSettings *stabSettings = qobject_cast<StabilizationSettings *>(getObject("StabilizationSettings"));
|
||||
Q_ASSERT(stabSettings);
|
||||
|
||||
m_pidBankCount = stabSettings->getField("FlightModeMap")->getOptions().count();
|
||||
@ -68,7 +68,7 @@ ConfigStabilizationWidget::ConfigStabilizationWidget(QWidget *parent) : ConfigTa
|
||||
}
|
||||
|
||||
for (int i = 0; i < m_pidBankCount; i++) {
|
||||
if(i > 0) {
|
||||
if (i > 0) {
|
||||
m_stabilizationObjectsString.append(",");
|
||||
}
|
||||
m_stabilizationObjectsString.append(m_pidTabBars.at(0)->tabData(i).toString());
|
||||
@ -234,14 +234,13 @@ void ConfigStabilizationWidget::onBoardConnected()
|
||||
|
||||
void ConfigStabilizationWidget::pidBankChanged(int index)
|
||||
{
|
||||
|
||||
foreach(QTabBar * tabBar, m_pidTabBars) {
|
||||
disconnect(tabBar, SIGNAL(currentChanged(int)), this, SLOT(pidBankChanged(int)));
|
||||
tabBar->setCurrentIndex(index);
|
||||
connect(tabBar, SIGNAL(currentChanged(int)), this, SLOT(pidBankChanged(int)));
|
||||
}
|
||||
|
||||
for(int i = 0; i < m_pidTabBars.at(0)->count(); i++) {
|
||||
for (int i = 0; i < m_pidTabBars.at(0)->count(); i++) {
|
||||
setWidgetBindingObjectEnabled(m_pidTabBars.at(0)->tabData(i).toString(), false);
|
||||
}
|
||||
|
||||
@ -262,7 +261,7 @@ bool ConfigStabilizationWidget::shouldObjectBeSaved(UAVObject *object)
|
||||
|
||||
QString ConfigStabilizationWidget::mapObjectName(const QString objectName)
|
||||
{
|
||||
if(objectName == "StabilizationSettingsBankX") {
|
||||
if (objectName == "StabilizationSettingsBankX") {
|
||||
return m_stabilizationObjectsString;
|
||||
}
|
||||
return ConfigTaskWidget::mapObjectName(objectName);
|
||||
|
@ -48,7 +48,7 @@ public:
|
||||
private:
|
||||
Ui_StabilizationWidget *ui;
|
||||
QTimer *realtimeUpdates;
|
||||
QList<QTabBar*> m_pidTabBars;
|
||||
QList<QTabBar *> m_pidTabBars;
|
||||
QString m_stabilizationObjectsString;
|
||||
|
||||
// Milliseconds between automatic 'Instant Updates'
|
||||
|
@ -176,13 +176,13 @@ void ConfigTaskWidget::setWidgetBindingObjectEnabled(QString objectName, bool en
|
||||
foreach(WidgetBinding * binding, m_widgetBindingsPerObject.values(object)) {
|
||||
binding->setIsEnabled(enabled);
|
||||
if (enabled) {
|
||||
//disconnectWidgetUpdatesToSlot(binding->widget(), SLOT(widgetsContentsChanged()));
|
||||
// disconnectWidgetUpdatesToSlot(binding->widget(), SLOT(widgetsContentsChanged()));
|
||||
if (binding->value().isValid() && !binding->value().isNull()) {
|
||||
setWidgetFromVariant(binding->widget(), binding->value(), binding->scale());
|
||||
} else {
|
||||
setWidgetFromField(binding->widget(), binding->field(), binding->index(), binding->scale(), binding->isLimited());
|
||||
}
|
||||
//connectWidgetUpdatesToSlot(binding->widget(), SLOT(widgetsContentsChanged()));
|
||||
// connectWidgetUpdatesToSlot(binding->widget(), SLOT(widgetsContentsChanged()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -234,7 +234,7 @@ private:
|
||||
int fieldIndexFromElementName(QString objectName, QString fieldName, QString elementName);
|
||||
|
||||
void doAddWidgetBinding(QString objectName, QString fieldName, QWidget *widget, int index = 0, double scale = 1,
|
||||
bool isLimited = false, QList<int> *reloadGroupIDs = 0, quint32 instID = 0);
|
||||
bool isLimited = false, QList<int> *reloadGroupIDs = 0, quint32 instID = 0);
|
||||
|
||||
protected slots:
|
||||
virtual void disableObjectUpdates();
|
||||
|
Loading…
Reference in New Issue
Block a user