]> git.sur5r.net Git - minitube/blob - src/ytregions.h
Imported Upstream version 2.0
[minitube] / src / ytregions.h
1 #ifndef YTREGIONS_H
2 #define YTREGIONS_H
3
4 #include <QtGui>
5
6 struct YTRegion {
7     QString id;
8     QString name;
9     bool operator<(const YTRegion &other) const {
10         return name < other.name;
11     }
12 };
13
14 class YTRegions : public QObject {
15
16 public:
17     static const QList<YTRegion> & list();
18     static const YTRegion & localRegion();
19     static const YTRegion & worldwideRegion();
20     static void setRegion(QString regionId);
21     static QString currentRegionId();
22     static YTRegion currentRegion();
23     static QIcon iconForRegionId(QString regionId);
24
25 private:
26     static YTRegion r(QString name, QString id);
27     static YTRegion regionById(QString id);
28     YTRegions();
29
30 };
31
32 #endif // YTREGIONS_H