[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 38 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 49 of file klfflowlayout.h.

Constructor & Destructor Documentation

◆ KLFFlowLayout()

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

Definition at line 417 of file klfflowlayout.cpp.

◆ ~KLFFlowLayout()

KLFFlowLayout::~KLFFlowLayout ( )
virtual

Definition at line 429 of file klfflowlayout.cpp.

Member Function Documentation

◆ addItem() [1/2]

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

◆ addItem() [2/2]

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

Definition at line 445 of file klfflowlayout.cpp.

References invalidate().

◆ addLayout()

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

Definition at line 463 of file klfflowlayout.cpp.

References addItem(), and horizontalSpacing().

Referenced by addItem().

◆ addWidget()

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

◆ clearAll

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

Definition at line 582 of file klfflowlayout.cpp.

References takeAt().

Referenced by addItem(), and KLFColorChooseWidget::setAlphaEnabled().

◆ count()

int KLFFlowLayout::count ( ) const
virtual

Definition at line 497 of file klfflowlayout.cpp.

Referenced by addItem().

◆ event()

bool KLFFlowLayout::event ( QEvent event)
virtual

Definition at line 435 of file klfflowlayout.cpp.

Referenced by addItem().

◆ eventFilter()

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

Definition at line 440 of file klfflowlayout.cpp.

Referenced by addItem().

◆ expandingDirections()

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

Definition at line 522 of file klfflowlayout.cpp.

Referenced by addItem().

◆ flush()

Flush KLFFlowLayout::flush ( ) const

Referenced by addItem(), and setVerticalSpacing().

◆ hasHeightForWidth()

bool KLFFlowLayout::hasHeightForWidth ( ) const
virtual

Definition at line 527 of file klfflowlayout.cpp.

Referenced by addItem().

◆ heightForWidth()

int KLFFlowLayout::heightForWidth ( int  width) const
virtual

Definition at line 531 of file klfflowlayout.cpp.

Referenced by addItem().

◆ horizontalSpacing()

int KLFFlowLayout::horizontalSpacing ( ) const

Referenced by addItem(), and addLayout().

◆ invalidate()

void KLFFlowLayout::invalidate ( )
virtual

◆ itemAt()

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

Definition at line 501 of file klfflowlayout.cpp.

Referenced by addItem().

◆ maximumSize()

QSize KLFFlowLayout::maximumSize ( ) const
virtual

Definition at line 548 of file klfflowlayout.cpp.

References QSize::expandedTo(), and klfDbg.

Referenced by addItem().

◆ minimumSize()

QSize KLFFlowLayout::minimumSize ( ) const
virtual

Definition at line 540 of file klfflowlayout.cpp.

References klfDbg.

Referenced by addItem().

◆ setFlush

void KLFFlowLayout::setFlush ( Flush  f)
slot

◆ setGeometry()

void KLFFlowLayout::setGeometry ( const QRect rect)

Definition at line 555 of file klfflowlayout.cpp.

References invalidate(), KLF_DEBUG_BLOCK, KLF_FUNC_NAME, and klfDbg.

Referenced by addItem().

◆ setHorizontalSpacing

void KLFFlowLayout::setHorizontalSpacing ( int  spacing)
slot

Definition at line 473 of file klfflowlayout.cpp.

References invalidate(), and verticalSpacing().

Referenced by addItem().

◆ setVerticalSpacing

void KLFFlowLayout::setVerticalSpacing ( int  spacing)
slot

Definition at line 482 of file klfflowlayout.cpp.

References flush(), and invalidate().

Referenced by addItem().

◆ sizeHint()

QSize KLFFlowLayout::sizeHint ( ) const
virtual

Definition at line 567 of file klfflowlayout.cpp.

References klfDbg.

Referenced by addItem().

◆ takeAt()

QLayoutItem * KLFFlowLayout::takeAt ( int  index)
virtual

Definition at line 509 of file klfflowlayout.cpp.

Referenced by addItem(), and clearAll().

◆ verticalSpacing()

int KLFFlowLayout::verticalSpacing ( ) const

Referenced by addItem(), and setHorizontalSpacing().

Property Documentation

◆ flush

KLFFlowLayout::Flush KLFFlowLayout::flush
readwrite

Definition at line 43 of file klfflowlayout.h.

◆ horizontalSpacing

int KLFFlowLayout::horizontalSpacing
readwrite

Definition at line 43 of file klfflowlayout.h.

◆ verticalSpacing

int KLFFlowLayout::verticalSpacing
readwrite

Definition at line 44 of file klfflowlayout.h.


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

Generated by doxygen 1.8.13