summaryrefslogtreecommitdiffabout
path: root/microkde/kdeui/klistview.h
Side-by-side diff
Diffstat (limited to 'microkde/kdeui/klistview.h') (more/less context) (show whitespace changes)
-rw-r--r--microkde/kdeui/klistview.h121
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 @@
*/
#ifndef KLISTVIEW_H
#define KLISTVIEW_H
-#include <qlistview.h>
-
-#include <qptrlist.h>
+#include <q3listview.h>
+
+#include <q3ptrlist.h>
+//Added by qt3to4:
+#include <QDragMoveEvent>
+#include <QDropEvent>
+#include <QDragLeaveEvent>
+#include <QPaintEvent>
+#include <QResizeEvent>
+#include <QFocusEvent>
+#include <QMouseEvent>
+#include <QKeyEvent>
+#include <QEvent>
+#include <QDragEnterEvent>
//US
class QDropEvent;
class QDragLeaveEvent;
class QDragMoveEvent;
class QDragEnterEvent;
-class QDragObject;
+class Q3DragObject;
class KConfig;
class KLineEdit;
/**
* This Widget extends the functionality of QListView to honor the system
@@ -56,9 +67,9 @@ class KLineEdit;
* and @ref setDragEnabled(true).
*
* @version $Id$
*/
-class KListView : public QListView
+class KListView : public Q3ListView
{
Q_OBJECT
Q_ENUMS( SelectionModeExt )
Q_PROPERTY( bool fullWidth READ fullWidth WRITE setFullWidth )
@@ -105,17 +116,17 @@ public:
*
* This way e.g. SHIFT+up/PgUp then SHIFT+down/PgDn leaves no item selected
*/
enum SelectionModeExt {
- Single = QListView::Single,
- Multi = QListView::Multi,
- Extended = QListView::Extended,
- NoSelection = QListView::NoSelection,
+ Single = Q3ListView::Single,
+ Multi = Q3ListView::Multi,
+ Extended = Q3ListView::Extended,
+ NoSelection = Q3ListView::NoSelection,
FileManager
};
void repaintContents( bool erase = true )
{
- QScrollView::repaintContents( contentsX(), contentsY(),
+ Q3ScrollView::repaintContents( contentsX(), contentsY(),
visibleWidth(), visibleHeight(), erase );
};
/**
* Constructor.
@@ -160,28 +171,28 @@ public:
/**
* @return a list containing the currently selected items.
*/
- QPtrList<QListViewItem> selectedItems() const; // ### BIC: KDE 4: use an implicitly shared class! (QValueList?)
+ Q3PtrList<Q3ListViewItem> selectedItems() const; // ### BIC: KDE 4: use an implicitly shared class! (QValueList?)
/**
* Arbitrarily move @p item to @p parent, positioned immediately after item @p after.
*/
- void moveItem(QListViewItem *item, QListViewItem *parent, QListViewItem *after);
+ void moveItem(Q3ListViewItem *item, Q3ListViewItem *parent, Q3ListViewItem *after);
/**
* @return the last item (not child!) of this listview.
*
* @see lastChild()
*/
- QListViewItem *lastItem() const;
+ Q3ListViewItem *lastItem() const;
/**
* @return the last child of this listview.
*
* @see lastItem()
*/
- QListViewItem* lastChild () const;
+ Q3ListViewItem* lastChild () const;
/**
* @return the lineedit used for inline renaming.
* Use that to setup a @ref KCompletion or @ref QValidator for the lineedit
@@ -275,16 +286,16 @@ public:
* Returns the index of @p item within the item tree or -1 if
* @p item doesn't exist in this list view. This function takes
* all items into account not only the visible ones.
*/
- int itemIndex( const QListViewItem *item ) const;
+ int itemIndex( const Q3ListViewItem *item ) const;
/**
* Returns the item of @p index within the item tree or 0 if
* @p index doesn't exist in this list view. This function takes
* all items into account not only the visible ones.
*/
- QListViewItem* itemAtIndex(int index);
+ Q3ListViewItem* itemAtIndex(int index);
/**
* @deprecated
* @see #setFullWidth()
@@ -313,9 +324,9 @@ public:
virtual int addColumn(const QString& label, int width = -1);
/**
* Reimplemented for full width support
*/
- virtual int addColumn(const QIconSet& iconset, const QString& label, int width = -1);
+ virtual int addColumn(const QIcon& iconset, const QString& label, int width = -1);
/**
* Reimplemented for full width support
*
* @see #addColumn()
@@ -387,9 +398,9 @@ signals:
*
* Note that you may not delete any @ref QListViewItem objects in slots
* connected to this signal.
*/
- void executed( QListViewItem *item );
+ void executed( Q3ListViewItem *item );
/**
* This signal is emitted whenever the user executes an listview item.
* That means depending on the KDE wide Single Click/Double Click
@@ -400,9 +411,9 @@ signals:
*
* Note that you may not delete any @ref QListViewItem objects in slots
* connected to this signal.
*/
- void executed( QListViewItem *item, const QPoint &pos, int c );
+ void executed( Q3ListViewItem *item, const QPoint &pos, int c );
/**
* This signal gets emitted whenever the user double clicks into the
* listview.
@@ -416,10 +427,10 @@ signals:
* This signal is more or less here for the sake of completeness.
* You should normally not need to use this. In most cases its better
* to use @ref #executed() instead.
*/
- void doubleClicked( QListViewItem *item, const QPoint &pos, int c );
- void contextRequest( QListViewItem *item, const QPoint &pos, int c );
+ void doubleClicked( Q3ListViewItem *item, const QPoint &pos, int c );
+ void contextRequest( Q3ListViewItem *item, const QPoint &pos, int c );
/**
* This signal gets emitted whenever something acceptable is
* dropped onto the listview.
@@ -429,9 +440,9 @@ signals:
* the drop was above all items)
*
* @see #acceptDrop()
*/
- void dropped (QDropEvent * e, QListViewItem *after);
+ void dropped (QDropEvent * e, Q3ListViewItem *after);
/**
* This signal gets emitted whenever something acceptable is
* dropped onto the listview.
@@ -443,9 +454,9 @@ signals:
* @param e is the drop event itself (it has already been accepted)
* @param after is the item after which the drop occured (or 0L, if
* the drop was above all items
*/
- void dropped (KListView* list, QDropEvent* e, QListViewItem* after);
+ void dropped (KListView* list, QDropEvent* e, Q3ListViewItem* after);
/**
* This signal gets emitted whenever something acceptable is
* dropped onto the listview.
@@ -457,9 +468,9 @@ signals:
* @param parent the item that is to be the parent of the new item
* @param after is the item after which the drop occured (or 0L, if
* the drop was above all items
*/
- void dropped (KListView* list, QDropEvent* e, QListViewItem* parent, QListViewItem* after);
+ void dropped (KListView* list, QDropEvent* e, Q3ListViewItem* parent, Q3ListViewItem* after);
/**
* This signal gets emitted whenever something acceptable is
* dropped onto the listview.
@@ -470,9 +481,9 @@ signals:
* @param parent the item that is to be the parent of the new item
* @param after is the item after which the drop occured (or 0L, if
* the drop was above all items
*/
- void dropped (QDropEvent* e, QListViewItem* parent, QListViewItem* after);
+ void dropped (QDropEvent* e, Q3ListViewItem* parent, Q3ListViewItem* after);
/**
* This signal is emitted when ever the user moves an item in the list via
* DnD.
@@ -501,31 +512,31 @@ signals:
* @param item the item that was moved
* @param afterFirst the item that parameter item was in before the move, in the list
* @param afterNow the item it's currently after.
*/
- void moved (QListViewItem *item, QListViewItem *afterFirst, QListViewItem *afterNow);
+ void moved (Q3ListViewItem *item, Q3ListViewItem *afterFirst, Q3ListViewItem *afterNow);
/**
* This signal is emitted after all the items have been moved. It reports info for
* each and every item moved, in order. The first element in @p items associates
* with the first of afterFirst and afterNow.
*/
- void moved(QPtrList<QListViewItem> &items, QPtrList<QListViewItem> &afterFirst, QPtrList<QListViewItem> &afterNow);
+ void moved(Q3PtrList<Q3ListViewItem> &items, Q3PtrList<Q3ListViewItem> &afterFirst, Q3PtrList<Q3ListViewItem> &afterNow);
/**
* This signal gets emitted when an item is renamed via in-place renaming.
*
* @param item is the renamed item.
* @param str is the new value of column @p col.
* @param col is the renamed column.
*/
- void itemRenamed(QListViewItem* item, const QString &str, int col);
+ void itemRenamed(Q3ListViewItem* item, const QString &str, int col);
/**
* Same as above, but without the extra information.
*/
- void itemRenamed(QListViewItem* item);
+ void itemRenamed(Q3ListViewItem* item);
void signalDelete();
/**
* This signal is emitted when the shortcut key for popup-menus is pressed.
@@ -536,9 +547,9 @@ signals:
*
* @param list is this listview.
* @param item is the @ref currentItem() at the time the key was pressed. May be 0L.
*/
- void menuShortCutPressed (KListView* list, QListViewItem* item);
+ void menuShortCutPressed (KListView* list, Q3ListViewItem* item);
/**
* This signal is emitted whenever a context-menu should be shown for item @p i.
* It automatically adjusts for all settings involved (Menu key, showMenuOnPress/Click).
@@ -546,15 +557,15 @@ signals:
* @param l is this listview.
* @param i is the item for which the menu should be shown. May be 0L.
* @param p is the point at which the menu should be shown.
*/
- void contextMenu (KListView* l, QListViewItem* i, const QPoint& p);
+ void contextMenu (KListView* l, Q3ListViewItem* i, const QPoint& p);
public slots:
/**
* Rename column @p c of @p item.
*/
- virtual void rename(QListViewItem *item, int c);
+ virtual void rename(Q3ListViewItem *item, int c);
/**
* By default, if you called setItemsRenameable(true),
* only the first column is renameable.
@@ -672,9 +683,9 @@ protected:
* @param i the item whose rect() is passed to the above function.
* @param p is translated from contents coordinates to viewport coordinates
* before being passed to the above function.
*/
- inline bool below (QListViewItem* i, const QPoint& p)
+ inline bool below (Q3ListViewItem* i, const QPoint& p)
{
return below (itemRect(i), contentsToViewport(p));
}
@@ -688,9 +699,9 @@ protected:
* Emit signal @ref #executed.
* @internal
*/
//US I added buttonstate to pass the current keyboard status
- void emitExecute( int buttonstate, QListViewItem *item, const QPoint &pos, int c);
+ void emitExecute( int buttonstate, Q3ListViewItem *item, const QPoint &pos, int c);
/**
* Reimplemented for internal reasons.
* Further reimplementations should call this function or else
@@ -720,14 +731,14 @@ protected:
/**
* @return the tooltip for @p column of @p item.
*/
- virtual QString tooltip(QListViewItem* item, int column) const;
+ virtual QString tooltip(Q3ListViewItem* item, int column) const;
/**
* @return whether the tooltip for @p column of @p item shall be shown at point @p pos.
*/
- virtual bool showTooltip(QListViewItem *item, const QPoint &pos, int column) const;
+ virtual bool showTooltip(Q3ListViewItem *item, const QPoint &pos, int column) const;
/**
* Reimplemented for internal reasons.
* Further reimplementations should call this function or else
@@ -804,9 +815,9 @@ protected:
* @return a dragobject encoding the current selection.
*
* @see setDragEnabled()
*/
- virtual QDragObject *dragObject();
+ virtual Q3DragObject *dragObject();
/**
* @return true if the @p event provides some acceptable
* format.
@@ -820,17 +831,17 @@ protected:
* If after == 0 then the marker should be drawn at the top.
*
* @return the rectangle that you painted to.
*/
- virtual QRect drawDropVisualizer (QPainter *p, QListViewItem *parent, QListViewItem *after);
+ virtual QRect drawDropVisualizer (QPainter *p, Q3ListViewItem *parent, Q3ListViewItem *after);
/**
* Paint the drag rectangle. If painter is null, don't try to :)
*
*
* @return the rectangle that you painted to.
*/
- virtual QRect drawItemHighlighter(QPainter *painter, QListViewItem *item);
+ virtual QRect drawItemHighlighter(QPainter *painter, Q3ListViewItem *item);
/**
* This method calls @ref dragObject() and starts the drag.
*
@@ -885,10 +896,10 @@ protected slots:
* @internal
*/
void slotSettingsChanged(int);
- void slotMouseButtonClicked( int btn, QListViewItem *item, const QPoint &pos, int c );
- void doneEditing(QListViewItem *item, int row);
+ void slotMouseButtonClicked( int btn, Q3ListViewItem *item, const QPoint &pos, int c );
+ void doneEditing(Q3ListViewItem *item, int row);
/**
* Repaint the rect where I was drawing the drop line.
*/
@@ -901,20 +912,20 @@ protected slots:
/**
* Emit the @ref contextMenu signal. This slot is for mouse actions.
*/
- void emitContextMenu (QListViewItem*, const QPoint&, int);
+ void emitContextMenu (Q3ListViewItem*, const QPoint&, int);
/**
* Emit the @ref #contextMenu signal. This slot is for key presses.
*/
- void emitContextMenu (KListView*, QListViewItem*);
+ void emitContextMenu (KListView*, Q3ListViewItem*);
/**
* Accessory slot for AutoSelect
* @internal
*/
- void slotOnItem( QListViewItem *item );
+ void slotOnItem( Q3ListViewItem *item );
/**
* Accessory slot for AutoSelect/ChangeCursorOverItem
* @internal
@@ -938,17 +949,17 @@ protected slots:
protected:
/**
* Handle dropEvent when itemsMovable() is set to true.
*/
- virtual void movableDropEvent (QListViewItem* parent, QListViewItem* afterme);
+ virtual void movableDropEvent (Q3ListViewItem* parent, Q3ListViewItem* afterme);
/**
* Where is the nearest QListViewItem that I'm going to drop?
*
* FIXME KDE 4.0: Make this method const so it can be called from an
* acceptDrag method without ugly casts
*/
- virtual void findDrop(const QPoint &pos, QListViewItem *&parent, QListViewItem *&after);
+ virtual void findDrop(const QPoint &pos, Q3ListViewItem *&parent, Q3ListViewItem *&after);
/**
* A special keyPressEvent (for FileManager selection mode).
*/
@@ -973,41 +984,41 @@ private:
* a drop-in replacement for @ref QListViewItem
*
* @short listview item with alternate background colour support
*/
-class KListViewItem : public QListViewItem
+class KListViewItem : public Q3ListViewItem
{
public:
/**
* constructors. The semantics remain as in @ref QListViewItem.
* Although they accept a @ref QListViewItem as parent, please
* don't mix KListViewItem (or subclasses) with QListViewItem
* (or subclasses).
*/
- KListViewItem(QListView *parent);
- KListViewItem(QListViewItem *parent);
- KListViewItem(QListView *parent, QListViewItem *after);
- KListViewItem(QListViewItem *parent, QListViewItem *after);
+ KListViewItem(Q3ListView *parent);
+ KListViewItem(Q3ListViewItem *parent);
+ KListViewItem(Q3ListView *parent, Q3ListViewItem *after);
+ KListViewItem(Q3ListViewItem *parent, Q3ListViewItem *after);
- KListViewItem(QListView *parent,
+ KListViewItem(Q3ListView *parent,
QString, QString = QString::null,
QString = QString::null, QString = QString::null,
QString = QString::null, QString = QString::null,
QString = QString::null, QString = QString::null);
- KListViewItem(QListViewItem *parent,
+ KListViewItem(Q3ListViewItem *parent,
QString, QString = QString::null,
QString = QString::null, QString = QString::null,
QString = QString::null, QString = QString::null,
QString = QString::null, QString = QString::null);
- KListViewItem(QListView *parent, QListViewItem *after,
+ KListViewItem(Q3ListView *parent, Q3ListViewItem *after,
QString, QString = QString::null,
QString = QString::null, QString = QString::null,
QString = QString::null, QString = QString::null,
QString = QString::null, QString = QString::null);
- KListViewItem(QListViewItem *parent, QListViewItem *after,
+ KListViewItem(Q3ListViewItem *parent, Q3ListViewItem *after,
QString, QString = QString::null,
QString = QString::null, QString = QString::null,
QString = QString::null, QString = QString::null,
QString = QString::null, QString = QString::null);