casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
casa::QtLayeredLayout Class Reference

Subclass of QLayout to have multiple widgets layered on top of each other. More...

#include <QtLayeredLayout.h>

List of all members.

Public Member Functions

 QtLayeredLayout ()
 Non-Static //.
 QtLayeredLayout (QWidget *parent)
 Constructor which takes a parent (cannot be null).
 ~QtLayeredLayout ()
 Destructor.
QRect geometry () const
 QLayoutItem Methods //.
bool isEmpty () const
 Implements QLayoutItem::isEmpty().
void setGeometry (const QRect &r)
 Implements QLayoutItem::setGeometry().
QSize sizeHint () const
 Implements QLayoutItem::sizeHint().
virtual bool eventFilter (QObject *watched, QEvent *event)
 QObject Methods //.
void addItem (QLayoutItem *item)
 QLayout Methods //.
int count () const
 Implements QLayout::count().
Qt::Orientations expandingDirections () const
 Overrides QLayout::expandingDirections().
int indexOf (QWidget *widget) const
 Overrides QLayout::indexOf().
QLayoutItem * itemAt (int index) const
 Implements QLayout::itemAt().
QSize maximumSize () const
 Overrides QLayout::maximumSize().
QSize minimumSize () const
 Overrides QLayout::minimumSize().
QLayoutItem * takeAt (int index)
 Implements QLayout::takeAt().
void insertItem (int index, QLayoutItem *item)
 QtLayeredLayout Methods //.
void insertWidget (int index, QWidget *widget)

Static Public Member Functions

static bool propagateEventType (QEvent::Type type)
 Static //.

Private Member Functions

void installOrRemoveSelf (QLayoutItem *item, bool install)
 Installs or removes this layout as an event filter on the given item.
void redoParentStack ()
 Redoes the sibling widget stack in the parent, if applicable.
int layeredIndexOf (QWidget *widget) const
 Returns the layered index of the given widget, using recursive parameters.

Static Private Member Functions

static int layeredIndexOf (QWidget *widget, QLayoutItem *item)

Private Attributes

QList< QLayoutItem * > itsItems_
 
     

QRect itsGeometry_
 Last set geometry.
bool itsPropagateEvents_
 Flag to propagate events or not.

Detailed Description

Subclass of QLayout to have multiple widgets layered on top of each other.

Since the top widget will be the only one who receives certain types of Qt events, the layout can also propagate events to lower children if desired. NOTE: EVENT PROPAGATION IS NOT CURRENTLY WORKING.

Definition at line 44 of file QtLayeredLayout.h.


Constructor & Destructor Documentation

Non-Static //.

Constructor which takes no parent.

Constructor which takes a parent (cannot be null).

Destructor.


Member Function Documentation

void casa::QtLayeredLayout::addItem ( QLayoutItem *  item)

QLayout Methods //.

Implements QLayout::addItem(). Does not add duplicates.

Implements QLayout::count().

virtual bool casa::QtLayeredLayout::eventFilter ( QObject *  watched,
QEvent *  event 
) [virtual]

QObject Methods //.

Overrides QObject::eventFilter() to propagate events as needed.

Qt::Orientations casa::QtLayeredLayout::expandingDirections ( ) const

Overrides QLayout::expandingDirections().

QLayoutItem Methods //.

Implements QLayoutItem::geometry(). Returns the last geometry set using setGeometry().

int casa::QtLayeredLayout::indexOf ( QWidget *  widget) const

Overrides QLayout::indexOf().

void casa::QtLayeredLayout::insertItem ( int  index,
QLayoutItem *  item 
)

QtLayeredLayout Methods //.

Inserts the given item at the given index. If index is outside the bounds of the item list, the item is inserted at the end. Null or duplicate items are not inserted.

void casa::QtLayeredLayout::insertWidget ( int  index,
QWidget *  widget 
)
void casa::QtLayeredLayout::installOrRemoveSelf ( QLayoutItem *  item,
bool  install 
) [private]

Installs or removes this layout as an event filter on the given item.

Implements QLayoutItem::isEmpty().

QLayoutItem* casa::QtLayeredLayout::itemAt ( int  index) const

Implements QLayout::itemAt().

int casa::QtLayeredLayout::layeredIndexOf ( QWidget *  widget) const [private]

Returns the layered index of the given widget, using recursive parameters.

static int casa::QtLayeredLayout::layeredIndexOf ( QWidget *  widget,
QLayoutItem *  item 
) [static, private]

Overrides QLayout::maximumSize().

Returns the smallest valid maximum size for its items.

Overrides QLayout::minimumSize().

Returns the largest valid minimum size for its items.

static bool casa::QtLayeredLayout::propagateEventType ( QEvent::Type  type) [static]

Static //.

Returns true if the given event type is propagate-able, false otherwise.

Redoes the sibling widget stack in the parent, if applicable.

void casa::QtLayeredLayout::setGeometry ( const QRect &  r)

Implements QLayoutItem::setGeometry().

Sets the geometry of all children to the given.

Implements QLayoutItem::sizeHint().

Returns minimumSizeHint().

QLayoutItem* casa::QtLayeredLayout::takeAt ( int  index)

Implements QLayout::takeAt().


Member Data Documentation

Last set geometry.

Definition at line 131 of file QtLayeredLayout.h.

QList<QLayoutItem*> casa::QtLayeredLayout::itsItems_ [private]

     

Items.

Definition at line 128 of file QtLayeredLayout.h.

Flag to propagate events or not.

Definition at line 134 of file QtLayeredLayout.h.


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