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