VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Protected Member Functions | Protected Attributes
makVrf::DtToolButtonWrapperWidget Class Reference

This class will try and space out items such that they will wrap to multiple rows if buttons (or text) of actions are wider than the width of the widget. More...

Inheritance diagram for makVrf::DtToolButtonWrapperWidget:
Inheritance graph
[legend]

Classes

struct  Layout

Public Member Functions

 DtToolButtonWrapperWidget (QWidget *parent, const Qt::WindowFlags &flags=0)
virtual ~DtToolButtonWrapperWidget ()
virtual QToolButtonaddAction (QAction *)
 Adds a new action into the dialog for sizing.
virtual void layoutButtons ()
 Reworks given the the new sizes.
virtual void setIconSize (const QSize &)
 Sets the size of the icons (default is 20x20)
const QSize & iconSize () const
virtual void setIconSpacing (int)
 Sets the spacing between icons. Default is 2.
int iconSpacing () const
virtual void clear ()
 Clears all items.

Protected Member Functions

virtual void resizeEvent (QResizeEvent *)
virtual void showEvent (QShowEvent *)
virtual void addToLayout (QToolButton *)

Protected Attributes

std::vector< LayoutmyLayouts
std::vector< QToolButton * > myButtons
QSize myIconSize
int myIconSpacing
bool myNeedsLayout

Detailed Description

This class will try and space out items such that they will wrap to multiple rows if buttons (or text) of actions are wider than the width of the widget.

Each row will be broken up into chunks of icon width wide items + spacing. If there is text it will take up that many columns on a line. If it is widget than a whole line it will be on it's own line, cut off at the maximum length

Constructor & Destructor Documentation

makVrf::DtToolButtonWrapperWidget::DtToolButtonWrapperWidget ( QWidget parent,
const Qt::WindowFlags &  flags = 0 
)
virtual makVrf::DtToolButtonWrapperWidget::~DtToolButtonWrapperWidget ( )
virtual

Member Function Documentation

virtual QToolButton* makVrf::DtToolButtonWrapperWidget::addAction ( QAction )
virtual

Adds a new action into the dialog for sizing.

virtual void makVrf::DtToolButtonWrapperWidget::layoutButtons ( )
virtual

Reworks given the the new sizes.

virtual void makVrf::DtToolButtonWrapperWidget::setIconSize ( const QSize &  )
virtual

Sets the size of the icons (default is 20x20)

const QSize& makVrf::DtToolButtonWrapperWidget::iconSize ( ) const
inline
virtual void makVrf::DtToolButtonWrapperWidget::setIconSpacing ( int  )
virtual

Sets the spacing between icons. Default is 2.

int makVrf::DtToolButtonWrapperWidget::iconSpacing ( ) const
inline
virtual void makVrf::DtToolButtonWrapperWidget::clear ( )
virtual

Clears all items.

virtual void makVrf::DtToolButtonWrapperWidget::resizeEvent ( QResizeEvent *  )
protectedvirtual
virtual void makVrf::DtToolButtonWrapperWidget::showEvent ( QShowEvent *  )
protectedvirtual
virtual void makVrf::DtToolButtonWrapperWidget::addToLayout ( QToolButton )
protectedvirtual

Member Data Documentation

std::vector<Layout> makVrf::DtToolButtonWrapperWidget::myLayouts
protected
std::vector<QToolButton*> makVrf::DtToolButtonWrapperWidget::myButtons
protected
QSize makVrf::DtToolButtonWrapperWidget::myIconSize
protected
int makVrf::DtToolButtonWrapperWidget::myIconSpacing
protected
bool makVrf::DtToolButtonWrapperWidget::myNeedsLayout
protected

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

Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)