fixed bug #35
This commit is contained in:
parent
5486843605
commit
ee0a010add
5 changed files with 421 additions and 16 deletions
|
@ -1,6 +1,7 @@
|
||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="/" >
|
<qresource prefix="/" >
|
||||||
<file alias="back.svg" >resources/back.svg</file>
|
<file alias="back.svg" >resources/back.svg</file>
|
||||||
|
<file>resources/icon_delete.svg</file>
|
||||||
<file>resources/icon_tab_changed.svg</file>
|
<file>resources/icon_tab_changed.svg</file>
|
||||||
<file>resources/icon_config_general.svg</file>
|
<file>resources/icon_config_general.svg</file>
|
||||||
<file>resources/icon_config_appearance.svg</file>
|
<file>resources/icon_config_appearance.svg</file>
|
||||||
|
|
357
cockatrice/resources/icon_delete.svg
Normal file
357
cockatrice/resources/icon_delete.svg
Normal file
|
@ -0,0 +1,357 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="64"
|
||||||
|
height="64"
|
||||||
|
id="svg2646"
|
||||||
|
sodipodi:version="0.32"
|
||||||
|
inkscape:version="0.47pre4 r22446"
|
||||||
|
version="1.0"
|
||||||
|
sodipodi:docname="remove_row.svg"
|
||||||
|
inkscape:output_extension="org.inkscape.output.svg.inkscape">
|
||||||
|
<defs
|
||||||
|
id="defs2648">
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient3169">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#0000ff;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop3171" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#000067;stop-opacity:1;"
|
||||||
|
offset="1"
|
||||||
|
id="stop3173" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient4766">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#784421;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop4768" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#3d2210;stop-opacity:0;"
|
||||||
|
offset="1"
|
||||||
|
id="stop4770" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient4758">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#a05a2c;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop4760" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#3d2210;stop-opacity:1;"
|
||||||
|
offset="1"
|
||||||
|
id="stop4762" />
|
||||||
|
</linearGradient>
|
||||||
|
<inkscape:perspective
|
||||||
|
sodipodi:type="inkscape:persp3d"
|
||||||
|
inkscape:vp_x="0 : 526.18109 : 1"
|
||||||
|
inkscape:vp_y="0 : 1000 : 0"
|
||||||
|
inkscape:vp_z="744.09448 : 526.18109 : 1"
|
||||||
|
inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
|
||||||
|
id="perspective2654" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient4758"
|
||||||
|
id="linearGradient3508"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(0.9650128,0,0,0.9948433,-449.70565,-312.80927)"
|
||||||
|
x1="590.62201"
|
||||||
|
y1="434.7522"
|
||||||
|
x2="698.54004"
|
||||||
|
y2="517.79218" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient4766"
|
||||||
|
id="linearGradient3510"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(0.9650128,0,0,0.9948433,-449.70565,-312.80927)"
|
||||||
|
x1="661.24402"
|
||||||
|
y1="602.90814"
|
||||||
|
x2="431.5"
|
||||||
|
y2="201.5482" />
|
||||||
|
<radialGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3169"
|
||||||
|
id="radialGradient3512"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(1,0,0,0.2116376,0,44.257186)"
|
||||||
|
cx="120.07376"
|
||||||
|
cy="56.138123"
|
||||||
|
fx="120.07376"
|
||||||
|
fy="56.138123"
|
||||||
|
r="82.790039" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient4758"
|
||||||
|
id="linearGradient3514"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(0.9650128,0,0,0.9948433,-449.70565,-312.80927)"
|
||||||
|
x1="590.62201"
|
||||||
|
y1="434.7522"
|
||||||
|
x2="698.54004"
|
||||||
|
y2="517.79218" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient4766"
|
||||||
|
id="linearGradient3516"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(0.9650128,0,0,0.9948433,-449.70565,-312.80927)"
|
||||||
|
x1="661.24402"
|
||||||
|
y1="602.90814"
|
||||||
|
x2="431.5"
|
||||||
|
y2="201.5482" />
|
||||||
|
<radialGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3169"
|
||||||
|
id="radialGradient3518"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(1,0,0,0.2116376,0,44.257186)"
|
||||||
|
cx="120.07376"
|
||||||
|
cy="56.138123"
|
||||||
|
fx="120.07376"
|
||||||
|
fy="56.138123"
|
||||||
|
r="82.790039" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient4758"
|
||||||
|
id="linearGradient3520"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(0.9650128,0,0,0.9948433,-449.70565,-312.80927)"
|
||||||
|
x1="590.62201"
|
||||||
|
y1="434.7522"
|
||||||
|
x2="698.54004"
|
||||||
|
y2="517.79218" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient4766"
|
||||||
|
id="linearGradient3522"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(0.9650128,0,0,0.9948433,-449.70565,-312.80927)"
|
||||||
|
x1="661.24402"
|
||||||
|
y1="602.90814"
|
||||||
|
x2="431.5"
|
||||||
|
y2="201.5482" />
|
||||||
|
<radialGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3169"
|
||||||
|
id="radialGradient3524"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(1,0,0,0.2116376,0,44.257186)"
|
||||||
|
cx="120.07376"
|
||||||
|
cy="56.138123"
|
||||||
|
fx="120.07376"
|
||||||
|
fy="56.138123"
|
||||||
|
r="82.790039" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient4758"
|
||||||
|
id="linearGradient2442"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(0.9650128,0,0,0.9948433,-449.70565,-312.80927)"
|
||||||
|
x1="590.62201"
|
||||||
|
y1="434.7522"
|
||||||
|
x2="698.54004"
|
||||||
|
y2="517.79218" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient4766"
|
||||||
|
id="linearGradient2444"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(0.9650128,0,0,0.9948433,-449.70565,-312.80927)"
|
||||||
|
x1="661.24402"
|
||||||
|
y1="602.90814"
|
||||||
|
x2="431.5"
|
||||||
|
y2="201.5482" />
|
||||||
|
<radialGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3169"
|
||||||
|
id="radialGradient2446"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(1,0,0,0.2116376,0,44.257186)"
|
||||||
|
cx="120.07376"
|
||||||
|
cy="56.138123"
|
||||||
|
fx="120.07376"
|
||||||
|
fy="56.138123"
|
||||||
|
r="82.790039" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient4758"
|
||||||
|
id="linearGradient2470"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(0.9650128,0,0,0.9948433,-449.70565,-312.80927)"
|
||||||
|
x1="590.62201"
|
||||||
|
y1="434.7522"
|
||||||
|
x2="698.54004"
|
||||||
|
y2="517.79218" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient4766"
|
||||||
|
id="linearGradient2472"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(0.9650128,0,0,0.9948433,-449.70565,-312.80927)"
|
||||||
|
x1="661.24402"
|
||||||
|
y1="602.90814"
|
||||||
|
x2="431.5"
|
||||||
|
y2="201.5482" />
|
||||||
|
<radialGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3169"
|
||||||
|
id="radialGradient2474"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(1,0,0,0.2116376,0,44.257186)"
|
||||||
|
cx="120.07376"
|
||||||
|
cy="56.138123"
|
||||||
|
fx="120.07376"
|
||||||
|
fy="56.138123"
|
||||||
|
r="82.790039" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient4758"
|
||||||
|
id="linearGradient2476"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(0.9650128,0,0,0.9948433,-449.70565,-312.80927)"
|
||||||
|
x1="590.62201"
|
||||||
|
y1="434.7522"
|
||||||
|
x2="698.54004"
|
||||||
|
y2="517.79218" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient4766"
|
||||||
|
id="linearGradient2478"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(0.9650128,0,0,0.9948433,-449.70565,-312.80927)"
|
||||||
|
x1="661.24402"
|
||||||
|
y1="602.90814"
|
||||||
|
x2="431.5"
|
||||||
|
y2="201.5482" />
|
||||||
|
<radialGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3169"
|
||||||
|
id="radialGradient2480"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(1,0,0,0.2116376,0,44.257186)"
|
||||||
|
cx="120.07376"
|
||||||
|
cy="56.138123"
|
||||||
|
fx="120.07376"
|
||||||
|
fy="56.138123"
|
||||||
|
r="82.790039" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient4758"
|
||||||
|
id="linearGradient2482"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(0.9650128,0,0,0.9948433,-449.70565,-312.80927)"
|
||||||
|
x1="590.62201"
|
||||||
|
y1="434.7522"
|
||||||
|
x2="698.54004"
|
||||||
|
y2="517.79218" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient4766"
|
||||||
|
id="linearGradient2484"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(0.9650128,0,0,0.9948433,-449.70565,-312.80927)"
|
||||||
|
x1="661.24402"
|
||||||
|
y1="602.90814"
|
||||||
|
x2="431.5"
|
||||||
|
y2="201.5482" />
|
||||||
|
<radialGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3169"
|
||||||
|
id="radialGradient2486"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(1,0,0,0.2116376,0,44.257186)"
|
||||||
|
cx="120.07376"
|
||||||
|
cy="56.138123"
|
||||||
|
fx="120.07376"
|
||||||
|
fy="56.138123"
|
||||||
|
r="82.790039" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient4758"
|
||||||
|
id="linearGradient2488"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(0.9650128,0,0,0.9948433,-449.70565,-312.80927)"
|
||||||
|
x1="590.62201"
|
||||||
|
y1="434.7522"
|
||||||
|
x2="698.54004"
|
||||||
|
y2="517.79218" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient4766"
|
||||||
|
id="linearGradient2490"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(0.9650128,0,0,0.9948433,-449.70565,-312.80927)"
|
||||||
|
x1="661.24402"
|
||||||
|
y1="602.90814"
|
||||||
|
x2="431.5"
|
||||||
|
y2="201.5482" />
|
||||||
|
<radialGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3169"
|
||||||
|
id="radialGradient2492"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(1,0,0,0.2116376,0,44.257186)"
|
||||||
|
cx="120.07376"
|
||||||
|
cy="56.138123"
|
||||||
|
fx="120.07376"
|
||||||
|
fy="56.138123"
|
||||||
|
r="82.790039" />
|
||||||
|
</defs>
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="7.625"
|
||||||
|
inkscape:cx="12.656427"
|
||||||
|
inkscape:cy="31.784541"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:current-layer="layer2"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:window-width="1280"
|
||||||
|
inkscape:window-height="725"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="25"
|
||||||
|
inkscape:window-maximized="1" />
|
||||||
|
<metadata
|
||||||
|
id="metadata2651">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title></dc:title>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:label="Ebene 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
style="display:inline" />
|
||||||
|
<g
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer2"
|
||||||
|
inkscape:label="Pfeil"
|
||||||
|
style="display:inline">
|
||||||
|
<path
|
||||||
|
style="fill:#ff0000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:3;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
|
||||||
|
d="M 6.433227,14.50946 L 23.923767,32 L 6.433227,49.490541 L 14.50946,57.566773 L 32,40.076233 L 49.490541,57.566773 L 57.566773,49.490541 L 40.076233,32 L 57.566773,14.50946 L 49.490541,6.433227 L 32,23.923767 L 14.50946,6.433227 L 6.433227,14.50946 z"
|
||||||
|
id="rect3548" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 11 KiB |
|
@ -454,7 +454,7 @@ bool CardDatabase::loadFromFile(const QString &fileName)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
qDebug(QString("%1 cards in %2 sets loaded").arg(cardHash.size()).arg(setHash.size()).toLatin1());
|
qDebug(QString("%1 cards in %2 sets loaded").arg(cardHash.size()).arg(setHash.size()).toLatin1());
|
||||||
return true;
|
return !cardHash.isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CardDatabase::saveToFile(const QString &fileName)
|
bool CardDatabase::saveToFile(const QString &fileName)
|
||||||
|
|
|
@ -151,43 +151,57 @@ void GeneralSettingsPage::retranslateUi()
|
||||||
|
|
||||||
AppearanceSettingsPage::AppearanceSettingsPage()
|
AppearanceSettingsPage::AppearanceSettingsPage()
|
||||||
{
|
{
|
||||||
|
QIcon deleteIcon(":/resources/icon_delete.svg");
|
||||||
|
|
||||||
handBgLabel = new QLabel;
|
handBgLabel = new QLabel;
|
||||||
handBgEdit = new QLineEdit(settingsCache->getHandBgPath());
|
handBgEdit = new QLineEdit(settingsCache->getHandBgPath());
|
||||||
handBgEdit->setReadOnly(true);
|
handBgEdit->setReadOnly(true);
|
||||||
|
QPushButton *handBgClearButton = new QPushButton(deleteIcon, QString());
|
||||||
|
connect(handBgClearButton, SIGNAL(clicked()), this, SLOT(handBgClearButtonClicked()));
|
||||||
QPushButton *handBgButton = new QPushButton("...");
|
QPushButton *handBgButton = new QPushButton("...");
|
||||||
connect(handBgButton, SIGNAL(clicked()), this, SLOT(handBgButtonClicked()));
|
connect(handBgButton, SIGNAL(clicked()), this, SLOT(handBgButtonClicked()));
|
||||||
|
|
||||||
tableBgLabel = new QLabel;
|
tableBgLabel = new QLabel;
|
||||||
tableBgEdit = new QLineEdit(settingsCache->getTableBgPath());
|
tableBgEdit = new QLineEdit(settingsCache->getTableBgPath());
|
||||||
tableBgEdit->setReadOnly(true);
|
tableBgEdit->setReadOnly(true);
|
||||||
|
QPushButton *tableBgClearButton = new QPushButton(deleteIcon, QString());
|
||||||
|
connect(tableBgClearButton, SIGNAL(clicked()), this, SLOT(tableBgClearButtonClicked()));
|
||||||
QPushButton *tableBgButton = new QPushButton("...");
|
QPushButton *tableBgButton = new QPushButton("...");
|
||||||
connect(tableBgButton, SIGNAL(clicked()), this, SLOT(tableBgButtonClicked()));
|
connect(tableBgButton, SIGNAL(clicked()), this, SLOT(tableBgButtonClicked()));
|
||||||
|
|
||||||
playerAreaBgLabel = new QLabel;
|
playerAreaBgLabel = new QLabel;
|
||||||
playerAreaBgEdit = new QLineEdit(settingsCache->getPlayerBgPath());
|
playerAreaBgEdit = new QLineEdit(settingsCache->getPlayerBgPath());
|
||||||
playerAreaBgEdit->setReadOnly(true);
|
playerAreaBgEdit->setReadOnly(true);
|
||||||
|
QPushButton *playerAreaBgClearButton = new QPushButton(deleteIcon, QString());
|
||||||
|
connect(playerAreaBgClearButton, SIGNAL(clicked()), this, SLOT(playerAreaBgClearButtonClicked()));
|
||||||
QPushButton *playerAreaBgButton = new QPushButton("...");
|
QPushButton *playerAreaBgButton = new QPushButton("...");
|
||||||
connect(playerAreaBgButton, SIGNAL(clicked()), this, SLOT(playerAreaBgButtonClicked()));
|
connect(playerAreaBgButton, SIGNAL(clicked()), this, SLOT(playerAreaBgButtonClicked()));
|
||||||
|
|
||||||
cardBackPicturePathLabel = new QLabel;
|
cardBackPicturePathLabel = new QLabel;
|
||||||
cardBackPicturePathEdit = new QLineEdit(settingsCache->getCardBackPicturePath());
|
cardBackPicturePathEdit = new QLineEdit(settingsCache->getCardBackPicturePath());
|
||||||
cardBackPicturePathEdit->setReadOnly(true);
|
cardBackPicturePathEdit->setReadOnly(true);
|
||||||
|
QPushButton *cardBackPicturePathClearButton = new QPushButton(deleteIcon, QString());
|
||||||
|
connect(cardBackPicturePathClearButton, SIGNAL(clicked()), this, SLOT(cardBackPicturePathClearButtonClicked()));
|
||||||
QPushButton *cardBackPicturePathButton = new QPushButton("...");
|
QPushButton *cardBackPicturePathButton = new QPushButton("...");
|
||||||
connect(cardBackPicturePathButton, SIGNAL(clicked()), this, SLOT(cardBackPicturePathButtonClicked()));
|
connect(cardBackPicturePathButton, SIGNAL(clicked()), this, SLOT(cardBackPicturePathButtonClicked()));
|
||||||
|
|
||||||
QGridLayout *zoneBgGrid = new QGridLayout;
|
QGridLayout *zoneBgGrid = new QGridLayout;
|
||||||
zoneBgGrid->addWidget(handBgLabel, 0, 0);
|
zoneBgGrid->addWidget(handBgLabel, 0, 0);
|
||||||
zoneBgGrid->addWidget(handBgEdit, 0, 1);
|
zoneBgGrid->addWidget(handBgEdit, 0, 1);
|
||||||
zoneBgGrid->addWidget(handBgButton, 0, 2);
|
zoneBgGrid->addWidget(handBgClearButton, 0, 2);
|
||||||
|
zoneBgGrid->addWidget(handBgButton, 0, 3);
|
||||||
zoneBgGrid->addWidget(tableBgLabel, 1, 0);
|
zoneBgGrid->addWidget(tableBgLabel, 1, 0);
|
||||||
zoneBgGrid->addWidget(tableBgEdit, 1, 1);
|
zoneBgGrid->addWidget(tableBgEdit, 1, 1);
|
||||||
zoneBgGrid->addWidget(tableBgButton, 1, 2);
|
zoneBgGrid->addWidget(tableBgClearButton, 1, 2);
|
||||||
|
zoneBgGrid->addWidget(tableBgButton, 1, 3);
|
||||||
zoneBgGrid->addWidget(playerAreaBgLabel, 2, 0);
|
zoneBgGrid->addWidget(playerAreaBgLabel, 2, 0);
|
||||||
zoneBgGrid->addWidget(playerAreaBgEdit, 2, 1);
|
zoneBgGrid->addWidget(playerAreaBgEdit, 2, 1);
|
||||||
zoneBgGrid->addWidget(playerAreaBgButton, 2, 2);
|
zoneBgGrid->addWidget(playerAreaBgClearButton, 2, 2);
|
||||||
|
zoneBgGrid->addWidget(playerAreaBgButton, 2, 3);
|
||||||
zoneBgGrid->addWidget(cardBackPicturePathLabel, 3, 0);
|
zoneBgGrid->addWidget(cardBackPicturePathLabel, 3, 0);
|
||||||
zoneBgGrid->addWidget(cardBackPicturePathEdit, 3, 1);
|
zoneBgGrid->addWidget(cardBackPicturePathEdit, 3, 1);
|
||||||
zoneBgGrid->addWidget(cardBackPicturePathButton, 3, 2);
|
zoneBgGrid->addWidget(cardBackPicturePathClearButton, 3, 2);
|
||||||
|
zoneBgGrid->addWidget(cardBackPicturePathButton, 3, 3);
|
||||||
|
|
||||||
zoneBgGroupBox = new QGroupBox;
|
zoneBgGroupBox = new QGroupBox;
|
||||||
zoneBgGroupBox->setLayout(zoneBgGrid);
|
zoneBgGroupBox->setLayout(zoneBgGrid);
|
||||||
|
@ -255,6 +269,12 @@ void AppearanceSettingsPage::retranslateUi()
|
||||||
zoneViewSortByTypeCheckBox->setText(tr("Sort by type"));
|
zoneViewSortByTypeCheckBox->setText(tr("Sort by type"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AppearanceSettingsPage::handBgClearButtonClicked()
|
||||||
|
{
|
||||||
|
handBgEdit->setText(QString());
|
||||||
|
settingsCache->setHandBgPath(QString());
|
||||||
|
}
|
||||||
|
|
||||||
void AppearanceSettingsPage::handBgButtonClicked()
|
void AppearanceSettingsPage::handBgButtonClicked()
|
||||||
{
|
{
|
||||||
QString path = QFileDialog::getOpenFileName(this, tr("Choose path"));
|
QString path = QFileDialog::getOpenFileName(this, tr("Choose path"));
|
||||||
|
@ -265,6 +285,12 @@ void AppearanceSettingsPage::handBgButtonClicked()
|
||||||
settingsCache->setHandBgPath(path);
|
settingsCache->setHandBgPath(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AppearanceSettingsPage::tableBgClearButtonClicked()
|
||||||
|
{
|
||||||
|
tableBgEdit->setText(QString());
|
||||||
|
settingsCache->setTableBgPath(QString());
|
||||||
|
}
|
||||||
|
|
||||||
void AppearanceSettingsPage::tableBgButtonClicked()
|
void AppearanceSettingsPage::tableBgButtonClicked()
|
||||||
{
|
{
|
||||||
QString path = QFileDialog::getOpenFileName(this, tr("Choose path"));
|
QString path = QFileDialog::getOpenFileName(this, tr("Choose path"));
|
||||||
|
@ -275,6 +301,12 @@ void AppearanceSettingsPage::tableBgButtonClicked()
|
||||||
settingsCache->setTableBgPath(path);
|
settingsCache->setTableBgPath(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AppearanceSettingsPage::playerAreaBgClearButtonClicked()
|
||||||
|
{
|
||||||
|
playerAreaBgEdit->setText(QString());
|
||||||
|
settingsCache->setPlayerBgPath(QString());
|
||||||
|
}
|
||||||
|
|
||||||
void AppearanceSettingsPage::playerAreaBgButtonClicked()
|
void AppearanceSettingsPage::playerAreaBgButtonClicked()
|
||||||
{
|
{
|
||||||
QString path = QFileDialog::getOpenFileName(this, tr("Choose path"));
|
QString path = QFileDialog::getOpenFileName(this, tr("Choose path"));
|
||||||
|
@ -285,6 +317,12 @@ void AppearanceSettingsPage::playerAreaBgButtonClicked()
|
||||||
settingsCache->setPlayerBgPath(path);
|
settingsCache->setPlayerBgPath(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AppearanceSettingsPage::cardBackPicturePathClearButtonClicked()
|
||||||
|
{
|
||||||
|
cardBackPicturePathEdit->setText(QString());
|
||||||
|
settingsCache->setCardBackPicturePath(QString());
|
||||||
|
}
|
||||||
|
|
||||||
void AppearanceSettingsPage::cardBackPicturePathButtonClicked()
|
void AppearanceSettingsPage::cardBackPicturePathButtonClicked()
|
||||||
{
|
{
|
||||||
QString path = QFileDialog::getOpenFileName(this, tr("Choose path"));
|
QString path = QFileDialog::getOpenFileName(this, tr("Choose path"));
|
||||||
|
@ -485,17 +523,22 @@ void DlgSettings::changeEvent(QEvent *event)
|
||||||
|
|
||||||
void DlgSettings::closeEvent(QCloseEvent *event)
|
void DlgSettings::closeEvent(QCloseEvent *event)
|
||||||
{
|
{
|
||||||
if (!db->getLoadSuccess()) {
|
if (!db->getLoadSuccess())
|
||||||
QMessageBox::critical(this, tr("Error"), tr("Your card database is invalid. Please check if the path is set correctly."));
|
if (QMessageBox::critical(this, tr("Error"), tr("Your card database is invalid. Would you like to go back and set the correct path?"), QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {
|
||||||
event->ignore();
|
event->ignore();
|
||||||
} else if (!QDir(settingsCache->getDeckPath()).exists()) {
|
return;
|
||||||
QMessageBox::critical(this, tr("Error"), tr("The path to your deck directory is invalid."));
|
}
|
||||||
event->ignore();
|
if (!QDir(settingsCache->getDeckPath()).exists())
|
||||||
} else if (!QDir(settingsCache->getPicsPath()).exists()) {
|
if (QMessageBox::critical(this, tr("Error"), tr("The path to your deck directory is invalid. Would you like to go back and set the correct path?"), QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {
|
||||||
QMessageBox::critical(this, tr("Error"), tr("The path to your card pictures directory is invalid."));
|
event->ignore();
|
||||||
event->ignore();
|
return;
|
||||||
} else
|
}
|
||||||
event->accept();
|
if (!QDir(settingsCache->getPicsPath()).exists())
|
||||||
|
if (QMessageBox::critical(this, tr("Error"), tr("The path to your card pictures directory is invalid. Would you like to go back and set the correct path?"), QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {
|
||||||
|
event->ignore();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
event->accept();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DlgSettings::retranslateUi()
|
void DlgSettings::retranslateUi()
|
||||||
|
|
|
@ -48,9 +48,13 @@ private:
|
||||||
class AppearanceSettingsPage : public AbstractSettingsPage {
|
class AppearanceSettingsPage : public AbstractSettingsPage {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
private slots:
|
private slots:
|
||||||
|
void handBgClearButtonClicked();
|
||||||
void handBgButtonClicked();
|
void handBgButtonClicked();
|
||||||
|
void tableBgClearButtonClicked();
|
||||||
void tableBgButtonClicked();
|
void tableBgButtonClicked();
|
||||||
|
void playerAreaBgClearButtonClicked();
|
||||||
void playerAreaBgButtonClicked();
|
void playerAreaBgButtonClicked();
|
||||||
|
void cardBackPicturePathClearButtonClicked();
|
||||||
void cardBackPicturePathButtonClicked();
|
void cardBackPicturePathButtonClicked();
|
||||||
signals:
|
signals:
|
||||||
void handBgChanged(const QString &path);
|
void handBgChanged(const QString &path);
|
||||||
|
|
Loading…
Reference in a new issue