Clang script (#3085)

This commit is contained in:
Zach H 2018-02-06 08:45:13 -05:00 committed by GitHub
parent fcfb2b12b7
commit 35159ef61a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 2098 additions and 2054 deletions

View file

@ -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();
}
}