Vidalia 0.3.1
CountryInfo.h
Go to the documentation of this file.
1/*
2** This file is part of Vidalia, and is subject to the license terms in the
3** LICENSE file, found in the top level directory of this distribution. If you
4** did not receive the LICENSE file with this file, you may obtain it from the
5** Vidalia source package distributed by the Vidalia Project at
6** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
7** including this file, may be copied, modified, propagated, or distributed
8** except according to the terms described in the LICENSE file.
9*/
10
11/*
12** \file CountryInfo.h
13** \brief Provides a method to look up a localized country name given its
14** ISO 3166-1 2-letter country code.
15*/
16
17#ifndef _COUNTRYINFO_H
18#define _COUNTRYINFO_H
19
20#include <QObject>
21#include <QString>
22#include <QPair>
23
24
25class CountryInfo : public QObject
26{
27 Q_OBJECT
28
29public:
30 /** Default constructor.
31 */
32 CountryInfo(QObject *parent = 0);
33
34 /** Returns the name of the country represented by <b>countryCode</b>, where
35 * <b>countryCode</b> is a 2-letter ISO 3166-1 alpha-2 two-letter country
36 * code. The name will be returned translated to the current locale if an
37 * appropriate QTranslator is currently installed.
38 */
39 static QString countryName(const QString &countryCode);
40
41 /**
42 */
43 static QPair<float,float> countryLocation(const QString &countryCode);
44};
45
46#endif
47
static QString countryName(const QString &countryCode)
Definition: CountryInfo.cpp:34
CountryInfo(QObject *parent=0)
Definition: CountryInfo.cpp:28
static QPair< float, float > countryLocation(const QString &countryCode)