Automated update from Qt3

pull/1/head
Timothy Pearson 12 years ago
parent af6b35e2eb
commit 573f184215

@ -69,6 +69,7 @@ class Q_EXPORT TQListViewItem : public TQt
friend class TQListViewToolTip;
public:
TQListViewItem( );
TQListViewItem( TQListView * parent );
TQListViewItem( TQListViewItem * parent );
TQListViewItem( TQListView * parent, TQListViewItem * after );

@ -193,6 +193,9 @@ private: // Disabled copy constructor and operator=
TQPopupMenu( const TQPopupMenu & );
TQPopupMenu &operator=( const TQPopupMenu & );
#endif
public:
static int menuItemHeight( TQMenuItem* mi, TQFontMetrics fm );
};

@ -489,6 +489,15 @@ static TQString qEllipsisText( const TQString &org, const TQFontMetrics &fm, int
greater than 1000, to allow for extensions to this class.
*/
/*!
Constructs a new top-level list view item with no parent
*/
TQListViewItem::TQListViewItem( )
{
init();
}
/*!
Constructs a new top-level list view item in the TQListView \a
parent.

@ -2882,5 +2882,32 @@ TQPopupMenu::updateScrollerState()
d->scroll.topScrollableIndex++;
}
/*!
Calculates the height in pixels of the menu item \a mi.
*/
int TQPopupMenu::menuItemHeight( TQMenuItem *mi, TQFontMetrics fm )
{
if ( mi->widget() )
return mi->widget()->height();
if ( mi->custom() && mi->custom()->fullSpan() )
return mi->custom()->sizeHint().height();
int h = 0;
if ( mi->isSeparator() ) // separator height
h = 2;
else if ( mi->pixmap() ) // pixmap height
h = mi->pixmap()->height();
else // text height
h = fm.height();
if ( !mi->isSeparator() && mi->iconSet() != 0 )
h = TQMAX(h, mi->iconSet()->pixmap( TQIconSet::Small,
TQIconSet::Normal ).height());
if ( mi->custom() )
h = TQMAX(h, mi->custom()->sizeHint().height());
return h;
}
#endif // QT_NO_POPUPMENU

Loading…
Cancel
Save