summaryrefslogtreecommitdiff
path: root/inputmethods/dasher
authorzecke <zecke>2004-02-05 17:15:20 (UTC)
committer zecke <zecke>2004-02-05 17:15:20 (UTC)
commitf6487edaaad38c6454fc50697d7884f0bc627489 (patch) (side-by-side diff)
tree26b2ea805710488c84a731fef576467047fb80fd /inputmethods/dasher
parent416c72588577bca18ba1c9180701143e7e572eed (diff)
downloadopie-f6487edaaad38c6454fc50697d7884f0bc627489.zip
opie-f6487edaaad38c6454fc50697d7884f0bc627489.tar.gz
opie-f6487edaaad38c6454fc50697d7884f0bc627489.tar.bz2
More janitor....
remove ulong ref because we use Q_REFCOUNT which also takes care of initializing the refcount to 0 "And if you save yourself You will make him happy He'll keep you in a jar And you'll think you're happy He'll give you breathing holes"
Diffstat (limited to 'inputmethods/dasher') (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/dasher/QtDasherImpl.cc2
-rw-r--r--inputmethods/dasher/QtDasherImpl.h1
2 files changed, 1 insertions, 2 deletions
diff --git a/inputmethods/dasher/QtDasherImpl.cc b/inputmethods/dasher/QtDasherImpl.cc
index 9513802..d72f6d9 100644
--- a/inputmethods/dasher/QtDasherImpl.cc
+++ b/inputmethods/dasher/QtDasherImpl.cc
@@ -1,87 +1,87 @@
#include <iostream>
#include <qapplication.h>
#include <qobject.h>
#include <qpixmap.h>
#include "DasherInterface.h"
#include "QtDasherScreen.h"
#include "QtDasherImpl.h"
/* XPM */
static const char * qtdasher_xpm[]={
"28 7 2 1",
"# c #303030",
" c None",
" ########################## ",
" ",
" # # ",
" # # # # ",
" # # # # ",
" # # # ",
" ########################## "};
QtDasherImpl::QtDasherImpl()
- : qtdasherwidget(0), icn(0), ref(0), qtdasherinterface(0)
+ : qtdasherwidget(0), icn(0), qtdasherinterface(0)
{
}
QtDasherImpl::~QtDasherImpl()
{
delete qtdasherwidget;
delete icn;
}
QWidget *QtDasherImpl::inputMethod( QWidget *parent, Qt::WFlags f )
{
if ( !qtdasherwidget ) {
qtdasherwidget = new QtDasherPlugin( parent, "Dasher", f );
}
return qtdasherwidget;
}
void QtDasherImpl::resetState()
{
if ( qtdasherwidget )
qtdasherwidget->resetState();
}
QPixmap *QtDasherImpl::icon()
{
if ( !icn )
icn = new QPixmap( (const char **)qtdasher_xpm );
return icn;
}
QString QtDasherImpl::name()
{
return qApp->translate( "InputMethods", "Dasher" );
}
void QtDasherImpl::onKeyPress( QObject *receiver, const char *slot )
{
if ( qtdasherwidget )
QObject::connect( qtdasherwidget, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot );
}
#ifndef QT_NO_COMPONENT
QRESULT QtDasherImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
{
*iface = 0;
if ( uuid == IID_QUnknown )
*iface = this;
else if ( uuid == IID_InputMethod )
*iface = this;
else
return QS_FALSE;
if ( *iface )
(*iface)->addRef();
return QS_OK;
}
Q_EXPORT_INTERFACE()
{
Q_CREATE_INSTANCE( QtDasherImpl )
}
#endif
diff --git a/inputmethods/dasher/QtDasherImpl.h b/inputmethods/dasher/QtDasherImpl.h
index c143dc3..69e278c 100644
--- a/inputmethods/dasher/QtDasherImpl.h
+++ b/inputmethods/dasher/QtDasherImpl.h
@@ -1,38 +1,37 @@
#ifndef QTDASHERIMPL_H
#define QTDASHERIMPL_H
#include <qpe/inputmethodinterface.h>
#include "QtDasherPlugin.h"
class QtDasher;
class QPixmap;
class QtDasherImpl : public InputMethodInterface
{
public:
QtDasherImpl();
virtual ~QtDasherImpl();
#ifndef QT_NO_COMPONENT
QRESULT queryInterface( const QUuid&, QUnknownInterface** );
Q_REFCOUNT
#endif
virtual QWidget *inputMethod( QWidget *parent, Qt::WFlags f );
virtual void resetState();
virtual QPixmap *icon();
virtual QString name();
virtual void onKeyPress( QObject *receiver, const char *slot );
private:
CDasherInterface *qtdasherinterface;
QtDasherPlugin *qtdasherwidget;
QPixmap *icn;
- ulong ref;
};
#endif