libyui-qt  2.47.1.1
QY2ListView Class Reference

Enhanced QTreeWidget. More...

#include <QY2ListView.h>

Inheritance diagram for QY2ListView:
Collaboration diagram for QY2ListView:

Public Slots

virtual void selectSomething ()
 Select a list entry (if there is any). More...
 
virtual void clear ()
 Reimplemented from Q3ListView: Adjust header sizes after clearing contents.
 
void updateItemStates ()
 Update the status display of all list entries: Call QY2ListViewItem::updateStatus() for each item. More...
 
void updateItemData ()
 Update the status display of all list entries: Call QY2ListViewItem::updateData() for each item. More...
 
void saveColumnWidths ()
 Save the current column widths.
 
void restoreColumnWidths ()
 Restore the column widths to what was saved previously with saveColumnWidths().
 

Signals

void columnClicked (int button, QTreeWidgetItem *item, int col, const QPoint &pos)
 Emitted for mouse clicks on an item.
 
void columnDoubleClicked (int button, QTreeWidgetItem *item, int col, const QPoint &pos)
 Emitted for mouse double clicks on an item.
 

Public Member Functions

 QY2ListView (QWidget *parent)
 Constructor.
 
virtual ~QY2ListView ()
 Destructor.
 
virtual QString toolTip (QTreeWidgetItem *item, int column)
 Returns a tool tip text for a specific column of a list item. More...
 
bool sortByInsertionSequence () const
 Returns 'true' if the sort order should always be the item insertion order, 'false' if the user can change the sort order by clicking on a column header.
 
virtual void setSortByInsertionSequence (bool sortByInsertionSequence)
 Enforce sorting by item insertion order (true) or let user change sorting by clicking on a column header (false).
 
int nextSerial ()
 Returns the next free serial number for items that want to be ordered in insertion sequence.
 
virtual QSize minimumSizeHint () const
 Returns the minimum size required for this widget. More...
 
virtual bool eventFilter (QObject *obj, QEvent *event)
 Event filter - inherited from QWidget.
 

Protected Slots

void columnWidthChanged (int col, int oldSize, int newSize)
 Internal: Handle manual column resize. More...
 
void treeExpanded (QTreeWidgetItem *listViewItem)
 Internal notification that a tree item has been expanded.
 
void treeCollapsed (QTreeWidgetItem *listViewItem)
 Internal notification that a tree item has been collapsed.
 

Protected Member Functions

virtual void mousePressEvent (QMouseEvent *e)
 Handle mouse clicks. More...
 
virtual void mouseReleaseEvent (QMouseEvent *)
 Handle mouse clicks. More...
 
virtual void mouseDoubleClickEvent (QMouseEvent *)
 Handle mouse clicks. More...
 

Protected Attributes

QTreeWidgetItem * _mousePressedItem
 
int _mousePressedCol
 
Qt::MouseButton _mousePressedButton
 
std::vector< int > _savedColumnWidth
 
bool _sortByInsertionSequence
 
int _nextSerial
 
QY2ListViewToolTip * _toolTip
 
bool _mouseButton1PressedInHeader
 
bool _finalSizeChangeExpected
 

Detailed Description

Enhanced QTreeWidget.

Definition at line 47 of file QY2ListView.h.

Member Function Documentation

void QY2ListView::columnWidthChanged ( int  col,
int  oldSize,
int  newSize 
)
protectedslot

Internal: Handle manual column resize.

Save the user's preferred sizes so they don't get overwritten each time the list is cleared and filled with new contents.

Definition at line 289 of file QY2ListView.cc.

Here is the call graph for this function:

QSize QY2ListView::minimumSizeHint ( ) const
virtual

Returns the minimum size required for this widget.

Inherited from QWidget.

Definition at line 348 of file QY2ListView.cc.

void QY2ListView::mouseDoubleClickEvent ( QMouseEvent *  ev)
protectedvirtual

Handle mouse clicks.

Reimplemented from QScrollView.

Definition at line 267 of file QY2ListView.cc.

void QY2ListView::mousePressEvent ( QMouseEvent *  e)
protectedvirtual

Handle mouse clicks.

Reimplemented from QScrollView.

Definition at line 212 of file QY2ListView.cc.

void QY2ListView::mouseReleaseEvent ( QMouseEvent *  ev)
protectedvirtual

Handle mouse clicks.

Reimplemented from QScrollView.

Definition at line 237 of file QY2ListView.cc.

void QY2ListView::selectSomething ( )
virtualslot

Select a list entry (if there is any).

Usually this will be the first list entry, but don't rely on that - this might change without notice. Emits signal selectionChanged().

Definition at line 82 of file QY2ListView.cc.

QString QY2ListView::toolTip ( QTreeWidgetItem *  item,
int  column 
)
virtual

Returns a tool tip text for a specific column of a list item.

'column' is -1 if the mouse pointer is in the tree indentation area.

This default implementation tries to call QY2ListViewItem::toolTip( column ) or QY2CheckListItem::toolTip( column ), respectively if 'item' is a subclass of either.

Derived classes may handle this differently.

Definition at line 144 of file QY2ListView.cc.

Here is the call graph for this function:

void QY2ListView::updateItemData ( )
slot

Update the status display of all list entries: Call QY2ListViewItem::updateData() for each item.

This is an expensive operation.

Definition at line 127 of file QY2ListView.cc.

Here is the call graph for this function:

void QY2ListView::updateItemStates ( )
slot

Update the status display of all list entries: Call QY2ListViewItem::updateStatus() for each item.

This is an expensive operation.

Definition at line 110 of file QY2ListView.cc.

Here is the call graph for this function:


The documentation for this class was generated from the following files: