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.
pull/2/head
Darrell Anderson 12 years ago
parent 0cb3dd4151
commit 48e7fc5a76

@ -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:"));

@ -149,8 +149,9 @@ private:
KIntNumInput *mk_delay, *mk_interval, *mk_time_to_max, *mk_max_speed,
*mk_curve;
TQLabel *doubleClickLabel;
TQPushButton *doubleClickButton;
};
#endif

@ -10,5 +10,5 @@
#################################################
install( FILES
mouse_rh.png mouse_lh.png
mouse_rh.png mouse_lh.png doubleclick_1.png doubleclick_2.png
DESTINATION ${DATA_INSTALL_DIR}/kcminput/pics )

@ -1,3 +1,3 @@
kcminput_pics_data_DATA = mouse_rh.png mouse_lh.png
kcminput_pics_data_DATA = mouse_rh.png mouse_lh.png doubleclick_1.png doubleclick_2.png
kcminput_pics_datadir = $(kde_datadir)/kcminput/pics

Loading…
Cancel
Save