[KLF Backend][KLF Tools][KLF Home]
KLatexFormula Project
Public Types | Public Slots | Public Member Functions | Properties | List of all members
KLFFlowLayout Class Reference

A Layout that places widgets left to right, top to bottom. More...

#include <klfflowlayout.h>

Inheritance diagram for KLFFlowLayout:
Inheritance graph
[legend]
Collaboration diagram for KLFFlowLayout:
Collaboration graph
[legend]

Public Types

enum  Flush { NoFlush = 0, FlushSparse, FlushBegin, FlushEnd }
 

Public Slots

void clearAll (bool deleteItems=true)
 
void setHorizontalSpacing (int spacing)
 
void setVerticalSpacing (int spacing)
 
void setFlush (Flush f)
 

Public Member Functions

 KLFFlowLayout (QWidget *parent, int margin=-1, int hspacing=-1, int vspacing=-1)
 
virtual ~KLFFlowLayout ()
 
virtual void addItem (QLayoutItem *item)
 
virtual void addItem (QLayoutItem *item, int hstretch, int vstretch)
 
virtual void addLayout (QLayout *l, int hstretch=0, int vstretch=0)
 
virtual void addWidget (QWidget *w, int hstretch=0, int vstretch=0, Qt::Alignment align=0)
 
int horizontalSpacing () const
 
int verticalSpacing () const
 
Flush flush () const
 
virtual int count () const
 
virtual QLayoutItem * itemAt (int index) const
 
virtual QLayoutItem * takeAt (int index)
 
virtual Qt::Orientations expandingDirections () const
 
virtual bool hasHeightForWidth () const
 
virtual int heightForWidth (int width) const
 
virtual QSize minimumSize () const
 
virtual QSize maximumSize () const
 
virtual QSize sizeHint () const
 
void setGeometry (const QRect &rect)
 
virtual void invalidate ()
 
virtual bool event (QEvent *event)
 
virtual bool eventFilter (QObject *obj, QEvent *event)
 

Properties

Flush flush
 
int horizontalSpacing
 
int verticalSpacing
 

Detailed Description

A Layout that places widgets left to right, top to bottom.

Definition at line 37 of file klfflowlayout.h.

Member Enumeration Documentation

◆ Flush

How to deal with too much space:

Enumerator
NoFlush 

Give the extra space to the widgets to stretch, don't flush.

FlushSparse 

Distribute the extra space inbetween the widgets to fill the line.

FlushBegin 

Leave all extra space at end of line.

FlushEnd 

Leave all extra space at beginning of line.

Definition at line 48 of file klfflowlayout.h.

Constructor & Destructor Documentation

◆ KLFFlowLayout()

KLFFlowLayout::KLFFlowLayout ( QWidget *  parent,
int  margin = -1,
int  hspacing = -1,
int  vspacing = -1 
)

Definition at line 416 of file klfflowlayout.cpp.

◆ ~KLFFlowLayout()

KLFFlowLayout::~KLFFlowLayout ( )
virtual

Definition at line 428 of file klfflowlayout.cpp.

Member Function Documentation

◆ addItem() [1/2]

virtual void KLFFlowLayout::addItem ( QLayoutItem *  item)
inlinevirtual

Add a QLayoutItem to the layout. Ownership of the object is taken by the layout: it will be deleted by the layout.

Definition at line 60 of file klfflowlayout.h.

◆ addItem() [2/2]

void KLFFlowLayout::addItem ( QLayoutItem *  item,
int  hstretch,
int  vstretch 
)
virtual

Definition at line 444 of file klfflowlayout.cpp.

References invalidate().

◆ addLayout()

void KLFFlowLayout::addLayout ( QLayout *  l,
int  hstretch = 0,
int  vstretch = 0 
)
virtual

Definition at line 462 of file klfflowlayout.cpp.

◆ addWidget()

void KLFFlowLayout::addWidget ( QWidget *  w,
int  hstretch = 0,
int  vstretch = 0,
Qt::Alignment  align = 0 
)
virtual

Definition at line 452 of file klfflowlayout.cpp.

Referenced by KLFFlowListWidget::insertItem().

◆ clearAll

void KLFFlowLayout::clearAll ( bool  deleteItems = true)
slot

Definition at line 581 of file klfflowlayout.cpp.

References takeAt().

◆ count()

int KLFFlowLayout::count ( ) const
virtual

Definition at line 496 of file klfflowlayout.cpp.

◆ event()

bool KLFFlowLayout::event ( QEvent event)
virtual

Definition at line 434 of file klfflowlayout.cpp.

Referenced by eventFilter().

◆ eventFilter()

bool KLFFlowLayout::eventFilter ( QObject obj,
QEvent event 
)
virtual

Definition at line 439 of file klfflowlayout.cpp.

References event().

◆ expandingDirections()

Qt::Orientations KLFFlowLayout::expandingDirections ( ) const
virtual

Definition at line 521 of file klfflowlayout.cpp.

◆ flush()

Flush KLFFlowLayout::flush ( ) const

◆ hasHeightForWidth()

bool KLFFlowLayout::hasHeightForWidth ( ) const
virtual

Definition at line 526 of file klfflowlayout.cpp.

◆ heightForWidth()

int KLFFlowLayout::heightForWidth ( int  width) const
virtual

Definition at line 530 of file klfflowlayout.cpp.

◆ horizontalSpacing()

int KLFFlowLayout::horizontalSpacing ( ) const

◆ invalidate()

void KLFFlowLayout::invalidate ( )
virtual

Definition at line 574 of file klfflowlayout.cpp.

Referenced by addItem().

◆ itemAt()

QLayoutItem * KLFFlowLayout::itemAt ( int  index) const
virtual

Definition at line 500 of file klfflowlayout.cpp.

◆ maximumSize()

QSize KLFFlowLayout::maximumSize ( ) const
virtual

Definition at line 547 of file klfflowlayout.cpp.

◆ minimumSize()

QSize KLFFlowLayout::minimumSize ( ) const
virtual

Definition at line 539 of file klfflowlayout.cpp.

◆ setFlush

void KLFFlowLayout::setFlush ( Flush  f)
slot

◆ setGeometry()

void KLFFlowLayout::setGeometry ( const QRect rect)

Definition at line 554 of file klfflowlayout.cpp.

◆ setHorizontalSpacing

void KLFFlowLayout::setHorizontalSpacing ( int  spacing)
slot

Definition at line 472 of file klfflowlayout.cpp.

◆ setVerticalSpacing

void KLFFlowLayout::setVerticalSpacing ( int  spacing)
slot

Definition at line 481 of file klfflowlayout.cpp.

◆ sizeHint()

QSize KLFFlowLayout::sizeHint ( ) const
virtual

Definition at line 566 of file klfflowlayout.cpp.

◆ takeAt()

QLayoutItem * KLFFlowLayout::takeAt ( int  index)
virtual

Definition at line 508 of file klfflowlayout.cpp.

Referenced by clearAll().

◆ verticalSpacing()

int KLFFlowLayout::verticalSpacing ( ) const

Property Documentation

◆ flush

KLFFlowLayout::Flush KLFFlowLayout::flush
readwrite

Definition at line 42 of file klfflowlayout.h.

◆ horizontalSpacing

int KLFFlowLayout::horizontalSpacing
readwrite

Definition at line 42 of file klfflowlayout.h.

◆ verticalSpacing

int KLFFlowLayout::verticalSpacing
readwrite

Definition at line 43 of file klfflowlayout.h.


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

Generated by doxygen 1.8.16