summaryrefslogtreecommitdiff
path: root/inputmethods/pickboard/pickboardimpl.cpp
Unidiff
Diffstat (limited to 'inputmethods/pickboard/pickboardimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/pickboard/pickboardimpl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/inputmethods/pickboard/pickboardimpl.cpp b/inputmethods/pickboard/pickboardimpl.cpp
index a4e8f02..617acff 100644
--- a/inputmethods/pickboard/pickboardimpl.cpp
+++ b/inputmethods/pickboard/pickboardimpl.cpp
@@ -25,77 +25,78 @@
25 25
26/* XPM */ 26/* XPM */
27static const char * pb_xpm[]={ 27static const char * pb_xpm[]={
28"28 7 2 1", 28"28 7 2 1",
29"# c #303030", 29"# c #303030",
30" c None", 30" c None",
31" ########################## ", 31" ########################## ",
32" # # # # # # # ", 32" # # # # # # # ",
33" # # # # # # # ", 33" # # # # # # # ",
34" ########################## ", 34" ########################## ",
35" # # # # # # ", 35" # # # # # # ",
36" # # # # # # ", 36" # # # # # # ",
37" ########################## "}; 37" ########################## "};
38 38
39 39
40PickboardImpl::PickboardImpl() 40PickboardImpl::PickboardImpl()
41 : pickboard(0), icn(0), ref(0) 41 : pickboard(0), icn(0), ref(0)
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 return "Pickboard";
74} 75}
75 76
76void PickboardImpl::onKeyPress( QObject *receiver, const char *slot ) 77void PickboardImpl::onKeyPress( QObject *receiver, const char *slot )
77{ 78{
78 if ( pickboard ) 79 if ( pickboard )
79 QObject::connect( pickboard, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot ); 80 QObject::connect( pickboard, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot );
80} 81}
81 82
82#ifndef QT_NO_COMPONENT 83#ifndef QT_NO_COMPONENT
83QRESULT PickboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 84QRESULT PickboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
84{ 85{
85 *iface = 0; 86 *iface = 0;
86 if ( uuid == IID_QUnknown ) 87 if ( uuid == IID_QUnknown )
87 *iface = this; 88 *iface = this;
88 else if ( uuid == IID_InputMethod ) 89 else if ( uuid == IID_InputMethod )
89 *iface = this; 90 *iface = this;
90 91
91 if ( *iface ) 92 if ( *iface )
92 (*iface)->addRef(); 93 (*iface)->addRef();
93 return QS_OK; 94 return QS_OK;
94} 95}
95 96
96Q_EXPORT_INTERFACE() 97Q_EXPORT_INTERFACE()
97{ 98{
98 Q_CREATE_INSTANCE( PickboardImpl ) 99 Q_CREATE_INSTANCE( PickboardImpl )
99} 100}
100#endif 101#endif
101 102