summaryrefslogtreecommitdiff
path: root/inputmethods/dvorak/dvorakimpl.cpp
Unidiff
Diffstat (limited to 'inputmethods/dvorak/dvorakimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/dvorak/dvorakimpl.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/inputmethods/dvorak/dvorakimpl.cpp b/inputmethods/dvorak/dvorakimpl.cpp
index 8050ce1..9e9fed9 100644
--- a/inputmethods/dvorak/dvorakimpl.cpp
+++ b/inputmethods/dvorak/dvorakimpl.cpp
@@ -72,59 +72,61 @@ KeyboardImpl::KeyboardImpl()
72{ 72{
73} 73}
74 74
75KeyboardImpl::~KeyboardImpl() 75KeyboardImpl::~KeyboardImpl()
76{ 76{
77 delete input; 77 delete input;
78 delete icn; 78 delete icn;
79} 79}
80 80
81QWidget *KeyboardImpl::inputMethod( QWidget *parent, Qt::WFlags f ) 81QWidget *KeyboardImpl::inputMethod( QWidget *parent, Qt::WFlags f )
82{ 82{
83 if ( !input ) 83 if ( !input )
84 input = new Dvorak::Keyboard( parent, "Keyboard", f ); 84 input = new Dvorak::Keyboard( parent, "Keyboard", f );
85 return input; 85 return input;
86} 86}
87 87
88void KeyboardImpl::resetState() 88void KeyboardImpl::resetState()
89{ 89{
90 if ( input ) 90 if ( input )
91 input->resetState(); 91 input->resetState();
92} 92}
93 93
94QPixmap *KeyboardImpl::icon() 94QPixmap *KeyboardImpl::icon()
95{ 95{
96 if ( !icn ) 96 if ( !icn )
97 icn = new QPixmap( (const char **)kb_xpm ); 97 icn = new QPixmap( (const char **)kb_xpm );
98 return icn; 98 return icn;
99} 99}
100 100
101QString KeyboardImpl::name() 101QString KeyboardImpl::name()
102{ 102{
103 return qApp->translate( "InputMethods", "Dvorak" ); 103 return qApp->translate( "InputMethods", "Dvorak" );
104} 104}
105 105
106void KeyboardImpl::onKeyPress( QObject *receiver, const char *slot ) 106void KeyboardImpl::onKeyPress( QObject *receiver, const char *slot )
107{ 107{
108 if ( input ) 108 if ( input )
109 QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot ); 109 QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot );
110} 110}
111 111
112#ifndef QT_NO_COMPONENT 112#ifndef QT_NO_COMPONENT
113QRESULT KeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 113QRESULT KeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
114{ 114{
115 *iface = 0; 115 *iface = 0;
116 if ( uuid == IID_QUnknown ) 116 if ( uuid == IID_QUnknown )
117 *iface = this; 117 *iface = this;
118 else if ( uuid == IID_InputMethod ) 118 else if ( uuid == IID_InputMethod )
119 *iface = this; 119 *iface = this;
120 else
121 return QS_FALSE;
120 122
121 if ( *iface ) 123 if ( *iface )
122 (*iface)->addRef(); 124 (*iface)->addRef();
123 return QS_OK; 125 return QS_OK;
124} 126}
125 127
126Q_EXPORT_INTERFACE() 128Q_EXPORT_INTERFACE()
127{ 129{
128 Q_CREATE_INSTANCE( KeyboardImpl ) 130 Q_CREATE_INSTANCE( KeyboardImpl )
129} 131}
130#endif 132#endif