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 |
Possible selection modes. More... | |
Public Slots | |
virtual void | rename (QListViewItem *item, int c) |
Rename column c of item . | |
void | setRenameable (int column, bool yesno=true) |
By default, if you called setItemsRenameable(true), only the first column is renameable. | |
virtual void | setItemsMovable (bool b) |
Set whether items in the list view can be moved. | |
virtual void | setItemsRenameable (bool b) |
Enables inplace-renaming of items. | |
virtual void | setDragEnabled (bool b) |
Enable/Disable the dragging of items. | |
virtual void | setAutoOpen (bool b) |
Enable/Disable AutoOpen (not implemented currently). | |
virtual void | setDropVisualizer (bool b) |
Enable/Disable the drawing of a drop-visualizer (a bar that shows where a dropped item would be inserted). | |
void | setDropVisualizerWidth (int w) |
Set the width of the (default) drop-visualizer. | |
virtual void | setTooltipColumn (int column) |
Set which column should be used for automatic tooltips. | |
virtual void | setDropHighlighter (bool b) |
Enable/Disable the drawing of a drop-highlighter (a rectangle around the item under the mouse cursor). | |
virtual void | setCreateChildren (bool b) |
For future expansions. | |
void | setSelectionModeExt (SelectionModeExt mode) |
Set the selection mode. | |
void | setTabOrderedRenaming (bool b) |
Enable/disable tabbing between editable cells
| |
bool | tabOrderedRenaming () const |
Returns whether tab ordered renaming is enabled
| |
Signals | |
void | executed (QListViewItem *item) |
This signal is emitted whenever the user executes an listview item. | |
void | executed (QListViewItem *item, const QPoint &pos, int c) |
This signal is emitted whenever the user executes an listview item. | |
void | doubleClicked (QListViewItem *item, const QPoint &pos, int c) |
This signal gets emitted whenever the user double clicks into the listview. | |
void | dropped (QDropEvent *e, QListViewItem *after) |
This signal gets emitted whenever something acceptable is dropped onto the listview. | |
void | dropped (KListView *list, QDropEvent *e, QListViewItem *after) |
This signal gets emitted whenever something acceptable is dropped onto the listview. | |
void | dropped (KListView *list, QDropEvent *e, QListViewItem *parent, QListViewItem *after) |
This signal gets emitted whenever something acceptable is dropped onto the listview. | |
void | dropped (QDropEvent *e, QListViewItem *parent, QListViewItem *after) |
This signal gets emitted whenever something acceptable is dropped onto the listview. | |
void | moved () |
This signal is emitted when ever the user moves an item in the list via DnD. | |
void | aboutToMove () |
Connect to this signal if you want to do some preprocessing before a move is made, for example, to disable sorting. | |
void | moved (QListViewItem *item, QListViewItem *afterFirst, QListViewItem *afterNow) |
This signal is emitted when ever the user moves an item in the list via DnD. | |
void | moved (QPtrList< QListViewItem > &items, QPtrList< QListViewItem > &afterFirst, QPtrList< QListViewItem > &afterNow) |
This signal is emitted after all the items have been moved. | |
void | itemRenamed (QListViewItem *item, const QString &str, int col) |
This signal gets emitted when an item is renamed via in-place renaming. | |
void | itemRenamed (QListViewItem *item) |
Same as above, but without the extra information. | |
void | menuShortCutPressed (KListView *list, QListViewItem *item) |
This signal is emitted when the shortcut key for popup-menus is pressed. | |
void | contextMenu (KListView *l, QListViewItem *i, const QPoint &p) |
This signal is emitted whenever a context-menu should be shown for item i . | |
Public Methods | |
KListView (QWidget *parent=0, const char *name=0) | |
Constructor. | |
virtual | ~KListView () |
Destructor. | |
virtual void | setAcceptDrops (bool) |
Reimplemented for internal reasons. | |
virtual bool | isExecuteArea (const QPoint &point) |
This function determines whether the given coordinates are within the execute area. | |
bool | isExecuteArea (int x) |
Same thing, but from an x coordinate only. | |
QPtrList< QListViewItem > | selectedItems () const |
void | moveItem (QListViewItem *item, QListViewItem *parent, QListViewItem *after) |
Arbitrarily move item to parent , positioned immediately after item after . | |
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 |
For future expansions. | |
bool | dropHighlighter () const |
int | dropVisualizerWidth () const |
The dropVisualizerWidth defaults to 4. | |
SelectionModeExt | selectionModeExt () const |
int | itemIndex (const QListViewItem *item) const |
Returns the index of item within the item tree or -1 if item doesn't exist in this list view. | |
QListViewItem * | itemAtIndex (int index) |
Returns the item of index within the item tree or 0 if index doesn't exist in this list view. | |
void | setFullWidth () |
void | setFullWidth (bool fullWidth) |
Let the last column fit exactly all the available width. | |
bool | fullWidth () const |
Returns whether the last column is set to fit the available width. | |
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) |
Reimplemented for full width support. | |
virtual void | removeColumn (int index) |
Reimplemented for full width support. | |
void | setAlternateBackground (const QColor &c) |
sets the alternate background background color. | |
const QColor & | alternateBackground () const |
void | saveLayout (KConfig *config, const QString &group) const |
Saves the list view's layout (column widtsh, column order, sort column) to a KConfig group. | |
void | restoreLayout (KConfig *config, const QString &group) |
Reads the list view's layout from a KConfig group as stored with saveLayout. | |
virtual void | setSorting (int column, bool ascending=true) |
Reimplemented to remember the current sort column and order. | |
int | columnSorted (void) const |
bool | ascendingSort (void) const |
Protected Slots | |
void | slotSettingsChanged (int) |
Update internal settings whenever the global ones change. | |
void | cleanDropVisualizer () |
Repaint the rect where I was drawing the drop line. | |
void | cleanItemHighlighter () |
Repaint the rect where I was drawing the drop rectangle. | |
void | emitContextMenu (QListViewItem *, const QPoint &, int) |
Emit the contextMenu signal. | |
void | emitContextMenu (KListView *, QListViewItem *) |
Emit the contextMenu signal. | |
void | slotOnItem (QListViewItem *item) |
Accessory slot for AutoSelect. | |
void | slotOnViewport () |
Accessory slot for AutoSelect/ChangeCursorOverItem. | |
void | slotAutoSelect () |
Process AutoSelection. | |
void | slotHeaderChanged () |
Reacts to header changes in full width mode. | |
Protected Methods | |
bool | below (const QRect &rect, const QPoint &p) |
Determine whether a drop on position p would count as being above or below the QRect rect . | |
bool | below (QListViewItem *i, const QPoint &p) |
An overloaded version of below(const QRect&, const QPoint&). | |
virtual bool | event (QEvent *) |
Reimplemented to reload the alternate background in palette changes. | |
void | emitExecute (QListViewItem *item, const QPoint &pos, int c) |
Emit signal executed. | |
virtual void | focusInEvent (QFocusEvent *fe) |
Reimplemented for internal reasons. | |
virtual void | focusOutEvent (QFocusEvent *fe) |
Reimplemented for internal reasons. | |
virtual void | leaveEvent (QEvent *e) |
Reimplemented for internal reasons. | |
virtual QString | tooltip (QListViewItem *item, int column) const |
virtual bool | showTooltip (QListViewItem *item, const QPoint &pos, int column) const |
virtual void | contentsDragMoveEvent (QDragMoveEvent *event) |
Reimplemented for internal reasons. | |
virtual void | contentsMousePressEvent (QMouseEvent *e) |
Reimplemented for internal reasons. | |
virtual void | contentsMouseMoveEvent (QMouseEvent *e) |
Reimplemented for internal reasons. | |
virtual void | contentsMouseDoubleClickEvent (QMouseEvent *e) |
Reimplemented for internal reasons. | |
virtual void | contentsDragLeaveEvent (QDragLeaveEvent *event) |
Reimplemented for internal reasons. | |
virtual void | contentsMouseReleaseEvent (QMouseEvent *) |
Reimplemented for internal reasons. | |
virtual void | contentsDropEvent (QDropEvent *) |
Reimplemented for internal reasons. | |
virtual void | contentsDragEnterEvent (QDragEnterEvent *) |
Reimplemented for internal reasons. | |
virtual QDragObject * | dragObject () |
virtual bool | acceptDrag (QDropEvent *event) const |
virtual QRect | drawDropVisualizer (QPainter *p, QListViewItem *parent, QListViewItem *after) |
Paint the drag line. | |
virtual QRect | drawItemHighlighter (QPainter *painter, QListViewItem *item) |
Paint the drag rectangle. | |
virtual void | startDrag () |
This method calls dragObject() and starts the drag. | |
virtual void | keyPressEvent (QKeyEvent *) |
Reimplemented for internal reasons. | |
virtual void | viewportPaintEvent (QPaintEvent *) |
Reimplemented for internal reasons. | |
void | activateAutomaticSelection () |
In FileManager selection mode: explicitely activate the mode in which the current item is automatically selected. | |
void | deactivateAutomaticSelection () |
In FileManager selection mode: explicitely deactivate the mode in which the current item is automatically selected. | |
bool | automaticSelection () const |
In FileManager selection mode: return whether it is currently in the mode where the current item is selected automatically. | |
virtual void | viewportResizeEvent (QResizeEvent *e) |
Reimplemented for setFullWidth(). | |
virtual void | movableDropEvent (QListViewItem *parent, QListViewItem *afterme) |
Handle dropEvent when itemsMovable() is set to true. | |
virtual void | findDrop (const QPoint &pos, QListViewItem *&parent, QListViewItem *&after) |
Where is the nearest QListViewItem that I'm going to drop? | |
void | fileManagerKeyPressEvent (QKeyEvent *) |
A special keyPressEvent (for FileManager selection mode). | |
int | depthToPixels (int depth) |
Convert the depth of an item into its indentation in pixels. |
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).
- Version:
- Id:
- klistview.h,v 1.92.2.1 2003/01/15 22:01:39 wheeler Exp
Definition at line 54 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 explicitely. This way e.g. SHIFT+up/PgUp then SHIFT+down/PgDn leaves no item selected Definition at line 93 of file klistview.h. Referenced by selectionModeExt(). |
Constructor & Destructor Documentation
|
Constructor.
The parameters Definition at line 386 of file klistview.cpp. References KGlobalSettings::alternateBackgroundColor(), cleanDropVisualizer(), cleanItemHighlighter(), emitContextMenu(), menuShortCutPressed(), QListView::onItem(), QListView::onViewport(), slotAutoSelect(), slotOnItem(), slotOnViewport(), and slotSettingsChanged(). |
|
Destructor.
Definition at line 431 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 1803 of file klistview.cpp. |
|
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 436 of file klistview.cpp. References QListView::itemAt(), and QPoint::x(). Referenced by contentsMouseMoveEvent(), emitExecute(), 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 444 of file klistview.cpp. References QListView::allColumnsShowFocus(), QListView::columnWidth(), and QListView::header(). |
|
Definition at line 1137 of file klistview.cpp. References QPtrList::append(), QListView::firstChild(), QListViewItem::isSelected(), and QListViewItem::itemBelow(). Referenced by fileManagerKeyPressEvent(). |
|
Arbitrarily move
Definition at line 1146 of file klistview.cpp. References QListView::insertItem(), QListViewItem::insertItem(), QListViewItem::parent(), and QListView::takeItem(). Referenced by movableDropEvent(). |
|
Definition at line 1052 of file klistview.cpp. References QListViewItemIterator::current(), and lastChild(). Referenced by findDrop(). |
|
Definition at line 1042 of file klistview.cpp. References QListView::firstChild(), and QListViewItem::nextSibling(). Referenced by lastItem(). |
|
Definition at line 1062 of file klistview.cpp. |
|
Definition at line 1091 of file klistview.cpp. Referenced by acceptDrag(), and contentsDropEvent(). |
|
Definition at line 1101 of file klistview.cpp. Referenced by contentsMouseReleaseEvent(). |
|
Definition at line 1112 of file klistview.cpp. Referenced by contentsMouseMoveEvent(). |
|
Definition at line 1122 of file klistview.cpp. |
|
Definition at line 1270 of file klistview.cpp. |
|
Definition at line 1127 of file klistview.cpp. Referenced by contentsDragMoveEvent(). |
|
Definition at line 1308 of file klistview.cpp. Referenced by showTooltip(). |
|
For future expansions. Do not use. Definition at line 1302 of file klistview.cpp. |
|
Definition at line 1323 of file klistview.cpp. Referenced by contentsDragMoveEvent(). |
|
The dropVisualizerWidth defaults to 4.
Definition at line 1809 of file klistview.cpp. |
|
Definition at line 1746 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 1751 of file klistview.cpp. References QListViewItemIterator::current(), and QListView::firstChild(). Referenced by slotAutoSelect(). |
|
Returns the item of This function takes all items into account not only the visible ones. Definition at line 1770 of file klistview.cpp. References QListViewItemIterator::current(), and QListView::firstChild(). |
|
Definition at line 1840 of file klistview.cpp. |
|
Let the last column fit exactly all the available width.
Definition at line 1845 of file klistview.cpp. References QListView::columns(), fullWidth(), and QListView::header(). |
|
Returns whether the last column is set to fit the available width.
Definition at line 1851 of file klistview.cpp. Referenced by setFullWidth(). |
|
Reimplemented for full width support.
Reimplemented from QListView. Definition at line 1856 of file klistview.cpp. References QListView::addColumn(), QListView::columns(), QListView::header(), and KStdAccel::label(). Referenced by KJanusWidget::KJanusWidget(). |
|
Reimplemented for full width support.
Reimplemented from QListView. Definition at line 1866 of file klistview.cpp. References QListView::addColumn(), QListView::columns(), QListView::header(), and KStdAccel::label(). |
|
Reimplemented for full width support.
Reimplemented from QListView. Definition at line 1876 of file klistview.cpp. References QListView::columns(), QListView::header(), and QListView::removeColumn(). |
|
sets the alternate background background color. This only has an effect if the items are KListViewItems
Definition at line 1892 of file klistview.cpp. |
|
Definition at line 1887 of file klistview.cpp. Referenced by KListViewItem::isAlternate(). |
|
Saves the list view's layout (column widtsh, column order, sort column) to a KConfig group.
Definition at line 1898 of file klistview.cpp. References QListView::columns(), QListView::columnWidth(), QListView::header(), and QString::number(). |
|
Reads the list view's layout from a KConfig group as stored with saveLayout.
Definition at line 1913 of file klistview.cpp. References QListView::header(), QListView::setColumnWidth(), and setSorting(). |
|
Reimplemented to remember the current sort column and order.
Reimplemented from QListView. Definition at line 1929 of file klistview.cpp. References QListView::setSorting(). Referenced by KJanusWidget::KJanusWidget(), and restoreLayout(). |
|
Definition at line 1936 of file klistview.cpp. |
|
Definition at line 1941 of file klistview.cpp. |
|
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. 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 moveItem() 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 1261 of file klistview.cpp. References QListView::ensureItemVisible(). Referenced by contentsMouseReleaseEvent(), 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 1275 of file klistview.cpp. References QListView::header(). |
|
Set whether items in the list view can be moved. It is enabled by default.
Definition at line 1086 of file klistview.cpp. |
|
Enables inplace-renaming of items. It is disabled by default.
Definition at line 1096 of file klistview.cpp. |
|
Enable/Disable the dragging of items. It is disabled by default. Definition at line 1107 of file klistview.cpp. |
|
Enable/Disable AutoOpen (not implemented currently).
Definition at line 1117 of file klistview.cpp. |
|
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 1132 of file klistview.cpp. |
|
Set the width of the (default) drop-visualizer. If you don't call this method, the width is set to 4. Definition at line 1179 of file klistview.cpp. |
|
Set which column should be used for automatic tooltips.
Definition at line 1313 of file klistview.cpp. |
|
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 1318 of file klistview.cpp. |
|
For future expansions. Do not use. Definition at line 1297 of file klistview.cpp. |
|
Set the selection mode. A different name was chosen to avoid API-clashes with QListView::setSelectionMode(). Definition at line 1723 of file klistview.cpp. References QListView::setSelectionMode(). |
|
Enable/disable tabbing between editable cells
Definition at line 1338 of file klistview.cpp. |
|
Returns whether tab ordered renaming is enabled
Definition at line 1343 of file klistview.cpp. |
|
Determine whether a drop on position
Definition at line 600 of file klistview.h. References QRect::bottom(), QRect::top(), and QPoint::y(). 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 614 of file klistview.h. References below(), and QListView::itemRect(). |
|
Reimplemented to reload the alternate background in palette changes.
Definition at line 700 of file klistview.cpp. References KGlobalSettings::alternateBackgroundColor(), and QEvent::type(). |
|
Emit signal executed.
Definition at line 622 of file klistview.cpp. References executed(), and isExecuteArea(). 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. Definition at line 655 of file klistview.cpp. References QListView::currentItem(), QFocusEvent::reason(), and QListView::selectionChanged(). |
|
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 671 of file klistview.cpp. References cleanDropVisualizer(), cleanItemHighlighter(), QListView::currentItem(), QFocusEvent::reason(), and QListView::selectionChanged(). |
|
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 693 of file klistview.cpp. |
|
Definition at line 1333 of file klistview.cpp. References QListViewItem::text(). Referenced by showTooltip(). |
|
Definition at line 1328 of file klistview.cpp. References QString::length(), tooltip(), and tooltipColumn(). |
|
Reimplemented for internal reasons. Further reimplementations should call this function or else some features may not work correctly. The API is unaffected. Reimplemented in KFileTreeView. Definition at line 928 of file klistview.cpp. References acceptDrag(), cleanDropVisualizer(), cleanItemHighlighter(), drawDropVisualizer(), drawItemHighlighter(), dropHighlighter(), dropVisualizer(), findDrop(), and QDragMoveEvent::ignore(). |
|
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 708 of file klistview.cpp. References QMouseEvent::button(), QListView::clearSelection(), QListView::contentsMousePressEvent(), QListView::currentItem(), QListViewItem::depth(), QListView::header(), QListViewItem::isSelected(), QListView::itemAt(), QListView::itemMargin(), QMouseEvent::pos(), QListView::rootIsDecorated(), selectionModeExt(), QMouseEvent::state(), QListView::treeStepSize(), and QPoint::x(). |
|
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 755 of file klistview.cpp. References QListView::contentsMouseMoveEvent(), QListView::contentsMouseReleaseEvent(), dragEnabled(), KCursor::handCursor(), isExecuteArea(), QListView::itemAt(), QMouseEvent::pos(), startDrag(), QPoint::x(), and QPoint::y(). |
|
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(), doubleClicked(), QListView::doubleClicked(), emitExecute(), QMouseEvent::globalPos(), QListView::header(), QListView::itemAt(), QMouseEvent::pos(), and QPoint::x(). |
|
Reimplemented for internal reasons. Further reimplementations should call this function or else some features may not work correctly. The API is unaffected. Reimplemented in KFileTreeView. Definition at line 961 of file klistview.cpp. References cleanDropVisualizer(), and cleanItemHighlighter(). |
|
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 795 of file klistview.cpp. References QMouseEvent::button(), QListView::contentsMouseReleaseEvent(), QListViewItem::depth(), QListView::header(), QListView::itemAt(), QListView::itemMargin(), itemsRenameable(), QMouseEvent::pos(), rename(), QListView::rootIsDecorated(), QListView::treeStepSize(), and QPoint::x(). |
|
Reimplemented for internal reasons. Further reimplementations should call this function or else some features may not work correctly. The API is unaffected. Reimplemented in KFileTreeView. Definition at line 854 of file klistview.cpp. References QDropEvent::acceptAction(), acceptDrag(), cleanDropVisualizer(), cleanItemHighlighter(), dropped(), findDrop(), itemsMovable(), movableDropEvent(), QDropEvent::pos(), and QDropEvent::source(). |
|
Reimplemented for internal reasons. Further reimplementations should call this function or else some features may not work correctly. The API is unaffected. Reimplemented in KFileTreeView. Definition at line 1173 of file klistview.cpp. References acceptDrag(). |
|
Reimplemented from QListView. Reimplemented in KFileTreeView. Definition at line 1078 of file klistview.cpp. References QListView::currentItem(). Referenced by startDrag(). |
|
Reimplemented in KFileTreeView. Definition at line 1292 of file klistview.cpp. References itemsMovable(), and QDropEvent::source(). Referenced by 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 1184 of file klistview.cpp. References QRect::bottom(), QListViewItem::depth(), QPainter::fillRect(), QListViewItem::firstChild(), QListViewItem::isOpen(), QListView::itemMargin(), QListView::itemRect(), QListViewItem::nextSibling(), QListView::rootIsDecorated(), QRect::setBottom(), QRect::setLeft(), QRect::setRight(), QRect::setTop(), and QListView::treeStepSize(). Referenced by contentsDragMoveEvent(). |
|
Paint the drag rectangle. If painter is null, don't try to :)
Definition at line 1231 of file klistview.cpp. References QListViewItem::depth(), QListView::itemRect(), QRect::left(), QRect::setLeft(), and QListView::treeStepSize(). Referenced by contentsDragMoveEvent(). |
|
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 1067 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 1348 of file klistview.cpp. References QListView::currentItem(), fileManagerKeyPressEvent(), QKeyEvent::key(), and menuShortCutPressed(). |
|
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 1815 of file klistview.cpp. References QPainter::fillRect(), and QPaintEvent::rect(). |
|
In FileManager selection mode: explicitely activate the mode in which the current item is automatically selected.
Definition at line 1363 of file klistview.cpp. References QListView::currentItem(), QListView::selectAll(), and QListView::selectionChanged(). |
|
In FileManager selection mode: explicitely deactivate the mode in which the current item is automatically selected.
Definition at line 1376 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 explicitely, e.g. using the mouse. Definition at line 1381 of file klistview.cpp. |
|
Reimplemented for setFullWidth().
Definition at line 1882 of file klistview.cpp. |
|
Update internal settings whenever the global ones change.
Definition at line 477 of file klistview.cpp. References KGlobalSettings::autoSelectDelay(), KGlobalSettings::changeCursorOverIcon(), KGlobalSettings::contextMenuKey(), KGlobalSettings::dndEventDelay(), emitContextMenu(), KGlobalSettings::showContextMenusOnPress(), and KGlobalSettings::singleClick(). Referenced by KListView(). |
|
Repaint the rect where I was drawing the drop line.
Definition at line 967 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 1251 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 1798 of file klistview.cpp. References contextMenu(). Referenced by KListView(), and slotSettingsChanged(). |
|
Emit the contextMenu signal. This slot is for key presses. Definition at line 1786 of file klistview.cpp. References contextMenu(), and QListView::itemRect(). |
|
Accessory slot for AutoSelect.
Definition at line 460 of file klistview.cpp. References isExecuteArea(), and QCursor::pos(). Referenced by KListView(). |
|
Accessory slot for AutoSelect/ChangeCursorOverItem.
Definition at line 468 of file klistview.cpp. Referenced by KListView(). |
|
Process AutoSelection.
Definition at line 525 of file klistview.cpp. References QListView::clearSelection(), QListViewItemIterator::current(), QListView::currentItem(), itemIndex(), QListViewItem::itemPos(), QListView::selectionChanged(), QListView::selectionMode(), QListView::setCurrentItem(), QListView::setSelected(), QListViewItem::setSelected(), and QListView::triggerUpdate(). Referenced by KListView(). |
|
Reacts to header changes in full width mode.
Definition at line 612 of file klistview.cpp. References QListView::columns(), QListView::columnWidth(), and QListView::setColumnWidth(). |
|
Handle dropEvent when itemsMovable() is set to true.
Definition at line 878 of file klistview.cpp. References aboutToMove(), QPtrList::append(), QListView::clearSelection(), QListView::currentItem(), QPtrList::first(), QListView::firstChild(), QListViewItem::isSelected(), QListViewItem::itemAbove(), QListViewItem::itemBelow(), moved(), moveItem(), QPtrList::next(), QListView::setCurrentItem(), and QListViewItem::setSelected(). Referenced by contentsDropEvent(). |
|
Where is the nearest QListViewItem that I'm going to drop?
Definition at line 982 of file klistview.cpp. References QListViewItem::childCount(), QListViewItem::depth(), depthToPixels(), QListViewItem::height(), QListViewItem::isExpandable(), QListViewItem::isOpen(), QListViewItem::itemAbove(), QListView::itemAt(), QListView::itemRect(), lastItem(), QListViewItem::nextSibling(), QListViewItem::parent(), QPoint::x(), and QPoint::y(). Referenced by contentsDragMoveEvent(), and contentsDropEvent(). |
|
A special keyPressEvent (for FileManager selection mode).
Definition at line 1386 of file klistview.cpp. References QListViewItem::childCount(), QListView::currentItem(), QListView::ensureItemVisible(), QListView::firstChild(), QListViewItem::height(), QRect::isEmpty(), QListViewItem::isExpandable(), QListViewItem::isOpen(), QListViewItem::isSelected(), QListViewItem::itemAbove(), QListViewItem::itemBelow(), QListView::itemRect(), QKeyEvent::key(), QRect::moveBy(), QListViewItem::nextSibling(), QListView::selectAll(), selectedItems(), QListView::selectionChanged(), QListView::setCurrentItem(), QListView::setOpen(), QListViewItem::setSelected(), QListView::setSelectionMode(), QKeyEvent::state(), QRect::unite(), and QRect::x(). Referenced by keyPressEvent(). |
|
Convert the depth of an item into its indentation in pixels.
Definition at line 977 of file klistview.cpp. References QListView::itemMargin(), QListView::rootIsDecorated(), and QListView::treeStepSize(). Referenced by findDrop(). |
The documentation for this class was generated from the following files: