author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /microkde/kdeui/klistview.h | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2 |
initial public commit of qt4 portp1
-rw-r--r-- | microkde/kdeui/klistview.h | 121 |
1 files changed, 66 insertions, 55 deletions
diff --git a/microkde/kdeui/klistview.h b/microkde/kdeui/klistview.h index 9f0d9fd..2176525 100644 --- a/microkde/kdeui/klistview.h +++ b/microkde/kdeui/klistview.h | |||
@@ -19,19 +19,30 @@ | |||
19 | */ | 19 | */ |
20 | #ifndef KLISTVIEW_H | 20 | #ifndef KLISTVIEW_H |
21 | #define KLISTVIEW_H | 21 | #define KLISTVIEW_H |
22 | 22 | ||
23 | #include <qlistview.h> | 23 | #include <q3listview.h> |
24 | 24 | ||
25 | #include <qptrlist.h> | 25 | #include <q3ptrlist.h> |
26 | //Added by qt3to4: | ||
27 | #include <QDragMoveEvent> | ||
28 | #include <QDropEvent> | ||
29 | #include <QDragLeaveEvent> | ||
30 | #include <QPaintEvent> | ||
31 | #include <QResizeEvent> | ||
32 | #include <QFocusEvent> | ||
33 | #include <QMouseEvent> | ||
34 | #include <QKeyEvent> | ||
35 | #include <QEvent> | ||
36 | #include <QDragEnterEvent> | ||
26 | 37 | ||
27 | //US | 38 | //US |
28 | class QDropEvent; | 39 | class QDropEvent; |
29 | class QDragLeaveEvent; | 40 | class QDragLeaveEvent; |
30 | class QDragMoveEvent; | 41 | class QDragMoveEvent; |
31 | class QDragEnterEvent; | 42 | class QDragEnterEvent; |
32 | 43 | ||
33 | class QDragObject; | 44 | class Q3DragObject; |
34 | class KConfig; | 45 | class KConfig; |
35 | class KLineEdit; | 46 | class KLineEdit; |
36 | /** | 47 | /** |
37 | * This Widget extends the functionality of QListView to honor the system | 48 | * This Widget extends the functionality of QListView to honor the system |
@@ -56,9 +67,9 @@ class KLineEdit; | |||
56 | * and @ref setDragEnabled(true). | 67 | * and @ref setDragEnabled(true). |
57 | * | 68 | * |
58 | * @version $Id$ | 69 | * @version $Id$ |
59 | */ | 70 | */ |
60 | class KListView : public QListView | 71 | class KListView : public Q3ListView |
61 | { | 72 | { |
62 | Q_OBJECT | 73 | Q_OBJECT |
63 | Q_ENUMS( SelectionModeExt ) | 74 | Q_ENUMS( SelectionModeExt ) |
64 | Q_PROPERTY( bool fullWidth READ fullWidth WRITE setFullWidth ) | 75 | Q_PROPERTY( bool fullWidth READ fullWidth WRITE setFullWidth ) |
@@ -105,17 +116,17 @@ public: | |||
105 | * | 116 | * |
106 | * This way e.g. SHIFT+up/PgUp then SHIFT+down/PgDn leaves no item selected | 117 | * This way e.g. SHIFT+up/PgUp then SHIFT+down/PgDn leaves no item selected |
107 | */ | 118 | */ |
108 | enum SelectionModeExt { | 119 | enum SelectionModeExt { |
109 | Single = QListView::Single, | 120 | Single = Q3ListView::Single, |
110 | Multi = QListView::Multi, | 121 | Multi = Q3ListView::Multi, |
111 | Extended = QListView::Extended, | 122 | Extended = Q3ListView::Extended, |
112 | NoSelection = QListView::NoSelection, | 123 | NoSelection = Q3ListView::NoSelection, |
113 | FileManager | 124 | FileManager |
114 | }; | 125 | }; |
115 | void repaintContents( bool erase = true ) | 126 | void repaintContents( bool erase = true ) |
116 | { | 127 | { |
117 | QScrollView::repaintContents( contentsX(), contentsY(), | 128 | Q3ScrollView::repaintContents( contentsX(), contentsY(), |
118 | visibleWidth(), visibleHeight(), erase ); | 129 | visibleWidth(), visibleHeight(), erase ); |
119 | }; | 130 | }; |
120 | /** | 131 | /** |
121 | * Constructor. | 132 | * Constructor. |
@@ -160,28 +171,28 @@ public: | |||
160 | 171 | ||
161 | /** | 172 | /** |
162 | * @return a list containing the currently selected items. | 173 | * @return a list containing the currently selected items. |
163 | */ | 174 | */ |
164 | QPtrList<QListViewItem> selectedItems() const; // ### BIC: KDE 4: use an implicitly shared class! (QValueList?) | 175 | Q3PtrList<Q3ListViewItem> selectedItems() const; // ### BIC: KDE 4: use an implicitly shared class! (QValueList?) |
165 | 176 | ||
166 | /** | 177 | /** |
167 | * Arbitrarily move @p item to @p parent, positioned immediately after item @p after. | 178 | * Arbitrarily move @p item to @p parent, positioned immediately after item @p after. |
168 | */ | 179 | */ |
169 | void moveItem(QListViewItem *item, QListViewItem *parent, QListViewItem *after); | 180 | void moveItem(Q3ListViewItem *item, Q3ListViewItem *parent, Q3ListViewItem *after); |
170 | 181 | ||
171 | /** | 182 | /** |
172 | * @return the last item (not child!) of this listview. | 183 | * @return the last item (not child!) of this listview. |
173 | * | 184 | * |
174 | * @see lastChild() | 185 | * @see lastChild() |
175 | */ | 186 | */ |
176 | QListViewItem *lastItem() const; | 187 | Q3ListViewItem *lastItem() const; |
177 | 188 | ||
178 | /** | 189 | /** |
179 | * @return the last child of this listview. | 190 | * @return the last child of this listview. |
180 | * | 191 | * |
181 | * @see lastItem() | 192 | * @see lastItem() |
182 | */ | 193 | */ |
183 | QListViewItem* lastChild () const; | 194 | Q3ListViewItem* lastChild () const; |
184 | 195 | ||
185 | /** | 196 | /** |
186 | * @return the lineedit used for inline renaming. | 197 | * @return the lineedit used for inline renaming. |
187 | * Use that to setup a @ref KCompletion or @ref QValidator for the lineedit | 198 | * Use that to setup a @ref KCompletion or @ref QValidator for the lineedit |
@@ -275,16 +286,16 @@ public: | |||
275 | * Returns the index of @p item within the item tree or -1 if | 286 | * Returns the index of @p item within the item tree or -1 if |
276 | * @p item doesn't exist in this list view. This function takes | 287 | * @p item doesn't exist in this list view. This function takes |
277 | * all items into account not only the visible ones. | 288 | * all items into account not only the visible ones. |
278 | */ | 289 | */ |
279 | int itemIndex( const QListViewItem *item ) const; | 290 | int itemIndex( const Q3ListViewItem *item ) const; |
280 | 291 | ||
281 | /** | 292 | /** |
282 | * Returns the item of @p index within the item tree or 0 if | 293 | * Returns the item of @p index within the item tree or 0 if |
283 | * @p index doesn't exist in this list view. This function takes | 294 | * @p index doesn't exist in this list view. This function takes |
284 | * all items into account not only the visible ones. | 295 | * all items into account not only the visible ones. |
285 | */ | 296 | */ |
286 | QListViewItem* itemAtIndex(int index); | 297 | Q3ListViewItem* itemAtIndex(int index); |
287 | 298 | ||
288 | /** | 299 | /** |
289 | * @deprecated | 300 | * @deprecated |
290 | * @see #setFullWidth() | 301 | * @see #setFullWidth() |
@@ -313,9 +324,9 @@ public: | |||
313 | virtual int addColumn(const QString& label, int width = -1); | 324 | virtual int addColumn(const QString& label, int width = -1); |
314 | /** | 325 | /** |
315 | * Reimplemented for full width support | 326 | * Reimplemented for full width support |
316 | */ | 327 | */ |
317 | virtual int addColumn(const QIconSet& iconset, const QString& label, int width = -1); | 328 | virtual int addColumn(const QIcon& iconset, const QString& label, int width = -1); |
318 | /** | 329 | /** |
319 | * Reimplemented for full width support | 330 | * Reimplemented for full width support |
320 | * | 331 | * |
321 | * @see #addColumn() | 332 | * @see #addColumn() |
@@ -387,9 +398,9 @@ signals: | |||
387 | * | 398 | * |
388 | * Note that you may not delete any @ref QListViewItem objects in slots | 399 | * Note that you may not delete any @ref QListViewItem objects in slots |
389 | * connected to this signal. | 400 | * connected to this signal. |
390 | */ | 401 | */ |
391 | void executed( QListViewItem *item ); | 402 | void executed( Q3ListViewItem *item ); |
392 | 403 | ||
393 | /** | 404 | /** |
394 | * This signal is emitted whenever the user executes an listview item. | 405 | * This signal is emitted whenever the user executes an listview item. |
395 | * That means depending on the KDE wide Single Click/Double Click | 406 | * That means depending on the KDE wide Single Click/Double Click |
@@ -400,9 +411,9 @@ signals: | |||
400 | * | 411 | * |
401 | * 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 |
402 | * connected to this signal. | 413 | * connected to this signal. |
403 | */ | 414 | */ |
404 | void executed( QListViewItem *item, const QPoint &pos, int c ); | 415 | void executed( Q3ListViewItem *item, const QPoint &pos, int c ); |
405 | 416 | ||
406 | /** | 417 | /** |
407 | * This signal gets emitted whenever the user double clicks into the | 418 | * This signal gets emitted whenever the user double clicks into the |
408 | * listview. | 419 | * listview. |
@@ -416,10 +427,10 @@ signals: | |||
416 | * This signal is more or less here for the sake of completeness. | 427 | * This signal is more or less here for the sake of completeness. |
417 | * You should normally not need to use this. In most cases its better | 428 | * You should normally not need to use this. In most cases its better |
418 | * to use @ref #executed() instead. | 429 | * to use @ref #executed() instead. |
419 | */ | 430 | */ |
420 | void doubleClicked( QListViewItem *item, const QPoint &pos, int c ); | 431 | void doubleClicked( Q3ListViewItem *item, const QPoint &pos, int c ); |
421 | void contextRequest( QListViewItem *item, const QPoint &pos, int c ); | 432 | void contextRequest( Q3ListViewItem *item, const QPoint &pos, int c ); |
422 | 433 | ||
423 | /** | 434 | /** |
424 | * This signal gets emitted whenever something acceptable is | 435 | * This signal gets emitted whenever something acceptable is |
425 | * dropped onto the listview. | 436 | * dropped onto the listview. |
@@ -429,9 +440,9 @@ signals: | |||
429 | * the drop was above all items) | 440 | * the drop was above all items) |
430 | * | 441 | * |
431 | * @see #acceptDrop() | 442 | * @see #acceptDrop() |
432 | */ | 443 | */ |
433 | void dropped (QDropEvent * e, QListViewItem *after); | 444 | void dropped (QDropEvent * e, Q3ListViewItem *after); |
434 | 445 | ||
435 | /** | 446 | /** |
436 | * This signal gets emitted whenever something acceptable is | 447 | * This signal gets emitted whenever something acceptable is |
437 | * dropped onto the listview. | 448 | * dropped onto the listview. |
@@ -443,9 +454,9 @@ signals: | |||
443 | * @param e is the drop event itself (it has already been accepted) | 454 | * @param e is the drop event itself (it has already been accepted) |
444 | * @param after is the item after which the drop occured (or 0L, if | 455 | * @param after is the item after which the drop occured (or 0L, if |
445 | * the drop was above all items | 456 | * the drop was above all items |
446 | */ | 457 | */ |
447 | void dropped (KListView* list, QDropEvent* e, QListViewItem* after); | 458 | void dropped (KListView* list, QDropEvent* e, Q3ListViewItem* after); |
448 | 459 | ||
449 | /** | 460 | /** |
450 | * This signal gets emitted whenever something acceptable is | 461 | * This signal gets emitted whenever something acceptable is |
451 | * dropped onto the listview. | 462 | * dropped onto the listview. |
@@ -457,9 +468,9 @@ signals: | |||
457 | * @param parent the item that is to be the parent of the new item | 468 | * @param parent the item that is to be the parent of the new item |
458 | * @param after is the item after which the drop occured (or 0L, if | 469 | * @param after is the item after which the drop occured (or 0L, if |
459 | * the drop was above all items | 470 | * the drop was above all items |
460 | */ | 471 | */ |
461 | void dropped (KListView* list, QDropEvent* e, QListViewItem* parent, QListViewItem* after); | 472 | void dropped (KListView* list, QDropEvent* e, Q3ListViewItem* parent, Q3ListViewItem* after); |
462 | 473 | ||
463 | /** | 474 | /** |
464 | * This signal gets emitted whenever something acceptable is | 475 | * This signal gets emitted whenever something acceptable is |
465 | * dropped onto the listview. | 476 | * dropped onto the listview. |
@@ -470,9 +481,9 @@ signals: | |||
470 | * @param parent the item that is to be the parent of the new item | 481 | * @param parent the item that is to be the parent of the new item |
471 | * @param after is the item after which the drop occured (or 0L, if | 482 | * @param after is the item after which the drop occured (or 0L, if |
472 | * the drop was above all items | 483 | * the drop was above all items |
473 | */ | 484 | */ |
474 | void dropped (QDropEvent* e, QListViewItem* parent, QListViewItem* after); | 485 | void dropped (QDropEvent* e, Q3ListViewItem* parent, Q3ListViewItem* after); |
475 | 486 | ||
476 | /** | 487 | /** |
477 | * This signal is emitted when ever the user moves an item in the list via | 488 | * This signal is emitted when ever the user moves an item in the list via |
478 | * DnD. | 489 | * DnD. |
@@ -501,31 +512,31 @@ signals: | |||
501 | * @param item the item that was moved | 512 | * @param item the item that was moved |
502 | * @param afterFirst the item that parameter item was in before the move, in the list | 513 | * @param afterFirst the item that parameter item was in before the move, in the list |
503 | * @param afterNow the item it's currently after. | 514 | * @param afterNow the item it's currently after. |
504 | */ | 515 | */ |
505 | void moved (QListViewItem *item, QListViewItem *afterFirst, QListViewItem *afterNow); | 516 | void moved (Q3ListViewItem *item, Q3ListViewItem *afterFirst, Q3ListViewItem *afterNow); |
506 | 517 | ||
507 | 518 | ||
508 | /** | 519 | /** |
509 | * This signal is emitted after all the items have been moved. It reports info for | 520 | * This signal is emitted after all the items have been moved. It reports info for |
510 | * each and every item moved, in order. The first element in @p items associates | 521 | * each and every item moved, in order. The first element in @p items associates |
511 | * with the first of afterFirst and afterNow. | 522 | * with the first of afterFirst and afterNow. |
512 | */ | 523 | */ |
513 | void moved(QPtrList<QListViewItem> &items, QPtrList<QListViewItem> &afterFirst, QPtrList<QListViewItem> &afterNow); | 524 | void moved(Q3PtrList<Q3ListViewItem> &items, Q3PtrList<Q3ListViewItem> &afterFirst, Q3PtrList<Q3ListViewItem> &afterNow); |
514 | 525 | ||
515 | /** | 526 | /** |
516 | * This signal gets emitted when an item is renamed via in-place renaming. | 527 | * This signal gets emitted when an item is renamed via in-place renaming. |
517 | * | 528 | * |
518 | * @param item is the renamed item. | 529 | * @param item is the renamed item. |
519 | * @param str is the new value of column @p col. | 530 | * @param str is the new value of column @p col. |
520 | * @param col is the renamed column. | 531 | * @param col is the renamed column. |
521 | */ | 532 | */ |
522 | void itemRenamed(QListViewItem* item, const QString &str, int col); | 533 | void itemRenamed(Q3ListViewItem* item, const QString &str, int col); |
523 | 534 | ||
524 | /** | 535 | /** |
525 | * Same as above, but without the extra information. | 536 | * Same as above, but without the extra information. |
526 | */ | 537 | */ |
527 | void itemRenamed(QListViewItem* item); | 538 | void itemRenamed(Q3ListViewItem* item); |
528 | void signalDelete(); | 539 | void signalDelete(); |
529 | 540 | ||
530 | /** | 541 | /** |
531 | * This signal is emitted when the shortcut key for popup-menus is pressed. | 542 | * This signal is emitted when the shortcut key for popup-menus is pressed. |
@@ -536,9 +547,9 @@ signals: | |||
536 | * | 547 | * |
537 | * @param list is this listview. | 548 | * @param list is this listview. |
538 | * @param item is the @ref currentItem() at the time the key was pressed. May be 0L. | 549 | * @param item is the @ref currentItem() at the time the key was pressed. May be 0L. |
539 | */ | 550 | */ |
540 | void menuShortCutPressed (KListView* list, QListViewItem* item); | 551 | void menuShortCutPressed (KListView* list, Q3ListViewItem* item); |
541 | 552 | ||
542 | /** | 553 | /** |
543 | * This signal is emitted whenever a context-menu should be shown for item @p i. | 554 | * This signal is emitted whenever a context-menu should be shown for item @p i. |
544 | * It automatically adjusts for all settings involved (Menu key, showMenuOnPress/Click). | 555 | * It automatically adjusts for all settings involved (Menu key, showMenuOnPress/Click). |
@@ -546,15 +557,15 @@ signals: | |||
546 | * @param l is this listview. | 557 | * @param l is this listview. |
547 | * @param i is the item for which the menu should be shown. May be 0L. | 558 | * @param i is the item for which the menu should be shown. May be 0L. |
548 | * @param p is the point at which the menu should be shown. | 559 | * @param p is the point at which the menu should be shown. |
549 | */ | 560 | */ |
550 | void contextMenu (KListView* l, QListViewItem* i, const QPoint& p); | 561 | void contextMenu (KListView* l, Q3ListViewItem* i, const QPoint& p); |
551 | 562 | ||
552 | public slots: | 563 | public slots: |
553 | /** | 564 | /** |
554 | * Rename column @p c of @p item. | 565 | * Rename column @p c of @p item. |
555 | */ | 566 | */ |
556 | virtual void rename(QListViewItem *item, int c); | 567 | virtual void rename(Q3ListViewItem *item, int c); |
557 | 568 | ||
558 | /** | 569 | /** |
559 | * By default, if you called setItemsRenameable(true), | 570 | * By default, if you called setItemsRenameable(true), |
560 | * only the first column is renameable. | 571 | * only the first column is renameable. |
@@ -672,9 +683,9 @@ protected: | |||
672 | * @param i the item whose rect() is passed to the above function. | 683 | * @param i the item whose rect() is passed to the above function. |
673 | * @param p is translated from contents coordinates to viewport coordinates | 684 | * @param p is translated from contents coordinates to viewport coordinates |
674 | * before being passed to the above function. | 685 | * before being passed to the above function. |
675 | */ | 686 | */ |
676 | inline bool below (QListViewItem* i, const QPoint& p) | 687 | inline bool below (Q3ListViewItem* i, const QPoint& p) |
677 | { | 688 | { |
678 | return below (itemRect(i), contentsToViewport(p)); | 689 | return below (itemRect(i), contentsToViewport(p)); |
679 | } | 690 | } |
680 | 691 | ||
@@ -688,9 +699,9 @@ protected: | |||
688 | * Emit signal @ref #executed. | 699 | * Emit signal @ref #executed. |
689 | * @internal | 700 | * @internal |
690 | */ | 701 | */ |
691 | //US I added buttonstate to pass the current keyboard status | 702 | //US I added buttonstate to pass the current keyboard status |
692 | void emitExecute( int buttonstate, QListViewItem *item, const QPoint &pos, int c); | 703 | void emitExecute( int buttonstate, Q3ListViewItem *item, const QPoint &pos, int c); |
693 | 704 | ||
694 | /** | 705 | /** |
695 | * Reimplemented for internal reasons. | 706 | * Reimplemented for internal reasons. |
696 | * Further reimplementations should call this function or else | 707 | * Further reimplementations should call this function or else |
@@ -720,14 +731,14 @@ protected: | |||
720 | 731 | ||
721 | /** | 732 | /** |
722 | * @return the tooltip for @p column of @p item. | 733 | * @return the tooltip for @p column of @p item. |
723 | */ | 734 | */ |
724 | virtual QString tooltip(QListViewItem* item, int column) const; | 735 | virtual QString tooltip(Q3ListViewItem* item, int column) const; |
725 | 736 | ||
726 | /** | 737 | /** |
727 | * @return whether the tooltip for @p column of @p item shall be shown at point @p pos. | 738 | * @return whether the tooltip for @p column of @p item shall be shown at point @p pos. |
728 | */ | 739 | */ |
729 | virtual bool showTooltip(QListViewItem *item, const QPoint &pos, int column) const; | 740 | virtual bool showTooltip(Q3ListViewItem *item, const QPoint &pos, int column) const; |
730 | 741 | ||
731 | /** | 742 | /** |
732 | * Reimplemented for internal reasons. | 743 | * Reimplemented for internal reasons. |
733 | * Further reimplementations should call this function or else | 744 | * Further reimplementations should call this function or else |
@@ -804,9 +815,9 @@ protected: | |||
804 | * @return a dragobject encoding the current selection. | 815 | * @return a dragobject encoding the current selection. |
805 | * | 816 | * |
806 | * @see setDragEnabled() | 817 | * @see setDragEnabled() |
807 | */ | 818 | */ |
808 | virtual QDragObject *dragObject(); | 819 | virtual Q3DragObject *dragObject(); |
809 | 820 | ||
810 | /** | 821 | /** |
811 | * @return true if the @p event provides some acceptable | 822 | * @return true if the @p event provides some acceptable |
812 | * format. | 823 | * format. |
@@ -820,17 +831,17 @@ protected: | |||
820 | * If after == 0 then the marker should be drawn at the top. | 831 | * If after == 0 then the marker should be drawn at the top. |
821 | * | 832 | * |
822 | * @return the rectangle that you painted to. | 833 | * @return the rectangle that you painted to. |
823 | */ | 834 | */ |
824 | virtual QRect drawDropVisualizer (QPainter *p, QListViewItem *parent, QListViewItem *after); | 835 | virtual QRect drawDropVisualizer (QPainter *p, Q3ListViewItem *parent, Q3ListViewItem *after); |
825 | 836 | ||
826 | /** | 837 | /** |
827 | * Paint the drag rectangle. If painter is null, don't try to :) | 838 | * Paint the drag rectangle. If painter is null, don't try to :) |
828 | * | 839 | * |
829 | * | 840 | * |
830 | * @return the rectangle that you painted to. | 841 | * @return the rectangle that you painted to. |
831 | */ | 842 | */ |
832 | virtual QRect drawItemHighlighter(QPainter *painter, QListViewItem *item); | 843 | virtual QRect drawItemHighlighter(QPainter *painter, Q3ListViewItem *item); |
833 | 844 | ||
834 | /** | 845 | /** |
835 | * This method calls @ref dragObject() and starts the drag. | 846 | * This method calls @ref dragObject() and starts the drag. |
836 | * | 847 | * |
@@ -885,10 +896,10 @@ protected slots: | |||
885 | * @internal | 896 | * @internal |
886 | */ | 897 | */ |
887 | void slotSettingsChanged(int); | 898 | void slotSettingsChanged(int); |
888 | 899 | ||
889 | void slotMouseButtonClicked( int btn, QListViewItem *item, const QPoint &pos, int c ); | 900 | void slotMouseButtonClicked( int btn, Q3ListViewItem *item, const QPoint &pos, int c ); |
890 | void doneEditing(QListViewItem *item, int row); | 901 | void doneEditing(Q3ListViewItem *item, int row); |
891 | 902 | ||
892 | /** | 903 | /** |
893 | * Repaint the rect where I was drawing the drop line. | 904 | * Repaint the rect where I was drawing the drop line. |
894 | */ | 905 | */ |
@@ -901,20 +912,20 @@ protected slots: | |||
901 | 912 | ||
902 | /** | 913 | /** |
903 | * Emit the @ref contextMenu signal. This slot is for mouse actions. | 914 | * Emit the @ref contextMenu signal. This slot is for mouse actions. |
904 | */ | 915 | */ |
905 | void emitContextMenu (QListViewItem*, const QPoint&, int); | 916 | void emitContextMenu (Q3ListViewItem*, const QPoint&, int); |
906 | 917 | ||
907 | /** | 918 | /** |
908 | * Emit the @ref #contextMenu signal. This slot is for key presses. | 919 | * Emit the @ref #contextMenu signal. This slot is for key presses. |
909 | */ | 920 | */ |
910 | void emitContextMenu (KListView*, QListViewItem*); | 921 | void emitContextMenu (KListView*, Q3ListViewItem*); |
911 | 922 | ||
912 | /** | 923 | /** |
913 | * Accessory slot for AutoSelect | 924 | * Accessory slot for AutoSelect |
914 | * @internal | 925 | * @internal |
915 | */ | 926 | */ |
916 | void slotOnItem( QListViewItem *item ); | 927 | void slotOnItem( Q3ListViewItem *item ); |
917 | 928 | ||
918 | /** | 929 | /** |
919 | * Accessory slot for AutoSelect/ChangeCursorOverItem | 930 | * Accessory slot for AutoSelect/ChangeCursorOverItem |
920 | * @internal | 931 | * @internal |
@@ -938,17 +949,17 @@ protected slots: | |||
938 | protected: | 949 | protected: |
939 | /** | 950 | /** |
940 | * Handle dropEvent when itemsMovable() is set to true. | 951 | * Handle dropEvent when itemsMovable() is set to true. |
941 | */ | 952 | */ |
942 | virtual void movableDropEvent (QListViewItem* parent, QListViewItem* afterme); | 953 | virtual void movableDropEvent (Q3ListViewItem* parent, Q3ListViewItem* afterme); |
943 | 954 | ||
944 | /** | 955 | /** |
945 | * Where is the nearest QListViewItem that I'm going to drop? | 956 | * Where is the nearest QListViewItem that I'm going to drop? |
946 | * | 957 | * |
947 | * FIXME KDE 4.0: Make this method const so it can be called from an | 958 | * FIXME KDE 4.0: Make this method const so it can be called from an |
948 | * acceptDrag method without ugly casts | 959 | * acceptDrag method without ugly casts |
949 | */ | 960 | */ |
950 | virtual void findDrop(const QPoint &pos, QListViewItem *&parent, QListViewItem *&after); | 961 | virtual void findDrop(const QPoint &pos, Q3ListViewItem *&parent, Q3ListViewItem *&after); |
951 | 962 | ||
952 | /** | 963 | /** |
953 | * A special keyPressEvent (for FileManager selection mode). | 964 | * A special keyPressEvent (for FileManager selection mode). |
954 | */ | 965 | */ |
@@ -973,41 +984,41 @@ private: | |||
973 | * a drop-in replacement for @ref QListViewItem | 984 | * a drop-in replacement for @ref QListViewItem |
974 | * | 985 | * |
975 | * @short listview item with alternate background colour support | 986 | * @short listview item with alternate background colour support |
976 | */ | 987 | */ |
977 | class KListViewItem : public QListViewItem | 988 | class KListViewItem : public Q3ListViewItem |
978 | { | 989 | { |
979 | public: | 990 | public: |
980 | /** | 991 | /** |
981 | * constructors. The semantics remain as in @ref QListViewItem. | 992 | * constructors. The semantics remain as in @ref QListViewItem. |
982 | * Although they accept a @ref QListViewItem as parent, please | 993 | * Although they accept a @ref QListViewItem as parent, please |
983 | * don't mix KListViewItem (or subclasses) with QListViewItem | 994 | * don't mix KListViewItem (or subclasses) with QListViewItem |
984 | * (or subclasses). | 995 | * (or subclasses). |
985 | */ | 996 | */ |
986 | KListViewItem(QListView *parent); | 997 | KListViewItem(Q3ListView *parent); |
987 | KListViewItem(QListViewItem *parent); | 998 | KListViewItem(Q3ListViewItem *parent); |
988 | KListViewItem(QListView *parent, QListViewItem *after); | 999 | KListViewItem(Q3ListView *parent, Q3ListViewItem *after); |
989 | KListViewItem(QListViewItem *parent, QListViewItem *after); | 1000 | KListViewItem(Q3ListViewItem *parent, Q3ListViewItem *after); |
990 | 1001 | ||
991 | KListViewItem(QListView *parent, | 1002 | KListViewItem(Q3ListView *parent, |
992 | QString, QString = QString::null, | 1003 | QString, QString = QString::null, |
993 | QString = QString::null, QString = QString::null, | 1004 | QString = QString::null, QString = QString::null, |
994 | QString = QString::null, QString = QString::null, | 1005 | QString = QString::null, QString = QString::null, |
995 | QString = QString::null, QString = QString::null); | 1006 | QString = QString::null, QString = QString::null); |
996 | 1007 | ||
997 | KListViewItem(QListViewItem *parent, | 1008 | KListViewItem(Q3ListViewItem *parent, |
998 | QString, QString = QString::null, | 1009 | QString, QString = QString::null, |
999 | QString = QString::null, QString = QString::null, | 1010 | QString = QString::null, QString = QString::null, |
1000 | QString = QString::null, QString = QString::null, | 1011 | QString = QString::null, QString = QString::null, |
1001 | QString = QString::null, QString = QString::null); | 1012 | QString = QString::null, QString = QString::null); |
1002 | 1013 | ||
1003 | KListViewItem(QListView *parent, QListViewItem *after, | 1014 | KListViewItem(Q3ListView *parent, Q3ListViewItem *after, |
1004 | QString, QString = QString::null, | 1015 | QString, QString = QString::null, |
1005 | QString = QString::null, QString = QString::null, | 1016 | QString = QString::null, QString = QString::null, |
1006 | QString = QString::null, QString = QString::null, | 1017 | QString = QString::null, QString = QString::null, |
1007 | QString = QString::null, QString = QString::null); | 1018 | QString = QString::null, QString = QString::null); |
1008 | 1019 | ||
1009 | KListViewItem(QListViewItem *parent, QListViewItem *after, | 1020 | KListViewItem(Q3ListViewItem *parent, Q3ListViewItem *after, |
1010 | QString, QString = QString::null, | 1021 | QString, QString = QString::null, |
1011 | QString = QString::null, QString = QString::null, | 1022 | QString = QString::null, QString = QString::null, |
1012 | QString = QString::null, QString = QString::null, | 1023 | QString = QString::null, QString = QString::null, |
1013 | QString = QString::null, QString = QString::null); | 1024 | QString = QString::null, QString = QString::null); |