mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Clang script (#3085)
This commit is contained in:
parent
fcfb2b12b7
commit
35159ef61a
24 changed files with 2098 additions and 2054 deletions
|
|
@ -7,10 +7,10 @@
|
|||
ShortcutsTab::ShortcutsTab() : ui(new Ui::shortcutsTab)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
connect(ui->btnResetAll,SIGNAL(clicked()),this,SLOT(resetShortcuts()));
|
||||
connect(ui->btnClearAll,SIGNAL(clicked()),this,SLOT(clearShortcuts()));
|
||||
connect(&settingsCache->shortcuts(),SIGNAL(allShortCutsReset()),this,SLOT(refreshEdits()));
|
||||
connect(&settingsCache->shortcuts(),SIGNAL(allShortCutsClear()),this,SLOT(afterClear()));
|
||||
connect(ui->btnResetAll, SIGNAL(clicked()), this, SLOT(resetShortcuts()));
|
||||
connect(ui->btnClearAll, SIGNAL(clicked()), this, SLOT(clearShortcuts()));
|
||||
connect(&settingsCache->shortcuts(), SIGNAL(allShortCutsReset()), this, SLOT(refreshEdits()));
|
||||
connect(&settingsCache->shortcuts(), SIGNAL(allShortCutsClear()), this, SLOT(afterClear()));
|
||||
}
|
||||
|
||||
void ShortcutsTab::retranslateUi()
|
||||
|
|
@ -25,36 +25,32 @@ ShortcutsTab::~ShortcutsTab()
|
|||
|
||||
void ShortcutsTab::resetShortcuts()
|
||||
{
|
||||
if (QMessageBox::question(this,tr("Restore all default shortcuts"),
|
||||
tr("Do you really want to restore all default shortcuts?")) == QMessageBox::Yes)
|
||||
{
|
||||
if (QMessageBox::question(this, tr("Restore all default shortcuts"),
|
||||
tr("Do you really want to restore all default shortcuts?")) == QMessageBox::Yes) {
|
||||
settingsCache->shortcuts().resetAllShortcuts();
|
||||
}
|
||||
}
|
||||
|
||||
void ShortcutsTab::refreshEdits()
|
||||
{
|
||||
QList<SequenceEdit*> edits = this->findChildren<SequenceEdit*>();
|
||||
for (auto edit : edits)
|
||||
{
|
||||
{
|
||||
QList<SequenceEdit *> edits = this->findChildren<SequenceEdit *>();
|
||||
for (auto edit : edits) {
|
||||
edit->refreshShortcut();
|
||||
}
|
||||
}
|
||||
|
||||
void ShortcutsTab::clearShortcuts()
|
||||
{
|
||||
if (QMessageBox::question(this,tr("Clear all default shortcuts"),
|
||||
tr("Do you really want to clear all shortcuts?")) == QMessageBox::Yes)
|
||||
{
|
||||
if (QMessageBox::question(this, tr("Clear all default shortcuts"),
|
||||
tr("Do you really want to clear all shortcuts?")) == QMessageBox::Yes) {
|
||||
settingsCache->shortcuts().clearAllShortcuts();
|
||||
}
|
||||
}
|
||||
|
||||
void ShortcutsTab::afterClear()
|
||||
{
|
||||
QList<SequenceEdit*> edits = this->findChildren<SequenceEdit*>();
|
||||
for (auto edit : edits)
|
||||
{
|
||||
{
|
||||
QList<SequenceEdit *> edits = this->findChildren<SequenceEdit *>();
|
||||
for (auto edit : edits) {
|
||||
edit->clear();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue