• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeui
 

tdeui

Public Types | Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | Friends | List of all members
TDEListView Class Reference

#include <tdelistview.h>

Inheritance diagram for TDEListView:
KTimezoneWidget

Public Types

enum  SelectionModeExt {
  Single = TQListView::Single , Multi = TQListView::Multi , Extended = TQListView::Extended , NoSelection = TQListView::NoSelection ,
  FileManager
}
 

Public Slots

virtual void rename (TQListViewItem *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) TDE_DEPRECATED
 
void setSelectionModeExt (SelectionModeExt mode)
 
void setTabOrderedRenaming (bool b)
 
bool tabOrderedRenaming () const
 
virtual void selectAll (bool select)
 

Signals

void executed (TQListViewItem *item)
 
void executed (TQListViewItem *item, const TQPoint &pos, int c)
 
void dropped (TQDropEvent *e, TQListViewItem *after)
 
void dropped (TDEListView *list, TQDropEvent *e, TQListViewItem *after)
 
void dropped (TDEListView *list, TQDropEvent *e, TQListViewItem *parent, TQListViewItem *after)
 
void dropped (TQDropEvent *e, TQListViewItem *parent, TQListViewItem *after)
 
void moved ()
 
void aboutToMove ()
 
void moved (TQListViewItem *item, TQListViewItem *afterFirst, TQListViewItem *afterNow)
 
void moved (TQPtrList< TQListViewItem > &items, TQPtrList< TQListViewItem > &afterFirst, TQPtrList< TQListViewItem > &afterNow)
 
void itemRenamed (TQListViewItem *item, const TQString &str, int col)
 
void itemRenamed (TQListViewItem *item)
 
void menuShortCutPressed (TDEListView *list, TQListViewItem *item)
 
void contextMenu (TDEListView *l, TQListViewItem *i, const TQPoint &p)
 
void itemAdded (TQListViewItem *item)
 
void itemRemoved (TQListViewItem *item)
 
void renameNext (TQListViewItem *item, int col)
 
void renamePrev (TQListViewItem *item, int col)
 

Public Member Functions

 TDEListView (TQWidget *parent=0, const char *name=0)
 
virtual ~TDEListView ()
 
virtual void setAcceptDrops (bool)
 
virtual bool isExecuteArea (const TQPoint &point)
 
bool isExecuteArea (int x)
 
TQPtrList< TQListViewItem > selectedItems () const
 
TQPtrList< TQListViewItem > selectedItems (bool includeHiddenItems) const
 
void moveItem (TQListViewItem *item, TQListViewItem *parent, TQListViewItem *after)
 
TQListViewItem * lastItem () const
 
TQListViewItem * 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 TDE_DEPRECATED
 
bool dropHighlighter () const
 
int dropVisualizerWidth () const
 
SelectionModeExt selectionModeExt () const
 
int itemIndex (const TQListViewItem *item) const
 
TQListViewItem * itemAtIndex (int index)
 
void setFullWidth () TDE_DEPRECATED
 
void setFullWidth (bool fullWidth)
 
bool fullWidth () const
 
virtual int addColumn (const TQString &label, int width=-1)
 
virtual int addColumn (const TQIconSet &iconset, const TQString &label, int width=-1)
 
virtual void removeColumn (int index)
 
void setAlternateBackground (const TQColor &c)
 
const TQColor & alternateBackground () const
 
void saveLayout (TDEConfig *config, const TQString &group) const
 
void restoreLayout (TDEConfig *config, const TQString &group)
 
virtual void setSorting (int column, bool ascending=true)
 
int columnSorted (void) const
 
bool ascendingSort (void) const
 
virtual void takeItem (TQListViewItem *i)
 
void setShadeSortColumn (bool shadeSortColumn)
 
bool shadeSortColumn (void) const
 
void setUseSmallExecuteArea (bool enable)
 
bool useSmallExecuteArea () const
 
void setRenameSettings (const TDEListViewRenameSettings &renSett)
 

Protected Slots

void slotSettingsChanged (int)
 
void slotMouseButtonClicked (int btn, TQListViewItem *item, const TQPoint &pos, int c)
 
void doneEditing (TQListViewItem *item, int row)
 
void renameNextProxy (TQListViewItem *item, int col)
 
void renamePrevProxy (TQListViewItem *item, int col)
 
void cleanDropVisualizer ()
 
void cleanItemHighlighter ()
 
void emitContextMenu (TQListViewItem *, const TQPoint &, int)
 
void emitContextMenu (TDEListView *, TQListViewItem *)
 
void slotOnItem (TQListViewItem *item)
 
void slotOnViewport ()
 
void slotAutoSelect ()
 
void slotDragExpand ()
 
void slotHeaderChanged ()
 

Protected Member Functions

bool below (const TQRect &rect, const TQPoint &p)
 
bool below (TQListViewItem *i, const TQPoint &p)
 
virtual bool event (TQEvent *)
 
void emitExecute (TQListViewItem *item, const TQPoint &pos, int c)
 
virtual void focusInEvent (TQFocusEvent *fe)
 
virtual void focusOutEvent (TQFocusEvent *fe)
 
virtual void leaveEvent (TQEvent *e)
 
virtual TQString tooltip (TQListViewItem *item, int column) const
 
virtual bool showTooltip (TQListViewItem *item, const TQPoint &pos, int column) const
 
virtual void contentsDragMoveEvent (TQDragMoveEvent *event)
 
virtual void contentsMousePressEvent (TQMouseEvent *e)
 
virtual void contentsMouseMoveEvent (TQMouseEvent *e)
 
virtual void contentsMouseDoubleClickEvent (TQMouseEvent *e)
 
virtual void contentsDragLeaveEvent (TQDragLeaveEvent *event)
 
virtual void contentsMouseReleaseEvent (TQMouseEvent *)
 
virtual void contentsDropEvent (TQDropEvent *)
 
virtual void contentsDragEnterEvent (TQDragEnterEvent *)
 
virtual TQDragObject * dragObject ()
 
virtual bool acceptDrag (TQDropEvent *event) const
 
virtual TQRect drawDropVisualizer (TQPainter *p, TQListViewItem *parent, TQListViewItem *after)
 
virtual TQRect drawItemHighlighter (TQPainter *painter, TQListViewItem *item)
 
virtual void startDrag ()
 
virtual void keyPressEvent (TQKeyEvent *)
 
virtual void viewportPaintEvent (TQPaintEvent *)
 
void activateAutomaticSelection ()
 
void deactivateAutomaticSelection ()
 
bool automaticSelection () const
 
virtual void viewportResizeEvent (TQResizeEvent *e)
 
void disableAutoSelection ()
 
void resetAutoSelection ()
 
void resetKeyboardSelectionOperation ()
 
void setActiveMultiSelectItem (TQListViewItem *item)
 
void doubleClicked (TQListViewItem *item, const TQPoint &pos, int c)
 
virtual void movableDropEvent (TQListViewItem *parent, TQListViewItem *afterme)
 
virtual void findDrop (const TQPoint &pos, TQListViewItem *&parent, TQListViewItem *&after)
 
void fileManagerKeyPressEvent (TQKeyEvent *)
 
int depthToPixels (int depth)
 
virtual void virtual_hook (int id, void *data)
 

Friends

class TDEListViewItem
 

Detailed Description

This Widget extends the functionality of TQListView 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 TQListView::clicked() or TQListView::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 TQListView::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(TQDropEvent*)

TDEListView 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 84 of file tdelistview.h.

Member Enumeration Documentation

◆ SelectionModeExt

enum TDEListView::SelectionModeExt

Possible selection modes.

The first four correspond directly to TQListView::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

The combinations work the same with SHIFT instead of CTRL, except that if you start selecting something using SHIFT everything selected before will be deselected first.

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 136 of file tdelistview.h.

Constructor & Destructor Documentation

◆ TDEListView()

TDEListView::TDEListView ( TQWidget *  parent = 0,
const char *  name = 0 
)

Constructor.

The parameters parent and name are handled by TQListView, as usual.

Definition at line 457 of file tdelistview.cpp.

◆ ~TDEListView()

TDEListView::~TDEListView ( )
virtual

Destructor.

Definition at line 501 of file tdelistview.cpp.

Member Function Documentation

◆ aboutToMove

void TDEListView::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 TDEListView calls

See also
moveItem()

◆ acceptDrag()

bool TDEListView::acceptDrag ( TQDropEvent *  event) const
protectedvirtual
Returns
true if the event provides some acceptable format. A common mistake is to forget the "const" in your reimplementation

Definition at line 1459 of file tdelistview.cpp.

◆ activateAutomaticSelection()

void TDEListView::activateAutomaticSelection ( )
protected

In FileManager selection mode: explicitly activate the mode in which the current item is automatically selected.

Definition at line 1530 of file tdelistview.cpp.

◆ addColumn() [1/2]

int TDEListView::addColumn ( const TQIconSet &  iconset,
const TQString &  label,
int  width = -1 
)
virtual

Reimplemented for full width support.

Definition at line 2187 of file tdelistview.cpp.

◆ addColumn() [2/2]

int TDEListView::addColumn ( const TQString &  label,
int  width = -1 
)
virtual

Reimplemented for full width support.

See also
removeColumn()

