summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/inputmethods.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/launcher/inputmethods.cpp b/core/launcher/inputmethods.cpp
index 24669ac..9e2a11d 100644
--- a/core/launcher/inputmethods.cpp
+++ b/core/launcher/inputmethods.cpp
@@ -35,97 +35,97 @@ using namespace Opie::Core;
35#include <qlayout.h> 35#include <qlayout.h>
36#include <qdir.h> 36#include <qdir.h>
37#include <qtl.h> 37#include <qtl.h>
38#ifdef Q_WS_QWS 38#ifdef Q_WS_QWS
39#include <qwindowsystem_qws.h> 39#include <qwindowsystem_qws.h>
40#include <qwsevent_qws.h> 40#include <qwsevent_qws.h>
41#include <qcopchannel_qws.h> 41#include <qcopchannel_qws.h>
42#endif 42#endif
43 43
44/* STD */ 44/* STD */
45#include <stdlib.h> 45#include <stdlib.h>
46 46
47/* XPM */ 47/* XPM */
48static const char * tri_xpm[]={ 48static const char * tri_xpm[]={
49"9 9 2 1", 49"9 9 2 1",
50"a c #000000", 50"a c #000000",
51". c None", 51". c None",
52".........", 52".........",
53".........", 53".........",
54".........", 54".........",
55"....a....", 55"....a....",
56"...aaa...", 56"...aaa...",
57"..aaaaa..", 57"..aaaaa..",
58".aaaaaaa.", 58".aaaaaaa.",
59".........", 59".........",
60"........."}; 60"........."};
61 61
62int InputMethod::operator <(const InputMethod& o) const 62int InputMethod::operator <(const InputMethod& o) const
63{ 63{
64 return name() < o.name(); 64 return name() < o.name();
65} 65}
66int InputMethod::operator >(const InputMethod& o) const 66int InputMethod::operator >(const InputMethod& o) const
67{ 67{
68 return name() > o.name(); 68 return name() > o.name();
69} 69}
70int InputMethod::operator <=(const InputMethod& o) const 70int InputMethod::operator <=(const InputMethod& o) const
71{ 71{
72 return name() <= o.name(); 72 return name() <= o.name();
73} 73}
74 74
75 75
76/* 76/*
77 Slightly hacky: We use WStyle_Tool as a flag to say "this widget 77 Slightly hacky: We use WStyle_Tool as a flag to say "this widget
78 belongs to the IM system, so clicking it should not cause a reset". 78 belongs to the IM system, so clicking it should not cause a reset".
79 */ 79 */
80class IMToolButton : public QToolButton 80class IMToolButton : public QToolButton
81{ 81{
82public: 82public:
83 IMToolButton::IMToolButton( QWidget *parent ) : QToolButton( parent ) 83 IMToolButton( QWidget *parent ) : QToolButton( parent )
84 { setWFlags( WStyle_Tool ); 84 { setWFlags( WStyle_Tool );
85 setBackgroundOrigin( ParentOrigin ); 85 setBackgroundOrigin( ParentOrigin );
86 setBackgroundMode( PaletteBackground ); 86 setBackgroundMode( PaletteBackground );
87 } 87 }
88}; 88};
89 89
90 90
91InputMethods::InputMethods( QWidget *parent ) : 91InputMethods::InputMethods( QWidget *parent ) :
92 QWidget( parent, "InputMethods", WStyle_Tool | WStyle_Customize ), 92 QWidget( parent, "InputMethods", WStyle_Tool | WStyle_Customize ),
93 mkeyboard(0), imethod(0) 93 mkeyboard(0), imethod(0)
94{ 94{
95 readConfig(); 95 readConfig();
96 96
97 setBackgroundOrigin( ParentOrigin ); 97 setBackgroundOrigin( ParentOrigin );
98 setBackgroundMode( PaletteBackground ); 98 setBackgroundMode( PaletteBackground );
99 QHBoxLayout *hbox = new QHBoxLayout( this ); 99 QHBoxLayout *hbox = new QHBoxLayout( this );
100 100
101 kbdButton = new IMToolButton( this); 101 kbdButton = new IMToolButton( this);
102 kbdButton->setFocusPolicy(NoFocus); 102 kbdButton->setFocusPolicy(NoFocus);
103 kbdButton->setToggleButton( TRUE ); 103 kbdButton->setToggleButton( TRUE );
104 if (parent->sizeHint().height() > 0) 104 if (parent->sizeHint().height() > 0)
105 kbdButton->setFixedHeight( parent->sizeHint().height() ); 105 kbdButton->setFixedHeight( parent->sizeHint().height() );
106 kbdButton->setFixedWidth( 32 ); 106 kbdButton->setFixedWidth( 32 );
107 kbdButton->setAutoRaise( TRUE ); 107 kbdButton->setAutoRaise( TRUE );
108 kbdButton->setUsesBigPixmap( TRUE ); 108 kbdButton->setUsesBigPixmap( TRUE );
109 hbox->addWidget( kbdButton ); 109 hbox->addWidget( kbdButton );
110 connect( kbdButton, SIGNAL(toggled(bool)), this, SLOT(showKbd(bool)) ); 110 connect( kbdButton, SIGNAL(toggled(bool)), this, SLOT(showKbd(bool)) );
111 111
112 kbdChoice = new IMToolButton( this ); 112 kbdChoice = new IMToolButton( this );
113 kbdChoice->setFocusPolicy(NoFocus); 113 kbdChoice->setFocusPolicy(NoFocus);
114 kbdChoice->setPixmap( QPixmap( (const char **)tri_xpm ) ); 114 kbdChoice->setPixmap( QPixmap( (const char **)tri_xpm ) );
115 if (parent->sizeHint().height() > 0) 115 if (parent->sizeHint().height() > 0)
116 kbdChoice->setFixedHeight( parent->sizeHint().height() ); 116 kbdChoice->setFixedHeight( parent->sizeHint().height() );
117 kbdChoice->setFixedWidth( 13 ); 117 kbdChoice->setFixedWidth( 13 );
118 kbdChoice->setAutoRaise( TRUE ); 118 kbdChoice->setAutoRaise( TRUE );
119 hbox->addWidget( kbdChoice ); 119 hbox->addWidget( kbdChoice );
120 connect( kbdChoice, SIGNAL(clicked()), this, SLOT(chooseKbd()) ); 120 connect( kbdChoice, SIGNAL(clicked()), this, SLOT(chooseKbd()) );
121 121
122 connect( (QPEApplication*)qApp, SIGNAL(clientMoused()), 122 connect( (QPEApplication*)qApp, SIGNAL(clientMoused()),
123 this, SLOT(resetStates()) ); 123 this, SLOT(resetStates()) );
124 124
125 125
126 imButton = new QWidgetStack( this ); // later a widget stack 126 imButton = new QWidgetStack( this ); // later a widget stack
127 imButton->setFocusPolicy(NoFocus); 127 imButton->setFocusPolicy(NoFocus);
128 if (parent->sizeHint().height() > 0) 128 if (parent->sizeHint().height() > 0)
129 imButton->setFixedHeight( parent->sizeHint().height() ); 129 imButton->setFixedHeight( parent->sizeHint().height() );
130 hbox->addWidget(imButton); 130 hbox->addWidget(imButton);
131 131