~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to src/plugins/inputmethods/imsw-multi/qmultiinputcontext.h

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-08-24 04:09:09 UTC
  • Revision ID: james.westby@ubuntu.com-20050824040909-xmxe9jfr4a0w5671
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/****************************************************************************
 
2
** $Id$
 
3
**
 
4
** Definition of QMultiInputContext class
 
5
**
 
6
** Copyright (C) 2004 immodule for Qt Project.  All rights reserved.
 
7
**
 
8
** This file is written to contribute to Trolltech AS under their own
 
9
** licence. You may use this file under your Qt license. Following
 
10
** description is copied from their original file headers. Contact
 
11
** immodule-qt@freedesktop.org if any conditions of this licensing are
 
12
** not clear to you.
 
13
**
 
14
****************************************************************************/
 
15
 
 
16
/****************************************************************************
 
17
**
 
18
** Copyright (C) 1992-2004 Trolltech AS. All rights reserved.
 
19
**
 
20
** This file is part of the input method module of the Qt Toolkit.
 
21
**
 
22
** Licensees holding valid Qt Preview licenses may use this file in
 
23
** accordance with the Qt Preview License Agreement provided with the
 
24
** Software.
 
25
**
 
26
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
 
27
** information about Qt Commercial License Agreements.
 
28
**
 
29
** Contact info@trolltech.com if any conditions of this licensing are
 
30
** not clear to you.
 
31
**
 
32
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 
33
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 
34
**
 
35
****************************************************************************/
 
36
 
 
37
#ifndef QMULTIINPUTCONTEXT_H
 
38
#define QMULTIINPUTCONTEXT_H
 
39
 
 
40
#ifndef QT_NO_IM
 
41
 
 
42
#include <qobject.h>
 
43
#include <qstring.h>
 
44
#include <qnamespace.h>
 
45
#include <qwidget.h>
 
46
#include <qinputcontext.h>
 
47
#include <qmap.h>
 
48
#include <qpointer.h>
 
49
#include <qlist.h>
 
50
 
 
51
class QMultiInputContext : public QInputContext
 
52
{
 
53
    Q_OBJECT
 
54
public:
 
55
    QMultiInputContext();
 
56
    ~QMultiInputContext();
 
57
 
 
58
    QString identifierName();
 
59
    QString language();
 
60
 
 
61
#if defined(Q_WS_X11)
 
62
    bool x11FilterEvent( QWidget *keywidget, XEvent *event );
 
63
#endif // Q_WS_X11
 
64
    bool filterEvent( const QEvent *event );
 
65
 
 
66
    void reset();
 
67
    void update();
 
68
    void mouseHandler( int x, QMouseEvent *event );
 
69
    QFont font() const;
 
70
    bool isComposing() const;
 
71
 
 
72
    QList<QAction *> actions();
 
73
 
 
74
    QWidget *focusWidget() const;
 
75
    void setFocusWidget(QWidget *w);
 
76
 
 
77
    void widgetDestroyed( QWidget *w );
 
78
 
 
79
    QInputContext *slave() { return slaves.at(current); }
 
80
    const QInputContext *slave() const { return slaves.at(current); }
 
81
 
 
82
protected slots:
 
83
    void changeSlave(QAction *);
 
84
private:
 
85
    QWidget *fw;
 
86
    int current;
 
87
    QList<QInputContext *> slaves;
 
88
    QMenu *menu;
 
89
    QAction *separator;
 
90
};
 
91
 
 
92
#endif //Q_NO_IM
 
93
 
 
94
#endif // QMULTIINPUTCONTEXT_H