![]() |
MAK RTIspy API Documentation for HLA 1.3
|
A generic dialog which houses a single widget. More...
Inheritance diagram for DtWidgetDialog:
Collaboration diagram for DtWidgetDialog:Public Slots | |
| virtual void | enableAccept (bool enable) |
| Enables or disables any buttons with the AcceptRole. | |
| virtual void | enableApply (bool enable) |
| Enables or disables any buttons with the ApplyRole. | |
| virtual void | enableButtonRole (QDialogButtonBox::ButtonRole role, bool enable) |
| Enables or disables any buttons with the given role. | |
Public Member Functions | |
| DtWidgetDialog (QDialogButtonBox::StandardButtons buttons=QDialogButtonBox::Ok|QDialogButtonBox::Cancel, QWidget *parent=0, Qt::WindowFlags f=0) | |
| Constructor. | |
| virtual | ~DtWidgetDialog () |
| Destructor. | |
| virtual void | setWidget (QWidget *widget) |
| Embeds the widget in the dialog. | |
| virtual QPushButton * | addButton (const QString &text, QDialogButtonBox::ButtonRole role) |
| Adds a button with customized text to the dialog. | |
| virtual QPushButton * | addButton (QDialogButtonBox::StandardButton button) |
| Adds a standard button to the dialog. | |
| virtual bool | centerButtons () const |
| Centers the buttons in the dialog. | |
| virtual void | removeButton (QAbstractButton *button) |
| Removes the given button from the dialog. | |
| virtual void | removeButton (QDialogButtonBox::StandardButton button) |
| Removes a standard button from the dialog. | |
| virtual bool | isAcceptEnabled () |
| Returns true if there is an accept button enabled. | |
Protected Attributes | |
| QVBoxLayout * | myLayout |
| The layout of the dialog. | |
| QDialogButtonBox * | myButtonBox |
| The button box on the dialog. | |
| QWidget * | myWidget |
| The embedded widget. | |
A generic dialog which houses a single widget.
Can be used to easily provide QDialog functionality to a QWidget and provides a button box which can be set with buttons as needed.
| DtWidgetDialog::DtWidgetDialog | ( | QDialogButtonBox::StandardButtons | buttons = QDialogButtonBox::Ok | QDialogButtonBox::Cancel, |
| QWidget * | parent = 0, |
||
| Qt::WindowFlags | f = 0 |
||
| ) |
Constructor.
References connect(), myButtonBox, and myLayout.
| DtWidgetDialog::~DtWidgetDialog | ( | ) | [virtual] |
Destructor.
| QPushButton * DtWidgetDialog::addButton | ( | const QString & | text, |
| QDialogButtonBox::ButtonRole | role | ||
| ) | [virtual] |
Adds a button with customized text to the dialog.
References myButtonBox.
Referenced by DtAssistantLrcConnQueryDialog::DtAssistantLrcConnQueryDialog().
| QPushButton * DtWidgetDialog::addButton | ( | QDialogButtonBox::StandardButton | button | ) | [virtual] |
Adds a standard button to the dialog.
References myButtonBox.
| bool DtWidgetDialog::centerButtons | ( | ) | const [virtual] |
Centers the buttons in the dialog.
References myButtonBox.
| void DtWidgetDialog::enableAccept | ( | bool | enable | ) | [virtual, slot] |
Enables or disables any buttons with the AcceptRole.
References enableButtonRole().
Referenced by DtAssistantLrcConnQueryDialog::DtAssistantLrcConnQueryDialog(), and DtAssistantRtiexecConnQueryDialog::DtAssistantRtiexecConnQueryDialog().
| void DtWidgetDialog::enableApply | ( | bool | enable | ) | [virtual, slot] |
Enables or disables any buttons with the ApplyRole.
References enableButtonRole().
Referenced by DtAssistantLrcConnQueryDialog::DtAssistantLrcConnQueryDialog(), and DtAssistantRtiexecConnQueryDialog::DtAssistantRtiexecConnQueryDialog().
| void DtWidgetDialog::enableButtonRole | ( | QDialogButtonBox::ButtonRole | role, |
| bool | enable | ||
| ) | [virtual, slot] |
Enables or disables any buttons with the given role.
References myButtonBox.
Referenced by enableAccept(), and enableApply().
| bool DtWidgetDialog::isAcceptEnabled | ( | ) | [virtual] |
Returns true if there is an accept button enabled.
References myButtonBox.
Referenced by DtAssistantRtiexecConnQueryDialog::processItemDoubleClicked(), and DtAssistantLrcConnQueryDialog::processItemDoubleClicked().
| void DtWidgetDialog::removeButton | ( | QAbstractButton * | button | ) | [virtual] |
Removes the given button from the dialog.
References myButtonBox.
| void DtWidgetDialog::removeButton | ( | QDialogButtonBox::StandardButton | button | ) | [virtual] |
Removes a standard button from the dialog.
References myButtonBox.
| void DtWidgetDialog::setWidget | ( | QWidget * | widget | ) | [virtual] |
Embeds the widget in the dialog.
If a widget has already been set, has no effect. Takes ownership of the widget and will delete it when the dialog is destroyed.
References myButtonBox, myLayout, and myWidget.
Referenced by DtAssistantLrcConnQueryDialog::DtAssistantLrcConnQueryDialog(), DtAssistantRtiexecConnQueryDialog::DtAssistantRtiexecConnQueryDialog(), DtConsoleDialog::DtConsoleDialog(), and DtFederationsViewDialog::showRidDialog().
QDialogButtonBox* DtWidgetDialog::myButtonBox [protected] |
The button box on the dialog.
Referenced by addButton(), centerButtons(), DtWidgetDialog(), enableButtonRole(), isAcceptEnabled(), removeButton(), and setWidget().
QVBoxLayout* DtWidgetDialog::myLayout [protected] |
The layout of the dialog.
Referenced by DtWidgetDialog(), and setWidget().
QWidget* DtWidgetDialog::myWidget [protected] |
The embedded widget.
Referenced by DtAssistantLrcConnQueryDialog::DtAssistantLrcConnQueryDialog(), DtAssistantRtiexecConnQueryDialog::DtAssistantRtiexecConnQueryDialog(), setWidget(), DtAssistantRtiexecConnQueryDialog::widget(), DtConsoleDialog::widget(), and DtAssistantLrcConnQueryDialog::widget().