not quite so much needs to be delayed to the init() function
[personal-kdebase.git] / workspace / kcontrol / access / kaccess.h
blobc364b25103fa8ac6ce5f8a94a926a63fac2a68e4
1 #ifndef __K_ACCESS_H__
2 #define __K_ACCESS_H__
5 #include <QWidget>
6 #include <QColor>
7 //Added by qt3to4:
8 #include <QLabel>
9 #include <QPaintEvent>
12 #include <KUniqueApplication>
13 #include <KUrl>
15 #include <Phonon/MediaObject>
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
22 class KDialog;
23 class QLabel;
24 class KComboBox;
26 class KAccessApp : public KUniqueApplication
28 Q_OBJECT
30 public:
32 explicit KAccessApp(bool allowStyles=true, bool GUIenabled=true);
34 bool x11EventFilter(XEvent *event);
36 int newInstance();
38 void setXkbOpcode(int opcode);
40 protected:
42 void readSettings();
44 void xkbStateNotify();
45 void xkbBellNotify(XkbBellNotifyEvent *event);
46 void xkbControlsNotify(XkbControlsNotifyEvent *event);
49 private Q_SLOTS:
51 void activeWindowChanged(WId wid);
52 void notifyChanges();
53 void applyChanges();
54 void yesClicked();
55 void noClicked();
56 void dialogClosed();
59 private:
60 void createDialogContents();
61 void initMasks();
63 int xkb_opcode;
64 unsigned int features;
65 unsigned int requestedFeatures;
67 bool _systemBell, _artsBell, _visibleBell, _visibleBellInvert;
68 QColor _visibleBellColor;
69 int _visibleBellPause;
71 bool _gestures, _gestureConfirmation;
72 bool _kNotifyModifiers, _kNotifyAccessX;
74 QWidget *overlay;
76 Phonon::MediaObject *_player;
77 QString _currentPlayerSource;
79 WId _activeWindow;
81 KDialog *dialog;
82 QLabel *featuresLabel;
83 KComboBox *showModeCombobox;
85 int keys[8];
86 int state;
90 class VisualBell : public QWidget
92 Q_OBJECT
94 public:
96 VisualBell(int pause)
97 : QWidget(( QWidget* )0, Qt::X11BypassWindowManagerHint), _pause(pause)
101 protected:
103 void paintEvent(QPaintEvent *);
106 private:
108 int _pause;
115 #endif