upload code

This commit is contained in:
arm64v8a
2022-05-03 19:25:17 +08:00
parent 6f7e9ef9ad
commit 77d354874e
275 changed files with 25135 additions and 0 deletions

24
ui/dialog_hotkey.cpp Normal file
View File

@@ -0,0 +1,24 @@
#include "dialog_hotkey.h"
#include "ui_dialog_hotkey.h"
#include "ui/mainwindow.h"
DialogHotkey::DialogHotkey(QWidget *parent) :
QDialog(parent), ui(new Ui::DialogHotkey) {
ui->setupUi(this);
ui->show_mainwindow->setKeySequence(NekoRay::dataStore->hotkey_mainwindow);
ui->show_groups->setKeySequence(NekoRay::dataStore->hotkey_group);
ui->show_routes->setKeySequence(NekoRay::dataStore->hotkey_route);
GetMainWindow()->RegisterHotkey(true);
}
DialogHotkey::~DialogHotkey() {
if (result() == QDialog::Accepted) {
NekoRay::dataStore->hotkey_mainwindow = ui->show_mainwindow->keySequence().toString();
NekoRay::dataStore->hotkey_group = ui->show_groups->keySequence().toString();
NekoRay::dataStore->hotkey_route = ui->show_routes->keySequence().toString();
NekoRay::dataStore->Save();
}
GetMainWindow()->RegisterHotkey(false);
delete ui;
}