summaryrefslogtreecommitdiff
path: root/inputmethods/kjumpx/keyboardimpl.cpp
Unidiff
Diffstat (limited to 'inputmethods/kjumpx/keyboardimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/kjumpx/keyboardimpl.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/inputmethods/kjumpx/keyboardimpl.cpp b/inputmethods/kjumpx/keyboardimpl.cpp
index 976d816..54fe36e 100644
--- a/inputmethods/kjumpx/keyboardimpl.cpp
+++ b/inputmethods/kjumpx/keyboardimpl.cpp
@@ -39,59 +39,61 @@ KeyboardImpl::KeyboardImpl()
39{ 39{
40} 40}
41 41
42KeyboardImpl::~KeyboardImpl() 42KeyboardImpl::~KeyboardImpl()
43{ 43{
44 delete input; 44 delete input;
45 delete icn; 45 delete icn;
46} 46}
47 47
48QWidget *KeyboardImpl::inputMethod( QWidget *parent, Qt::WFlags f ) 48QWidget *KeyboardImpl::inputMethod( QWidget *parent, Qt::WFlags f )
49{ 49{
50 if ( !input ) 50 if ( !input )
51 input = new KJumpX::Keyboard( parent, "Keyboard", f ); 51 input = new KJumpX::Keyboard( parent, "Keyboard", f );
52 return input; 52 return input;
53} 53}
54 54
55void KeyboardImpl::resetState() 55void KeyboardImpl::resetState()
56{ 56{
57 if ( input ) 57 if ( input )
58 input->resetState(); 58 input->resetState();
59} 59}
60 60
61QPixmap *KeyboardImpl::icon() 61QPixmap *KeyboardImpl::icon()
62{ 62{
63 if ( !icn ) 63 if ( !icn )
64 icn = new QPixmap( (const char **)icon_xpm ); 64 icn = new QPixmap( (const char **)icon_xpm );
65 return icn; 65 return icn;
66} 66}
67 67
68QString KeyboardImpl::name() 68QString KeyboardImpl::name()
69{ 69{
70 return qApp->translate( "InputMethods", "KJumpX" ); 70 return qApp->translate( "InputMethods", "KJumpX" );
71} 71}
72 72
73void KeyboardImpl::onKeyPress( QObject *receiver, const char *slot ) 73void KeyboardImpl::onKeyPress( QObject *receiver, const char *slot )
74{ 74{
75 if ( input ) 75 if ( input )
76 QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot ); 76 QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot );
77} 77}
78 78
79#ifndef QT_NO_COMPONENT 79#ifndef QT_NO_COMPONENT
80QRESULT KeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 80QRESULT KeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
81{ 81{
82 *iface = 0; 82 *iface = 0;
83 if ( uuid == IID_QUnknown ) 83 if ( uuid == IID_QUnknown )
84 *iface = this; 84 *iface = this;
85 else if ( uuid == IID_InputMethod ) 85 else if ( uuid == IID_InputMethod )
86 *iface = this; 86 *iface = this;
87 else
88 return QS_FALSE;
87 89
88 if ( *iface ) 90 if ( *iface )
89 (*iface)->addRef(); 91 (*iface)->addRef();
90 return QS_OK; 92 return QS_OK;
91} 93}
92 94
93Q_EXPORT_INTERFACE() 95Q_EXPORT_INTERFACE()
94{ 96{
95 Q_CREATE_INSTANCE( KeyboardImpl ) 97 Q_CREATE_INSTANCE( KeyboardImpl )
96} 98}
97#endif 99#endif