mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
GCS-Hides wizard to display dialog
This commit is contained in:
parent
4226af60a4
commit
d25061ac0a
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
AutoUpdatePage::AutoUpdatePage(SetupWizard *wizard, QWidget *parent) :
|
AutoUpdatePage::AutoUpdatePage(SetupWizard *wizard, QWidget *parent) :
|
||||||
AbstractWizardPage(wizard, parent),
|
AbstractWizardPage(wizard, parent),
|
||||||
ui(new Ui::AutoUpdatePage)
|
ui(new Ui::AutoUpdatePage),m_wiz(wizard)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
|
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
|
||||||
@ -29,9 +29,13 @@ void AutoUpdatePage::updateStatus(uploader::AutoUpdateStep status, QVariant valu
|
|||||||
switch(status)
|
switch(status)
|
||||||
{
|
{
|
||||||
case uploader::WAITING_DISCONNECT:
|
case uploader::WAITING_DISCONNECT:
|
||||||
|
m_wiz->setWindowFlags(m_wiz->windowFlags() & ~Qt::WindowStaysOnTopHint);
|
||||||
ui->statusLabel->setText("Waiting for all OP boards to be disconnected");
|
ui->statusLabel->setText("Waiting for all OP boards to be disconnected");
|
||||||
break;
|
break;
|
||||||
case uploader::WAITING_CONNECT:
|
case uploader::WAITING_CONNECT:
|
||||||
|
m_wiz->setWindowFlags(m_wiz->windowFlags() | Qt::WindowStaysOnTopHint);
|
||||||
|
m_wiz->setWindowIcon(qApp->windowIcon());
|
||||||
|
m_wiz->show();
|
||||||
ui->statusLabel->setText("Please connect the board to the USB port (don't use external supply)");
|
ui->statusLabel->setText("Please connect the board to the USB port (don't use external supply)");
|
||||||
ui->levellinProgressBar->setValue(value.toInt());
|
ui->levellinProgressBar->setValue(value.toInt());
|
||||||
break;
|
break;
|
||||||
@ -56,6 +60,9 @@ void AutoUpdatePage::updateStatus(uploader::AutoUpdateStep status, QVariant valu
|
|||||||
ui->statusLabel->setText("Board Updated, please press the 'next' button below");
|
ui->statusLabel->setText("Board Updated, please press the 'next' button below");
|
||||||
break;
|
break;
|
||||||
case uploader::FAILURE:
|
case uploader::FAILURE:
|
||||||
|
m_wiz->setWindowFlags(m_wiz->windowFlags() | Qt::WindowStaysOnTopHint);
|
||||||
|
m_wiz->setWindowIcon(qApp->windowIcon());
|
||||||
|
m_wiz->show();
|
||||||
ui->statusLabel->setText("Something went wrong, you will have to manualy upgrade the board using the uploader plugin");
|
ui->statusLabel->setText("Something went wrong, you will have to manualy upgrade the board using the uploader plugin");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -52,6 +52,7 @@ private slots:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::AutoUpdatePage *ui;
|
Ui::AutoUpdatePage *ui;
|
||||||
|
SetupWizard * m_wiz;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // AUTOUPDATEPAGE_H
|
#endif // AUTOUPDATEPAGE_H
|
||||||
|
Loading…
x
Reference in New Issue
Block a user