casa
$Rev:20696$
|
Subclass of QLayout to have multiple widgets layered on top of each other. More...
#include <QtLayeredLayout.h>
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. |
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.
Non-Static //.
Constructor which takes no parent.
casa::QtLayeredLayout::QtLayeredLayout | ( | QWidget * | parent | ) |
Constructor which takes a parent (cannot be null).
Destructor.
void casa::QtLayeredLayout::addItem | ( | QLayoutItem * | item | ) |
QLayout Methods //.
Implements QLayout::addItem(). Does not add duplicates.
int casa::QtLayeredLayout::count | ( | ) | const |
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().
QRect casa::QtLayeredLayout::geometry | ( | ) | const |
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.
bool casa::QtLayeredLayout::isEmpty | ( | ) | const |
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] |
QSize casa::QtLayeredLayout::maximumSize | ( | ) | const |
Overrides QLayout::maximumSize().
Returns the smallest valid maximum size for its items.
QSize casa::QtLayeredLayout::minimumSize | ( | ) | const |
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.
void casa::QtLayeredLayout::redoParentStack | ( | ) | [private] |
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.
QSize casa::QtLayeredLayout::sizeHint | ( | ) | const |
Implements QLayoutItem::sizeHint().
Returns minimumSizeHint().
QLayoutItem* casa::QtLayeredLayout::takeAt | ( | int | index | ) |
Implements QLayout::takeAt().
QRect casa::QtLayeredLayout::itsGeometry_ [private] |
Last set geometry.
Definition at line 131 of file QtLayeredLayout.h.
QList<QLayoutItem*> casa::QtLayeredLayout::itsItems_ [private] |
bool casa::QtLayeredLayout::itsPropagateEvents_ [private] |
Flag to propagate events or not.
Definition at line 134 of file QtLayeredLayout.h.