Provides a collection of tools around QWidget.
More...
#include <qttools/gui/qwidget_utils.h>
|
| template<typename PARENT_WIDGET > |
| static PARENT_WIDGET * | findFirstParentWidget (QWidget *widget) |
| | Searches up in the direct parents of widget the first ancestor being of type PARENT_WIDGET. More...
|
| |
| template<typename PARENT_WIDGET > |
| static PARENT_WIDGET * | findLastParentWidget (QWidget *widget) |
| | Searches up in the direct parents of widget the last ancestor being of type PARENT_WIDGET. More...
|
| |
| static void | wrapWidgetInDialog (QWidget *widget, QDialog *dialog) |
| | Make widget the central widget of dialog. More...
|
| |
| static void | addContentsWidget (QWidget *containerWidget, QWidget *contentsWidget) |
| |
| static QPoint | globalPos (const QWidget *widget, Qt::Corner widgetCorner) |
| |
| static void | moveWidgetRightTo (QWidget *widget, const QWidget *nextTo) |
| |
| static void | moveWidgetLeftTo (QWidget *widget, const QWidget *nextTo) |
| |
| static QPair< int, int > | horizAndVertScrollValue (const QAbstractScrollArea *area) |
| |
| static void | setHorizAndVertScrollValue (QAbstractScrollArea *area, const QPair< int, int > &values) |
| |
| static void | asyncDialogExec (QDialog *dialog) |
| |
| static void | asyncMenuExec (QMenu *menu, const QPoint &pos=QCursor::pos()) |
| |
| static QMessageBox * | asyncMsgBoxInfo (QWidget *parent, const QString &title, const QString &text, QMessageBox::StandardButtons buttons=QMessageBox::Ok) |
| |
| static QMessageBox * | asyncMsgBoxWarning (QWidget *parent, const QString &title, const QString &text, QMessageBox::StandardButtons buttons=QMessageBox::Ok) |
| |
| static QMessageBox * | asyncMsgBoxCritical (QWidget *parent, const QString &title, const QString &text, QMessageBox::StandardButtons buttons=QMessageBox::Ok) |
| |
Provides a collection of tools around QWidget.
| void qtgui::QWidgetUtils::addContentsWidget |
( |
QWidget * |
containerWidget, |
|
|
QWidget * |
contentsWidget |
|
) |
| |
|
static |
Add contentsWidget to containerWidget
If containerWidget is empty, a QBoxLayout is created to receive contentsWidget
| void qtgui::QWidgetUtils::asyncDialogExec |
( |
QDialog * |
dialog | ) |
|
|
static |
Executes dialog asynchronously
| void qtgui::QWidgetUtils::asyncMenuExec |
( |
QMenu * |
menu, |
|
|
const QPoint & |
pos = QCursor::pos() |
|
) |
| |
|
static |
Executes menu asynchronously
| QMessageBox * qtgui::QWidgetUtils::asyncMsgBoxCritical |
( |
QWidget * |
parent, |
|
|
const QString & |
title, |
|
|
const QString & |
text, |
|
|
QMessageBox::StandardButtons |
buttons = QMessageBox::Ok |
|
) |
| |
|
static |
Executes message box critical asynchronously
| QMessageBox * qtgui::QWidgetUtils::asyncMsgBoxInfo |
( |
QWidget * |
parent, |
|
|
const QString & |
title, |
|
|
const QString & |
text, |
|
|
QMessageBox::StandardButtons |
buttons = QMessageBox::Ok |
|
) |
| |
|
static |
Executes message box information asynchronously
| QMessageBox * qtgui::QWidgetUtils::asyncMsgBoxWarning |
( |
QWidget * |
parent, |
|
|
const QString & |
title, |
|
|
const QString & |
text, |
|
|
QMessageBox::StandardButtons |
buttons = QMessageBox::Ok |
|
) |
| |
|
static |
Executes message box warning asynchronously
template<typename PARENT_WIDGET >
| PARENT_WIDGET * qtgui::QWidgetUtils::findFirstParentWidget |
( |
QWidget * |
widget | ) |
|
|
static |
Searches up in the direct parents of widget the first ancestor being of type PARENT_WIDGET.
template<typename PARENT_WIDGET >
| PARENT_WIDGET * qtgui::QWidgetUtils::findLastParentWidget |
( |
QWidget * |
widget | ) |
|
|
static |
Searches up in the direct parents of widget the last ancestor being of type PARENT_WIDGET.
| QPoint qtgui::QWidgetUtils::globalPos |
( |
const QWidget * |
widget, |
|
|
Qt::Corner |
widgetCorner |
|
) |
| |
|
static |
Returns the global position of a widget corner
- Returns
- Null point (ie. with coordinates (0, 0)) if
widget is null
| QPair< int, int > qtgui::QWidgetUtils::horizAndVertScrollValue |
( |
const QAbstractScrollArea * |
area | ) |
|
|
static |
Current slide positions of the horizontal and vertical scroll bars
| void qtgui::QWidgetUtils::moveWidgetLeftTo |
( |
QWidget * |
widget, |
|
|
const QWidget * |
nextTo |
|
) |
| |
|
static |
Move position of widget so it's displayed stuck to the left of nextTo
| void qtgui::QWidgetUtils::moveWidgetRightTo |
( |
QWidget * |
widget, |
|
|
const QWidget * |
nextTo |
|
) |
| |
|
static |
Move position of widget so it's displayed stuck to the right of nextTo
| void qtgui::QWidgetUtils::setHorizAndVertScrollValue |
( |
QAbstractScrollArea * |
area, |
|
|
const QPair< int, int > & |
values |
|
) |
| |
|
static |
Set the current slide positions of the horizontal and vertical scroll bars to values
| void qtgui::QWidgetUtils::wrapWidgetInDialog |
( |
QWidget * |
widget, |
|
|
QDialog * |
dialog |
|
) |
| |
|
static |
Make widget the central widget of dialog.
dialog should be empty for this function to work.
wrapWidgetInDialog() will try to find if widget contains a QDialogButtonBox, if so then it connects to dialog 's accept()/reject() slots.
The documentation for this class was generated from the following files: