liblancelot
#include <ColumnLayout.h>
Classes | |
class | ColumnSizer |
Public Member Functions | |
ColumnLayout (QGraphicsLayoutItem *parent=0) | |
~ColumnLayout () | |
int | columnCount () const |
L_Override int | count () const |
L_Override QGraphicsLayoutItem * | itemAt (int i) const |
QGraphicsWidget * | pop () |
void | push (QGraphicsWidget *widget) |
L_Override void | removeAt (int index) |
void | setColumnCount (int count) |
L_Override void | setGeometry (const QRectF &rect) |
void | setSizer (ColumnSizer *sizer) |
L_Override QSizeF | sizeHint (Qt::SizeHint which, const QSizeF &constraint=QSizeF()) const |
ColumnSizer * | sizer () const |
Detailed Description
This layout is not a general purpose layout, and should not be used as such.
Column layout shows items in columns. It shows only n last items pushed into it. Items can be pushed and popped like on stack, inserting an item before the end of the list is not supported, and, likewise, removing items except the last one is not supported.
To make that clear, pop and push functions are introduced. Trying to invoke one of the standard item manipulation functions from QGraphicsLayout will do nothing.
Since ColumnLayout needs the ability to hide certain items in it, it works only for QGraphicsWidget subclasses.
Definition at line 49 of file ColumnLayout.h.
Constructor & Destructor Documentation
Lancelot::ColumnLayout::ColumnLayout | ( | QGraphicsLayoutItem * | parent = 0 | ) |
Creates a new Lancelot::ColumnLayout.
- Parameters
-
parent parent layout item
Definition at line 302 of file ColumnLayout.cpp.
Lancelot::ColumnLayout::~ColumnLayout | ( | ) |
Destroys Lancelot::ColumnLayout.
Definition at line 308 of file ColumnLayout.cpp.
Member Function Documentation
int Lancelot::ColumnLayout::columnCount | ( | ) | const |
- Returns
- the number of visible columns
Definition at line 297 of file ColumnLayout.cpp.
int Lancelot::ColumnLayout::count | ( | ) | const |
Definition at line 323 of file ColumnLayout.cpp.
QGraphicsLayoutItem * Lancelot::ColumnLayout::itemAt | ( | int | i | ) | const |
Definition at line 318 of file ColumnLayout.cpp.
QGraphicsWidget * Lancelot::ColumnLayout::pop | ( | ) |
Removes the last widget from the stack and returns it.
- Returns
- the last widget in stack
Definition at line 285 of file ColumnLayout.cpp.
void Lancelot::ColumnLayout::push | ( | QGraphicsWidget * | widget | ) |
Pushes the specified widget to the end of stack.
Definition at line 280 of file ColumnLayout.cpp.
void Lancelot::ColumnLayout::removeAt | ( | int | index | ) |
void Lancelot::ColumnLayout::setColumnCount | ( | int | count | ) |
Sets the maximum number of visible columns.
Definition at line 290 of file ColumnLayout.cpp.
void Lancelot::ColumnLayout::setGeometry | ( | const QRectF & | rect | ) |
Definition at line 328 of file ColumnLayout.cpp.
void Lancelot::ColumnLayout::setSizer | ( | ColumnLayout::ColumnSizer * | sizer | ) |
Sets the ColumnSizer object.
Definition at line 260 of file ColumnLayout.cpp.
QSizeF Lancelot::ColumnLayout::sizeHint | ( | Qt::SizeHint | which, |
const QSizeF & | constraint = QSizeF() |
||
) | const |
Definition at line 272 of file ColumnLayout.cpp.
ColumnLayout::ColumnSizer * Lancelot::ColumnLayout::sizer | ( | ) | const |
- Returns
- the current ColumnSizer
Definition at line 267 of file ColumnLayout.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Mon Oct 13 2014 22:55:07 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.