A dialog box allowing to select study operation to be performed on the module activating. More...
#include <LightApp_ModuleDlg.h>
Public Slots | |
void | accept () |
Called when any dialog button (except Cancel ) is clicked. More... | |
Public Member Functions | |
LightApp_ModuleDlg (QWidget *, const QString &, const QPixmap &=QPixmap()) | |
Constructor. More... | |
~LightApp_ModuleDlg () | |
Destructor. More... | |
int | addButton (const QString &, const int=-1) |
Add operation button to the dialog box. More... | |
Private Types | |
typedef QMap< QPushButton *, int > | ButtonMap |
Private Member Functions | |
QPushButton * | findButton (const int) const |
Search button with the specified identifier. More... | |
Private Attributes | |
ButtonMap | myButtons |
QHBoxLayout * | myButtonLayout |
The dialog box is shown when the user tries to activate any module while there is no opened study. The dialog box proposes user to select one of the possible operations which should be done before module activating, for example, create new study or open study from the file. The available operations are assigned by adding the buttons with the unique identifier to the dialog box. When the user clicks any operation button, the dialog box sets its identifier as the return code and closes.
The typical usage of the dialog box:
|
private |
LightApp_ModuleDlg::LightApp_ModuleDlg | ( | QWidget * | parent, |
const QString & | component, | ||
const QPixmap & | icon = QPixmap() |
||
) |
parent | parent widget |
component | module name |
icon | module icon |
References default_icon, and myButtonLayout.
LightApp_ModuleDlg::~LightApp_ModuleDlg | ( | ) |
|
slot |
Closes the dialog and sets its result code to the identifier of the button clicked by the user.
References myButtons.
If the parameter id is equal to -1, then the button identifier is generated automatically.
button | button text |
id | button identifier |
References accept(), findButton(), myButtonLayout, and myButtons.
|
private |
|
private |
|
private |