-rw-r--r-- | inputmethods/unikeyboard/unikeyboardimpl.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/inputmethods/unikeyboard/unikeyboardimpl.cpp b/inputmethods/unikeyboard/unikeyboardimpl.cpp index fe601e0..aa05b31 100644 --- a/inputmethods/unikeyboard/unikeyboardimpl.cpp +++ b/inputmethods/unikeyboard/unikeyboardimpl.cpp | |||
@@ -30,76 +30,77 @@ static const char * uni_xpm[]={ | |||
30 | ". c None", | 30 | ". c None", |
31 | "............................", | 31 | "............................", |
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 | UniKeyboardImpl::UniKeyboardImpl() | 45 | UniKeyboardImpl::UniKeyboardImpl() |
46 | : input(0), icn(0), ref(0) | 46 | : input(0), icn(0), ref(0) |
47 | { | 47 | { |
48 | } | 48 | } |
49 | 49 | ||
50 | UniKeyboardImpl::~UniKeyboardImpl() | 50 | UniKeyboardImpl::~UniKeyboardImpl() |
51 | { | 51 | { |
52 | delete input; | 52 | delete input; |
53 | delete icn; | 53 | delete icn; |
54 | } | 54 | } |
55 | 55 | ||
56 | QWidget *UniKeyboardImpl::inputMethod( QWidget *parent, Qt::WFlags f ) | 56 | QWidget *UniKeyboardImpl::inputMethod( QWidget *parent, Qt::WFlags f ) |
57 | { | 57 | { |
58 | if ( !input ) | 58 | if ( !input ) |
59 | input = new UniKeyboard( parent, "UniKeyboard", f ); | 59 | input = new UniKeyboard( parent, "UniKeyboard", f ); |
60 | return input; | 60 | return input; |
61 | } | 61 | } |
62 | 62 | ||
63 | void UniKeyboardImpl::resetState() | 63 | void UniKeyboardImpl::resetState() |
64 | { | 64 | { |
65 | if ( input ) | 65 | if ( input ) |
66 | input->resetState(); | 66 | input->resetState(); |
67 | } | 67 | } |
68 | 68 | ||
69 | QPixmap *UniKeyboardImpl::icon() | 69 | QPixmap *UniKeyboardImpl::icon() |
70 | { | 70 | { |
71 | if ( !icn ) | 71 | if ( !icn ) |
72 | icn = new QPixmap( (const char **)uni_xpm ); | 72 | icn = new QPixmap( (const char **)uni_xpm ); |
73 | return icn; | 73 | return icn; |
74 | } | 74 | } |
75 | 75 | ||
76 | QString UniKeyboardImpl::name() | 76 | QString UniKeyboardImpl::name() |
77 | { | 77 | { |
78 | return qApp->translate( "InputMethods", "Unicode" ); | 78 | // return qApp->translate( "InputMethods", "Unicode" ); |
79 | return "Unicode"; | ||
79 | } | 80 | } |
80 | 81 | ||
81 | void UniKeyboardImpl::onKeyPress( QObject *receiver, const char *slot ) | 82 | void UniKeyboardImpl::onKeyPress( QObject *receiver, const char *slot ) |
82 | { | 83 | { |
83 | if ( input ) | 84 | if ( input ) |
84 | QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot ); | 85 | QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot ); |
85 | } | 86 | } |
86 | 87 | ||
87 | QRESULT UniKeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) | 88 | QRESULT UniKeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) |
88 | { | 89 | { |
89 | *iface = 0; | 90 | *iface = 0; |
90 | if ( uuid == IID_QUnknown ) | 91 | if ( uuid == IID_QUnknown ) |
91 | *iface = this; | 92 | *iface = this; |
92 | else if ( uuid == IID_InputMethod ) | 93 | else if ( uuid == IID_InputMethod ) |
93 | *iface = this; | 94 | *iface = this; |
94 | 95 | ||
95 | if ( *iface ) | 96 | if ( *iface ) |
96 | (*iface)->addRef(); | 97 | (*iface)->addRef(); |
97 | return QS_OK; | 98 | return QS_OK; |
98 | } | 99 | } |
99 | 100 | ||
100 | Q_EXPORT_INTERFACE() | 101 | Q_EXPORT_INTERFACE() |
101 | { | 102 | { |
102 | Q_CREATE_INSTANCE( UniKeyboardImpl ) | 103 | Q_CREATE_INSTANCE( UniKeyboardImpl ) |
103 | } | 104 | } |
104 | 105 | ||
105 | 106 | ||