The EditorToolbox class provides some useful general purpose methods for editors (i.e. GUI stuff)
More...
#include <editortoolbox.h>
|
static bool | isWindowBackgroundDark () noexcept |
| Detect if the default (theme dependent) window background is dark.
|
|
static void | removeFormLayoutRow (QLabel &label) noexcept |
| Remove (hide) a whole row in a QFormLayout.
|
|
static void | deleteLayoutItemRecursively (QLayoutItem *item) noexcept |
| Delete a QLayout item with all its children.
|
|
static bool | startToolBarTabFocusCycle (QToolBar &toolBar, QWidget &returnFocusToWidget) noexcept |
| Set the focus to the first widget of a toolbar and iterate through.
|
|
The EditorToolbox class provides some useful general purpose methods for editors (i.e. GUI stuff)
◆ EditorToolbox() [1/2]
◆ EditorToolbox() [2/2]
◆ ~EditorToolbox()
◆ operator=()
◆ isWindowBackgroundDark()
bool isWindowBackgroundDark |
( |
| ) |
|
|
staticnoexcept |
Detect if the default (theme dependent) window background is dark.
- Return values
-
true | Background is considered dark |
false | Background is considered light or could not be determined |
◆ removeFormLayoutRow() [1/2]
void removeFormLayoutRow |
( |
QLabel & |
label | ) |
|
|
staticnoexcept |
Remove (hide) a whole row in a QFormLayout.
- Parameters
-
label | The label of the row to remove. |
◆ deleteLayoutItemRecursively()
void deleteLayoutItemRecursively |
( |
QLayoutItem * |
item | ) |
|
|
staticnoexcept |
Delete a QLayout item with all its children.
- Parameters
-
item | The item to delete. Must not be nullptr! |
◆ startToolBarTabFocusCycle()
bool startToolBarTabFocusCycle |
( |
QToolBar & |
toolBar, |
|
|
QWidget & |
returnFocusToWidget |
|
) |
| |
|
staticnoexcept |
Set the focus to the first widget of a toolbar and iterate through.
- The tab order of all widgets of the passed toolbar will be configured from left to right resp. top to bottom.
- After the last widget, the tab order is followed by a custom widget.
- The first widget of the passed toolbar will get the focus.
Intended for the command toolbar to enter focus from the graphics view, navigate though all the toolbar widgets, and then return the focus back to the graphics view.
- Parameters
-
toolBar | The toolbar to set the focus. |
returnFocusToWidget | Widget which shall have the focus after the last widget of the toolbar. |
- Returns
- True if there was at least one widget and the focus has been set. False if there was no widget and the focus was not set.
◆ removeFormLayoutRow() [2/2]
bool removeFormLayoutRow |
( |
QLayout & |
layout, |
|
|
QLabel & |
label |
|
) |
| |
|
staticprivatenoexcept |
Helper for removeFormLayoutRow(QLabel&)
- Parameters
-
layout | The layout to look for the label. |
label | The label to remove from the layout. |
- Return values
-
true | on success. |
false | if the label was not found in a form layout. |
◆ hideLayoutItem()
void hideLayoutItem |
( |
QLayoutItem & |
item | ) |
|
|
staticprivatenoexcept |
The documentation for this class was generated from the following files: