A collection of UI-specific utility functions.
More...
#include <UiUtils.h++>
|
static void | centerWidget (QWidget *widget, QWidget *other=NULL) |
| Centers a widget on-screen or within the bounds of another widget. More...
|
|
static QPoint | cascadeWidget (QWidget *widget, const QPoint &from, int offset) |
| Cascades a widget off of a screen position. More...
|
|
static void | appendShortcutToTooltip (QAbstractButton *button) |
| Appends the textual representation of a button's shortcut, in parentheses, to that button's tooltip text. More...
|
|
static QIcon | makeColorSwatch (const QColor &color, const QSize &size) |
| Constructs a color swatch icon. More...
|
|
A collection of UI-specific utility functions.
- Author
- Mark Lindner
◆ appendShortcutToTooltip()
static void appendShortcutToTooltip |
( |
QAbstractButton * |
button | ) |
|
|
static |
Appends the textual representation of a button's shortcut, in parentheses, to that button's tooltip text.
- Parameters
-
◆ cascadeWidget()
static QPoint cascadeWidget |
( |
QWidget * |
widget, |
|
|
const QPoint & |
from, |
|
|
int |
offset |
|
) |
| |
|
static |
Cascades a widget off of a screen position.
- Parameters
-
widget | The widget to cascade. |
from | The screen coordinates of the point to cascade from. |
offset | The offset, relative to the cascade point, at which to place the widget. |
- Returns
- The cascaded position at which the widget was placed.
◆ centerWidget()
static void centerWidget |
( |
QWidget * |
widget, |
|
|
QWidget * |
other = NULL |
|
) |
| |
|
static |
Centers a widget on-screen or within the bounds of another widget.
- Parameters
-
widget | The widget to center. |
other | The widget to center within, or NULL to center on-screen. |
◆ makeColorSwatch()
static QIcon makeColorSwatch |
( |
const QColor & |
color, |
|
|
const QSize & |
size |
|
) |
| |
|
static |
Constructs a color swatch icon.
- Parameters
-
color | The fill color. |
size | The icon size. |
- Returns
- The QIcon.
The documentation for this class was generated from the following file: