~ubuntu-branches/ubuntu/utopic/kde-workspace/utopic-proposed

« back to all changes in this revision

Viewing changes to kcontrol/access/kaccess.h

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-07-09 08:31:15 UTC
  • Revision ID: james.westby@ubuntu.com-20110709083115-ohyxn6z93mily9fc
Tags: upstream-4.6.90
Import upstream version 4.6.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef __K_ACCESS_H__
 
2
#define __K_ACCESS_H__
 
3
 
 
4
 
 
5
#include <QWidget>
 
6
#include <QColor>
 
7
//Added by qt3to4:
 
8
#include <QLabel>
 
9
#include <QPaintEvent>
 
10
 
 
11
 
 
12
#include <KUniqueApplication>
 
13
#include <KUrl>
 
14
 
 
15
#include <Phonon/MediaObject>
 
16
 
 
17
#include <X11/Xlib.h>
 
18
#define explicit int_explicit        // avoid compiler name clash in XKBlib.h
 
19
#include <X11/XKBlib.h>
 
20
#undef explicit
 
21
 
 
22
class KDialog;
 
23
class QLabel;
 
24
class KComboBox;
 
25
 
 
26
class KAccessApp : public KUniqueApplication
 
27
{
 
28
  Q_OBJECT
 
29
 
 
30
public:
 
31
 
 
32
  explicit KAccessApp(bool allowStyles=true, bool GUIenabled=true);
 
33
 
 
34
  bool x11EventFilter(XEvent *event);
 
35
 
 
36
  int newInstance();
 
37
 
 
38
  void setXkbOpcode(int opcode);
 
39
 
 
40
protected:
 
41
 
 
42
  void readSettings();
 
43
 
 
44
  void xkbStateNotify();
 
45
  void xkbBellNotify(XkbBellNotifyEvent *event);
 
46
  void xkbControlsNotify(XkbControlsNotifyEvent *event);
 
47
 
 
48
 
 
49
private Q_SLOTS:
 
50
 
 
51
  void activeWindowChanged(WId wid);
 
52
  void notifyChanges();
 
53
  void applyChanges();
 
54
  void yesClicked();
 
55
  void noClicked();
 
56
  void dialogClosed();
 
57
 
 
58
 
 
59
private:
 
60
   void  createDialogContents();
 
61
   void  initMasks();
 
62
 
 
63
  int xkb_opcode;
 
64
  unsigned int features;
 
65
  unsigned int requestedFeatures;
 
66
 
 
67
  bool    _systemBell, _artsBell, _visibleBell, _visibleBellInvert;
 
68
  QColor  _visibleBellColor;
 
69
  int     _visibleBellPause;
 
70
 
 
71
  bool    _gestures, _gestureConfirmation;
 
72
  bool    _kNotifyModifiers, _kNotifyAccessX;
 
73
 
 
74
  QWidget *overlay;
 
75
 
 
76
  Phonon::MediaObject *_player;
 
77
  QString _currentPlayerSource;
 
78
 
 
79
  WId _activeWindow;
 
80
 
 
81
  KDialog *dialog;
 
82
  QLabel *featuresLabel;
 
83
  KComboBox *showModeCombobox;
 
84
 
 
85
  int keys[8];
 
86
  int state;
 
87
};
 
88
 
 
89
 
 
90
class VisualBell : public QWidget
 
91
{
 
92
  Q_OBJECT
 
93
 
 
94
public:
 
95
 
 
96
  VisualBell(int pause)
 
97
    : QWidget(( QWidget* )0, Qt::X11BypassWindowManagerHint), _pause(pause)
 
98
    {}
 
99
 
 
100
 
 
101
protected:
 
102
 
 
103
  void paintEvent(QPaintEvent *);
 
104
 
 
105
 
 
106
private:
 
107
 
 
108
  int _pause;
 
109
 
 
110
};
 
111
 
 
112
 
 
113
 
 
114
 
 
115
#endif