diff --git a/ground/openpilotgcs/src/plugins/setupwizard/pages/airframeinitialtuningpage.cpp b/ground/openpilotgcs/src/plugins/setupwizard/pages/airframeinitialtuningpage.cpp index 9983abf76..bae342554 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/pages/airframeinitialtuningpage.cpp +++ b/ground/openpilotgcs/src/plugins/setupwizard/pages/airframeinitialtuningpage.cpp @@ -27,15 +27,183 @@ #include "airframeinitialtuningpage.h" #include "ui_airframeinitialtuningpage.h" +#include +#include +#include +#include "vehicletemplateexportdialog.h" AirframeInitialTuningPage::AirframeInitialTuningPage(SetupWizard *wizard, QWidget *parent) : AbstractWizardPage(wizard, parent), - ui(new Ui::AirframeInitialTuningPage) + ui(new Ui::AirframeInitialTuningPage), m_dir(NULL), m_photoItem(NULL) { ui->setupUi(this); + ui->templateImage->setScene(new QGraphicsScene()); + connect(ui->templateList, SIGNAL(itemSelectionChanged()), this, SLOT(templateSelectionChanged())); } AirframeInitialTuningPage::~AirframeInitialTuningPage() { + ui->templateList->clear(); + foreach(QJsonObject * templ, m_templates.values()) { + delete templ; + } + m_templates.clear(); + delete ui; } + +void AirframeInitialTuningPage::initializePage() +{ + switch (getWizard()->getVehicleType()) { + case VehicleConfigurationSource::VEHICLE_FIXEDWING: + m_dir = VehicleTemplateExportDialog::EXPORT_FIXEDWING_NAME; + break; + case VehicleConfigurationSource::VEHICLE_MULTI: + m_dir = VehicleTemplateExportDialog::EXPORT_MULTI_NAME; + break; + case VehicleConfigurationSource::VEHICLE_HELI: + m_dir = VehicleTemplateExportDialog::EXPORT_HELI_NAME; + break; + case VehicleConfigurationSource::VEHICLE_SURFACE: + m_dir = VehicleTemplateExportDialog::EXPORT_SURFACE_NAME; + break; + default: + m_dir = NULL; + break; + } + loadValidFiles(); + setupTemplateList(); +} + +bool AirframeInitialTuningPage::validatePage() +{ + QJsonObject *templ = NULL; + + if (ui->templateList->currentRow() >= 0) { + templ = ui->templateList->item(ui->templateList->currentRow())->data(Qt::UserRole + 1).value(); + } + getWizard()->setVehicleTemplate(new QJsonObject(*templ)); + return true; +} + +bool AirframeInitialTuningPage::isComplete() const +{ + return true; +} + +void AirframeInitialTuningPage::updatePhoto(QJsonObject *templ) +{ + QPixmap photo; + + if (m_photoItem != NULL) { + ui->templateImage->scene()->removeItem(m_photoItem); + } + if (templ != NULL) { + QByteArray imageData = QByteArray::fromBase64(templ->value("photo").toString().toLatin1()); + photo.loadFromData(imageData, "PNG"); + } else { + photo.load(":/core/images/opie_90x120.gif"); + } + m_photoItem = ui->templateImage->scene()->addPixmap(photo); + ui->templateImage->setSceneRect(ui->templateImage->scene()->itemsBoundingRect()); + ui->templateImage->fitInView(ui->templateImage->scene()->itemsBoundingRect(), Qt::KeepAspectRatio); +} + +void AirframeInitialTuningPage::updateDescription(QJsonObject *templ) +{ + if (templ != NULL) { + QString description; + description.append("").append(tr("Name of Vehicle: ")).append("").append(templ->value("name").toString()).append("
"); + description.append("").append(tr("Name of Owner: ")).append("").append(templ->value("owner").toString()) + .append(" (").append(templ->value("nick").toString()).append(")").append("
"); + description.append("").append(tr("Size: ")).append("").append(templ->value("size").toString()).append("
"); + description.append("").append(tr("Weight: ")).append("").append(templ->value("weight").toString()).append("
"); + description.append("").append(tr("Motor(s): ")).append("").append(templ->value("motor").toString()).append("
"); + description.append("").append(tr("ESC(s): ")).append("").append(templ->value("esc").toString()).append("
"); + description.append("").append(tr("Servo(s): ")).append("").append(templ->value("servo").toString()).append("
"); + description.append("").append(tr("Battery: ")).append("").append(templ->value("battery").toString()).append("
"); + description.append("").append(tr("Propellers(s): ")).append("").append(templ->value("propeller").toString()).append("
"); + description.append("").append(tr("Controller: ")).append("").append(templ->value("controller").toString()).append("
"); + description.append("").append(tr("Comments: ")).append("").append(templ->value("comment").toString()); + ui->templateDescription->setText(description); + } else { + ui->templateDescription->setText(tr("No vehicle selected!")); + } +} + +void AirframeInitialTuningPage::templateSelectionChanged() +{ + if (ui->templateList->currentRow() >= 0) { + QJsonObject *templ = ui->templateList->item(ui->templateList->currentRow())->data(Qt::UserRole + 1).value(); + updatePhoto(templ); + updateDescription(templ); + } +} + +void AirframeInitialTuningPage::loadValidFiles() +{ + ui->templateList->clear(); + foreach(QJsonObject * templ, m_templates.values()) { + delete templ; + } + m_templates.clear(); + + QDir templateDir(QString("%1/%2/").arg(VehicleTemplateExportDialog::EXPORT_BASE_NAME).arg(m_dir)); + QStringList names; + names << "*.optmpl"; + templateDir.setNameFilters(names); + templateDir.setSorting(QDir::Name); + QStringList files = templateDir.entryList(); + foreach(QString fileName, files) { + QFile file(QString("%1/%2").arg(templateDir.absolutePath()).arg(fileName)); + + if (file.open(QFile::ReadOnly)) { + QByteArray jsonData = file.readAll(); + QJsonDocument templateDoc = QJsonDocument::fromJson(jsonData); + QJsonObject json = templateDoc.object(); + if (json["type"].toInt() == getWizard()->getVehicleType() && + json["subtype"].toInt() == getWizard()->getVehicleSubType()) { + QString nameKey = getTemplateKey(&json); + int index = 0; + while (true) { + if (!m_templates.contains(nameKey)) { + m_templates[nameKey] = new QJsonObject(json); + break; + } else { + nameKey = QString("%1 - %2").arg(nameKey).arg(++index); + } + } + } + file.close(); + } + } +} + +void AirframeInitialTuningPage::setupTemplateList() +{ + QListWidgetItem *item = new QListWidgetItem(tr("None"), ui->templateList); + + item->setData(Qt::UserRole + 1, QVariant::fromValue((QJsonObject *)NULL)); + foreach(QString templ, m_templates.keys()) { + item = new QListWidgetItem(templ, ui->templateList); + item->setData(Qt::UserRole + 1, QVariant::fromValue(m_templates[templ])); + } + ui->templateList->setCurrentRow(0); +} + +QString AirframeInitialTuningPage::getTemplateKey(QJsonObject *templ) +{ + return QString("%1 - %2").arg(templ->value("nick").toString()).arg(templ->value("name").toString()); +} + +void AirframeInitialTuningPage::resizeEvent(QResizeEvent *) +{ + ui->templateImage->setSceneRect(ui->templateImage->scene()->itemsBoundingRect()); + ui->templateImage->fitInView(ui->templateImage->scene()->itemsBoundingRect(), Qt::KeepAspectRatio); +} + +void AirframeInitialTuningPage::showEvent(QShowEvent *) +{ + ui->templateImage->setSceneRect(ui->templateImage->scene()->itemsBoundingRect()); + ui->templateImage->fitInView(ui->templateImage->scene()->itemsBoundingRect(), Qt::KeepAspectRatio); +} diff --git a/ground/openpilotgcs/src/plugins/setupwizard/pages/airframeinitialtuningpage.h b/ground/openpilotgcs/src/plugins/setupwizard/pages/airframeinitialtuningpage.h index fe92e1ee6..d290a8843 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/pages/airframeinitialtuningpage.h +++ b/ground/openpilotgcs/src/plugins/setupwizard/pages/airframeinitialtuningpage.h @@ -29,6 +29,7 @@ #define AIRFRAMEINITIALTUNINGPAGE_H #include "abstractwizardpage.h" +#include namespace Ui { class AirframeInitialTuningPage; @@ -40,9 +41,30 @@ class AirframeInitialTuningPage : public AbstractWizardPage { public: explicit AirframeInitialTuningPage(SetupWizard *wizard, QWidget *parent = 0); ~AirframeInitialTuningPage(); + void initializePage(); + bool validatePage(); + bool isComplete() const; + +public slots: + void templateSelectionChanged(); + +protected: + void resizeEvent(QResizeEvent *); + void showEvent(QShowEvent *); private: Ui::AirframeInitialTuningPage *ui; + const char *m_dir; + QMap m_templates; + QGraphicsPixmapItem *m_photoItem; + + void loadValidFiles(); + void setupTemplateList(); + QString getTemplateKey(QJsonObject *templ); + void updatePhoto(QJsonObject *templ); + void updateDescription(QJsonObject *templ); }; +Q_DECLARE_METATYPE(QJsonObject *) + #endif // AIRFRAMEINITIALTUNINGPAGE_H diff --git a/ground/openpilotgcs/src/plugins/setupwizard/pages/airframeinitialtuningpage.ui b/ground/openpilotgcs/src/plugins/setupwizard/pages/airframeinitialtuningpage.ui index 6a87e690a..490cada2b 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/pages/airframeinitialtuningpage.ui +++ b/ground/openpilotgcs/src/plugins/setupwizard/pages/airframeinitialtuningpage.ui @@ -7,80 +7,98 @@ 0 0 600 - 400 + 598 WizardPage - - - - 9 - 9 - 582 - 81 - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:400; font-style:normal;"> <p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">Initial Tuning</span></p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt; font-weight:600;"><br /></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2,sans-serif';">This section of the OpenPilot Wizard allows you to select a set of initial tunning parameters for your airframe. Presented below is a list of common airframe types, select the one that matches your airframe the closest, if unsure select the generic variant.</span> </p></body></html> - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - true - - - - - - 10 - 100 - 581 - 291 - - - - - - - - - Qt::ScrollBarAlwaysOn - - - - - - - - - - - - Description - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - - - - - label_main - label_main - horizontalLayoutWidget + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + true + + + + + + + + + + + + + Qt::ScrollBarAlwaysOn + + + QAbstractItemView::NoEditTriggers + + + + + + + + 250 + 250 + + + + background-color: rgba(254, 254, 254, 0); + + + false + + + QPainter::Antialiasing|QPainter::HighQualityAntialiasing|QPainter::TextAntialiasing + + + + + + + + + + 0 + 0 + + + + + 10 + + + + false + + + true + + + Information about the Vehicle in short. + + + + + + + + diff --git a/ground/openpilotgcs/src/plugins/setupwizard/setupwizard.cpp b/ground/openpilotgcs/src/plugins/setupwizard/setupwizard.cpp index 7b509be02..f19c6fd51 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/setupwizard.cpp +++ b/ground/openpilotgcs/src/plugins/setupwizard/setupwizard.cpp @@ -56,8 +56,8 @@ SetupWizard::SetupWizard(QWidget *parent) : QWizard(parent), VehicleConfigurationSource(), m_controllerType(CONTROLLER_UNKNOWN), m_vehicleType(VEHICLE_UNKNOWN), m_inputType(INPUT_UNKNOWN), m_escType(ESC_UNKNOWN), - m_servoType(SERVO_UNKNOWN), m_calibrationPerformed(false), m_restartNeeded(false), - m_connectionManager(0) + m_servoType(SERVO_UNKNOWN), m_vehicleTemplate(NULL), + m_calibrationPerformed(false), m_restartNeeded(false), m_connectionManager(0) { setWindowTitle(tr("OpenPilot Setup Wizard")); setOption(QWizard::IndependentPages, false); @@ -70,6 +70,14 @@ SetupWizard::SetupWizard(QWidget *parent) : QWizard(parent), VehicleConfiguratio createPages(); } +SetupWizard::~SetupWizard() +{ + if (m_vehicleTemplate != NULL) { + delete m_vehicleTemplate; + m_vehicleTemplate = NULL; + } +} + int SetupWizard::nextId() const { switch (currentId()) { @@ -189,14 +197,11 @@ int SetupWizard::nextId() const case CONTROLLER_CC3D: case CONTROLLER_REVO: case CONTROLLER_NANO: + case CONTROLLER_DISCOVERYF4: switch (getVehicleType()) { case VEHICLE_FIXEDWING: return PAGE_OUTPUT_CALIBRATION; - case CONTROLLER_DISCOVERYF4: - // Skip calibration. - return PAGE_OUTPUT_CALIBRATION; - default: return PAGE_BIAS_CALIBRATION; } diff --git a/ground/openpilotgcs/src/plugins/setupwizard/setupwizard.h b/ground/openpilotgcs/src/plugins/setupwizard/setupwizard.h index f46163792..894710ab9 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/setupwizard.h +++ b/ground/openpilotgcs/src/plugins/setupwizard/setupwizard.h @@ -40,6 +40,7 @@ class SetupWizard : public QWizard, public VehicleConfigurationSource { public: SetupWizard(QWidget *parent = 0); + ~SetupWizard(); int nextId() const; void setControllerType(SetupWizard::CONTROLLER_TYPE type) @@ -124,6 +125,15 @@ public: return m_radioSetting; } + void setVehicleTemplate(QJsonObject *templ) + { + m_vehicleTemplate = templ; + } + QJsonObject *getVehicleTemplate() const + { + return m_vehicleTemplate; + } + void setLevellingBias(accelGyroBias bias) { m_calibrationBias = bias; m_calibrationPerformed = true; @@ -193,6 +203,8 @@ private: GPS_TYPE m_gpsType; RADIO_SETTING m_radioSetting; + QJsonObject *m_vehicleTemplate; + bool m_calibrationPerformed; accelGyroBias m_calibrationBias; diff --git a/ground/openpilotgcs/src/plugins/setupwizard/vehicleconfigurationsource.h b/ground/openpilotgcs/src/plugins/setupwizard/vehicleconfigurationsource.h index 46c94ad09..1f4ecd027 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/vehicleconfigurationsource.h +++ b/ground/openpilotgcs/src/plugins/setupwizard/vehicleconfigurationsource.h @@ -29,6 +29,7 @@ #define VEHICLECONFIGURATIONSOURCE_H #include +#include #include "actuatorsettings.h" struct accelGyroBias { @@ -77,8 +78,9 @@ public: virtual VehicleConfigurationSource::AIRSPEED_TYPE getAirspeedType() const = 0; virtual VehicleConfigurationSource::GPS_TYPE getGpsType() const = 0; virtual VehicleConfigurationSource::RADIO_SETTING getRadioSetting() const = 0; + virtual QJsonObject *getVehicleTemplate() const = 0; - virtual bool isCalibrationPerformed() const = 0; + virtual bool isCalibrationPerformed() const = 0; virtual accelGyroBias getCalibrationBias() const = 0; virtual bool isMotorCalibrationPerformed() const = 0; diff --git a/ground/openpilotgcs/src/plugins/setupwizard/vehicletemplateexportdialog.cpp b/ground/openpilotgcs/src/plugins/setupwizard/vehicletemplateexportdialog.cpp index face12779..92c5c6486 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/vehicletemplateexportdialog.cpp +++ b/ground/openpilotgcs/src/plugins/setupwizard/vehicletemplateexportdialog.cpp @@ -43,12 +43,12 @@ #include "stabilizationsettingsbank3.h" #include "ekfconfiguration.h" -const char* VehicleTemplateExportDialog::EXPORT_BASE_NAME = "../share/openpilotgcs/cloudconfig"; -const char* VehicleTemplateExportDialog::EXPORT_FIXEDWING_NAME = "fixedwing"; -const char* VehicleTemplateExportDialog::EXPORT_MULTI_NAME = "multirotor"; -const char* VehicleTemplateExportDialog::EXPORT_HELI_NAME = "helicopter"; -const char* VehicleTemplateExportDialog::EXPORT_SURFACE_NAME = "surface"; -const char* VehicleTemplateExportDialog::EXPORT_CUSTOM_NAME = "custom"; +const char *VehicleTemplateExportDialog::EXPORT_BASE_NAME = "../share/openpilotgcs/cloudconfig"; +const char *VehicleTemplateExportDialog::EXPORT_FIXEDWING_NAME = "fixedwing"; +const char *VehicleTemplateExportDialog::EXPORT_MULTI_NAME = "multirotor"; +const char *VehicleTemplateExportDialog::EXPORT_HELI_NAME = "helicopter"; +const char *VehicleTemplateExportDialog::EXPORT_SURFACE_NAME = "surface"; +const char *VehicleTemplateExportDialog::EXPORT_CUSTOM_NAME = "custom"; VehicleTemplateExportDialog::VehicleTemplateExportDialog(QWidget *parent) : QDialog(parent), @@ -165,11 +165,11 @@ QString VehicleTemplateExportDialog::setupVehicleType() QString VehicleTemplateExportDialog::fixFilenameString(QString input, int truncate) { return input.replace(' ', "").replace('|', "").replace('/', "") - .replace('\\', "").replace(':', "").replace('"', "") - .replace('\'', "").replace('?', "").replace('*', "") - .replace('>', "").replace('<', "") - .replace('}', "").replace('{', "") - .left(truncate); + .replace('\\', "").replace(':', "").replace('"', "") + .replace('\'', "").replace('?', "").replace('*', "") + .replace('>', "").replace('<', "") + .replace('}', "").replace('{', "") + .left(truncate); } @@ -203,28 +203,29 @@ void VehicleTemplateExportDialog::accept() QByteArray bytes; QBuffer buffer(&bytes); buffer.open(QIODevice::WriteOnly); - m_image.scaled(IMAGE_SCALE_WIDTH, IMAGE_SCALE_HEIGHT, Qt::KeepAspectRatio).save(&buffer, "PNG"); - exportObject["photo"] = bytes.toBase64().data(); + m_image.scaled(IMAGE_SCALE_WIDTH, IMAGE_SCALE_HEIGHT, Qt::KeepAspectRatio, + Qt::SmoothTransformation).save(&buffer, "PNG"); + exportObject["photo"] = QString::fromLatin1(bytes.toBase64().data()); QJsonDocument saveDoc(exportObject); QString fileName = QString("%1/%2/%3-%4-%5-%6.optmpl") - .arg(EXPORT_BASE_NAME) - .arg(getTypeDirectory()) - .arg(fixFilenameString(ui->ForumNick->text(), 15)) - .arg(fixFilenameString(ui->Name->text(), 20)) - .arg(fixFilenameString(ui->Type->text(), 30)) - .arg(fixFilenameString(QUuid::createUuid().toString().right(12))); + .arg(EXPORT_BASE_NAME) + .arg(getTypeDirectory()) + .arg(fixFilenameString(ui->ForumNick->text(), 15)) + .arg(fixFilenameString(ui->Name->text(), 20)) + .arg(fixFilenameString(ui->Type->text(), 30)) + .arg(fixFilenameString(QUuid::createUuid().toString().right(12))); QFile saveFile(fileName); QDir dir; dir.mkpath(QFileInfo(saveFile).absoluteDir().absolutePath()); if (saveFile.open(QIODevice::WriteOnly)) { saveFile.write(saveDoc.toJson()); saveFile.close(); - QMessageBox::information(this, "Export", tr("Settings were exported to \n%1").arg(QFileInfo(saveFile).absoluteFilePath()),QMessageBox::Ok); + QMessageBox::information(this, "Export", tr("Settings were exported to \n%1").arg(QFileInfo(saveFile).absoluteFilePath()), QMessageBox::Ok); } else { QMessageBox::information(this, "Export", tr("Settings could not be exported to \n%1.\nPlease try again.") - .arg(QFileInfo(saveFile).absoluteFilePath()),QMessageBox::Ok); + .arg(QFileInfo(saveFile).absoluteFilePath()), QMessageBox::Ok); } QDialog::accept(); } @@ -243,15 +244,19 @@ void VehicleTemplateExportDialog::importImage() QString VehicleTemplateExportDialog::getTypeDirectory() { - switch(m_type) { + switch (m_type) { case VehicleConfigurationSource::VEHICLE_FIXEDWING: return EXPORT_FIXEDWING_NAME; + case VehicleConfigurationSource::VEHICLE_MULTI: return EXPORT_MULTI_NAME; + case VehicleConfigurationSource::VEHICLE_HELI: return EXPORT_HELI_NAME; + case VehicleConfigurationSource::VEHICLE_SURFACE: return EXPORT_SURFACE_NAME; + default: return EXPORT_CUSTOM_NAME; } @@ -260,7 +265,6 @@ QString VehicleTemplateExportDialog::getTypeDirectory() void VehicleTemplateExportDialog::updateStatus() { ui->acceptBtn->setEnabled(ui->Name->text().length() > 3 && ui->Owner->text().length() > 2 && - ui->ForumNick->text().length() > 2 && ui->Size->text().length() > 0 && - ui->Weight->text().length() > 0); - + ui->ForumNick->text().length() > 2 && ui->Size->text().length() > 0 && + ui->Weight->text().length() > 0); } diff --git a/ground/openpilotgcs/src/plugins/setupwizard/vehicletemplateexportdialog.h b/ground/openpilotgcs/src/plugins/setupwizard/vehicletemplateexportdialog.h index 2e1d3a772..61f627be9 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/vehicletemplateexportdialog.h +++ b/ground/openpilotgcs/src/plugins/setupwizard/vehicletemplateexportdialog.h @@ -40,12 +40,12 @@ class VehicleTemplateExportDialog : public QDialog { Q_OBJECT public: - static const char* EXPORT_BASE_NAME; - static const char* EXPORT_FIXEDWING_NAME; - static const char* EXPORT_MULTI_NAME; - static const char* EXPORT_HELI_NAME; - static const char* EXPORT_SURFACE_NAME; - static const char* EXPORT_CUSTOM_NAME; + static const char *EXPORT_BASE_NAME; + static const char *EXPORT_FIXEDWING_NAME; + static const char *EXPORT_MULTI_NAME; + static const char *EXPORT_HELI_NAME; + static const char *EXPORT_SURFACE_NAME; + static const char *EXPORT_CUSTOM_NAME; explicit VehicleTemplateExportDialog(QWidget *parent = 0); ~VehicleTemplateExportDialog(); @@ -58,7 +58,7 @@ private slots: void importImage(); private: - static const int IMAGE_SCALE_WIDTH = 500; + static const int IMAGE_SCALE_WIDTH = 500; static const int IMAGE_SCALE_HEIGHT = 500; Ui::VehicleTemplateExportDialog *ui; UAVObjectManager *m_uavoManager; diff --git a/ground/openpilotgcs/src/plugins/setupwizard/vehicletemplateexportdialog.ui b/ground/openpilotgcs/src/plugins/setupwizard/vehicletemplateexportdialog.ui index f03f7a33c..db58e94f4 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/vehicletemplateexportdialog.ui +++ b/ground/openpilotgcs/src/plugins/setupwizard/vehicletemplateexportdialog.ui @@ -301,14 +301,14 @@ - + QFrame::NoFrame QFrame::Raised - + 0 @@ -322,95 +322,166 @@ 0 - - - Comment: - - - - - - - - 0 - 0 - - - - Qt::ScrollBarAlwaysOn - - - Qt::ScrollBarAlwaysOff - - - Put comments here that doesn't fit in the categories above - - - - - - - - - - QFrame::NoFrame - - - QFrame::Raised - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - Photo: - - - - - - - background-color: rgba(254, 254, 254, 0); - + QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - false - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + QFrame::Raised + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Comment: + + + + + + + + 0 + 0 + + + + Qt::ScrollBarAlwaysOn + + + Qt::ScrollBarAlwaysOff + + + Put comments here that doesn't fit in the categories above + + + + - - - - Select Image... + + + + QFrame::NoFrame + + QFrame::Raised + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Photo: + + + + + + + + 0 + 0 + + + + background-color: rgba(254, 254, 254, 0); + + + QFrame::NoFrame + + + QFrame::Sunken + + + + + 0 + 0 + 0 + + + + + false + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + QFrame::NoFrame + + + QFrame::Raised + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 8 + + + + Photo will be scaled to 500x500px + + + + + + + Select Image... + + + + + + + + frame_4 + frame_3