[education/kgeography] /: Implemented blurred flag feature
Albert Astals Cid
null at kde.org
Tue Sep 13 21:47:33 BST 2022
Git commit be6af721029c8b28d1be33dca13354a6ab13b03d by Albert Astals Cid, on behalf of Vlad Rakhmanin.
Committed on 13/09/2022 at 20:47.
Pushed by aacid into branch 'master'.
Implemented blurred flag feature
**What does this merge request address?**
This merge request relates to the Bug 457725, which suggested a new feature whereby certain flags with text on them can be blurred out, to make the flag guessing games more challenging. The flag should only be blurred in the guessing games, and in normal "browsing" mode the flag should remain unblurred.
**How has the new functionality been implemented?**
The map parser has been amended to now look for an additional division property entitled "blurredflag", which should contain a blurred variant of the flag. A new method has been added to the "division" class entitled "getFlagForQuestion", which returns a blurred flag if one is available. This method is now used in the flag guessing games.
BUG: 457725
M +2 -0 data/brazil.kgm
M +2 -0 data/flags/brazil/CMakeLists.txt
A +- -- data/flags/brazil/blurred_br_PN.png
A +- -- data/flags/brazil/blurred_br_RJ.png
M +7 -0 data/flags/italy/CMakeLists.txt
A +- -- data/flags/italy/blurred_it-cal200.png
A +- -- data/flags/italy/blurred_it-emi200.png
A +- -- data/flags/italy/blurred_it-lat200.png
A +- -- data/flags/italy/blurred_it-mar200.png
A +- -- data/flags/italy/blurred_it-mol200.png
A +- -- data/flags/italy/blurred_it-pug200.png
A +- -- data/flags/italy/blurred_it-ven200.png
M +1 -0 data/flags/norway/CMakeLists.txt
A +- -- data/flags/norway/blurred_oslo.png
M +5 -1 data/flags/peru/CMakeLists.txt
A +- -- data/flags/peru/blurred_amazonas.png
A +- -- data/flags/peru/blurred_ancash.png
A +- -- data/flags/peru/blurred_san_martin.png
A +- -- data/flags/peru/blurred_tacna.png
M +18 -0 data/flags/portugal/CMakeLists.txt
A +- -- data/flags/portugal/blurred_aveiro.png
A +- -- data/flags/portugal/blurred_beja.png
A +- -- data/flags/portugal/blurred_braga.png
A +- -- data/flags/portugal/blurred_braganca.png
A +- -- data/flags/portugal/blurred_castelo_branco.png
A +- -- data/flags/portugal/blurred_coimbra.png
A +- -- data/flags/portugal/blurred_evora.png
A +- -- data/flags/portugal/blurred_faro.png
A +- -- data/flags/portugal/blurred_guarda.png
A +- -- data/flags/portugal/blurred_leiria.png
A +- -- data/flags/portugal/blurred_lisboa.png
A +- -- data/flags/portugal/blurred_portalegre.png
A +- -- data/flags/portugal/blurred_porto.png
A +- -- data/flags/portugal/blurred_santarem.png
A +- -- data/flags/portugal/blurred_setubal.png
A +- -- data/flags/portugal/blurred_viana_do_castelo.png
A +- -- data/flags/portugal/blurred_vila_real.png
A +- -- data/flags/portugal/blurred_viseu.png
M +2 -1 data/flags/ukraine/CMakeLists.txt
A +- -- data/flags/ukraine/blurred_Cherkasy.png
M +26 -0 data/flags/usa/CMakeLists.txt
A +- -- data/flags/usa/blurred_usa_arkansas.png
A +- -- data/flags/usa/blurred_usa_california.png
A +- -- data/flags/usa/blurred_usa_florida.png
A +- -- data/flags/usa/blurred_usa_idaho.png
A +- -- data/flags/usa/blurred_usa_illinois.png
A +- -- data/flags/usa/blurred_usa_iowa.png
A +- -- data/flags/usa/blurred_usa_kansas.png
A +- -- data/flags/usa/blurred_usa_kentucky.png
A +- -- data/flags/usa/blurred_usa_maine.png
A +- -- data/flags/usa/blurred_usa_minnesota.png
A +- -- data/flags/usa/blurred_usa_montana.png
A +- -- data/flags/usa/blurred_usa_nebraska.png
A +- -- data/flags/usa/blurred_usa_nevada.png
A +- -- data/flags/usa/blurred_usa_new_hampshire.png
A +- -- data/flags/usa/blurred_usa_north_carolina.png
A +- -- data/flags/usa/blurred_usa_north_dakota.png
A +- -- data/flags/usa/blurred_usa_oklahoma.png
A +- -- data/flags/usa/blurred_usa_oregon.png
A +- -- data/flags/usa/blurred_usa_south_dakota.png
A +- -- data/flags/usa/blurred_usa_utah.png
A +- -- data/flags/usa/blurred_usa_vermont.png
A +- -- data/flags/usa/blurred_usa_virginia.png
A +- -- data/flags/usa/blurred_usa_washington.png
A +- -- data/flags/usa/blurred_usa_west_virginia.png
A +- -- data/flags/usa/blurred_usa_wisconsin.png
A +- -- data/flags/usa/blurred_usa_wyoming.png
M +7 -0 data/italy.kgm
M +1 -0 data/norway.kgm
M +4 -0 data/peru.kgm
M +18 -0 data/portugal_districts.kgm
M +1 -1 data/ukraine.kgm
M +26 -0 data/usa.kgm
M +6 -0 doc/index.docbook
M +16 -0 src/division.cpp
M +4 -1 src/division.h
M +2 -1 src/divisionflagasker.cpp
M +2 -2 src/flagdivisionasker.cpp
M +10 -0 src/mapparser.cpp
https://invent.kde.org/education/kgeography/commit/be6af721029c8b28d1be33dca13354a6ab13b03d
diff --git a/data/brazil.kgm b/data/brazil.kgm
index 82d7c9f..0e93619 100644
--- a/data/brazil.kgm
+++ b/data/brazil.kgm
@@ -78,6 +78,7 @@
<division>
<name>Paraná</name>
<flag>brazil/br_PN.png</flag>
+ <blurredflag>brazil/blurred_br_PN.png</blurredflag>
<capital>Curitiba</capital>
<color>
<red>140</red>
@@ -218,6 +219,7 @@
<division>
<name>Rio de Janeiro State</name>
<flag>brazil/br_RJ.png</flag>
+ <blurredflag>brazil/blurred_br_RJ.png</blurredflag>
<capital>Rio de Janeiro</capital>
<color>
<red>201</red>
diff --git a/data/flags/brazil/CMakeLists.txt b/data/flags/brazil/CMakeLists.txt
index e210499..4d98503 100644
--- a/data/flags/brazil/CMakeLists.txt
+++ b/data/flags/brazil/CMakeLists.txt
@@ -9,6 +9,7 @@ install(FILES
br_MT.png
br_PI.png
br_RJ.png
+ blurred_br_RJ.png
br_RR.png
br_SE.png
br_AL.png
@@ -17,6 +18,7 @@ install(FILES
br_MG.png
br_PA.png
br_PN.png
+ blurred_br_PN.png
br_RN.png
br_RS.png
br_SP.png
diff --git a/data/flags/brazil/blurred_br_PN.png b/data/flags/brazil/blurred_br_PN.png
new file mode 100644
index 0000000..e051cce
Binary files /dev/null and b/data/flags/brazil/blurred_br_PN.png differ
diff --git a/data/flags/brazil/blurred_br_RJ.png b/data/flags/brazil/blurred_br_RJ.png
new file mode 100644
index 0000000..e7fec49
Binary files /dev/null and b/data/flags/brazil/blurred_br_RJ.png differ
diff --git a/data/flags/italy/CMakeLists.txt b/data/flags/italy/CMakeLists.txt
index 9f3aa26..c61a020 100644
--- a/data/flags/italy/CMakeLists.txt
+++ b/data/flags/italy/CMakeLists.txt
@@ -4,12 +4,15 @@
install(FILES
it-bas200.png
it-emi200.png
+ blurred_it-emi200.png
it-lig200.png
it-mol200.png
+ blurred_it-mol200.png
it-sar200.png
it-tus200.png
it-abr200.png
it-cal200.png
+ blurred_it-cal200.png
it-fri200.png
it-lom200.png
it-pie200.png
@@ -18,10 +21,14 @@ install(FILES
it-aos200.png
it-cam200.png
it-lat200.png
+ blurred_it-lat200.png
it-mar200.png
+ blurred_it-mar200.png
it-pug200.png
+ blurred_it-pug200.png
it-tre200.png
it-ven200.png
+ blurred_it-ven200.png
DESTINATION ${KDE_INSTALL_DATADIR}/kgeography/flags/italy)
diff --git a/data/flags/italy/blurred_it-cal200.png b/data/flags/italy/blurred_it-cal200.png
new file mode 100644
index 0000000..d389f5f
Binary files /dev/null and b/data/flags/italy/blurred_it-cal200.png differ
diff --git a/data/flags/italy/blurred_it-emi200.png b/data/flags/italy/blurred_it-emi200.png
new file mode 100644
index 0000000..04d5558
Binary files /dev/null and b/data/flags/italy/blurred_it-emi200.png differ
diff --git a/data/flags/italy/blurred_it-lat200.png b/data/flags/italy/blurred_it-lat200.png
new file mode 100644
index 0000000..a3c94ab
Binary files /dev/null and b/data/flags/italy/blurred_it-lat200.png differ
diff --git a/data/flags/italy/blurred_it-mar200.png b/data/flags/italy/blurred_it-mar200.png
new file mode 100644
index 0000000..136d5fb
Binary files /dev/null and b/data/flags/italy/blurred_it-mar200.png differ
diff --git a/data/flags/italy/blurred_it-mol200.png b/data/flags/italy/blurred_it-mol200.png
new file mode 100644
index 0000000..1b7a0fb
Binary files /dev/null and b/data/flags/italy/blurred_it-mol200.png differ
diff --git a/data/flags/italy/blurred_it-pug200.png b/data/flags/italy/blurred_it-pug200.png
new file mode 100644
index 0000000..ed58dad
Binary files /dev/null and b/data/flags/italy/blurred_it-pug200.png differ
diff --git a/data/flags/italy/blurred_it-ven200.png b/data/flags/italy/blurred_it-ven200.png
new file mode 100644
index 0000000..e04a09a
Binary files /dev/null and b/data/flags/italy/blurred_it-ven200.png differ
diff --git a/data/flags/norway/CMakeLists.txt b/data/flags/norway/CMakeLists.txt
index 9743b83..985d323 100644
--- a/data/flags/norway/CMakeLists.txt
+++ b/data/flags/norway/CMakeLists.txt
@@ -7,6 +7,7 @@ install(FILES
more_og_romsdal.png
nordland.png
oslo.png
+ blurred_oslo.png
rogaland.png
troms_og_finnmark.png
trondelag.png
diff --git a/data/flags/norway/blurred_oslo.png b/data/flags/norway/blurred_oslo.png
new file mode 100644
index 0000000..28447b0
Binary files /dev/null and b/data/flags/norway/blurred_oslo.png differ
diff --git a/data/flags/peru/CMakeLists.txt b/data/flags/peru/CMakeLists.txt
index 1f7a0f3..8c6ae1f 100644
--- a/data/flags/peru/CMakeLists.txt
+++ b/data/flags/peru/CMakeLists.txt
@@ -3,6 +3,7 @@
install(FILES
amazonas.png
+blurred_amazonas.png
arequipa.png
cusco.png
ica.png
@@ -10,7 +11,9 @@ lambayeque.png
madre_de_dios.png
piura.png
tacna.png
+blurred_tacna.png
ancash.png
+blurred_ancash.png
ayacucho.png
huancavelica.png
junin.png
@@ -24,6 +27,7 @@ huanuco.png
la_libertad.png
loreto.png
pasco.png
-san_martin.png
+san_martin.png
+blurred_san_martin.png
ucayali.png
DESTINATION ${KDE_INSTALL_DATADIR}/kgeography/flags/peru)
diff --git a/data/flags/peru/blurred_amazonas.png b/data/flags/peru/blurred_amazonas.png
new file mode 100644
index 0000000..5a489ec
Binary files /dev/null and b/data/flags/peru/blurred_amazonas.png differ
diff --git a/data/flags/peru/blurred_ancash.png b/data/flags/peru/blurred_ancash.png
new file mode 100644
index 0000000..d6b8946
Binary files /dev/null and b/data/flags/peru/blurred_ancash.png differ
diff --git a/data/flags/peru/blurred_san_martin.png b/data/flags/peru/blurred_san_martin.png
new file mode 100644
index 0000000..8439238
Binary files /dev/null and b/data/flags/peru/blurred_san_martin.png differ
diff --git a/data/flags/peru/blurred_tacna.png b/data/flags/peru/blurred_tacna.png
new file mode 100644
index 0000000..7371631
Binary files /dev/null and b/data/flags/peru/blurred_tacna.png differ
diff --git a/data/flags/portugal/CMakeLists.txt b/data/flags/portugal/CMakeLists.txt
index d2d520a..f4eacbd 100644
--- a/data/flags/portugal/CMakeLists.txt
+++ b/data/flags/portugal/CMakeLists.txt
@@ -1,25 +1,43 @@
install(FILES
aveiro.png
+ blurred_aveiro.png
beja.png
+ blurred_beja.png
braga.png
+ blurred_braga.png
evora.png
+ blurred_evora.png
guarda.png
+ blurred_guarda.png
lisboa.png
+ blurred_lisboa.png
portalegre.png
+ blurred_portalegre.png
santarem.png
+ blurred_santarem.png
viana_do_castelo.png
+ blurred_viana_do_castelo.png
viseu.png
+ blurred_viseu.png
azores.png
braganca.png
+ blurred_braganca.png
castelo_branco.png
+ blurred_castelo_branco.png
coimbra.png
+ blurred_coimbra.png
faro.png
+ blurred_faro.png
leiria.png
+ blurred_leiria.png
madeira.png
porto.png
+ blurred_porto.png
setubal.png
+ blurred_setubal.png
vila_real.png
+ blurred_vila_real.png
DESTINATION ${KDE_INSTALL_DATADIR}/kgeography/flags/portugal)
diff --git a/data/flags/portugal/blurred_aveiro.png b/data/flags/portugal/blurred_aveiro.png
new file mode 100644
index 0000000..3462f13
Binary files /dev/null and b/data/flags/portugal/blurred_aveiro.png differ
diff --git a/data/flags/portugal/blurred_beja.png b/data/flags/portugal/blurred_beja.png
new file mode 100644
index 0000000..7a17c0d
Binary files /dev/null and b/data/flags/portugal/blurred_beja.png differ
diff --git a/data/flags/portugal/blurred_braga.png b/data/flags/portugal/blurred_braga.png
new file mode 100644
index 0000000..7ac9f35
Binary files /dev/null and b/data/flags/portugal/blurred_braga.png differ
diff --git a/data/flags/portugal/blurred_braganca.png b/data/flags/portugal/blurred_braganca.png
new file mode 100644
index 0000000..f874459
Binary files /dev/null and b/data/flags/portugal/blurred_braganca.png differ
diff --git a/data/flags/portugal/blurred_castelo_branco.png b/data/flags/portugal/blurred_castelo_branco.png
new file mode 100644
index 0000000..ffbca35
Binary files /dev/null and b/data/flags/portugal/blurred_castelo_branco.png differ
diff --git a/data/flags/portugal/blurred_coimbra.png b/data/flags/portugal/blurred_coimbra.png
new file mode 100644
index 0000000..23f6370
Binary files /dev/null and b/data/flags/portugal/blurred_coimbra.png differ
diff --git a/data/flags/portugal/blurred_evora.png b/data/flags/portugal/blurred_evora.png
new file mode 100644
index 0000000..af6d933
Binary files /dev/null and b/data/flags/portugal/blurred_evora.png differ
diff --git a/data/flags/portugal/blurred_faro.png b/data/flags/portugal/blurred_faro.png
new file mode 100644
index 0000000..a1773d6
Binary files /dev/null and b/data/flags/portugal/blurred_faro.png differ
diff --git a/data/flags/portugal/blurred_guarda.png b/data/flags/portugal/blurred_guarda.png
new file mode 100644
index 0000000..216f331
Binary files /dev/null and b/data/flags/portugal/blurred_guarda.png differ
diff --git a/data/flags/portugal/blurred_leiria.png b/data/flags/portugal/blurred_leiria.png
new file mode 100644
index 0000000..3158400
Binary files /dev/null and b/data/flags/portugal/blurred_leiria.png differ
diff --git a/data/flags/portugal/blurred_lisboa.png b/data/flags/portugal/blurred_lisboa.png
new file mode 100644
index 0000000..0f50864
Binary files /dev/null and b/data/flags/portugal/blurred_lisboa.png differ
diff --git a/data/flags/portugal/blurred_portalegre.png b/data/flags/portugal/blurred_portalegre.png
new file mode 100644
index 0000000..c170695
Binary files /dev/null and b/data/flags/portugal/blurred_portalegre.png differ
diff --git a/data/flags/portugal/blurred_porto.png b/data/flags/portugal/blurred_porto.png
new file mode 100644
index 0000000..7aabd81
Binary files /dev/null and b/data/flags/portugal/blurred_porto.png differ
diff --git a/data/flags/portugal/blurred_santarem.png b/data/flags/portugal/blurred_santarem.png
new file mode 100644
index 0000000..4257f64
Binary files /dev/null and b/data/flags/portugal/blurred_santarem.png differ
diff --git a/data/flags/portugal/blurred_setubal.png b/data/flags/portugal/blurred_setubal.png
new file mode 100644
index 0000000..2d6dd1c
Binary files /dev/null and b/data/flags/portugal/blurred_setubal.png differ
diff --git a/data/flags/portugal/blurred_viana_do_castelo.png b/data/flags/portugal/blurred_viana_do_castelo.png
new file mode 100644
index 0000000..4cc8baa
Binary files /dev/null and b/data/flags/portugal/blurred_viana_do_castelo.png differ
diff --git a/data/flags/portugal/blurred_vila_real.png b/data/flags/portugal/blurred_vila_real.png
new file mode 100644
index 0000000..422ad43
Binary files /dev/null and b/data/flags/portugal/blurred_vila_real.png differ
diff --git a/data/flags/portugal/blurred_viseu.png b/data/flags/portugal/blurred_viseu.png
new file mode 100644
index 0000000..3a4c725
Binary files /dev/null and b/data/flags/portugal/blurred_viseu.png differ
diff --git a/data/flags/ukraine/CMakeLists.txt b/data/flags/ukraine/CMakeLists.txt
index 6d4ea42..eb01796 100644
--- a/data/flags/ukraine/CMakeLists.txt
+++ b/data/flags/ukraine/CMakeLists.txt
@@ -2,7 +2,8 @@
########### install files ###############
install(FILES
-Cherkasy.png
+Cherkasy.png
+blurred_Cherkasy.png
Crimea.png
Ivano-Frankivsk.png
Khmelnitsky.png
diff --git a/data/flags/ukraine/blurred_Cherkasy.png b/data/flags/ukraine/blurred_Cherkasy.png
new file mode 100644
index 0000000..f4cbaa0
Binary files /dev/null and b/data/flags/ukraine/blurred_Cherkasy.png differ
diff --git a/data/flags/usa/CMakeLists.txt b/data/flags/usa/CMakeLists.txt
index 9f846dc..32b1b55 100644
--- a/data/flags/usa/CMakeLists.txt
+++ b/data/flags/usa/CMakeLists.txt
@@ -3,53 +3,79 @@ install(FILES
usa_alaska.png
usa_arizona.png
usa_arkansas.png
+ blurred_usa_arkansas.png
usa_california.png
+ blurred_usa_california.png
usa_colorado.png
usa_connecticut.png
usa_delaware.png
usa_district_of_columbia.png
usa_florida.png
+ blurred_usa_florida.png
usa_georgia.png
usa_hawaii.png
usa_idaho.png
+ blurred_usa_idaho.png
usa_illinois.png
+ blurred_usa_illinois.png
usa_indiana.png
usa_iowa.png
+ blurred_usa_iowa.png
usa_kansas.png
+ blurred_usa_kansas.png
usa_kentucky.png
+ blurred_usa_kentucky.png
usa_louisiana.png
usa_maine.png
+ blurred_usa_maine.png
usa_maryland.png
usa_massachusetts.png
usa_michigan.png
usa_minnesota.png
+ blurred_usa_minnesota.png
usa_mississippi.png
usa_missouri.png
usa_montana.png
+ blurred_usa_montana.png
usa_nebraska.png
+ blurred_usa_nebraska.png
usa_nevada.png
+ blurred_usa_nevada.png
usa_new_hampshire.png
+ blurred_usa_new_hampshire.png
usa_new_jersey.png
usa_new_mexico.png
usa_new_york.png
usa_north_carolina.png
+ blurred_usa_north_carolina.png
usa_north_dakota.png
+ blurred_usa_north_dakota.png
usa_ohio.png
usa_oklahoma.png
+ blurred_usa_oklahoma.png
usa_oregon.png
+ blurred_usa_oregon.png
usa_pennsylvania.png
usa_rhode_island.png
usa_south_carolina.png
usa_south_dakota.png
+ blurred_usa_south_dakota.png
usa_tennessee.png
usa_texas.png
usa_utah.png
+ blurred_usa_utah.png
usa_vermont.png
+ blurred_usa_vermont.png
usa_virginia.png
+ blurred_usa_virginia.png
usa_washington.png
+ blurred_usa_washington.png
usa_west_virginia.png
+ blurred_usa_west_virginia.png
usa_wisconsin.png
+ blurred_usa_wisconsin.png
usa_wyoming.png
+ blurred_usa_wyoming.png
DESTINATION ${KDE_INSTALL_DATADIR}/kgeography/flags)
diff --git a/data/flags/usa/blurred_usa_arkansas.png b/data/flags/usa/blurred_usa_arkansas.png
new file mode 100644
index 0000000..39b8b42
Binary files /dev/null and b/data/flags/usa/blurred_usa_arkansas.png differ
diff --git a/data/flags/usa/blurred_usa_california.png b/data/flags/usa/blurred_usa_california.png
new file mode 100644
index 0000000..dd5acf9
Binary files /dev/null and b/data/flags/usa/blurred_usa_california.png differ
diff --git a/data/flags/usa/blurred_usa_florida.png b/data/flags/usa/blurred_usa_florida.png
new file mode 100644
index 0000000..5ba15c7
Binary files /dev/null and b/data/flags/usa/blurred_usa_florida.png differ
diff --git a/data/flags/usa/blurred_usa_idaho.png b/data/flags/usa/blurred_usa_idaho.png
new file mode 100644
index 0000000..7efed77
Binary files /dev/null and b/data/flags/usa/blurred_usa_idaho.png differ
diff --git a/data/flags/usa/blurred_usa_illinois.png b/data/flags/usa/blurred_usa_illinois.png
new file mode 100644
index 0000000..116b076
Binary files /dev/null and b/data/flags/usa/blurred_usa_illinois.png differ
diff --git a/data/flags/usa/blurred_usa_iowa.png b/data/flags/usa/blurred_usa_iowa.png
new file mode 100644
index 0000000..ef5e100
Binary files /dev/null and b/data/flags/usa/blurred_usa_iowa.png differ
diff --git a/data/flags/usa/blurred_usa_kansas.png b/data/flags/usa/blurred_usa_kansas.png
new file mode 100644
index 0000000..a74df15
Binary files /dev/null and b/data/flags/usa/blurred_usa_kansas.png differ
diff --git a/data/flags/usa/blurred_usa_kentucky.png b/data/flags/usa/blurred_usa_kentucky.png
new file mode 100644
index 0000000..f887b08
Binary files /dev/null and b/data/flags/usa/blurred_usa_kentucky.png differ
diff --git a/data/flags/usa/blurred_usa_maine.png b/data/flags/usa/blurred_usa_maine.png
new file mode 100644
index 0000000..ea08b63
Binary files /dev/null and b/data/flags/usa/blurred_usa_maine.png differ
diff --git a/data/flags/usa/blurred_usa_minnesota.png b/data/flags/usa/blurred_usa_minnesota.png
new file mode 100644
index 0000000..02aea12
Binary files /dev/null and b/data/flags/usa/blurred_usa_minnesota.png differ
diff --git a/data/flags/usa/blurred_usa_montana.png b/data/flags/usa/blurred_usa_montana.png
new file mode 100644
index 0000000..f959411
Binary files /dev/null and b/data/flags/usa/blurred_usa_montana.png differ
diff --git a/data/flags/usa/blurred_usa_nebraska.png b/data/flags/usa/blurred_usa_nebraska.png
new file mode 100644
index 0000000..11f16f3
Binary files /dev/null and b/data/flags/usa/blurred_usa_nebraska.png differ
diff --git a/data/flags/usa/blurred_usa_nevada.png b/data/flags/usa/blurred_usa_nevada.png
new file mode 100644
index 0000000..77fa67b
Binary files /dev/null and b/data/flags/usa/blurred_usa_nevada.png differ
diff --git a/data/flags/usa/blurred_usa_new_hampshire.png b/data/flags/usa/blurred_usa_new_hampshire.png
new file mode 100644
index 0000000..ef96103
Binary files /dev/null and b/data/flags/usa/blurred_usa_new_hampshire.png differ
diff --git a/data/flags/usa/blurred_usa_north_carolina.png b/data/flags/usa/blurred_usa_north_carolina.png
new file mode 100644
index 0000000..01e718f
Binary files /dev/null and b/data/flags/usa/blurred_usa_north_carolina.png differ
diff --git a/data/flags/usa/blurred_usa_north_dakota.png b/data/flags/usa/blurred_usa_north_dakota.png
new file mode 100644
index 0000000..10490db
Binary files /dev/null and b/data/flags/usa/blurred_usa_north_dakota.png differ
diff --git a/data/flags/usa/blurred_usa_oklahoma.png b/data/flags/usa/blurred_usa_oklahoma.png
new file mode 100644
index 0000000..9a7b68f
Binary files /dev/null and b/data/flags/usa/blurred_usa_oklahoma.png differ
diff --git a/data/flags/usa/blurred_usa_oregon.png b/data/flags/usa/blurred_usa_oregon.png
new file mode 100644
index 0000000..e99da41
Binary files /dev/null and b/data/flags/usa/blurred_usa_oregon.png differ
diff --git a/data/flags/usa/blurred_usa_south_dakota.png b/data/flags/usa/blurred_usa_south_dakota.png
new file mode 100644
index 0000000..981b319
Binary files /dev/null and b/data/flags/usa/blurred_usa_south_dakota.png differ
diff --git a/data/flags/usa/blurred_usa_utah.png b/data/flags/usa/blurred_usa_utah.png
new file mode 100644
index 0000000..196c74f
Binary files /dev/null and b/data/flags/usa/blurred_usa_utah.png differ
diff --git a/data/flags/usa/blurred_usa_vermont.png b/data/flags/usa/blurred_usa_vermont.png
new file mode 100644
index 0000000..59a40b5
Binary files /dev/null and b/data/flags/usa/blurred_usa_vermont.png differ
diff --git a/data/flags/usa/blurred_usa_virginia.png b/data/flags/usa/blurred_usa_virginia.png
new file mode 100644
index 0000000..f127b23
Binary files /dev/null and b/data/flags/usa/blurred_usa_virginia.png differ
diff --git a/data/flags/usa/blurred_usa_washington.png b/data/flags/usa/blurred_usa_washington.png
new file mode 100644
index 0000000..a24f7fd
Binary files /dev/null and b/data/flags/usa/blurred_usa_washington.png differ
diff --git a/data/flags/usa/blurred_usa_west_virginia.png b/data/flags/usa/blurred_usa_west_virginia.png
new file mode 100644
index 0000000..7f54a1e
Binary files /dev/null and b/data/flags/usa/blurred_usa_west_virginia.png differ
diff --git a/data/flags/usa/blurred_usa_wisconsin.png b/data/flags/usa/blurred_usa_wisconsin.png
new file mode 100644
index 0000000..8c8f5dc
Binary files /dev/null and b/data/flags/usa/blurred_usa_wisconsin.png differ
diff --git a/data/flags/usa/blurred_usa_wyoming.png b/data/flags/usa/blurred_usa_wyoming.png
new file mode 100644
index 0000000..d3512af
Binary files /dev/null and b/data/flags/usa/blurred_usa_wyoming.png differ
diff --git a/data/italy.kgm b/data/italy.kgm
index 7ae677e..10781ef 100644
--- a/data/italy.kgm
+++ b/data/italy.kgm
@@ -65,6 +65,7 @@
<division>
<name>Latium</name>
<flag>italy/it-lat200.png</flag>
+ <blurredflag>italy/blurred_it-lat200.png</blurredflag>
<capital>Rome</capital>
<color>
<red>190</red>
@@ -75,6 +76,7 @@
<division>
<name>Calabria</name>
<flag>italy/it-cal200.png</flag>
+ <blurredflag>italy/blurred_it-cal200.png</blurredflag>
<capital>Catanzaro</capital>
<color>
<red>190</red>
@@ -95,6 +97,7 @@
<division>
<name>Apulia</name>
<flag>italy/it-pug200.png</flag>
+ <blurredflag>italy/blurred_it-pug200.png</blurredflag>
<capital>Bari</capital>
<color>
<red>190</red>
@@ -135,6 +138,7 @@
<division>
<name>Molise</name>
<flag>italy/it-mol200.png</flag>
+ <blurredflag>italy/blurred_it-mol200.png</blurredflag>
<capital>Campobasso</capital>
<color>
<red>190</red>
@@ -155,6 +159,7 @@
<division>
<name>Emilia Romagna</name>
<flag>italy/it-emi200.png</flag>
+ <blurredflag>italy/blurred_it-emi200.png</blurredflag>
<capital>Bologna</capital>
<color>
<red>190</red>
@@ -215,6 +220,7 @@
<division>
<name>Marches</name>
<flag>italy/it-mar200.png</flag>
+ <blurredflag>italy/it-mar200.png</blurredflag>
<capital>Ancona</capital>
<color>
<red>220</red>
@@ -225,6 +231,7 @@
<division>
<name>Veneto</name>
<flag>italy/it-ven200.png</flag>
+ <blurredflag>italy/blurred_it-ven200.png</blurredflag>
<capital>Venice</capital>
<color>
<red>220</red>
diff --git a/data/norway.kgm b/data/norway.kgm
index 007af76..cbe8028 100644
--- a/data/norway.kgm
+++ b/data/norway.kgm
@@ -127,6 +127,7 @@
<name>Oslo</name>
<capital>Oslo</capital>
<flag>norway/oslo.png</flag>
+ <blurredflag>norway/blurred_oslo.png</blurredflag>
<color>
<red>168</red>
<green>223</green>
diff --git a/data/peru.kgm b/data/peru.kgm
index 03eb279..3f03d2a 100644
--- a/data/peru.kgm
+++ b/data/peru.kgm
@@ -71,6 +71,7 @@
<division>
<name>Amazonas</name>
<flag>peru/amazonas.png</flag>
+ <blurredflag>peru/blurred_amazonas.png</blurredflag>
<capital>Chachapoyas</capital>
<color>
<red>130</red>
@@ -81,6 +82,7 @@
<division>
<name>Ancash</name>
<flag>peru/ancash.png</flag>
+ <blurredflag>peru/blurred_ancash.png</blurredflag>
<capital>Huaraz</capital>
<color>
<red>130</red>
@@ -251,6 +253,7 @@
<division>
<name>Tacna</name>
<flag>peru/tacna.png</flag>
+ <blurredflag>peru/blurred_tacna.png</blurredflag>
<capital>Tacna</capital>
<color>
<red>250</red>
@@ -291,6 +294,7 @@
<division>
<name>San Martin</name>
<flag>peru/san_martin.png</flag>
+ <blurredflag>peru/blurred_san_martin.png</blurredflag>
<capital>Moyobamba</capital>
<color>
<red>250</red>
diff --git a/data/portugal_districts.kgm b/data/portugal_districts.kgm
index 579b925..182d376 100644
--- a/data/portugal_districts.kgm
+++ b/data/portugal_districts.kgm
@@ -44,6 +44,7 @@
<division>
<name>Viana do Castelo</name>
<flag>portugal/viana_do_castelo.png</flag>
+ <blurredflag>portugal/blurred_viana_do_castelo.png</blurredflag>
<capital>Viana do Castelo</capital>
<color>
<red>146</red>
@@ -74,6 +75,7 @@
<division>
<name>Braga</name>
<flag>portugal/braga.png</flag>
+ <blurredflag>portugal/blurred_braga.png</blurredflag>
<capital>Braga</capital>
<color>
<red>90</red>
@@ -84,6 +86,7 @@
<division>
<name>Vila Real</name>
<flag>portugal/vila_real.png</flag>
+ <blurredflag>portugal/blurred_vila_real.png</blurredflag>
<capital>Vila Real</capital>
<color>
<red>146</red>
@@ -94,6 +97,7 @@
<division>
<name>Bragança</name>
<flag>portugal/braganca.png</flag>
+ <blurredflag>portugal/blurred_braganca.png</blurredflag>
<capital>Bragança</capital>
<color>
<red>227</red>
@@ -104,6 +108,7 @@
<division>
<name>Porto</name>
<flag>portugal/porto.png</flag>
+ <blurredflag>portugal/blurred_porto.png</blurredflag>
<capital>Porto</capital>
<color>
<red>158</red>
@@ -114,6 +119,7 @@
<division>
<name>Aveiro</name>
<flag>portugal/aveiro.png</flag>
+ <blurredflag>portugal/blurred_aveiro.png</blurredflag>
<capital>Aveiro</capital>
<color>
<red>210</red>
@@ -124,6 +130,7 @@
<division>
<name>Viseu</name>
<flag>portugal/viseu.png</flag>
+ <blurredflag>portugal/blurred_viseu.png</blurredflag>
<capital>Viseu</capital>
<color>
<red>227</red>
@@ -134,6 +141,7 @@
<division>
<name>Guarda</name>
<flag>portugal/guarda.png</flag>
+ <blurredflag>portugal/blurred_guarda.png</blurredflag>
<capital>Guarda</capital>
<color>
<red>227</red>
@@ -144,6 +152,7 @@
<division>
<name>Coimbra</name>
<flag>portugal/coimbra.png</flag>
+ <blurredflag>portugal/blurred_coimbra.png</blurredflag>
<capital>Coimbra</capital>
<color>
<red>152</red>
@@ -154,6 +163,7 @@
<division>
<name>Castelo Branco</name>
<flag>portugal/castelo_branco.png</flag>
+ <blurredflag>portugal/blurred_castelo_branco.png</blurredflag>
<capital>Castelo Branco</capital>
<color>
<red>83</red>
@@ -164,6 +174,7 @@
<division>
<name>Leiria</name>
<flag>portugal/leiria.png</flag>
+ <blurredflag>portugal/blurred_leiria.png</blurredflag>
<capital>Leiria</capital>
<color>
<red>83</red>
@@ -174,6 +185,7 @@
<division>
<name>Santarém</name>
<flag>portugal/santarem.png</flag>
+ <blurredflag>portugal/blurred_santarem.png</blurredflag>
<capital>Santarém</capital>
<color>
<red>83</red>
@@ -184,6 +196,7 @@
<division>
<name>Lisboa</name>
<flag>portugal/lisboa.png</flag>
+ <blurredflag>portugal/blurred_lisboa.png</blurredflag>
<capital>Lisboa</capital>
<color>
<red>83</red>
@@ -194,6 +207,7 @@
<division>
<name>Évora</name>
<flag>portugal/evora.png</flag>
+ <blurredflag>portugal/blurred_evora.png</blurredflag>
<capital>Évora</capital>
<color>
<red>215</red>
@@ -204,6 +218,7 @@
<division>
<name>Setúbal</name>
<flag>portugal/setubal.png</flag>
+ <blurredflag>portugal/blurred_setubal.png</blurredflag>
<capital>Setúbal</capital>
<color>
<red>227</red>
@@ -214,6 +229,7 @@
<division>
<name>Beja</name>
<flag>portugal/beja.png</flag>
+ <blurredflag>portugal/blurred_beja.png</blurredflag>
<capital>Beja</capital>
<color>
<red>227</red>
@@ -224,6 +240,7 @@
<division>
<name>Faro</name>
<flag>portugal/faro.png</flag>
+ <blurredflag>portugal/blurred_faro.png</blurredflag>
<capital>Faro</capital>
<color>
<red>232</red>
@@ -234,6 +251,7 @@
<division>
<name>Portalegre</name>
<flag>portugal/portalegre.png</flag>
+ <blurredflag>portugal/blurred_portalegre.png</blurredflag>
<capital>Portalegre</capital>
<color>
<red>148</red>
diff --git a/data/ukraine.kgm b/data/ukraine.kgm
index e9d413a..43139ec 100644
--- a/data/ukraine.kgm
+++ b/data/ukraine.kgm
@@ -74,7 +74,7 @@
<division>
<name>Cherkas'ka oblast'</name>
-<capital>Cherkasy</capital> <flag>ukraine/Cherkasy.png</flag>
+<capital>Cherkasy</capital> <flag>ukraine/Cherkasy.png</flag> <blurredflag>ukraine/blurred_Cherkasy.png</blurredflag>
<color> <red> 128 </red> <green> 128 </green> <blue> 0 </blue> </color>
</division>
diff --git a/data/usa.kgm b/data/usa.kgm
index 669b2f8..51107b5 100644
--- a/data/usa.kgm
+++ b/data/usa.kgm
@@ -165,6 +165,7 @@
<name>Arkansas</name>
<capital>Little Rock</capital>
<flag>usa_arkansas.png</flag>
+ <blurredflag>blurred_usa_arkansas.png</blurredflag>
<color>
<red>130</red>
<green>130</green>
@@ -175,6 +176,7 @@
<name>California</name>
<capital>Sacramento</capital>
<flag>usa_california.png</flag>
+ <blurredflag>blurred_usa_california.png</blurredflag>
<color>
<red>130</red>
<green>170</green>
@@ -215,6 +217,7 @@
<name>Florida</name>
<capital>Tallahassee</capital>
<flag>usa_florida.png</flag>
+ <blurredflag>blurred_usa_florida.png</blurredflag>
<color>
<red>130</red>
<green>210</green>
@@ -245,6 +248,7 @@
<name>Idaho</name>
<capital>Boise</capital>
<flag>usa_idaho.png</flag>
+ <blurredflag>blurred_usa_idaho.png</blurredflag>
<color>
<red>130</red>
<green>210</green>
@@ -255,6 +259,7 @@
<name>Illinois</name>
<capital>Springfield</capital>
<flag>usa_illinois.png</flag>
+ <blurredflag>blurred_usa_illinois.png</blurredflag>
<color>
<red>130</red>
<green>250</green>
@@ -275,6 +280,7 @@
<name>Iowa</name>
<capital>Des Moines</capital>
<flag>usa_iowa.png</flag>
+ <blurredflag>blurred_usa_iowa.png</blurredflag>
<color>
<red>130</red>
<green>250</green>
@@ -285,6 +291,7 @@
<name>Kansas</name>
<capital>Topeka</capital>
<flag>usa_kansas.png</flag>
+ <blurredflag>blurred_usa_kansas.png</blurredflag>
<color>
<red>130</red>
<green>250</green>
@@ -295,6 +302,7 @@
<name>Kentucky</name>
<capital>Frankfort</capital>
<flag>usa_kentucky.png</flag>
+ <blurredflag>blurred_usa_kentucky.png</blurredflag>
<color>
<red>170</red>
<green>130</green>
@@ -315,6 +323,7 @@
<name>Maine</name>
<capital>Augusta</capital>
<flag>usa_maine.png</flag>
+ <blurredflag>blurred_usa_maine.png</blurredflag>
<color>
<red>170</red>
<green>130</green>
@@ -355,6 +364,7 @@
<name>Minnesota</name>
<capital>Saint Paul</capital>
<flag>usa_minnesota.png</flag>
+ <blurredflag>blurred_usa_minnesota.png</blurredflag>
<color>
<red>170</red>
<green>170</green>
@@ -385,6 +395,7 @@
<name>Montana</name>
<capital>Helena</capital>
<flag>usa_montana.png</flag>
+ <blurredflag>blurred_usa_montana.png</blurredflag>
<color>
<red>170</red>
<green>210</green>
@@ -395,6 +406,7 @@
<name>Nebraska</name>
<capital>Lincoln</capital>
<flag>usa_nebraska.png</flag>
+ <blurredflag>blurred_usa_nebraska.png</blurredflag>
<color>
<red>170</red>
<green>210</green>
@@ -405,6 +417,7 @@
<name>Nevada</name>
<capital>Carson City</capital>
<flag>usa_nevada.png</flag>
+ <blurredflag>blurred_usa_nevada.png</blurredflag>
<color>
<red>170</red>
<green>210</green>
@@ -415,6 +428,7 @@
<name>New Hampshire</name>
<capital>Concord</capital>
<flag>usa_new_hampshire.png</flag>
+ <blurredflag>blurred_usa_new_hampshire.png</blurredflag>
<color>
<red>170</red>
<green>250</green>
@@ -455,6 +469,7 @@
<name>North Carolina</name>
<capital>Raleigh</capital>
<flag>usa_north_carolina.png</flag>
+ <blurredflag>blurred_usa_north_carolina.png</blurredflag>
<color>
<red>210</red>
<green>130</green>
@@ -465,6 +480,7 @@
<name>North Dakota</name>
<capital>Bismarck</capital>
<flag>usa_north_dakota.png</flag>
+ <blurredflag>blurred_usa_north_dakota.png</blurredflag>
<color>
<red>210</red>
<green>130</green>
@@ -485,6 +501,7 @@
<name>Oklahoma</name>
<capital>Oklahoma City</capital>
<flag>usa_oklahoma.png</flag>
+ <blurredflag>blurred_usa_oklahoma.png</blurredflag>
<color>
<red>210</red>
<green>130</green>
@@ -495,6 +512,7 @@
<name>Oregon</name>
<capital>Salem</capital>
<flag>usa_oregon.png</flag>
+ <blurredflag>blurred_usa_oregon.png</blurredflag>
<color>
<red>210</red>
<green>170</green>
@@ -535,6 +553,7 @@
<name>South Dakota</name>
<capital>Pierre</capital>
<flag>usa_south_dakota.png</flag>
+ <blurredflag>blurred_usa_south_dakota.png</blurredflag>
<color>
<red>210</red>
<green>210</green>
@@ -565,6 +584,7 @@
<name>Utah</name>
<capital>Salt Lake City</capital>
<flag>usa_utah.png</flag>
+ <blurredflag>blurred_usa_utah.png</blurredflag>
<color>
<red>210</red>
<green>210</green>
@@ -575,6 +595,7 @@
<name>Vermont</name>
<capital>Montpelier</capital>
<flag>usa_vermont.png</flag>
+ <blurredflag>blurred_usa_vermont.png</blurredflag>
<color>
<red>210</red>
<green>250</green>
@@ -585,6 +606,7 @@
<name>Virginia</name>
<capital>Richmond</capital>
<flag>usa_virginia.png</flag>
+ <blurredflag>blurred_usa_virginia.png</blurredflag>
<color>
<red>210</red>
<green>250</green>
@@ -595,6 +617,7 @@
<name>Washington</name>
<capital>Olympia</capital>
<flag>usa_washington.png</flag>
+ <blurredflag>blurred_usa_washington.png</blurredflag>
<color>
<red>210</red>
<green>250</green>
@@ -605,6 +628,7 @@
<name>West Virginia</name>
<capital>Charleston</capital>
<flag>usa_west_virginia.png</flag>
+ <blurredflag>blurred_usa_west_virginia.png</blurredflag>
<color>
<red>210</red>
<green>250</green>
@@ -615,6 +639,7 @@
<name>Wisconsin</name>
<capital>Madison</capital>
<flag>usa_wisconsin.png</flag>
+ <blurredflag>blurred_usa_wisconsin.png</blurredflag>
<color>
<red>250</red>
<green>130</green>
@@ -625,6 +650,7 @@
<name>Wyoming</name>
<capital>Cheyenne</capital>
<flag>usa_wyoming.png</flag>
+ <blurredflag>blurred_usa_wyoming.png</blurredflag>
<color>
<red>250</red>
<green>130</green>
diff --git a/doc/index.docbook b/doc/index.docbook
index bf31d75..ef8e1b4 100644
--- a/doc/index.docbook
+++ b/doc/index.docbook
@@ -388,6 +388,9 @@ on the &kgeography; website.
<listitem>
<para><sgmltag class="starttag">flag</sgmltag> and <sgmltag class="endtag">flag</sgmltag>: the file (without any path) containing the flag of the division, ⪚ <quote><literal>albania.png</literal></quote>. This tag is optional. Not needed for the divisions whose <sgmltag class="starttag">ignore</sgmltag> tag is set to <userinput>yes</userinput>.</para>
</listitem>
+<listitem>
+ <para><sgmltag class="starttag">blurredflag</sgmltag> and <sgmltag class="endtag">blurredflag</sgmltag>: the file (without any path) containing the blurred flag of the division, ⪚ <quote><literal>blurred_albania.png</literal></quote>. This tag is optional. It should be used in situations where the flag has the name of the division to which it belongs written on it. This can cause the flag guessing games to become too easy, and as such submission of the flags with the text blurred out is encouraged.</para>
+</listitem>
<listitem>
<para><sgmltag class="starttag">color</sgmltag> and <sgmltag class="endtag">color</sgmltag>: the color the division has in the map.</para>
</listitem>
@@ -432,6 +435,9 @@ on the &kgeography; website.
<para>
If you have used the <sgmltag class="starttag">flag</sgmltag> tag you should provide the flag files. They have to be in <acronym>PNG</acronym> format and better if they are 300x200 pixels and you provide a &SVG; file for it. To obtain &SVG; flags of almost all countries in the world and some other divisions, you can consult the <ulink url="https://sourceforge.net/project/showfiles.php?group_id=4054&package_id=16668&release_id=208770">Sodipodi flags collection</ulink>.
</para>
+<para>
+ As noted previously, we encourage you to provide blurred flag files for flags that have the division written on them. The same requirements apply to the blurred flag files as to the regular flag files. While there is no prescribed naming notation for the blurred files, we recommend saving these down with the name of the original flag prefixed with <literal>blurred_</literal>, ⪚ <quote><literal>blurred_albania.png</literal></quote>
+</para>
</sect1>
<sect1 id="how-to-test">
<title>How to test</title>
diff --git a/src/division.cpp b/src/division.cpp
index 0d61503..70066d9 100644
--- a/src/division.cpp
+++ b/src/division.cpp
@@ -61,6 +61,11 @@ QString division::getFlagFile() const
return p_flagFile;
}
+QString division::getBlurredFlagFile() const
+{
+ return p_blurredFlagFile;
+}
+
QString division::getCapital() const
{
return p_capital;
@@ -106,3 +111,14 @@ bool division::setFlagFile(const QString &path)
p_flagFile = path;
return QFile::exists(path);
}
+
+bool division::setBlurredFlagFile(const QString &path)
+{
+ p_blurredFlagFile = path;
+ return QFile::exists(path);
+}
+
+QString division::getFlagForQuestion() const
+{
+ return p_blurredFlagFile.isNull() ? p_flagFile : p_blurredFlagFile;
+}
diff --git a/src/division.h b/src/division.h
index 33c6072..5387956 100644
--- a/src/division.h
+++ b/src/division.h
@@ -29,8 +29,10 @@ class division
QString getName() const;
QRgb getRGB() const;
QString getFlagFile() const;
+ QString getBlurredFlagFile() const;
QString getCapital() const;
QStringList getFalseCapitals() const;
+ QString getFlagForQuestion() const;
void setCapital(const QString &name);
void setFalseCapitals(const QStringList &falseCapitals);
@@ -39,9 +41,10 @@ class division
void setName(const QString &name);
void setRGB(int r, int g, int b);
bool setFlagFile(const QString &path);
+ bool setBlurredFlagFile(const QString &path);
private:
- QString p_untranslatedName, p_name, p_flagFile, p_capital;
+ QString p_untranslatedName, p_name, p_flagFile, p_blurredFlagFile, p_capital;
QStringList p_falseCapitals;
QRgb p_color;
int p_askMode;
diff --git a/src/divisionflagasker.cpp b/src/divisionflagasker.cpp
index 2d42e2c..d76007b 100644
--- a/src/divisionflagasker.cpp
+++ b/src/divisionflagasker.cpp
@@ -25,7 +25,8 @@ divisionFlagAsker::divisionFlagAsker(QWidget *parent, KGmap *m, QWidget *w, uint
bool divisionFlagAsker::nextBoxAskerQuestionHook(const division *div, int i, bool isAnswer)
{
QSize pixmapSize(60, 40);
- QIcon icon(div -> getFlagFile());
+ QIcon icon(div -> getFlagForQuestion());
+
if (isAnswer)
{
const QString divisionName = div -> getName();
diff --git a/src/flagdivisionasker.cpp b/src/flagdivisionasker.cpp
index f51294b..76c4325 100644
--- a/src/flagdivisionasker.cpp
+++ b/src/flagdivisionasker.cpp
@@ -50,7 +50,7 @@ bool flagDivisionAsker::nextBoxAskerQuestionHook(const division *div, int i, boo
if (isAnswer)
{
// we put the flag image
- QImage image(div -> getFlagFile());
+ QImage image(div -> getFlagForQuestion());
p_flag -> img = image;
p_flag -> setMinimumSize(image.size());
p_flag -> update();
@@ -61,7 +61,7 @@ bool flagDivisionAsker::nextBoxAskerQuestionHook(const division *div, int i, boo
else
{
// There are some maps like the Pacific one where two divisions have the same flag
- QImage image(div -> getFlagFile());
+ QImage image(div -> getFlagForQuestion());
if (p_flag -> img == image) return false;
}
p_radioButtons[i] -> setText(i18nc("@option:radio This flag belongs to:", "%1", div -> getName()));
diff --git a/src/mapparser.cpp b/src/mapparser.cpp
index e6d806d..49d997d 100644
--- a/src/mapparser.cpp
+++ b/src/mapparser.cpp
@@ -115,6 +115,16 @@ KGmap *mapReader::parseMap(const QString &path)
p_error = i18n("The flag image file for %1 does not exist", kgdiv -> getName());
}
}
+
+ QString blurredFlagFile = getElementString(QStringLiteral("blurredflag"), divisionTag, Optional);
+
+ if (!blurredFlagFile.isNull())
+ {
+ if (!kgdiv -> setBlurredFlagFile( baseDir + "/flags/" + blurredFlagFile ))
+ {
+ p_error = i18n("The blurred flag image file for %1 does not exist", kgdiv -> getName());
+ }
+ }
// division ignoreness
const QString &ignore = getElementString(QStringLiteral("ignore"), divisionTag, Optional).toLower();
More information about the kde-doc-english
mailing list