4 * Copyright (c) 1997 Patrick Dowler dowler@morgul.fsh.uvic.ca
6 * Layout management, enhancements:
7 * Copyright (c) 1999 Dirk A. Mueller <dmuell@gmx.net>
9 * SC/DC/AutoSelect/ChangeCursor:
10 * Copyright (c) 2000 David Faure <faure@kde.org>
12 * Requires the Qt widget libraries, available at no cost at
13 * http://www.troll.no/
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2 of the License, or
18 * (at your option) any later version.
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
25 * You should have received a copy of the GNU General Public License
26 * along with this program; if not, write to the Free Software
27 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
31 #ifndef __MOUSECONFIG_H__
32 #define __MOUSECONFIG_H__
35 #include <QtGui/QLCDNumber>
36 #include <QPushButton>
37 #include <QRadioButton>
39 #include <kapplication.h>
41 #include <kglobalsettings.h>
42 #include <knuminput.h>
44 #include <config-workspace.h>
45 #include <config-kcontrol-input.h>
47 #include "logitechmouse.h"
51 #include "ui_kmousedlg.h"
52 #include "themepage.h"
54 #define RIGHT_HANDED 0
61 class KMouseDlg
: public QWidget
, public Ui::KMouseDlg
64 KMouseDlg( QWidget
*parent
) : QWidget( parent
) {
75 void apply(bool force
=false);
80 bool m_handedNeedsApply
;
84 int doubleClickInterval
;
91 bool reverseScrollPolarity
;
94 // TODO: In Qt4, replace with a better container.
95 QList
<LogitechMouse
*> logitechMouseList
;
99 class MouseConfig
: public KCModule
103 MouseConfig(QWidget
*parent
, const QVariantList
&args
);
113 /** No descriptions */
114 void slotHandedChanged(int val
);
115 void slotScrollPolarityChanged();
117 void slotThreshChanged(int value
);
118 void slotDragStartDistChanged(int value
);
119 void slotWheelScrollLinesChanged(int value
);
120 void slotSmartSliderEnabling();
128 void setAccel(double);
129 void setThreshold(int);
130 void setHandedness(int);
132 KDoubleNumInput
*accel
;
133 KIntNumInput
*thresh
;
134 KIntNumInput
*doubleClickInterval
;
135 KIntNumInput
*dragStartTime
;
136 KIntNumInput
*dragStartDist
;
137 KIntNumInput
*wheelScrollLines
;
139 // QRadioButton *leftHanded, *rightHanded;
140 // QCheckBox *doubleClick;
141 // QCheckBox *cbAutoSelect;
143 // QSlider *slAutoSelect;
144 // QCheckBox *cbVisualActivate;
145 // QCheckBox *cbCursor;
146 // QCheckBox *cbLargeCursor;
148 QTabWidget
*tabwidget
;
149 QWidget
*advancedTab
;
150 KMouseDlg
* generalTab
;
152 MouseSettings
*settings
;
154 QCheckBox
*mouseKeys
;
155 KIntNumInput
*mk_delay
, *mk_interval
, *mk_time_to_max
, *mk_max_speed
,