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