-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 @@ -21,7 +21,18 @@ #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 @@ -31,5 +42,5 @@ class QDragMoveEvent; class QDragEnterEvent; -class QDragObject; +class Q3DragObject; class KConfig; class KLineEdit; @@ -58,5 +69,5 @@ class KLineEdit; * @version $Id$ */ -class KListView : public QListView +class KListView : public Q3ListView { Q_OBJECT @@ -107,13 +118,13 @@ public: */ 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 ); }; @@ -162,10 +173,10 @@ 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); /** @@ -174,5 +185,5 @@ public: * @see lastChild() */ - QListViewItem *lastItem() const; + Q3ListViewItem *lastItem() const; /** @@ -181,5 +192,5 @@ public: * @see lastItem() */ - QListViewItem* lastChild () const; + Q3ListViewItem* lastChild () const; /** @@ -277,5 +288,5 @@ public: * all items into account not only the visible ones. */ - int itemIndex( const QListViewItem *item ) const; + int itemIndex( const Q3ListViewItem *item ) const; /** @@ -284,5 +295,5 @@ public: * all items into account not only the visible ones. */ - QListViewItem* itemAtIndex(int index); + Q3ListViewItem* itemAtIndex(int index); /** @@ -315,5 +326,5 @@ public: * 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 @@ -389,5 +400,5 @@ signals: * connected to this signal. */ - void executed( QListViewItem *item ); + void executed( Q3ListViewItem *item ); /** @@ -402,5 +413,5 @@ signals: * connected to this signal. */ - void executed( QListViewItem *item, const QPoint &pos, int c ); + void executed( Q3ListViewItem *item, const QPoint &pos, int c ); /** @@ -418,6 +429,6 @@ signals: * 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 ); /** @@ -431,5 +442,5 @@ signals: * @see #acceptDrop() */ - void dropped (QDropEvent * e, QListViewItem *after); + void dropped (QDropEvent * e, Q3ListViewItem *after); /** @@ -445,5 +456,5 @@ signals: * the drop was above all items */ - void dropped (KListView* list, QDropEvent* e, QListViewItem* after); + void dropped (KListView* list, QDropEvent* e, Q3ListViewItem* after); /** @@ -459,5 +470,5 @@ signals: * 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); /** @@ -472,5 +483,5 @@ signals: * the drop was above all items */ - void dropped (QDropEvent* e, QListViewItem* parent, QListViewItem* after); + void dropped (QDropEvent* e, Q3ListViewItem* parent, Q3ListViewItem* after); /** @@ -503,5 +514,5 @@ signals: * @param afterNow the item it's currently after. */ - void moved (QListViewItem *item, QListViewItem *afterFirst, QListViewItem *afterNow); + void moved (Q3ListViewItem *item, Q3ListViewItem *afterFirst, Q3ListViewItem *afterNow); @@ -511,5 +522,5 @@ signals: * 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); /** @@ -520,10 +531,10 @@ signals: * @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(); @@ -538,5 +549,5 @@ signals: * @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); /** @@ -548,5 +559,5 @@ signals: * @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: @@ -554,5 +565,5 @@ public slots: * Rename column @p c of @p item. */ - virtual void rename(QListViewItem *item, int c); + virtual void rename(Q3ListViewItem *item, int c); /** @@ -674,5 +685,5 @@ protected: * 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)); @@ -690,5 +701,5 @@ protected: */ //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); /** @@ -722,10 +733,10 @@ 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; /** @@ -806,5 +817,5 @@ protected: * @see setDragEnabled() */ - virtual QDragObject *dragObject(); + virtual Q3DragObject *dragObject(); /** @@ -822,5 +833,5 @@ protected: * @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); /** @@ -830,5 +841,5 @@ protected: * @return the rectangle that you painted to. */ - virtual QRect drawItemHighlighter(QPainter *painter, QListViewItem *item); + virtual QRect drawItemHighlighter(QPainter *painter, Q3ListViewItem *item); /** @@ -887,6 +898,6 @@ protected slots: 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); /** @@ -903,10 +914,10 @@ 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*); /** @@ -914,5 +925,5 @@ protected slots: * @internal */ - void slotOnItem( QListViewItem *item ); + void slotOnItem( Q3ListViewItem *item ); /** @@ -940,5 +951,5 @@ protected: * Handle dropEvent when itemsMovable() is set to true. */ - virtual void movableDropEvent (QListViewItem* parent, QListViewItem* afterme); + virtual void movableDropEvent (Q3ListViewItem* parent, Q3ListViewItem* afterme); /** @@ -948,5 +959,5 @@ protected: * 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); /** @@ -975,5 +986,5 @@ private: * @short listview item with alternate background colour support */ -class KListViewItem : public QListViewItem +class KListViewItem : public Q3ListViewItem { public: @@ -984,10 +995,10 @@ public: * (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, @@ -995,5 +1006,5 @@ public: QString = QString::null, QString = QString::null); - KListViewItem(QListViewItem *parent, + KListViewItem(Q3ListViewItem *parent, QString, QString = QString::null, QString = QString::null, QString = QString::null, @@ -1001,5 +1012,5 @@ public: 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, @@ -1007,5 +1018,5 @@ public: 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, |