From 48e7fc5a76e0fedff4bbee92a801e84cb011eee3 Mon Sep 17 00:00:00 2001 From: Darrell Anderson Date: Sat, 2 Mar 2013 21:32:09 -0600 Subject: 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. --- kcontrol/input/mouse.cpp | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) (limited to 'kcontrol/input/mouse.cpp') 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 #include #include +#include +#include #include #include @@ -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:")); -- cgit v1.2.1