Vidalia 0.2.10
|
00001 /* 00002 ** This file is part of Vidalia, and is subject to the license terms in the 00003 ** LICENSE file, found in the top level directory of this distribution. If you 00004 ** did not receive the LICENSE file with this file, you may obtain it from the 00005 ** Vidalia source package distributed by the Vidalia Project at 00006 ** http://www.vidalia-project.net/. No part of Vidalia, including this file, 00007 ** may be copied, modified, propagated, or distributed except according to the 00008 ** terms described in the LICENSE file. 00009 */ 00010 00011 /* 00012 ** \file CountryInfo.h 00013 ** \version $Id: CountryInfo.h 4378 2010-08-05 20:28:54Z edmanm $ 00014 ** \brief Provides a method to look up a localized country name given its 00015 ** ISO 3166-1 2-letter country code. 00016 */ 00017 00018 #ifndef _COUNTRYINFO_H 00019 #define _COUNTRYINFO_H 00020 00021 #include <QObject> 00022 #include <QString> 00023 #include <QPair> 00024 00025 00026 class CountryInfo : public QObject 00027 { 00028 Q_OBJECT 00029 00030 public: 00031 /** Default constructor. 00032 */ 00033 CountryInfo(QObject *parent = 0); 00034 00035 /** Returns the name of the country represented by <b>countryCode</b>, where 00036 * <b>countryCode</b> is a 2-letter ISO 3166-1 alpha-2 two-letter country 00037 * code. The name will be returned translated to the current locale if an 00038 * appropriate QTranslator is currently installed. 00039 */ 00040 static QString countryName(const QString &countryCode); 00041 00042 /** 00043 */ 00044 static QPair<float,float> countryLocation(const QString &countryCode); 00045 }; 00046 00047 #endif 00048