![]() |
VR-Forces 4.8 Class Documentation
|
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...

Classes | |
| struct | Layout |
Public Member Functions | |
| DtToolButtonWrapperWidget (QWidget *parent, const Qt::WindowFlags &flags=0) | |
| virtual | ~DtToolButtonWrapperWidget () |
| template<typename T > | |
| T * | createPrototype () |
| template<typename T > | |
| T * | createButton () |
| template<typename T > | |
| T * | addAction (const QString &action, bool resetLayout=true) |
| Adds a new button with text. Up to caller to determine what to do with the returned tool button. More... | |
| template<typename T > | |
| T * | addAction (const QIcon &icon, bool resetLayout=true) |
| Adds a new button with an icon. More... | |
| template<typename T > | |
| T * | addAction (QAction *act, bool resetLayout=true) |
| Adds a new action into the dialog for sizing. More... | |
| virtual int | rightMarginForLine (int) const |
| If set, right margin for layout line. More... | |
| virtual void | setRightMarginForLine (int margin, int line=-1) |
| Sets the right margin for the given line. More... | |
| virtual void | removeRightMarginForLine (int line=-1) |
| Removes the margin for the line. More... | |
| virtual void | removeButton (QAbstractButton *, bool resetLayout=true) |
| Removes the button specified. Removing the button will also delete it. More... | |
| virtual void | layoutButtons (bool force=false) |
| Reworks given the the new sizes. More... | |
| virtual void | setButtons (const std::vector< QAbstractButton * > &buttons, bool deleteCurrentButtons=false) |
| Sets the buttons of this wrapper widget. More... | |
| virtual void | setLeftToRightLayout (bool) |
| If this is false (default is true) the layout will start on the right and go to the left. More... | |
| bool | leftToRightLayout () const |
| bool | needsLayout () const |
| virtual void | setSizeToFit (bool) |
| If false (default is true) will lay out buttons in the exact order they are set in instead of trying to lay them out in the most efficient use of available space. More... | |
| bool | sizeToFit () const |
| int | buttonsShown () const |
| const std::vector < QAbstractButton * > & | buttons () const |
| std::vector< QAbstractButton * > & | buttons () |
| virtual bool | hasButton (QAbstractButton *) const |
| virtual void | setIconSize (const QSize &) |
| Sets the size of the icons (default is 20x20) More... | |
| const QSize & | iconSize () const |
| virtual void | setIconSpacing (int) |
| Sets the spacing between icons. Default is 2. More... | |
| int | iconSpacing () const |
| virtual void | clear () |
| Clears all items. More... | |
| virtual void | setUseFixedWidth (bool) |
| Fix the width of the container to be the maximum width of any row (default is false) More... | |
| bool | useFixedWidth () const |
| virtual void | fixWidth () |
| virtual void | setFixedButtonWidth (int) |
| Regardless of size, the fixed button width. -1 will size to text or icon. More... | |
| int | fixedButtonWidth () const |
| virtual void | setFixedButtonHeight (int) |
| Fixed button height. More... | |
| int | fixedButtonHeight () const |
| virtual void | setShowMaximum (int) |
| Regardless of the number of buttons that could be shown, do not show more than this many. -1 means show all (default) More... | |
| int | showMaximum () const |
| virtual void | setMaximumLines (int) |
| Regardless of the number of buttons the maximum number of lines. -1 means show all (default) More... | |
| int | maximumLines () const |
| bool | reachedMaximum () const |
| int | numRows () const |
| const std::vector< Layout > & | layouts () const |
| std::vector< Layout > & | layouts () |
| virtual void | setBlockResizeLayout (bool) |
| If set to true do not trigger a layout if resized. Default is false. More... | |
| bool | blockResizeLayout () const |
| virtual void | setSignalResizeLayout (bool) |
| If set to true signal that the layout wants to be resized rather than laying it out. Default is false. More... | |
| bool | signalResizeLayout () const |
Public Attributes | |
| boost::signals2::signal< void()> | signal_resizeLayout |
| boost::signals2::signal< void(bool)> | signal_maximumReached |
| boost::signals2::signal< void()> | signal_buttonsLayedOut |
| boost::signals2::signal< void(Layout &, QAbstractButton *)> | signal_buttonLayedOut |
Protected Slots | |
| virtual void | layoutFromTimer () |
Protected Member Functions | |
| virtual void | resizeEvent (QResizeEvent *) |
| virtual void | showEvent (QShowEvent *) |
| virtual void | addToLayout (QAbstractButton *, bool forceLayout=false) |
Protected Attributes | |
| std::vector< Layout > | myLayouts |
| std::vector< QAbstractButton * > | myButtons |
| std::map< int, int > | myRightMarginForLine |
| QSize | myIconSize |
| int | myIconSpacing |
| int | myMaximumLines |
| bool | myNeedsLayout |
| bool | myReachedMaximum |
| int | myFixedButtonWidth |
| int | myFixedButtonHeight |
| bool | mySizeToFit |
| bool | myLeftToRightLayout |
| int | myShowMaximum |
| int | myButtonsShown |
| bool | myInResize |
| bool | mySetTimer |
| bool | myBlockResizeLayout |
| bool | mySignalResizeLayout |
| bool | myUseFixedWidth |
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
| makVrf::DtToolButtonWrapperWidget::DtToolButtonWrapperWidget | ( | QWidget * | parent, |
| const Qt::WindowFlags & | flags = 0 |
||
| ) |
|
virtual |
|
inline |
|
inline |
|
inline |
Adds a new button with text. Up to caller to determine what to do with the returned tool button.
|
inline |
Adds a new button with an icon.
|
inline |
Adds a new action into the dialog for sizing.
If set, right margin for layout line.
|
virtual |
Sets the right margin for the given line.
-1 means all lines. You can set -1 for all lines and then a line number for a specific line
|
virtual |
Removes the margin for the line.
|
virtual |
Removes the button specified. Removing the button will also delete it.
|
virtual |
Reworks given the the new sizes.
|
virtual |
Sets the buttons of this wrapper widget.
This widget will take ownership of buttons. Note that setting these buttons will not delete the old buttons. If you wish to delete the old buttons have the deleteCurrentButtons as true
|
virtual |
If this is false (default is true) the layout will start on the right and go to the left.
|
inline |
|
inline |
|
virtual |
If false (default is true) will lay out buttons in the exact order they are set in instead of trying to lay them out in the most efficient use of available space.
|
inline |
|
inline |
|
inline |
|
inline |
|
virtual |
|
virtual |
Sets the size of the icons (default is 20x20)
|
inline |
|
virtual |
Sets the spacing between icons. Default is 2.
|
inline |
|
virtual |
Clears all items.
|
virtual |
Fix the width of the container to be the maximum width of any row (default is false)
|
inline |
|
virtual |
|
virtual |
Regardless of size, the fixed button width. -1 will size to text or icon.
|
inline |
|
virtual |
Fixed button height.
If -1 will use default. This is only valid for buttons that are used as text. For icons use icon size
|
inline |
|
virtual |
Regardless of the number of buttons that could be shown, do not show more than this many. -1 means show all (default)
|
inline |
|
virtual |
Regardless of the number of buttons the maximum number of lines. -1 means show all (default)
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
virtual |
If set to true do not trigger a layout if resized. Default is false.
|
inline |
|
virtual |
If set to true signal that the layout wants to be resized rather than laying it out. Default is false.
|
inline |
|
protectedvirtualslot |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
| boost::signals2::signal<void ()> makVrf::DtToolButtonWrapperWidget::signal_resizeLayout |
| boost::signals2::signal<void (bool)> makVrf::DtToolButtonWrapperWidget::signal_maximumReached |
| boost::signals2::signal<void ()> makVrf::DtToolButtonWrapperWidget::signal_buttonsLayedOut |
| boost::signals2::signal<void (Layout&, QAbstractButton*)> makVrf::DtToolButtonWrapperWidget::signal_buttonLayedOut |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |