summaryrefslogtreecommitdiff
path: root/inputmethods/pickboard
authorzecke <zecke>2004-01-27 18:54:49 (UTC)
committer zecke <zecke>2004-01-27 18:54:49 (UTC)
commit829b13ec0e4ffb359ab39c16c564719908173ffa (patch) (unidiff)
tree0741e3ba2866cb4a065d614f4d38442007447a1f /inputmethods/pickboard
parentb2823e2919b746107b13ebdf603fa04cec8fba72 (diff)
downloadopie-829b13ec0e4ffb359ab39c16c564719908173ffa.zip
opie-829b13ec0e4ffb359ab39c16c564719908173ffa.tar.gz
opie-829b13ec0e4ffb359ab39c16c564719908173ffa.tar.bz2
Another bunch of return QS_FALSE;
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
@@ -1,101 +1,103 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#include <qapplication.h> 20#include <qapplication.h>
21#include <qobject.h> 21#include <qobject.h>
22#include <qpixmap.h> 22#include <qpixmap.h>
23#include "pickboard.h" 23#include "pickboard.h"
24#include "pickboardimpl.h" 24#include "pickboardimpl.h"
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} 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