1 #include "../Common/Common.h"
4 #include <qapplication.h>
7 #include "DasherInterface.h"
8 #include "QtDasherScreen.h"
9 #include "QtDasherImpl.h"
12 static const char *qtdasher_xpm
[] = {
16 " ########################## ",
22 " ########################## "
25 QtDasherImpl::QtDasherImpl()
26 :qtdasherwidget(0), icn(0), ref(0), qtdasherinterface(0) {
29 QtDasherImpl::~QtDasherImpl() {
30 delete qtdasherwidget
;
34 QWidget
*QtDasherImpl::inputMethod(QWidget
*parent
, Qt::WFlags f
) {
36 qtdasherwidget
= new QtDasherPlugin(parent
, "Dasher", f
);
38 return qtdasherwidget
;
41 void QtDasherImpl::resetState() {
43 qtdasherwidget
->resetState();
46 QPixmap
*QtDasherImpl::icon() {
48 icn
= new QPixmap((const char **)qtdasher_xpm
);
52 QString
QtDasherImpl::name() {
53 return qApp
->translate("InputMethods", "Dasher");
56 void QtDasherImpl::onKeyPress(QObject
*receiver
, const char *slot
) {
58 QObject::connect(qtdasherwidget
, SIGNAL(key(ushort
, ushort
, ushort
, bool, bool)), receiver
, slot
);
61 #ifndef QT_NO_COMPONENT
62 QRESULT
QtDasherImpl::queryInterface(const QUuid
&uuid
, QUnknownInterface
**iface
) {
64 if(uuid
== IID_QUnknown
)
66 else if(uuid
== IID_InputMethod
)
74 Q_EXPORT_INTERFACE() {
75 Q_CREATE_INSTANCE(QtDasherImpl
)