Dialog as plugin of BPS Workplace. More...
#include <bpsapplicationdialog.h>
Public Slots | |
| void | setWindowModified (bool aModified=true) |
| Overloaded version of QMainWindow::setWindowModified, which sends out the signal modifiedChanged. | |
Signals | |
| void | windowModified (bool aModified) |
| Signal emitted whenever the window modification status changes. | |
Public Member Functions | |
| BpsApplicationDialog (QWidget *aParent=0, Qt::WindowFlags aFlags=0) | |
| Constructor. | |
| virtual void | init () |
| Do initializations immediately before showing of the window. | |
Dialog as plugin of BPS Workplace.
Typically a standalone dialog is derived from this class and implements a customized init function.
The dialog may receive a close request from the workplace. This request has to be handled in a close event handler, in case closing could have to be denied because of unsaved data or because a modal dialog is open. Here is an example for such an event handler:
void APickingDialog::closeEvent(QCloseEvent* aEvent) { bool modalChild = false; foreach (QWidget* widget, findChildren<QWidget*>()) if (widget->isVisible() && widget->isModal()) { modalChild = true; break; } // if if (!modalChild) { writeSettings(); aEvent->accept(); } else aEvent->ignore(); } // closeEvent
| BpsApplicationDialog::BpsApplicationDialog | ( | QWidget * | aParent = 0, |
| Qt::WindowFlags | aFlags = 0 |
||
| ) |
Constructor.
| [in] | aParent | Parent widget. |
| [in] | aFlags | Main window flags. |
| virtual void BpsApplicationDialog::init | ( | ) | [virtual] |
Do initializations immediately before showing of the window.
The default implementation does nothing.
| void BpsApplicationDialog::setWindowModified | ( | bool | aModified = true | ) | [slot] |
Overloaded version of QMainWindow::setWindowModified, which sends out the signal modifiedChanged.
| [in] | aModified | New modification status. |
| void BpsApplicationDialog::windowModified | ( | bool | aModified | ) | [signal] |
Signal emitted whenever the window modification status changes.
| [in] | aModified | New modification status. |