mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-18 03:15:34 +08:00
Ref T165, use "?" for context help in update dialog
This commit is contained in:
@@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
#include "downloadandinstalldialog.h"
|
#include "downloadandinstalldialog.h"
|
||||||
#include "ui_downloadandinstalldialog.h"
|
#include "ui_downloadandinstalldialog.h"
|
||||||
|
#include "blackgui/guiapplication.h"
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include <QDesktopServices>
|
#include <QDesktopServices>
|
||||||
|
|
||||||
@@ -16,8 +17,6 @@ using namespace BlackMisc::Db;
|
|||||||
|
|
||||||
namespace BlackGui
|
namespace BlackGui
|
||||||
{
|
{
|
||||||
class COverlayMessagesFrame;
|
|
||||||
|
|
||||||
namespace Components
|
namespace Components
|
||||||
{
|
{
|
||||||
CDownloadAndInstallDialog::CDownloadAndInstallDialog(QWidget *parent) :
|
CDownloadAndInstallDialog::CDownloadAndInstallDialog(QWidget *parent) :
|
||||||
@@ -55,6 +54,13 @@ namespace BlackGui
|
|||||||
return QDialog::Rejected;
|
return QDialog::Rejected;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CDownloadAndInstallDialog::event(QEvent *event)
|
||||||
|
{
|
||||||
|
if (event->type() != QEvent::EnterWhatsThisMode) { return QDialog::event(event); }
|
||||||
|
QTimer::singleShot(0, this, &CDownloadAndInstallDialog::requestHelp);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
void CDownloadAndInstallDialog::onDontShowAgain(bool dontShowAgain)
|
void CDownloadAndInstallDialog::onDontShowAgain(bool dontShowAgain)
|
||||||
{
|
{
|
||||||
m_setting.setAndSave(!dontShowAgain);
|
m_setting.setAndSave(!dontShowAgain);
|
||||||
@@ -65,5 +71,10 @@ namespace BlackGui
|
|||||||
const bool nv = ui->comp_DistributionInfo->isNewVersionAvailable();
|
const bool nv = ui->comp_DistributionInfo->isNewVersionAvailable();
|
||||||
ui->bb_DownloadInstallDialog->button(QDialogButtonBox::Ok)->setEnabled(nv);
|
ui->bb_DownloadInstallDialog->button(QDialogButtonBox::Ok)->setEnabled(nv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CDownloadAndInstallDialog::requestHelp()
|
||||||
|
{
|
||||||
|
if (sGui) { sGui->showHelp(this); }
|
||||||
|
}
|
||||||
} // ns
|
} // ns
|
||||||
} // ns
|
} // ns
|
||||||
|
|||||||
@@ -41,6 +41,9 @@ namespace BlackGui
|
|||||||
//! \copydoc QDialog::exec
|
//! \copydoc QDialog::exec
|
||||||
virtual int exec() override;
|
virtual int exec() override;
|
||||||
|
|
||||||
|
//! \copydoc QObject::event
|
||||||
|
virtual bool event(QEvent *event) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QScopedPointer<Ui::CDownloadAndInstallDialog> ui;
|
QScopedPointer<Ui::CDownloadAndInstallDialog> ui;
|
||||||
BlackMisc::CSetting<BlackGui::Settings::TUpdateNotificationSettings> m_setting { this }; //!< show again?
|
BlackMisc::CSetting<BlackGui::Settings::TUpdateNotificationSettings> m_setting { this }; //!< show again?
|
||||||
@@ -50,6 +53,9 @@ namespace BlackGui
|
|||||||
|
|
||||||
//! Selection in distribution component changed
|
//! Selection in distribution component changed
|
||||||
void selectionChanged();
|
void selectionChanged();
|
||||||
|
|
||||||
|
//! Request context help
|
||||||
|
void requestHelp();
|
||||||
};
|
};
|
||||||
} // ns
|
} // ns
|
||||||
} // ns
|
} // ns
|
||||||
|
|||||||
Reference in New Issue
Block a user