Qt 4.8
Public Functions | Public Variables | List of all members
QToolBarItem Class Reference

#include <qtoolbarlayout_p.h>

Inheritance diagram for QToolBarItem:
QWidgetItem QLayoutItem

Public Functions

bool isEmpty () const
 Returns true if the widget is hidden; otherwise returns false. More...
 
 QToolBarItem (QWidget *widget)
 
- Public Functions inherited from QWidgetItem
Qt::Orientations expandingDirections () const
 Reimplemented Function More...
 
QRect geometry () const
 Reimplemented Function More...
 
bool hasHeightForWidth () const
 Reimplemented Function More...
 
int heightForWidth (int) const
 Reimplemented Function More...
 
QSize maximumSize () const
 Reimplemented Function More...
 
QSize minimumSize () const
 Reimplemented Function More...
 
 QWidgetItem (QWidget *w)
 Creates an item containing the given widget. More...
 
void setGeometry (const QRect &)
 Reimplemented Function More...
 
QSize sizeHint () const
 Reimplemented Function More...
 
virtual QWidgetwidget ()
 Returns the widget managed by this item. More...
 
- Public Functions inherited from QLayoutItem
Qt::Alignment alignment () const
 Returns the alignment of this item. More...
 
QSizePolicy::ControlTypes controlTypes () const
 Returns the control type(s) for the layout item. More...
 
virtual void invalidate ()
 Invalidates any cached information in this layout item. More...
 
virtual QLayoutlayout ()
 If this item is a QLayout, it is returned as a QLayout; otherwise 0 is returned. More...
 
virtual int minimumHeightForWidth (int) const
 Returns the minimum height this widget needs for the given width, w. More...
 
 QLayoutItem (Qt::Alignment alignment=0)
 Constructs a layout item with an alignment. More...
 
void setAlignment (Qt::Alignment a)
 Sets the alignment of this item to alignment. More...
 
virtual QSpacerItemspacerItem ()
 If this item is a QSpacerItem, it is returned as a QSpacerItem; otherwise 0 is returned. More...
 
virtual ~QLayoutItem ()
 Destroys the QLayoutItem. More...
 

Public Variables

QActionaction
 
bool customWidget
 

Additional Inherited Members

- Protected Variables inherited from QWidgetItem
QWidgetwid
 
- Protected Variables inherited from QLayoutItem
Qt::Alignment align
 

Detailed Description

Definition at line 68 of file qtoolbarlayout_p.h.

Constructors and Destructors

◆ QToolBarItem()

QToolBarItem::QToolBarItem ( QWidget widget)

Definition at line 67 of file qtoolbarlayout.cpp.

68  : QWidgetItem(widget), action(0), customWidget(false)
69 {
70 }
QWidgetItem(QWidget *w)
Creates an item containing the given widget.
Definition: qlayoutitem.h:127
QAction * action

Functions

◆ isEmpty()

bool QToolBarItem::isEmpty ( ) const
virtual

Returns true if the widget is hidden; otherwise returns false.

See also
QWidget::isHidden()

Reimplemented from QWidgetItem.

Definition at line 72 of file qtoolbarlayout.cpp.

Referenced by QToolBarLayout::updateGeomArray().

73 {
74  return action == 0 || !action->isVisible();
75 }
QAction * action
bool isVisible() const
Definition: qaction.cpp:1246

Properties

◆ action

QAction* QToolBarItem::action

◆ customWidget

bool QToolBarItem::customWidget

The documentation for this class was generated from the following files: