Darrell Anderson 12 years ago
commit 1ae1be3065

@ -178,6 +178,11 @@ class TQStyleControlElementDockWidgetData {
TQt::Orientation areaOrientation;
};
class TQStyleControlElementToolBarWidgetData {
public:
TQt::Orientation orientation;
};
class TQStyleControlElementGenericWidgetData {
public:
TQStringList widgetObjectTypes;
@ -270,6 +275,7 @@ class Q_EXPORT TQStyleControlElementData {
TQ_UINT32 frameStyle;
TQRect sliderRect;
TQPainter* activePainter;
TQStyleControlElementToolBarWidgetData toolBarData;
public:
TQStyleControlElementData();

@ -576,6 +576,10 @@ TQStyleControlElementData populateControlElementDataFromWidget(const TQWidget* w
}
ceData.dwData.closeEnabled = dw->isCloseEnabled();
}
const TQToolBar * toolbar = dynamic_cast<const TQToolBar*>(parentWidget);
if (toolbar) {
ceData.toolBarData.orientation = toolbar->orientation();
}
}
TQCheckListItem *item = opt.checkListItem();

@ -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