KListView Class Reference
This Widget extends the functionality of QListView to honor the system wide settings for Single Click/Double Click mode, AutoSelection and ChangeCursorOverLink (TM). More...
#include <klistview.h>
Inheritance diagram for KListView:

Public Types | |
enum | SelectionModeExt { Single = QListView::Single, Multi = QListView::Multi, Extended = QListView::Extended, NoSelection = QListView::NoSelection, FileManager } |
Public Slots | |
virtual void | rename (QListViewItem *item, int c) |
void | setRenameable (int column, bool yesno=true) |
virtual void | setItemsMovable (bool b) |
virtual void | setItemsRenameable (bool b) |
virtual void | setDragEnabled (bool b) |
virtual void | setAutoOpen (bool b) |
virtual void | setDropVisualizer (bool b) |
void | setDropVisualizerWidth (int w) |
virtual void | setTooltipColumn (int column) |
virtual void | setDropHighlighter (bool b) |
virtual void | setCreateChildren (bool b) KDE_DEPRECATED |
void | setSelectionModeExt (SelectionModeExt mode) |
void | setTabOrderedRenaming (bool b) |
bool | tabOrderedRenaming () const |
Signals | |
void | executed (QListViewItem *item) |
void | executed (QListViewItem *item, const QPoint &pos, int c) |
void | doubleClicked (QListViewItem *item, const QPoint &pos, int c) |
void | dropped (QDropEvent *e, QListViewItem *after) |
void | dropped (KListView *list, QDropEvent *e, QListViewItem *after) |
void | dropped (KListView *list, QDropEvent *e, QListViewItem *parent, QListViewItem *after) |
void | dropped (QDropEvent *e, QListViewItem *parent, QListViewItem *after) |
void | moved () |
void | aboutToMove () |
void | moved (QListViewItem *item, QListViewItem *afterFirst, QListViewItem *afterNow) |
void | moved (QPtrList< QListViewItem > &items, QPtrList< QListViewItem > &afterFirst, QPtrList< QListViewItem > &afterNow) |
void | itemRenamed (QListViewItem *item, const QString &str, int col) |
void | itemRenamed (QListViewItem *item) |
void | menuShortCutPressed (KListView *list, QListViewItem *item) |
void | contextMenu (KListView *l, QListViewItem *i, const QPoint &p) |
Public Member Functions | |
KListView (QWidget *parent=0, const char *name=0) | |
virtual | ~KListView () |
virtual void | setAcceptDrops (bool) |
virtual bool | isExecuteArea (const QPoint &point) |
bool | isExecuteArea (int x) |
QPtrList< QListViewItem > | selectedItems () const |
void | moveItem (QListViewItem *item, QListViewItem *parent, QListViewItem *after) KDE_DEPRECATED |
QListViewItem * | lastItem () const |
QListViewItem * | lastChild () const |
KLineEdit * | renameLineEdit () const |
bool | itemsMovable () const |
bool | itemsRenameable () const |
bool | dragEnabled () const |
bool | autoOpen () const |
bool | isRenameable (int column) const |
bool | dropVisualizer () const |
int | tooltipColumn () const |
bool | createChildren () const KDE_DEPRECATED |
bool | dropHighlighter () const |
int | dropVisualizerWidth () const |
SelectionModeExt | selectionModeExt () const |
int | itemIndex (const QListViewItem *item) const |
QListViewItem * | itemAtIndex (int index) |
void | setFullWidth () KDE_DEPRECATED |
void | setFullWidth (bool fullWidth) |
bool | fullWidth () const |
virtual int | addColumn (const QString &label, int width=-1) |
virtual int | addColumn (const QIconSet &iconset, const QString &label, int width=-1) |
virtual void | removeColumn (int index) |
void | setAlternateBackground (const QColor &c) |
const QColor & | alternateBackground () const |
void | saveLayout (KConfig *config, const QString &group) const |
void | restoreLayout (KConfig *config, const QString &group) |
virtual void | setSorting (int column, bool ascending=true) |
int | columnSorted (void) const |
bool | ascendingSort (void) const |
virtual void | takeItem (QListViewItem *i) |
Protected Slots | |
void | slotSettingsChanged (int) |
void | slotMouseButtonClicked (int btn, QListViewItem *item, const QPoint &pos, int c) |
void | doneEditing (QListViewItem *item, int row) |
void | cleanDropVisualizer () |
void | cleanItemHighlighter () |
void | emitContextMenu (QListViewItem *, const QPoint &, int) |
void | emitContextMenu (KListView *, QListViewItem *) |
void | slotOnItem (QListViewItem *item) |
void | slotOnViewport () |
void | slotAutoSelect () |
void | slotDragExpand () |
void | slotHeaderChanged () |
Protected Member Functions | |
bool | below (const QRect &rect, const QPoint &p) |
bool | below (QListViewItem *i, const QPoint &p) |
virtual bool | event (QEvent *) |
void | emitExecute (QListViewItem *item, const QPoint &pos, int c) |
virtual void | focusInEvent (QFocusEvent *fe) |
virtual void | focusOutEvent (QFocusEvent *fe) |
virtual void | leaveEvent (QEvent *e) |
virtual QString | tooltip (QListViewItem *item, int column) const |
virtual bool | showTooltip (QListViewItem *item, const QPoint &pos, int column) const |
virtual void | contentsDragMoveEvent (QDragMoveEvent *event) |
virtual void | contentsMousePressEvent (QMouseEvent *e) |
virtual void | contentsMouseMoveEvent (QMouseEvent *e) |
virtual void | contentsMouseDoubleClickEvent (QMouseEvent *e) |
virtual void | contentsDragLeaveEvent (QDragLeaveEvent *event) |
virtual void | contentsMouseReleaseEvent (QMouseEvent *) |
virtual void | contentsDropEvent (QDropEvent *) |
virtual void | contentsDragEnterEvent (QDragEnterEvent *) |
virtual QDragObject * | dragObject () |
virtual bool | acceptDrag (QDropEvent *event) const |
virtual QRect | drawDropVisualizer (QPainter *p, QListViewItem *parent, QListViewItem *after) |
virtual QRect | drawItemHighlighter (QPainter *painter, QListViewItem *item) |
virtual void | startDrag () |
virtual void | keyPressEvent (QKeyEvent *) |
virtual void | viewportPaintEvent (QPaintEvent *) |
void | activateAutomaticSelection () |
void | deactivateAutomaticSelection () |
bool | automaticSelection () const |
virtual void | viewportResizeEvent (QResizeEvent *e) |
void | disableAutoSelection () |
void | resetAutoSelection () |
virtual void | movableDropEvent (QListViewItem *parent, QListViewItem *afterme) |
virtual void | findDrop (const QPoint &pos, QListViewItem *&parent, QListViewItem *&after) |
void | fileManagerKeyPressEvent (QKeyEvent *) |
int | depthToPixels (int depth) |
virtual void | virtual_hook (int id, void *data) |
Properties | |
bool | fullWidth |
bool | itemsMovable |
bool | itemsRenameable |
bool | dragEnabled |
bool | autoOpen |
bool | dropVisualizer |
int | tooltipColumn |
int | dropVisualizerWidth |
QColor | alternateBackground |
Detailed Description
This Widget extends the functionality of QListView to honor the system wide settings for Single Click/Double Click mode, AutoSelection and ChangeCursorOverLink (TM).There is a new signal executed(). It gets connected to either QListView::clicked() or QListView::doubleClicked() depending on the KDE wide Single Click/Double Click settings. It is strongly recommended that you use this signal instead of the above mentioned. This way you donīt need to care about the current settings. If you want to get informed when the user selects something connect to the QListView::selectionChanged() signal.
Drag-and-Drop is supported with the signal dropped(), just setAcceptDrops(true) and connect it to a suitable slot. To see where you are dropping, setDropVisualizer(true). And also you'll need acceptDrag(QDropEvent*)
KListView is drag-enabled, too: to benefit from that you've got derive from it. Reimplement dragObject() and (possibly) startDrag(), and setDragEnabled(true).
Definition at line 53 of file klistview.h.
Member Enumeration Documentation
|
Possible selection modes. The first four correspond directly to QListView::SelectionMode, while the FileManager selection mode is defined as follows:
Additionally the current item is always selected automatically when navigating using the keyboard, except other items were selected explicitly. This way e.g. SHIFT+up/PgUp then SHIFT+down/PgDn leaves no item selected Definition at line 103 of file klistview.h. Referenced by selectionModeExt(). |
Constructor & Destructor Documentation
|
Constructor.
The parameters Definition at line 412 of file klistview.cpp. References KGlobalSettings::alternateBackgroundColor(), cleanDropVisualizer(), cleanItemHighlighter(), emitContextMenu(), KListView(), menuShortCutPressed(), QListView::onViewport(), slotAutoSelect(), slotOnItem(), slotOnViewport(), and slotSettingsChanged(). Referenced by KListView(). |
|
Destructor.
Definition at line 459 of file klistview.cpp. |
Member Function Documentation
|
Reimplemented for internal reasons. Further reimplementations should call this function or else some features may not work correctly. The API is unaffected. Definition at line 1864 of file klistview.cpp. References setAcceptDrops(). Referenced by setAcceptDrops(). |
|
This function determines whether the given coordinates are within the execute area. The execute area is the part of a QListViewItem where mouse clicks or double clicks respectively generate a executed() signal. Depending on QListView::allColumnsShowFocus() this is either the whole item or only the first column.
Definition at line 464 of file klistview.cpp. References isExecuteArea(), and QPoint::x(). Referenced by contentsDragMoveEvent(), contentsMouseMoveEvent(), emitExecute(), isExecuteArea(), and slotOnItem(). |
|
Same thing, but from an x coordinate only. This only checks if x is in the first column (if all columns don't show focus), without testing if the y coordinate is over an item or not. Definition at line 472 of file klistview.cpp. References QListView::allColumnsShowFocus(), QListView::header(), and isExecuteArea(). |
|
Definition at line 1198 of file klistview.cpp. References QPtrList::append(), and QListViewItemIterator::current(). Referenced by fileManagerKeyPressEvent(). |
|
Arbitrarily move
Definition at line 1211 of file klistview.cpp. References QListViewItem::insertItem(), QListViewItem::moveItem(), moveItem(), QListViewItem::parent(), and takeItem(). Referenced by movableDropEvent(), and moveItem(). |
|
Reimplemented from QListView. Definition at line 1113 of file klistview.cpp. References QListViewItemIterator::current(), and lastChild(). Referenced by findDrop(). |
|
Definition at line 1103 of file klistview.cpp. References QListView::firstChild(), and QListViewItem::nextSibling(). Referenced by lastItem(). |
|
Definition at line 1123 of file klistview.cpp. |
|
Referenced by acceptDrag(), and contentsDropEvent(). |
|
Referenced by contentsMouseReleaseEvent(). |
|
Referenced by contentsMouseMoveEvent(). |
|
|
|
Definition at line 1338 of file klistview.cpp. References isRenameable(). Referenced by isRenameable(). |
|
Referenced by contentsDragMoveEvent(). |
|
Referenced by showTooltip(). |
|
For future expansions. Do not use.
Definition at line 1370 of file klistview.cpp. |
|
Definition at line 1391 of file klistview.cpp. Referenced by contentsDragMoveEvent(). |
|
The dropVisualizerWidth defaults to 4.
|
|
Definition at line 1807 of file klistview.cpp. References SelectionModeExt. Referenced by contentsMousePressEvent(). |
|
Returns the index of This function takes all items into account not only the visible ones. Definition at line 1812 of file klistview.cpp. References QListViewItemIterator::current(), QListView::firstChild(), and itemIndex(). Referenced by itemIndex(), and slotAutoSelect(). |
|
Returns the item of This function takes all items into account not only the visible ones. Definition at line 1831 of file klistview.cpp. References QListViewItemIterator::current(), QListView::firstChild(), and itemAtIndex(). Referenced by itemAtIndex(). |
|
Definition at line 1903 of file klistview.cpp. |
|
Let the last column fit exactly all the available width.
Definition at line 1908 of file klistview.cpp. References QListView::columns(), and QListView::header(). |
|
Returns whether the last column is set to fit the available width.
|
|
Reimplemented for full width support.
Reimplemented from QListView. Definition at line 1919 of file klistview.cpp. References addColumn(), QListView::columns(), and QListView::header(). Referenced by addColumn(), and KJanusWidget::KJanusWidget(). |
|
Reimplemented for full width support.
Reimplemented from QListView. Definition at line 1929 of file klistview.cpp. References addColumn(), QListView::columns(), and QListView::header(). |
|
Reimplemented for full width support.
Reimplemented from QListView. Definition at line 1939 of file klistview.cpp. References QListView::columns(), QListView::header(), and removeColumn(). Referenced by removeColumn(). |
|
sets the alternate background background color. This only has an effect if the items are KListViewItems
Definition at line 1955 of file klistview.cpp. References setAlternateBackground(). Referenced by setAlternateBackground(). |
|
|
|
Saves the list view's layout (column widtsh, column order, sort column) to a KConfig group.
Definition at line 1961 of file klistview.cpp. References QListView::columns(), QListView::header(), saveLayout(), and KConfigBase::writeEntry(). Referenced by saveLayout(). |
|
Reads the list view's layout from a KConfig group as stored with saveLayout.
Definition at line 1976 of file klistview.cpp. References KConfigBase::hasKey(), QListView::header(), KConfigBase::readBoolEntry(), KConfigBase::readListEntry(), KConfigBase::readNumEntry(), restoreLayout(), and setSorting(). Referenced by restoreLayout(). |
|
Reimplemented to remember the current sort column and order.
Reimplemented from QListView. Definition at line 1992 of file klistview.cpp. References setSorting(). Referenced by KJanusWidget::KJanusWidget(), restoreLayout(), and setSorting(). |
|
Definition at line 1999 of file klistview.cpp. |
|
Definition at line 2004 of file klistview.cpp. |
|
Reimplemented for internal reasons.
Reimplemented from QListView. Definition at line 2009 of file klistview.cpp. References takeItem(). Referenced by moveItem(), and takeItem(). |
|
This signal is emitted whenever the user executes an listview item. That means depending on the KDE wide Single Click/Double Click setting the user clicked or double clicked on that item.
Referenced by emitExecute(). |
|
This signal is emitted whenever the user executes an listview item. That means depending on the KDE wide Single Click/Double Click setting the user clicked or double clicked on that item.
|
|
This signal gets emitted whenever the user double clicks into the listview.
This signal is more or less here for the sake of completeness. You should normally not need to use this. In most cases itīs better to use executed() instead. Reimplemented from QListView. Referenced by contentsMouseDoubleClickEvent(). |
|
This signal gets emitted whenever something acceptable is dropped onto the listview.
Reimplemented in KFileTreeView. Referenced by contentsDropEvent(). |
|
This signal gets emitted whenever something acceptable is dropped onto the listview. This is an overloaded version of the above (provided to simplify processing drops outside of the class).
|
|
This signal gets emitted whenever something acceptable is dropped onto the listview. This function also provides a parent, in the event that your listview is a tree
|
|
This signal gets emitted whenever something acceptable is dropped onto the listview. This function also provides a parent, in the event that your listview is a tree
Reimplemented in KFileTreeView. |
|
This signal is emitted when ever the user moves an item in the list via DnD. If more than one item is moved at the same time, this signal is only emitted once. Referenced by movableDropEvent(), and startDrag(). |
|
Connect to this signal if you want to do some preprocessing before a move is made, for example, to disable sorting. This is sent only once per each groups of moves. That is, for each drop that is a move this will be emitted once, before KListView calls
Referenced by movableDropEvent(). |
|
This signal is emitted when ever the user moves an item in the list via DnD.
If more than one item is moved at the same time,
|
|
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 |
|
This signal gets emitted when an item is renamed via in-place renaming.
|
|
Same as above, but without the extra information.
|
|
This signal is emitted when the shortcut key for popup-menus is pressed. Normally you should not use this, just connect a slot to signal contextMenu (KListView*, QListViewItem*, const QPoint&) to correctly handle showing context menus regardless of settings.
Referenced by keyPressEvent(), and KListView(). |
|
This signal is emitted whenever a context-menu should be shown for item It automatically adjusts for all settings involved (Menu key, showMenuOnPress/Click).
Referenced by emitContextMenu(). |
|
Rename column
Definition at line 1329 of file klistview.cpp. References rename(). Referenced by contentsMouseReleaseEvent(), rename(), and KListViewLineEdit::selectNextCell(). |
|
By default, if you called setItemsRenameable(true), only the first column is renameable. Use this function to enable the feature on other columns. If you want more intelligent (dynamic) selection, you'll have to derive from KListView, and override rename() and call only call it if you want the item to be renamed. Definition at line 1343 of file klistview.cpp. References QListView::header(), and setRenameable(). Referenced by setRenameable(). |
|
Set whether items in the list view can be moved. It is enabled by default.
Definition at line 1147 of file klistview.cpp. References setItemsMovable(). Referenced by setItemsMovable(). |
|
Enables inplace-renaming of items. It is disabled by default.
Definition at line 1157 of file klistview.cpp. References setItemsRenameable(). Referenced by setItemsRenameable(). |
|
Enable/Disable the dragging of items. It is disabled by default. Definition at line 1168 of file klistview.cpp. References setDragEnabled(). Referenced by setDragEnabled(). |
|
Enable/Disable AutoOpen (not implemented currently).
Definition at line 1178 of file klistview.cpp. References setAutoOpen(). Referenced by setAutoOpen(). |
|
Enable/Disable the drawing of a drop-visualizer (a bar that shows where a dropped item would be inserted). It is enabled by default, if dragging is enabled Definition at line 1193 of file klistview.cpp. References setDropVisualizer(). Referenced by setDropVisualizer(). |
|
Set the width of the (default) drop-visualizer. If you don't call this method, the width is set to 4. Definition at line 1251 of file klistview.cpp. References setDropVisualizerWidth(). Referenced by setDropVisualizerWidth(). |
|
Set which column should be used for automatic tooltips.
Definition at line 1381 of file klistview.cpp. References setTooltipColumn(). Referenced by setTooltipColumn(). |
|
Enable/Disable the drawing of a drop-highlighter (a rectangle around the item under the mouse cursor). It is disabled by default. Definition at line 1386 of file klistview.cpp. References setDropHighlighter(). Referenced by setDropHighlighter(). |
|
For future expansions. Do not use.
Definition at line 1365 of file klistview.cpp. References setCreateChildren(). Referenced by setCreateChildren(). |
|
Set the selection mode. A different name was chosen to avoid API-clashes with QListView::setSelectionMode(). Definition at line 1784 of file klistview.cpp. References endl(), kdWarning(), and setSelectionModeExt(). Referenced by setSelectionModeExt(). |
|
Enable/disable tabbing between editable cells
Definition at line 1406 of file klistview.cpp. References setTabOrderedRenaming(). Referenced by setTabOrderedRenaming(). |
|
Returns whether tab ordered renaming is enabled
Definition at line 1411 of file klistview.cpp. |
|
Determine whether a drop on position
Definition at line 656 of file klistview.h. Referenced by below(). |
|
An overloaded version of below(const QRect&, const QPoint&). It differs from the above only in what arguments it takes.
Definition at line 670 of file klistview.h. References below(). |
|
Reimplemented to reload the alternate background in palette changes.
Definition at line 733 of file klistview.cpp. References KGlobalSettings::alternateBackgroundColor(), event(), and QEvent::type(). Referenced by event(). |
|
Emit signal executed.
Definition at line 654 of file klistview.cpp. References emitExecute(), executed(), and isExecuteArea(). Referenced by contentsMouseDoubleClickEvent(), and emitExecute(). |
|
Reimplemented for internal reasons. Further reimplementations should call this function or else some features may not work correctly. The API is unaffected. Definition at line 688 of file klistview.cpp. References QListView::currentItem(), focusInEvent(), QFocusEvent::reason(), and QListView::selectionChanged(). Referenced by focusInEvent(). |
|
Reimplemented for internal reasons. Further reimplementations should call this function or else some features may not work correctly. The API is unaffected. Definition at line 704 of file klistview.cpp. References cleanDropVisualizer(), cleanItemHighlighter(), QListView::currentItem(), focusOutEvent(), QFocusEvent::reason(), and QListView::selectionChanged(). Referenced by focusOutEvent(). |
|
Reimplemented for internal reasons. Further reimplementations should call this function or else some features may not work correctly. The API is unaffected. Definition at line 726 of file klistview.cpp. References leaveEvent(). Referenced by leaveEvent(). |
|
Definition at line 1401 of file klistview.cpp. References QListViewItem::text(), and tooltip(). Referenced by showTooltip(), and tooltip(). |
|
Definition at line 1396 of file klistview.cpp. References QString::length(), showTooltip(), tooltip(), and tooltipColumn(). Referenced by showTooltip(). |
|
Reimplemented for internal reasons. Further reimplementations should call this function or else some features may not work correctly. The API is unaffected. Reimplemented in KFileDetailView, and KFileTreeView. Definition at line 962 of file klistview.cpp. References acceptDrag(), cleanDropVisualizer(), cleanItemHighlighter(), contentsDragMoveEvent(), drawDropVisualizer(), drawItemHighlighter(), dropHighlighter(), dropVisualizer(), findDrop(), and isExecuteArea(). Referenced by contentsDragMoveEvent(). |
|
Reimplemented for internal reasons. Further reimplementations should call this function or else some features may not work correctly. The API is unaffected. Reimplemented from QListView. Definition at line 741 of file klistview.cpp. References QMouseEvent::button(), QListView::clearSelection(), contentsMousePressEvent(), QListView::currentItem(), QListViewItem::depth(), QListView::header(), QListViewItem::isSelected(), QListView::itemMargin(), QMouseEvent::pos(), QListView::rootIsDecorated(), selectionModeExt(), QMouseEvent::state(), QListView::treeStepSize(), and QPoint::x(). Referenced by contentsMousePressEvent(). |
|
Reimplemented for internal reasons. Further reimplementations should call this function or else some features may not work correctly. The API is unaffected. Reimplemented from QListView. Definition at line 788 of file klistview.cpp. References contentsMouseMoveEvent(), dragEnabled(), isExecuteArea(), QMouseEvent::pos(), startDrag(), QPoint::x(), and QPoint::y(). Referenced by contentsMouseMoveEvent(). |
|
Reimplemented for internal reasons. Further reimplementations should call this function or else some features may not work correctly. The API is unaffected. Reimplemented from QListView. Definition at line 861 of file klistview.cpp. References QMouseEvent::button(), contentsMouseDoubleClickEvent(), doubleClicked(), emitExecute(), QMouseEvent::globalPos(), QListView::header(), QMouseEvent::pos(), and QPoint::x(). Referenced by contentsMouseDoubleClickEvent(). |
|
Reimplemented for internal reasons. Further reimplementations should call this function or else some features may not work correctly. The API is unaffected. Reimplemented in KFileDetailView, and KFileTreeView. Definition at line 1012 of file klistview.cpp. References cleanDropVisualizer(), cleanItemHighlighter(), and contentsDragLeaveEvent(). Referenced by contentsDragLeaveEvent(). |
|
Reimplemented for internal reasons. Further reimplementations should call this function or else some features may not work correctly. The API is unaffected. Reimplemented from QListView. Definition at line 828 of file klistview.cpp. References QMouseEvent::button(), contentsMouseReleaseEvent(), QListViewItem::depth(), QListView::header(), QListView::itemMargin(), itemsRenameable(), QMouseEvent::pos(), rename(), QListView::rootIsDecorated(), QListView::treeStepSize(), and QPoint::x(). Referenced by contentsMouseReleaseEvent(). |
|
Reimplemented for internal reasons. Further reimplementations should call this function or else some features may not work correctly. The API is unaffected. Reimplemented in KFileDetailView, and KFileTreeView. Definition at line 887 of file klistview.cpp. References QDropEvent::acceptAction(), acceptDrag(), cleanDropVisualizer(), cleanItemHighlighter(), contentsDropEvent(), dropped(), findDrop(), itemsMovable(), movableDropEvent(), QDropEvent::pos(), and QDropEvent::source(). Referenced by contentsDropEvent(). |
|
Reimplemented for internal reasons. Further reimplementations should call this function or else some features may not work correctly. The API is unaffected. Reimplemented in KFileDetailView, and KFileTreeView. Definition at line 1245 of file klistview.cpp. References acceptDrag(), and contentsDragEnterEvent(). Referenced by contentsDragEnterEvent(). |
|
Reimplemented from QListView. Reimplemented in KFileDetailView, and KFileTreeView. Definition at line 1139 of file klistview.cpp. References QListView::currentItem(). Referenced by startDrag(). |
|
Reimplemented in KFileDetailView, and KFileTreeView. Definition at line 1360 of file klistview.cpp. References acceptDrag(), itemsMovable(), and QDropEvent::source(). Referenced by acceptDrag(), contentsDragEnterEvent(), contentsDragMoveEvent(), and contentsDropEvent(). |
|
Paint the drag line. If painter is null, don't try to :) If after == 0 then the marker should be drawn at the top.
Definition at line 1256 of file klistview.cpp. References QRect::bottom(), QListViewItem::depth(), drawDropVisualizer(), QPainter::fillRect(), QListViewItem::firstChild(), QListViewItem::isOpen(), QListView::itemMargin(), QListViewItem::nextSibling(), QListView::rootIsDecorated(), QRect::setBottom(), QRect::setLeft(), QRect::setRight(), QRect::setTop(), and QListView::treeStepSize(). Referenced by contentsDragMoveEvent(), and drawDropVisualizer(). |
|
Paint the drag rectangle. If painter is null, don't try to :)
Definition at line 1303 of file klistview.cpp. References QListViewItem::depth(), drawItemHighlighter(), QRect::left(), QRect::setLeft(), and QListView::treeStepSize(). Referenced by contentsDragMoveEvent(), and drawItemHighlighter(). |
|
This method calls dragObject() and starts the drag. Reimplement it to do fancy stuff like setting a pixmap or using a non-default DragMode Reimplemented from QListView. Definition at line 1128 of file klistview.cpp. References QDragObject::drag(), dragObject(), moved(), and QDragObject::target(). Referenced by contentsMouseMoveEvent(). |
|
Reimplemented for internal reasons. Further reimplementations should call this function or else some features may not work correctly. The API is unaffected. Reimplemented in KFileDetailView. Definition at line 1416 of file klistview.cpp. References QListView::currentItem(), fileManagerKeyPressEvent(), QKeyEvent::key(), keyPressEvent(), and menuShortCutPressed(). Referenced by keyPressEvent(). |
|
Reimplemented for internal reasons. Further reimplementations should call this function or else some features may not work correctly. The API is unaffected. Definition at line 1876 of file klistview.cpp. References QPainter::fillRect(), QPaintEvent::rect(), and viewportPaintEvent(). Referenced by viewportPaintEvent(). |
|
In FileManager selection mode: explicitly activate the mode in which the current item is automatically selected.
Definition at line 1431 of file klistview.cpp. References QListView::currentItem(), and QListView::selectionChanged(). |
|
In FileManager selection mode: explicitly deactivate the mode in which the current item is automatically selected.
Definition at line 1444 of file klistview.cpp. |
|
In FileManager selection mode: return whether it is currently in the mode where the current item is selected automatically. Returns false if items were selected explicitly, e.g. using the mouse. Definition at line 1449 of file klistview.cpp. |
|
Reimplemented for setFullWidth().
Definition at line 1945 of file klistview.cpp. References viewportResizeEvent(). Referenced by viewportResizeEvent(). |
|
Disable AutoSelection. This overrides the system wide setting for AutoSelection. Please don't call this unless you have good reasons to override the system wide setting for AutoSelection.
Definition at line 2017 of file klistview.cpp. |
|
Reset AutoSelection to the system wide setting.
Definition at line 2027 of file klistview.cpp. References KGlobalSettings::autoSelectDelay(). |
|
Update internal settings whenever the global ones change.
Definition at line 507 of file klistview.cpp. References KGlobalSettings::autoSelectDelay(), KGlobalSettings::changeCursorOverIcon(), KGlobalSettings::contextMenuKey(), KGlobalSettings::dndEventDelay(), emitContextMenu(), KGlobalSettings::showContextMenusOnPress(), KGlobalSettings::singleClick(), and slotSettingsChanged(). Referenced by KListView(), and slotSettingsChanged(). |
|
Repaint the rect where I was drawing the drop line.
Definition at line 1019 of file klistview.cpp. Referenced by contentsDragLeaveEvent(), contentsDragMoveEvent(), contentsDropEvent(), focusOutEvent(), and KListView(). |
|
Repaint the rect where I was drawing the drop rectangle.
Definition at line 1319 of file klistview.cpp. Referenced by contentsDragLeaveEvent(), contentsDragMoveEvent(), contentsDropEvent(), focusOutEvent(), and KListView(). |
|
Emit the contextMenu signal. This slot is for mouse actions. Definition at line 1859 of file klistview.cpp. References contextMenu(), and emitContextMenu(). Referenced by emitContextMenu(), KListView(), and slotSettingsChanged(). |
|
Emit the contextMenu signal. This slot is for key presses. Definition at line 1847 of file klistview.cpp. References contextMenu(), and emitContextMenu(). |
|
Accessory slot for AutoSelect.
Definition at line 489 of file klistview.cpp. References isExecuteArea(), slotOnItem(), and QPoint::x(). Referenced by KListView(), and slotOnItem(). |
|
Accessory slot for AutoSelect/ChangeCursorOverItem.
Definition at line 498 of file klistview.cpp. Referenced by KListView(). |
|
Process AutoSelection.
Definition at line 556 of file klistview.cpp. References QListView::clearSelection(), QListViewItemIterator::current(), QListView::currentItem(), endl(), itemIndex(), QListViewItem::itemPos(), kdDebug(), QListView::selectionChanged(), QListView::selectionMode(), and QListView::triggerUpdate(). Referenced by KListView(). |
|
Reacts to header changes in full width mode.
Definition at line 644 of file klistview.cpp. References QListView::columns(). |
|
Handle dropEvent when itemsMovable() is set to true.
Definition at line 912 of file klistview.cpp. References aboutToMove(), QPtrList::append(), QListView::clearSelection(), QListView::currentItem(), QPtrList::first(), QListView::firstChild(), QListViewItem::isSelected(), QListViewItem::itemAbove(), QListViewItem::itemBelow(), movableDropEvent(), moved(), moveItem(), QPtrList::next(), and QListViewItem::setSelected(). Referenced by contentsDropEvent(), and movableDropEvent(). |
|
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 Definition at line 1034 of file klistview.cpp. References QListViewItem::childCount(), QListViewItem::depth(), depthToPixels(), findDrop(), QListViewItem::firstChild(), QListViewItem::height(), QListViewItem::isExpandable(), QListViewItem::isOpen(), QListViewItem::itemAbove(), lastItem(), QListViewItem::nextSibling(), QListViewItem::parent(), QPoint::x(), and QPoint::y(). Referenced by contentsDragMoveEvent(), contentsDropEvent(), and findDrop(). |
|
A special keyPressEvent (for FileManager selection mode).
Definition at line 1454 of file klistview.cpp. References QListView::currentItem(), fileManagerKeyPressEvent(), QListView::firstChild(), QRect::isEmpty(), QListViewItem::isSelected(), QListViewItem::itemAbove(), QListViewItem::itemBelow(), QKeyEvent::key(), QRect::moveBy(), QListViewItem::nextSibling(), selectedItems(), QListView::selectionChanged(), QListView::selectionMode(), QListViewItem::setSelected(), QKeyEvent::state(), QRect::unite(), and QRect::x(). Referenced by fileManagerKeyPressEvent(), and keyPressEvent(). |
|
Convert the depth of an item into its indentation in pixels.
Definition at line 1029 of file klistview.cpp. References depthToPixels(), QListView::itemMargin(), QListView::rootIsDecorated(), and QListView::treeStepSize(). Referenced by depthToPixels(), and findDrop(). |
The documentation for this class was generated from the following files: