summaryrefslogtreecommitdiffstats
path: root/kcontrol/access/kcmaccess.h
blob: 14a441a59e256dad97060bfcd7650977f2b60af9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
/**
 * kcmaccess.h
 *
 * Copyright (c) 2000 Matthias H�zer-Klpfel <hoelzer@kde.org>
 *
 */

#ifndef __kcmaccess_h__
#define __kcmaccess_h__


#include <tdecmodule.h>
#include <knuminput.h>


class TQCheckBox;
class TQComboBox;
class TQLabel;
class TQLineEdit;
class TQPushButton;
class TQRadioButton;
class KColorButton;
class TQSlider;
class KNumInput;
class TDEAboutData;

class ExtendedIntNumInput : public KIntNumInput
{
	Q_OBJECT

	public:
    /**
	  * Constructs an input control for integer values
	  * with base 10 and initial value 0.
	  */
		ExtendedIntNumInput(TQWidget *parent=0, const char *name=0);
		
    /**
	  * Destructor
	  */
		virtual ~ExtendedIntNumInput();

    /**
	  * @param min  minimum value
	  * @param max  maximum value
	  * @param step step size for the QSlider
	  * @param slider whether the slider is created or not
	  */
		void setRange(int min, int max, int step=1, bool slider=true);

	private slots:
		void slotSpinValueChanged(int);
		void slotSliderValueChanged(int);
	
	private:
		int min, max;
		int sliderMax;
};

class KAccessConfig : public TDECModule
{
  Q_OBJECT

public:

  KAccessConfig(TQWidget *parent = 0L, const char *name = 0L);
  virtual ~KAccessConfig();
  
  void load();
  void load(bool useDefaults);
  void save();
  void defaults();

protected slots:

  void configChanged();
  void checkAccess();
  void invertClicked();
  void flashClicked();
  void selectSound();
  void changeFlashScreenColor();
  void configureKNotify();

private:

  TQCheckBox *systemBell, *customBell, *visibleBell;
  TQRadioButton *invertScreen, *flashScreen;
  TQLabel    *soundLabel, *colorLabel;
  TQLineEdit *soundEdit;
  TQPushButton *soundButton;
  KColorButton *colorButton;
  ExtendedIntNumInput *durationSlider;

  TQCheckBox *stickyKeys, *stickyKeysLock, *stickyKeysAutoOff;
  TQCheckBox *stickyKeysBeep, *toggleKeysBeep, *kNotifyModifiers;
  TQPushButton *kNotifyModifiersButton;

  TQCheckBox *slowKeys, *bounceKeys;
  ExtendedIntNumInput *slowKeysDelay, *bounceKeysDelay;
  TQCheckBox *slowKeysPressBeep, *slowKeysAcceptBeep;
  TQCheckBox *slowKeysRejectBeep, *bounceKeysRejectBeep;

  TQCheckBox *gestures, *gestureConfirmation;
  TQCheckBox *timeout;
  KIntNumInput *timeoutDelay;
  TQCheckBox *accessxBeep, *kNotifyAccessX;
  TQPushButton *kNotifyAccessXButton;
};


#endif