KDE3Support
K3ListView Class Reference
#include <k3listview.h>

Detailed Description
This Widget extends the functionality of Q3ListView 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 Q3ListView::clicked() or Q3ListView::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 Q3ListView::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*)
K3ListView is drag-enabled, too: to benefit from that you have to derive from it. Reimplement dragObject() and (possibly) startDrag(), and setDragEnabled(true).
Definition at line 57 of file k3listview.h.
Member Enumeration Documentation
Possible selection modes.
The first four correspond directly to Q3ListView::SelectionMode, while the FileManager selection mode is defined as follows:
- home: move to the first
- end: move to the last
- PgUp/PgDn: move one page up/down
- up/down: move one item up/down
- insert: toggle selection of current and move to the next
- space: toggle selection of the current
- CTRL+up: move to the previous item and toggle selection of this one
- CTRL+down: toggle selection of the current item and move to the next
- CTRL+end: toggle selection from (including) the current item to (including) the last item
- CTRL+home: toggle selection from (including) the current item to the (including) the first item
- CTRL+PgDn: toggle selection from (including) the current item to (excluding) the item one page down
- CTRL+PgUp: toggle selection from (excluding) the current item to (including) the item one page up
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 108 of file k3listview.h.
Constructor & Destructor Documentation
K3ListView::K3ListView | ( | QWidget * | parent = 0 |
) | [explicit] |
Constructor.
The parameter parent
is handled by Q3ListView, as usual.
Definition at line 414 of file k3listview.cpp.
K3ListView::~K3ListView | ( | ) | [virtual] |
Member Function Documentation
void K3ListView::aboutToMove | ( | ) | [signal] |
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 K3ListView calls
- See also:
- moveItem()
bool K3ListView::acceptDrag | ( | QDropEvent * | event | ) | const [protected, virtual] |
- Returns:
- true if the
event
provides some acceptable format.
A common mistake is to forget the "const" in your reimplementation
Reimplemented in K3FileTreeView.
Definition at line 1403 of file k3listview.cpp.
void K3ListView::activateAutomaticSelection | ( | ) | [protected] |
In FileManager selection mode: explicitly activate the mode in which the current item is automatically selected.
Definition at line 1466 of file k3listview.cpp.
int K3ListView::addColumn | ( | const QIcon & | iconset, | |
const QString & | label, | |||
int | width = -1 | |||
) | [virtual] |
Reimplemented for full width support.
Reimplemented from Q3ListView.
Definition at line 1966 of file k3listview.cpp.
int K3ListView::addColumn | ( | const QString & | label, | |
int | width = -1 | |||
) | [virtual] |
Reimplemented for full width support.
- See also:
- removeColumn()
Reimplemented from Q3ListView.
Definition at line 1956 of file k3listview.cpp.
const QColor& K3ListView::alternateBackground | ( | ) | const |
bool K3ListView::ascendingSort | ( | void | ) | const |
- Returns:
- whether the current sort is ascending (or descending)
Definition at line 2111 of file k3listview.cpp.
bool K3ListView::automaticSelection | ( | ) | const [protected] |
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 1483 of file k3listview.cpp.
bool K3ListView::autoOpen | ( | ) | const |
bool K3ListView::below | ( | Q3ListViewItem * | i, | |
const QPoint & | p | |||
) | [protected] |
An overloaded version of below(const QRect&, const QPoint&).
It differs from the above only in what arguments it takes.
- Parameters:
-
i the item whose rect() is passed to the above function. p is translated from contents coordinates to viewport coordinates before being passed to the above function.
Definition at line 1453 of file k3listview.cpp.
Determine whether a drop on position p
would count as being above or below the QRect rect
.
- Parameters:
-
rect is the rectangle we examine. p is the point located in the rectangle, p is assumed to be in viewport coordinates.
Definition at line 1448 of file k3listview.cpp.
void K3ListView::cleanDropVisualizer | ( | ) | [protected, slot] |
void K3ListView::cleanItemHighlighter | ( | ) | [protected, slot] |
Repaint the rect where I was drawing the drop rectangle.
Definition at line 1364 of file k3listview.cpp.
int K3ListView::columnSorted | ( | void | ) | const |
- Returns:
- the currently sorted column, or -1 if none is sorted
Definition at line 2106 of file k3listview.cpp.
void K3ListView::contentsContextMenuEvent | ( | QContextMenuEvent * | event | ) | [protected, virtual] |
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 1281 of file k3listview.cpp.
void K3ListView::contentsDragEnterEvent | ( | QDragEnterEvent * | event | ) | [protected, virtual] |
Reimplemented for internal reasons.
Further reimplementations should call this function or else some features may not work correctly.
The API is unaffected.
Reimplemented in K3FileTreeView.
Definition at line 1276 of file k3listview.cpp.
void K3ListView::contentsDragLeaveEvent | ( | QDragLeaveEvent * | event | ) | [protected, virtual] |
Reimplemented for internal reasons.
Further reimplementations should call this function or else some features may not work correctly.
The API is unaffected.
Reimplemented in K3FileTreeView.
Definition at line 1022 of file k3listview.cpp.
void K3ListView::contentsDragMoveEvent | ( | QDragMoveEvent * | event | ) | [protected, virtual] |
Reimplemented for internal reasons.
Further reimplementations should call this function or else some features may not work correctly.
The API is unaffected.
Reimplemented in K3FileTreeView.
Definition at line 970 of file k3listview.cpp.
void K3ListView::contentsDropEvent | ( | QDropEvent * | e | ) | [protected, virtual] |
Reimplemented for internal reasons.
Further reimplementations should call this function or else some features may not work correctly.
The API is unaffected.
Reimplemented in K3FileTreeView.
Definition at line 894 of file k3listview.cpp.
void K3ListView::contentsMouseDoubleClickEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
Reimplemented for internal reasons.
Further reimplementations should call this function or else some features may not work correctly.
The API is unaffected.
Reimplemented from Q3ListView.
Definition at line 866 of file k3listview.cpp.
void K3ListView::contentsMouseMoveEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
Reimplemented for internal reasons.
Further reimplementations should call this function or else some features may not work correctly.
The API is unaffected.
Reimplemented from Q3ListView.
Definition at line 793 of file k3listview.cpp.
void K3ListView::contentsMousePressEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
Reimplemented for internal reasons.
Further reimplementations should call this function or else some features may not work correctly.
The API is unaffected.
Reimplemented from Q3ListView.
Definition at line 746 of file k3listview.cpp.
void K3ListView::contentsMouseReleaseEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
Reimplemented for internal reasons.
Further reimplementations should call this function or else some features may not work correctly.
The API is unaffected.
Reimplemented from Q3ListView.
Definition at line 833 of file k3listview.cpp.
void K3ListView::contextMenu | ( | K3ListView * | l, | |
Q3ListViewItem * | i, | |||
const QPoint & | p | |||
) | [signal] |
This signal is emitted whenever a context-menu should be shown for item i
.
It automatically adjusts for all settings involved (Menu key, showMenuOnPress/Click).
- Parameters:
-
l is this listview. i is the item for which the menu should be shown. May be 0L. p is the point at which the menu should be shown.
void K3ListView::deactivateAutomaticSelection | ( | ) | [protected] |
In FileManager selection mode: explicitly deactivate the mode in which the current item is automatically selected.
Definition at line 1478 of file k3listview.cpp.
int K3ListView::depthToPixels | ( | int | depth | ) | [protected] |
Convert the depth of an item into its indentation in pixels.
Definition at line 1039 of file k3listview.cpp.
void K3ListView::disableAutoSelection | ( | ) | [protected] |
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.
- See also:
- resetAutoSelection()
Definition at line 2124 of file k3listview.cpp.
void K3ListView::doneEditing | ( | Q3ListViewItem * | item, | |
int | row | |||
) | [protected, slot] |
Definition at line 1397 of file k3listview.cpp.
void K3ListView::doubleClicked | ( | Q3ListViewItem * | item, | |
const QPoint & | pos, | |||
int | c | |||
) | [protected] |
- Deprecated:
- This is just here for binary compatibility. Use the signal in Q3ListView instead.
Reimplemented from Q3ListView.
Definition at line 2143 of file k3listview.cpp.
bool K3ListView::dragEnabled | ( | ) | const |
Q3DragObject * K3ListView::dragObject | ( | ) | [protected, virtual] |
- Returns:
- a dragobject encoding the current selection.
- See also:
- setDragEnabled()
Reimplemented from Q3ListView.
Reimplemented in K3FileTreeView.
Definition at line 1149 of file k3listview.cpp.
QRect K3ListView::drawDropVisualizer | ( | QPainter * | p, | |
Q3ListViewItem * | parent, | |||
Q3ListViewItem * | after | |||
) | [protected, virtual] |
Paint the drag line.
If painter is null, don't try to :)
If after == 0 then the marker should be drawn at the top.
- Returns:
- the rectangle that you painted to.
Definition at line 1295 of file k3listview.cpp.
QRect K3ListView::drawItemHighlighter | ( | QPainter * | painter, | |
Q3ListViewItem * | item | |||
) | [protected, virtual] |
Paint the drag rectangle.
If painter is null, don't try to :)
- Returns:
- the rectangle that you painted to.
Definition at line 1342 of file k3listview.cpp.
bool K3ListView::dropHighlighter | ( | ) | const |
- Returns:
- true if drawing of the drop-highlighter has been enabled.
False by default.
- See also:
- setDropHighlighter()
Definition at line 1423 of file k3listview.cpp.
void K3ListView::dropped | ( | QDropEvent * | e, | |
Q3ListViewItem * | parent, | |||
Q3ListViewItem * | after | |||
) | [signal] |
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
- Parameters:
-
e is the drop event itself (it has already been accepted) parent the item that is to be the parent of the new item after is the item after which the drop occurred (or 0L, if the drop was above all items
Reimplemented in K3FileTreeView.
void K3ListView::dropped | ( | K3ListView * | list, | |
QDropEvent * | e, | |||
Q3ListViewItem * | parent, | |||
Q3ListViewItem * | after | |||
) | [signal] |
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
- Parameters:
-
list is the listview e is the drop event itself (it has already been accepted) parent the item that is to be the parent of the new item after is the item after which the drop occurred (or 0L, if the drop was above all items
void K3ListView::dropped | ( | K3ListView * | list, | |
QDropEvent * | e, | |||
Q3ListViewItem * | after | |||
) | [signal] |
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).
- Parameters:
-
list is the listview e is the drop event itself (it has already been accepted) after is the item after which the drop occurred (or 0L, if the drop was above all items
void K3ListView::dropped | ( | QDropEvent * | e, | |
Q3ListViewItem * | after | |||
) | [signal] |
This signal gets emitted whenever something acceptable is dropped onto the listview.
- Parameters:
-
e is the drop event itself (it has already been accepted) after is the item after which the drop occurred (or 0L, if the drop was above all items)
- See also:
- acceptDrop()
Reimplemented in K3FileTreeView.
bool K3ListView::dropVisualizer | ( | ) | const |
- Returns:
- true if drawing of the drop-visualizer has been enabled.
True by default.
- See also:
- setDropVisualizer()
int K3ListView::dropVisualizerWidth | ( | ) | const |
The dropVisualizerWidth defaults to 4.
- See also:
- setDropVisualizerWidth()
- Returns:
- the current width of the drop-visualizer.
void K3ListView::emitContextMenu | ( | K3ListView * | , | |
Q3ListViewItem * | i | |||
) | [protected, slot] |
Emit the contextMenu signal.
This slot is for key presses.
Definition at line 1881 of file k3listview.cpp.
void K3ListView::emitContextMenu | ( | Q3ListViewItem * | i, | |
const QPoint & | p, | |||
int | ||||
) | [protected, slot] |
Emit the contextMenu signal.
This slot is for mouse actions.
Definition at line 1893 of file k3listview.cpp.
void K3ListView::emitExecute | ( | Q3ListViewItem * | item, | |
const QPoint & | pos, | |||
int | c | |||
) | [protected] |
Reimplemented to reload the alternate background in palette changes.
Definition at line 738 of file k3listview.cpp.
void K3ListView::executed | ( | Q3ListViewItem * | item, | |
const QPoint & | pos, | |||
int | c | |||
) | [signal] |
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.
- Parameters:
-
item is the pointer to the executed listview item. pos is the position where the user has clicked c is the column into which the user clicked.
void K3ListView::executed | ( | Q3ListViewItem * | item | ) | [signal] |
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.
- Parameters:
-
item is the pointer to the executed listview item.
void K3ListView::fileManagerKeyPressEvent | ( | QKeyEvent * | e | ) | [protected] |
A special keyPressEvent (for FileManager selection mode).
Definition at line 1488 of file k3listview.cpp.
void K3ListView::findDrop | ( | const QPoint & | pos, | |
Q3ListViewItem *& | parent, | |||
Q3ListViewItem *& | after | |||
) | [protected, virtual] |
Where is the nearest Q3ListViewItem 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 1044 of file k3listview.cpp.
void K3ListView::focusInEvent | ( | QFocusEvent * | fe | ) | [protected, virtual] |
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 k3listview.cpp.
void K3ListView::focusOutEvent | ( | QFocusEvent * | fe | ) | [protected, virtual] |
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 709 of file k3listview.cpp.
bool K3ListView::fullWidth | ( | ) | const |
bool K3ListView::isExecuteArea | ( | int | x | ) |
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 471 of file k3listview.cpp.
This function determines whether the given coordinates are within the execute area.
The execute area is the part of a Q3ListViewItem where mouse clicks or double clicks respectively generate a executed() signal. Depending on Q3ListView::allColumnsShowFocus() this is either the whole item or only the first column.
- Returns:
- true if point is inside execute area of an item, false in all other cases including the case that it is over the viewport.
Definition at line 461 of file k3listview.cpp.
bool K3ListView::isRenameable | ( | int | column | ) | const |
- Returns:
- true if
column
is renamable.
- See also:
- setRenameable()
Definition at line 1383 of file k3listview.cpp.
void K3ListView::itemAdded | ( | Q3ListViewItem * | item | ) | [signal] |
Q3ListViewItem * K3ListView::itemAtIndex | ( | int | index | ) |
Returns the item of index
within the item tree or 0 if index
doesn't exist in this list view.
This function takes all items into account not only the visible ones.
Definition at line 1865 of file k3listview.cpp.
int K3ListView::itemIndex | ( | const Q3ListViewItem * | item | ) | const |
Returns the index of item
within the item tree or -1 if item
doesn't exist in this list view.
This function takes all items into account not only the visible ones.
Definition at line 1846 of file k3listview.cpp.
void K3ListView::itemRemoved | ( | Q3ListViewItem * | item | ) | [signal] |
void K3ListView::itemRenamed | ( | Q3ListViewItem * | item | ) | [signal] |
Same as above, but without the extra information.
void K3ListView::itemRenamed | ( | Q3ListViewItem * | item, | |
const QString & | str, | |||
int | col | |||
) | [signal] |
This signal gets emitted when an item is renamed via in-place renaming.
- Parameters:
-
item is the renamed item. str is the new value of column col
.col is the renamed column.
bool K3ListView::itemsMovable | ( | ) | const |
bool K3ListView::itemsRenameable | ( | ) | const |
void K3ListView::keyPressEvent | ( | QKeyEvent * | e | ) | [protected, virtual] |
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 1458 of file k3listview.cpp.
Q3ListViewItem * K3ListView::lastChild | ( | ) | const |
- Returns:
- the last child of this listview.
- See also:
- lastItem()
Definition at line 1113 of file k3listview.cpp.
Q3ListViewItem * K3ListView::lastItem | ( | ) | const |
- Returns:
- the last item (not child!) of this listview.
- See also:
- lastChild()
Definition at line 1123 of file k3listview.cpp.
void K3ListView::leaveEvent | ( | QEvent * | e | ) | [protected, virtual] |
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 731 of file k3listview.cpp.
void K3ListView::menuShortCutPressed | ( | K3ListView * | list, | |
Q3ListViewItem * | item | |||
) | [signal] |
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 (K3ListView*, Q3ListViewItem*, const QPoint&) to correctly handle showing context menus regardless of settings.
- Parameters:
-
list is this listview. item is the currentItem() at the time the key was pressed. May be 0L.
void K3ListView::movableDropEvent | ( | Q3ListViewItem * | parent, | |
Q3ListViewItem * | afterme | |||
) | [protected, virtual] |
void K3ListView::moved | ( | Q3PtrList< Q3ListViewItem > & | items, | |
Q3PtrList< Q3ListViewItem > & | afterFirst, | |||
Q3PtrList< Q3ListViewItem > & | afterNow | |||
) | [signal] |
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 items
associates with the first of afterFirst and afterNow.
void K3ListView::moved | ( | Q3ListViewItem * | item, | |
Q3ListViewItem * | afterFirst, | |||
Q3ListViewItem * | afterNow | |||
) | [signal] |
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, afterFirst
and afterNow
will reflect what was true before the move. This differs from moved(), so be careful. All the items will have been moved before moved() is emitted, which is not true in this method. // FIXME
- Parameters:
-
item the item that was moved afterFirst the item that parameter item was in before the move, in the list afterNow the item it's currently after.
void K3ListView::moved | ( | ) | [signal] |
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.
void K3ListView::moveItem | ( | Q3ListViewItem * | item, | |
Q3ListViewItem * | parent, | |||
Q3ListViewItem * | after | |||
) |
Arbitrarily move item
to parent
, positioned immediately after item after
.
If after is 0, item
is made the first child of parent
.
(Un-deprecated in kde-3.4)
Definition at line 1246 of file k3listview.cpp.
void K3ListView::removeColumn | ( | int | index | ) | [virtual] |
Reimplemented for full width support.
- See also:
- addColumn()
Reimplemented from Q3ListView.
Definition at line 1976 of file k3listview.cpp.
void K3ListView::rename | ( | Q3ListViewItem * | item, | |
int | c | |||
) | [virtual, slot] |
KLineEdit * K3ListView::renameLineEdit | ( | ) | const |
- Returns:
- the lineedit used for inline renaming.
Use that to setup a KCompletion or QValidator for the lineedit
Definition at line 1133 of file k3listview.cpp.
void K3ListView::resetAutoSelection | ( | ) | [protected] |
Reset AutoSelection to the system wide setting.
- See also:
- disableAutoSelection()
Definition at line 2134 of file k3listview.cpp.
void K3ListView::restoreLayout | ( | KConfigGroup & | cg | ) |
Definition at line 2039 of file k3listview.cpp.
Reads the list view's layout from a KConfig group as stored with saveLayout.
- Parameters:
-
config the KConfig object to read from group the config group to use
Definition at line 2033 of file k3listview.cpp.
void K3ListView::saveLayout | ( | KConfigGroup & | cg | ) | const |
Definition at line 2016 of file k3listview.cpp.
Saves the list view's layout (column widtsh, column order, sort column) to a KConfig group.
- Parameters:
-
config the KConfig object to write to group the config group to use
Definition at line 2010 of file k3listview.cpp.
QList< Q3ListViewItem * > K3ListView::selectedItems | ( | bool | includeHiddenItems = true |
) | const |
- Returns:
- a list containing the currently selected items.
- Parameters:
-
includeHiddenItems Set to true to return all items regardless of visibility. Set to false to only return items that are isVisible().
- Returns:
- a list of all selected listview items
Definition at line 1209 of file k3listview.cpp.
K3ListView::SelectionModeExt K3ListView::selectionModeExt | ( | ) | const |
- Returns:
- the "extended" selection mode of this listview.
- See also:
- SelectionModeExt
Definition at line 1841 of file k3listview.cpp.
void K3ListView::setAcceptDrops | ( | bool | val | ) | [virtual] |
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 1898 of file k3listview.cpp.
void K3ListView::setAlternateBackground | ( | const QColor & | c | ) |
sets the alternate background background color.
This only has an effect if the items are K3ListViewItems
- Parameters:
-
c the color to use for every other item. Set to an invalid color to disable alternate colors.
- See also:
- alternateBackground()
Definition at line 1992 of file k3listview.cpp.
void K3ListView::setAutoOpen | ( | bool | b | ) | [virtual, slot] |
Enable/Disable AutoOpen (not implemented currently).
Definition at line 1189 of file k3listview.cpp.
void K3ListView::setDragEnabled | ( | bool | b | ) | [virtual, slot] |
Enable/Disable the dragging of items.
It is disabled by default.
Definition at line 1179 of file k3listview.cpp.
void K3ListView::setDropHighlighter | ( | bool | b | ) | [virtual, slot] |
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 1418 of file k3listview.cpp.
void K3ListView::setDropVisualizer | ( | bool | b | ) | [virtual, slot] |
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 1204 of file k3listview.cpp.
void K3ListView::setDropVisualizerWidth | ( | int | w | ) | [slot] |
Set the width of the (default) drop-visualizer.
If you don't call this method, the width is set to 4.
Definition at line 1290 of file k3listview.cpp.
void K3ListView::setFullWidth | ( | bool | fullWidth | ) |
Let the last column fit exactly all the available width.
- See also:
- fullWidth()
Definition at line 1945 of file k3listview.cpp.
void K3ListView::setFullWidth | ( | ) |
void K3ListView::setItemsMovable | ( | bool | b | ) | [virtual, slot] |
Set whether items in the list view can be moved.
It is enabled by default.
- See also:
- itemsMovable()
Definition at line 1158 of file k3listview.cpp.
void K3ListView::setItemsRenameable | ( | bool | b | ) | [virtual, slot] |
Enables inplace-renaming of items.
It is disabled by default.
- See also:
- itemsRenameable()
Definition at line 1168 of file k3listview.cpp.
void K3ListView::setRenameable | ( | int | column, | |
bool | yesno = true | |||
) | [slot] |
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 K3ListView, and override rename() and call only call it if you want the item to be renamed.
Definition at line 1388 of file k3listview.cpp.
void K3ListView::setSelectionModeExt | ( | SelectionModeExt | mode | ) | [slot] |
Set the selection mode.
A different name was chosen to avoid API-clashes with Q3ListView::setSelectionMode().
Definition at line 1818 of file k3listview.cpp.
void K3ListView::setShadeSortColumn | ( | bool | shadeSortColumn | ) |
Set to true if the currently sorted column should be drawn shaded.
Defaults to true
- Parameters:
-
shadeSortColumn True if sort column should be shaded.
Definition at line 1998 of file k3listview.cpp.
void K3ListView::setSorting | ( | int | column, | |
bool | ascending = true | |||
) | [virtual] |
Reimplemented to remember the current sort column and order.
- Parameters:
-
column is the column to be sorted, or -1 to sort in order of insertion ascending whether to sort ascending (or descending)
Reimplemented from Q3ListView.
Definition at line 2073 of file k3listview.cpp.
void K3ListView::setTabOrderedRenaming | ( | bool | b | ) | [slot] |
void K3ListView::setTooltipColumn | ( | int | column | ) | [virtual, slot] |
Set which column should be used for automatic tooltips.
- Parameters:
-
column is the column for which tooltips will be shown. Set -1 to disable this feature.
Definition at line 1413 of file k3listview.cpp.
bool K3ListView::shadeSortColumn | ( | void | ) | const |
See if the sort column should be drawn shaded.
- Returns:
- true if the sort column should be shaded
bool K3ListView::showTooltip | ( | Q3ListViewItem * | item, | |
const QPoint & | pos, | |||
int | column | |||
) | const [protected, virtual] |
- Returns:
- whether the tooltip for
column
ofitem
shall be shown at pointpos
.
Definition at line 1428 of file k3listview.cpp.
void K3ListView::slotAutoSelect | ( | ) | [protected, slot] |
void K3ListView::slotDragExpand | ( | ) | [protected, slot] |
Definition at line 1016 of file k3listview.cpp.
void K3ListView::slotHeaderChanged | ( | ) | [protected, slot] |
void K3ListView::slotMouseButtonClicked | ( | int | btn, | |
Q3ListViewItem * | item, | |||
const QPoint & | pos, | |||
int | c | |||
) | [protected, slot] |
Definition at line 888 of file k3listview.cpp.
void K3ListView::slotOnItem | ( | Q3ListViewItem * | item | ) | [protected, slot] |
void K3ListView::slotOnViewport | ( | ) | [protected, slot] |
void K3ListView::slotSettingsChanged | ( | int | category | ) | [protected, slot] |
Update internal settings whenever the global ones change.
Definition at line 528 of file k3listview.cpp.
void K3ListView::startDrag | ( | ) | [protected, virtual] |
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 Q3ListView.
Definition at line 1138 of file k3listview.cpp.
bool K3ListView::tabOrderedRenaming | ( | ) | const [slot] |
void K3ListView::takeItem | ( | Q3ListViewItem * | i | ) | [virtual] |
Reimplemented for internal reasons.
Reimplemented from Q3ListView.
Definition at line 2116 of file k3listview.cpp.
QString K3ListView::tooltip | ( | Q3ListViewItem * | item, | |
int | column | |||
) | const [protected, virtual] |
int K3ListView::tooltipColumn | ( | ) | const |
- Returns:
- the column for which tooltips are displayed (or -1 if none set).
- See also:
- setTooltipColumn()
void K3ListView::viewportPaintEvent | ( | QPaintEvent * | e | ) | [protected, virtual] |
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 1910 of file k3listview.cpp.
void K3ListView::viewportResizeEvent | ( | QResizeEvent * | e | ) | [protected, virtual] |
Property Documentation
const QColor & K3ListView::alternateBackground [read, write] |
Definition at line 71 of file k3listview.h.
bool K3ListView::autoOpen [read, write] |
Definition at line 67 of file k3listview.h.
bool K3ListView::dragEnabled [read, write] |
Definition at line 66 of file k3listview.h.
bool K3ListView::dropVisualizer [read, write] |
Definition at line 68 of file k3listview.h.
int K3ListView::dropVisualizerWidth [read, write] |
Definition at line 70 of file k3listview.h.
bool K3ListView::fullWidth [read, write] |
Definition at line 63 of file k3listview.h.
bool K3ListView::itemsMovable [read, write] |
Definition at line 64 of file k3listview.h.
bool K3ListView::itemsRenameable [read, write] |
Definition at line 65 of file k3listview.h.
bool K3ListView::shadeSortColumn [read, write] |
Definition at line 72 of file k3listview.h.
int K3ListView::tooltipColumn [read, write] |
Definition at line 69 of file k3listview.h.
The documentation for this class was generated from the following files: