|
|
|
@ -995,6 +995,7 @@ void QIconViewItem::init( QIconViewItem *after
|
|
|
|
|
allow_rename = FALSE;
|
|
|
|
|
allow_drag = TRUE;
|
|
|
|
|
allow_drop = TRUE;
|
|
|
|
|
visible = TRUE;
|
|
|
|
|
selected = FALSE;
|
|
|
|
|
selectable = TRUE;
|
|
|
|
|
#ifndef QT_NO_TEXTEDIT
|
|
|
|
@ -1050,6 +1051,32 @@ int QIconViewItem::rtti() const
|
|
|
|
|
return RTTI;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
If \a b is TRUE, the item is made visible; otherwise it is hidden.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
void QIconViewItem::setVisible( bool b )
|
|
|
|
|
{
|
|
|
|
|
if ( b == (bool)visible )
|
|
|
|
|
return;
|
|
|
|
|
QIconView *iv = iconView();
|
|
|
|
|
if ( !iv )
|
|
|
|
|
return;
|
|
|
|
|
visible = b;
|
|
|
|
|
if ( iv )
|
|
|
|
|
iv->updateContents();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
Returns TRUE if the item is visible; otherwise returns FALSE.
|
|
|
|
|
|
|
|
|
|
\sa setVisible()
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
bool QIconViewItem::isVisible() const
|
|
|
|
|
{
|
|
|
|
|
return (bool)visible;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
Sets \a text as the text of the icon view item. This function
|
|
|
|
@ -3851,11 +3878,19 @@ void QIconView::selectAll( bool select )
|
|
|
|
|
viewport()->setUpdatesEnabled( FALSE );
|
|
|
|
|
QRect rr;
|
|
|
|
|
for ( ; item; item = item->next ) {
|
|
|
|
|
if (item->isVisible()) {
|
|
|
|
|
if ( select != item->isSelected() ) {
|
|
|
|
|
item->setSelected( select, TRUE );
|
|
|
|
|
rr = rr.unite( item->rect() );
|
|
|
|
|
changed = TRUE;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
if ( FALSE != item->isSelected() ) {
|
|
|
|
|
item->setSelected( FALSE, TRUE );
|
|
|
|
|
changed = TRUE;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
viewport()->setUpdatesEnabled( ue );
|
|
|
|
|
// we call updateContents not repaintContents because of possible previous updateContents
|
|
|
|
@ -4082,7 +4117,7 @@ void QIconView::clear()
|
|
|
|
|
d->drawDragShapes = FALSE;
|
|
|
|
|
|
|
|
|
|
resizeContents( 0, 0 );
|
|
|
|
|
// maybe we don´t need this update, so delay it
|
|
|
|
|
// maybe we don<EFBFBD>t need this update, so delay it
|
|
|
|
|
d->fullRedrawTimer->start( 0, TRUE );
|
|
|
|
|
|
|
|
|
|
d->cleared = TRUE;
|
|
|
|
@ -6139,6 +6174,7 @@ void QIconView::updateItemContainer( QIconViewItem *item )
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (item->isVisible()) {
|
|
|
|
|
c->items.append( item );
|
|
|
|
|
item->d->container1 = c;
|
|
|
|
|
|
|
|
|
@ -6151,6 +6187,7 @@ void QIconView::updateItemContainer( QIconViewItem *item )
|
|
|
|
|
c->items.append( item );
|
|
|
|
|
item->d->container2 = c;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if ( contentsWidth() < irect.right() || contentsHeight() < irect.bottom() )
|
|
|
|
|
resizeContents( QMAX( contentsWidth(), irect.right() ), QMAX( contentsHeight(), irect.bottom() ) );
|
|
|
|
|
}
|
|
|
|
@ -6204,6 +6241,7 @@ void QIconView::rebuildContainers()
|
|
|
|
|
appendItemContainer();
|
|
|
|
|
c = d->lastContainer;
|
|
|
|
|
while ( item ) {
|
|
|
|
|
if (item->isVisible()) {
|
|
|
|
|
if ( c->rect.contains( item->rect() ) ) {
|
|
|
|
|
item->d->container1 = c;
|
|
|
|
|
item->d->container2 = 0;
|
|
|
|
@ -6242,6 +6280,7 @@ void QIconView::rebuildContainers()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
\internal
|
|
|
|
|