Eneboo - Documentación para desarrolladores
Tipos públicos | Slots públicos | Señales | Métodos públicos | Slots protegidos | Métodos protegidos | Propiedades | Amigas
Referencia de la Clase QIconView

The QIconView class provides an area with movable labelled icons. Más...

#include <qiconview.h>

Diagrama de herencias de QIconView
QScrollView QScrollView QFrame QFrame QFrame QFrame QWidget QWidget QWidget QWidget QWidget QWidget QWidget QWidget

Lista de todos los miembros.

Tipos públicos

enum  SelectionMode {
  Single = 0, Multi, Extended, NoSelection,
  Single = 0, Multi, Extended, NoSelection
}
enum  Arrangement { LeftToRight = 0, TopToBottom, LeftToRight = 0, TopToBottom }
enum  ResizeMode { Fixed = 0, Adjust, Fixed = 0, Adjust }
enum  ItemTextPos { Bottom = 0, Right, Bottom = 0, Right }
enum  SelectionMode {
  Single = 0, Multi, Extended, NoSelection,
  Single = 0, Multi, Extended, NoSelection
}
enum  Arrangement { LeftToRight = 0, TopToBottom, LeftToRight = 0, TopToBottom }
enum  ResizeMode { Fixed = 0, Adjust, Fixed = 0, Adjust }
enum  ItemTextPos { Bottom = 0, Right, Bottom = 0, Right }

Slots públicos

virtual void arrangeItemsInGrid (const QSize &grid, bool update=TRUE)
virtual void arrangeItemsInGrid (bool update=TRUE)
virtual void setContentsPos (int x, int y)
virtual void updateContents ()
virtual void arrangeItemsInGrid (const QSize &grid, bool update=TRUE)
virtual void arrangeItemsInGrid (bool update=TRUE)
virtual void setContentsPos (int x, int y)
virtual void updateContents ()

Señales

void selectionChanged ()
void selectionChanged (QIconViewItem *item)
void currentChanged (QIconViewItem *item)
void clicked (QIconViewItem *)
void clicked (QIconViewItem *, const QPoint &)
void pressed (QIconViewItem *)
void pressed (QIconViewItem *, const QPoint &)
void doubleClicked (QIconViewItem *item)
void returnPressed (QIconViewItem *item)
void rightButtonClicked (QIconViewItem *item, const QPoint &pos)
void rightButtonPressed (QIconViewItem *item, const QPoint &pos)
void mouseButtonPressed (int button, QIconViewItem *item, const QPoint &pos)
void mouseButtonClicked (int button, QIconViewItem *item, const QPoint &pos)
void contextMenuRequested (QIconViewItem *item, const QPoint &pos)
void dropped (QDropEvent *e, const QValueList< QIconDragItem > &lst)
void moved ()
void onItem (QIconViewItem *item)
void onViewport ()
void itemRenamed (QIconViewItem *item, const QString &)
void itemRenamed (QIconViewItem *item)
void selectionChanged ()
void selectionChanged (QIconViewItem *item)
void currentChanged (QIconViewItem *item)
void clicked (QIconViewItem *)
void clicked (QIconViewItem *, const QPoint &)
void pressed (QIconViewItem *)
void pressed (QIconViewItem *, const QPoint &)
void doubleClicked (QIconViewItem *item)
void returnPressed (QIconViewItem *item)
void rightButtonClicked (QIconViewItem *item, const QPoint &pos)
void rightButtonPressed (QIconViewItem *item, const QPoint &pos)
void mouseButtonPressed (int button, QIconViewItem *item, const QPoint &pos)
void mouseButtonClicked (int button, QIconViewItem *item, const QPoint &pos)
void contextMenuRequested (QIconViewItem *item, const QPoint &pos)
void dropped (QDropEvent *e, const QValueList< QIconDragItem > &lst)
void moved ()
void onItem (QIconViewItem *item)
void onViewport ()
void itemRenamed (QIconViewItem *item, const QString &)
void itemRenamed (QIconViewItem *item)

Métodos públicos

 QIconView (QWidget *parent=0, const char *name=0, WFlags f=0)
virtual ~QIconView ()
virtual void insertItem (QIconViewItem *item, QIconViewItem *after=0L)
virtual void takeItem (QIconViewItem *item)
int index (const QIconViewItem *item) const
QIconViewItemfirstItem () const
QIconViewItemlastItem () const
QIconViewItemcurrentItem () const
virtual void setCurrentItem (QIconViewItem *item)
virtual void setSelected (QIconViewItem *item, bool s, bool cb=FALSE)
uint count () const
virtual void showEvent (QShowEvent *)
virtual void setSelectionMode (SelectionMode m)
SelectionMode selectionMode () const
QIconViewItemfindItem (const QPoint &pos) const
QIconViewItemfindItem (const QString &text, ComparisonFlags compare=BeginsWith) const
virtual void selectAll (bool select)
virtual void clearSelection ()
virtual void invertSelection ()
virtual void repaintItem (QIconViewItem *item)
void repaintSelectedItems ()
void ensureItemVisible (QIconViewItem *item)
QIconViewItemfindFirstVisibleItem (const QRect &r) const
QIconViewItemfindLastVisibleItem (const QRect &r) const
virtual void clear ()
virtual void setGridX (int rx)
virtual void setGridY (int ry)
int gridX () const
int gridY () const
virtual void setSpacing (int sp)
int spacing () const
virtual void setItemTextPos (ItemTextPos pos)
ItemTextPos itemTextPos () const
virtual void setItemTextBackground (const QBrush &b)
QBrush itemTextBackground () const
virtual void setArrangement (Arrangement am)
Arrangement arrangement () const
virtual void setResizeMode (ResizeMode am)
ResizeMode resizeMode () const
virtual void setMaxItemWidth (int w)
int maxItemWidth () const
virtual void setMaxItemTextLength (int w)
int maxItemTextLength () const
virtual void setAutoArrange (bool b)
bool autoArrange () const
virtual void setShowToolTips (bool b)
bool showToolTips () const
void setSorting (bool sort, bool ascending=TRUE)
bool sorting () const
bool sortDirection () const
virtual void setItemsMovable (bool b)
bool itemsMovable () const
virtual void setWordWrapIconText (bool b)
bool wordWrapIconText () const
bool eventFilter (QObject *o, QEvent *)
QSize minimumSizeHint () const
QSize sizeHint () const
virtual void sort (bool ascending=TRUE)
virtual void setFont (const QFont &)
virtual void setPalette (const QPalette &)
bool isRenaming () const
 QIconView (QWidget *parent=0, const char *name=0, WFlags f=0)
virtual ~QIconView ()
virtual void insertItem (QIconViewItem *item, QIconViewItem *after=0L)
virtual void takeItem (QIconViewItem *item)
int index (const QIconViewItem *item) const
QIconViewItemfirstItem () const
QIconViewItemlastItem () const
QIconViewItemcurrentItem () const
virtual void setCurrentItem (QIconViewItem *item)
virtual void setSelected (QIconViewItem *item, bool s, bool cb=FALSE)
uint count () const
virtual void showEvent (QShowEvent *)
virtual void setSelectionMode (SelectionMode m)
SelectionMode selectionMode () const
QIconViewItemfindItem (const QPoint &pos) const
QIconViewItemfindItem (const QString &text, ComparisonFlags compare=BeginsWith) const
virtual void selectAll (bool select)
virtual void clearSelection ()
virtual void invertSelection ()
virtual void repaintItem (QIconViewItem *item)
void repaintSelectedItems ()
void ensureItemVisible (QIconViewItem *item)
QIconViewItemfindFirstVisibleItem (const QRect &r) const
QIconViewItemfindLastVisibleItem (const QRect &r) const
virtual void clear ()
virtual void setGridX (int rx)
virtual void setGridY (int ry)
int gridX () const
int gridY () const
virtual void setSpacing (int sp)
int spacing () const
virtual void setItemTextPos (ItemTextPos pos)
ItemTextPos itemTextPos () const
virtual void setItemTextBackground (const QBrush &b)
QBrush itemTextBackground () const
virtual void setArrangement (Arrangement am)
Arrangement arrangement () const
virtual void setResizeMode (ResizeMode am)
ResizeMode resizeMode () const
virtual void setMaxItemWidth (int w)
int maxItemWidth () const
virtual void setMaxItemTextLength (int w)
int maxItemTextLength () const
virtual void setAutoArrange (bool b)
bool autoArrange () const
virtual void setShowToolTips (bool b)
bool showToolTips () const
void setSorting (bool sort, bool ascending=TRUE)
bool sorting () const
bool sortDirection () const
virtual void setItemsMovable (bool b)
bool itemsMovable () const
virtual void setWordWrapIconText (bool b)
bool wordWrapIconText () const
bool eventFilter (QObject *o, QEvent *)
QSize minimumSizeHint () const
QSize sizeHint () const
virtual void sort (bool ascending=TRUE)
virtual void setFont (const QFont &)
virtual void setPalette (const QPalette &)
bool isRenaming () const

Slots protegidos

virtual void doAutoScroll ()
virtual void adjustItems ()
virtual void slotUpdate ()
virtual void doAutoScroll ()
virtual void adjustItems ()
virtual void slotUpdate ()

Métodos protegidos

void drawContents (QPainter *p, int cx, int cy, int cw, int ch)
void contentsMousePressEvent (QMouseEvent *e)
void contentsMouseReleaseEvent (QMouseEvent *e)
void contentsMouseMoveEvent (QMouseEvent *e)
void contentsMouseDoubleClickEvent (QMouseEvent *e)
void contentsContextMenuEvent (QContextMenuEvent *e)
void contentsDragEnterEvent (QDragEnterEvent *e)
void contentsDragMoveEvent (QDragMoveEvent *e)
void contentsDragLeaveEvent (QDragLeaveEvent *e)
void contentsDropEvent (QDropEvent *e)
void resizeEvent (QResizeEvent *e)
void keyPressEvent (QKeyEvent *e)
void focusInEvent (QFocusEvent *e)
void focusOutEvent (QFocusEvent *e)
void enterEvent (QEvent *e)
virtual void drawRubber (QPainter *p)
virtual QDragObjectdragObject ()
virtual void startDrag ()
virtual void insertInGrid (QIconViewItem *item)
virtual void drawBackground (QPainter *p, const QRect &r)
void emitSelectionChanged (QIconViewItem *i=0)
void emitRenamed (QIconViewItem *item)
QIconViewItemmakeRowLayout (QIconViewItem *begin, int &y, bool &changed)
void styleChange (QStyle &)
void windowActivationChange (bool)
void drawContents (QPainter *p, int cx, int cy, int cw, int ch)
void contentsMousePressEvent (QMouseEvent *e)
void contentsMouseReleaseEvent (QMouseEvent *e)
void contentsMouseMoveEvent (QMouseEvent *e)
void contentsMouseDoubleClickEvent (QMouseEvent *e)
void contentsContextMenuEvent (QContextMenuEvent *e)
void contentsDragEnterEvent (QDragEnterEvent *e)
void contentsDragMoveEvent (QDragMoveEvent *e)
void contentsDragLeaveEvent (QDragLeaveEvent *e)
void contentsDropEvent (QDropEvent *e)
void resizeEvent (QResizeEvent *e)
void keyPressEvent (QKeyEvent *e)
void focusInEvent (QFocusEvent *e)
void focusOutEvent (QFocusEvent *e)
void enterEvent (QEvent *e)
virtual void drawRubber (QPainter *p)
virtual QDragObjectdragObject ()
virtual void startDrag ()
virtual void insertInGrid (QIconViewItem *item)
virtual void drawBackground (QPainter *p, const QRect &r)
void emitSelectionChanged (QIconViewItem *i=0)
void emitRenamed (QIconViewItem *item)
QIconViewItemmakeRowLayout (QIconViewItem *begin, int &y, bool &changed)
void styleChange (QStyle &)
void windowActivationChange (bool)

Propiedades

bool sorting
 whether the icon view sorts on insertion
bool sortDirection
 whether the sort direction for inserting new items is ascending;
SelectionMode selectionMode
 the selection mode of the icon view
int gridX
 the horizontal grid of the icon view
int gridY
 the vertical grid of the icon view
int spacing
 the space in pixels between icon view items
ItemTextPos itemTextPos
 the position where the text of each item is drawn.
QBrush itemTextBackground
 the brush to use when drawing the background of an item's text.
Arrangement arrangement
 the arrangement mode of the icon view
ResizeMode resizeMode
 the resize mode of the icon view
int maxItemWidth
 the maximum width that an item may have.
int maxItemTextLength
 the maximum length (in characters) that an item's text may have.
bool autoArrange
 whether the icon view rearranges its items when a new item is inserted.
bool itemsMovable
 whether the user is allowed to move items around in the icon view
bool wordWrapIconText
 whether the item text will be word-wrapped if it is too long
bool showToolTips
 whether the icon view will display a tool tip with the complete text for any truncated item text
uint count
 the number of items in the icon view

Amigas

class QIconViewItem
class QIconViewPrivate
class QIconViewToolTip

Descripción detallada

The QIconView class provides an area with movable labelled icons.

iconview

A QIconView can display and manage a grid or other 2D layout of labelled icons. Each labelled icon is a QIconViewItem. Items (QIconViewItems) can be added or deleted at any time; items can be moved within the QIconView. Single or multiple items can be selected. Items can be renamed in-place. QIconView also supports drag and drop.

Each item contains a label string, a pixmap or picture (the icon itself) and optionally a sort key. The sort key is used for sorting the items and defaults to the label string. The label string can be displayed below or to the right of the icon (see ItemTextPos).

The simplest way to create a QIconView is to create a QIconView object and create some QIconViewItems with the QIconView as their parent, set the icon view's geometry and show it. For example:

    QIconView *iv = new QIconView( this );
    QDir dir( path, "*.xpm" );
    for ( uint i = 0; i < dir.count(); i++ ) {
        (void) new QIconViewItem( iv, dir[i], QPixmap( path + dir[i] ) );
    }
    iv->resize( 600, 400 );
    iv->show();

The QIconViewItem call passes a pointer to the QIconView we wish to populate, along with the label text and a QPixmap.

When an item is inserted the QIconView allocates a position for it. Existing items are rearranged if autoArrange() is TRUE. The default arrangement is LeftToRight -- the QIconView fills up the left-most column from top to bottom, then moves one column right and fills that from top to bottom and so on. The arrangement can be modified with any of the following approaches: Call setArrangement(), e.g. with TopToBottom which will fill the top-most row from left to right, then moves one row down and fills that row from left to right and so on. Construct each QIconViewItem using a constructor which allows you to specify which item the new one is to follow. Call setSorting() or sort() to sort the items.

The spacing between items is set with setSpacing(). Items can be laid out using a fixed grid using setGridX() and setGridY(); by default the QIconView calculates a grid dynamically. The position of items' label text is set with setItemTextPos(). The text's background can be set with setItemTextBackground(). The maximum width of an item and of its text are set with setMaxItemWidth() and setMaxItemTextLength(). The label text will be word-wrapped if it is too long; this is controlled by setWordWrapIconText(). If the label text is truncated, the user can still see the entire text in a tool tip if they hover the mouse over the item. This is controlled with setShowToolTips().

Items which are selectable may be selected depending on the SelectionMode; the default is Single. Because QIconView offers multiple selection it must display keyboard focus and selection state separately. Therefore there are functions to set the selection state of an item (setSelected()) and to select which item displays keyboard focus (setCurrentItem()). When multiple items may be selected the icon view provides a rubberband, too.

When in-place renaming is enabled (it is disabled by default), the user may change the item's label. They do this by selecting the item (single clicking it or navigating to it with the arrow keys), then single clicking it (or pressing F2), and entering their text. If no key has been set with QIconViewItem::setKey() the new text will also serve as the key. (See QIconViewItem::setRenameEnabled().)

You can control whether users can move items themselves with setItemsMovable().

Because the internal structure used to store the icon view items is linear, no iterator class is needed to iterate over all the items. Instead we iterate by getting the first item from the {icon view} and then each subsequent ( QIconViewItem::nextItem()) from each item in turn:

        for ( QIconViewItem *item = iv->firstItem(); item; item = item->nextItem() )
            do_something( item );

QIconView also provides currentItem(). You can search for an item using findItem() (searching by position or for label text) and with findFirstVisibleItem() and findLastVisibleItem(). The number of items is returned by count(). An item can be removed from an icon view using takeItem(); to delete an item use delete. All the items can be deleted with clear().

The QIconView emits a wide range of useful signals, including selectionChanged(), currentChanged(), clicked(), moved() and itemRenamed().

draganddrop


Documentación de las enumeraciones miembro de la clase

This enum type determines in which direction the items flow when the view runs out of space.

LeftToRight Items which don't fit into the view cause the viewport to extend vertically (you get a vertical scrollbar).

TopToBottom Items which don't fit into the view cause the viewport to extend horizontally (you get a horizontal scrollbar).

Valores de enumeraciones:
LeftToRight 
TopToBottom 
LeftToRight 
TopToBottom 
Valores de enumeraciones:
LeftToRight 
TopToBottom 
LeftToRight 
TopToBottom 

This enum type specifies the position of the item text in relation to the icon.

Bottom The text is drawn below the icon. Right The text is drawn to the right of the icon.

Valores de enumeraciones:
Bottom 
Right 
Bottom 
Right 
Valores de enumeraciones:
Bottom 
Right 
Bottom 
Right 
Valores de enumeraciones:
Fixed 
Adjust 
Fixed 
Adjust 

This enum type is used to tell QIconView how it should treat the positions of its icons when the widget is resized. The modes are:

Fixed The icons' positions are not changed. Adjust The icons' positions are adjusted to be within the new geometry, if possible.

Valores de enumeraciones:
Fixed 
Adjust 
Fixed 
Adjust 

This enumerated type is used by QIconView to indicate how it reacts to selection by the user. It has four values:

Single When the user selects an item, any already-selected item becomes unselected and the user cannot unselect the selected item. This means that the user can never clear the selection. (The application programmer can, using QIconView::clearSelection().)

Multi When the user selects an item, e.g. by navigating to it with the keyboard arrow keys or by clicking it, the selection status of that item is toggled and the other items are left alone. Also, multiple items can be selected by dragging the mouse while the left mouse button stays pressed.

Extended When the user selects an item the selection is cleared and the new item selected. However, if the user presses the Ctrl key when clicking on an item, the clicked item gets toggled and all other items are left untouched. If the user presses the Shift key while clicking on an item, all items between the current item and the clicked item get selected or unselected, depending on the state of the clicked item. Also, multiple items can be selected by dragging the mouse while the left mouse button stays pressed.

NoSelection Items cannot be selected.

To summarise: Single is a real single-selection icon view; Multi a real multi-selection icon view; Extended is an icon view in which users can select multiple items but usually want to select either just one or a range of contiguous items; and NoSelection mode is for an icon view where the user can look but not touch.

Valores de enumeraciones:
Single 
Multi 
Extended 
NoSelection 
Single 
Multi 
Extended 
NoSelection 
Valores de enumeraciones:
Single 
Multi 
Extended 
NoSelection 
Single 
Multi 
Extended 
NoSelection 

Documentación del constructor y destructor

QIconView::QIconView ( QWidget parent = 0,
const char *  name = 0,
WFlags  f = 0 
)

Constructs an empty icon view called name, with parent parent and using the widget flags f.

QIconView::~QIconView ( ) [virtual]

Destroys the icon view and deletes all items.

QIconView::QIconView ( QWidget parent = 0,
const char *  name = 0,
WFlags  f = 0 
)
virtual QIconView::~QIconView ( ) [virtual]

Documentación de las funciones miembro

void QIconView::adjustItems ( ) [protected, virtual, slot]

Adjusts the positions of the items to the geometry of the icon view.

virtual void QIconView::adjustItems ( ) [protected, virtual, slot]
void QIconView::arrangeItemsInGrid ( const QSize grid,
bool  update = TRUE 
) [virtual, slot]

This variant uses grid instead of (gridX(), gridY()). If grid is invalid (see QSize::isValid()), arrangeItemsInGrid() calculates a valid grid itself and uses that.

If update is TRUE (the default) the viewport is repainted.

virtual void QIconView::arrangeItemsInGrid ( const QSize grid,
bool  update = TRUE 
) [virtual, slot]
virtual void QIconView::arrangeItemsInGrid ( bool  update = TRUE) [virtual, slot]
void QIconView::arrangeItemsInGrid ( bool  update = TRUE) [virtual, slot]

Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. Arranges all the items in the grid given by gridX() and gridY().

Even if sorting() is enabled, the items are not sorted by this function. If you want to sort or rearrange the items, use iconview->sort(iconview->sortDirection()).

If update is TRUE (the default), the viewport is repainted as well.

Ver también:
QIconView::setGridX(), QIconView::setGridY(), QIconView::sort()
Arrangement QIconView::arrangement ( ) const
Arrangement QIconView::arrangement ( ) const
bool QIconView::autoArrange ( ) const
bool QIconView::autoArrange ( ) const
virtual void QIconView::clear ( ) [virtual]
void QIconView::clear ( void  ) [virtual]

Clears the icon view. All items are deleted.

void QIconView::clearSelection ( ) [virtual]

Unselects all the items.

virtual void QIconView::clearSelection ( ) [virtual]
void QIconView::clicked ( QIconViewItem item) [signal]

This signal is emitted when the user clicks any mouse button. If item is non-null, the cursor is on item. If item is null, the mouse cursor isn't on any item.

Ver también:
mouseButtonClicked() rightButtonClicked() pressed()
void QIconView::clicked ( QIconViewItem item,
const QPoint pos 
) [signal]

Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta.

This signal is emitted when the user clicks any mouse button on an icon view item. item is a pointer to the item that has been clicked.

pos is the position of the mouse cursor in the global coordinate system (QMouseEvent::globalPos()). (If the click's press and release differ by a pixel or two, pos is the position at release time.)

Ver también:
mouseButtonClicked() rightButtonClicked() pressed()
void QIconView::clicked ( QIconViewItem ) [signal]
void QIconView::clicked ( QIconViewItem ,
const QPoint  
) [signal]
void QIconView::contentsContextMenuEvent ( QContextMenuEvent e) [protected, virtual]

Reimplementado de QScrollView.

void QIconView::contentsContextMenuEvent ( QContextMenuEvent e) [protected, virtual]

This event handler is called whenever the QScrollView receives a contextMenuEvent() in {e}: the mouse position is translated to be a point on the contents.

Reimplementado de QScrollView.

void QIconView::contentsDragEnterEvent ( QDragEnterEvent e) [protected, virtual]

Reimplementado de QScrollView.

void QIconView::contentsDragEnterEvent ( QDragEnterEvent ) [protected, virtual]

This event handler is called whenever the QScrollView receives a dragEnterEvent(): the drag position is translated to be a point on the contents.

Reimplementado de QScrollView.

void QIconView::contentsDragLeaveEvent ( QDragLeaveEvent e) [protected, virtual]

Reimplementado de QScrollView.

void QIconView::contentsDragLeaveEvent ( QDragLeaveEvent ) [protected, virtual]

This event handler is called whenever the QScrollView receives a dragLeaveEvent(): the drag position is translated to be a point on the contents.

Reimplementado de QScrollView.

void QIconView::contentsDragMoveEvent ( QDragMoveEvent e) [protected, virtual]

Reimplementado de QScrollView.

void QIconView::contentsDragMoveEvent ( QDragMoveEvent ) [protected, virtual]

This event handler is called whenever the QScrollView receives a dragMoveEvent(): the drag position is translated to be a point on the contents.

Reimplementado de QScrollView.

void QIconView::contentsDropEvent ( QDropEvent e) [protected, virtual]

Reimplementado de QScrollView.

void QIconView::contentsDropEvent ( QDropEvent ) [protected, virtual]

This event handler is called whenever the QScrollView receives a dropEvent(): the drop position is translated to be a point on the contents.

Reimplementado de QScrollView.

void QIconView::contentsMouseDoubleClickEvent ( QMouseEvent e) [protected, virtual]

Reimplementado de QScrollView.

void QIconView::contentsMouseDoubleClickEvent ( QMouseEvent e) [protected, virtual]

This event handler is called whenever the QScrollView receives a mouseDoubleClickEvent(): the click position in e is translated to be a point on the contents.

The default implementation generates a normal mouse press event.

Reimplementado de QScrollView.

void QIconView::contentsMouseMoveEvent ( QMouseEvent e) [protected, virtual]

Reimplementado de QScrollView.

void QIconView::contentsMouseMoveEvent ( QMouseEvent e) [protected, virtual]

This event handler is called whenever the QScrollView receives a mouseMoveEvent(): the mouse position in e is translated to be a point on the contents.

Reimplementado de QScrollView.

void QIconView::contentsMousePressEvent ( QMouseEvent e) [protected, virtual]

Reimplementado de QScrollView.

void QIconView::contentsMousePressEvent ( QMouseEvent e) [protected, virtual]

This event handler is called whenever the QScrollView receives a mousePressEvent(): the press position in e is translated to be a point on the contents.

Reimplementado de QScrollView.

void QIconView::contentsMouseReleaseEvent ( QMouseEvent e) [protected, virtual]

Reimplementado de QScrollView.

void QIconView::contentsMouseReleaseEvent ( QMouseEvent e) [protected, virtual]

This event handler is called whenever the QScrollView receives a mouseReleaseEvent(): the release position in e is translated to be a point on the contents.

Reimplementado de QScrollView.

void QIconView::contextMenuRequested ( QIconViewItem item,
const QPoint pos 
) [signal]

This signal is emitted when the user invokes a context menu with the right mouse button or with special system keys, with item being the item under the mouse cursor or the current item, respectively.

pos is the position for the context menu in the global coordinate system.

void QIconView::contextMenuRequested ( QIconViewItem item,
const QPoint pos 
) [signal]
uint QIconView::count ( ) const
uint QIconView::count ( ) const
void QIconView::currentChanged ( QIconViewItem item) [signal]

This signal is emitted when a new item becomes current. item is the new current item (or 0 if no item is now current).

Ver también:
currentItem()
void QIconView::currentChanged ( QIconViewItem item) [signal]
QIconViewItem * QIconView::currentItem ( ) const

Returns a pointer to the current item of the icon view, or 0 if no item is current.

Ver también:
setCurrentItem() firstItem() lastItem()
QIconViewItem* QIconView::currentItem ( ) const
void QIconView::doAutoScroll ( ) [protected, virtual, slot]

Performs autoscrolling when selecting multiple icons with the rubber band.

virtual void QIconView::doAutoScroll ( ) [protected, virtual, slot]
void QIconView::doubleClicked ( QIconViewItem item) [signal]

This signal is emitted when the user double-clicks on item.

void QIconView::doubleClicked ( QIconViewItem item) [signal]
QDragObject * QIconView::dragObject ( ) [protected, virtual]

Returns the QDragObject that should be used for drag-and-drop. This function is called by the icon view when starting a drag to get the dragobject that should be used for the drag. Subclasses may reimplement this.

Ver también:
QIconDrag
virtual QDragObject* QIconView::dragObject ( ) [protected, virtual]
void QIconView::drawBackground ( QPainter p,
const QRect r 
) [protected, virtual]

This function is called to draw the rectangle r of the background using the painter p.

The default implementation fills r with the viewport's backgroundBrush(). Subclasses may reimplement this to draw custom backgrounds.

Ver también:
contentsX() contentsY() drawContents()
virtual void QIconView::drawBackground ( QPainter p,
const QRect r 
) [protected, virtual]
void QIconView::drawContents ( QPainter p,
int  cx,
int  cy,
int  cw,
int  ch 
) [protected, virtual]

Reimplementado de QScrollView.

void QIconView::drawContents ( QPainter p,
int  clipx,
int  clipy,
int  clipw,
int  cliph 
) [protected, virtual]

Reimplement this function if you are viewing a drawing area rather than a widget.

The function should draw the rectangle (clipx, clipy, clipw, cliph) of the contents using painter p. The clip rectangle is in the scrollview's coordinates.

For example:

    {
        // Fill a 40000 by 50000 rectangle at (100000,150000)

        // Calculate the coordinates...
        int x1 = 100000, y1 = 150000;
        int x2 = x1+40000-1, y2 = y1+50000-1;

        // Clip the coordinates so X/Windows will not have problems...
        if (x1 < clipx) x1=clipx;
        if (y1 < clipy) y1=clipy;
        if (x2 > clipx+clipw-1) x2=clipx+clipw-1;
        if (y2 > clipy+cliph-1) y2=clipy+cliph-1;

        // Paint using the small coordinates...
        if ( x2 >= x1 && y2 >= y1 )
            p->fillRect(x1, y1, x2-x1+1, y2-y1+1, red);
    }

The clip rectangle and translation of the painter p is already set appropriately.

Reimplementado de QScrollView.

void QIconView::drawRubber ( QPainter p) [protected, virtual]

Draws the rubber band using the painter p.

virtual void QIconView::drawRubber ( QPainter p) [protected, virtual]
void QIconView::dropped ( QDropEvent e,
const QValueList< QIconDragItem > &  lst 
) [signal]

This signal is emitted when a drop event occurs in the viewport (but not on any icon) which the icon view itself can't handle.

e provides all the information about the drop. If the drag object of the drop was a QIconDrag, lst contains the list of the dropped items. You can get the data using QIconDragItem::data() on each item. If the lst is empty, i.e. the drag was not a QIconDrag, you have to decode the data in e and work with that.

Note QIconViewItems may be drop targets; if a drop event occurs on an item the item handles the drop.

void QIconView::dropped ( QDropEvent e,
const QValueList< QIconDragItem > &  lst 
) [signal]
void QIconView::emitRenamed ( QIconViewItem item) [protected]
void QIconView::emitRenamed ( QIconViewItem item) [protected]
void QIconView::emitSelectionChanged ( QIconViewItem i = 0) [protected]
void QIconView::emitSelectionChanged ( QIconViewItem i = 0) [protected]

Emits a signal to indicate selection changes. i is the QIconViewItem that was selected or de-selected.

{You should never need to call this function.}

void QIconView::ensureItemVisible ( QIconViewItem item)
void QIconView::ensureItemVisible ( QIconViewItem item)

Makes sure that item is entirely visible. If necessary, ensureItemVisible() scrolls the icon view.

Ver también:
ensureVisible()
void QIconView::enterEvent ( QEvent e) [protected, virtual]

Reimplementado de QWidget.

void QIconView::enterEvent ( QEvent ) [protected, virtual]

This event handler can be reimplemented in a subclass to receive widget enter events.

An event is sent to the widget when the mouse cursor enters the widget.

Ver también:
leaveEvent(), mouseMoveEvent(), event()

Reimplementado de QWidget.

bool QIconView::eventFilter ( QObject obj,
QEvent e 
) [virtual]

This event filter ensures the scroll bars are updated when a single contents widget is resized, shown, hidden or destroyed; it passes mouse events to the QScrollView. The event is in e and the object is in obj.

Reimplementado de QScrollView.

bool QIconView::eventFilter ( QObject o,
QEvent e 
) [virtual]

Reimplementado de QScrollView.

QIconViewItem* QIconView::findFirstVisibleItem ( const QRect r) const
QIconViewItem * QIconView::findFirstVisibleItem ( const QRect r) const

Finds the first item whose bounding rectangle overlaps r and returns a pointer to that item. r is given in content coordinates. Returns 0 if no item overlaps r.

If you want to find all items that touch r, you will need to use this function and nextItem() in a loop ending at findLastVisibleItem() and test QIconViewItem::rect() for each of these items.

Ver también:
findLastVisibleItem() QIconViewItem::rect()
QIconViewItem * QIconView::findItem ( const QPoint pos) const

Returns a pointer to the item that contains point pos, which is given in contents coordinates, or 0 if no item contains point pos.

QIconViewItem * QIconView::findItem ( const QString text,
ComparisonFlags  compare = BeginsWith 
) const

Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. Returns a pointer to the first item whose text begins with text, or 0 if no such item could be found. Use the compare flag to control the comparison behaviour. (See {Qt::StringComparisonMode}.)

QIconViewItem* QIconView::findItem ( const QString text,
ComparisonFlags  compare = BeginsWith 
) const
QIconViewItem* QIconView::findItem ( const QPoint pos) const
QIconViewItem* QIconView::findLastVisibleItem ( const QRect r) const
QIconViewItem * QIconView::findLastVisibleItem ( const QRect r) const

Finds the last item whose bounding rectangle overlaps r and returns a pointer to that item. r is given in content coordinates. Returns 0 if no item overlaps r.

Ver también:
findFirstVisibleItem()
QIconViewItem * QIconView::firstItem ( ) const

Returns a pointer to the first item of the icon view, or 0 if there are no items in the icon view.

Ver también:
lastItem() currentItem()
QIconViewItem* QIconView::firstItem ( ) const
void QIconView::focusInEvent ( QFocusEvent e) [protected, virtual]

Reimplementado de QWidget.

void QIconView::focusInEvent ( QFocusEvent ) [protected, virtual]

This event handler can be reimplemented in a subclass to receive keyboard focus events (focus received) for the widget.

A widget normally must setFocusPolicy() to something other than NoFocus in order to receive focus events. (Note that the application programmer can call setFocus() on any widget, even those that do not normally accept focus.)

The default implementation updates the widget (except for toplevel widgets that do not specify a focusPolicy() ). It also calls setMicroFocusHint(), hinting any system-specific input tools about the focus of the user's attention.

Ver también:
focusOutEvent(), setFocusPolicy(), keyPressEvent(), keyReleaseEvent(), event(), QFocusEvent

Reimplementado de QWidget.

void QIconView::focusOutEvent ( QFocusEvent e) [protected, virtual]

Reimplementado de QWidget.

void QIconView::focusOutEvent ( QFocusEvent ) [protected, virtual]

This event handler can be reimplemented in a subclass to receive keyboard focus events (focus lost) for the widget.

A widget normally must setFocusPolicy() to something other than NoFocus in order to receive focus events. (Note that the application programmer can call setFocus() on any widget, even those that do not normally accept focus.)

The default implementation updates the widget (except for toplevel widgets that do not specify a focusPolicy() ). It also calls setMicroFocusHint(), hinting any system-specific input tools about the focus of the user's attention.

Ver también:
focusInEvent(), setFocusPolicy(), keyPressEvent(), keyReleaseEvent(), event(), QFocusEvent

Reimplementado de QWidget.

int QIconView::gridX ( ) const
int QIconView::gridX ( ) const
int QIconView::gridY ( ) const
int QIconView::gridY ( ) const
int QIconView::index ( const QIconViewItem item) const

Returns the index of item, or -1 if item doesn't exist in this icon view.

int QIconView::index ( const QIconViewItem item) const
void QIconView::insertInGrid ( QIconViewItem item) [protected, virtual]

Inserts the QIconViewItem item in the icon view's grid. {You should never need to call this function.} Instead, insert QIconViewItems by creating them with a pointer to the QIconView that they are to be inserted into.

virtual void QIconView::insertInGrid ( QIconViewItem item) [protected, virtual]
void QIconView::insertItem ( QIconViewItem item,
QIconViewItem after = 0L 
) [virtual]

Inserts the icon view item item after after. If after is 0, item is appended after the last item.

{You should never need to call this function.} Instead create QIconViewItem's and associate them with your icon view like this:

        (void) new QIconViewItem( myIconview, "The text of the item", aPixmap );
virtual void QIconView::insertItem ( QIconViewItem item,
QIconViewItem after = 0L 
) [virtual]
virtual void QIconView::invertSelection ( ) [virtual]
void QIconView::invertSelection ( ) [virtual]

Inverts the selection. Works only in Multi and Extended selection mode.

bool QIconView::isRenaming ( ) const
bool QIconView::isRenaming ( ) const

Returns TRUE if an iconview item is being renamed; otherwise returns FALSE.

void QIconView::itemRenamed ( QIconViewItem item,
const QString name 
) [signal]

This signal is emitted when item has been renamed to name, usually by in-place renaming.

Ver también:
QIconViewItem::setRenameEnabled() QIconViewItem::rename()
void QIconView::itemRenamed ( QIconViewItem item) [signal]

Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta.

This signal is emitted when item has been renamed, usually by in-place renaming.

Ver también:
QIconViewItem::setRenameEnabled() QIconViewItem::rename()
void QIconView::itemRenamed ( QIconViewItem item) [signal]
void QIconView::itemRenamed ( QIconViewItem item,
const QString  
) [signal]
bool QIconView::itemsMovable ( ) const
bool QIconView::itemsMovable ( ) const
QBrush QIconView::itemTextBackground ( ) const
QBrush QIconView::itemTextBackground ( ) const
ItemTextPos QIconView::itemTextPos ( ) const
ItemTextPos QIconView::itemTextPos ( ) const
void QIconView::keyPressEvent ( QKeyEvent e) [protected, virtual]

Reimplementado de QWidget.

void QIconView::keyPressEvent ( QKeyEvent e) [protected, virtual]

This event handler, for event e, can be reimplemented in a subclass to receive key press events for the widget.

A widget must call setFocusPolicy() to accept focus initially and have focus in order to receive a key press event.

If you reimplement this handler, it is very important that you explicitly ignore the event if you do not understand it, so that the widget's parent can interpret it; otherwise, the event will be implicitly accepted. Although top-level widgets are able to choose whether to accept or ignore unknown events because they have no parent widgets that could otherwise handle them, it is good practice to explicitly ignore events to make widgets as reusable as possible.

The default implementation closes popup widgets if the user presses Esc. Otherwise the event is ignored.

Ver también:
keyReleaseEvent(), QKeyEvent::ignore(), setFocusPolicy(), focusInEvent(), focusOutEvent(), event(), QKeyEvent

Reimplementado de QWidget.

QIconViewItem * QIconView::lastItem ( ) const

Returns a pointer to the last item of the icon view, or 0 if there are no items in the icon view.

Ver también:
firstItem() currentItem()
QIconViewItem* QIconView::lastItem ( ) const
QIconViewItem* QIconView::makeRowLayout ( QIconViewItem begin,
int y,
bool changed 
) [protected]
QIconViewItem * QIconView::makeRowLayout ( QIconViewItem begin,
int y,
bool changed 
) [protected]

Lays out a row of icons (if Arrangement == TopToBottom this is a column). Starts laying out with the item begin. y is the starting coordinate. Returns the last item of the row (column) and sets the new starting coordinate to y. The changed parameter is used internally.

Atención:
This function may be made private in a future version of Qt. We do not recommend calling it.
int QIconView::maxItemTextLength ( ) const
int QIconView::maxItemTextLength ( ) const
int QIconView::maxItemWidth ( ) const
int QIconView::maxItemWidth ( ) const
QSize QIconView::minimumSizeHint ( ) const [virtual]

Reimplementado de QScrollView.

QSize QIconView::minimumSizeHint ( ) const [virtual]

Reimplementado de QScrollView.

void QIconView::mouseButtonClicked ( int  button,
QIconViewItem item,
const QPoint pos 
) [signal]

This signal is emitted when the user clicks mouse button button. If item is non-null, the cursor is on item. If item is null, the mouse cursor isn't on any item.

pos is the position of the mouse cursor in the global coordinate system (QMouseEvent::globalPos()). (If the click's press and release differ by a pixel or two, pos is the position at release time.)

Ver también:
mouseButtonPressed() rightButtonClicked() clicked()
void QIconView::mouseButtonClicked ( int  button,
QIconViewItem item,
const QPoint pos 
) [signal]
void QIconView::mouseButtonPressed ( int  button,
QIconViewItem item,
const QPoint pos 
) [signal]

This signal is emitted when the user presses mouse button button. If item is non-null, the cursor is on item. If item is null, the mouse cursor isn't on any item.

pos is the position of the mouse cursor in the global coordinate system (QMouseEvent::globalPos()).

Ver también:
rightButtonClicked() mouseButtonPressed() pressed()
void QIconView::mouseButtonPressed ( int  button,
QIconViewItem item,
const QPoint pos 
) [signal]
void QIconView::moved ( ) [signal]

This signal is emitted after successfully dropping one (or more) items of the icon view. If the items should be removed, it's best to do so in a slot connected to this signal.

void QIconView::moved ( ) [signal]
void QIconView::onItem ( QIconViewItem item) [signal]

This signal is emitted when the user moves the mouse cursor onto an item, similar to the QWidget::enterEvent() function.

void QIconView::onItem ( QIconViewItem item) [signal]
void QIconView::onViewport ( ) [signal]

This signal is emitted when the user moves the mouse cursor from an item to an empty part of the icon view.

Ver también:
onItem()
void QIconView::onViewport ( ) [signal]
void QIconView::pressed ( QIconViewItem item) [signal]

This signal is emitted when the user presses any mouse button. If item is non-null, the cursor is on item. If item is null, the mouse cursor isn't on any item.

Ver también:
mouseButtonPressed() rightButtonPressed() clicked()
void QIconView::pressed ( QIconViewItem item,
const QPoint pos 
) [signal]

Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta.

This signal is emitted when the user presses any mouse button. If item is non-null, the cursor is on item. If item is null, the mouse cursor isn't on any item.

pos is the position of the mouse cursor in the global coordinate system (QMouseEvent::globalPos()). (If the click's press and release differ by a pixel or two, pos is the position at release time.)

Ver también:
mouseButtonPressed() rightButtonPressed() clicked()
void QIconView::pressed ( QIconViewItem ,
const QPoint  
) [signal]
void QIconView::pressed ( QIconViewItem ) [signal]
virtual void QIconView::repaintItem ( QIconViewItem item) [virtual]
void QIconView::repaintItem ( QIconViewItem item) [virtual]

Repaints the item.

void QIconView::repaintSelectedItems ( )
void QIconView::repaintSelectedItems ( )

Repaints the selected items.

void QIconView::resizeEvent ( QResizeEvent e) [protected, virtual]

Reimplementado de QScrollView.

void QIconView::resizeEvent ( QResizeEvent event) [protected, virtual]

Reimplementado de QScrollView.

ResizeMode QIconView::resizeMode ( ) const
ResizeMode QIconView::resizeMode ( ) const
void QIconView::returnPressed ( QIconViewItem item) [signal]

This signal is emitted if the user presses the Return or Enter key. item is the currentItem() at the time of the keypress.

void QIconView::returnPressed ( QIconViewItem item) [signal]
void QIconView::rightButtonClicked ( QIconViewItem item,
const QPoint pos 
) [signal]

This signal is emitted when the user clicks the right mouse button. If item is non-null, the cursor is on item. If item is null, the mouse cursor isn't on any item.

pos is the position of the mouse cursor in the global coordinate system (QMouseEvent::globalPos()). (If the click's press and release differ by a pixel or two, pos is the position at release time.)

Ver también:
rightButtonPressed() mouseButtonClicked() clicked()
void QIconView::rightButtonClicked ( QIconViewItem item,
const QPoint pos 
) [signal]
void QIconView::rightButtonPressed ( QIconViewItem item,
const QPoint pos 
) [signal]
void QIconView::rightButtonPressed ( QIconViewItem item,
const QPoint pos 
) [signal]

This signal is emitted when the user presses the right mouse button. If item is non-null, the cursor is on item. If item is null, the mouse cursor isn't on any item.

pos is the position of the mouse cursor in the global coordinate system (QMouseEvent::globalPos()).

void QIconView::selectAll ( bool  select) [virtual]

In Multi and Extended modes, this function sets all items to be selected if select is TRUE, and to be unselected if select is FALSE.

In Single and NoSelection modes, this function only changes the selection status of currentItem().

virtual void QIconView::selectAll ( bool  select) [virtual]
void QIconView::selectionChanged ( ) [signal]

This signal is emitted when the selection has been changed. It's emitted in each selection mode.

void QIconView::selectionChanged ( QIconViewItem item) [signal]

Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta.

This signal is emitted when the selection changes. item is the newly selected item. This signal is emitted only in single selection mode.

void QIconView::selectionChanged ( ) [signal]
void QIconView::selectionChanged ( QIconViewItem item) [signal]
SelectionMode QIconView::selectionMode ( ) const
SelectionMode QIconView::selectionMode ( ) const
void QIconView::setArrangement ( Arrangement  am) [virtual]
virtual void QIconView::setArrangement ( Arrangement  am) [virtual]
virtual void QIconView::setAutoArrange ( bool  b) [virtual]
void QIconView::setAutoArrange ( bool  b) [virtual]
virtual void QIconView::setContentsPos ( int  x,
int  y 
) [virtual, slot]

Scrolls the content so that the point (x, y) is in the top-left corner.

Reimplementado de QScrollView.

void QIconView::setContentsPos ( int  x,
int  y 
) [virtual, slot]

Reimplementado de QScrollView.

void QIconView::setCurrentItem ( QIconViewItem item) [virtual]

Makes item the new current item of the icon view.

virtual void QIconView::setCurrentItem ( QIconViewItem item) [virtual]
virtual void QIconView::setFont ( const QFont ) [virtual]

Reimplementado de QWidget.

void QIconView::setFont ( const QFont f) [virtual]

Reimplementado de QWidget.

virtual void QIconView::setGridX ( int  rx) [virtual]
void QIconView::setGridX ( int  rx) [virtual]
void QIconView::setGridY ( int  ry) [virtual]
virtual void QIconView::setGridY ( int  ry) [virtual]
virtual void QIconView::setItemsMovable ( bool  b) [virtual]
void QIconView::setItemsMovable ( bool  b) [virtual]
void QIconView::setItemTextBackground ( const QBrush b) [virtual]
virtual void QIconView::setItemTextBackground ( const QBrush b) [virtual]
virtual void QIconView::setItemTextPos ( ItemTextPos  pos) [virtual]
void QIconView::setItemTextPos ( ItemTextPos  pos) [virtual]
virtual void QIconView::setMaxItemTextLength ( int  w) [virtual]
void QIconView::setMaxItemTextLength ( int  w) [virtual]
void QIconView::setMaxItemWidth ( int  w) [virtual]
virtual void QIconView::setMaxItemWidth ( int  w) [virtual]
virtual void QIconView::setPalette ( const QPalette ) [virtual]

Reimplementado de QWidget.

void QIconView::setPalette ( const QPalette p) [virtual]

Reimplementado de QWidget.

virtual void QIconView::setResizeMode ( ResizeMode  am) [virtual]
void QIconView::setResizeMode ( ResizeMode  am) [virtual]
void QIconView::setSelected ( QIconViewItem item,
bool  s,
bool  cb = FALSE 
) [virtual]

Selects or unselects item depending on s, and may also unselect other items, depending on QIconView::selectionMode() and cb.

If s is FALSE, item is unselected.

If s is TRUE and QIconView::selectionMode() is Single, item is selected, and the item which was selected is unselected.

If s is TRUE and QIconView::selectionMode() is Extended, item is selected. If cb is TRUE, the selection state of the icon view's other items is left unchanged. If cb is FALSE (the default) all other items are unselected.

If s is TRUE and QIconView::selectionMode() is Multi item is selected.

Note that cb is used only if QIconView::selectionMode() is Extended. cb defaults to FALSE.

All items whose selection status is changed repaint themselves.

virtual void QIconView::setSelected ( QIconViewItem item,
bool  s,
bool  cb = FALSE 
) [virtual]
void QIconView::setSelectionMode ( SelectionMode  m) [virtual]
virtual void QIconView::setSelectionMode ( SelectionMode  m) [virtual]
void QIconView::setShowToolTips ( bool  b) [virtual]
virtual void QIconView::setShowToolTips ( bool  b) [virtual]
void QIconView::setSorting ( bool  sort,
bool  ascending = TRUE 
)

If sort is TRUE, this function sets the icon view to sort items when a new item is inserted. If sort is FALSE, the icon view will not be sorted.

Note that autoArrange() must be TRUE for sorting to take place.

If ascending is TRUE (the default), items are sorted in ascending order. If ascending is FALSE, items are sorted in descending order.

QIconViewItem::compare() is used to compare pairs of items. The sorting is based on the items' keys; these default to the items' text unless specifically set to something else.

Ver también:
QIconView::setAutoArrange(), QIconView::autoArrange(), sortDirection(), sort(), QIconViewItem::setKey()
void QIconView::setSorting ( bool  sort,
bool  ascending = TRUE 
)
virtual void QIconView::setSpacing ( int  sp) [virtual]
void QIconView::setSpacing ( int  sp) [virtual]
virtual void QIconView::setWordWrapIconText ( bool  b) [virtual]
void QIconView::setWordWrapIconText ( bool  b) [virtual]
void QIconView::showEvent ( QShowEvent ) [virtual]

Reimplementado de QWidget.

virtual void QIconView::showEvent ( QShowEvent ) [virtual]

This event handler can be reimplemented in a subclass to receive widget show events.

Non-spontaneous show events are sent to widgets immediately before they are shown. The spontaneous show events of top-level widgets are delivered afterwards.

Ver también:
event(), QShowEvent

Reimplementado de QWidget.

bool QIconView::showToolTips ( ) const
bool QIconView::showToolTips ( ) const
QSize QIconView::sizeHint ( ) const [virtual]

Reimplementado de QScrollView.

QSize QIconView::sizeHint ( ) const [virtual]

Reimplementado de QScrollView.

void QIconView::slotUpdate ( ) [protected, virtual, slot]

This slot is used for a slightly-delayed update.

The icon view is not redrawn immediately after inserting a new item but after a very small delay using a QTimer. This means that when many items are inserted in a loop the icon view is probably redrawn only once at the end of the loop. This makes the insertions both flicker-free and faster.

virtual void QIconView::slotUpdate ( ) [protected, virtual, slot]
virtual void QIconView::sort ( bool  ascending = TRUE) [virtual]
void QIconView::sort ( bool  ascending = TRUE) [virtual]

Sorts and rearranges all the items in the icon view. If ascending is TRUE, the items are sorted in increasing order, otherwise they are sorted in decreasing order.

QIconViewItem::compare() is used to compare pairs of items. The sorting is based on the items' keys; these default to the items' text unless specifically set to something else.

Note that this function sets the sort order to ascending.

Ver también:
QIconViewItem::key(), QIconViewItem::setKey(), QIconViewItem::compare(), QIconView::setSorting(), QIconView::sortDirection()
bool QIconView::sortDirection ( ) const
bool QIconView::sortDirection ( ) const
bool QIconView::sorting ( ) const
bool QIconView::sorting ( ) const
int QIconView::spacing ( ) const
int QIconView::spacing ( ) const
void QIconView::startDrag ( ) [protected, virtual]

Starts a drag.

virtual void QIconView::startDrag ( ) [protected, virtual]
void QIconView::styleChange ( QStyle old) [protected, virtual]

Reimplementado de QScrollView.

void QIconView::styleChange ( QStyle old) [protected, virtual]

Reimplementado de QScrollView.

virtual void QIconView::takeItem ( QIconViewItem item) [virtual]
void QIconView::takeItem ( QIconViewItem item) [virtual]

Takes the icon view item item out of the icon view and causes an update of the screen display. The item is not deleted. You should normally not need to call this function because QIconViewItem::~QIconViewItem() calls it. The normal way to delete an item is to delete it.

virtual void QIconView::updateContents ( ) [virtual, slot]

Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta.

Reimplementado de QScrollView.

void QIconView::updateContents ( ) [virtual, slot]

Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta.

Reimplementado de QScrollView.

void QIconView::windowActivationChange ( bool  oldActive) [protected, virtual]

Reimplementado de QWidget.

void QIconView::windowActivationChange ( bool  oldActive) [protected, virtual]

This virtual function is called for a widget when its window is activated or deactivated by the window system. oldActive is the previous state; you can get the new setting from isActiveWindow().

Reimplement this function if your widget needs to know when its window becomes activated or deactivated.

The default implementation updates the visible part of the widget if the inactive and the active colorgroup are different for colors other than the highlight and link colors.

Ver también:
setActiveWindow(), isActiveWindow(), update(), palette()

Reimplementado de QWidget.

bool QIconView::wordWrapIconText ( ) const
bool QIconView::wordWrapIconText ( ) const

Documentación de las funciones relacionadas y clases amigas

QIconViewItem [friend]
QIconViewPrivate [friend]
QIconViewToolTip [friend]

Documentación de propiedades

Arrangement QIconView::arrangement [read, write]

the arrangement mode of the icon view

This can be LeftToRight or TopToBottom. The default is LeftToRight.

bool QIconView::autoArrange [read, write]

whether the icon view rearranges its items when a new item is inserted.

The default is TRUE.

Note that if the icon view is not visible at the time of insertion, QIconView defers all position-related work until it is shown and then calls arrangeItemsInGrid().

uint QIconView::count [read]

the number of items in the icon view

int QIconView::gridX [read, write]

the horizontal grid of the icon view

If the value is -1, (the default), QIconView computes suitable column widths based on the icon view's contents.

Note that setting a grid width overrides setMaxItemWidth().

int QIconView::gridY [read, write]

the vertical grid of the icon view

If the value is -1, (the default), QIconView computes suitable column heights based on the icon view's contents.

bool QIconView::itemsMovable [read, write]

whether the user is allowed to move items around in the icon view

The default is TRUE.

QBrush QIconView::itemTextBackground [read, write]

the brush to use when drawing the background of an item's text.

By default this brush is set to NoBrush, meaning that only the normal icon view background is used.

ItemTextPos QIconView::itemTextPos [read, write]

the position where the text of each item is drawn.

Valid values are Bottom or Right. The default is Bottom.

int QIconView::maxItemTextLength [read, write]

the maximum length (in characters) that an item's text may have.

The default is 255 characters.

int QIconView::maxItemWidth [read, write]

the maximum width that an item may have.

The default is 100 pixels.

Note that if the gridX() value is set QIconView will ignore this property.

ResizeMode QIconView::resizeMode [read, write]

the resize mode of the icon view

This can be Fixed or Adjust. The default is Fixed. See ResizeMode.

SelectionMode QIconView::selectionMode [read, write]

the selection mode of the icon view

This can be Single (the default), Extended, Multi or NoSelection.

bool QIconView::showToolTips [read, write]

whether the icon view will display a tool tip with the complete text for any truncated item text

The default is TRUE. Note that this has no effect if setWordWrapIconText() is TRUE, as it is by default.

bool QIconView::sortDirection [read]

whether the sort direction for inserting new items is ascending;

The default is TRUE (i.e. ascending). This sort direction is only meaningful if both sorting() and autoArrange() are TRUE.

To set the sort direction, use setSorting()

bool QIconView::sorting [read]

whether the icon view sorts on insertion

The default is FALSE, i.e. no sorting on insertion.

To set the sorting, use setSorting().

int QIconView::spacing [read, write]

the space in pixels between icon view items

The default is 5 pixels.

Negative values for spacing are illegal.

bool QIconView::wordWrapIconText [read, write]

whether the item text will be word-wrapped if it is too long

The default is TRUE.

If this property is FALSE, icon text that is too long is truncated, and an ellipsis (...) appended to indicate that truncation has occurred. The full text can still be seen by the user if they hover the mouse because the full text is shown in a tooltip; see setShowToolTips().


La documentación para esta clase fue generada a partir de los siguientes ficheros:
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'