summaryrefslogtreecommitdiffabout
path: root/microkde/kdeui/klistview.h
Unidiff
Diffstat (limited to 'microkde/kdeui/klistview.h') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kdeui/klistview.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/microkde/kdeui/klistview.h b/microkde/kdeui/klistview.h
index 8d933f6..d559ce7 100644
--- a/microkde/kdeui/klistview.h
+++ b/microkde/kdeui/klistview.h
@@ -327,96 +327,100 @@ public:
327 * 327 *
328 * @param c the color to use for every other item. Set to an invalid 328 * @param c the color to use for every other item. Set to an invalid
329 * colour to disable alternate colours. 329 * colour to disable alternate colours.
330 * 330 *
331 * @see #alternateBackground() 331 * @see #alternateBackground()
332 **/ 332 **/
333 void setAlternateBackground(const QColor &c); 333 void setAlternateBackground(const QColor &c);
334 /** 334 /**
335 * @return the alternate background color 335 * @return the alternate background color
336 * 336 *
337 * @see #setAlternateBackground() 337 * @see #setAlternateBackground()
338 */ 338 */
339 const QColor &alternateBackground() const; 339 const QColor &alternateBackground() const;
340 340
341 /** 341 /**
342 * Saves the list view's layout (column widtsh, column order, sort column) 342 * Saves the list view's layout (column widtsh, column order, sort column)
343 * to a KConfig group 343 * to a KConfig group
344 * 344 *
345 * @param config the @ref KConfig object to write to 345 * @param config the @ref KConfig object to write to
346 * @param group the config group to use 346 * @param group the config group to use
347 */ 347 */
348 void saveLayout(KConfig *config, const QString &group) const; 348 void saveLayout(KConfig *config, const QString &group) const;
349 /** 349 /**
350 * Reads the list view's layout from a KConfig group as stored with 350 * Reads the list view's layout from a KConfig group as stored with
351 * @ref #saveLayout 351 * @ref #saveLayout
352 * 352 *
353 * @param config the @ref KConfig object to read from 353 * @param config the @ref KConfig object to read from
354 * @param group the config group to use 354 * @param group the config group to use
355 */ 355 */
356 void restoreLayout(KConfig *config, const QString &group); 356 void restoreLayout(KConfig *config, const QString &group);
357 /** 357 /**
358 * Reimplemented to remember the current sort column and order. 358 * Reimplemented to remember the current sort column and order.
359 * @param column is the column to be sorted, or -1 to sort in order of 359 * @param column is the column to be sorted, or -1 to sort in order of
360 * insertion 360 * insertion
361 * @param whether to sort ascending (or descending) 361 * @param whether to sort ascending (or descending)
362 */ 362 */
363 virtual void setSorting(int column, bool ascending = true); 363 virtual void setSorting(int column, bool ascending = true);
364 364
365 /** 365 /**
366 * @return the currently sorted column, or -1 if none is sorted 366 * @return the currently sorted column, or -1 if none is sorted
367 */ 367 */
368 int columnSorted(void) const; 368 int columnSorted(void) const;
369 369
370 /** 370 /**
371 * @return whether the current sort is ascending (or descending) 371 * @return whether the current sort is ascending (or descending)
372 */ 372 */
373 bool ascendingSort(void) const; 373 bool ascendingSort(void) const;
374 374
375 //US we do not have a "global KDE" variable to setup singleClick functionality
376 void setSingleClick(bool s);
377
378
375signals: 379signals:
376 380
377 /** 381 /**
378 * This signal is emitted whenever the user executes an listview item. 382 * This signal is emitted whenever the user executes an listview item.
379 * That means depending on the KDE wide Single Click/Double Click 383 * That means depending on the KDE wide Single Click/Double Click
380 * setting the user clicked or double clicked on that item. 384 * setting the user clicked or double clicked on that item.
381 * @param item is the pointer to the executed listview item. 385 * @param item is the pointer to the executed listview item.
382 * 386 *
383 * Note that you may not delete any @ref QListViewItem objects in slots 387 * Note that you may not delete any @ref QListViewItem objects in slots
384 * connected to this signal. 388 * connected to this signal.
385 */ 389 */
386 void executed( QListViewItem *item ); 390 void executed( QListViewItem *item );
387 391
388 /** 392 /**
389 * This signal is emitted whenever the user executes an listview item. 393 * This signal is emitted whenever the user executes an listview item.
390 * That means depending on the KDE wide Single Click/Double Click 394 * That means depending on the KDE wide Single Click/Double Click
391 * setting the user clicked or double clicked on that item. 395 * setting the user clicked or double clicked on that item.
392 * @param item is the pointer to the executed listview item. 396 * @param item is the pointer to the executed listview item.
393 * @param pos is the position where the user has clicked 397 * @param pos is the position where the user has clicked
394 * @param c is the column into which the user clicked. 398 * @param c is the column into which the user clicked.
395 * 399 *
396 * Note that you may not delete any @ref QListViewItem objects in slots 400 * Note that you may not delete any @ref QListViewItem objects in slots
397 * connected to this signal. 401 * connected to this signal.
398 */ 402 */
399 void executed( QListViewItem *item, const QPoint &pos, int c ); 403 void executed( QListViewItem *item, const QPoint &pos, int c );
400 404
401 /** 405 /**
402 * This signal gets emitted whenever the user double clicks into the 406 * This signal gets emitted whenever the user double clicks into the
403 * listview. 407 * listview.
404 * @param item is the pointer to the clicked listview item. 408 * @param item is the pointer to the clicked listview item.
405 * @param pos is the position where the user has clicked, and 409 * @param pos is the position where the user has clicked, and
406 * @param c is the column into which the user clicked. 410 * @param c is the column into which the user clicked.
407 * 411 *
408 * Note that you may not delete any @ref QListViewItem objects in slots 412 * Note that you may not delete any @ref QListViewItem objects in slots
409 * connected to this signal. 413 * connected to this signal.
410 * 414 *
411 * This signal is more or less here for the sake of completeness. 415 * This signal is more or less here for the sake of completeness.
412 * You should normally not need to use this. In most cases its better 416 * You should normally not need to use this. In most cases its better
413 * to use @ref #executed() instead. 417 * to use @ref #executed() instead.
414 */ 418 */
415 void doubleClicked( QListViewItem *item, const QPoint &pos, int c ); 419 void doubleClicked( QListViewItem *item, const QPoint &pos, int c );
416 void contextRequest( QListViewItem *item, const QPoint &pos, int c ); 420 void contextRequest( QListViewItem *item, const QPoint &pos, int c );
417 421
418 /** 422 /**
419 * This signal gets emitted whenever something acceptable is 423 * This signal gets emitted whenever something acceptable is
420 * dropped onto the listview. 424 * dropped onto the listview.
421 * 425 *
422 * @param e is the drop event itself (it has already been accepted) 426 * @param e is the drop event itself (it has already been accepted)
@@ -638,97 +642,98 @@ public slots:
638 * @since 3.1 642 * @since 3.1
639 */ 643 */
640 void setTabOrderedRenaming(bool b); 644 void setTabOrderedRenaming(bool b);
641 645
642 /** 646 /**
643 * Returns whether tab ordered renaming is enabled 647 * Returns whether tab ordered renaming is enabled
644 * @since 3.1 648 * @since 3.1
645 */ 649 */
646 bool tabOrderedRenaming() const; 650 bool tabOrderedRenaming() const;
647 651
648protected: 652protected:
649 /** 653 /**
650 * Determine whether a drop on position @p p would count as 654 * Determine whether a drop on position @p p would count as
651 * being above or below the QRect @p rect. 655 * being above or below the QRect @p rect.
652 * 656 *
653 * @param rect is the rectangle we examine. 657 * @param rect is the rectangle we examine.
654 * @param p is the point located in the rectangle, p is assumed to be in 658 * @param p is the point located in the rectangle, p is assumed to be in
655 * viewport coordinates. 659 * viewport coordinates.
656 */ 660 */
657 inline bool below (const QRect& rect, const QPoint& p) 661 inline bool below (const QRect& rect, const QPoint& p)
658 { 662 {
659 return (p.y() > (rect.top() + (rect.bottom() - rect.top())/2)); 663 return (p.y() > (rect.top() + (rect.bottom() - rect.top())/2));
660 } 664 }
661 665
662 /** 666 /**
663 * An overloaded version of below(const QRect&, const QPoint&). 667 * An overloaded version of below(const QRect&, const QPoint&).
664 * 668 *
665 * It differs from the above only in what arguments it takes. 669 * It differs from the above only in what arguments it takes.
666 * 670 *
667 * @param i the item whose rect() is passed to the above function. 671 * @param i the item whose rect() is passed to the above function.
668 * @param p is translated from contents coordinates to viewport coordinates 672 * @param p is translated from contents coordinates to viewport coordinates
669 * before being passed to the above function. 673 * before being passed to the above function.
670 */ 674 */
671 inline bool below (QListViewItem* i, const QPoint& p) 675 inline bool below (QListViewItem* i, const QPoint& p)
672 { 676 {
673 return below (itemRect(i), contentsToViewport(p)); 677 return below (itemRect(i), contentsToViewport(p));
674 } 678 }
675 679
676 /** 680 /**
677 * Reimplemented to reload the alternate background in palette changes. 681 * Reimplemented to reload the alternate background in palette changes.
678 * @internal 682 * @internal
679 */ 683 */
680 virtual bool event( QEvent * ); 684 virtual bool event( QEvent * );
681 685
682 /** 686 /**
683 * Emit signal @ref #executed. 687 * Emit signal @ref #executed.
684 * @internal 688 * @internal
685 */ 689 */
686 void emitExecute( QListViewItem *item, const QPoint &pos, int c ); 690 //US I added buttonstate to pass the current keyboard status
691 void emitExecute( int buttonstate, QListViewItem *item, const QPoint &pos, int c);
687 692
688 /** 693 /**
689 * Reimplemented for internal reasons. 694 * Reimplemented for internal reasons.
690 * Further reimplementations should call this function or else 695 * Further reimplementations should call this function or else
691 * some features may not work correctly. 696 * some features may not work correctly.
692 * 697 *
693 * The API is unaffected. 698 * The API is unaffected.
694 */ 699 */
695 virtual void focusInEvent(QFocusEvent* fe); 700 virtual void focusInEvent(QFocusEvent* fe);
696 701
697 /** 702 /**
698 * Reimplemented for internal reasons. 703 * Reimplemented for internal reasons.
699 * Further reimplementations should call this function or else 704 * Further reimplementations should call this function or else
700 * some features may not work correctly. 705 * some features may not work correctly.
701 * 706 *
702 * The API is unaffected. 707 * The API is unaffected.
703 */ 708 */
704 virtual void focusOutEvent( QFocusEvent *fe ); 709 virtual void focusOutEvent( QFocusEvent *fe );
705 710
706 /** 711 /**
707 * Reimplemented for internal reasons. 712 * Reimplemented for internal reasons.
708 * Further reimplementations should call this function or else 713 * Further reimplementations should call this function or else
709 * some features may not work correctly. 714 * some features may not work correctly.
710 * 715 *
711 * The API is unaffected. 716 * The API is unaffected.
712 */ 717 */
713 virtual void leaveEvent( QEvent *e ); 718 virtual void leaveEvent( QEvent *e );
714 719
715 /** 720 /**
716 * @return the tooltip for @p column of @p item. 721 * @return the tooltip for @p column of @p item.
717 */ 722 */
718 virtual QString tooltip(QListViewItem* item, int column) const; 723 virtual QString tooltip(QListViewItem* item, int column) const;
719 724
720 /** 725 /**
721 * @return whether the tooltip for @p column of @p item shall be shown at point @p pos. 726 * @return whether the tooltip for @p column of @p item shall be shown at point @p pos.
722 */ 727 */
723 virtual bool showTooltip(QListViewItem *item, const QPoint &pos, int column) const; 728 virtual bool showTooltip(QListViewItem *item, const QPoint &pos, int column) const;
724 729
725 /** 730 /**
726 * Reimplemented for internal reasons. 731 * Reimplemented for internal reasons.
727 * Further reimplementations should call this function or else 732 * Further reimplementations should call this function or else
728 * some features may not work correctly. 733 * some features may not work correctly.
729 * 734 *
730 * The API is unaffected. 735 * The API is unaffected.
731 */ 736 */
732 virtual void contentsDragMoveEvent (QDragMoveEvent *event); 737 virtual void contentsDragMoveEvent (QDragMoveEvent *event);
733 738
734 /** 739 /**