mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-15 07:29:15 +01:00
LP-16 Buttons not shown when widget is in Wizard.
This commit is contained in:
parent
ba8b01cc6b
commit
fd3eaa2fef
@ -47,7 +47,7 @@ AirframeInitialTuningPage::~AirframeInitialTuningPage()
|
|||||||
|
|
||||||
void AirframeInitialTuningPage::initializePage()
|
void AirframeInitialTuningPage::initializePage()
|
||||||
{
|
{
|
||||||
ui->selectorWidget->setTemplateInfo(getWizard()->getVehicleType(), getWizard()->getVehicleSubType());
|
ui->selectorWidget->setTemplateInfo(getWizard()->getVehicleType(), getWizard()->getVehicleSubType(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AirframeInitialTuningPage::validatePage()
|
bool AirframeInitialTuningPage::validatePage()
|
||||||
|
@ -64,7 +64,7 @@ VehicleTemplateExportDialog::VehicleTemplateExportDialog(QWidget *parent) :
|
|||||||
m_uavoManager = pm->getObject<UAVObjectManager>();
|
m_uavoManager = pm->getObject<UAVObjectManager>();
|
||||||
ui->Photo->setScene(new QGraphicsScene(this));
|
ui->Photo->setScene(new QGraphicsScene(this));
|
||||||
ui->Type->setText(setupVehicleType());
|
ui->Type->setText(setupVehicleType());
|
||||||
ui->selectionWidget->setTemplateInfo(m_type, m_subType);
|
ui->selectionWidget->setTemplateInfo(m_type, m_subType, true);
|
||||||
|
|
||||||
connect(ui->Name, SIGNAL(textChanged(QString)), this, SLOT(updateStatus()));
|
connect(ui->Name, SIGNAL(textChanged(QString)), this, SLOT(updateStatus()));
|
||||||
connect(ui->Owner, SIGNAL(textChanged(QString)), this, SLOT(updateStatus()));
|
connect(ui->Owner, SIGNAL(textChanged(QString)), this, SLOT(updateStatus()));
|
||||||
|
@ -58,8 +58,9 @@ VehicleTemplateSelectorWidget::~VehicleTemplateSelectorWidget()
|
|||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
void VehicleTemplateSelectorWidget::setTemplateInfo(int vehicleType, int vehicleSubType)
|
void VehicleTemplateSelectorWidget::setTemplateInfo(int vehicleType, int vehicleSubType, bool showTemplateControls)
|
||||||
{
|
{
|
||||||
|
ui->buttonFrame->setVisible(showTemplateControls);
|
||||||
m_vehicleType = vehicleType;
|
m_vehicleType = vehicleType;
|
||||||
m_vehicleSubType = vehicleSubType;
|
m_vehicleSubType = vehicleSubType;
|
||||||
updateTemplates();
|
updateTemplates();
|
||||||
@ -297,6 +298,9 @@ void VehicleTemplateSelectorWidget::setupTemplateList()
|
|||||||
item->setData(Qt::UserRole + 2, QVariant::fromValue(vtemplate->editable()));
|
item->setData(Qt::UserRole + 2, QVariant::fromValue(vtemplate->editable()));
|
||||||
if (vtemplate->editable()) {
|
if (vtemplate->editable()) {
|
||||||
item->setData(Qt::ForegroundRole, QVariant::fromValue(QColor(Qt::darkGreen)));
|
item->setData(Qt::ForegroundRole, QVariant::fromValue(QColor(Qt::darkGreen)));
|
||||||
|
item->setData(Qt::ToolTipRole, QVariant::fromValue(tr("Local template.")));
|
||||||
|
} else {
|
||||||
|
item->setData(Qt::ToolTipRole, QVariant::fromValue(tr("Built-in template.")));
|
||||||
}
|
}
|
||||||
item->setData(Qt::UserRole + 3, QVariant::fromValue(vtemplate->templatePath()));
|
item->setData(Qt::UserRole + 3, QVariant::fromValue(vtemplate->templatePath()));
|
||||||
}
|
}
|
||||||
|
@ -72,7 +72,7 @@ class VehicleTemplateSelectorWidget : public QWidget {
|
|||||||
public:
|
public:
|
||||||
explicit VehicleTemplateSelectorWidget(QWidget *parent = 0);
|
explicit VehicleTemplateSelectorWidget(QWidget *parent = 0);
|
||||||
~VehicleTemplateSelectorWidget();
|
~VehicleTemplateSelectorWidget();
|
||||||
void setTemplateInfo(int vehicleType, int vehicleSubType);
|
void setTemplateInfo(int vehicleType, int vehicleSubType, bool showTemplateControls);
|
||||||
QJsonObject *selectedTemplate() const;
|
QJsonObject *selectedTemplate() const;
|
||||||
public slots:
|
public slots:
|
||||||
void templateSelectionChanged();
|
void templateSelectionChanged();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user