Keep all flags icons in the separate resource file.

--HG--
branch : develop
This commit is contained in:
dismine 2014-12-05 14:52:24 +02:00
parent fbf849fffe
commit 360aee82be
15 changed files with 19 additions and 13 deletions

View File

@ -52,7 +52,8 @@ RESOURCES += \
share/resources/cursor.qrc \ # Tools cursor icons. share/resources/cursor.qrc \ # Tools cursor icons.
share/resources/theme.qrc \ # Windows theme icons. share/resources/theme.qrc \ # Windows theme icons.
share/resources/schema.qrc \ # Schemas for validation xml files. share/resources/schema.qrc \ # Schemas for validation xml files.
share/resources/measurements.qrc # For measurements files that we save as resource. share/resources/measurements.qrc \ # For measurements files that we save as resource.
share/resources/flags.qrc
# Compilation will fail without this files after we added them to this section. # Compilation will fail without this files after we added them to this section.
OTHER_FILES += \ OTHER_FILES += \

View File

@ -161,13 +161,13 @@ QGroupBox *ConfigurationPage::LangGroup()
QLocale loc = QLocale(locale); QLocale loc = QLocale(locale);
QString lang = loc.nativeLanguageName(); QString lang = loc.nativeLanguageName();
QIcon ico(QString("%1/%2.png").arg("://icon/flags").arg(QLocale::countryToString(loc.country()))); QIcon ico(QString("%1/%2.png").arg("://flags").arg(QLocale::countryToString(loc.country())));
langCombo->addItem(ico, lang, locale); langCombo->addItem(ico, lang, locale);
} }
// English language is internal and doens't have own *.qm file. // English language is internal and doens't have own *.qm file.
QIcon ico(QString("%1/%2.png").arg("://icon/flags").arg(QLocale::countryToString(QLocale::UnitedStates))); QIcon ico(QString("%1/%2.png").arg("://flags").arg(QLocale::countryToString(QLocale::UnitedStates)));
QString lang = QLocale("en_US").nativeLanguageName(); QString lang = QLocale("en_US").nativeLanguageName();
langCombo->addItem(ico, lang, "en_US"); langCombo->addItem(ico, lang, "en_US");

View File

@ -46,6 +46,7 @@ int main(int argc, char *argv[])
Q_INIT_RESOURCE(icon); Q_INIT_RESOURCE(icon);
Q_INIT_RESOURCE(schema); Q_INIT_RESOURCE(schema);
Q_INIT_RESOURCE(theme); Q_INIT_RESOURCE(theme);
Q_INIT_RESOURCE(flags);
QT_REQUIRE_VERSION(argc, argv, "5.2.1"); QT_REQUIRE_VERSION(argc, argv, "5.2.1");

View File

@ -0,0 +1,14 @@
<RCC>
<qresource prefix="/">
<file>flags/CzechRepublic.png</file>
<file>flags/France.png</file>
<file>flags/Germany.png</file>
<file>flags/Indonesia.png</file>
<file>flags/Israel.png</file>
<file>flags/Italy.png</file>
<file>flags/Netherlands.png</file>
<file>flags/Russia.png</file>
<file>flags/Ukraine.png</file>
<file>flags/UnitedStates.png</file>
</qresource>
</RCC>

View File

Before

Width:  |  Height:  |  Size: 818 B

After

Width:  |  Height:  |  Size: 818 B

View File

Before

Width:  |  Height:  |  Size: 851 B

After

Width:  |  Height:  |  Size: 851 B

View File

Before

Width:  |  Height:  |  Size: 509 B

After

Width:  |  Height:  |  Size: 509 B

View File

Before

Width:  |  Height:  |  Size: 107 B

After

Width:  |  Height:  |  Size: 107 B

View File

Before

Width:  |  Height:  |  Size: 637 B

After

Width:  |  Height:  |  Size: 637 B

View File

Before

Width:  |  Height:  |  Size: 110 B

After

Width:  |  Height:  |  Size: 110 B

View File

Before

Width:  |  Height:  |  Size: 114 B

After

Width:  |  Height:  |  Size: 114 B

View File

Before

Width:  |  Height:  |  Size: 520 B

After

Width:  |  Height:  |  Size: 520 B

View File

Before

Width:  |  Height:  |  Size: 509 B

After

Width:  |  Height:  |  Size: 509 B

View File

Before

Width:  |  Height:  |  Size: 144 B

After

Width:  |  Height:  |  Size: 144 B

View File

@ -34,17 +34,8 @@
<file>icon/32x32/arc_cut.png</file> <file>icon/32x32/arc_cut.png</file>
<file>icon/config.png</file> <file>icon/config.png</file>
<file>icon/pattern_config.png</file> <file>icon/pattern_config.png</file>
<file>icon/flags/CzechRepublic.png</file>
<file>icon/flags/Germany.png</file>
<file>icon/flags/UnitedStates.png</file>
<file>icon/flags/France.png</file>
<file>icon/flags/Israel.png</file>
<file>icon/flags/Russia.png</file>
<file>icon/flags/Ukraine.png</file>
<file>icon/Graduation.png</file> <file>icon/Graduation.png</file>
<file>icon/individual.png</file> <file>icon/individual.png</file>
<file>icon/flags/Netherlands.png</file>
<file>icon/flags/Italy.png</file>
<file>icon/community_config.png</file> <file>icon/community_config.png</file>
<file>icon/32x32/arrowLeft.png</file> <file>icon/32x32/arrowLeft.png</file>
<file>icon/32x32/arrowRight.png</file> <file>icon/32x32/arrowRight.png</file>
@ -61,6 +52,5 @@
<file>icon/32x32/line_intersect_axis.png</file> <file>icon/32x32/line_intersect_axis.png</file>
<file>icon/32x32/arc_intersect_axis.png</file> <file>icon/32x32/arc_intersect_axis.png</file>
<file>icon/32x32/curve_intersect_axis.png</file> <file>icon/32x32/curve_intersect_axis.png</file>
<file>icon/flags/Indonesia.png</file>
</qresource> </qresource>
</RCC> </RCC>