The EditorToolbox class provides some useful general purpose methods for editors (i.e. GUI stuff)
More...
#include <editortoolbox.h>
The EditorToolbox class provides some useful general purpose methods for editors (i.e. GUI stuff)
◆ EditorToolbox() [1/2]
◆ EditorToolbox() [2/2]
◆ ~EditorToolbox()
◆ operator=()
◆ svgIcon()
QIcon svgIcon |
( |
const QString & |
file | ) |
|
|
staticnoexcept |
Load a SVG QIcon which is properly colorized.
- Parameters
-
file | Resource file path (e.g. ":/fa/solid/globe.svg") |
- Returns
- A QIcon with the colorized SVG
◆ 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.
◆ getComponentResources()
Collect all relevant resources for a given component instance.
Resources will be collected from both the workspace library and the project library.
- Parameters
-
db | Workspace library database. |
cmp | Component instance |
filterDev | If provided, only get resources for these devices. Otherwise, resources for all devices are returned. |
- Returns
- List of all relevant resources.
◆ addResourcesToMenu()
Add relevant resources of a component instance to a context menu.
This calls getComponentResources() and then adds the results to a context menu.
- Parameters
-
◆ 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 |
◆ searchAndOpenDatasheet()
void searchAndOpenDatasheet |
( |
const Workspace & |
ws, |
|
|
const QString & |
mpn, |
|
|
const QString & |
manufacturer, |
|
|
QPointer< QWidget > |
parent |
|
) |
| |
|
staticprivatenoexcept |
The documentation for this class was generated from the following files: