author | mickeyl <mickeyl> | 2003-10-19 19:47:13 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-10-19 19:47:13 (UTC) |
commit | b96ee77f28d8d2e697528290204f15913c3f4c3e (patch) (side-by-side diff) | |
tree | 603b15d584bfcd9ee90b2e95a6852c028d7d5247 /core/launcher/inputmethods.h | |
parent | 38d72acc2225b88b2f561fa59565d4c66261f1c3 (diff) | |
download | opie-b96ee77f28d8d2e697528290204f15913c3f4c3e.zip opie-b96ee77f28d8d2e697528290204f15913c3f4c3e.tar.gz opie-b96ee77f28d8d2e697528290204f15913c3f4c3e.tar.bz2 |
This patch finish the work on the resizable inputmethods.
- in "floating" mode, input methods now remember their geometry
- if closed via (x), the inputmethod button is toggled accordingly
- eliminated the focus problem
-rw-r--r-- | core/launcher/inputmethods.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/launcher/inputmethods.h b/core/launcher/inputmethods.h index 246661a..55ac020 100644 --- a/core/launcher/inputmethods.h +++ b/core/launcher/inputmethods.h @@ -28,85 +28,86 @@ #include <qvaluelist.h> class QToolButton; class QWidgetStack; struct InputMethod { #ifndef QT_NO_COMPONENT QLibrary *library; #endif QWidget *widget; QString libName; bool newIM; union { InputMethodInterface *interface; ExtInputMethodInterface *extInterface; }; inline void releaseInterface() { newIM ? (void)extInterface->release() : (void)interface->release(); library->unload(); delete library; library = 0l; } inline QString name() const { return newIM ? extInterface->name() : interface->name(); } inline QPixmap *icon() const { return newIM ? extInterface->icon() : interface->icon(); } inline QUnknownInterface *iface() { return newIM ? (QUnknownInterface *)extInterface : (QUnknownInterface *)interface; } inline void resetState() { if ( !newIM ) interface->resetState(); } int operator <(const InputMethod& o) const; int operator >(const InputMethod& o) const; int operator <=(const InputMethod& o) const; }; class InputMethods : public QWidget { Q_OBJECT public: InputMethods( QWidget * ); ~InputMethods(); QRect inputRect() const; bool shown() const; QString currentShown() const; // name of interface void showInputMethod(const QString& id); void showInputMethod(); void hideInputMethod(); void unloadInputMethods(); void loadInputMethods(); + virtual bool eventFilter( QObject *, QEvent * ); signals: void inputToggled( bool on ); private slots: void chooseKbd(); void chooseIm(); void showKbd( bool ); void resetStates(); void sendKey( ushort unicode, ushort scancode, ushort modifiers, bool, bool ); void qcopReceive( const QCString &msg, const QByteArray &data ); private: void setPreferedHandlers(); /*static */QStringList plugins()const; /*static */void installTranslator( const QString& ); void unloadMethod( QValueList<InputMethod>& ); void chooseMethod(InputMethod* im); void chooseKeyboard(InputMethod* im); void updateKeyboards(InputMethod *im); private: QToolButton *kbdButton; QToolButton *kbdChoice; QWidgetStack *imButton; // later will be widget stack QToolButton *imChoice; InputMethod *mkeyboard; InputMethod *imethod; QValueList<InputMethod> inputMethodList; QValueList<InputMethod> inputModifierList; int inputWidgetStyle; int inputWidgetWidth; }; #endif // __INPUT_METHODS_H__ |