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
b7e97103
Commit
b7e97103
authored
Nov 03, 2010
by
Max-Wilhelm Bruker
Browse files
added zone bg setting for stack
parent
82bc4274
Changes
2
Hide whitespace changes
Inline
Side-by-side
cockatrice/src/dlg_settings.cpp
View file @
b7e97103
...
...
@@ -161,6 +161,14 @@ AppearanceSettingsPage::AppearanceSettingsPage()
QPushButton
*
handBgButton
=
new
QPushButton
(
"..."
);
connect
(
handBgButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
handBgButtonClicked
()));
stackBgLabel
=
new
QLabel
;
stackBgEdit
=
new
QLineEdit
(
settingsCache
->
getStackBgPath
());
stackBgEdit
->
setReadOnly
(
true
);
QPushButton
*
stackBgClearButton
=
new
QPushButton
(
deleteIcon
,
QString
());
connect
(
stackBgClearButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
stackBgClearButtonClicked
()));
QPushButton
*
stackBgButton
=
new
QPushButton
(
"..."
);
connect
(
stackBgButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
stackBgButtonClicked
()));
tableBgLabel
=
new
QLabel
;
tableBgEdit
=
new
QLineEdit
(
settingsCache
->
getTableBgPath
());
tableBgEdit
->
setReadOnly
(
true
);
...
...
@@ -190,18 +198,22 @@ AppearanceSettingsPage::AppearanceSettingsPage()
zoneBgGrid
->
addWidget
(
handBgEdit
,
0
,
1
);
zoneBgGrid
->
addWidget
(
handBgClearButton
,
0
,
2
);
zoneBgGrid
->
addWidget
(
handBgButton
,
0
,
3
);
zoneBgGrid
->
addWidget
(
tableBgLabel
,
1
,
0
);
zoneBgGrid
->
addWidget
(
tableBgEdit
,
1
,
1
);
zoneBgGrid
->
addWidget
(
tableBgClearButton
,
1
,
2
);
zoneBgGrid
->
addWidget
(
tableBgButton
,
1
,
3
);
zoneBgGrid
->
addWidget
(
playerAreaBgLabel
,
2
,
0
);
zoneBgGrid
->
addWidget
(
playerAreaBgEdit
,
2
,
1
);
zoneBgGrid
->
addWidget
(
playerAreaBgClearButton
,
2
,
2
);
zoneBgGrid
->
addWidget
(
playerAreaBgButton
,
2
,
3
);
zoneBgGrid
->
addWidget
(
cardBackPicturePathLabel
,
3
,
0
);
zoneBgGrid
->
addWidget
(
cardBackPicturePathEdit
,
3
,
1
);
zoneBgGrid
->
addWidget
(
cardBackPicturePathClearButton
,
3
,
2
);
zoneBgGrid
->
addWidget
(
cardBackPicturePathButton
,
3
,
3
);
zoneBgGrid
->
addWidget
(
stackBgLabel
,
1
,
0
);
zoneBgGrid
->
addWidget
(
stackBgEdit
,
1
,
1
);
zoneBgGrid
->
addWidget
(
stackBgClearButton
,
1
,
2
);
zoneBgGrid
->
addWidget
(
stackBgButton
,
1
,
3
);
zoneBgGrid
->
addWidget
(
tableBgLabel
,
2
,
0
);
zoneBgGrid
->
addWidget
(
tableBgEdit
,
2
,
1
);
zoneBgGrid
->
addWidget
(
tableBgClearButton
,
2
,
2
);
zoneBgGrid
->
addWidget
(
tableBgButton
,
2
,
3
);
zoneBgGrid
->
addWidget
(
playerAreaBgLabel
,
3
,
0
);
zoneBgGrid
->
addWidget
(
playerAreaBgEdit
,
3
,
1
);
zoneBgGrid
->
addWidget
(
playerAreaBgClearButton
,
3
,
2
);
zoneBgGrid
->
addWidget
(
playerAreaBgButton
,
3
,
3
);
zoneBgGrid
->
addWidget
(
cardBackPicturePathLabel
,
4
,
0
);
zoneBgGrid
->
addWidget
(
cardBackPicturePathEdit
,
4
,
1
);
zoneBgGrid
->
addWidget
(
cardBackPicturePathClearButton
,
4
,
2
);
zoneBgGrid
->
addWidget
(
cardBackPicturePathButton
,
4
,
3
);
zoneBgGroupBox
=
new
QGroupBox
;
zoneBgGroupBox
->
setLayout
(
zoneBgGrid
);
...
...
@@ -258,6 +270,7 @@ void AppearanceSettingsPage::retranslateUi()
{
zoneBgGroupBox
->
setTitle
(
tr
(
"Zone background pictures"
));
handBgLabel
->
setText
(
tr
(
"Path to hand background:"
));
stackBgLabel
->
setText
(
tr
(
"Path to stack background:"
));
tableBgLabel
->
setText
(
tr
(
"Path to table background:"
));
playerAreaBgLabel
->
setText
(
tr
(
"Path to player info background:"
));
cardBackPicturePathLabel
->
setText
(
tr
(
"Path to picture of card back:"
));
...
...
@@ -290,6 +303,22 @@ void AppearanceSettingsPage::handBgButtonClicked()
settingsCache
->
setHandBgPath
(
path
);
}
void
AppearanceSettingsPage
::
stackBgClearButtonClicked
()
{
stackBgEdit
->
setText
(
QString
());
settingsCache
->
setStackBgPath
(
QString
());
}
void
AppearanceSettingsPage
::
stackBgButtonClicked
()
{
QString
path
=
QFileDialog
::
getOpenFileName
(
this
,
tr
(
"Choose path"
));
if
(
path
.
isEmpty
())
return
;
stackBgEdit
->
setText
(
path
);
settingsCache
->
setStackBgPath
(
path
);
}
void
AppearanceSettingsPage
::
tableBgClearButtonClicked
()
{
tableBgEdit
->
setText
(
QString
());
...
...
cockatrice/src/dlg_settings.h
View file @
b7e97103
...
...
@@ -50,6 +50,8 @@ class AppearanceSettingsPage : public AbstractSettingsPage {
private
slots
:
void
handBgClearButtonClicked
();
void
handBgButtonClicked
();
void
stackBgClearButtonClicked
();
void
stackBgButtonClicked
();
void
tableBgClearButtonClicked
();
void
tableBgButtonClicked
();
void
playerAreaBgClearButtonClicked
();
...
...
@@ -58,12 +60,13 @@ private slots:
void
cardBackPicturePathButtonClicked
();
signals:
void
handBgChanged
(
const
QString
&
path
);
void
stackBgChanged
(
const
QString
&
path
);
void
tableBgChanged
(
const
QString
&
path
);
void
playerAreaBgChanged
(
const
QString
&
path
);
void
cardBackPicturePathChanged
(
const
QString
&
path
);
private:
QLabel
*
handBgLabel
,
*
tableBgLabel
,
*
playerAreaBgLabel
,
*
cardBackPicturePathLabel
;
QLineEdit
*
handBgEdit
,
*
tableBgEdit
,
*
playerAreaBgEdit
,
*
cardBackPicturePathEdit
;
QLabel
*
handBgLabel
,
*
stackBgLabel
,
*
tableBgLabel
,
*
playerAreaBgLabel
,
*
cardBackPicturePathLabel
;
QLineEdit
*
handBgEdit
,
*
stackBgEdit
,
*
tableBgEdit
,
*
playerAreaBgEdit
,
*
cardBackPicturePathEdit
;
QCheckBox
*
horizontalHandCheckBox
,
*
economicalGridCheckBox
,
*
invertVerticalCoordinateCheckBox
,
*
zoneViewSortByNameCheckBox
,
*
zoneViewSortByTypeCheckBox
;
QGroupBox
*
zoneBgGroupBox
,
*
handGroupBox
,
*
tableGroupBox
,
*
zoneViewGroupBox
;
public:
...
...
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