~ubuntu-branches/ubuntu/maverick/kdegraphics/maverick-proposed

« back to all changes in this revision

Viewing changes to libs/libkexiv2/libkexiv2/countryselector.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Thomas
  • Date: 2009-12-02 14:03:43 UTC
  • mfrom: (1.1.35 upstream)
  • Revision ID: james.westby@ubuntu.com-20091202140343-2732gbkj69g89arq
Tags: 4:4.3.80-0ubuntu1
* New upstream beta release:
  - Add build-depend on shared-desktop-ontologies for nepomuk integration
  - Bump .so versions for libkexiv, libkdcraw and libkipi
  - Update various .install files

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* ============================================================
 
2
 *
 
3
 * This file is a part of kipi-plugins project
 
4
 * http://www.kipi-plugins.org
 
5
 *
 
6
 * Date        : 2009-07-07
 
7
 * Description : country selector combo-box.
 
8
 *
 
9
 * Copyright (C) 2009 by Gilles Caulier <caulier dot gilles at gmail dot com>
 
10
 *
 
11
 * This program is free software; you can redistribute it
 
12
 * and/or modify it under the terms of the GNU General
 
13
 * Public License as published by the Free Software Foundation;
 
14
 * either version 2, or (at your option)
 
15
 * any later version.
 
16
 *
 
17
 * This program is distributed in the hope that it will be useful,
 
18
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
19
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
20
 * GNU General Public License for more details.
 
21
 *
 
22
 * ============================================================ */
 
23
 
 
24
#include "countryselector.h"
 
25
 
 
26
// Qt includes
 
27
 
 
28
#include <QMap>
 
29
#include <QVariant>
 
30
 
 
31
// KDE includes
 
32
 
 
33
#include <kdebug.h>
 
34
#include <klocale.h>
 
35
 
 
36
namespace KExiv2Iface
 
