Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Cockatrice
Commits
d3d6f704
Commit
d3d6f704
authored
Aug 16, 2015
by
marco
Browse files
Removed 2nd arg from ShortcutsSettings::getShortcut
parent
1ca89e0b
Changes
12
Hide whitespace changes
Inline
Side-by-side
cockatrice/src/abstractcounter.cpp
View file @
d3d6f704
...
@@ -66,17 +66,9 @@ void AbstractCounter::retranslateUi()
...
@@ -66,17 +66,9 @@ void AbstractCounter::retranslateUi()
void
AbstractCounter
::
setShortcutsActive
()
void
AbstractCounter
::
setShortcutsActive
()
{
{
if
(
name
==
"life"
)
{
if
(
name
==
"life"
)
{
aSet
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aSet
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aSet"
));
"Player/aSet"
,
aDec
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aDec"
));
QKeySequence
(
"Ctrl+L"
)));
aInc
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aInc"
));
aDec
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aDec"
,
QKeySequence
(
"F11"
)));
aInc
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aInc"
,
QKeySequence
(
"F12"
)));
}
}
}
}
...
...
cockatrice/src/dlg_load_deck_from_clipboard.cpp
View file @
d3d6f704
...
@@ -19,8 +19,7 @@ DlgLoadDeckFromClipboard::DlgLoadDeckFromClipboard(QWidget *parent)
...
@@ -19,8 +19,7 @@ DlgLoadDeckFromClipboard::DlgLoadDeckFromClipboard(QWidget *parent)
refreshButton
=
new
QPushButton
(
tr
(
"&Refresh"
));
refreshButton
=
new
QPushButton
(
tr
(
"&Refresh"
));
refreshButton
->
setShortcut
(
settingsCache
->
shortcuts
().
getSingleShortcut
(
refreshButton
->
setShortcut
(
settingsCache
->
shortcuts
().
getSingleShortcut
(
"DlgLoadDeckFromClipboard/refreshButton"
,
"DlgLoadDeckFromClipboard/refreshButton"
));
QKeySequence
(
"F5"
)));
connect
(
refreshButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
actRefresh
()));
connect
(
refreshButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
actRefresh
()));
QDialogButtonBox
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
);
QDialogButtonBox
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
);
...
...
cockatrice/src/gameview.cpp
View file @
d3d6f704
...
@@ -21,8 +21,7 @@ GameView::GameView(QGraphicsScene *scene, QWidget *parent)
...
@@ -21,8 +21,7 @@ GameView::GameView(QGraphicsScene *scene, QWidget *parent)
aCloseMostRecentZoneView
=
new
QAction
(
this
);
aCloseMostRecentZoneView
=
new
QAction
(
this
);
aCloseMostRecentZoneView
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aCloseMostRecentZoneView
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aCloseMostRecentZoneView"
,
"Player/aCloseMostRecentZoneView"
));
QKeySequence
(
"Esc"
)));
connect
(
aCloseMostRecentZoneView
,
SIGNAL
(
triggered
()),
scene
,
SLOT
(
closeMostRecentZoneView
()));
connect
(
aCloseMostRecentZoneView
,
SIGNAL
(
triggered
()),
scene
,
SLOT
(
closeMostRecentZoneView
()));
addAction
(
aCloseMostRecentZoneView
);
addAction
(
aCloseMostRecentZoneView
);
...
...
cockatrice/src/player.cpp
View file @
d3d6f704
...
@@ -683,79 +683,61 @@ void Player::retranslateUi()
...
@@ -683,79 +683,61 @@ void Player::retranslateUi()
}
}
aPlay
->
setText
(
tr
(
"&Play"
));
aPlay
->
setText
(
tr
(
"&Play"
));
aPlay
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aPlay
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aPlay"
));
"Player/aPlay"
,
QKeySequence
()));
aHide
->
setText
(
tr
(
"&Hide"
));
aHide
->
setText
(
tr
(
"&Hide"
));
aPlayFacedown
->
setText
(
tr
(
"Play &Face Down"
));
aPlayFacedown
->
setText
(
tr
(
"Play &Face Down"
));
aTap
->
setText
(
tr
(
"&Tap"
));
aTap
->
setText
(
tr
(
"&Tap"
));
aTap
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aTap
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aTap"
));
"Player/aTap"
,
QKeySequence
()));
aUntap
->
setText
(
tr
(
"&Untap"
));
aUntap
->
setText
(
tr
(
"&Untap"
));
aUntap
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aUntap
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aUntap"
));
"Player/aUntap"
,
QKeySequence
()));
aDoesntUntap
->
setText
(
tr
(
"Toggle &normal untapping"
));
aDoesntUntap
->
setText
(
tr
(
"Toggle &normal untapping"
));
aDoesntUntap
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aDoesntUntap
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aDoesntUntap"
));
"Player/aDoesntUntap"
,
QKeySequence
()));
aFlip
->
setText
(
tr
(
"&Flip"
));
aFlip
->
setText
(
tr
(
"&Flip"
));
aFlip
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aFlip
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aFlip"
));
"Player/aFlip"
,
QKeySequence
()));
aPeek
->
setText
(
tr
(
"&Peek at card face"
));
aPeek
->
setText
(
tr
(
"&Peek at card face"
));
aPeek
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aPeek
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aPeek"
));
"Player/aPeek"
,
QKeySequence
()));
aClone
->
setText
(
tr
(
"&Clone"
));
aClone
->
setText
(
tr
(
"&Clone"
));
aClone
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aClone
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aClone"
));
"Player/aClone"
,
QKeySequence
(
"Ctrl+J"
)));
aAttach
->
setText
(
tr
(
"Attac&h to card..."
));
aAttach
->
setText
(
tr
(
"Attac&h to card..."
));
aAttach
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aAttach
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aAttach"
));
"Player/aAttach"
,
QKeySequence
(
"Ctrl+A"
)));
aUnattach
->
setText
(
tr
(
"Unattac&h"
));
aUnattach
->
setText
(
tr
(
"Unattac&h"
));
aUnattach
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aUnattach
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aUnattach"
));
"Player/aUnattach"
,
QKeySequence
()));
aDrawArrow
->
setText
(
tr
(
"&Draw arrow..."
));
aDrawArrow
->
setText
(
tr
(
"&Draw arrow..."
));
aDrawArrow
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aDrawArrow
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aDrawArrow"
));
"Player/aDrawArrow"
,
QKeySequence
()));
aIncP
->
setText
(
tr
(
"&Increase power"
));
aIncP
->
setText
(
tr
(
"&Increase power"
));
aIncP
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aIncP
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/IncP"
));
"Player/IncP"
,
QKeySequence
(
"Ctrl++"
)));
aDecP
->
setText
(
tr
(
"&Decrease power"
));
aDecP
->
setText
(
tr
(
"&Decrease power"
));
aDecP
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aDecP
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aDecP"
));
"Player/aDecP"
,
QKeySequence
(
"Ctrl+-"
)));
aIncT
->
setText
(
tr
(
"I&ncrease toughness"
));
aIncT
->
setText
(
tr
(
"I&ncrease toughness"
));
aIncT
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aIncT
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aIncT"
));
"Player/aIncT"
,
QKeySequence
(
"Alt++"
)));
aDecT
->
setText
(
tr
(
"D&ecrease toughness"
));
aDecT
->
setText
(
tr
(
"D&ecrease toughness"
));
aDecT
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aDecT
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aDecT"
));
"Player/aDecT"
,
QKeySequence
(
"Alt+-"
)));
aIncPT
->
setText
(
tr
(
"In&crease power and toughness"
));
aIncPT
->
setText
(
tr
(
"In&crease power and toughness"
));
aIncPT
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aIncPT
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aIncPT"
));
"Player/aIncPT"
,
QKeySequence
(
"Ctrl+Alt++"
)));
aDecPT
->
setText
(
tr
(
"Dec&rease power and toughness"
));
aDecPT
->
setText
(
tr
(
"Dec&rease power and toughness"
));
aDecPT
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aDecPT
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aDecPT"
));
"Player/aDecPT"
,
QKeySequence
(
"Ctrl+Alt+-"
)));
aSetPT
->
setText
(
tr
(
"Set &power and toughness..."
));
aSetPT
->
setText
(
tr
(
"Set &power and toughness..."
));
aSetPT
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aSetPT
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aSetPT"
));
"Player/aSetPT"
,
QKeySequence
(
"Ctrl+P"
)));
aSetAnnotation
->
setText
(
tr
(
"&Set annotation..."
));
aSetAnnotation
->
setText
(
tr
(
"&Set annotation..."
));
aSetAnnotation
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aSetAnnotation
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aSetAnnotation"
));
"Player/aSetAnnotation"
,
QKeySequence
()));
QStringList
counterColors
;
QStringList
counterColors
;
counterColors
.
append
(
tr
(
"Red"
));
counterColors
.
append
(
tr
(
"Red"
));
...
@@ -764,27 +746,27 @@ void Player::retranslateUi()
...
@@ -764,27 +746,27 @@ void Player::retranslateUi()
QList
<
QKeySequence
>
addCCShortCuts
;
QList
<
QKeySequence
>
addCCShortCuts
;
addCCShortCuts
.
append
(
settingsCache
->
shortcuts
().
getSingleShortcut
(
addCCShortCuts
.
append
(
settingsCache
->
shortcuts
().
getSingleShortcut
(
"Player/aCCRed"
,
QKeySequence
()
));
"Player/aCCRed"
));
addCCShortCuts
.
append
(
settingsCache
->
shortcuts
().
getSingleShortcut
(
addCCShortCuts
.
append
(
settingsCache
->
shortcuts
().
getSingleShortcut
(
"Player/aCCYellow"
,
QKeySequence
()
));
"Player/aCCYellow"
));
addCCShortCuts
.
append
(
settingsCache
->
shortcuts
().
getSingleShortcut
(
addCCShortCuts
.
append
(
settingsCache
->
shortcuts
().
getSingleShortcut
(
"Player/aCCGreen"
,
QKeySequence
()
));
"Player/aCCGreen"
));
QList
<
QKeySequence
>
removeCCShortCuts
;
QList
<
QKeySequence
>
removeCCShortCuts
;
removeCCShortCuts
.
append
(
settingsCache
->
shortcuts
().
getSingleShortcut
(
removeCCShortCuts
.
append
(
settingsCache
->
shortcuts
().
getSingleShortcut
(
"Player/aRCRed"
,
QKeySequence
()
));
"Player/aRCRed"
));
removeCCShortCuts
.
append
(
settingsCache
->
shortcuts
().
getSingleShortcut
(
removeCCShortCuts
.
append
(
settingsCache
->
shortcuts
().
getSingleShortcut
(
"Player/aRCYellow"
,
QKeySequence
()
));
"Player/aRCYellow"
));
removeCCShortCuts
.
append
(
settingsCache
->
shortcuts
().
getSingleShortcut
(
removeCCShortCuts
.
append
(
settingsCache
->
shortcuts
().
getSingleShortcut
(
"Player/aRCGreen"
,
QKeySequence
()
));
"Player/aRCGreen"
));
QList
<
QKeySequence
>
setCCShortCuts
;
QList
<
QKeySequence
>
setCCShortCuts
;
setCCShortCuts
.
append
(
settingsCache
->
shortcuts
().
getSingleShortcut
(
setCCShortCuts
.
append
(
settingsCache
->
shortcuts
().
getSingleShortcut
(
"Player/aSCRed"
,
QKeySequence
()
));
"Player/aSCRed"
));
setCCShortCuts
.
append
(
settingsCache
->
shortcuts
().
getSingleShortcut
(
setCCShortCuts
.
append
(
settingsCache
->
shortcuts
().
getSingleShortcut
(
"Player/aSCYellow"
,
QKeySequence
()
));
"Player/aSCYellow"
));
setCCShortCuts
.
append
(
settingsCache
->
shortcuts
().
getSingleShortcut
(
setCCShortCuts
.
append
(
settingsCache
->
shortcuts
().
getSingleShortcut
(
"Player/aSCGreen"
,
QKeySequence
()
));
"Player/aSCGreen"
));
for
(
int
i
=
0
;
i
<
aAddCounter
.
size
();
++
i
){
for
(
int
i
=
0
;
i
<
aAddCounter
.
size
();
++
i
){
aAddCounter
[
i
]
->
setText
(
tr
(
"&Add counter (%1)"
).
arg
(
counterColors
[
i
]));
aAddCounter
[
i
]
->
setText
(
tr
(
"&Add counter (%1)"
).
arg
(
counterColors
[
i
]));
...
@@ -801,23 +783,23 @@ void Player::retranslateUi()
...
@@ -801,23 +783,23 @@ void Player::retranslateUi()
aMoveToTopLibrary
->
setText
(
tr
(
"&Top of library"
));
aMoveToTopLibrary
->
setText
(
tr
(
"&Top of library"
));
aMoveToTopLibrary
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aMoveToTopLibrary
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aMoveToTopLibrary"
,
QKeySequence
()
));
"Player/aMoveToTopLibrary"
));
aMoveToBottomLibrary
->
setText
(
tr
(
"&Bottom of library"
));
aMoveToBottomLibrary
->
setText
(
tr
(
"&Bottom of library"
));
aMoveToBottomLibrary
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aMoveToBottomLibrary
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aMoveToBottomLibrary"
,
QKeySequence
()
));
"Player/aMoveToBottomLibrary"
));
aMoveToHand
->
setText
(
tr
(
"&Hand"
));
aMoveToHand
->
setText
(
tr
(
"&Hand"
));
aMoveToHand
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aMoveToHand
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aMoveToHand"
,
QKeySequence
()
));
"Player/aMoveToHand"
));
aMoveToGraveyard
->
setText
(
tr
(
"&Graveyard"
));
aMoveToGraveyard
->
setText
(
tr
(
"&Graveyard"
));
aMoveToGraveyard
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aMoveToGraveyard
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aMoveToGraveyard"
,
QKeySequence
(
"Ctrl+Del"
)
));
"Player/aMoveToGraveyard"
));
aMoveToExile
->
setText
(
tr
(
"&Exile"
));
aMoveToExile
->
setText
(
tr
(
"&Exile"
));
aMoveToExile
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aMoveToExile
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aMoveToExile"
,
QKeySequence
()
));
"Player/aMoveToExile"
));
QMapIterator
<
QString
,
CardZone
*>
zoneIterator
(
zones
);
QMapIterator
<
QString
,
CardZone
*>
zoneIterator
(
zones
);
while
(
zoneIterator
.
hasNext
())
while
(
zoneIterator
.
hasNext
())
...
@@ -829,52 +811,49 @@ void Player::setShortcutsActive()
...
@@ -829,52 +811,49 @@ void Player::setShortcutsActive()
shortcutsActive
=
true
;
shortcutsActive
=
true
;
aViewSideboard
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aViewSideboard
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aViewSideboard"
,
QKeySequence
(
"Ctrl+F3"
)
));
"Player/aViewSideboard"
));
aViewLibrary
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aViewLibrary
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aViewLibrary"
,
QKeySequence
(
"F3"
)
));
"Player/aViewLibrary"
));
aViewTopCards
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aViewTopCards
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aViewTopCards"
,
QKeySequence
(
"Ctrl+W"
)
));
"Player/aViewTopCards"
));
aViewGraveyard
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aViewGraveyard
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aViewGraveyard"
,
QKeySequence
(
"F4"
)
));
"Player/aViewGraveyard"
));
aViewRfg
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aViewRfg
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aViewRfg"
,
QKeySequence
()
));
"Player/aViewRfg"
));
aDrawCard
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aDrawCard
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aDrawCard"
,
QKeySequence
(
"Ctrl+D"
)
));
"Player/aDrawCard"
));
aDrawCards
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aDrawCards
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aDrawCards"
,
QKeySequence
(
"Ctrl+E"
)
));
"Player/aDrawCards"
));
aUndoDraw
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aUndoDraw
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aUndoDraw"
,
QKeySequence
(
"Ctrl+Shift+D"
)
));
"Player/aUndoDraw"
));
aMulligan
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aMulligan
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aMulligan"
,
QKeySequence
(
"Ctrl+M"
)
));
"Player/aMulligan"
));
aShuffle
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aShuffle
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aShuffle"
,
QKeySequence
(
"Ctrl+S"
)
));
"Player/aShuffle"
));
aUntapAll
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aUntapAll
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aUntapAll"
,
QKeySequence
(
"Ctrl+U"
)
));
"Player/aUntapAll"
));
aRollDie
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aRollDie
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aRollDie"
,
QKeySequence
(
"Ctrl+I"
)
));
"Player/aRollDie"
));
aCreateToken
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aCreateToken
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aCreateToken"
,
"Player/aCreateToken"
));
QKeySequence
(
"Ctrl+T"
)));
aCreateAnotherToken
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aCreateAnotherToken
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aCreateAnotherToken"
,
"Player/aCreateAnotherToken"
));
QKeySequence
(
"Ctrl+G"
)));
aAlwaysRevealTopCard
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aAlwaysRevealTopCard
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aAlwaysRevealTopCard"
,
"Player/aAlwaysRevealTopCard"
));
QKeySequence
(
"Ctrl+N"
)));
QMapIterator
<
int
,
AbstractCounter
*>
counterIterator
(
counters
);
QMapIterator
<
int
,
AbstractCounter
*>
counterIterator
(
counters
);
while
(
counterIterator
.
hasNext
())
while
(
counterIterator
.
hasNext
())
...
...
cockatrice/src/sequenceEdit/secuenceedit.cpp
View file @
d3d6f704
...
@@ -7,9 +7,9 @@
...
@@ -7,9 +7,9 @@
#include
<QKeyEvent>
#include
<QKeyEvent>
#include
<QToolTip>
#include
<QToolTip>
SecuenceEdit
::
SecuenceEdit
(
QString
n
ame
,
QWidget
*
parent
)
:
QWidget
(
parent
)
SecuenceEdit
::
SecuenceEdit
(
QString
_shorcutN
ame
,
QWidget
*
parent
)
:
QWidget
(
parent
)
{
{
this
->
shorcutName
=
n
ame
;
shorcutName
=
_shorcutN
ame
;
currentKey
=
0
;
currentKey
=
0
;
maxKeys
=
4
;
maxKeys
=
4
;
keys
=
0
;
keys
=
0
;
...
@@ -37,7 +37,7 @@ SecuenceEdit::SecuenceEdit(QString name, QWidget *parent) : QWidget(parent)
...
@@ -37,7 +37,7 @@ SecuenceEdit::SecuenceEdit(QString name, QWidget *parent) : QWidget(parent)
connect
(
defaultButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
restoreDefault
()));
connect
(
defaultButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
restoreDefault
()));
lineEdit
->
installEventFilter
(
this
);
lineEdit
->
installEventFilter
(
this
);
lineEdit
->
setText
(
settingsCache
->
shortcuts
().
getShortcutString
(
n
ame
));
lineEdit
->
setText
(
settingsCache
->
shortcuts
().
getShortcutString
(
shorcutN
ame
));
}
}
QString
SecuenceEdit
::
getSecuence
()
QString
SecuenceEdit
::
getSecuence
()
...
...
cockatrice/src/sequenceEdit/secuenceedit.h
View file @
d3d6f704
...
@@ -12,7 +12,7 @@ class SecuenceEdit : public QWidget
...
@@ -12,7 +12,7 @@ class SecuenceEdit : public QWidget
{
{
Q_OBJECT
Q_OBJECT
public:
public:
SecuenceEdit
(
QString
shorcutName
,
QWidget
*
parent
=
0
);
SecuenceEdit
(
QString
_
shorcutName
,
QWidget
*
parent
=
0
);
QString
getSecuence
();
QString
getSecuence
();
signals:
signals:
...
...
cockatrice/src/shortcutssettings.cpp
View file @
d3d6f704
...
@@ -23,43 +23,20 @@ ShortcutsSettings::ShortcutsSettings(QString settingsPath, QObject *parent) : QO
...
@@ -23,43 +23,20 @@ ShortcutsSettings::ShortcutsSettings(QString settingsPath, QObject *parent) : QO
shortCuts
.
insert
(
*
it
,
secuenceList
);
shortCuts
.
insert
(
*
it
,
secuenceList
);
}
}
shortCutsFile
.
endGroup
();
shortCutsFile
.
endGroup
();
shortCutsFile
.
beginGroup
(
"Defaults"
);
const
QStringList
defaultKeys
=
shortCutsFile
.
allKeys
();
for
(
QStringList
::
const_iterator
it
=
defaultKeys
.
constBegin
();
it
!=
defaultKeys
.
constEnd
();
++
it
)
{
QString
stringSecuence
=
shortCutsFile
.
value
(
*
it
).
toString
();
QList
<
QKeySequence
>
secuenceList
=
parseSecuenceString
(
stringSecuence
);
defaultShortCuts
.
insert
(
*
it
,
secuenceList
);
}
shortCutsFile
.
endGroup
();
}
}
}
}
QList
<
QKeySequence
>
ShortcutsSettings
::
getShortcut
(
QString
name
,
QList
<
QKeySequence
>
defaultShortCut
)
QList
<
QKeySequence
>
ShortcutsSettings
::
getShortcut
(
QString
name
)
{
{
if
(
shortCuts
.
contains
(
name
))
if
(
shortCuts
.
contains
(
name
))
return
shortCuts
.
value
(
name
);
return
shortCuts
.
value
(
name
);
setShortcuts
(
name
,
defaultShortCut
);
return
defaultShortCuts
.
value
(
name
,
QList
<
QKeySequence
>
());
defaultShortCuts
[
name
]
=
defaultShortCut
;
QSettings
shortCutsFile
(
settingsFilePath
,
QSettings
::
IniFormat
);
shortCutsFile
.
beginGroup
(
"Defaults"
);
shortCutsFile
.
setValue
(
name
,
stringifySecuence
(
defaultShortCut
));
shortCutsFile
.
endGroup
();
return
defaultShortCut
;
}
QList
<
QKeySequence
>
ShortcutsSettings
::
getShortcut
(
QString
name
,
QKeySequence
defaultShortCut
)
{
return
getShortcut
(
name
,
QList
<
QKeySequence
>
()
<<
defaultShortCut
);
}
}
QKeySequence
ShortcutsSettings
::
getSingleShortcut
(
QString
name
,
QKeySequence
defaultShortCut
)
QKeySequence
ShortcutsSettings
::
getSingleShortcut
(
QString
name
)
{
{
return
getShortcut
(
name
,
defaultShortCut
).
at
(
0
);
return
getShortcut
(
name
).
at
(
0
);
}
}
QString
ShortcutsSettings
::
getDefaultShortcutString
(
QString
name
)
QString
ShortcutsSettings
::
getDefaultShortcutString
(
QString
name
)
...
@@ -244,5 +221,7 @@ void ShortcutsSettings::fillDefaultShorcuts()
...
@@ -244,5 +221,7 @@ void ShortcutsSettings::fillDefaultShorcuts()
defaultShortCuts
[
"Player/phase7"
]
=
parseSecuenceString
(
""
);
defaultShortCuts
[
"Player/phase7"
]
=
parseSecuenceString
(
""
);
defaultShortCuts
[
"Player/phase8"
]
=
parseSecuenceString
(
""
);
defaultShortCuts
[
"Player/phase8"
]
=
parseSecuenceString
(
""
);
defaultShortCuts
[
"Player/phase9"
]
=
parseSecuenceString
(
"F9"
);
defaultShortCuts
[
"Player/phase9"
]
=
parseSecuenceString
(
"F9"
);
defaultShortCuts
[
"tab_room/aClearChat"
]
=
parseSecuenceString
(
"F12"
);
defaultShortCuts
[
"DlgLoadDeckFromClipboard/refreshButton"
]
=
parseSecuenceString
(
"F5"
);
}
}
cockatrice/src/shortcutssettings.h
View file @
d3d6f704
...
@@ -13,9 +13,8 @@ public:
...
@@ -13,9 +13,8 @@ public:
ShortcutsSettings
(
QString
settingsFilePath
,
QObject
*
parent
=
0
);
ShortcutsSettings
(
QString
settingsFilePath
,
QObject
*
parent
=
0
);
~
ShortcutsSettings
()
{
}
~
ShortcutsSettings
()
{
}
QList
<
QKeySequence
>
getShortcut
(
QString
name
,
QList
<
QKeySequence
>
defaultShortCut
);
QList
<
QKeySequence
>
getShortcut
(
QString
name
);
QList
<
QKeySequence
>
getShortcut
(
QString
name
,
QKeySequence
defaultShortCut
);
QKeySequence
getSingleShortcut
(
QString
name
);
QKeySequence
getSingleShortcut
(
QString
name
,
QKeySequence
defaultShortCut
);
QString
getDefaultShortcutString
(
QString
name
);
QString
getDefaultShortcutString
(
QString
name
);
QString
getShortcutString
(
QString
name
);
QString
getShortcutString
(
QString
name
);
...
...
cockatrice/src/tab_deck_editor.cpp
View file @
d3d6f704
...
@@ -258,26 +258,23 @@ void TabDeckEditor::createMenus()
...
@@ -258,26 +258,23 @@ void TabDeckEditor::createMenus()
aNewDeck
=
new
QAction
(
QString
(),
this
);
aNewDeck
=
new
QAction
(
QString
(),
this
);
connect
(
aNewDeck
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actNewDeck
()));
connect
(
aNewDeck
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actNewDeck
()));
aNewDeck
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aNewDeck
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"TabDeckEditor/aNewDeck"
,
"TabDeckEditor/aNewDeck"
));
QKeySequence
::
New
));
aLoadDeck
=
new
QAction
(
QString
(),
this
);
aLoadDeck
=
new
QAction
(
QString
(),
this
);
connect
(
aLoadDeck
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actLoadDeck
()));
connect
(
aLoadDeck
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actLoadDeck
()));
aLoadDeck
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aLoadDeck
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"TabDeckEditor/aLoadDeck"
,
"TabDeckEditor/aLoadDeck"
));
QKeySequence
::
Open
));
aSaveDeck
=
new
QAction
(
QString
(),
this
);
aSaveDeck
=
new
QAction
(
QString
(),
this
);
connect
(
aSaveDeck
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actSaveDeck
()));
connect
(
aSaveDeck
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actSaveDeck
()));
aSaveDeck
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aSaveDeck
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"TabDeckEditor/aSaveDeck"
,
"TabDeckEditor/aSaveDeck"
));
QKeySequence
::
Save
));
aSaveDeckAs
=
new
QAction
(
QString
(),
this
);
aSaveDeckAs
=
new
QAction
(
QString
(),
this
);
connect
(
aSaveDeckAs
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actSaveDeckAs
()));
connect
(
aSaveDeckAs
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actSaveDeckAs
()));
aSaveDeckAs
->
setShortcuts
(
QKeySequence
::
SaveAs
);
aSaveDeckAs
->
setShortcuts
(
QKeySequence
::
SaveAs
);
aSaveDeckAs
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aSaveDeckAs
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"TabDeckEditor/aSaveDeckAs"
,
QKeySequence
()
));
"TabDeckEditor/aSaveDeckAs"
));
aOpenCustomsetsFolder
=
new
QAction
(
QString
(),
this
);
aOpenCustomsetsFolder
=
new
QAction
(
QString
(),
this
);
connect
(
aOpenCustomsetsFolder
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actOpenCustomsetsFolder
()));
connect
(
aOpenCustomsetsFolder
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actOpenCustomsetsFolder
()));
...
@@ -285,49 +282,46 @@ void TabDeckEditor::createMenus()
...
@@ -285,49 +282,46 @@ void TabDeckEditor::createMenus()
aLoadDeckFromClipboard
=
new
QAction
(
QString
(),
this
);
aLoadDeckFromClipboard
=
new
QAction
(
QString
(),
this
);
connect
(
aLoadDeckFromClipboard
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actLoadDeckFromClipboard
()));
connect
(
aLoadDeckFromClipboard
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actLoadDeckFromClipboard
()));
aLoadDeckFromClipboard
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aLoadDeckFromClipboard
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"TabDeckEditor/aLoadDeckFromClipboard"
,
"TabDeckEditor/aLoadDeckFromClipboard"
));
QKeySequence
::
Paste
));
aSaveDeckToClipboard
=
new
QAction
(
QString
(),
this
);
aSaveDeckToClipboard
=
new
QAction
(
QString
(),
this
);
connect
(
aSaveDeckToClipboard
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actSaveDeckToClipboard
()));
connect
(
aSaveDeckToClipboard
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actSaveDeckToClipboard
()));
aSaveDeckToClipboard
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aSaveDeckToClipboard
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"TabDeckEditor/aSaveDeckToClipboard"
,
"TabDeckEditor/aSaveDeckToClipboard"
));
QKeySequence
::
Copy
));
aPrintDeck
=
new
QAction
(
QString
(),
this
);
aPrintDeck
=
new
QAction
(
QString
(),
this
);
connect
(
aPrintDeck
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actPrintDeck
()));
connect
(
aPrintDeck
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actPrintDeck
()));
aPrintDeck
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aPrintDeck
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"TabDeckEditor/aPrintDeck"
,
QKeySequence
::
Print
));
"TabDeckEditor/aPrintDeck"
));
aAnalyzeDeck
=
new
QAction
(
QString
(),
this
);
aAnalyzeDeck
=
new
QAction
(
QString
(),
this
);
connect
(
aAnalyzeDeck
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actAnalyzeDeck
()));
connect
(
aAnalyzeDeck
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actAnalyzeDeck
()));
aAnalyzeDeck
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aAnalyzeDeck
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"TabDeckEditor/aAnalyzeDeck"
,
QKeySequence
()
));
"TabDeckEditor/aAnalyzeDeck"
));
aClose
=
new
QAction
(
QString
(),
this
);
aClose
=
new
QAction
(
QString
(),
this
);
connect
(
aClose
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
closeRequest
()));
connect
(
aClose
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
closeRequest
()));
aClose
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aClose
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"TabDeckEditor/aClose"
));
"TabDeckEditor/aClose"
,
QKeySequence
()));
aOpenCustomFolder
=
new
QAction
(
QString
(),
this
);
aOpenCustomFolder
=
new
QAction
(
QString
(),
this
);
connect
(
aOpenCustomFolder
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actOpenCustomFolder
()));
connect
(
aOpenCustomFolder
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actOpenCustomFolder
()));
aOpenCustomFolder
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aOpenCustomFolder
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"TabDeckEditor/aOpenCustomFolder"
,
QKeySequence
()
));
"TabDeckEditor/aOpenCustomFolder"
));
aEditSets
=
new
QAction
(
QString
(),
this
);
aEditSets
=
new
QAction
(
QString
(),
this
);
connect
(
aEditSets
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actEditSets
()));
connect
(
aEditSets
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actEditSets
()));
aEditSets
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aEditSets
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"TabDeckEditor/aEditSets"
,
QKeySequence
()
));
"TabDeckEditor/aEditSets"
));
aEditTokens
=
new
QAction
(
QString
(),
this
);
aEditTokens
=
new
QAction
(
QString
(),
this
);
connect
(
aEditTokens
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actEditTokens
()));
connect
(
aEditTokens
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actEditTokens
()));
aEditTokens
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aEditTokens
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"TabDeckEditor/aEditTokens"
,
QKeySequence
()
));
"TabDeckEditor/aEditTokens"
));
aResetLayout
=
new
QAction
(
QString
(),
this
);
aResetLayout
=
new
QAction
(
QString
(),
this
);
connect
(
aResetLayout
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
restartLayout
()));
connect
(
aResetLayout
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
restartLayout
()));
aResetLayout
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aResetLayout
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"TabDeckEditor/aResetLayout"
,
QKeySequence
()
));
"TabDeckEditor/aResetLayout"
));
deckMenu
=
new
QMenu
(
this
);
deckMenu
=
new
QMenu
(
this
);
deckMenu
->
addAction
(
aNewDeck
);
deckMenu
->
addAction
(
aNewDeck
);
...
@@ -351,13 +345,13 @@ void TabDeckEditor::createMenus()
...
@@ -351,13 +345,13 @@ void TabDeckEditor::createMenus()
aClearFilterAll
->
setIcon
(
QIcon
(
":/resources/icon_clearsearch.svg"
));
aClearFilterAll
->
setIcon
(
QIcon
(
":/resources/icon_clearsearch.svg"
));
connect
(
aClearFilterAll
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actClearFilterAll
()));
connect
(
aClearFilterAll
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actClearFilterAll
()));
aClearFilterAll
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aClearFilterAll
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"TabDeckEditor/aClearFilterAll"
,
QKeySequence
()
));
"TabDeckEditor/aClearFilterAll"
));
aClearFilterOne
=
new
QAction
(
QString
(),
this
);
aClearFilterOne
=
new
QAction
(
QString
(),
this
);
aClearFilterOne
->
setIcon
(
QIcon
(
":/resources/decrement.svg"
));
aClearFilterOne
->
setIcon
(
QIcon
(
":/resources/decrement.svg"
));
connect
(
aClearFilterOne
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actClearFilterOne
()));
connect
(
aClearFilterOne
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actClearFilterOne
()));
aClearFilterOne
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aClearFilterOne
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"TabDeckEditor/aClearFilterOne"
,
QKeySequence
()
));
"TabDeckEditor/aClearFilterOne"
));
dbMenu
=
new
QMenu
(
this
);
dbMenu
=
new
QMenu
(
this
);
dbMenu
->
addAction
(
aEditSets
);
dbMenu
->
addAction
(
aEditSets
);
...
@@ -560,8 +554,7 @@ void TabDeckEditor::retranslateUi()
...
@@ -560,8 +554,7 @@ void TabDeckEditor::retranslateUi()
aClearFilterAll
->
setText
(
tr
(
"&Clear all filters"
));
aClearFilterAll
->
setText
(
tr
(
"&Clear all filters"
));
aClearFilterOne
->
setText
(
tr
(
"Delete selected"
));
aClearFilterOne
->
setText
(
tr
(
"Delete selected"
));
aClearFilterOne
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aClearFilterOne
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"TabDeckEditor/aClearFilterOne"
,
"TabDeckEditor/aClearFilterOne"
));
QKeySequence
(
"Backspace"
)));
nameLabel
->
setText
(
tr
(
"Deck &name:"
));
nameLabel
->
setText
(
tr
(
"Deck &name:"
));
commentsLabel
->
setText
(
tr
(
"&Comments:"
));
commentsLabel
->
setText
(
tr
(
"&Comments:"
));
...
@@ -582,26 +575,22 @@ void TabDeckEditor::retranslateUi()
...
@@ -582,26 +575,22 @@ void TabDeckEditor::retranslateUi()
aOpenCustomsetsFolder
->
setText
(
tr
(
"Open custom sets folder"
));
aOpenCustomsetsFolder
->
setText
(
tr
(
"Open custom sets folder"
));
aClose
->
setText
(
tr
(
"&Close"
));
aClose
->
setText
(
tr
(
"&Close"
));
aClose
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aClose
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"TabDeckEditor/aClose"
,
"TabDeckEditor/aClose"
));
QKeySequence
(
"Ctrl+Q"
)));
aAddCard
->
setText
(
tr
(
"Add card to &maindeck"
));
aAddCard
->
setText
(
tr
(
"Add card to &maindeck"
));
aAddCardToSideboard
->
setText
(
tr
(
"Add card to &sideboard"
));
aAddCardToSideboard
->
setText
(
tr
(
"Add card to &sideboard"
));
aRemoveCard
->
setText
(
tr
(
"&Remove row"
));
aRemoveCard
->
setText
(
tr
(
"&Remove row"
));
aRemoveCard
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aRemoveCard
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"TabDeckEditor/aRemoveCard"
,
"TabDeckEditor/aRemoveCard"
));
QKeySequence
(
"Del"
)));
aIncrement
->
setText
(
tr
(
"&Increment number"
));
aIncrement
->
setText
(
tr
(
"&Increment number"
));
aIncrement
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aIncrement
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"TabDeckEditor/aIncrement"
,
"TabDeckEditor/aIncrement"
));
QKeySequence
(
"+"
)));
aDecrement
->
setText
(
tr
(
"&Decrement number"
));
aDecrement
->
setText
(
tr
(
"&Decrement number"
));
aDecrement
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aDecrement
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"TabDeckEditor/aDecrement"
,
"TabDeckEditor/aDecrement"
));
QKeySequence
(
"-"
)));
deckMenu
->
setTitle
(
tr
(
"&Deck Editor"
));
deckMenu
->
setTitle
(
tr
(
"&Deck Editor"
));
dbMenu
->
setTitle
(
tr
(
"C&ard Database"
));
dbMenu
->
setTitle
(
tr
(
"C&ard Database"
));
...
...
cockatrice/src/tab_game.cpp
View file @
d3d6f704
...
@@ -126,12 +126,10 @@ void DeckViewContainer::retranslateUi()
...
@@ -126,12 +126,10 @@ void DeckViewContainer::retranslateUi()
{
{
loadLocalButton
->
setText
(
tr
(
"Load local deck"
));
loadLocalButton
->
setText
(
tr
(
"Load local deck"
));
loadLocalButton
->
setShortcut
(
settingsCache
->
shortcuts
().
getSingleShortcut
(
loadLocalButton
->
setShortcut
(
settingsCache
->
shortcuts
().
getSingleShortcut
(
"DeckViewContainer/loadLocalButton"
,
"DeckViewContainer/loadLocalButton"
));
QKeySequence
(
"Ctrl+O"
)));
loadRemoteButton
->
setText
(
tr
(
"Load deck from server"
));
loadRemoteButton
->
setText
(
tr
(
"Load deck from server"
));
loadRemoteButton
->
setShortcut
(
settingsCache
->
shortcuts
().
getSingleShortcut
(
loadRemoteButton
->
setShortcut
(
settingsCache
->
shortcuts
().
getSingleShortcut
(
"DeckViewContainer/loadRemoteButton"
,
"DeckViewContainer/loadRemoteButton"
));
QKeySequence
(
"Ctrl+Alt+O"
)));
readyStartButton
->
setText
(
tr
(
"Ready to s&tart"
));
readyStartButton
->
setText
(
tr
(
"Ready to s&tart"
));
updateSideboardLockButtonText
();
updateSideboardLockButtonText
();
}
}
...
@@ -473,17 +471,17 @@ TabGame::TabGame(TabSupervisor *_tabSupervisor, QList<AbstractClient *> &_client
...
@@ -473,17 +471,17 @@ TabGame::TabGame(TabSupervisor *_tabSupervisor, QList<AbstractClient *> &_client
QAction
*
temp
=
new
QAction
(
QString
(),
this
);
QAction
*
temp
=
new
QAction
(
QString
(),
this
);
connect
(
temp
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actPhaseAction
()));
connect
(
temp
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actPhaseAction
()));
switch
(
i
)
{
switch
(
i
)
{
case
0
:
temp
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/phase0"
,
QKeySequence
(
"F5"
)
));
break
;
case
0
:
temp
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/phase0"
));
break
;
case
1
:
temp
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/phase1"
,
QKeySequence
()
));
break
;
case
1
:
temp
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/phase1"
));
break
;
case
2
:
temp
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/phase2"
,
QKeySequence
(
"F6"
)
));
break
;
case
2
:
temp
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/phase2"
));
break
;
case
3
:
temp
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/phase3"
,
QKeySequence
(
"F7"
)
));
break
;
case
3
:
temp
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/phase3"
));
break
;
case
4
:
temp
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/phase4"
,
QKeySequence
(
"F8"
)
));
break
;
case
4
:
temp
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/phase4"
));
break
;
case
5
:
temp
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/phase5"
,
QKeySequence
()
));
break
;
case
5
:
temp
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/phase5"
));
break
;
case
6
:
temp
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/phase6"
,
QKeySequence
()
));
break
;
case
6
:
temp
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/phase6"
));
break
;
case
7
:
temp
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/phase7"
,
QKeySequence
()
));
break
;
case
7
:
temp
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/phase7"
));
break
;
case
8
:
temp
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/phase8"
,
QKeySequence
()
));
break
;
case
8
:
temp
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/phase8"
));
break
;
case
9
:
temp
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/phase9"
,
QKeySequence
(
"F9"
)
));
break
;
case
9
:
temp
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/phase9"
));
break
;
case
10
:
temp
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/phase10"
,
QKeySequence
(
"F10"
)
));
break
;
case
10
:
temp
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/phase10"
));
break
;
default:
;
default:
;
}
}
phasesMenu
->
addAction
(
temp
);
phasesMenu
->
addAction
(
temp
);
...
@@ -555,56 +553,44 @@ void TabGame::retranslateUi()
...
@@ -555,56 +553,44 @@ void TabGame::retranslateUi()
if
(
aNextPhase
)
{
if
(
aNextPhase
)
{
aNextPhase
->
setText
(
tr
(
"Next &phase"
));
aNextPhase
->
setText
(
tr
(
"Next &phase"
));
aNextPhase
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aNextPhase
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aNextPhase"
,
"Player/aNextPhase"
));
QList
<
QKeySequence
>
()
<<
QKeySequence
(
"Ctrl+Space"
)
<<
QKeySequence
(
"Tab"
)));
}
}
if
(
aNextTurn
)
{
if
(
aNextTurn
)
{
aNextTurn
->
setText
(
tr
(
"Next &turn"
));
aNextTurn
->
setText
(
tr
(
"Next &turn"
));
aNextTurn
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aNextTurn
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aNextTurn"
,
"Player/aNextTurn"
));
QList
<
QKeySequence
>
()
<<
QKeySequence
(
"Ctrl+Return"
)
<<
QKeySequence
(
"Ctrl+Enter"
)));
}
}
if
(
aRemoveLocalArrows
)
{
if
(
aRemoveLocalArrows
)
{
aRemoveLocalArrows
->
setText
(
tr
(
"&Remove all local arrows"
));
aRemoveLocalArrows
->
setText
(
tr
(
"&Remove all local arrows"
));
aRemoveLocalArrows
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aRemoveLocalArrows
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aRemoveLocalArrows"
,
"Player/aRemoveLocalArrows"
));
QKeySequence
(
"Ctrl+R"
)));
}
}
if
(
aRotateViewCW
)
{
if
(
aRotateViewCW
)
{
aRotateViewCW
->
setText
(
tr
(
"Rotate View Cl&ockwise"
));
aRotateViewCW
->
setText
(
tr
(
"Rotate View Cl&ockwise"
));
aRotateViewCW
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aRotateViewCW
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aRotateViewCW"
,
"Player/aRotateViewCW"
));
QKeySequence
(
"Ctrl+]"
)));
}
}
if
(
aRotateViewCCW
)
{
if
(
aRotateViewCCW
)
{
aRotateViewCCW
->
setText
(
tr
(
"Rotate View Co&unterclockwise"
));
aRotateViewCCW
->
setText
(
tr
(
"Rotate View Co&unterclockwise"
));
aRotateViewCCW
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aRotateViewCCW
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aRotateViewCCW"
,
"Player/aRotateViewCCW"
));
QKeySequence
(
"Ctrl+["
)));
}
}
if
(
aGameInfo
)
if
(
aGameInfo
)
aGameInfo
->
setText
(
tr
(
"Game &information"
));
aGameInfo
->
setText
(
tr
(
"Game &information"
));
if
(
aConcede
)
{
if
(
aConcede
)
{
aConcede
->
setText
(
tr
(
"&Concede"
));
aConcede
->
setText
(
tr
(
"&Concede"
));
aConcede
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aConcede
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aConcede"
,
"Player/aConcede"
));
QKeySequence
(
"F2"
)));
}
}
if
(
aLeaveGame
)
{
if
(
aLeaveGame
)
{
aLeaveGame
->
setText
(
tr
(
"&Leave game"
));
aLeaveGame
->
setText
(
tr
(
"&Leave game"
));
aLeaveGame
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aLeaveGame
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aLeaveGame"
,
"Player/aLeaveGame"
));
QKeySequence
(
"Ctrl+Q"
)));
}
}
if
(
aCloseReplay
)
{
if
(
aCloseReplay
)
{
aCloseReplay
->
setText
(
tr
(
"C&lose replay"
));
aCloseReplay
->
setText
(
tr
(
"C&lose replay"
));
aCloseReplay
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aCloseReplay
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"Player/aCloseReplay"
,
"Player/aCloseReplay"
));
QKeySequence
(
"Ctrl+Q"
)));
}
}
if
(
sayLabel
)
if
(
sayLabel
)
...
...
cockatrice/src/tab_room.cpp
View file @
d3d6f704
...
@@ -68,7 +68,7 @@ TabRoom::TabRoom(TabSupervisor *_tabSupervisor, AbstractClient *_client, ServerI
...
@@ -68,7 +68,7 @@ TabRoom::TabRoom(TabSupervisor *_tabSupervisor, AbstractClient *_client, ServerI
QMenu
*
chatSettingsMenu
=
new
QMenu
(
this
);
QMenu
*
chatSettingsMenu
=
new
QMenu
(
this
);
aClearChat
=
chatSettingsMenu
->
addAction
(
QString
());
aClearChat
=
chatSettingsMenu
->
addAction
(
QString
());
aClearChat
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"tab_room/aClearChat"
,
QKeySequence
(
"F12"
)
));
aClearChat
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"tab_room/aClearChat"
));
connect
(
aClearChat
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actClearChat
()));
connect
(
aClearChat
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actClearChat
()));
chatSettingsMenu
->
addSeparator
();
chatSettingsMenu
->
addSeparator
();
...
@@ -416,4 +416,4 @@ void CustomLineEdit::updateCompleterModel(QStringList completionList)
...
@@ -416,4 +416,4 @@ void CustomLineEdit::updateCompleterModel(QStringList completionList)
model
=
new
QStringListModel
();
model
=
new
QStringListModel
();
QStringList
updatedList
=
completionList
;
QStringList
updatedList
=
completionList
;
model
->
setStringList
(
updatedList
);
model
->
setStringList
(
updatedList
);
}
}
\ No newline at end of file
cockatrice/src/window_main.cpp
View file @
d3d6f704
...
@@ -457,39 +457,39 @@ void MainWindow::retranslateUi()
...
@@ -457,39 +457,39 @@ void MainWindow::retranslateUi()
aConnect
->
setText
(
tr
(
"&Connect..."
));
aConnect
->
setText
(
tr
(
"&Connect..."
));
aConnect
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aConnect
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"MainWindow/aConnect"
,
QKeySequence
()
));
"MainWindow/aConnect"
));
aDisconnect
->
setText
(
tr
(
"&Disconnect"
));
aDisconnect
->
setText
(
tr
(
"&Disconnect"
));
aDisconnect
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aDisconnect
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"MainWindow/aDisconnect"
,
QKeySequence
()
));
"MainWindow/aDisconnect"
));
aSinglePlayer
->
setText
(
tr
(
"Start &local game..."
));
aSinglePlayer
->
setText
(
tr
(
"Start &local game..."
));
aSinglePlayer
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aSinglePlayer
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"MainWindow/aSinglePlayer"
,
QKeySequence
()
));
"MainWindow/aSinglePlayer"
));
aWatchReplay
->
setText
(
tr
(
"&Watch replay..."
));
aWatchReplay
->
setText
(
tr
(
"&Watch replay..."
));
aWatchReplay
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aWatchReplay
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"MainWindow/aWatchReplay"
,
QKeySequence
()
));
"MainWindow/aWatchReplay"
));
aDeckEditor
->
setText
(
tr
(
"&Deck editor"
));
aDeckEditor
->
setText
(
tr
(
"&Deck editor"
));
aDeckEditor
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aDeckEditor
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"MainWindow/aDeckEditor"
,
QKeySequence
()
));
"MainWindow/aDeckEditor"
));
aFullScreen
->
setText
(
tr
(
"&Full screen"
));
aFullScreen
->
setText
(
tr
(
"&Full screen"
));
aFullScreen
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aFullScreen
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"MainWindow/aFullScreen"
,
QKeySequence
(
"Ctrl+F"
)
));
"MainWindow/aFullScreen"
));
aRegister
->
setText
(
tr
(
"&Register to server..."
));
aRegister
->
setText
(
tr
(
"&Register to server..."
));
aRegister
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aRegister
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"MainWindow/aRegister"
,
QKeySequence
()
));
"MainWindow/aRegister"
));
aSettings
->
setText
(
tr
(
"&Settings..."
));
aSettings
->
setText
(
tr
(
"&Settings..."
));
aSettings
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aSettings
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"MainWindow/aSettings"
,
QKeySequence
()
));
"MainWindow/aSettings"
));
aExit
->
setText
(
tr
(
"&Exit"
));
aExit
->
setText
(
tr
(
"&Exit"
));
aExit
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aExit
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"MainWindow/aExit"
,
QKeySequence
()
));
"MainWindow/aExit"
));
#if defined(__APPLE__)
/* For OSX */
#if defined(__APPLE__)
/* For OSX */
cockatriceMenu
->
setTitle
(
tr
(
"A&ctions"
));
cockatriceMenu
->
setTitle
(
tr
(
"A&ctions"
));
...
@@ -502,8 +502,7 @@ void MainWindow::retranslateUi()
...
@@ -502,8 +502,7 @@ void MainWindow::retranslateUi()
aCheckCardUpdates
->
setText
(
tr
(
"Check for card updates..."
));
aCheckCardUpdates
->
setText
(
tr
(
"Check for card updates..."
));
aCheckCardUpdates
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
aCheckCardUpdates
->
setShortcuts
(
settingsCache
->
shortcuts
().
getShortcut
(
"MainWindow/aCheckCardUpdates"
,
"MainWindow/aCheckCardUpdates"
));
QKeySequence
()));
tabSupervisor
->
retranslateUi
();
tabSupervisor
->
retranslateUi
();
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment