Version: 6.3.1
Public Slots | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

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.

Public Member Functions

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

Protected Member Functions

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

Private Member Functions

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

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::insertTitleWidget ( QWidget wid) [virtual]
Parameters:
widwidget being added to the title

References myContainer, and updateTitle().

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

References myContainer, and updateTitle().

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

References expandTo().

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

References expandTo().

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

References myContainer.

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

References widget().

void QtxGroupBox::setVisible ( bool  on) [virtual, slot]
Parameters:
onif true, show group box, otherwise, hide it

References updateTitle().

void QtxGroupBox::childEvent ( QChildEvent *  e) [protected, virtual]
Parameters:
echild event
void QtxGroupBox::resizeEvent ( QResizeEvent *  e) [protected, virtual]
Parameters:
eresize event

References updateTitle().

void QtxGroupBox::customEvent ( QEvent ) [protected, virtual]
Parameters:
ecustom event (not used)

References updateTitle().

void QtxGroupBox::initialize ( ) [private]

Creates horizontal box as container for title widgets.

References myContainer, and updateTitle().

void QtxGroupBox::updateTitle ( ) [private]
QSize QtxGroupBox::titleSize ( ) const [private]
Returns:
title size
void QtxGroupBox::setInsideMargin ( const int  m) [private]
Parameters:
mnew inside margin size
QSize QtxGroupBox::expandTo ( const QSize &  sz) const [private]
Parameters:
sznew size

References myContainer, and titleSize().


Field Documentation

Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS