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
d59e1f13
Commit
d59e1f13
authored
Jan 17, 2015
by
Matt Lowe
Browse files
Refactored Chat Settings tab
- removed heap alloc
parent
d02d3ed5
Changes
2
Hide whitespace changes
Inline
Side-by-side
cockatrice/src/dlg_settings.cpp
View file @
d59e1f13
...
...
@@ -572,11 +572,10 @@ void DeckEditorSettingsPage::radioPriceTagSourceClicked(bool checked)
MessagesSettingsPage
::
MessagesSettingsPage
()
{
chatMentionCheckBox
=
new
QCheckBox
;
chatMentionCheckBox
->
setChecked
(
settingsCache
->
getChatMention
());
connect
(
chatMentionCheckBox
,
SIGNAL
(
stateChanged
(
int
)),
settingsCache
,
SLOT
(
setChatMention
(
int
)));
chatMentionCheckBox
.
setChecked
(
settingsCache
->
getChatMention
());
connect
(
&
chatMentionCheckBox
,
SIGNAL
(
stateChanged
(
int
)),
settingsCache
,
SLOT
(
setChatMention
(
int
)));
QGridLayout
*
chatGrid
=
new
QGridLayout
;
chatGrid
->
addWidget
(
chatMentionCheckBox
,
0
,
0
);
chatGrid
->
addWidget
(
&
chatMentionCheckBox
,
0
,
0
);
chatGroupBox
=
new
QGroupBox
;
chatGroupBox
->
setLayout
(
chatGrid
);
...
...
@@ -646,7 +645,7 @@ void MessagesSettingsPage::retranslateUi()
aAdd
->
setText
(
tr
(
"&Add"
));
aRemove
->
setText
(
tr
(
"&Remove"
));
chatGroupBox
->
setTitle
(
tr
(
"Chat settings"
));
chatMentionCheckBox
->
setText
(
tr
(
"Enable chat mentions ('@yourusername' in chat log will be highlighted)"
));
chatMentionCheckBox
.
setText
(
tr
(
"Enable chat mentions ('@yourusername' in chat log will be highlighted)"
));
messageShortcuts
->
setTitle
(
tr
(
"In-game message macros"
));
}
...
...
cockatrice/src/dlg_settings.h
View file @
d59e1f13
...
...
@@ -158,8 +158,9 @@ private slots:
void
actRemove
();
private:
QListWidget
*
messageList
;
QAction
*
aAdd
,
*
aRemove
;
QCheckBox
*
chatMentionCheckBox
;
QAction
*
aAdd
;
QAction
*
aRemove
;
QCheckBox
chatMentionCheckBox
;
QGroupBox
*
chatGroupBox
;
QGroupBox
*
messageShortcuts
;
...
...
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