mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-30 23:50:19 -07:00
Customizable shorcuts
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -16,7 +16,7 @@ ShortcutsSettings::ShortcutsSettings(QString settingsPath, QObject *parent) : QO
|
||||
if(exists){
|
||||
shortCutsFile.beginGroup("Custom");
|
||||
const QStringList customKeys = shortCutsFile.allKeys();
|
||||
for(QStringList::const_iterator it = customKeys.cbegin(); it != customKeys.cend(); ++it)
|
||||
for(QStringList::const_iterator it = customKeys.constBegin(); it != customKeys.constEnd(); ++it)
|
||||
{
|
||||
QString stringSecuence = shortCutsFile.value(*it).toString();
|
||||
QList<QKeySequence> secuenceList = parseSecuenceString(stringSecuence);
|
||||
@@ -26,7 +26,7 @@ ShortcutsSettings::ShortcutsSettings(QString settingsPath, QObject *parent) : QO
|
||||
|
||||
shortCutsFile.beginGroup("Defaults");
|
||||
const QStringList defaultKeys = shortCutsFile.allKeys();
|
||||
for(QStringList::const_iterator it = defaultKeys.cbegin(); it != defaultKeys.cend(); ++it)
|
||||
for(QStringList::const_iterator it = defaultKeys.constBegin(); it != defaultKeys.constEnd(); ++it)
|
||||
{
|
||||
QString stringSecuence = shortCutsFile.value(*it).toString();
|
||||
QList<QKeySequence> secuenceList = parseSecuenceString(stringSecuence);
|
||||
@@ -89,7 +89,7 @@ QList<QKeySequence> ShortcutsSettings::parseSecuenceString(QString stringSecuenc
|
||||
{
|
||||
QStringList secuences = stringSecuence.split(";");
|
||||
QList<QKeySequence> secuenceList;
|
||||
for(QStringList::const_iterator ss = secuences.cbegin(); ss != secuences.cend(); ++ss)
|
||||
for(QStringList::const_iterator ss = secuences.constBegin(); ss != secuences.constEnd(); ++ss)
|
||||
{
|
||||
secuenceList.append(QKeySequence(*ss, QKeySequence::PortableText));
|
||||
}
|
||||
|
||||
@@ -279,6 +279,9 @@ void TabDeckEditor::createMenus()
|
||||
aSaveDeckAs->setShortcuts(settingsCache->shortcuts().getShortcut(
|
||||
"TabDeckEditor/aSaveDeckAs", QKeySequence()));
|
||||
|
||||
aOpenCustomsetsFolder = new QAction(QString(), this);
|
||||
connect(aOpenCustomsetsFolder, SIGNAL(triggered()), this, SLOT(actOpenCustomsetsFolder()));
|
||||
|
||||
aLoadDeckFromClipboard = new QAction(QString(), this);
|
||||
connect(aLoadDeckFromClipboard, SIGNAL(triggered()), this, SLOT(actLoadDeckFromClipboard()));
|
||||
aLoadDeckFromClipboard->setShortcuts(settingsCache->shortcuts().getShortcut(
|
||||
@@ -576,7 +579,7 @@ void TabDeckEditor::retranslateUi()
|
||||
aPrintDeck->setText(tr("&Print deck..."));
|
||||
aAnalyzeDeck->setText(tr("&Analyze deck on deckstats.net"));
|
||||
aOpenCustomFolder->setText(tr("Open custom image folder"));
|
||||
aOpenCustomsetsFolder->setText(tr("Open custom sets folder"));
|
||||
aOpenCustomsetsFolder->setText(tr("Open custom sets folder"));
|
||||
aClose->setText(tr("&Close"));
|
||||
aClose->setShortcuts(settingsCache->shortcuts().getShortcut(
|
||||
"TabDeckEditor/aClose",
|
||||
|
||||
Reference in New Issue
Block a user