Vidalia  0.2.15
CountryInfo.h
Go to the documentation of this file.
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.torproject.org/projects/vidalia.html. No part of Vidalia, 
00007 **  including this file, may be copied, modified, propagated, or distributed 
00008 **  except according to the terms described in the LICENSE file.
00009 */
00010 
00011 /*
00012 ** \file CountryInfo.h
00013 ** \brief Provides a method to look up a localized country name given its
00014 ** ISO 3166-1 2-letter country code.
00015 */
00016 
00017 #ifndef _COUNTRYINFO_H
00018 #define _COUNTRYINFO_H
00019 
00020 #include <QObject>
00021 #include <QString>
00022 #include <QPair>
00023 
00024 
00025 class CountryInfo : public QObject
00026 {
00027   Q_OBJECT
00028 
00029 public:
00030   /** Default constructor.
00031    */
00032   CountryInfo(QObject *parent = 0);
00033 
00034   /** Returns the name of the country represented by <b>countryCode</b>, where
00035    * <b>countryCode</b> is a 2-letter ISO 3166-1 alpha-2 two-letter country
00036    * code. The name will be returned translated to the current locale if an
00037    * appropriate QTranslator is currently installed.
00038    */
00039   static QString countryName(const QString &countryCode);
00040 
00041   /**
00042    */
00043   static QPair<float,float> countryLocation(const QString &countryCode);
00044 };
00045 
00046 #endif
00047