mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-20 10:54:14 +01:00
OP-1222 Implemented scanning for and reading of optmpl files (json vehicle template files )
and implemented selection gui for the templates.
This commit is contained in:
parent
9c0c489e94
commit
7ab2839b6e
@ -27,15 +27,183 @@
|
|||||||
|
|
||||||
#include "airframeinitialtuningpage.h"
|
#include "airframeinitialtuningpage.h"
|
||||||
#include "ui_airframeinitialtuningpage.h"
|
#include "ui_airframeinitialtuningpage.h"
|
||||||
|
#include <QJsonDocument>
|
||||||
|
#include <QJsonArray>
|
||||||
|
#include <QDir>
|
||||||
|
#include "vehicletemplateexportdialog.h"
|
||||||
|
|
||||||
AirframeInitialTuningPage::AirframeInitialTuningPage(SetupWizard *wizard, QWidget *parent) :
|
AirframeInitialTuningPage::AirframeInitialTuningPage(SetupWizard *wizard, QWidget *parent) :
|
||||||
AbstractWizardPage(wizard, parent),
|
AbstractWizardPage(wizard, parent),
|
||||||
ui(new Ui::AirframeInitialTuningPage)
|
ui(new Ui::AirframeInitialTuningPage), m_dir(NULL), m_photoItem(NULL)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
ui->templateImage->setScene(new QGraphicsScene());
|
||||||
|
connect(ui->templateList, SIGNAL(itemSelectionChanged()), this, SLOT(templateSelectionChanged()));
|
||||||
}
|
}
|
||||||
|
|
||||||
AirframeInitialTuningPage::~AirframeInitialTuningPage()
|
AirframeInitialTuningPage::~AirframeInitialTuningPage()
|
||||||
{
|
{
|
||||||
|
ui->templateList->clear();
|
||||||
|
foreach(QJsonObject * templ, m_templates.values()) {
|
||||||
|
delete templ;
|
||||||
|
}
|
||||||
|
m_templates.clear();
|
||||||
|
|
||||||
delete ui;
|
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<QJsonObject *>();
|
||||||
|
}
|
||||||
|
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("<b>").append(tr("Name of Vehicle: ")).append("</b>").append(templ->value("name").toString()).append("<br>");
|
||||||
|
description.append("<b>").append(tr("Name of Owner: ")).append("</b>").append(templ->value("owner").toString())
|
||||||
|
.append(" (").append(templ->value("nick").toString()).append(")").append("<br>");
|
||||||
|
description.append("<b>").append(tr("Size: ")).append("</b>").append(templ->value("size").toString()).append("<br>");
|
||||||
|
description.append("<b>").append(tr("Weight: ")).append("</b>").append(templ->value("weight").toString()).append("<br>");
|
||||||
|
description.append("<b>").append(tr("Motor(s): ")).append("</b>").append(templ->value("motor").toString()).append("<br>");
|
||||||
|
description.append("<b>").append(tr("ESC(s): ")).append("</b>").append(templ->value("esc").toString()).append("<br>");
|
||||||
|
description.append("<b>").append(tr("Servo(s): ")).append("</b>").append(templ->value("servo").toString()).append("<br>");
|
||||||
|
description.append("<b>").append(tr("Battery: ")).append("</b>").append(templ->value("battery").toString()).append("<br>");
|
||||||
|
description.append("<b>").append(tr("Propellers(s): ")).append("</b>").append(templ->value("propeller").toString()).append("<br>");
|
||||||
|
description.append("<b>").append(tr("Controller: ")).append("</b>").append(templ->value("controller").toString()).append("<br>");
|
||||||
|
description.append("<b>").append(tr("Comments: ")).append("</b>").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<QJsonObject *>();
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
#define AIRFRAMEINITIALTUNINGPAGE_H
|
#define AIRFRAMEINITIALTUNINGPAGE_H
|
||||||
|
|
||||||
#include "abstractwizardpage.h"
|
#include "abstractwizardpage.h"
|
||||||
|
#include <QJsonObject>
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class AirframeInitialTuningPage;
|
class AirframeInitialTuningPage;
|
||||||
@ -40,9 +41,30 @@ class AirframeInitialTuningPage : public AbstractWizardPage {
|
|||||||
public:
|
public:
|
||||||
explicit AirframeInitialTuningPage(SetupWizard *wizard, QWidget *parent = 0);
|
explicit AirframeInitialTuningPage(SetupWizard *wizard, QWidget *parent = 0);
|
||||||
~AirframeInitialTuningPage();
|
~AirframeInitialTuningPage();
|
||||||
|
void initializePage();
|
||||||
|
bool validatePage();
|
||||||
|
bool isComplete() const;
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void templateSelectionChanged();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void resizeEvent(QResizeEvent *);
|
||||||
|
void showEvent(QShowEvent *);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::AirframeInitialTuningPage *ui;
|
Ui::AirframeInitialTuningPage *ui;
|
||||||
|
const char *m_dir;
|
||||||
|
QMap<QString, QJsonObject *> 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
|
#endif // AIRFRAMEINITIALTUNINGPAGE_H
|
||||||
|
@ -7,80 +7,98 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>600</width>
|
<width>600</width>
|
||||||
<height>400</height>
|
<height>598</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>WizardPage</string>
|
<string>WizardPage</string>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QLabel" name="label_main">
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
<property name="geometry">
|
<item>
|
||||||
<rect>
|
<widget class="QLabel" name="label_main">
|
||||||
<x>9</x>
|
<property name="text">
|
||||||
<y>9</y>
|
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||||
<width>582</width>
|
|
||||||
<height>81</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string><!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">
|
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||||
p, li { white-space: pre-wrap; }
|
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;">
|
</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 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="-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></string>
|
<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></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||||
</property>
|
</property>
|
||||||
<property name="wordWrap">
|
<property name="wordWrap">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="horizontalLayoutWidget">
|
</item>
|
||||||
<property name="geometry">
|
<item>
|
||||||
<rect>
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<x>10</x>
|
<item>
|
||||||
<y>100</y>
|
<layout class="QVBoxLayout" name="verticalLayout_3" stretch="2,0">
|
||||||
<width>581</width>
|
<item>
|
||||||
<height>291</height>
|
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="0,4">
|
||||||
</rect>
|
<item>
|
||||||
</property>
|
<widget class="QListWidget" name="templateList">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<property name="verticalScrollBarPolicy">
|
||||||
<item>
|
<enum>Qt::ScrollBarAlwaysOn</enum>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="2,3">
|
</property>
|
||||||
<item>
|
<property name="editTriggers">
|
||||||
<widget class="QListWidget" name="listWidget">
|
<set>QAbstractItemView::NoEditTriggers</set>
|
||||||
<property name="verticalScrollBarPolicy">
|
</property>
|
||||||
<enum>Qt::ScrollBarAlwaysOn</enum>
|
</widget>
|
||||||
</property>
|
</item>
|
||||||
</widget>
|
<item>
|
||||||
</item>
|
<widget class="QGraphicsView" name="templateImage">
|
||||||
<item>
|
<property name="minimumSize">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout" stretch="10,4">
|
<size>
|
||||||
<item>
|
<width>250</width>
|
||||||
<widget class="QGraphicsView" name="graphicsView"/>
|
<height>250</height>
|
||||||
</item>
|
</size>
|
||||||
<item>
|
</property>
|
||||||
<widget class="QLabel" name="label">
|
<property name="styleSheet">
|
||||||
<property name="text">
|
<string notr="true">background-color: rgba(254, 254, 254, 0);</string>
|
||||||
<string>Description</string>
|
</property>
|
||||||
</property>
|
<property name="interactive">
|
||||||
<property name="alignment">
|
<bool>false</bool>
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
</property>
|
||||||
</property>
|
<property name="renderHints">
|
||||||
</widget>
|
<set>QPainter::Antialiasing|QPainter::HighQualityAntialiasing|QPainter::TextAntialiasing</set>
|
||||||
</item>
|
</property>
|
||||||
</layout>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
<item>
|
||||||
</widget>
|
<widget class="QTextEdit" name="templateDescription">
|
||||||
<zorder>label_main</zorder>
|
<property name="sizePolicy">
|
||||||
<zorder>label_main</zorder>
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
<zorder>horizontalLayoutWidget</zorder>
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="undoRedoEnabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string>Information about the Vehicle in short.</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
|
@ -56,8 +56,8 @@
|
|||||||
SetupWizard::SetupWizard(QWidget *parent) : QWizard(parent), VehicleConfigurationSource(),
|
SetupWizard::SetupWizard(QWidget *parent) : QWizard(parent), VehicleConfigurationSource(),
|
||||||
m_controllerType(CONTROLLER_UNKNOWN),
|
m_controllerType(CONTROLLER_UNKNOWN),
|
||||||
m_vehicleType(VEHICLE_UNKNOWN), m_inputType(INPUT_UNKNOWN), m_escType(ESC_UNKNOWN),
|
m_vehicleType(VEHICLE_UNKNOWN), m_inputType(INPUT_UNKNOWN), m_escType(ESC_UNKNOWN),
|
||||||
m_servoType(SERVO_UNKNOWN), m_calibrationPerformed(false), m_restartNeeded(false),
|
m_servoType(SERVO_UNKNOWN), m_vehicleTemplate(NULL),
|
||||||
m_connectionManager(0)
|
m_calibrationPerformed(false), m_restartNeeded(false), m_connectionManager(0)
|
||||||
{
|
{
|
||||||
setWindowTitle(tr("OpenPilot Setup Wizard"));
|
setWindowTitle(tr("OpenPilot Setup Wizard"));
|
||||||
setOption(QWizard::IndependentPages, false);
|
setOption(QWizard::IndependentPages, false);
|
||||||
@ -70,6 +70,14 @@ SetupWizard::SetupWizard(QWidget *parent) : QWizard(parent), VehicleConfiguratio
|
|||||||
createPages();
|
createPages();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SetupWizard::~SetupWizard()
|
||||||
|
{
|
||||||
|
if (m_vehicleTemplate != NULL) {
|
||||||
|
delete m_vehicleTemplate;
|
||||||
|
m_vehicleTemplate = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int SetupWizard::nextId() const
|
int SetupWizard::nextId() const
|
||||||
{
|
{
|
||||||
switch (currentId()) {
|
switch (currentId()) {
|
||||||
@ -189,14 +197,11 @@ int SetupWizard::nextId() const
|
|||||||
case CONTROLLER_CC3D:
|
case CONTROLLER_CC3D:
|
||||||
case CONTROLLER_REVO:
|
case CONTROLLER_REVO:
|
||||||
case CONTROLLER_NANO:
|
case CONTROLLER_NANO:
|
||||||
|
case CONTROLLER_DISCOVERYF4:
|
||||||
switch (getVehicleType()) {
|
switch (getVehicleType()) {
|
||||||
case VEHICLE_FIXEDWING:
|
case VEHICLE_FIXEDWING:
|
||||||
return PAGE_OUTPUT_CALIBRATION;
|
return PAGE_OUTPUT_CALIBRATION;
|
||||||
|
|
||||||
case CONTROLLER_DISCOVERYF4:
|
|
||||||
// Skip calibration.
|
|
||||||
return PAGE_OUTPUT_CALIBRATION;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return PAGE_BIAS_CALIBRATION;
|
return PAGE_BIAS_CALIBRATION;
|
||||||
}
|
}
|
||||||
|
@ -40,6 +40,7 @@ class SetupWizard : public QWizard, public VehicleConfigurationSource {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
SetupWizard(QWidget *parent = 0);
|
SetupWizard(QWidget *parent = 0);
|
||||||
|
~SetupWizard();
|
||||||
int nextId() const;
|
int nextId() const;
|
||||||
|
|
||||||
void setControllerType(SetupWizard::CONTROLLER_TYPE type)
|
void setControllerType(SetupWizard::CONTROLLER_TYPE type)
|
||||||
@ -124,6 +125,15 @@ public:
|
|||||||
return m_radioSetting;
|
return m_radioSetting;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setVehicleTemplate(QJsonObject *templ)
|
||||||
|
{
|
||||||
|
m_vehicleTemplate = templ;
|
||||||
|
}
|
||||||
|
QJsonObject *getVehicleTemplate() const
|
||||||
|
{
|
||||||
|
return m_vehicleTemplate;
|
||||||
|
}
|
||||||
|
|
||||||
void setLevellingBias(accelGyroBias bias)
|
void setLevellingBias(accelGyroBias bias)
|
||||||
{
|
{
|
||||||
m_calibrationBias = bias; m_calibrationPerformed = true;
|
m_calibrationBias = bias; m_calibrationPerformed = true;
|
||||||
@ -193,6 +203,8 @@ private:
|
|||||||
GPS_TYPE m_gpsType;
|
GPS_TYPE m_gpsType;
|
||||||
RADIO_SETTING m_radioSetting;
|
RADIO_SETTING m_radioSetting;
|
||||||
|
|
||||||
|
QJsonObject *m_vehicleTemplate;
|
||||||
|
|
||||||
bool m_calibrationPerformed;
|
bool m_calibrationPerformed;
|
||||||
accelGyroBias m_calibrationBias;
|
accelGyroBias m_calibrationBias;
|
||||||
|
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
#define VEHICLECONFIGURATIONSOURCE_H
|
#define VEHICLECONFIGURATIONSOURCE_H
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
#include <QJsonObject>
|
||||||
#include "actuatorsettings.h"
|
#include "actuatorsettings.h"
|
||||||
|
|
||||||
struct accelGyroBias {
|
struct accelGyroBias {
|
||||||
@ -77,8 +78,9 @@ public:
|
|||||||
virtual VehicleConfigurationSource::AIRSPEED_TYPE getAirspeedType() const = 0;
|
virtual VehicleConfigurationSource::AIRSPEED_TYPE getAirspeedType() const = 0;
|
||||||
virtual VehicleConfigurationSource::GPS_TYPE getGpsType() const = 0;
|
virtual VehicleConfigurationSource::GPS_TYPE getGpsType() const = 0;
|
||||||
virtual VehicleConfigurationSource::RADIO_SETTING getRadioSetting() 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 accelGyroBias getCalibrationBias() const = 0;
|
||||||
|
|
||||||
virtual bool isMotorCalibrationPerformed() const = 0;
|
virtual bool isMotorCalibrationPerformed() const = 0;
|
||||||
|
@ -43,12 +43,12 @@
|
|||||||
#include "stabilizationsettingsbank3.h"
|
#include "stabilizationsettingsbank3.h"
|
||||||
#include "ekfconfiguration.h"
|
#include "ekfconfiguration.h"
|
||||||
|
|
||||||
const char* VehicleTemplateExportDialog::EXPORT_BASE_NAME = "../share/openpilotgcs/cloudconfig";
|
const char *VehicleTemplateExportDialog::EXPORT_BASE_NAME = "../share/openpilotgcs/cloudconfig";
|
||||||
const char* VehicleTemplateExportDialog::EXPORT_FIXEDWING_NAME = "fixedwing";
|
const char *VehicleTemplateExportDialog::EXPORT_FIXEDWING_NAME = "fixedwing";
|
||||||
const char* VehicleTemplateExportDialog::EXPORT_MULTI_NAME = "multirotor";
|
const char *VehicleTemplateExportDialog::EXPORT_MULTI_NAME = "multirotor";
|
||||||
const char* VehicleTemplateExportDialog::EXPORT_HELI_NAME = "helicopter";
|
const char *VehicleTemplateExportDialog::EXPORT_HELI_NAME = "helicopter";
|
||||||
const char* VehicleTemplateExportDialog::EXPORT_SURFACE_NAME = "surface";
|
const char *VehicleTemplateExportDialog::EXPORT_SURFACE_NAME = "surface";
|
||||||
const char* VehicleTemplateExportDialog::EXPORT_CUSTOM_NAME = "custom";
|
const char *VehicleTemplateExportDialog::EXPORT_CUSTOM_NAME = "custom";
|
||||||
|
|
||||||
VehicleTemplateExportDialog::VehicleTemplateExportDialog(QWidget *parent) :
|
VehicleTemplateExportDialog::VehicleTemplateExportDialog(QWidget *parent) :
|
||||||
QDialog(parent),
|
QDialog(parent),
|
||||||
@ -165,11 +165,11 @@ QString VehicleTemplateExportDialog::setupVehicleType()
|
|||||||
QString VehicleTemplateExportDialog::fixFilenameString(QString input, int truncate)
|
QString VehicleTemplateExportDialog::fixFilenameString(QString input, int truncate)
|
||||||
{
|
{
|
||||||
return input.replace(' ', "").replace('|', "").replace('/', "")
|
return input.replace(' ', "").replace('|', "").replace('/', "")
|
||||||
.replace('\\', "").replace(':', "").replace('"', "")
|
.replace('\\', "").replace(':', "").replace('"', "")
|
||||||
.replace('\'', "").replace('?', "").replace('*', "")
|
.replace('\'', "").replace('?', "").replace('*', "")
|
||||||
.replace('>', "").replace('<', "")
|
.replace('>', "").replace('<', "")
|
||||||
.replace('}', "").replace('{', "")
|
.replace('}', "").replace('{', "")
|
||||||
.left(truncate);
|
.left(truncate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -203,28 +203,29 @@ void VehicleTemplateExportDialog::accept()
|
|||||||
QByteArray bytes;
|
QByteArray bytes;
|
||||||
QBuffer buffer(&bytes);
|
QBuffer buffer(&bytes);
|
||||||
buffer.open(QIODevice::WriteOnly);
|
buffer.open(QIODevice::WriteOnly);
|
||||||
m_image.scaled(IMAGE_SCALE_WIDTH, IMAGE_SCALE_HEIGHT, Qt::KeepAspectRatio).save(&buffer, "PNG");
|
m_image.scaled(IMAGE_SCALE_WIDTH, IMAGE_SCALE_HEIGHT, Qt::KeepAspectRatio,
|
||||||
exportObject["photo"] = bytes.toBase64().data();
|
Qt::SmoothTransformation).save(&buffer, "PNG");
|
||||||
|
exportObject["photo"] = QString::fromLatin1(bytes.toBase64().data());
|
||||||
|
|
||||||
QJsonDocument saveDoc(exportObject);
|
QJsonDocument saveDoc(exportObject);
|
||||||
|
|
||||||
QString fileName = QString("%1/%2/%3-%4-%5-%6.optmpl")
|
QString fileName = QString("%1/%2/%3-%4-%5-%6.optmpl")
|
||||||
.arg(EXPORT_BASE_NAME)
|
.arg(EXPORT_BASE_NAME)
|
||||||
.arg(getTypeDirectory())
|
.arg(getTypeDirectory())
|
||||||
.arg(fixFilenameString(ui->ForumNick->text(), 15))
|
.arg(fixFilenameString(ui->ForumNick->text(), 15))
|
||||||
.arg(fixFilenameString(ui->Name->text(), 20))
|
.arg(fixFilenameString(ui->Name->text(), 20))
|
||||||
.arg(fixFilenameString(ui->Type->text(), 30))
|
.arg(fixFilenameString(ui->Type->text(), 30))
|
||||||
.arg(fixFilenameString(QUuid::createUuid().toString().right(12)));
|
.arg(fixFilenameString(QUuid::createUuid().toString().right(12)));
|
||||||
QFile saveFile(fileName);
|
QFile saveFile(fileName);
|
||||||
QDir dir;
|
QDir dir;
|
||||||
dir.mkpath(QFileInfo(saveFile).absoluteDir().absolutePath());
|
dir.mkpath(QFileInfo(saveFile).absoluteDir().absolutePath());
|
||||||
if (saveFile.open(QIODevice::WriteOnly)) {
|
if (saveFile.open(QIODevice::WriteOnly)) {
|
||||||
saveFile.write(saveDoc.toJson());
|
saveFile.write(saveDoc.toJson());
|
||||||
saveFile.close();
|
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 {
|
} else {
|
||||||
QMessageBox::information(this, "Export", tr("Settings could not be exported to \n%1.\nPlease try again.")
|
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();
|
QDialog::accept();
|
||||||
}
|
}
|
||||||
@ -243,15 +244,19 @@ void VehicleTemplateExportDialog::importImage()
|
|||||||
|
|
||||||
QString VehicleTemplateExportDialog::getTypeDirectory()
|
QString VehicleTemplateExportDialog::getTypeDirectory()
|
||||||
{
|
{
|
||||||
switch(m_type) {
|
switch (m_type) {
|
||||||
case VehicleConfigurationSource::VEHICLE_FIXEDWING:
|
case VehicleConfigurationSource::VEHICLE_FIXEDWING:
|
||||||
return EXPORT_FIXEDWING_NAME;
|
return EXPORT_FIXEDWING_NAME;
|
||||||
|
|
||||||
case VehicleConfigurationSource::VEHICLE_MULTI:
|
case VehicleConfigurationSource::VEHICLE_MULTI:
|
||||||
return EXPORT_MULTI_NAME;
|
return EXPORT_MULTI_NAME;
|
||||||
|
|
||||||
case VehicleConfigurationSource::VEHICLE_HELI:
|
case VehicleConfigurationSource::VEHICLE_HELI:
|
||||||
return EXPORT_HELI_NAME;
|
return EXPORT_HELI_NAME;
|
||||||
|
|
||||||
case VehicleConfigurationSource::VEHICLE_SURFACE:
|
case VehicleConfigurationSource::VEHICLE_SURFACE:
|
||||||
return EXPORT_SURFACE_NAME;
|
return EXPORT_SURFACE_NAME;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return EXPORT_CUSTOM_NAME;
|
return EXPORT_CUSTOM_NAME;
|
||||||
}
|
}
|
||||||
@ -260,7 +265,6 @@ QString VehicleTemplateExportDialog::getTypeDirectory()
|
|||||||
void VehicleTemplateExportDialog::updateStatus()
|
void VehicleTemplateExportDialog::updateStatus()
|
||||||
{
|
{
|
||||||
ui->acceptBtn->setEnabled(ui->Name->text().length() > 3 && ui->Owner->text().length() > 2 &&
|
ui->acceptBtn->setEnabled(ui->Name->text().length() > 3 && ui->Owner->text().length() > 2 &&
|
||||||
ui->ForumNick->text().length() > 2 && ui->Size->text().length() > 0 &&
|
ui->ForumNick->text().length() > 2 && ui->Size->text().length() > 0 &&
|
||||||
ui->Weight->text().length() > 0);
|
ui->Weight->text().length() > 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -40,12 +40,12 @@ class VehicleTemplateExportDialog : public QDialog {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static const char* EXPORT_BASE_NAME;
|
static const char *EXPORT_BASE_NAME;
|
||||||
static const char* EXPORT_FIXEDWING_NAME;
|
static const char *EXPORT_FIXEDWING_NAME;
|
||||||
static const char* EXPORT_MULTI_NAME;
|
static const char *EXPORT_MULTI_NAME;
|
||||||
static const char* EXPORT_HELI_NAME;
|
static const char *EXPORT_HELI_NAME;
|
||||||
static const char* EXPORT_SURFACE_NAME;
|
static const char *EXPORT_SURFACE_NAME;
|
||||||
static const char* EXPORT_CUSTOM_NAME;
|
static const char *EXPORT_CUSTOM_NAME;
|
||||||
|
|
||||||
explicit VehicleTemplateExportDialog(QWidget *parent = 0);
|
explicit VehicleTemplateExportDialog(QWidget *parent = 0);
|
||||||
~VehicleTemplateExportDialog();
|
~VehicleTemplateExportDialog();
|
||||||
@ -58,7 +58,7 @@ private slots:
|
|||||||
void importImage();
|
void importImage();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const int IMAGE_SCALE_WIDTH = 500;
|
static const int IMAGE_SCALE_WIDTH = 500;
|
||||||
static const int IMAGE_SCALE_HEIGHT = 500;
|
static const int IMAGE_SCALE_HEIGHT = 500;
|
||||||
Ui::VehicleTemplateExportDialog *ui;
|
Ui::VehicleTemplateExportDialog *ui;
|
||||||
UAVObjectManager *m_uavoManager;
|
UAVObjectManager *m_uavoManager;
|
||||||
|
@ -301,14 +301,14 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QFrame" name="frame_3">
|
<widget class="QFrame" name="frame_6">
|
||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
<enum>QFrame::NoFrame</enum>
|
<enum>QFrame::NoFrame</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="frameShadow">
|
<property name="frameShadow">
|
||||||
<enum>QFrame::Raised</enum>
|
<enum>QFrame::Raised</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
@ -322,95 +322,166 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_13">
|
<widget class="QFrame" name="frame_3">
|
||||||
<property name="text">
|
|
||||||
<string>Comment:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QTextEdit" name="Comment">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="verticalScrollBarPolicy">
|
|
||||||
<enum>Qt::ScrollBarAlwaysOn</enum>
|
|
||||||
</property>
|
|
||||||
<property name="horizontalScrollBarPolicy">
|
|
||||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
|
||||||
</property>
|
|
||||||
<property name="placeholderText">
|
|
||||||
<string>Put comments here that doesn't fit in the categories above</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QFrame" name="frame_4">
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::NoFrame</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShadow">
|
|
||||||
<enum>QFrame::Raised</enum>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_4">
|
|
||||||
<property name="text">
|
|
||||||
<string>Photo:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QGraphicsView" name="Photo">
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">background-color: rgba(254, 254, 254, 0);</string>
|
|
||||||
</property>
|
|
||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
<enum>QFrame::NoFrame</enum>
|
<enum>QFrame::NoFrame</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="backgroundBrush">
|
<property name="frameShadow">
|
||||||
<brush brushstyle="NoBrush">
|
<enum>QFrame::Raised</enum>
|
||||||
<color alpha="255">
|
|
||||||
<red>0</red>
|
|
||||||
<green>0</green>
|
|
||||||
<blue>0</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</property>
|
|
||||||
<property name="interactive">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item alignment="Qt::AlignTop">
|
||||||
|
<widget class="QLabel" name="label_13">
|
||||||
|
<property name="text">
|
||||||
|
<string>Comment:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QTextEdit" name="Comment">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="verticalScrollBarPolicy">
|
||||||
|
<enum>Qt::ScrollBarAlwaysOn</enum>
|
||||||
|
</property>
|
||||||
|
<property name="horizontalScrollBarPolicy">
|
||||||
|
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||||
|
</property>
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string>Put comments here that doesn't fit in the categories above</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item alignment="Qt::AlignRight">
|
<item>
|
||||||
<widget class="QPushButton" name="ImportButton">
|
<widget class="QFrame" name="frame_4">
|
||||||
<property name="text">
|
<property name="frameShape">
|
||||||
<string>Select Image...</string>
|
<enum>QFrame::NoFrame</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Raised</enum>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_4">
|
||||||
|
<property name="text">
|
||||||
|
<string>Photo:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGraphicsView" name="Photo">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background-color: rgba(254, 254, 254, 0);</string>
|
||||||
|
</property>
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::NoFrame</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Sunken</enum>
|
||||||
|
</property>
|
||||||
|
<property name="backgroundBrush">
|
||||||
|
<brush brushstyle="NoBrush">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>0</red>
|
||||||
|
<green>0</green>
|
||||||
|
<blue>0</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</property>
|
||||||
|
<property name="interactive">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QFrame" name="frame_7">
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::NoFrame</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Raised</enum>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_15">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>8</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Photo will be scaled to 500x500px</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="ImportButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Select Image...</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
<zorder>frame_4</zorder>
|
||||||
|
<zorder>frame_3</zorder>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user