Definition at line 2177 of file tdelistview.cpp.

◆ alternateBackground()

const TQColor & TDEListView::alternateBackground ( ) const
Returns
the alternate background color
See also
setAlternateBackground()

Definition at line 2208 of file tdelistview.cpp.

◆ ascendingSort()

bool TDEListView::ascendingSort ( void  ) const
Returns
whether the current sort is ascending (or descending)

Definition at line 2321 of file tdelistview.cpp.

◆ automaticSelection()

bool TDEListView::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 1547 of file tdelistview.cpp.

◆ autoOpen()

bool TDEListView::autoOpen ( ) const
Returns
true if AutoOpen is enabled (not implemented currently).
See also
setAutoOpen()

Definition at line 1248 of file tdelistview.cpp.

◆ below() [1/2]

bool TDEListView::below ( const TQRect &  rect,
const TQPoint &  p 
)
inlineprotected

Determine whether a drop on position p would count as being above or below the TQRect rect.

Parameters
rectis the rectangle we examine.
pis the point located in the rectangle, p is assumed to be in viewport coordinates.

Definition at line 764 of file tdelistview.h.

◆ below() [2/2]

bool TDEListView::below ( TQListViewItem *  i,
const TQPoint &  p 
)
inlineprotected

An overloaded version of below(const TQRect&, const TQPoint&).

It differs from the above only in what arguments it takes.

Parameters
ithe item whose rect() is passed to the above function.
pis translated from contents coordinates to viewport coordinates before being passed to the above function.

Definition at line 778 of file tdelistview.h.

◆ cleanDropVisualizer

void TDEListView::cleanDropVisualizer ( )
protectedslot

Repaint the rect where I was drawing the drop line.

Definition at line 1083 of file tdelistview.cpp.

◆ cleanItemHighlighter

void TDEListView::cleanItemHighlighter ( )
protectedslot

Repaint the rect where I was drawing the drop rectangle.

Definition at line 1409 of file tdelistview.cpp.

◆ columnSorted()

int TDEListView::columnSorted ( void  ) const
Returns
the currently sorted column, or -1 if none is sorted

Definition at line 2316 of file tdelistview.cpp.

◆ contentsDragEnterEvent()

void TDEListView::contentsDragEnterEvent ( TQDragEnterEvent *  event)
protectedvirtual

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 1335 of file tdelistview.cpp.

◆ contentsDragLeaveEvent()

void TDEListView::contentsDragLeaveEvent ( TQDragLeaveEvent *  event)
protectedvirtual

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 1076 of file tdelistview.cpp.

◆ contentsDragMoveEvent()

void TDEListView::contentsDragMoveEvent ( TQDragMoveEvent *  event)
protectedvirtual

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 1026 of file tdelistview.cpp.

◆ contentsDropEvent()

void TDEListView::contentsDropEvent ( TQDropEvent *  e)
protectedvirtual

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 950 of file tdelistview.cpp.

◆ contentsMouseDoubleClickEvent()

void TDEListView::contentsMouseDoubleClickEvent ( TQMouseEvent *  e)
protectedvirtual

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 919 of file tdelistview.cpp.

◆ contentsMouseMoveEvent()

void TDEListView::contentsMouseMoveEvent ( TQMouseEvent *  e)
protectedvirtual

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 846 of file tdelistview.cpp.

◆ contentsMousePressEvent()

void TDEListView::contentsMousePressEvent ( TQMouseEvent *  e)
protectedvirtual

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 799 of file tdelistview.cpp.

◆ contentsMouseReleaseEvent()

void TDEListView::contentsMouseReleaseEvent ( TQMouseEvent *  e)
protectedvirtual

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 886 of file tdelistview.cpp.

◆ contextMenu

