Diffstat (limited to 'kaddressbook/views/cardview.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/views/cardview.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/kaddressbook/views/cardview.h b/kaddressbook/views/cardview.h index 37dddb6..2ea3771 100644 --- a/kaddressbook/views/cardview.h +++ b/kaddressbook/views/cardview.h | |||
@@ -384,88 +384,91 @@ class CardView : public QScrollView | |||
384 | void selectionChanged(CardViewItem *); | 384 | void selectionChanged(CardViewItem *); |
385 | 385 | ||
386 | /** This method is emitted whenever an item is clicked. | 386 | /** This method is emitted whenever an item is clicked. |
387 | */ | 387 | */ |
388 | void clicked(CardViewItem *); | 388 | void clicked(CardViewItem *); |
389 | 389 | ||
390 | /** Emitted whenever the user 'executes' an item. This is dependant on | 390 | /** Emitted whenever the user 'executes' an item. This is dependant on |
391 | * the KDE global config. This could be a single click or a doubleclick. | 391 | * the KDE global config. This could be a single click or a doubleclick. |
392 | * Also emitted when the return key is pressed on an item. | 392 | * Also emitted when the return key is pressed on an item. |
393 | */ | 393 | */ |
394 | void executed(CardViewItem *); | 394 | void executed(CardViewItem *); |
395 | 395 | ||
396 | /** Emitted whenever the user double clicks on an item. | 396 | /** Emitted whenever the user double clicks on an item. |
397 | */ | 397 | */ |
398 | void doubleClicked(CardViewItem *); | 398 | void doubleClicked(CardViewItem *); |
399 | 399 | ||
400 | /** Emitted when the current item changes | 400 | /** Emitted when the current item changes |
401 | */ | 401 | */ |
402 | void currentChanged( CardViewItem * ); | 402 | void currentChanged( CardViewItem * ); |
403 | 403 | ||
404 | /** Emitted when the return key is pressed in an item. | 404 | /** Emitted when the return key is pressed in an item. |
405 | */ | 405 | */ |
406 | void returnPressed( CardViewItem * ); | 406 | void returnPressed( CardViewItem * ); |
407 | 407 | ||
408 | protected: | 408 | protected: |
409 | bool mFlagKeyPressed; | ||
410 | bool mFlagBlockKeyPressed; | ||
411 | virtual void keyPressEvent ( QKeyEvent * ); | ||
412 | virtual void keyReleaseEvent ( QKeyEvent * ); | ||
409 | /** Determines which cards intersect that region and tells them to paint | 413 | /** Determines which cards intersect that region and tells them to paint |
410 | * themselves. | 414 | * themselves. |
411 | */ | 415 | */ |
412 | void drawContents(QPainter *p, int clipx, int clipy, int clipw, int cliph); | 416 | void drawContents(QPainter *p, int clipx, int clipy, int clipw, int cliph); |
413 | 417 | ||
414 | /** Sets the layout to dirty and repaints. | 418 | /** Sets the layout to dirty and repaints. |
415 | */ | 419 | */ |
416 | void resizeEvent(QResizeEvent *e); | 420 | void resizeEvent(QResizeEvent *e); |
417 | 421 | ||
418 | /** Changes the direction the canvas scolls. | 422 | /** Changes the direction the canvas scolls. |
419 | */ | 423 | */ |
420 | void contentsWheelEvent(QWheelEvent *e); | 424 | void contentsWheelEvent(QWheelEvent *e); |
421 | 425 | ||
422 | /** Sets the layout to dirty and calls for a repaint. | 426 | /** Sets the layout to dirty and calls for a repaint. |
423 | */ | 427 | */ |
424 | void setLayoutDirty(bool dirty); | 428 | void setLayoutDirty(bool dirty); |
425 | 429 | ||
426 | /** Does the math based on the bounding rect of the cards to properly | 430 | /** Does the math based on the bounding rect of the cards to properly |
427 | * lay the cards out on the screen. This is only done if the layout is | 431 | * lay the cards out on the screen. This is only done if the layout is |
428 | * marked as dirty. | 432 | * marked as dirty. |
429 | */ | 433 | */ |
430 | void calcLayout(); | 434 | void calcLayout(); |
431 | 435 | ||
432 | // virtual void mousePressEvent(QMouseEvent *e); | 436 | // virtual void mousePressEvent(QMouseEvent *e); |
433 | // virtual void mouseReleaseEvent(QMouseEvent *e); | 437 | // virtual void mouseReleaseEvent(QMouseEvent *e); |
434 | // virtual void mouseMoveEvent(QMouseEvent *e); | 438 | // virtual void mouseMoveEvent(QMouseEvent *e); |
435 | 439 | ||
436 | virtual void contentsMousePressEvent(QMouseEvent *e); | 440 | virtual void contentsMousePressEvent(QMouseEvent *e); |
437 | virtual void contentsMouseMoveEvent(QMouseEvent *e); | 441 | virtual void contentsMouseMoveEvent(QMouseEvent *e); |
438 | virtual void contentsMouseReleaseEvent(QMouseEvent *e); | 442 | virtual void contentsMouseReleaseEvent(QMouseEvent *e); |
439 | virtual void contentsMouseDoubleClickEvent(QMouseEvent *e); | 443 | virtual void contentsMouseDoubleClickEvent(QMouseEvent *e); |
440 | 444 | ||
441 | virtual void enterEvent( QEvent * ); | 445 | virtual void enterEvent( QEvent * ); |
442 | virtual void leaveEvent( QEvent * ); | 446 | virtual void leaveEvent( QEvent * ); |
443 | 447 | ||
444 | virtual void focusInEvent( QFocusEvent * ); | 448 | virtual void focusInEvent( QFocusEvent * ); |
445 | virtual void focusOutEvent( QFocusEvent * ); | 449 | virtual void focusOutEvent( QFocusEvent * ); |
446 | 450 | ||
447 | virtual void keyPressEvent( QKeyEvent * ); | ||
448 | 451 | ||
449 | /** Overload this method to be told when a drag should be started. | 452 | /** Overload this method to be told when a drag should be started. |
450 | * In most cases you will want to start a drag event with the currently | 453 | * In most cases you will want to start a drag event with the currently |
451 | * selected item. | 454 | * selected item. |
452 | */ | 455 | */ |
453 | virtual void startDrag(); | 456 | virtual void startDrag(); |
454 | 457 | ||
455 | private slots: | 458 | private slots: |
456 | /** Called by a timer to display a label with truncated text. | 459 | /** Called by a timer to display a label with truncated text. |
457 | * Pop up a label, if there is a field with obscured text or | 460 | * Pop up a label, if there is a field with obscured text or |
458 | * label at the cursor position. | 461 | * label at the cursor position. |
459 | */ | 462 | */ |
460 | void tryShowFullText(); | 463 | void tryShowFullText(); |
461 | 464 | ||
462 | private: | 465 | private: |
463 | /** draws and erases the rubber bands while columns are resized. | 466 | /** draws and erases the rubber bands while columns are resized. |
464 | * @p pos is the horizontal position inside the viewport to use as | 467 | * @p pos is the horizontal position inside the viewport to use as |
465 | * the anchor. | 468 | * the anchor. |
466 | * If pos is 0, only erase is done. | 469 | * If pos is 0, only erase is done. |
467 | */ | 470 | */ |
468 | void drawRubberBands( int pos ); | 471 | void drawRubberBands( int pos ); |
469 | 472 | ||
470 | CardViewPrivate *d; | 473 | CardViewPrivate *d; |
471 | }; | 474 | }; |