casa
5.7.0-16
|
Subclass of QLayout to have multiple widgets layered on top of each other. More...
#include <QtLayeredLayout.h>
Public Member Functions | |
QtLayeredLayout () | |
Non-Static //. More... | |
QtLayeredLayout (QWidget *parent) | |
Constructor which takes a parent (cannot be null). More... | |
~QtLayeredLayout () | |
Destructor. More... | |
QRect | geometry () const |
QLayoutItem Methods //. More... | |
bool | isEmpty () const |
Implements QLayoutItem::isEmpty(). More... | |
void | setGeometry (const QRect &r) |
Implements QLayoutItem::setGeometry(). More... | |
QSize | sizeHint () const |
Implements QLayoutItem::sizeHint(). More... | |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
QObject Methods //. More... | |
void | addItem (QLayoutItem *item) |
QLayout Methods //. More... | |
int | count () const |
Implements QLayout::count(). More... | |
Qt::Orientations | expandingDirections () const |
Overrides QLayout::expandingDirections(). More... | |
int | indexOf (QWidget *widget) const |
Overrides QLayout::indexOf(). More... | |
QLayoutItem * | itemAt (int index) const |
Implements QLayout::itemAt(). More... | |
QSize | maximumSize () const |
Overrides QLayout::maximumSize(). More... | |
QSize | minimumSize () const |
Overrides QLayout::minimumSize(). More... | |
QLayoutItem * | takeAt (int index) |
Implements QLayout::takeAt(). More... | |
void | insertItem (int index, QLayoutItem *item) |
QtLayeredLayout Methods //. More... | |
void | insertWidget (int index, QWidget *widget) |
Static Public Member Functions | |
static bool | propagateEventType (QEvent::Type type) |
Static //. More... | |
Private Member Functions | |
void | installOrRemoveSelf (QLayoutItem *item, bool install) |
Installs or removes this layout as an event filter on the given item. More... | |
void | redoParentStack () |
Redoes the sibling widget stack in the parent, if applicable. More... | |
int | layeredIndexOf (QWidget *widget) const |
Returns the layered index of the given widget, using recursive parameters. More... | |
Static Private Member Functions | |
static int | layeredIndexOf (QWidget *widget, QLayoutItem *item) |
Private Attributes | |
QList< QLayoutItem * > | itsItems_ |
Items. More... | |
QRect | itsGeometry_ |
Last set geometry. More... | |
bool | itsPropagateEvents_ |
Flag to propagate events or not. More... | |
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 41 of file QtLayeredLayout.h.
casa::QtLayeredLayout::QtLayeredLayout | ( | ) |
Non-Static //.
Constructor which takes no parent.
casa::QtLayeredLayout::QtLayeredLayout | ( | QWidget * | parent | ) |
Constructor which takes a parent (cannot be null).
casa::QtLayeredLayout::~QtLayeredLayout | ( | ) |
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 |
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 | ||
) |
|
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().
|
private |
Returns the layered index of the given widget, using recursive parameters.
|
staticprivate |
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 |
Static //.
Returns true if the given event type is propagate-able, false otherwise.
|
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().
|
private |
Last set geometry.
Definition at line 128 of file QtLayeredLayout.h.
|
private |
Items.
Definition at line 125 of file QtLayeredLayout.h.
|
private |
Flag to propagate events or not.
Definition at line 131 of file QtLayeredLayout.h.