• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • workspace API Reference
  • KDE Home
  • Contact Us
 

liblancelot

  • Lancelot
  • ColumnLayout
Classes | Public Member Functions | List of all members
Lancelot::ColumnLayout Class Reference

#include <ColumnLayout.h>

Inheritance diagram for Lancelot::ColumnLayout:
Inheritance graph
[legend]

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
 
- Public Member Functions inherited from QGraphicsLayout
 QGraphicsLayout (QGraphicsLayoutItem *parent)
 
 ~QGraphicsLayout ()
 
void activate ()
 
virtual int count () const =0
 
virtual void getContentsMargins (qreal *left, qreal *top, qreal *right, qreal *bottom) const
 
virtual void invalidate ()
 
bool isActivated () const
 
virtual QGraphicsLayoutItem * itemAt (int i) const =0
 
virtual void removeAt (int index)=0
 
void setContentsMargins (qreal left, qreal top, qreal right, qreal bottom)
 
virtual void updateGeometry ()
 
virtual void widgetEvent (QEvent *e)
 
- Public Member Functions inherited from QGraphicsLayoutItem
 QGraphicsLayoutItem (QGraphicsLayoutItem *parent, bool isLayout)
 
virtual  ~QGraphicsLayoutItem ()
 
QRectF contentsRect () const
 
QSizeF effectiveSizeHint (Qt::SizeHint which, const QSizeF &constraint) const
 
QRectF geometry () const
 
QGraphicsItem * graphicsItem () const
 
bool isLayout () const
 
qreal maximumHeight () const
 
QSizeF maximumSize () const
 
qreal maximumWidth () const
 
qreal minimumHeight () const
 
QSizeF minimumSize () const
 
qreal minimumWidth () const
 
bool ownedByLayout () const
 
QGraphicsLayoutItem * parentLayoutItem () const
 
qreal preferredHeight () const
 
QSizeF preferredSize () const
 
qreal preferredWidth () const
 
void setMaximumHeight (qreal height)
 
void setMaximumSize (const QSizeF &size)
 
void setMaximumSize (qreal w, qreal h)
 
void setMaximumWidth (qreal width)
 
void setMinimumHeight (qreal height)
 
void setMinimumSize (const QSizeF &size)
 
void setMinimumSize (qreal w, qreal h)
 
void setMinimumWidth (qreal width)
 
void setParentLayoutItem (QGraphicsLayoutItem *parent)
 
void setPreferredHeight (qreal height)
 
void setPreferredSize (const QSizeF &size)
 
void setPreferredSize (qreal w, qreal h)
 
void setPreferredWidth (qreal width)
 
void setSizePolicy (const QSizePolicy &policy)
 
void setSizePolicy (QSizePolicy::Policy hPolicy, QSizePolicy::Policy vPolicy, QSizePolicy::ControlType controlType)
 
QSizePolicy sizePolicy () const
 

Additional Inherited Members

- Static Public Member Functions inherited from QGraphicsLayout
bool instantInvalidatePropagation ()
 
void setInstantInvalidatePropagation (bool enable)
 
- Protected Member Functions inherited from QGraphicsLayout
void addChildLayoutItem (QGraphicsLayoutItem *layoutItem)
 
- Protected Member Functions inherited from QGraphicsLayoutItem
void setGraphicsItem (QGraphicsItem *item)
 
void setOwnedByLayout (bool ownership)
 
virtual QSizeF sizeHint (Qt::SizeHint which, const QSizeF &constraint) const =0
 

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
parentparent 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)

Not implemented.

See class description.

Definition at line 313 of file ColumnLayout.cpp.

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)
virtual

Reimplemented from QGraphicsLayoutItem.

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:
  • ColumnLayout.h
  • ColumnLayout.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:43:01 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

liblancelot

Skip menu "liblancelot"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

workspace API Reference

Skip menu "workspace API Reference"
  • kdeplasma-addons
  •       GroupingDesktop
  •     liblancelot

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal