moved kdeaccessibility kdeaddons kdeadmin kdeartwork kdebindings kdeedu kdegames...
[kdeedu.git] / kvoctrain / kvoctrain / kvt-core / langset.h
bloba1ea255d5259f175b6b39a99ed49a137f633f5c8
1 /***************************************************************************
3 $Id$
5 properties for a language
7 -----------------------------------------------------------------------
9 begin : Thu Mar 11 20:50:53 MET 1999
11 copyright : (C) 1999-2001 Ewald Arnold
12 (C) 2001 The KDE-EDU team
14 email : kvoctrain@ewald-arnold.de
16 -----------------------------------------------------------------------
18 ***************************************************************************
20 ***************************************************************************
21 * *
22 * This program is free software; you can redistribute it and/or modify *
23 * it under the terms of the GNU General Public License as published by *
24 * the Free Software Foundation; either version 2 of the License, or *
25 * (at your option) any later version. *
26 * *
27 ***************************************************************************/
31 #ifndef langset_h
32 #define langset_h
34 #include <vector>
35 using namespace std;
37 #include <qstring.h>
40 class LangSet
42 public:
44 LangSet () {}
46 void addSet (QString shortId, QString longId, QString PixMapFile,
47 const QString& shortId2 = QString::null,
48 const QString& keyboardLayout = QString::null);
50 /* void addSet (QString shortId, QString shortId2, QString longId, */
51 /* QString PixMapFile, */
52 /* const QString& keyboardLayout = QString::null); */
54 void appendSet(const LangSet &set);
56 unsigned int size () const { return langs.size(); }
57 void erase (int idx);
58 void clear ();
60 QString shortId (int index) const;
61 QString shortId2 (int index) const;
62 QString longId (int index) const;
63 QString PixMapFile (int index) const;
64 QString keyboardLayout (int index) const;
66 int indexShortId (QString shortId) const;
67 int indexLongId (QString longId) const;
68 int indexPixMapFile (QString PixMapFile) const;
69 // doesn't make sense for keyboard layouts since there is no 1-to-1 relation to languages
71 void setShortId (const QString & shortId, int index);
72 void setShortId2 (const QString & shortId2, int index);
73 void setLongId (const QString & longId, int index);
74 void setPixMapFile (const QString & PixMapFile, int index);
75 void setKeyboardLayout(const QString & layout, int index);
77 QString findShortId (const QString & longId) const;
78 QString findLongId (const QString & shortId) const;
80 private:
82 struct LangDef {
83 QString shortId,
84 shortId2,
85 longId,
86 PixMapFile,
87 keyboardLayout;
90 vector<LangDef> langs;
94 #endif // langset_h