Skip to content

Commit

Permalink
feats: add shortcut for actions. ⬆️
Browse files Browse the repository at this point in the history
  • Loading branch information
Joker2770 committed Apr 5, 2023
1 parent d811373 commit 4e1b63b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,20 @@ MainWindow::MainWindow(QWidget *parent)
this->pActionVer = new QAction("Ver Info", this);
this->pActionFeedback = new QAction("Feedback", this);
this->pActionLicense = new QAction("License", this);
this->pActionStart->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_S));
this->pActionPause->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_P));
this->pActionContinue->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_G));
this->pActionEnd->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_E));
this->pActionClear->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_C));
this->pActionTakeBack->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_T));
this->pActionBoardSize->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_B));
this->pActionTimeoutMatch->setShortcut(QKeySequence(Qt::Key_M));
this->pActionTimeoutTurn->setShortcut(QKeySequence(Qt::Key_T));
this->pActionMaxMemory->setShortcut(QKeySequence(Qt::Key_O));
this->pActionFreeStyleGomoku->setShortcut(QKeySequence(Qt::Key_F));
this->pActionStandardGomoku->setShortcut(QKeySequence(Qt::Key_S));
this->pActionRenju->setShortcut(QKeySequence(Qt::Key_R));
this->pActionPlayerSetting->setShortcut(QKeySequence(Qt::Key_P));
this->pMenuSetting->addAction(this->pActionBoardSize);
this->pMenuSetting->addAction(this->pActionTimeoutMatch);
this->pMenuSetting->addAction(this->pActionTimeoutTurn);
Expand Down

0 comments on commit 4e1b63b

Please sign in to comment.