summaryrefslogtreecommitdiff
path: root/inputmethods/pickboard/pickboardcfg.h
Unidiff
Diffstat (limited to 'inputmethods/pickboard/pickboardcfg.h') (more/less context) (show whitespace changes)
-rw-r--r--inputmethods/pickboard/pickboardcfg.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/inputmethods/pickboard/pickboardcfg.h b/inputmethods/pickboard/pickboardcfg.h
index b1913df..92c6420 100644
--- a/inputmethods/pickboard/pickboardcfg.h
+++ b/inputmethods/pickboard/pickboardcfg.h
@@ -1,7 +1,7 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
@@ -76,7 +76,8 @@ private:
76 int nlc; 76 int nlc;
77}; 77};
78 78
79class PickboardConfig : QObject { 79class PickboardConfig : public QObject {
80 Q_OBJECT
80public: 81public:
81 PickboardConfig(PickboardPicks* p) : parent(p), nrows(2), pressx(-1) { } 82 PickboardConfig(PickboardPicks* p) : parent(p), nrows(2), pressx(-1) { }
82 virtual ~PickboardConfig(); 83 virtual ~PickboardConfig();
@@ -104,6 +105,7 @@ private:
104}; 105};
105 106
106class StringConfig : public PickboardConfig { 107class StringConfig : public PickboardConfig {
108 Q_OBJECT
107public: 109public:
108 StringConfig(PickboardPicks* p) : PickboardConfig(p) { } 110 StringConfig(PickboardPicks* p) : PickboardConfig(p) { }
109 111
@@ -112,13 +114,14 @@ public:
112protected: 114protected:
113 virtual QString text(int r, int i)=0; 115 virtual QString text(int r, int i)=0;
114 virtual bool spreadRow(int i)=0; 116 virtual bool spreadRow(int i)=0;
115 virtual QColor rowColor(int) { return ::Qt::black; } 117 virtual QColor rowColor(int) { return Qt::black; }
116 virtual void pickInRow(int r, int xpos, bool press); 118 virtual void pickInRow(int r, int xpos, bool press);
117 virtual void updateItem(int r, int i); 119 virtual void updateItem(int r, int i);
118 virtual bool highlight(int,int) const; 120 virtual bool highlight(int,int) const;
119}; 121};
120 122
121class CharStringConfig : public StringConfig { 123class CharStringConfig : public StringConfig {
124 Q_OBJECT
122 QString input; 125 QString input;
123 QStringList chars; 126 QStringList chars;
124public: 127public:
@@ -134,7 +137,9 @@ protected:
134}; 137};
135 138
136class DictFilterConfig : public StringConfig { 139class DictFilterConfig : public StringConfig {
140 Q_OBJECT
137 QStringList matches; 141 QStringList matches;
142 QStringList sets_a;
138 QStringList sets; 143 QStringList sets;
139 QStringList othermodes; 144 QStringList othermodes;
140 int lit0; 145 int lit0;
@@ -152,7 +157,7 @@ public:
152 lit1 = -1; 157 lit1 = -1;
153 } 158 }
154 159
155 void addSet(const QString& s); 160 void addSet(const QString& apperance, const QString& set);
156 void addMode(const QString& s); 161 void addMode(const QString& s);
157 162
158 void fillMenu(QPopupMenu& menu); 163 void fillMenu(QPopupMenu& menu);
@@ -175,6 +180,7 @@ protected:
175}; 180};
176 181
177class CharConfig : public StringConfig { 182class CharConfig : public StringConfig {
183 Q_OBJECT
178 QStringList chars1; 184 QStringList chars1;
179 QStringList chars2; 185 QStringList chars2;
180public: 186public:
@@ -192,8 +198,7 @@ class KeycodeConfig : public PickboardConfig {
192 QValueList<int> keys2; 198 QValueList<int> keys2;
193 QValueList<QPixmap> keypm1; 199 QValueList<QPixmap> keypm1;
194 QValueList<QPixmap> keypm2; 200 QValueList<QPixmap> keypm2;
195 static const int xw = 8; 201 enum { xw = 8, xmarg = 8 };
196 static const int xmarg = 8;
197 202
198public: 203public:
199 KeycodeConfig(PickboardPicks* p) : PickboardConfig(p) { } 204 KeycodeConfig(PickboardPicks* p) : PickboardConfig(p) { }