37
{
 
38
 
 
39
class CountrySelectorPriv
 
40
{
 
41
public:
 
42
 
 
43
    CountrySelectorPriv()
 
44
    {
 
45
        // We cannot use KLocale::allCountriesList() here because KDE only
 
46
        // support 2 characters country codes. XMP require 3 characters country
 
47
        // following ISO 3166 (http://userpage.chemie.fu-berlin.de/diverse/doc/ISO_3166.html)
 
48
 
 
49
        // Standard ISO 3166 country codes.
 
50
 
 
51
        countryCodeMap.insert( "AFG", i18n("Afghanistan") );
 
52
        countryCodeMap.insert( "ALB", i18n("Albania") );
 
53
        countryCodeMap.insert( "DZA", i18n("Algeria") );
 
54
        countryCodeMap.insert( "ASM", i18n("American Samoa") );
 
55
        countryCodeMap.insert( "AND", i18n("Andorra") );
 
56
        countryCodeMap.insert( "AGO", i18n("Angola") );
 
57
        countryCodeMap.insert( "AIA", i18n("Anguilla") );
 
58
        countryCodeMap.insert( "AGO", i18n("Angola") );
 
59
        countryCodeMap.insert( "ATA", i18n("Antarctica") );
 
60
        countryCodeMap.insert( "ATG", i18n("Antigua and Barbuda") );
 
61
        countryCodeMap.insert( "ARG", i18n("Argentina") );
 
62
        countryCodeMap.insert( "ARM", i18n("Armenia") );
 
63
        countryCodeMap.insert( "ABW", i18n("Aruba") );
 
64
        countryCodeMap.insert( "AUS", i18n("Australia") );
 
65
        countryCodeMap.insert( "AUT", i18n("Austria") );
 
66
        countryCodeMap.insert( "AZE", i18n("Azerbaijan") );
 
67
        countryCodeMap.insert( "BHS", i18n("Bahamas") );
 
68
        countryCodeMap.insert( "BHR", i18n("Bahrain") );
 
69
        countryCodeMap.insert( "BGD", i18n("Bangladesh") );
 
70
        countryCodeMap.insert( "BRB", i18n("Barbados") );
 
71
        countryCodeMap.insert( "BLR", i18n("Belarus") );
 
72
        countryCodeMap.insert( "BEL", i18n("Belgium") );
 
73
        countryCodeMap.insert( "BLZ", i18n("Belize") );
 
74
        countryCodeMap.insert( "BEN", i18n("Benin") );
 
75
        countryCodeMap.insert( "BMU", i18n("Bermuda") );
 
76
        countryCodeMap.insert( "BTN", i18n("Bhutan") );
 
77
        countryCodeMap.insert( "BOL", i18n("Bolivia") );
 
78
        countryCodeMap.insert( "BIH", i18n("Bosnia and Herzegovina") );
 
79
        countryCodeMap.insert( "BWA", i18n("Botswana") );
 
80
        countryCodeMap.insert( "BVT", i18n("Bouvet Island") );
 
81
        countryCodeMap.insert( "BRA", i18n("Brazil") );
 
82
        countryCodeMap.insert( "IOT", i18n("British Indian Ocean Territory") );
 
83
        countryCodeMap.insert( "VGB", i18n("British Virgin Islands") );
 
84
        countryCodeMap.insert( "BRN", i18n("Brunei Darussalam") );
 
85
        countryCodeMap.insert( "BGR", i18n("Bulgaria") );
 
86
        countryCodeMap.insert( "BFA", i18n("Burkina Faso") );
 
87
        countryCodeMap.insert( "BDI", i18n("Burundi") );
 
88
        countryCodeMap.insert( "KHM", i18n("Cambodia") );
 
89
        countryCodeMap.insert( "CMR", i18n("Cameroon") );
 
90
        countryCodeMap.insert( "CAN", i18n("Canada") );
 
91
        countryCodeMap.insert( "CPV", i18n("Cape Verde") );
 
92
        countryCodeMap.insert( "CYM", i18n("Cayman Islands") );
 
93
        countryCodeMap.insert( "CAF", i18n("Central African Republic") );
 
94
        countryCodeMap.insert( "TCD", i18n("Chad") );
 
95
        countryCodeMap.insert( "CHL", i18n("Chile") );
 
96
        countryCodeMap.insert( "CHN", i18n("China") );
 
97
        countryCodeMap.insert( "CXR", i18n("Christmas Island ") );
 
98
        countryCodeMap.insert( "CCK", i18n("Cocos Islands") );
 
99
        countryCodeMap.insert( "COL", i18n("Colombia") );
 
100
        countryCodeMap.insert( "COM", i18n("Comoros") );
 
101
        countryCodeMap.insert( "COD", i18n("Zaire") );
 
102
        countryCodeMap.insert( "COG", i18n("Congo") );
 
103
        countryCodeMap.insert( "COK", i18n("Cook Islands") );
 
104
        countryCodeMap.insert( "CRI", i18n("Costa Rica") );
 
105
        countryCodeMap.insert( "CIV", i18n("Ivory Coast") );
 
106
        countryCodeMap.insert( "CUB", i18n("Cuba") );
 
107
        countryCodeMap.insert( "CYP", i18n("Cyprus") );
 
108
        countryCodeMap.insert( "CZE", i18n("Czech Republic") );
 
109
        countryCodeMap.insert( "DNK", i18n("Denmark") );
 
110
        countryCodeMap.insert( "DJI", i18n("Djibouti") );
 
111
        countryCodeMap.insert( "DMA", i18n("Dominica") );
 
112
        countryCodeMap.insert( "DOM", i18n("Dominican Republic") );
 
113
        countryCodeMap.insert( "ECU", i18n("Ecuador") );
 
114
        countryCodeMap.insert( "EGY", i18n("Egypt") );
 
115
        countryCodeMap.insert( "SLV", i18n("El Salvador") );
 
116
        countryCodeMap.insert( "GNQ", i18n("Equatorial Guinea") );
 
117
        countryCodeMap.insert( "ERI", i18n("Eritrea") );
 
118
        countryCodeMap.insert( "EST", i18n("Estonia") );
 
119
        countryCodeMap.insert( "ETH", i18n("Ethiopia") );
 
120
        countryCodeMap.insert( "FRO", i18n("Faeroe Islands") );
 
121
        countryCodeMap.insert( "FLK", i18n("Falkland Islands") );
 
122
        countryCodeMap.insert( "FJI", i18n("Fiji Islands") );
 
123
        countryCodeMap.insert( "FIN", i18n("Finland") );
 
124
        countryCodeMap.insert( "FRA", i18n("France") );
 
125
        countryCodeMap.insert( "GUF", i18n("French Guiana") );
 
126
        countryCodeMap.insert( "PYF", i18n("French Polynesia") );
 
127
        countryCodeMap.insert( "ATF", i18n("French Southern Territories") );
 
128
        countryCodeMap.insert( "GAB", i18n("Gabon") );
 
129
        countryCodeMap.insert( "GMB", i18n("Gambia") );
 
130
        countryCodeMap.insert( "GEO", i18n("Georgia") );
 
131
        countryCodeMap.insert( "DEU", i18n("Germany") );
 
132
        countryCodeMap.insert( "GHA", i18n("Ghana") );
 
133
        countryCodeMap.insert( "GIB", i18n("Gibraltar") );
 
134
        countryCodeMap.insert( "GRC", i18n("Greece") );
 
135
        countryCodeMap.insert( "GRL", i18n("Greenland") );
 
136
        countryCodeMap.insert( "GRD", i18n("Grenada") );
 
137
        countryCodeMap.insert( "GLP", i18n("Guadaloupe") );
 
138
        countryCodeMap.insert( "GUM", i18n("Guam") );
 
139
        countryCodeMap.insert( "GTM", i18n("Guatemala") );
 
140
        countryCodeMap.insert( "GIN", i18n("Guinea") );
 
141
        countryCodeMap.insert( "GNB", i18n("Guinea-Bissau") );
 
142
        countryCodeMap.insert( "GUY", i18n("Guyana") );
 
143
        countryCodeMap.insert( "HTI", i18n("Haiti") );
 
144
        countryCodeMap.insert( "HMD", i18n("Heard and McDonald Islands") );
 
145
        countryCodeMap.insert( "VAT", i18n("Vatican") );
 
146
        countryCodeMap.insert( "HND", i18n("Honduras") );
 
147
        countryCodeMap.insert( "HKG", i18n("Hong Kong") );
 
148
        countryCodeMap.insert( "HRV", i18n("Croatia") );
 
149
        countryCodeMap.insert( "HUN", i18n("Hungary") );
 
150
        countryCodeMap.insert( "ISL", i18n("Iceland") );
 
151
        countryCodeMap.insert( "IND", i18n("India") );
 
152
        countryCodeMap.insert( "IDN", i18n("Indonesia") );
 
153
        countryCodeMap.insert( "IRN", i18n("Iran") );
 
154
        countryCodeMap.insert( "IRQ", i18n("Iraq") );
 
155
        countryCodeMap.insert( "IRL", i18n("Ireland") );
 
156
        countryCodeMap.insert( "ISR", i18n("Israel") );
 
157
        countryCodeMap.insert( "ITA", i18n("Italy") );
 
158
        countryCodeMap.insert( "JAM", i18n("Jamaica") );
 
159
        countryCodeMap.insert( "JPN", i18n("Japan") );
 
160
        countryCodeMap.insert( "JOR", i18n("Jordan") );
 
161
        countryCodeMap.insert( "KAZ", i18n("Kazakhstan") );
 
162
        countryCodeMap.insert( "KEN", i18n("Kenya") );
 
163
        countryCodeMap.insert( "KIR", i18n("Kiribati") );
 
164
        countryCodeMap.insert( "PRK", i18n("North-Korea") );
 
165
        countryCodeMap.insert( "KOR", i18n("South-Korea") );
 
166
        countryCodeMap.insert( "KWT", i18n("Kuwait") );
 
167
        countryCodeMap.insert( "KGZ", i18n("Kyrgyz Republic") );
 
168
        countryCodeMap.insert( "LAO", i18n("Lao") );
 
169
        countryCodeMap.insert( "LVA", i18n("Latvia") );
 
170
        countryCodeMap.insert( "LBN", i18n("Lebanon") );
 
171
        countryCodeMap.insert( "LSO", i18n("Lesotho") );
 
172
        countryCodeMap.insert( "LBR", i18n("Liberia") );
 
173
        countryCodeMap.insert( "LBY", i18n("Libyan Arab Jamahiriya") );
 
174
        countryCodeMap.insert( "LIE", i18n("Liechtenstein") );
 
175
        countryCodeMap.insert( "LTU", i18n("Lithuania") );
 
176
        countryCodeMap.insert( "LUX", i18n("Luxembourg") );
 
177
        countryCodeMap.insert( "MAC", i18n("Macao") );
 
178
        countryCodeMap.insert( "MKD", i18n("Macedonia") );
 
179
        countryCodeMap.insert( "MDG", i18n("Madagascar") );
 
180
        countryCodeMap.insert( "MWI", i18n("Malawi") );
 
181
        countryCodeMap.insert( "MYS", i18n("Malaysia") );
 
182
        countryCodeMap.insert( "MDV", i18n("Maldives") );
 
183
        countryCodeMap.insert( "MLI", i18n("Mali") );
 
184
        countryCodeMap.insert( "MLT", i18n("Malta") );
 
185
        countryCodeMap.insert( "MHL", i18n("Marshall Islands") );
 
186
        countryCodeMap.insert( "MTQ", i18n("Martinique") );
 
187
        countryCodeMap.insert( "MRT", i18n("Mauritania") );
 
188
        countryCodeMap.insert( "MUS", i18n("Mauritius") );
 
189
        countryCodeMap.insert( "MYT", i18n("Mayotte") );
 
190
        countryCodeMap.insert( "MEX", i18n("Mexico") );
 
191
        countryCodeMap.insert( "FSM", i18n("Micronesia") );
 
192
        countryCodeMap.insert( "MDA", i18n("Moldova") );
 
193
        countryCodeMap.insert( "MCO", i18n("Monaco") );
 
194
        countryCodeMap.insert( "MNG", i18n("Mongolia") );
 
195
        countryCodeMap.insert( "MSR", i18n("Montserrat") );
 
196
        countryCodeMap.insert( "MAR", i18n("Morocco") );
 
197
        countryCodeMap.insert( "MOZ", i18n("Mozambique") );
 
198
        countryCodeMap.insert( "MMR", i18n("Myanmar") );
 
199
        countryCodeMap.insert( "NAM", i18n("Namibia") );
 
200
        countryCodeMap.insert( "NRU", i18n("Nauru") );
 
201
        countryCodeMap.insert( "NPL", i18n("Nepal") );
 
202
        countryCodeMap.insert( "ANT", i18n("Netherlands Antilles") );
 
203
        countryCodeMap.insert( "NLD", i18n("Netherlands") );
 
204
        countryCodeMap.insert( "NCL", i18n("New Caledonia") );
 
205
        countryCodeMap.insert( "NZL", i18n("New Zealand") );
 
206
        countryCodeMap.insert( "NIC", i18n("Nicaragua") );
 
207
        countryCodeMap.insert( "NER", i18n("Niger") );
 
208
        countryCodeMap.insert( "NGA", i18n("Nigeria") );
 
209
        countryCodeMap.insert( "NIU", i18n("Niue") );
 
210
        countryCodeMap.insert( "NFK", i18n("Norfolk Island") );
 
211
        countryCodeMap.insert( "MNP", i18n("Northern Mariana Islands") );
 
212
        countryCodeMap.insert( "NOR", i18n("Norway") );
 
213
        countryCodeMap.insert( "OMN", i18n("Oman") );
 
214
        countryCodeMap.insert( "PAK", i18n("Pakistan") );
 
215
        countryCodeMap.insert( "PLW", i18n("Palau") );
 
216
        countryCodeMap.insert( "PSE", i18n("Palestinian Territory") );
 
217
        countryCodeMap.insert( "PAN", i18n("Panama") );
 
218
        countryCodeMap.insert( "PNG", i18n("Papua New Guinea") );
 
219
        countryCodeMap.insert( "PRY", i18n("Paraguay") );
 
220
        countryCodeMap.insert( "PER", i18n("Peru") );
 
221
        countryCodeMap.insert( "PHL", i18n("Philippines") );
 
222
        countryCodeMap.insert( "PCN", i18n("Pitcairn Island") );
 
223
        countryCodeMap.insert( "POL", i18n("Poland") );
 
224
        countryCodeMap.insert( "PRT", i18n("Portugal") );
 
225
        countryCodeMap.insert( "PRI", i18n("Puerto Rico") );
 
226
        countryCodeMap.insert( "QAT", i18n("Qatar") );
 
227
        countryCodeMap.insert( "REU", i18n("Reunion") );
 
228
        countryCodeMap.insert( "ROU", i18n("Romania") );
 
229
        countryCodeMap.insert( "RUS", i18n("Russian Federation") );
 
230
        countryCodeMap.insert( "RWA", i18n("Rwanda") );
 
231
        countryCodeMap.insert( "SHN", i18n("St. Helena") );
 
232
        countryCodeMap.insert( "KNA", i18n("St. Kitts and Nevis") );
 
233
        countryCodeMap.insert( "LCA", i18n("St. Lucia") );
 
234
        countryCodeMap.insert( "SPM", i18n("St. Pierre and Miquelon") );
 
235
        countryCodeMap.insert( "VCT", i18n("St. Vincent and the Grenadines") );
 
236
        countryCodeMap.insert( "WSM", i18n("Samoa") );
 
237
        countryCodeMap.insert( "SMR", i18n("San Marino") );
 
238
        countryCodeMap.insert( "STP", i18n("Sao Tome and Principe") );
 
239
        countryCodeMap.insert( "SAU", i18n("Saudi Arabia") );
 
240
        countryCodeMap.insert( "SEN", i18n("Senegal") );
 
241
        countryCodeMap.insert( "SCG", i18n("Serbia and Montenegro") );
 
242
        countryCodeMap.insert( "SYC", i18n("Seychelles") );
 
243
        countryCodeMap.insert( "SLE", i18n("Sierra Leone") );
 
244
        countryCodeMap.insert( "SGP", i18n("Singapore") );
 
245
        countryCodeMap.insert( "SVK", i18n("Slovakia") );
 
246
        countryCodeMap.insert( "SVN", i18n("Slovenia") );
 
247
        countryCodeMap.insert( "SLB", i18n("Solomon Islands") );
 
248
        countryCodeMap.insert( "SOM", i18n("Somalia") );
 
249
        countryCodeMap.insert( "ZAF", i18n("South Africa") );
 
250
        countryCodeMap.insert( "SGS", i18n("South Georgia and the South Sandwich Islands") );
 
251
        countryCodeMap.insert( "ESP", i18n("Spain") );
 
252
        countryCodeMap.insert( "LKA", i18n("Sri Lanka") );
 
253
        countryCodeMap.insert( "SDN", i18n("Sudan") );
 
254
        countryCodeMap.insert( "SUR", i18n("Suriname") );
 
255
        countryCodeMap.insert( "SJM", i18n("Svalbard & Jan Mayen Islands") );
 
256
        countryCodeMap.insert( "SWZ", i18n("Swaziland") );
 
257
        countryCodeMap.insert( "SWE", i18n("Sweden") );
 
258
        countryCodeMap.insert( "CHE", i18n("Switzerland") );
 
259
        countryCodeMap.insert( "SYR", i18n("Syrian Arab Republic") );
 
260
        countryCodeMap.insert( "TWN", i18n("Taiwan") );
 
261
        countryCodeMap.insert( "TJK", i18n("Tajikistan") );
 
262
        countryCodeMap.insert( "TZA", i18n("Tanzania") );
 
263
        countryCodeMap.insert( "THA", i18n("Thailand") );
 
264
        countryCodeMap.insert( "TLS", i18n("Timor-Leste") );
 
265
        countryCodeMap.insert( "TGO", i18n("Togo") );
 
266
        countryCodeMap.insert( "TKL", i18n("Tokelau Islands") );
 
267
        countryCodeMap.insert( "TON", i18n("Tonga") );
 
268
        countryCodeMap.insert( "TTO", i18n("Trinidad and Tobago") );
 
269
        countryCodeMap.insert( "TUN", i18n("Tunisia") );
 
270
        countryCodeMap.insert( "TUR", i18n("Turkey") );
 
271
        countryCodeMap.insert( "TKM", i18n("Turkmenistan") );
 
272
        countryCodeMap.insert( "TCA", i18n("Turks and Caicos Islands") );
 
273
        countryCodeMap.insert( "TUV", i18n("Tuvalu") );
 
274
        countryCodeMap.insert( "VIR", i18n("US Virgin Islands") );
 
275
        countryCodeMap.insert( "UGA", i18n("Uganda") );
 
276
        countryCodeMap.insert( "UKR", i18n("Ukraine") );
 
277
        countryCodeMap.insert( "ARE", i18n("United Arab Emirates") );
 
278
        countryCodeMap.insert( "GBR", i18n("United Kingdom") );
 
279
        countryCodeMap.insert( "UMI", i18n("United States Minor Outlying Islands") );
 
280
        countryCodeMap.insert( "USA", i18n("United States of America") );
 
281
        countryCodeMap.insert( "URY", i18n("Uruguay, Eastern Republic of") );
 
282
        countryCodeMap.insert( "UZB", i18n("Uzbekistan") );
 
283
        countryCodeMap.insert( "VUT", i18n("Vanuatu") );
 
284
        countryCodeMap.insert( "VEN", i18n("Venezuela") );
 
285
        countryCodeMap.insert( "VNM", i18n("Viet Nam") );
 
286
        countryCodeMap.insert( "WLF", i18n("Wallis and Futuna Islands ") );
 
287
        countryCodeMap.insert( "ESH", i18n("Western Sahara") );
 
288
        countryCodeMap.insert( "YEM", i18n("Yemen") );
 
289
        countryCodeMap.insert( "ZMB", i18n("Zambia") );
 
290
        countryCodeMap.insert( "ZWE", i18n("Zimbabwe") );
 
291
 
 
292
        // Supplemental IPTC/IIM country codes.
 
293
 
 
294
        countryCodeMap.insert( "XUN", i18n("United Nations") );
 
295
        countryCodeMap.insert( "XEU", i18n("European Union") );
 
296
        countryCodeMap.insert( "XSP", i18n("Space") );
 
297
        countryCodeMap.insert( "XSE", i18n("At Sea") );
 
298
        countryCodeMap.insert( "XIF", i18n("In Flight") );
 
299
        countryCodeMap.insert( "XEN", i18n("England") );
 
300
        countryCodeMap.insert( "XSC", i18n("Scotland") );
 
301
        countryCodeMap.insert( "XNI", i18n("Northern Ireland") );
 
302
        countryCodeMap.insert( "XWA", i18n("Wales") );
 
303
        countryCodeMap.insert( "PSE", i18n("Palestine") );
 
304
        countryCodeMap.insert( "GZA", i18n("Gaza") );
 
305
        countryCodeMap.insert( "JRO", i18n("Jericho") );
 
306
    }
 
307
 
 
308
    typedef QMap<QString, QString> CountryCodeMap;
 
309
 
 
310
    CountryCodeMap                 countryCodeMap;
 
311
};
 
312
 
 
313
CountrySelector::CountrySelector(QWidget* parent)
 
314
               : KComboBox(parent), d(new CountrySelectorPriv)
 
315
{
 
316
    for (CountrySelectorPriv::CountryCodeMap::Iterator it = d->countryCodeMap.begin();
 
317
         it != d->countryCodeMap.end(); ++it)
 
318
    {
 
319
        addItem(QString("%1 - %2").arg(it.key()).arg(it.value()));
 
320
    }
 
321
 
 
322
    model()->sort(0);
 
323
 
 
324
    insertSeparator(count());
 
325
    addItem(i18n("Unknown"));
 
326
}
 
327
 
 
328
CountrySelector::~CountrySelector()
 
329
{
 
330
    delete d;
 
331
}
 
332
 
 
333
void CountrySelector::setCountry(const QString& countryCode)
 
334
{
 
335
    // NOTE: if countryCode is empty or do not matches code map, unknow is selected from the list.
 
336
 
 
337
    int id = count()-1;
 
338
    for (int i = 0 ; i < d->countryCodeMap.count() ; i++)
 
339
    {
 
340
        if (itemText(i).left(3) == countryCode)
 
341
        {
 
342
            id = i;
 
343
            break;
 
344
        }
 
345
    }
 
346
    setCurrentIndex(id);
 
347
 
 
348
    kDebug() << count() << " :: " << id;
 
349
}
 
350
 
 
351
bool CountrySelector::country(QString& countryCode, QString& countryName)
 
352
{
 
353
    // Unknow is selected ?
 
354
    if (currentIndex() == count()-1)
 
355
        return false;
 
356
 
 
357
    countryName = currentText().mid(6);
 
358
    countryCode = currentText().left(3);
 
359
    return true;
 
360
}
 
361
 
 
362
QString CountrySelector::countryForCode(const QString& countryCode)
 
363
{
 
364
    CountrySelectorPriv priv;
 
365
    return (priv.countryCodeMap[countryCode]);
 
366
}
 
367
 
 
368
}  // namespace KExiv2Iface