void TDEListView::contextMenu ( TDEListView *  l,
TQListViewItem *  i,
const TQPoint &  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
lis this listview.
iis the item for which the menu should be shown. May be 0L.
pis the point at which the menu should be shown.

◆ createChildren()

bool TDEListView::createChildren ( ) const

For future expansions.

Do not use.

Deprecated:

Definition at line 1469 of file tdelistview.cpp.

◆ deactivateAutomaticSelection()

void TDEListView::deactivateAutomaticSelection ( )
protected

In FileManager selection mode: explicitly deactivate the mode in which the current item is automatically selected.

Definition at line 1542 of file tdelistview.cpp.

◆ depthToPixels()

int TDEListView::depthToPixels ( int  depth)
protected

Convert the depth of an item into its indentation in pixels.

Definition at line 1093 of file tdelistview.cpp.

◆ disableAutoSelection()

void TDEListView::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()
Since
3.2

Definition at line 2334 of file tdelistview.cpp.

◆ doneEditing

void TDEListView::doneEditing ( TQListViewItem *  item,
int  row 
)
protectedslot

Definition at line 1442 of file tdelistview.cpp.

◆ doubleClicked()

void TDEListView::doubleClicked ( TQListViewItem *  item,
const TQPoint &  pos,
int  c 
)
protected
Deprecated:
This is just here for binary compatibility. Use the signal in TQListView instead.

Definition at line 2353 of file tdelistview.cpp.

◆ dragEnabled()

bool TDEListView::dragEnabled ( ) const
Returns
whether dragging is enabled. False by default.
See also
setDragEnabled()

Definition at line 1238 of file tdelistview.cpp.

◆ dragObject()

TQDragObject * TDEListView::dragObject ( )
protectedvirtual
Returns
a dragobject encoding the current selection.
See also
setDragEnabled()

Definition at line 1203 of file tdelistview.cpp.

◆ drawDropVisualizer()

TQRect TDEListView::drawDropVisualizer ( TQPainter *  p,
TQListViewItem *  parent,
TQListViewItem *  after 
)
protectedvirtual

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 1346 of file tdelistview.cpp.

◆ drawItemHighlighter()

TQRect TDEListView::drawItemHighlighter ( TQPainter *  painter,
TQListViewItem *  item 
)
protectedvirtual

Paint the drag rectangle.

If painter is null, don't try to :)

Returns
the rectangle that you painted to.

Definition at line 1393 of file tdelistview.cpp.

◆ dropHighlighter()

bool TDEListView::dropHighlighter ( ) const
Returns
true if drawing of the drop-highlighter has been enabled. False by default.
See also
setDropHighlighter()

Definition at line 1490 of file tdelistview.cpp.

◆ dropped [1/4]

void TDEListView::dropped ( TDEListView *  list,
TQDropEvent *  e,
TQListViewItem *  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
listis the listview
eis the drop event itself (it has already been accepted)
afteris the item after which the drop occurred (or 0L, if the drop was above all items

◆ dropped [2/4]

void TDEListView::dropped ( TDEListView *  list,
TQDropEvent *  e,
TQListViewItem *  parent,
TQListViewItem *  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
listis the listview
eis the drop event itself (it has already been accepted)
parentthe item that is to be the parent of the new item
afteris the item after which the drop occurred (or 0L, if the drop was above all items

◆ dropped [3/4]

void TDEListView::dropped ( TQDropEvent *  e,
TQListViewItem *  after 
)
signal

This signal gets emitted whenever something acceptable is dropped onto the listview.

Parameters
eis the drop event itself (it has already been accepted)
afteris the item after which the drop occurred (or 0L, if the drop was above all items)
See also
acceptDrop()

◆ dropped [4/4]

void TDEListView::dropped ( TQDropEvent *  e,
TQListViewItem *  parent,
TQListViewItem *  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
eis the drop event itself (it has already been accepted)
parentthe item that is to be the parent of the new item
afteris the item after which the drop occurred (or 0L, if the drop was above all items

◆ dropVisualizer()

bool TDEListView::dropVisualizer ( ) const
Returns
true if drawing of the drop-visualizer has been enabled. True by default.
See also
setDropVisualizer()

Definition at line 1253 of file tdelistview.cpp.

◆ dropVisualizerWidth()

int TDEListView::dropVisualizerWidth ( ) const

The dropVisualizerWidth defaults to 4.

See also
setDropVisualizerWidth()
Returns
the current width of the drop-visualizer.

Definition at line 2128 of file tdelistview.cpp.

◆ emitContextMenu [1/2]

void TDEListView::emitContextMenu ( TDEListView *  ,
TQListViewItem *  i 
)
protectedslot

Emit the contextMenu signal.

This slot is for key presses.

Definition at line 2105 of file tdelistview.cpp.

◆ emitContextMenu [2/2]

void TDEListView::emitContextMenu ( TQListViewItem *  i,
const TQPoint &  p,
int   
)
protectedslot

Emit the contextMenu signal.

This slot is for mouse actions.

Definition at line 2117 of file tdelistview.cpp.

◆ emitExecute()

void TDEListView::emitExecute ( TQListViewItem *  item,
const TQPoint &  pos,
int  c 
)
protected

Emit signal executed.

Definition at line 718 of file tdelistview.cpp.

◆ event()

bool TDEListView::event ( TQEvent *  e)
protectedvirtual

Reimplemented to reload the alternate background in palette changes.

Definition at line 791 of file tdelistview.cpp.

◆ executed [1/2]

void TDEListView::executed ( TQListViewItem *  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
itemis the pointer to the executed listview item.

Note that you may not delete any TQListViewItem objects in slots connected to this signal.

◆ executed [2/2]

void TDEListView::executed ( TQListViewItem *  item,
const TQPoint &  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
itemis the pointer to the executed listview item.
posis the position where the user has clicked
cis the column into which the user clicked.

Note that you may not delete any TQListViewItem objects in slots connected to this signal.

◆ fileManagerKeyPressEvent()

void TDEListView::fileManagerKeyPressEvent ( TQKeyEvent *  e)
protected

A special keyPressEvent (for FileManager selection mode).

Definition at line 1566 of file tdelistview.cpp.

◆ findDrop()

void TDEListView::findDrop ( const TQPoint &  pos,
TQListViewItem *&  parent,
TQListViewItem *&  after 
)
protectedvirtual

Where is the nearest TQListViewItem 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 1098 of file tdelistview.cpp.

◆ focusInEvent()

void TDEListView::focusInEvent ( TQFocusEvent *  fe)
protectedvirtual

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 746 of file tdelistview.cpp.

◆ focusOutEvent()

void TDEListView::focusOutEvent ( TQFocusEvent *  fe)
protectedvirtual

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 762 of file tdelistview.cpp.

◆ fullWidth()

bool TDEListView::fullWidth ( ) const

Returns whether the last column is set to fit the available width.

See also
setFullWidth()

Definition at line 2172 of file tdelistview.cpp.

◆ isExecuteArea() [1/2]

bool TDEListView::isExecuteArea ( const TQPoint &  point)
virtual

This function determines whether the given coordinates are within the execute area.

The execute area is the part of a TQListViewItem where mouse clicks or double clicks respectively generate a executed() signal. Depending on TQListView::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 506 of file tdelistview.cpp.

◆ isExecuteArea() [2/2]

bool TDEListView::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 516 of file tdelistview.cpp.

◆ isRenameable()

bool TDEListView::isRenameable ( int  column) const
Returns
true if column is renamable.
See also
setRenameable()

Definition at line 1428 of file tdelistview.cpp.

◆ itemAtIndex()

TQListViewItem * TDEListView::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 2089 of file tdelistview.cpp.

◆ itemIndex()

int TDEListView::itemIndex ( const TQListViewItem *  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 2070 of file tdelistview.cpp.

◆ itemRenamed [1/2]

void TDEListView::itemRenamed ( TQListViewItem *  item)
signal

Same as above, but without the extra information.

◆ itemRenamed [2/2]

void TDEListView::itemRenamed ( TQListViewItem *  item,
const TQString &  str,
int  col 
)
signal

This signal gets emitted when an item is renamed via in-place renaming.

Parameters
itemis the renamed item.
stris the new value of column col.
colis the renamed column.

◆ itemsMovable()

bool TDEListView::itemsMovable ( ) const
Returns
if it is legal to move items in the list view. True by default.
See also
setDragEnabled()
setItemsMovable()

Definition at line 1217 of file tdelistview.cpp.

◆ itemsRenameable()

bool TDEListView::itemsRenameable ( ) const
Returns
whether inplace-renaming has been enabled. False by default.
See also
setItemsRenameable()

Definition at line 1227 of file tdelistview.cpp.

◆ keyPressEvent()

void TDEListView::keyPressEvent ( TQKeyEvent *  e)
protectedvirtual

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 1515 of file tdelistview.cpp.

◆ lastChild()

TQListViewItem * TDEListView::lastChild ( ) const
Returns
the last child of this listview.
See also
lastItem()

Definition at line 1167 of file tdelistview.cpp.

◆ lastItem()

TQListViewItem * TDEListView::lastItem ( ) const
Returns
the last item (not child!) of this listview.
See also
lastChild()

Definition at line 1177 of file tdelistview.cpp.

◆ leaveEvent()

void TDEListView::leaveEvent ( TQEvent *  e)
protectedvirtual

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 784 of file tdelistview.cpp.

◆ menuShortCutPressed

void TDEListView::menuShortCutPressed ( TDEListView *  list,
TQListViewItem *  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 (TDEListView*, TQListViewItem*, const TQPoint&) to correctly handle showing context menus regardless of settings.

Parameters
listis this listview.
itemis the currentItem() at the time the key was pressed. May be 0L.

◆ movableDropEvent()

void TDEListView::movableDropEvent ( TQListViewItem *  parent,
TQListViewItem *  afterme 
)
protectedvirtual

Handle dropEvent when itemsMovable() is set to true.

Definition at line 976 of file tdelistview.cpp.

◆ moved [1/3]

void TDEListView::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.

◆ moved [2/3]

void TDEListView::moved ( TQListViewItem *  item,
TQListViewItem *  afterFirst,
TQListViewItem *  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
itemthe item that was moved
afterFirstthe item that parameter item was in before the move, in the list
afterNowthe item it's currently after.

◆ moved [3/3]

void TDEListView::moved ( TQPtrList< TQListViewItem > &  items,
TQPtrList< TQListViewItem > &  afterFirst,
TQPtrList< TQListViewItem > &  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.

◆ moveItem()

void TDEListView::moveItem ( TQListViewItem *  item,
TQListViewItem *  parent,
TQListViewItem *  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 1305 of file tdelistview.cpp.

◆ removeColumn()

void TDEListView::removeColumn ( int  index)
virtual

Reimplemented for full width support.

See also
addColumn()

Definition at line 2197 of file tdelistview.cpp.

◆ rename

void TDEListView::rename ( TQListViewItem *  item,
int  c 
)
virtualslot

Rename column c of item.

Definition at line 1419 of file tdelistview.cpp.

◆ renameLineEdit()

KLineEdit * TDEListView::renameLineEdit ( ) const
Returns
the lineedit used for inline renaming. Use that to setup a TDECompletion or TQValidator for the lineedit
Since
3.2

Definition at line 1187 of file tdelistview.cpp.

◆ renameNext

void TDEListView::renameNext ( TQListViewItem *  item,
int  col 
)
signal

This signal is emitted when item renaming is completed by a TAB.

It signals the receiver that the sender would like to start renaming the next item. This is not hardcoded in TDEListView because the next item is application depended (for example it could be the next column or the next row or something completely different)

Parameters
itemis the renamed item.
colis the renamed column.
Since
14.0

◆ renameNextProxy

void TDEListView::renameNextProxy ( TQListViewItem *  item,
int  col 
)
protectedslot

Definition at line 1448 of file tdelistview.cpp.

◆ renamePrev

void TDEListView::renamePrev ( TQListViewItem *  item,
int  col 
)
signal

This signal is emitted when item renaming is completed by a Shift+TAB.

It signals the receiver that the sender would like to start renaming the previous item. This is not hardcoded in TDEListView because the next item is application depended (for example it could be the next column or the next row or something completely different)

Parameters
itemis the renamed item.
colis the renamed column.
Since
14.0

◆ renamePrevProxy

void TDEListView::renamePrevProxy ( TQListViewItem *  item,
int  col 
)
protectedslot

Definition at line 1453 of file tdelistview.cpp.

◆ resetAutoSelection()

void TDEListView::resetAutoSelection ( )
protected

Reset AutoSelection to the system wide setting.

See also
disableAutoSelection()
Since
3.2

Definition at line 2344 of file tdelistview.cpp.

◆ resetKeyboardSelectionOperation()

void TDEListView::resetKeyboardSelectionOperation ( )
protected

In FileManager selection mode: reset the keyboard selection operation; e.g.

after completion of a mouse rubberband operation

Since
14.0

Definition at line 1552 of file tdelistview.cpp.

◆ restoreLayout()

void TDEListView::restoreLayout ( TDEConfig *  config,
const TQString &  group 
)

Reads the list view's layout from a TDEConfig group as stored with saveLayout.

Parameters
configthe TDEConfig object to read from
groupthe config group to use

Definition at line 2248 of file tdelistview.cpp.

◆ saveLayout()

void TDEListView::saveLayout ( TDEConfig *  config,
const TQString &  group 
) const

Saves the list view's layout (column widtsh, column order, sort column) to a TDEConfig group.

Parameters
configthe TDEConfig object to write to
groupthe config group to use

Definition at line 2230 of file tdelistview.cpp.

◆ selectAll

void TDEListView::selectAll ( bool  select)
virtualslot

Override TQListView selectAll() so that filtered items are not selected.

Since
14.0

If select is TRUE, all the items get selected; otherwise all the items get unselected. This only works in the selection modes Multi and Extended. In Single and NoSelection mode the selection of the current item is just set to select.

Definition at line 2578 of file tdelistview.cpp.

◆ selectedItems() [1/2]

TQPtrList< TQListViewItem > TDEListView::selectedItems ( ) const
Returns
a list containing the currently selected items.
Deprecated:

Definition at line 1263 of file tdelistview.cpp.

◆ selectedItems() [2/2]

TQPtrList< TQListViewItem > TDEListView::selectedItems ( bool  includeHiddenItems) const
Returns
a list containing the currently selected items.
Parameters
includeHiddenItemsSet 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
Since
3.4

Definition at line 1268 of file tdelistview.cpp.

◆ selectionModeExt()

TDEListView::SelectionModeExt TDEListView::selectionModeExt ( ) const
Returns
the "extended" selection mode of this listview.
See also
SelectionModeExt
setSelectionModeExt

Definition at line 2065 of file tdelistview.cpp.

◆ setAcceptDrops()

void TDEListView::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 2122 of file tdelistview.cpp.

◆ setActiveMultiSelectItem()

void TDEListView::setActiveMultiSelectItem ( TQListViewItem *  item)
protected

In FileManager selection mode: set the current keyboard cursor selection item; e.g.

during a mouse rubberband operation

Parameters
directiondown is 1, up is -1
Since
14.0

Definition at line 1558 of file tdelistview.cpp.

◆ setAlternateBackground()

void TDEListView::setAlternateBackground ( const TQColor &  c)

sets the alternate background background color.

This only has an effect if the items are TDEListViewItems

Parameters
cthe color to use for every other item. Set to an invalid color to disable alternate colors.
See also
alternateBackground()

Definition at line 2213 of file tdelistview.cpp.

◆ setAutoOpen

void TDEListView::setAutoOpen ( bool  b)
virtualslot

Enable/Disable AutoOpen (not implemented currently).

Definition at line 1243 of file tdelistview.cpp.

◆ setCreateChildren

void TDEListView::setCreateChildren ( bool  b)
virtualslot

For future expansions.

Do not use.

Deprecated:

Definition at line 1464 of file tdelistview.cpp.

◆ setDragEnabled

void TDEListView::setDragEnabled ( bool  b)
virtualslot

Enable/Disable the dragging of items.

It is disabled by default.

Definition at line 1233 of file tdelistview.cpp.

◆ setDropHighlighter

void TDEListView::setDropHighlighter ( bool  b)
virtualslot

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 1485 of file tdelistview.cpp.

◆ setDropVisualizer

void TDEListView::setDropVisualizer ( bool  b)
virtualslot

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 1258 of file tdelistview.cpp.

◆ setDropVisualizerWidth

void TDEListView::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 1341 of file tdelistview.cpp.

◆ setFullWidth() [1/2]

void TDEListView::setFullWidth ( )
Deprecated:
See also
setFullWidth()

Definition at line 2161 of file tdelistview.cpp.

◆ setFullWidth() [2/2]

void TDEListView::setFullWidth ( bool  fullWidth)

Let the last column fit exactly all the available width.

See also
fullWidth()

Definition at line 2166 of file tdelistview.cpp.

◆ setItemsMovable

void TDEListView::setItemsMovable ( bool  b)
virtualslot

Set whether items in the list view can be moved.

It is enabled by default.

See also
itemsMovable()

Definition at line 1212 of file tdelistview.cpp.

◆ setItemsRenameable

void TDEListView::setItemsRenameable ( bool  b)
virtualslot

Enables inplace-renaming of items.

It is disabled by default.

See also
itemsRenameable()
setRenameable()

Definition at line 1222 of file tdelistview.cpp.

◆ setRenameable

void TDEListView::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 TDEListView, and override rename() and call only call it if you want the item to be renamed.

Definition at line 1433 of file tdelistview.cpp.

◆ setRenameSettings()

void TDEListView::setRenameSettings ( const TDEListViewRenameSettings &  renSett)

Allows to set the rename settings for the TDEListViewLineEdit editor.

It is possible to select whether to move or not the item selection when the rename operation is completed and which shortcuts to use to move to the next or previous item.

Parameters
renSettA TDEListViewRenameSettings object containing the specified settings.
Since
14.0

Definition at line 2627 of file tdelistview.cpp.

◆ setSelectionModeExt

void TDEListView::setSelectionModeExt ( SelectionModeExt  mode)
slot

Set the selection mode.

A different name was chosen to avoid API-clashes with TQListView::setSelectionMode().

Definition at line 2042 of file tdelistview.cpp.

◆ setShadeSortColumn()

void TDEListView::setShadeSortColumn ( bool  shadeSortColumn)

Set to true if the currently sorted column should be drawn shaded.

Defaults to true

Parameters
shadeSortColumnTrue if sort column should be shaded.
Since
3.4

Definition at line 2219 of file tdelistview.cpp.

◆ setSorting()

void TDEListView::setSorting ( int  column,
bool  ascending = true 
)
virtual

Reimplemented to remember the current sort column and order.

Parameters
columnis the column to be sorted, or -1 to sort in order of insertion
ascendingwhether to sort ascending (or descending)

Definition at line 2283 of file tdelistview.cpp.

◆ setTabOrderedRenaming

void TDEListView::setTabOrderedRenaming ( bool  b)
slot

Enable/disable tabbing between editable cells.

Since
3.1

Definition at line 1505 of file tdelistview.cpp.

◆ setTooltipColumn

void TDEListView::setTooltipColumn ( int  column)
virtualslot

Set which column should be used for automatic tooltips.

Parameters
columnis the column for which tooltips will be shown. Set -1 to disable this feature.

Definition at line 1480 of file tdelistview.cpp.

◆ setUseSmallExecuteArea()

void TDEListView::setUseSmallExecuteArea ( bool  enable)
Parameters
enableTRUE if small execute area should be used (e.g. KonqListViewItem), FALSE if not. The default is FALSE to match TQt3 behaviour.
Since
14.0

Definition at line 2617 of file tdelistview.cpp.

◆ shadeSortColumn()

bool TDEListView::shadeSortColumn ( void  ) const

See if the sort column should be drawn shaded.

Returns
true if the sort column should be shaded
Since
3.4

Definition at line 2225 of file tdelistview.cpp.

◆ showTooltip()

bool TDEListView::showTooltip ( TQListViewItem *  item,
const TQPoint &  pos,
int  column 
) const
protectedvirtual
Returns
whether the tooltip for column of item shall be shown at point pos.

Definition at line 1495 of file tdelistview.cpp.

◆ slotAutoSelect

void TDEListView::slotAutoSelect ( )
protectedslot

Process AutoSelection.

Definition at line 629 of file tdelistview.cpp.

◆ slotDragExpand

void TDEListView::slotDragExpand ( )
protectedslot

Definition at line 1070 of file tdelistview.cpp.

◆ slotHeaderChanged

void TDEListView::slotHeaderChanged ( )
protectedslot

Reacts to header changes in full width mode.

Definition at line 705 of file tdelistview.cpp.

◆ slotMouseButtonClicked

void TDEListView::slotMouseButtonClicked ( int  btn,
TQListViewItem *  item,
const TQPoint &  pos,
int  c 
)
protectedslot

Definition at line 943 of file tdelistview.cpp.

◆ slotOnItem

void TDEListView::slotOnItem ( TQListViewItem *  item)
protectedslot

Accessory slot for AutoSelect.

Definition at line 562 of file tdelistview.cpp.

◆ slotOnViewport

void TDEListView::slotOnViewport ( )
protectedslot

Accessory slot for AutoSelect/ChangeCursorOverItem.

Definition at line 571 of file tdelistview.cpp.

◆ slotSettingsChanged

void TDEListView::slotSettingsChanged ( int  category)
protectedslot

Update internal settings whenever the global ones change.

Definition at line 580 of file tdelistview.cpp.

◆ startDrag()

void TDEListView::startDrag ( )
protectedvirtual

This method calls dragObject() and starts the drag.

Reimplement it to do fancy stuff like setting a pixmap or using a non-default DragMode

Definition at line 1192 of file tdelistview.cpp.

◆ tabOrderedRenaming

bool TDEListView::tabOrderedRenaming ( ) const
slot

Returns whether tab ordered renaming is enabled.

Since
3.1

Definition at line 1510 of file tdelistview.cpp.

◆ takeItem()

void TDEListView::takeItem ( TQListViewItem *  i)
virtual

Reimplemented for internal reasons.

Definition at line 2326 of file tdelistview.cpp.

◆ tooltip()

TQString TDEListView::tooltip ( TQListViewItem *  item,
int  column 
) const
protectedvirtual
Returns
the tooltip for column of item.

Definition at line 1500 of file tdelistview.cpp.

◆ tooltipColumn()

int TDEListView::tooltipColumn ( ) const
Returns
the column for which tooltips are displayed (or -1 if none set).
See also
setTooltipColumn()

Definition at line 1475 of file tdelistview.cpp.

◆ useSmallExecuteArea()

bool TDEListView::useSmallExecuteArea ( ) const
Returns
TRUE if small execute area is in use, FALSE if not.
Since
14.0

Definition at line 2622 of file tdelistview.cpp.

◆ viewportPaintEvent()

void TDEListView::viewportPaintEvent ( TQPaintEvent *  e)
protectedvirtual

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 2134 of file tdelistview.cpp.

◆ viewportResizeEvent()

void TDEListView::viewportResizeEvent ( TQResizeEvent *  e)
protectedvirtual

Reimplemented for setFullWidth()

Definition at line 2203 of file tdelistview.cpp.

◆ virtual_hook()

void TDEListView::virtual_hook ( int  id,
void *  data 
)
protectedvirtual

Definition at line 2632 of file tdelistview.cpp.

Friends And Related Function Documentation

◆ TDEListViewItem

friend class TDEListViewItem
friend

Definition at line 86 of file tdelistview.h.


The documentation for this class was generated from the following files:
  • tdelistview.h
  • tdelistview.cpp

tdeui

Skip menu "tdeui"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdeui

Skip menu "tdeui"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeui by doxygen 1.9.4
This website is maintained by Timothy Pearson.