translate Pile   version 0.0.1
This pile provides support for an application that
translate.h
Go to the documentation of this file.
1 
10 #ifndef GUARD_TRANSLATE_H_INCLUDE
11 #define GUARD_TRANSLATE_H_INCLUDE
12 
13 #include <translate/translate-config.h>
14 #include <translate/translang.h>
15 #include <QVector>
16 
18 class TRANSLATE_EXPORT Translate {
19 
20 private:
21 
23  Translate ();
24 
26  virtual ~Translate();
27 
28 public:
29 
31  static bool
32  init (
33  QString * error);
34 
36  static void
37  end ();
38 
40  static int
41  count () {
42  if (uniq_ == NULL)
43  return 0;
44  return uniq_->d_.count();
45  }
46 
48  static const TransLang &
49  item (
50  int i);
51 
53  static const TransLang &
54  item (
55  const QString & s_name);
56 
58  static int
59  itemIndex (
60  const QString & s_name);
61 
63  static int
64  itemIndexFromLocale (
65  const QString & s_locale);
66 
68  static bool
69  validInstance (
70  const TransLang & item);
71 
73  static QTranslator *
74  translator (
75  int i);
76 
78  static QTranslator *
79  qtTranslator (
80  int i);
81 
83  static void
84  translatorDone (
85  int i);
86 
88  static int
89  current ();
90 
92  static void
93  setCurrent (int value);
94 
95 protected:
96 
97 private:
98  QVector<TransLang> d_;
99  int current_;
100  static Translate * uniq_;
101 };
102 
103 #endif // GUARD_TRANSLATE_H_INCLUDE
brief description
Definition: translang.h:19
brief description
Definition: translate.h:18
static int count()
Get the number of languages we know about.
Definition: translate.h:41