diff --git a/ground/openpilotgcs/src/plugins/coreplugin/aboutdialog.cpp b/ground/openpilotgcs/src/plugins/coreplugin/aboutdialog.cpp index e47015051..d72c7c412 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/aboutdialog.cpp +++ b/ground/openpilotgcs/src/plugins/coreplugin/aboutdialog.cpp @@ -58,7 +58,7 @@ AboutDialog::AboutDialog(QWidget *parent) : "Built on %4 at %5
" "Based on Qt %6 (%7 bit)
" "
" - "© %8, 2010-%9. All rights reserved.
" + "© %8, 2010-%9. All rights reserved.
" ).arg( VersionInfo::revision().left(60), // %1 VersionInfo::uavoHash().left(8), // %2 @@ -77,12 +77,12 @@ AboutDialog::AboutDialog(QWidget *parent) : view->setResizeMode(QQuickView::SizeRootObjectToView); view->setSource(QUrl("qrc:/core/qml/AboutDialog.qml")); - QWidget * container = QWidget::createWindowContainer(view); + QWidget *container = QWidget::createWindowContainer(view); container->setMinimumSize(600, 400); container->setMaximumSize(800, 600); container->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); QVBoxLayout *lay = new QVBoxLayout(); - lay->setContentsMargins(0,0,0,0); + lay->setContentsMargins(0, 0, 0, 0); setLayout(lay); layout()->addWidget(container); } @@ -93,5 +93,4 @@ void AboutDialog::openUrl(const QString &url) } AboutDialog::~AboutDialog() -{ -} +{} diff --git a/ground/openpilotgcs/src/plugins/coreplugin/aboutdialog.h b/ground/openpilotgcs/src/plugins/coreplugin/aboutdialog.h index 6bce8d24b..a023354d5 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/aboutdialog.h +++ b/ground/openpilotgcs/src/plugins/coreplugin/aboutdialog.h @@ -26,8 +26,7 @@ #include -class AboutDialog : public QDialog -{ +class AboutDialog : public QDialog { Q_OBJECT public: @@ -36,7 +35,6 @@ public: public slots: void openUrl(const QString &url); - }; #endif // ABOUTDIALOG_H diff --git a/ground/openpilotgcs/src/plugins/pfdqml/pfdqmlgadget.cpp b/ground/openpilotgcs/src/plugins/pfdqml/pfdqmlgadget.cpp index 30e803f33..e28257ff5 100644 --- a/ground/openpilotgcs/src/plugins/pfdqml/pfdqmlgadget.cpp +++ b/ground/openpilotgcs/src/plugins/pfdqml/pfdqmlgadget.cpp @@ -23,7 +23,7 @@ PfdQmlGadget::PfdQmlGadget(QString classId, PfdQmlGadgetWidget *widget, QWidget m_widget(widget) { m_container = NULL; - m_parent = parent; + m_parent = parent; } PfdQmlGadget::~PfdQmlGadget() diff --git a/ground/openpilotgcs/src/plugins/pfdqml/pfdqmlgadget.h b/ground/openpilotgcs/src/plugins/pfdqml/pfdqmlgadget.h index 131ab9b31..f36bbb6fe 100644 --- a/ground/openpilotgcs/src/plugins/pfdqml/pfdqmlgadget.h +++ b/ground/openpilotgcs/src/plugins/pfdqml/pfdqmlgadget.h @@ -35,7 +35,7 @@ public: QWidget *widget() { - if(!m_container){ + if (!m_container) { m_container = QWidget::createWindowContainer(m_widget, m_parent); m_container->setMinimumSize(64, 64); m_container->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); diff --git a/ground/openpilotgcs/src/plugins/pfdqml/pfdqmlgadgetwidget.cpp b/ground/openpilotgcs/src/plugins/pfdqml/pfdqmlgadgetwidget.cpp index 7f0262ad3..96fa900a4 100644 --- a/ground/openpilotgcs/src/plugins/pfdqml/pfdqmlgadgetwidget.cpp +++ b/ground/openpilotgcs/src/plugins/pfdqml/pfdqmlgadgetwidget.cpp @@ -162,7 +162,7 @@ void PfdQmlGadgetWidget::setAltitudeFactor(double factor) void PfdQmlGadgetWidget::setOpenGLEnabled(bool arg) { - setTerrainEnabled(m_terrainEnabled); + setTerrainEnabled(m_terrainEnabled); } // Switch between PositionState UAVObject position diff --git a/ground/openpilotgcs/src/plugins/qmlview/qmlviewgadget.cpp b/ground/openpilotgcs/src/plugins/qmlview/qmlviewgadget.cpp index aa071e893..0bc9eca42 100644 --- a/ground/openpilotgcs/src/plugins/qmlview/qmlviewgadget.cpp +++ b/ground/openpilotgcs/src/plugins/qmlview/qmlviewgadget.cpp @@ -35,7 +35,7 @@ QmlViewGadget::QmlViewGadget(QString classId, QmlViewGadgetWidget *widget, QWidg m_widget(widget) { m_container = NULL; - m_parent = parent; + m_parent = parent; } QmlViewGadget::~QmlViewGadget() diff --git a/ground/openpilotgcs/src/plugins/qmlview/qmlviewgadget.h b/ground/openpilotgcs/src/plugins/qmlview/qmlviewgadget.h index fe7fac302..076cd8d99 100644 --- a/ground/openpilotgcs/src/plugins/qmlview/qmlviewgadget.h +++ b/ground/openpilotgcs/src/plugins/qmlview/qmlviewgadget.h @@ -46,7 +46,7 @@ public: QWidget *widget() { - if(!m_container){ + if (!m_container) { m_container = QWidget::createWindowContainer(m_widget, m_parent); m_container->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); m_container->setMinimumSize(64, 64); diff --git a/ground/openpilotgcs/src/plugins/uavobjectbrowser/fieldtreeitem.h b/ground/openpilotgcs/src/plugins/uavobjectbrowser/fieldtreeitem.h index 2876c6f0f..31cf9ecb3 100644 --- a/ground/openpilotgcs/src/plugins/uavobjectbrowser/fieldtreeitem.h +++ b/ground/openpilotgcs/src/plugins/uavobjectbrowser/fieldtreeitem.h @@ -114,7 +114,8 @@ public: QWidget *createEditor(QWidget *parent) { QComboBox *editor = new QComboBox(parent); - // Setting ClickFocus lets the ComboBox stay open on Mac OSX. + + // Setting ClickFocus lets the ComboBox stay open on Mac OSX. editor->setFocusPolicy(Qt::ClickFocus); foreach(QString option, m_enumOptions) editor->addItem(option); diff --git a/ground/openpilotgcs/src/plugins/welcome/welcomemode.cpp b/ground/openpilotgcs/src/plugins/welcome/welcomemode.cpp index e2c21956f..381fd226a 100644 --- a/ground/openpilotgcs/src/plugins/welcome/welcomemode.cpp +++ b/ground/openpilotgcs/src/plugins/welcome/welcomemode.cpp @@ -100,7 +100,7 @@ int WelcomeMode::priority() const QWidget *WelcomeMode::widget() { - if(!m_container){ + if (!m_container) { m_container = QWidget::createWindowContainer(m_d->quickView); m_container->setMinimumSize(64, 64); m_container->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); diff --git a/ground/uavobjgenerator/generators/gcs/uavobjectgeneratorgcs.cpp b/ground/uavobjgenerator/generators/gcs/uavobjectgeneratorgcs.cpp index 8821614dd..7265d411a 100644 --- a/ground/uavobjgenerator/generators/gcs/uavobjectgeneratorgcs.cpp +++ b/ground/uavobjgenerator/generators/gcs/uavobjectgeneratorgcs.cpp @@ -127,9 +127,9 @@ bool UAVObjectGeneratorGCS::process_object(ObjectInfo *info) type = fieldTypeStrCPP[field->type]; // Append field if (field->numElements > 1) { - //add both field(elementIndex)/setField(elemntIndex,value) and field_element properties - //field_element is more convenient if only certain element is used - //and much easier to use from the qml side + // add both field(elementIndex)/setField(elemntIndex,value) and field_element properties + // field_element is more convenient if only certain element is used + // and much easier to use from the qml side propertyGetters += QString(" Q_INVOKABLE %1 get%2(quint32 index) const;\n") .arg(type).arg(field->name); @@ -160,37 +160,37 @@ bool UAVObjectGeneratorGCS::process_object(ObjectInfo *info) for (int elementIndex = 0; elementIndex < field->numElements; elementIndex++) { QString elementName = field->elementNames[elementIndex]; properties += QString(" Q_PROPERTY(%1 %2 READ get%2 WRITE set%2 NOTIFY %2Changed);\n") - .arg(type).arg(field->name+"_"+elementName); + .arg(type).arg(field->name + "_" + elementName); propertyGetters += - QString(" Q_INVOKABLE %1 get%2_%3() const;\n") - .arg(type).arg(field->name).arg(elementName); - propertiesImpl += - QString("%1 %2::get%3_%4() const\n" - "{\n" - " QMutexLocker locker(mutex);\n" - " return data.%3[%5];\n" - "}\n") - .arg(type).arg(info->name).arg(field->name).arg(elementName).arg(elementIndex); + QString(" Q_INVOKABLE %1 get%2_%3() const;\n") + .arg(type).arg(field->name).arg(elementName); + propertiesImpl += + QString("%1 %2::get%3_%4() const\n" + "{\n" + " QMutexLocker locker(mutex);\n" + " return data.%3[%5];\n" + "}\n") + .arg(type).arg(info->name).arg(field->name).arg(elementName).arg(elementIndex); propertySetters += - QString(" void set%1_%2(%3 value);\n") - .arg(field->name).arg(elementName).arg(type); - propertiesImpl += - QString("void %1::set%2_%3(%4 value)\n" - "{\n" - " mutex->lock();\n" - " bool changed = data.%2[%5] != value;\n" - " data.%2[%5] = value;\n" - " mutex->unlock();\n" - " if (changed) emit %2_%3Changed(value);\n" - "}\n\n") - .arg(info->name).arg(field->name).arg(elementName).arg(type).arg(elementIndex); - propertyNotifications += - QString(" void %1_%2Changed(%3 value);\n") - .arg(field->name).arg(elementName).arg(type); + QString(" void set%1_%2(%3 value);\n") + .arg(field->name).arg(elementName).arg(type); + propertiesImpl += + QString("void %1::set%2_%3(%4 value)\n" + "{\n" + " mutex->lock();\n" + " bool changed = data.%2[%5] != value;\n" + " data.%2[%5] = value;\n" + " mutex->unlock();\n" + " if (changed) emit %2_%3Changed(value);\n" + "}\n\n") + .arg(info->name).arg(field->name).arg(elementName).arg(type).arg(elementIndex); + propertyNotifications += + QString(" void %1_%2Changed(%3 value);\n") + .arg(field->name).arg(elementName).arg(type); propertyNotificationsImpl += - QString(" //if (data.%1[%2] != oldData.%1[%2])\n" - " emit %1_%3Changed(data.%1[%2]);\n") - .arg(field->name).arg(elementIndex).arg(elementName); + QString(" //if (data.%1[%2] != oldData.%1[%2])\n" + " emit %1_%3Changed(data.%1[%2]);\n") + .arg(field->name).arg(elementIndex).arg(elementName); } } else { properties += QString(" Q_PROPERTY(%1 %2 READ get%2 WRITE set%2 NOTIFY %2Changed);\n")