summaryrefslogtreecommitdiff
path: root/inputmethods/keyboard
Unidiff
Diffstat (limited to 'inputmethods/keyboard') (more/less context) (show whitespace changes)
-rw-r--r--inputmethods/keyboard/keyboardimpl.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/inputmethods/keyboard/keyboardimpl.cpp b/inputmethods/keyboard/keyboardimpl.cpp
index 3c77fe6..701d35f 100644
--- a/inputmethods/keyboard/keyboardimpl.cpp
+++ b/inputmethods/keyboard/keyboardimpl.cpp
@@ -22,107 +22,109 @@
22#include "keyboard.h" 22#include "keyboard.h"
23#include "keyboardimpl.h" 23#include "keyboardimpl.h"
24 24
25/* XPM */ 25/* XPM */
26static const char * const kb_xpm[] = { 26static const char * const kb_xpm[] = {
27"28 13 4 1", 27"28 13 4 1",
28" c None", 28" c None",
29". c #4C4C4C", 29". c #4C4C4C",
30"+ c #FFF7DD", 30"+ c #FFF7DD",
31"@ c #D6CFBA", 31"@ c #D6CFBA",
32" .......................... ", 32" .......................... ",
33" .+++.+++.+++.+++.+++.++++. ", 33" .+++.+++.+++.+++.+++.++++. ",
34" .+@@.+@@.+@@.+@@.+@@.+@@@. ", 34" .+@@.+@@.+@@.+@@.+@@.+@@@. ",
35" .......................... ", 35" .......................... ",
36" .+++++.+++.+++.+++.++++++. ", 36" .+++++.+++.+++.+++.++++++. ",
37" .+@@@@.+@@.+@@.+@@.+@@@@@. ", 37" .+@@@@.+@@.+@@.+@@.+@@@@@. ",
38" .......................... ", 38" .......................... ",
39" .++++++.+++.+++.+++.+++++. ", 39" .++++++.+++.+++.+++.+++++. ",
40" .+@@@@@.+@@.+@@.+@@.+@@@@. ", 40" .+@@@@@.+@@.+@@.+@@.+@@@@. ",
41" .......................... ", 41" .......................... ",
42" .++++.++++++++++++++.++++. ", 42" .++++.++++++++++++++.++++. ",
43" .+@@@.+@@@@@@@@@@@@@.+@@@. ", 43" .+@@@.+@@@@@@@@@@@@@.+@@@. ",
44" .......................... "}; 44" .......................... "};
45 45
46 46
47/* XPM */ 47/* XPM */
48static const char * const ipti_xpm[] = { 48static const char * const ipti_xpm[] = {
49"28 13 4 1", 49"28 13 4 1",
50" c None", 50" c None",
51". c #4C4C4C", 51". c #4C4C4C",
52"+ c #FFF7DD", 52"+ c #FFF7DD",
53"@ c #D6CFBA", 53"@ c #D6CFBA",
54" ......................... ", 54" ......................... ",
55" .+++.+++.+++.+++.+++.+++. ", 55" .+++.+++.+++.+++.+++.+++. ",
56" .+@@.+@@.+@@.+@@.+@@.+@@. ", 56" .+@@.+@@.+@@.+@@.+@@.+@@. ",
57" ......................... ", 57" ......................... ",
58" .+++.+++.+++.+++.+++.+++. ", 58" .+++.+++.+++.+++.+++.+++. ",
59" .+@@.+@@.+@@.+@@.+@@.+@@. ", 59" .+@@.+@@.+@@.+@@.+@@.+@@. ",
60" ......................... ", 60" ......................... ",
61" .+++.+++.+++.+++.+++.+++. ", 61" .+++.+++.+++.+++.+++.+++. ",
62" .+@@.+@@.+@@.+@@.+@@.+@@. ", 62" .+@@.+@@.+@@.+@@.+@@.+@@. ",
63" ......................... ", 63" ......................... ",
64" .+++.+++.+++.+++.+++.+++. ", 64" .+++.+++.+++.+++.+++.+++. ",
65" .+@@.+@@.+@@.+@@.+@@.+@@. ", 65" .+@@.+@@.+@@.+@@.+@@.+@@. ",
66" ......................... "}; 66" ......................... "};
67 67
68KeyboardImpl::KeyboardImpl() 68KeyboardImpl::KeyboardImpl()
69 : input(0), icn(0), ref(0) 69 : input(0), icn(0), ref(0)
70{ 70{
71} 71}
72 72
73KeyboardImpl::~KeyboardImpl() 73KeyboardImpl::~KeyboardImpl()
74{ 74{
75 delete input; 75 delete input;
76 delete icn; 76 delete icn;
77} 77}
78 78
79QWidget *KeyboardImpl::inputMethod( QWidget *parent, Qt::WFlags f ) 79QWidget *KeyboardImpl::inputMethod( QWidget *parent, Qt::WFlags f )
80{ 80{
81 if ( !input ) 81 if ( !input )
82 input = new KeyboardInput::Keyboard( parent, "Keyboard", f ); 82 input = new KeyboardInput::Keyboard( parent, "Keyboard", f );
83 return input; 83 return input;
84} 84}
85 85
86void KeyboardImpl::resetState() 86void KeyboardImpl::resetState()
87{ 87{
88 if ( input ) 88 if ( input )
89 input->resetState(); 89 input->resetState();
90} 90}
91 91
92QPixmap *KeyboardImpl::icon() 92QPixmap *KeyboardImpl::icon()
93{ 93{
94 if ( !icn ) 94 if ( !icn )
95 icn = new QPixmap( (const char **)kb_xpm ); 95 icn = new QPixmap( (const char **)kb_xpm );
96 return icn; 96 return icn;
97} 97}
98 98
99QString KeyboardImpl::name() 99QString KeyboardImpl::name()
100{ 100{
101 return qApp->translate( "InputMethods", "Keyboard" ); 101 return qApp->translate( "InputMethods", "Keyboard" );
102} 102}
103 103
104void KeyboardImpl::onKeyPress( QObject *receiver, const char *slot ) 104void KeyboardImpl::onKeyPress( QObject *receiver, const char *slot )
105{ 105{
106 if ( input ) 106 if ( input )
107 QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot ); 107 QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot );
108} 108}
109 109
110#ifndef QT_NO_COMPONENT 110#ifndef QT_NO_COMPONENT
111QRESULT KeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 111QRESULT KeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
112{ 112{
113 *iface = 0; 113 *iface = 0;
114 if ( uuid == IID_QUnknown ) 114 if ( uuid == IID_QUnknown )
115 *iface = this; 115 *iface = this;
116 else if ( uuid == IID_InputMethod ) 116 else if ( uuid == IID_InputMethod )
117 *iface = this; 117 *iface = this;
118 else
119 return QS_FALSE;
118 120
119 if ( *iface ) 121 if ( *iface )
120 (*iface)->addRef(); 122 (*iface)->addRef();
121 return QS_OK; 123 return QS_OK;
122} 124}
123 125
124Q_EXPORT_INTERFACE() 126Q_EXPORT_INTERFACE()
125{ 127{
126 Q_CREATE_INSTANCE( KeyboardImpl ) 128 Q_CREATE_INSTANCE( KeyboardImpl )
127} 129}
128#endif 130#endif