Diffstat (limited to 'inputmethods/pickboard/pickboardcfg.h') (more/less context) (show whitespace changes)
-rw-r--r-- | inputmethods/pickboard/pickboardcfg.h | 19 |
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,8 +1,8 @@ /********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** -** This file is part of Qtopia Environment. +** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the @@ -75,9 +75,10 @@ private: LetterChoice **lc; int nlc; }; -class PickboardConfig : QObject { +class PickboardConfig : public QObject { + Q_OBJECT public: PickboardConfig(PickboardPicks* p) : parent(p), nrows(2), pressx(-1) { } virtual ~PickboardConfig(); virtual void pickPoint(const QPoint& p, bool press); @@ -103,23 +104,25 @@ private: int pressrow, pressx; }; class StringConfig : public PickboardConfig { + Q_OBJECT public: StringConfig(PickboardPicks* p) : PickboardConfig(p) { } void draw(QPainter* p); protected: virtual QString text(int r, int i)=0; virtual bool spreadRow(int i)=0; - virtual QColor rowColor(int) { return ::Qt::black; } + virtual QColor rowColor(int) { return Qt::black; } virtual void pickInRow(int r, int xpos, bool press); virtual void updateItem(int r, int i); virtual bool highlight(int,int) const; }; class CharStringConfig : public StringConfig { + Q_OBJECT QString input; QStringList chars; public: CharStringConfig(PickboardPicks* p) : StringConfig(p) { } @@ -133,9 +136,11 @@ protected: void pick(bool press, int row, int item); }; class DictFilterConfig : public StringConfig { + Q_OBJECT QStringList matches; + QStringList sets_a; QStringList sets; QStringList othermodes; int lit0; int lit1; @@ -151,9 +156,9 @@ public: lit0 = -1; lit1 = -1; } - void addSet(const QString& s); + void addSet(const QString& apperance, const QString& set); void addMode(const QString& s); void fillMenu(QPopupMenu& menu); void doMenu(int i); @@ -174,8 +179,9 @@ protected: bool highlight(int r,int c) const; }; class CharConfig : public StringConfig { + Q_OBJECT QStringList chars1; QStringList chars2; public: CharConfig(PickboardPicks* p) : StringConfig(p) { } @@ -191,10 +197,9 @@ class KeycodeConfig : public PickboardConfig { QValueList<int> keys1; QValueList<int> keys2; QValueList<QPixmap> keypm1; QValueList<QPixmap> keypm2; - static const int xw = 8; - static const int xmarg = 8; + enum { xw = 8, xmarg = 8 }; public: KeycodeConfig(PickboardPicks* p) : PickboardConfig(p) { } void addKey(int r, const QPixmap& pm, int code); |