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