summaryrefslogtreecommitdiffstats
path: root/kcontrol/input/mouse.cpp
diff options
context:
space:
mode:
authorDarrell Anderson <humanreadable@yahoo.com>2013-03-02 21:32:09 -0600
committerDarrell Anderson <humanreadable@yahoo.com>2013-03-02 21:32:09 -0600
commit48e7fc5a76e0fedff4bbee92a801e84cb011eee3 (patch)
treeb2c229dd9002645d2019799a07ba99d84f27e741 /kcontrol/input/mouse.cpp
parent0cb3dd415155adc58748ea5cc4da4679abcf320b (diff)
downloadtdebase-48e7fc5a76e0fedff4bbee92a801e84cb011eee3.tar.gz
tdebase-48e7fc5a76e0fedff4bbee92a801e84cb011eee3.zip
Add GUI control support to test kcontrol mouse double-click setting.
Work is needed to toggle the icon image after testing the double-click. This partially resolves bug report 1324.
Diffstat (limited to 'kcontrol/input/mouse.cpp')
-rw-r--r--kcontrol/input/mouse.cpp32
1 files changed, 29 insertions, 3 deletions
diff --git a/kcontrol/input/mouse.cpp b/kcontrol/input/mouse.cpp
index 49b67c98d..8957c6f87 100644
--- a/kcontrol/input/mouse.cpp
+++ b/kcontrol/input/mouse.cpp
@@ -55,6 +55,8 @@
#include <tqwhatsthis.h>
#include <tqtabwidget.h>
#include <tqradiobutton.h>
+#include <tqstyle.h>
+#include <tqevent.h>
#include <tdelocale.h>
#include <kdialog.h>
@@ -223,8 +225,6 @@ MouseConfig::MouseConfig (TQWidget * parent, const char *name)
" rapidly to different areas on the screen.");
TQWhatsThis::add( thresh, wtstr );
- // It would be nice if the user had a test field.
- // Selecting such values in milliseconds is not intuitive
doubleClickInterval = new KIntNumInput(thresh, 2000, tab2);
doubleClickInterval->setLabel(i18n("Double click interval:"));
doubleClickInterval->setRange(0, 2000, 100);
@@ -241,7 +241,33 @@ MouseConfig::MouseConfig (TQWidget * parent, const char *name)
" separate clicks.");
TQWhatsThis::add( doubleClickInterval, wtstr );
- lay->addSpacing(15);
+ lay->addSpacing(10);
+
+ doubleClickLabel = new TQLabel(i18n("Double-click on the image below to test your double-click interval:"), tab2);
+ lay->addWidget(doubleClickLabel);
+ wtstr = i18n("The image will change when your double-click"
+ " test time is less than or equal to the interval you"
+ " configured. When changing the interval, be sure to select"
+ " the Apply button before testing. For example, the image"
+ " will not change when you configure a double-click interval"
+ " of 700 milliseconds and the time between two successive"
+ " clicks on the image is 800 milliseconds, but the image will"
+ " change when the time between clicks is 600 milliseconds."
+ " The goal is to select a comfortable interval that you find"
+ " is not too fast or slow.");
+ TQWhatsThis::add( doubleClickLabel, wtstr );
+ doubleClickButton = new TQPushButton( tab2 );
+ doubleClickButton->setAcceptDrops( false );
+ // The images are 32x32.
+ uint sz = style().pixelMetric( TQStyle::PM_ButtonMargin ) * 2 + 48;
+ doubleClickButton->setFixedSize( sz, sz );
+ // Show the first image.
+ doubleClickButton->setPixmap(locate("data", "kcminput/pics/doubleclick_1.png"));
+ lay->addWidget(doubleClickButton);
+ // Use the same What's This help for the pushbutton.
+ TQWhatsThis::add( doubleClickButton, wtstr );
+
+ lay->addSpacing(10);
dragStartTime = new KIntNumInput(doubleClickInterval, 2000, tab2);
dragStartTime->setLabel(i18n("Drag start time:"));