Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
QtxGroupBox Class Reference

Enhanced group box widget. More...

#include <QtxGroupBox.h>

Inheritance diagram for QtxGroupBox:
Inheritance graph

Public Slots

virtual void setVisible (bool)
 Show/hide group box. More...
 

Public Member Functions

 QtxGroupBox (QWidget *=0)
 Constructor. More...
 
 QtxGroupBox (const QString &, QWidget *=0)
 Constructor. More...
 
virtual ~QtxGroupBox ()
 Destructor. More...
 
virtual void insertTitleWidget (QWidget *)
 Add widget to the group box title. More...
 
virtual void removeTitleWidget (QWidget *)
 Remove widget from the group box title. More...
 
virtual QSize sizeHint () const
 Get recommended size for the widget. More...
 
virtual QSize minimumSizeHint () const
 Get recommended minimum size for the widget. More...
 
virtual bool eventFilter (QObject *, QEvent *)
 Custom event filter. More...
 
QWidgetwidget () const
 Get central widget (or first found one). More...
 
void setWidget (QWidget *)
 Set central widget to the group box. More...
 

Protected Member Functions

virtual void childEvent (QChildEvent *)
 Customize child event. More...
 
virtual void resizeEvent (QResizeEvent *)
 Customize resize event. More...
 
virtual void customEvent (QEvent *)
 Process custom events. More...
 

Private Member Functions

void initialize ()
 Initialize the group box. More...
 
void updateTitle ()
 Update the group box title. More...
 
QSize titleSize () const
 Get the group box title size. More...
 
void setInsideMargin (const int)
 Set group box's inside margin size. More...
 
QSize expandTo (const QSize &) const
 Expand group box to the specified size. More...
 

Private Attributes

QWidgetmyContainer
 

Detailed Description

The QtxGroupBox class allows inserting custom widgets in the group box title. Use insertTitleWidget() method to add custom widget to the title and removeTitleWidget() to remove it.

Constructor & Destructor Documentation

QtxGroupBox::QtxGroupBox ( QWidget parent = 0)
Parameters
parentparent widget

References initialize().

QtxGroupBox::QtxGroupBox ( const QString &  title,
QWidget parent = 0 
)
Parameters
titlegroup box title text
parentparent widget

References initialize().

QtxGroupBox::~QtxGroupBox ( )
virtual

Member Function Documentation

void QtxGroupBox::childEvent ( QChildEvent *  e)
protectedvirtual
Parameters
echild event
void QtxGroupBox::customEvent ( QEvent )
protectedvirtual
Parameters
ecustom event (not used)

References updateTitle().

bool QtxGroupBox::eventFilter ( QObject obj,
QEvent e 
)
virtual
Parameters
objevent receiver
eevent
Returns
true if event processing should be stopped

References myContainer.

QSize QtxGroupBox::expandTo ( const QSize &  sz) const
private
Parameters
sznew size

References myContainer, and titleSize().

void QtxGroupBox::initialize ( )
private

Creates horizontal box as container for title widgets.

References myContainer, and updateTitle().

void QtxGroupBox::insertTitleWidget ( QWidget wid)
virtual
Parameters
widwidget being added to the title

References myContainer, and updateTitle().

QSize QtxGroupBox::minimumSizeHint ( ) const
virtual
Returns
recommended minimum size for the widget

References expandTo().

void QtxGroupBox::removeTitleWidget ( QWidget wid)
virtual
Parameters
widwidget to be removed from the title

References myContainer, and updateTitle().

void QtxGroupBox::resizeEvent ( QResizeEvent *  e)
protectedvirtual
Parameters
eresize event

References updateTitle().

void QtxGroupBox::setInsideMargin ( const int  m)
private
Parameters
mnew inside margin size
void QtxGroupBox::setVisible ( bool  on)
virtualslot
Parameters
onif true, show group box, otherwise, hide it

References updateTitle().

void QtxGroupBox::setWidget ( QWidget wid)
Parameters
widwidget being added to the group box

References widget().

QSize QtxGroupBox::sizeHint ( ) const
virtual
Returns
recommended size for the widget

References expandTo().

QSize QtxGroupBox::titleSize ( ) const
private
Returns
title size
void QtxGroupBox::updateTitle ( )
private
QWidget * QtxGroupBox::widget ( ) const
Returns
widget

Member Data Documentation

QWidget* QtxGroupBox::myContainer
private

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