@ -995,6 +995,7 @@ void TQIconViewItem::init( TQIconViewItem *after
allow_rename = FALSE ;
allow_rename = FALSE ;
allow_drag = TRUE ;
allow_drag = TRUE ;
allow_drop = TRUE ;
allow_drop = TRUE ;
visible = TRUE ;
selected = FALSE ;
selected = FALSE ;
selectable = TRUE ;
selectable = TRUE ;
# ifndef TQT_NO_TEXTEDIT
# ifndef TQT_NO_TEXTEDIT
@ -1050,6 +1051,32 @@ int TQIconViewItem::rtti() const
return RTTI ;
return RTTI ;
}
}
/*!
If \ a b is TRUE , the item is made visible ; otherwise it is hidden .
*/
void TQIconViewItem : : setVisible ( bool b )
{
if ( b = = ( bool ) visible )
return ;
TQIconView * iv = iconView ( ) ;
if ( ! iv )
return ;
visible = b ;
if ( iv )
iv - > updateContents ( ) ;
}
/*!
Returns TRUE if the item is visible ; otherwise returns FALSE .
\ sa setVisible ( )
*/
bool TQIconViewItem : : isVisible ( ) const
{
return ( bool ) visible ;
}
/*!
/*!
Sets \ a text as the text of the icon view item . This function
Sets \ a text as the text of the icon view item . This function
@ -3852,11 +3879,19 @@ void TQIconView::selectAll( bool select )
viewport ( ) - > setUpdatesEnabled ( FALSE ) ;
viewport ( ) - > setUpdatesEnabled ( FALSE ) ;
TQRect rr ;
TQRect rr ;
for ( ; item ; item = item - > next ) {
for ( ; item ; item = item - > next ) {
if ( item - > isVisible ( ) ) {
if ( select ! = item - > isSelected ( ) ) {
if ( select ! = item - > isSelected ( ) ) {
item - > setSelected ( select , TRUE ) ;
item - > setSelected ( select , TRUE ) ;
rr = rr . unite ( item - > rect ( ) ) ;
rr = rr . unite ( item - > rect ( ) ) ;
changed = TRUE ;
changed = TRUE ;
}
}
else {
if ( FALSE ! = item - > isSelected ( ) ) {
item - > setSelected ( FALSE , TRUE ) ;
changed = TRUE ;
}
}
}
}
}
viewport ( ) - > setUpdatesEnabled ( ue ) ;
viewport ( ) - > setUpdatesEnabled ( ue ) ;
// we call updateContents not repaintContents because of possible previous updateContents
// we call updateContents not repaintContents because of possible previous updateContents
@ -6148,6 +6183,7 @@ void TQIconView::updateItemContainer( TQIconViewItem *item )
return ;
return ;
}
}
if ( item - > isVisible ( ) ) {
c - > items . append ( item ) ;
c - > items . append ( item ) ;
item - > d - > container1 = c ;
item - > d - > container1 = c ;
@ -6160,6 +6196,7 @@ void TQIconView::updateItemContainer( TQIconViewItem *item )
c - > items . append ( item ) ;
c - > items . append ( item ) ;
item - > d - > container2 = c ;
item - > d - > container2 = c ;
}
}
}
if ( contentsWidth ( ) < irect . right ( ) | | contentsHeight ( ) < irect . bottom ( ) )
if ( contentsWidth ( ) < irect . right ( ) | | contentsHeight ( ) < irect . bottom ( ) )
resizeContents ( TQMAX ( contentsWidth ( ) , irect . right ( ) ) , TQMAX ( contentsHeight ( ) , irect . bottom ( ) ) ) ;
resizeContents ( TQMAX ( contentsWidth ( ) , irect . right ( ) ) , TQMAX ( contentsHeight ( ) , irect . bottom ( ) ) ) ;
}
}
@ -6213,6 +6250,7 @@ void TQIconView::rebuildContainers()
appendItemContainer ( ) ;
appendItemContainer ( ) ;
c = d - > lastContainer ;
c = d - > lastContainer ;
while ( item ) {
while ( item ) {
if ( item - > isVisible ( ) ) {
if ( c - > rect . tqcontains ( item - > rect ( ) ) ) {
if ( c - > rect . tqcontains ( item - > rect ( ) ) ) {
item - > d - > container1 = c ;
item - > d - > container1 = c ;
item - > d - > container2 = 0 ;
item - > d - > container2 = 0 ;
@ -6251,6 +6289,7 @@ void TQIconView::rebuildContainers()
}
}
}
}
}
}
}
/*!
/*!
\ internal
\ internal