GUI: small improvements to MainWindow and AboutDialog
This commit is contained in:
parent
49b4070904
commit
2f89d2a0e2
|
@ -5,7 +5,8 @@
|
|||
#include <QDesktopServices>
|
||||
#include <QUrl>
|
||||
|
||||
AboutDialog::AboutDialog(QWidget* parent) :
|
||||
AboutDialog::AboutDialog(UpdateChecker* updateChecker, QWidget* parent) :
|
||||
mUpdateChecker(updateChecker),
|
||||
QDialog(parent),
|
||||
ui(new Ui::AboutDialog)
|
||||
{
|
||||
|
@ -15,9 +16,7 @@ AboutDialog::AboutDialog(QWidget* parent) :
|
|||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint | Qt::MSWindowsFixedSizeDialogHint);
|
||||
|
||||
ui->lblVersion->setText(ToDateString(GetCompileDate()) + ", " __TIME__);
|
||||
|
||||
// Create updatechecker
|
||||
mUpdateChecker = new UpdateChecker(this);
|
||||
ui->lblQrImage->installEventFilter(this);
|
||||
}
|
||||
|
||||
AboutDialog::~AboutDialog()
|
||||
|
@ -25,6 +24,13 @@ AboutDialog::~AboutDialog()
|
|||
delete ui;
|
||||
}
|
||||
|
||||
bool AboutDialog::eventFilter(QObject* obj, QEvent* event)
|
||||
{
|
||||
if(obj == ui->lblQrImage && event->type() == QEvent::MouseButtonPress)
|
||||
QDesktopServices::openUrl(QUrl("https://blockchain.info/address/1GuXgtCrLk4aYgivAT7xAi8zVHWk5CkEoY"));
|
||||
return false;
|
||||
}
|
||||
|
||||
void AboutDialog::on_btnCheckUpdates_clicked()
|
||||
{
|
||||
mUpdateChecker->checkForUpdates();
|
||||
|
|
|
@ -15,9 +15,12 @@ class AboutDialog : public QDialog
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit AboutDialog(QWidget* parent = 0);
|
||||
explicit AboutDialog(UpdateChecker* updateChecker, QWidget* parent = 0);
|
||||
~AboutDialog();
|
||||
|
||||
protected:
|
||||
bool eventFilter(QObject* obj, QEvent* event) override;
|
||||
|
||||
private slots:
|
||||
void on_btnCheckUpdates_clicked();
|
||||
|
||||
|
|
|
@ -243,7 +243,7 @@
|
|||
</rect>
|
||||
</property>
|
||||
<property name="cursor">
|
||||
<cursorShape>ArrowCursor</cursorShape>
|
||||
<cursorShape>PointingHandCursor</cursorShape>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
|
|
|
@ -51,6 +51,7 @@
|
|||
#include "CPUArgumentWidget.h"
|
||||
#include "MRUList.h"
|
||||
#include "AboutDialog.h"
|
||||
#include "UpdateChecker.h"
|
||||
|
||||
QString MainWindow::windowTitle = "";
|
||||
|
||||
|
@ -356,8 +357,8 @@ MainWindow::MainWindow(QWidget* parent)
|
|||
|
||||
mSimpleTraceDialog = new SimpleTraceDialog(this);
|
||||
|
||||
// About dialog
|
||||
mAboutDialog = new AboutDialog(this);
|
||||
// Update checker
|
||||
mUpdateChecker = new UpdateChecker(this);
|
||||
|
||||
// Setup close thread and dialog
|
||||
bCanClose = false;
|
||||
|
@ -812,7 +813,8 @@ void MainWindow::displayScriptWidget()
|
|||
|
||||
void MainWindow::displayAboutWidget()
|
||||
{
|
||||
mAboutDialog->exec();
|
||||
AboutDialog dialog(mUpdateChecker, this);
|
||||
dialog.exec();
|
||||
}
|
||||
|
||||
void MainWindow::openFileSlot()
|
||||
|
@ -2059,3 +2061,8 @@ void MainWindow::on_actionPlugins_triggered()
|
|||
{
|
||||
QDesktopServices::openUrl(QUrl("http://plugins.x64dbg.com"));
|
||||
}
|
||||
|
||||
void MainWindow::on_actionCheckUpdates_triggered()
|
||||
{
|
||||
mUpdateChecker->checkForUpdates();
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ class SettingsDialog;
|
|||
class DisassemblerGraphView;
|
||||
class SimpleTraceDialog;
|
||||
class MRUList;
|
||||
class AboutDialog;
|
||||
class UpdateChecker;
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
|
@ -177,7 +177,7 @@ private:
|
|||
NotesManager* mNotesManager;
|
||||
DisassemblerGraphView* mGraphView;
|
||||
SimpleTraceDialog* mSimpleTraceDialog;
|
||||
AboutDialog* mAboutDialog;
|
||||
UpdateChecker* mUpdateChecker;
|
||||
DebugStatusLabel* mStatusLabel;
|
||||
LogStatusLabel* mLastLogLabel;
|
||||
|
||||
|
@ -274,6 +274,7 @@ private slots:
|
|||
void on_actionExportdatabase_triggered();
|
||||
void on_actionRestartAdmin_triggered();
|
||||
void on_actionPlugins_triggered();
|
||||
void on_actionCheckUpdates_triggered();
|
||||
};
|
||||
|
||||
#endif // MAINWINDOW_H
|
||||
|
|
|
@ -143,6 +143,7 @@
|
|||
<string>&Help</string>
|
||||
</property>
|
||||
<addaction name="actionCalculator"/>
|
||||
<addaction name="actionCheckUpdates"/>
|
||||
<addaction name="actionBlog"/>
|
||||
<addaction name="actionDonate"/>
|
||||
<addaction name="actionReportBug"/>
|
||||
|
@ -215,21 +216,12 @@
|
|||
<addaction name="actionStepInto"/>
|
||||
<addaction name="actionStepOver"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionTicnd"/>
|
||||
<addaction name="actionTocnd"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionRtr"/>
|
||||
<addaction name="actionRtu"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionCpu"/>
|
||||
<addaction name="actionLog"/>
|
||||
<addaction name="actionBreakpoints"/>
|
||||
<addaction name="actionMemoryMap"/>
|
||||
<addaction name="actionCallStack"/>
|
||||
<addaction name="actionSEHChain"/>
|
||||
<addaction name="actionScript"/>
|
||||
<addaction name="actionSymbolInfo"/>
|
||||
<addaction name="actionSource"/>
|
||||
<addaction name="actionReferences"/>
|
||||
<addaction name="actionThreads"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionScylla"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionPatches"/>
|
||||
|
@ -237,18 +229,13 @@
|
|||
<addaction name="actionLabels"/>
|
||||
<addaction name="actionBookmarks"/>
|
||||
<addaction name="actionFunctions"/>
|
||||
<addaction name="actionVariables"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionStrings"/>
|
||||
<addaction name="actionCalls"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionCalculator"/>
|
||||
<addaction name="actionCheckUpdates"/>
|
||||
<addaction name="actionDonate"/>
|
||||
<addaction name="actionReportBug"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionManual"/>
|
||||
<addaction name="actionFaq"/>
|
||||
<addaction name="actionAbout"/>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusBar">
|
||||
<property name="sizeGripEnabled">
|
||||
|
|
Loading…
Reference in New Issue