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
1562c234
Commit
1562c234
authored
Feb 20, 2015
by
Gavin Bises
Browse files
Add spec notification toggle to UI settings.
parent
11bd2444
Changes
2
Hide whitespace changes
Inline
Side-by-side
cockatrice/src/dlg_settings.cpp
View file @
1562c234
...
@@ -446,6 +446,10 @@ UserInterfaceSettingsPage::UserInterfaceSettingsPage()
...
@@ -446,6 +446,10 @@ UserInterfaceSettingsPage::UserInterfaceSettingsPage()
notificationsEnabledCheckBox
.
setChecked
(
settingsCache
->
getNotificationsEnabled
());
notificationsEnabledCheckBox
.
setChecked
(
settingsCache
->
getNotificationsEnabled
());
connect
(
&
notificationsEnabledCheckBox
,
SIGNAL
(
stateChanged
(
int
)),
settingsCache
,
SLOT
(
setNotificationsEnabled
(
int
)));
connect
(
&
notificationsEnabledCheckBox
,
SIGNAL
(
stateChanged
(
int
)),
settingsCache
,
SLOT
(
setNotificationsEnabled
(
int
)));
connect
(
&
notificationsEnabledCheckBox
,
SIGNAL
(
stateChanged
(
int
)),
this
,
SLOT
(
setSpecNotificationEnabled
(
int
)));
specNotificationsEnabledCheckBox
.
setChecked
(
settingsCache
->
getSpectatorNotificationsEnabled
());
connect
(
&
specNotificationsEnabledCheckBox
,
SIGNAL
(
stateChanged
(
int
)),
settingsCache
,
SLOT
(
setSpectatorNotificationsEnabled
(
int
)));
doubleClickToPlayCheckBox
.
setChecked
(
settingsCache
->
getDoubleClickToPlay
());
doubleClickToPlayCheckBox
.
setChecked
(
settingsCache
->
getDoubleClickToPlay
());
connect
(
&
doubleClickToPlayCheckBox
,
SIGNAL
(
stateChanged
(
int
)),
settingsCache
,
SLOT
(
setDoubleClickToPlay
(
int
)));
connect
(
&
doubleClickToPlayCheckBox
,
SIGNAL
(
stateChanged
(
int
)),
settingsCache
,
SLOT
(
setDoubleClickToPlay
(
int
)));
...
@@ -455,8 +459,9 @@ UserInterfaceSettingsPage::UserInterfaceSettingsPage()
...
@@ -455,8 +459,9 @@ UserInterfaceSettingsPage::UserInterfaceSettingsPage()
QGridLayout
*
generalGrid
=
new
QGridLayout
;
QGridLayout
*
generalGrid
=
new
QGridLayout
;
generalGrid
->
addWidget
(
&
notificationsEnabledCheckBox
,
0
,
0
);
generalGrid
->
addWidget
(
&
notificationsEnabledCheckBox
,
0
,
0
);
generalGrid
->
addWidget
(
&
doubleClickToPlayCheckBox
,
1
,
0
);
generalGrid
->
addWidget
(
&
specNotificationsEnabledCheckBox
,
1
,
0
);
generalGrid
->
addWidget
(
&
playToStackCheckBox
,
2
,
0
);
generalGrid
->
addWidget
(
&
doubleClickToPlayCheckBox
,
2
,
0
);
generalGrid
->
addWidget
(
&
playToStackCheckBox
,
3
,
0
);
generalGroupBox
=
new
QGroupBox
;
generalGroupBox
=
new
QGroupBox
;
generalGroupBox
->
setLayout
(
generalGrid
);
generalGroupBox
->
setLayout
(
generalGrid
);
...
@@ -500,10 +505,15 @@ UserInterfaceSettingsPage::UserInterfaceSettingsPage()
...
@@ -500,10 +505,15 @@ UserInterfaceSettingsPage::UserInterfaceSettingsPage()
setLayout
(
mainLayout
);
setLayout
(
mainLayout
);
}
}
void
UserInterfaceSettingsPage
::
setSpecNotificationEnabled
(
int
i
)
{
specNotificationsEnabledCheckBox
.
setEnabled
(
i
!=
0
);
}
void
UserInterfaceSettingsPage
::
retranslateUi
()
void
UserInterfaceSettingsPage
::
retranslateUi
()
{
{
generalGroupBox
->
setTitle
(
tr
(
"General interface settings"
));
generalGroupBox
->
setTitle
(
tr
(
"General interface settings"
));
notificationsEnabledCheckBox
.
setText
(
tr
(
"Enable notifications in taskbar"
));
notificationsEnabledCheckBox
.
setText
(
tr
(
"Enable notifications in taskbar"
));
specNotificationsEnabledCheckBox
.
setText
(
tr
(
"Notify in the taskbar for game events while you are spectating"
));
doubleClickToPlayCheckBox
.
setText
(
tr
(
"&Double-click cards to play them (instead of single-click)"
));
doubleClickToPlayCheckBox
.
setText
(
tr
(
"&Double-click cards to play them (instead of single-click)"
));
playToStackCheckBox
.
setText
(
tr
(
"&Play all nonlands onto the stack (not the battlefield) by default"
));
playToStackCheckBox
.
setText
(
tr
(
"&Play all nonlands onto the stack (not the battlefield) by default"
));
animationGroupBox
->
setTitle
(
tr
(
"Animation settings"
));
animationGroupBox
->
setTitle
(
tr
(
"Animation settings"
));
...
...
cockatrice/src/dlg_settings.h
View file @
1562c234
...
@@ -115,10 +115,12 @@ class UserInterfaceSettingsPage : public AbstractSettingsPage {
...
@@ -115,10 +115,12 @@ class UserInterfaceSettingsPage : public AbstractSettingsPage {
private
slots
:
private
slots
:
void
soundPathClearButtonClicked
();
void
soundPathClearButtonClicked
();
void
soundPathButtonClicked
();
void
soundPathButtonClicked
();
void
setSpecNotificationEnabled
(
int
);
signals:
signals:
void
soundPathChanged
();
void
soundPathChanged
();
private:
private:
QCheckBox
notificationsEnabledCheckBox
;
QCheckBox
notificationsEnabledCheckBox
;
QCheckBox
specNotificationsEnabledCheckBox
;
QCheckBox
doubleClickToPlayCheckBox
;
QCheckBox
doubleClickToPlayCheckBox
;
QCheckBox
playToStackCheckBox
;
QCheckBox
playToStackCheckBox
;
QCheckBox
tapAnimationCheckBox
;
QCheckBox
tapAnimationCheckBox
;
...
...
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