|
Lines 256-261
Link Here
|
| 256 |
" The goal is to select a comfortable interval that you find" |
256 |
" The goal is to select a comfortable interval that you find" |
| 257 |
" is not too fast or slow."); |
257 |
" is not too fast or slow."); |
| 258 |
TQWhatsThis::add( doubleClickLabel, wtstr ); |
258 |
TQWhatsThis::add( doubleClickLabel, wtstr ); |
|
|
259 |
doubleClickStatus = false; // First image will be displayed |
| 259 |
doubleClickButton = new TQPushButton( tab2 ); |
260 |
doubleClickButton = new TQPushButton( tab2 ); |
| 260 |
doubleClickButton->setAcceptDrops( false ); |
261 |
doubleClickButton->setAcceptDrops( false ); |
| 261 |
// The images are 32x32. |
262 |
// The images are 32x32. |
|
Lines 266-272
Link Here
|
| 266 |
lay->addWidget(doubleClickButton); |
267 |
lay->addWidget(doubleClickButton); |
| 267 |
// Use the same What's This help for the pushbutton. |
268 |
// Use the same What's This help for the pushbutton. |
| 268 |
TQWhatsThis::add( doubleClickButton, wtstr ); |
269 |
TQWhatsThis::add( doubleClickButton, wtstr ); |
| 269 |
|
270 |
connect(doubleClickButton, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotDoubleClickButtonPressed())); |
|
|
271 |
doubleClickTimer=new TQTimer(); |
| 272 |
connect(doubleClickTimer, TQT_SIGNAL(timeout()), this, SLOT(slotDoubleClickTimerDone()) ); |
| 273 |
|
| 270 |
lay->addSpacing(10); |
274 |
lay->addSpacing(10); |
| 271 |
|
275 |
|
| 272 |
dragStartTime = new KIntNumInput(doubleClickInterval, 2000, tab2); |
276 |
dragStartTime = new KIntNumInput(doubleClickInterval, 2000, tab2); |
|
Lines 641-646
Link Here
|
| 641 |
|
645 |
|
| 642 |
} |
646 |
} |
| 643 |
|
647 |
|
|
|
648 |
void MouseConfig::slotDoubleClickButtonPressed() |
| 649 |
{ |
| 650 |
if (!doubleClickTimer->isActive()) |
| 651 |
{ |
| 652 |
// First click or click after the timer has expired -> start the timer |
| 653 |
doubleClickTimer->start(doubleClickInterval->value(), true); |
| 654 |
} |
| 655 |
else |
| 656 |
{ |
| 657 |
// Double click event: stop the timer and change the picture |
| 658 |
doubleClickTimer->stop(); |
| 659 |
if (!doubleClickStatus) |
| 660 |
doubleClickButton->setPixmap(locate("data", "kcminput/pics/doubleclick_2.png")); |
| 661 |
else |
| 662 |
doubleClickButton->setPixmap(locate("data", "kcminput/pics/doubleclick_1.png")); |
| 663 |
doubleClickStatus= !doubleClickStatus; |
| 664 |
} |
| 665 |
} |
| 666 |
|
| 667 |
void MouseConfig::slotDoubleClickTimerDone() |
| 668 |
{ |
| 669 |
// Stop the timer, even though not strictly needed since it is a single shot timer |
| 670 |
doubleClickTimer->stop(); |
| 671 |
} |
| 672 |
|
| 644 |
/** No descriptions */ |
673 |
/** No descriptions */ |
| 645 |
void MouseConfig::slotHandedChanged(int val){ |
674 |
void MouseConfig::slotHandedChanged(int val){ |
| 646 |
if(val==RIGHT_HANDED) |
675 |
if(val==RIGHT_HANDED) |