mirror of
https://github.com/edisionnano/QDiskInfo.git
synced 2026-03-23 13:10:55 +03:00
Add global shortcuts
This commit is contained in:
@@ -43,6 +43,10 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
nextButton->setFocusPolicy(Qt::NoFocus);
|
||||
prevButton->setFocusPolicy(Qt::NoFocus);
|
||||
|
||||
ui->actionSave_JSON->setShortcut(QKeySequence::Save);
|
||||
ui->actionQuit->setShortcut(QKeySequence::Quit);
|
||||
ui->actionRescan_Refresh->setShortcut(QKeySequence::Refresh);
|
||||
|
||||
menuDisk = ui->menuDisk;
|
||||
toolMenu = new QMenu("Self Test", this);
|
||||
menuDisk->addMenu(toolMenu);
|
||||
@@ -867,7 +871,7 @@ void MainWindow::clearButtonGroup()
|
||||
delete buttonStretch;
|
||||
}
|
||||
|
||||
void MainWindow::on_actionExit_triggered()
|
||||
void MainWindow::on_actionQuit_triggered()
|
||||
{
|
||||
qApp->quit();
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ public:
|
||||
~MainWindow();
|
||||
|
||||
private slots:
|
||||
void on_actionExit_triggered();
|
||||
void on_actionQuit_triggered();
|
||||
|
||||
void on_actionSave_JSON_triggered();
|
||||
|
||||
|
||||
@@ -334,7 +334,7 @@
|
||||
<string>File</string>
|
||||
</property>
|
||||
<addaction name="actionSave_JSON"/>
|
||||
<addaction name="actionExit"/>
|
||||
<addaction name="actionQuit"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuSettings">
|
||||
<property name="title">
|
||||
@@ -371,19 +371,13 @@
|
||||
<property name="text">
|
||||
<string>&Save JSON</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+S</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionExit">
|
||||
<action name="actionQuit">
|
||||
<property name="icon">
|
||||
<iconset theme="application-exit"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Exit</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Alt+F4</string>
|
||||
<string>&Quit</string>
|
||||
</property>
|
||||
<property name="menuRole">
|
||||
<enum>QAction::MenuRole::QuitRole</enum>
|
||||
@@ -394,10 +388,7 @@
|
||||
<iconset theme="view-refresh"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Refresh Devices</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>F5</string>
|
||||
<string>&Refresh Devices</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionGitHub">
|
||||
|
||||
Reference in New Issue
Block a user