4
* Copyright (c) 1997 Patrick Dowler dowler@morgul.fsh.uvic.ca
6
* Requires the Qt widget libraries, available at no cost at
9
* This program is free software; you can redistribute it and/or modify
10
* it under the terms of the GNU General Public License as published by
11
* the Free Software Foundation; either version 2 of the License, or
12
* (at your option) any later version.
14
* This program is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
* GNU General Public License for more details.
19
* You should have received a copy of the GNU General Public License
20
* along with this program; if not, write to the Free Software
21
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
27
#include <QtCore/QString>
28
#include <QtGui/QWidget>
30
class Ui_KeyboardConfigWidget;
33
STATE_ON = 0, STATE_OFF = 1, STATE_UNCHANGED = 2
37
class TriStateHelper {
39
static void setTriState(KButtonGroup* group, TriState state);
40
static TriState getTriState(const KButtonGroup* group);
42
static TriState getTriState(int state) { return static_cast<TriState>(state); }
43
static int getInt(TriState state) { return static_cast<int>(state); }
44
static const char* getString(TriState state) {
45
return state == STATE_ON ? "0" : state == STATE_OFF ? "1" : "2";
49
class KCMiscKeyboardWidget : public QWidget
53
KCMiscKeyboardWidget(QWidget *parent);
54
~KCMiscKeyboardWidget();
60
QString quickHelp() const;
65
void delaySliderChanged (int value);
66
void delaySpinboxChanged (int value);
67
void rateSliderChanged (int value);
68
void rateSpinboxChanged (double value);
69
void keyboardRepeatStateChanged(int selection);
72
void changed(bool state);
75
void setClickVolume( int );
76
void setRepeat( TriState flag, int delay, double rate);
77
void setRepeatRate( int );
84
enum TriState keyboardRepeat;
85
enum TriState numlockState;
87
Ui_KeyboardConfigWidget& ui;