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