#include <LightApp_Dialog.h>

Data Structures | |
| struct | Object |
Public Types | |
| enum | ObjectWg { Label = 0x00000001, Btn = 0x00000002, Control = 0x00000004 } |
| enum | NameIndication { OneName, OneNameOrCount, ListOfNames, Count } |
| typedef QList< int > | TypesList |
| typedef QMap< int, QStringList > | SelectedObjects |
| enum | PlacePolicy { Position, Expand, Uniform } |
Buttons alignment type. More... | |
| enum | ButtonArea { TopArea, BottomArea, LeftArea, RightArea } |
Buttons area. More... | |
| enum | ButtonPosition { Left, Right, Center, Top = Left, Bottom = Right } |
Button position. More... | |
| enum | ButtonFlags { None = 0x00000000, OK = 0x00000001, Apply = 0x00000002, Cancel = 0x00000004, Yes = 0x00000008, No = 0x00000010, Close = 0x00000020, Help = 0x00000040, OKCancel = OK | Cancel, YesNo = Yes | No, Standard = OK | Cancel | Help, All = Standard | YesNo | Apply | Close } |
Button ID flags. More... | |
| enum | DialogFlags { Accept = 0x000001, Reject = 0x000002, AlignOnce = 0x000004, SetFocus = 0x000008 } |
Dialog box flags. More... | |
Public Slots | |
| void | update () |
| Update dialog box. | |
| virtual void | setVisible (bool) |
| Show/hide dialog box, set keyboard focus to the dialog. | |
Signals | |
| void | selectionChanged (int) |
| selection in certain widget is changed | |
| void | objectActivated (int) |
| selection in certain widget is on | |
| void | objectDeactivated (int) |
| selection in certain widget is off | |
| void | objectChanged (int, const QStringList &) |
| void | dlgButton (int) |
| Emitted when the user button is clicked. | |
| void | dlgParamChanged () |
| This signal can be used in successor classes to signalize about some dialog parameter changing. | |
| void | dlgHelp () |
| Emitted when the "Help" button is clicked. | |
| void | dlgApply () |
| Emitted when the "Apply" button is clicked. | |
| void | dlgOk () |
| Emitted when the "OK" button is clicked. | |
| void | dlgNo () |
| Emitted when the "No" button is clicked. | |
| void | dlgYes () |
| Emitted when the "Yes" button is clicked. | |
| void | dlgClose () |
| Emitted when the "Close" button is clicked. | |
| void | dlgCancel () |
| Emitted when the "Cancel" button is clicked. | |
Public Member Functions | |
| LightApp_Dialog (QWidget *=0, const char *=0, bool=false, bool=false, const int=Standard, Qt::WindowFlags=0) | |
| The enumeration describing how names of selected objects will be shown in line edit For more details see above. | |
| virtual | ~LightApp_Dialog () |
| virtual void | show () |
| bool | isExclusive () const |
| Check if buttons is exclusive (as radiobuttons) | |
| void | setExclusive (const bool) |
| Set exclusive state. | |
| bool | isAutoResumed () const |
| Check if operation according to dialog will be resumed automatically when mouse enter the dialog. | |
| void | setAutoResumed (const bool) |
| Set auto resumed state. | |
| void | showObject (const int) |
| Show widgets corresponding to id. | |
| void | hideObject (const int) |
| Hide widgets corresponding to id. | |
| void | setObjectShown (const int, const bool) |
| Change the shown state of widgets corresponding to id. | |
| bool | isObjectShown (const int) const |
| Check the shown state. | |
| void | setObjectEnabled (const int, const bool) |
| Change the enabled state of widgets corresponding to id. | |
| bool | isObjectEnabled (const int) const |
| Check the enabled state. | |
| QWidget * | objectWg (const int theId, const int theWgId) const |
| Get widget of object (see ObjectWg enumeration) | |
| void | selectObject (const QString &, const int, const QString &, const bool=true) |
| Pass to all active widgets name, type and id of selected object. | |
| void | selectObject (const QStringList &, const TypesList &, const QStringList &, const bool=true) |
| QString | objectText (const int) const |
| Get text of object's control. | |
| void | setObjectText (const int, const QString &) |
| Set text of object's control. | |
| void | selectObject (const int, const QString &, const int, const QString &, const bool=true) |
| Select in certain widget avoiding check if there is active widget. | |
| void | selectObject (const int, const QStringList &, const TypesList &, const QStringList &, const bool=true) |
| bool | hasSelection (const int) const |
| Check if certain widget has selection. | |
| void | clearSelection (const int=-1) |
| Clear selection in widgets. If parameter is -1, then selection in all widgets will be cleared. | |
| void | selectedObject (const int, QStringList &) const |
| Get ids list of object selected in certain widget. | |
| QString | selectedObject (const int) const |
| Get ids list of object selected in certain widget. | |
| void | objectSelection (SelectedObjects &) const |
| Get map "widget id -> ids list". | |
| void | activateObject (const int) |
| Activate object selection button. | |
| void | deactivateAll () |
| Set all object selection buttons to inactive state. | |
| void | setDialogFlags (const int) |
| Set specified dialog box flags. | |
| void | clearDialogFlags (const int) |
| Clear specified the dialog flags. | |
| bool | testDialogFlags (const int) const |
| Test specified dialog flags. | |
| void | setButtonFlags (const int) |
| Add specified control button(s) to the dialog box. | |
| void | clearButtonFlags (const int) |
| Remove specified control button(s) from the dialog box. | |
| bool | testButtonFlags (const int) const |
| Test specified buttons. | |
| int | buttonPosition (const int) const |
| Get specified control button position. | |
| void | setButtonPosition (const int, const int=-1) |
| Set the specified control button(s) position. | |
| void | setPlacePosition (const int, const int) |
| Set button position for all buttons in specified area. | |
| int | placePolicy (const int) const |
| Get buttons layouting policy for the specified area. | |
| void | setPlacePolicy (const int, const int) |
| set buttons layouting policy for the specified area. | |
| void | setButtonPlace (const int, const int) |
| Move specified button(s) into specified area. | |
| QString | buttonText (const int) |
| Get specified button's text. | |
| void | setButtonText (const int, const QString &text) |
| Set specified button's text. | |
| void | setButtonFocus (const int) |
| Sets the keyboard focus to the specified button. | |
| bool | hasButtonFocus (const int) const |
| Check if specified button has keyboard focus. | |
| bool | isButtonEnabled (const int) const |
| Get "enabled" status of the specified button(s). | |
| void | setButtonEnabled (const bool, const int) |
| Enable/disable specified button(s). | |
| bool | isBorderEnabled (const int) const |
| Check if border is enabled. | |
| void | setBorderEnabled (const bool, const int) |
| Show/hide border for the specified button area. | |
| void | removeButton (const int) |
| Remove user button. | |
| int | insertButton (const QString &, const int=BottomArea) |
| Add user button to the dialog box. | |
| QIntList | userButtonIds () const |
| Get all user button IDs. | |
| QAbstractButton * | userButton (const int) const |
| Get user button by the specified id. | |
| uint | setAlignment (uint align) |
| Sets alignment policy. | |
Static Public Member Functions | |
| static void | setUnits (QLabel *, const QString &) |
| Set measure units to the specified label. | |
Protected Types | |
| typedef QMap< int, QAbstractButton * > | ButtonMap |
| button map | |
Protected Slots | |
| virtual void | accept () |
| Accept the dialog box. | |
| virtual void | reject () |
| Reject the dialog box. | |
Protected Member Functions | |
| SUIT_ResourceMgr * | resMgr () const |
| Finds and returns resource manager. | |
| int | createObject (const QString &, QWidget *, const int=-1) |
| void | setObjectPixmap (const QPixmap &) |
| Set pixmap as icon for all selection buttons. | |
| void | setObjectPixmap (const QString &, const QString &) |
| Load pixmap with section, name using resource manager and set as icon for all selection buttons. | |
| void | renameObject (const int, const QString &) |
| Change label. | |
| void | setObjectType (const int, const int,...) |
| Set possible types for certain id. The list of arguments must be finished by negative integer. | |
| void | setObjectType (const int, const TypesList &) |
| Set list as possible types for object selection. | |
| void | addObjectType (const int, const int, const int,...) |
| void | addObjectType (const int, const TypesList &) |
| Add types to list of possible types. | |
| void | addObjectType (const int, const int) |
| Add type to list of possible types. | |
| void | removeObjectType (const int) |
| Clear list of possible types (it means, that all types are welcome) | |
| void | removeObjectType (const int, const TypesList &) |
| Remove types in list from list of possible types. | |
| void | removeObjectType (const int, const int) |
| Remove a type from list of possible types. | |
| bool | hasObjectType (const int, const int) const |
| Check if list of possible types contains this one. | |
| void | objectTypes (const int, TypesList &) const |
| Return list of possible types. | |
| QString & | typeName (const int) |
| Change and get type name for indicating in selection widget. | |
| const QString | typeName (const int) const |
| virtual QString | selectionDescription (const QStringList &, const TypesList &, const NameIndication) const |
| Create string contains selection list by list of names, list of types and current name indication state. | |
| virtual QString | countOfTypes (const TypesList &) const |
| Create string by pattern "<count> <type>" for current list of types. | |
| NameIndication | nameIndication (const int) const |
| Get and set name indication for certain widget. | |
| void | setNameIndication (const int, const NameIndication) |
| bool | multipleSelection (const int) const |
| Check using name indication if multiple selection in possible. | |
| void | setReadOnly (const int, const bool) |
| Set the "read only" state of object selection line edit The "read only" will be false only if name indication is ListOfNames. | |
| bool | isReadOnly (const int) const |
| Check the "read only" state of object selection line edit. | |
| int | buttonPosition (QAbstractButton *) const |
| Get position of specified button. | |
| QFrame * | mainFrame () const |
| Get dialog box main frame widget. | |
| virtual bool | acceptData () const |
| Check if data entered by the user is valid. | |
| virtual bool | rejectData () const |
| Check if dialog box can be cancelled. | |
| virtual QAbstractButton * | createButton (QWidget *) |
| Create new user button. | |
| QAbstractButton * | button (const int) const |
| Get button by the specified ID. | |
| ButtonMap | buttons (const int=All) const |
| Get buttons by the specified IDs. | |
| int | buttonId (const QAbstractButton *) const |
| Get specified button's identifier. | |
| virtual void | showEvent (QShowEvent *) |
| Align this dialog according to the parent widget and alignment policy before the dialog box is shown. | |
| virtual void | hideEvent (QHideEvent *) |
| Process all existing events when dialog box is hidden. | |
| virtual void | closeEvent (QCloseEvent *) |
| Called when user closes dialog box. | |
| virtual void | childEvent (QChildEvent *) |
| Update dialog box layout when the size grip is added. | |
| virtual void | keyPressEvent (QKeyEvent *) |
| Process key pressing event. | |
Private Types | |
| typedef QMap< int, Object > | ObjectMap |
Private Slots | |
| void | onToggled (bool) |
| emits if the object selection button changes state | |
| void | onTextChanged (const QString &) |
| text in some line edit is changed | |
Private Member Functions | |
| void | updateButtons (const int=-1) |
| void | updateObject (const int, bool=true) |
| void | filterTypes (const int, QStringList &, TypesList &, QStringList &) const |
| Remove from list not possible types and remove from names and ids lists the corresponding items. | |
Private Attributes | |
| ObjectMap | myObjects |
| QMap< int, QString > | myTypeNames |
| bool | myIsExclusive |
| bool | myIsBusy |
| QPixmap | myPixmap |
Base class for all LightApp dialogs. Provides standard widget for object selection: line edit, button; it is necessary to call corresponding methods on selection change. Standard dialog provides filtering, selection string representation, possibility to indicate necessary selection by text with list of ids.
| typedef QList<int> LightApp_Dialog.TypesList |
| typedef QMap<int,QStringList> LightApp_Dialog.SelectedObjects |
typedef QMap<int, Object> LightApp_Dialog.ObjectMap [private] |
typedef QMap<int, QAbstractButton*> QtxDialog.ButtonMap [protected, inherited] |
enum QtxDialog::PlacePolicy [inherited] |
enum QtxDialog::ButtonArea [inherited] |
enum QtxDialog::ButtonPosition [inherited] |
enum QtxDialog::ButtonFlags [inherited] |
enum QtxDialog::DialogFlags [inherited] |
| LightApp_Dialog::LightApp_Dialog | ( | QWidget * | parent = 0, |
| const char * | name = 0, |
||
| bool | modal = false, |
||
| bool | allowResize = false, |
||
| const int | f = Standard, |
||
| Qt::WindowFlags | wf = 0 |
||
| ) |
Constructor
References setObjectPixmap().
| LightApp_Dialog::~LightApp_Dialog | ( | ) | [virtual] |
Destructor
| void LightApp_Dialog::show | ( | ) | [virtual] |
Show dialog
| bool LightApp_Dialog::isExclusive | ( | ) | const |
References myIsExclusive.
| void LightApp_Dialog::setExclusive | ( | const bool | ex | ) |
Sets isExclusive status of selection buttons
| ex | - new value of isExclusive status |
References myIsExclusive, and updateButtons().
| bool LightApp_Dialog.isAutoResumed | ( | ) | const |
| void LightApp_Dialog.setAutoResumed | ( | const bool | ) |
| void LightApp_Dialog::showObject | ( | const int | id | ) |
Shows object selection widget
| id | - identificator of object selection widget |
References setObjectShown().
| void LightApp_Dialog::hideObject | ( | const int | id | ) |
Hides object selection widget
| id | - identificator of object selection widget |
References setObjectShown().
| void LightApp_Dialog::setObjectShown | ( | const int | id, |
| const bool | shown | ||
| ) |
Shows/hides object selection widget
| id | - identificator of object selection widget |
| shown | - if it is true, widget will be shown |
References isObjectShown(), LightApp_Dialog.Object.myBtn, LightApp_Dialog.Object.myEdit, LightApp_Dialog.Object.myLabel, myObjects, and PyInterp.obj.
| bool LightApp_Dialog::isObjectShown | ( | const int | id | ) | const |
| id | - identificator of object selection widget |
References myObjects.
| void LightApp_Dialog::setObjectEnabled | ( | const int | id, |
| const bool | en | ||
| ) |
Change enable state of object selection widget
| id | - identificator of object selection widget |
| en | - new value of enable state |
References isObjectEnabled(), LightApp_Dialog.Object.myBtn, LightApp_Dialog.Object.myEdit, myObjects, and PyInterp.obj.
| bool LightApp_Dialog::isObjectEnabled | ( | const int | id | ) | const |
| id | - identificator of object selection widget |
References myObjects.
| QWidget * LightApp_Dialog::objectWg | ( | const int | theId, |
| const int | theWgId | ||
| ) | const |
| void LightApp_Dialog::selectObject | ( | const QString & | name, |
| const int | type, | ||
| const QString & | id, | ||
| const bool | update = true |
||
| ) |
Passes to all active widgets name, type and id of selected object
| name | - name of selected object |
| type | - type of selected object |
| id | - id of selected object |
| update | - is need to update selection description string |
| void LightApp_Dialog::selectObject | ( | const QStringList & | _names, |
| const TypesList & | _types, | ||
| const QStringList & | _ids, | ||
| const bool | update = true |
||
| ) |
Pass to all active widgets list of names, types and ids of selected objects Every active widget filters list and accept only objects with possible types
Passes to all active widgets names, types and ids of selected objects
| _names | - names of selected objects |
| _types | - types of selected objects |
| _ids | - ids of selected objects |
| update | - is need to update selection description string |
References myObjects, selectObject(), and QtxDialog.update().
| QString LightApp_Dialog::objectText | ( | const int | theId | ) | const |
| theId | - identificator of object selection widget |
References myObjects.
| void LightApp_Dialog::setObjectText | ( | const int | theId, |
| const QString & | theText | ||
| ) |
Sets object selection widget text
| theId | - identificator of object selection widget |
| theText | - new text |
References myObjects.
| void LightApp_Dialog::selectObject | ( | const int | id, |
| const QString & | name, | ||
| const int | type, | ||
| const QString & | selid, | ||
| const bool | update = true |
||
| ) |
Passes to widget name, type and id of selected object
| id | - identificator of object selection widget |
| name | - name of selected object |
| type | - type of selected object |
| selid | - id of selected object |
| update | - is need to update selection description string |
References selectObject().
| void LightApp_Dialog::selectObject | ( | const int | id, |
| const QStringList & | _names, | ||
| const TypesList & | _types, | ||
| const QStringList & | _ids, | ||
| const bool | update = true |
||
| ) |
Passes to widget names, types and ids of selected objects
| id | - identificator of object selection widget |
| _names | - names of selected object |
| _types | - types of selected object |
| _ids | - ids of selected object |
| update | - is need to update selection description string |
References filterTypes(), LightApp_Dialog.Object.myEdit, LightApp_Dialog.Object.myIds, LightApp_Dialog.Object.myNames, LightApp_Dialog.Object.myNI, myObjects, LightApp_Dialog.Object.myTypes, PyInterp.obj, selectionChanged(), and selectionDescription().
| bool LightApp_Dialog::hasSelection | ( | const int | id | ) | const |
| id | - identificator of object selection widget |
References myObjects.
| void LightApp_Dialog::clearSelection | ( | const int | id = -1 | ) |
Clears selection of widget
| id | - identificator of object selection widget |
References myObjects, and selectionChanged().
| void LightApp_Dialog::selectedObject | ( | const int | id, |
| QStringList & | list | ||
| ) | const |
| id | - identificator of object selection widget |
| list | - list to be filled by selected objects |
References myObjects.
| QString LightApp_Dialog::selectedObject | ( | const int | id | ) | const |
| id | - identificator of object selection widget |
References myObjects.
| void LightApp_Dialog::objectSelection | ( | SelectedObjects & | objs | ) | const |
| objs | - map: widget id -> string id to be filled with selected objects |
References myObjects, and selectedObject().
| void LightApp_Dialog::activateObject | ( | const int | theId | ) |
Activates object selection widget
| id | - identificator of object selection widget |
References myObjects.
| void LightApp_Dialog::deactivateAll | ( | ) |
Deactivates all object selection widgets
References myObjects.
| void LightApp_Dialog.selectionChanged | ( | int | ) | [signal] |
| void LightApp_Dialog.objectActivated | ( | int | ) | [signal] |
| void LightApp_Dialog.objectDeactivated | ( | int | ) | [signal] |
| void LightApp_Dialog.objectChanged | ( | int | , |
| const QStringList & | |||
| ) | [signal] |
| SUIT_ResourceMgr * LightApp_Dialog::resMgr | ( | ) | const [protected] |
References SUIT_Session.resourceMgr(), and SUIT_Session.session().
| int LightApp_Dialog::createObject | ( | const QString & | label, |
| QWidget * | parent, | ||
| const int | id = -1 |
||
| ) | [protected] |
Create label, button and line edit for object selection If passed id is negative, then id will be calculated automatically (first free id) Returns the same id (if id>=0) or calculated
Creates object selection widget
References myObjects, myPixmap, OneNameOrCount, onTextChanged(), and onToggled().
| void LightApp_Dialog::setObjectPixmap | ( | const QPixmap & | p | ) | [protected] |
| void LightApp_Dialog::setObjectPixmap | ( | const QString & | section, |
| const QString & | file | ||
| ) | [protected] |
Sets pixmap all for object selection button
| section | - name of section of resource manager |
| file | - name of file |
References QtxResourceMgr.loadPixmap(), resMgr(), and setObjectPixmap().
| void LightApp_Dialog::renameObject | ( | const int | id, |
| const QString & | label | ||
| ) | [protected] |
Changes label of object selection widget
| id | - identificator of object selection widget |
| label | - new text of label |
References myObjects.
| void LightApp_Dialog::setObjectType | ( | const int | id, |
| const int | type1, | ||
| ... | |||
| ) | [protected] |
Sets possible types for widget
| id | - identificator of object selection widget |
| type1,... | - type |
| void LightApp_Dialog::setObjectType | ( | const int | id, |
| const TypesList & | list | ||
| ) | [protected] |
Sets possible types for widget
| id | - identificator of object selection widget |
| list | - list of possible types |
References myObjects, and updateObject().
| void LightApp_Dialog::addObjectType | ( | const int | id, |
| const int | type1, | ||
| const int | , | ||
| ... | |||
| ) | [protected] |
Add types to list of possible types The list of arguments must be finished by negative integer
Adds new possible types to object selection widget
| id | - identificator of object selection widget |
| type1,... | - new types |
References objectTypes(), and setObjectType().
| void LightApp_Dialog::addObjectType | ( | const int | id, |
| const TypesList & | list | ||
| ) | [protected] |
Adds new possible types to object selection widget
| id | - identificator of object selection widget |
| list | - new types |
References objectTypes(), and setObjectType().
| void LightApp_Dialog::addObjectType | ( | const int | id, |
| const int | type | ||
| ) | [protected] |
Adds new possible type to object selection widget
| id | - identificator of object selection widget |
| type | - new type |
References objectTypes(), and setObjectType().
| void LightApp_Dialog::removeObjectType | ( | const int | id | ) | [protected] |
Clears list of possibles types for object selection widget
| id | - identificator of object selection widget |
References setObjectType().
| void LightApp_Dialog::removeObjectType | ( | const int | id, |
| const TypesList & | list | ||
| ) | [protected] |
Removes types from list of possibles for object selection widget
| id | - identificator of object selection widget |
| list | - list of types to be removed |
References myObjects, and updateObject().
| void LightApp_Dialog::removeObjectType | ( | const int | id, |
| const int | type | ||
| ) | [protected] |
Removes type from list of possibles for object selection widget
| id | - identificator of object selection widget |
| type | - type to be removed |
References removeObjectType().
| bool LightApp_Dialog::hasObjectType | ( | const int | id, |
| const int | type | ||
| ) | const [protected] |
| id | - identificator of object selection widget |
| type | - type to be checked |
References myObjects.
| void LightApp_Dialog::objectTypes | ( | const int | id, |
| TypesList & | list | ||
| ) | const [protected] |
Returns list of possible types for widget
| id | - identificator of object selection widget |
| list | - list to be filled with possible types |
References myObjects.
| QString & LightApp_Dialog::typeName | ( | const int | type | ) | [protected] |
| const QString LightApp_Dialog::typeName | ( | const int | type | ) | const [protected] |
| QString LightApp_Dialog::selectionDescription | ( | const QStringList & | names, |
| const TypesList & | types, | ||
| const NameIndication | ni | ||
| ) | const [protected, virtual] |
| names | - list of selected objects names |
| types | - list of selected objects types |
| ni | - type of name indication |
References Count, countOfTypes(), ListOfNames, OneName, and OneNameOrCount.
| QString LightApp_Dialog::countOfTypes | ( | const TypesList & | types | ) | const [protected, virtual] |
| types | - list of types |
References typeName().
| LightApp_Dialog::NameIndication LightApp_Dialog::nameIndication | ( | const int | id | ) | const [protected] |
| id | - identificator of object selection widget |
References myObjects, and OneNameOrCount.
| void LightApp_Dialog::setNameIndication | ( | const int | id, |
| const NameIndication | ni | ||
| ) | [protected] |
Sets type of name indication
| id | - identificator of object selection widget |
| ni | - new type of name indication |
References isReadOnly(), myObjects, setReadOnly(), and updateObject().
| bool LightApp_Dialog::multipleSelection | ( | const int | id | ) | const [protected] |
| id | - identificator of object selection widget |
References nameIndication(), and OneName.
| void LightApp_Dialog::setReadOnly | ( | const int | id, |
| const bool | ro | ||
| ) | [protected] |
Sets read only state of object selection line edit
| id | - identificator of object selection widget |
| ro | - new read only state |
References ListOfNames, myObjects, nameIndication(), and OneName.
| bool LightApp_Dialog::isReadOnly | ( | const int | id | ) | const [protected] |
| id | - identificator of object selection widget |
References myObjects.
| void LightApp_Dialog::onToggled | ( | bool | on | ) | [private, slot] |
SLOT: called if selection button is clicked
References myObjects, objectActivated(), objectDeactivated(), and updateButtons().
| void LightApp_Dialog::onTextChanged | ( | const QString & | text | ) | [private, slot] |
SLOT: called if text of object selection line edit is changed
References isReadOnly(), myIsBusy, myObjects, and objectChanged().
| void LightApp_Dialog::updateButtons | ( | const int | _id = -1 | ) | [private] |
If buttons are exclusive, set to "off" all buttons except one with id If id=-1, then all buttons, except first with "on" state, will be set to "off"
Updates "on" state of buttons according to special button
| _id | - id of special button (if it is -1, then first selected button will be treated as special) |
References myIsExclusive, and myObjects.
| void LightApp_Dialog::updateObject | ( | const int | id, |
| bool | emit_signal = true |
||
| ) | [private] |
Filter types and update selection string in line edit If bool is true, then signal is emitted
Updates selection description of widget
| id | - identificator of object selection widget |
| emit_signal | - if it is true, the signal "selection changed" is emitted |
References filterTypes(), hasSelection(), LightApp_Dialog.Object.myEdit, LightApp_Dialog.Object.myIds, LightApp_Dialog.Object.myNames, LightApp_Dialog.Object.myNI, myObjects, LightApp_Dialog.Object.myTypes, PyInterp.obj, selectionChanged(), and selectionDescription().
| void LightApp_Dialog::filterTypes | ( | const int | id, |
| QStringList & | names, | ||
| TypesList & | types, | ||
| QStringList & | ids | ||
| ) | const [private] |
Finds in list possible types
| id | - identificator of object selection widget |
| names | - list of selected objects names |
| types | - list of selected objects types |
| ids | - list of selected objects ids |
References multipleSelection(), myObjects, LightApp_Dialog.Object.myPossibleTypes, and PyInterp.obj.
| void QtxDialog::setDialogFlags | ( | const int | f | ) | [inherited] |
| f | dialog box flags (QtxDialog.DialogFlags) |
References QtxDialog.myDialogFlags.
| void QtxDialog::clearDialogFlags | ( | const int | f | ) | [inherited] |
| f | dialog box flags (QtxDialog.DialogFlags) |
References QtxDialog.myDialogFlags.
| bool QtxDialog::testDialogFlags | ( | const int | f | ) | const [inherited] |
true if specified dialog box falgs are set References QtxDialog.myDialogFlags.
| void QtxDialog::setButtonFlags | ( | const int | f | ) | [inherited] |
| f | ORed buttons flags (Qtx.ButtonFlags) |
References QtxDialog.myButtonFlags, and QtxDialog.update().
| void QtxDialog::clearButtonFlags | ( | const int | f | ) | [inherited] |
| f | ORed buttons flags (Qtx.ButtonFlags) |
References QtxDialog.myButtonFlags, and QtxDialog.update().
| bool QtxDialog::testButtonFlags | ( | const int | f | ) | const [inherited] |
true if specified control buttons are used in the dialog box References QtxDialog.myButtonFlags.
| int QtxDialog::buttonPosition | ( | const int | id | ) | const [inherited] |
| id | control button ID (QtxDialog.ButtonFlags) |
References QtxDialog.myPosition.
| int QtxDialog::buttonPosition | ( | QAbstractButton * | b | ) | const [protected, inherited] |
| b | button |
References QtxDialog.buttonId(), and QtxDialog.buttonPosition().
| void QtxDialog::setButtonPosition | ( | const int | pos, |
| const int | id = -1 |
||
| ) | [inherited] |
| id | control button(s) ID (QtxDialog.ButtonFlags) |
| pos | button(s) position (QtxDialog.ButtonPosition) |
References QtxDialog.button(), QtxDialog.buttons(), QtxDialog.myArea, and QtxDialog.myPosition.
| void QtxDialog::setPlacePosition | ( | const int | pos, |
| const int | area | ||
| ) | [inherited] |
| pos | button(s) position (QtxDialog.ButtonPosition) |
| area | buttons area (QtxDialog.ButtonArea) |
References QtxDialog.Area.contains(), QtxDialog.Area.layoutButtons(), QtxDialog.myArea, QtxDialog.myButton, and QtxDialog.myPosition.
| int QtxDialog::placePolicy | ( | const int | area | ) | const [inherited] |
| area | buttons area (QtxDialog.ButtonArea) |
References QtxDialog.myArea.
| void QtxDialog::setPlacePolicy | ( | const int | policy, |
| const int | area | ||
| ) | [inherited] |
| policy | buttons layouting policy (QtxDialog.PlacePolicy) |
| area | buttons area (QtxDialog.ButtonArea) |
References QtxDialog.myArea.
| void QtxDialog::setButtonPlace | ( | const int | area, |
| const int | id | ||
| ) | [inherited] |
| area | buttons area (QtxDialog.ButtonArea) |
| id | control button(s) ID (QtxDialog.ButtonFlags) |
References QtxDialog.buttons(), QtxDialog.Area.insertButton(), QtxDialog.myArea, and QtxDialog.Area.removeButton().
| QString QtxDialog::buttonText | ( | const int | id | ) | [inherited] |
| id | control button ID (QtxDialog.ButtonFlags) |
References QtxDialog.button().
| void QtxDialog::setButtonText | ( | const int | id, |
| const QString & | text | ||
| ) | [inherited] |
| id | control button ID (QtxDialog.ButtonFlags) |
| text | button's text |
References QtxDialog.adjustButtons(), and QtxDialog.button().
| void QtxDialog::setButtonFocus | ( | const int | id | ) | [inherited] |
| id | control button ID (QtxDialog.ButtonFlags) |
References QtxDialog.button().
| bool QtxDialog::hasButtonFocus | ( | const int | id | ) | const [inherited] |
| id | control button ID (QtxDialog.ButtonFlags) |
true if specified button has keyboard focus References QtxDialog.button().
| bool QtxDialog::isButtonEnabled | ( | const int | id | ) | const [inherited] |
| id | control button(s) ID (QtxDialog.ButtonFlags) |
true if all specified buttons are enabled. References QtxDialog.buttons().
| void QtxDialog::setButtonEnabled | ( | const bool | on, |
| const int | id | ||
| ) | [inherited] |
| on | enable button(s) flag |
| id | control button(s) ID (QtxDialog.ButtonFlags) |
References QtxDialog.buttons().
| bool QtxDialog::isBorderEnabled | ( | const int | area | ) | const [inherited] |
| area | buttons area (QtxDialog.ButtonArea) |
true if border is enabled for specified button area. References QtxDialog.myArea.
| void QtxDialog::setBorderEnabled | ( | const bool | on, |
| const int | area | ||
| ) | [inherited] |
Border is a line which separate main frame and control buttons.
| area | buttons area (QtxDialog.ButtonArea) |
| on | enable border flag |
References QtxDialog.isBorderEnabled(), and QtxDialog.myArea.
| void QtxDialog::removeButton | ( | const int | id | ) | [inherited] |
If id is -1, all user buttons are removed.
| id | user button ID |
References QtxDialog.myArea, QtxDialog.myButton, QtxDialog.myPosition, and QtxDialog.update().
| int QtxDialog::insertButton | ( | const QString & | text, |
| const int | area = BottomArea |
||
| ) | [inherited] |
The button is inserted to the specified dialog box area. if the button is added successfully, the unique identificator of the added button is returned, otherwise -1 is returned.
| text | text of the added button |
| area | buttons area (QtxDialog.ButtonArea) |
References QtxDialog.createButton(), QtxDialog.Area.insertButton(), QtxDialog.Left, QtxDialog.myArea, QtxDialog.myButton, QtxDialog.myPosition, QtxDialog.onButton(), QtxDialog.onDestroyed(), and QtxDialog.update().
| QIntList QtxDialog::userButtonIds | ( | ) | const [inherited] |
References QtxDialog.myButton.
| QAbstractButton * QtxDialog::userButton | ( | const int | id | ) | const [inherited] |
| id | user button ID |
References QtxDialog.myButton.
| uint QtxDialog::setAlignment | ( | uint | align | ) | [inherited] |
Use the function before the the dialog is first time shown. If dialog flag AlignOnce is set then alignment is performed only once, otherwise the dialog is aligned each time when it is shown. Dialog box is aligned relatively to its parent. By default, dialog box is aligned to the center of the parent widget (usually desktop or another dialog box).
| align | alignment flag(s) (Qtx.AlignmentFlags) |
References QtxDialog.myAlignment.
| void QtxDialog::setUnits | ( | QLabel * | aLabel, |
| const QString & | aUnits | ||
| ) | [static, inherited] |
In the dialog box label the measure units are closed in braces. If measure units do not exist they will be added.
For example:
// create label "Radius" QLabel* aLabel = new QLabel( "Radius", mainFrame() ); // set measure units to "mm" setUnits( aLabel, "mm" ) // => aLabel contains 'Radius (mm)' // set measure units to "cm" setUnits( aLabel, "cm" ) // => aLabel contains 'Radius (cm)' // create label "Radius" with initially not set measure units QLabel* aLabel = new QLabel( "Radius ():", mainFrame() ); // set measure units to "mm" setUnits( aLabel, "mm" ) // => aLabel contains 'Radius (mm):' // set measure units to "cm" setUnits( aLabel, "cm" ) // => aLabel contains 'Radius (cm):'
| aLabel | label widget |
| aUnits | measure units |
| void QtxDialog::dlgButton | ( | int | id | ) | [signal, inherited] |
| id | user button identificator |
| void QtxDialog::dlgParamChanged | ( | ) | [signal, inherited] |
| void QtxDialog::dlgHelp | ( | ) | [signal, inherited] |
| void QtxDialog::dlgApply | ( | ) | [signal, inherited] |
| void QtxDialog::dlgOk | ( | ) | [signal, inherited] |
| void QtxDialog::dlgNo | ( | ) | [signal, inherited] |
| void QtxDialog::dlgYes | ( | ) | [signal, inherited] |
| void QtxDialog::dlgClose | ( | ) | [signal, inherited] |
| void QtxDialog::dlgCancel | ( | ) | [signal, inherited] |
| void QtxDialog::update | ( | ) | [slot, inherited] |
References QtxDialog.adjustButtons(), QtxDialog.myArea, QtxDialog.myButton, and QtxDialog.testButtonFlags().
| void QtxDialog::setVisible | ( | bool | on | ) | [virtual, slot, inherited] |
Re-implemented from Qt.
| on | show/hide flag |
Reimplemented in LightApp_PreferencesDlg, and QtxPathDialog.
References QtxDialog.myInited, QtxDialog.SetFocus, and QtxDialog.testDialogFlags().
| void QtxDialog::accept | ( | ) | [protected, virtual, slot, inherited] |
This method is used when any accept button is pressed (usually "OK", "Yes", etc).
If dialog flag QtxDialog.Accept is set, this function invokes acceptData() method, which should in this case return true to allow further processing.
If acceptData() returns false, this function just returns.
If acceptData() returns true, the Accepted result is set and signal according to the pressed control button is emitted. Then the default implementation of accept() method is called (which hides the dialog box and, depending on the dialog box flags, can close and destroy it).
Reimplemented in LightApp_PreferencesDlg, and Style_PrefDlg.
References QtxDialog.Accept, QtxDialog.acceptData(), QtxDialog.button(), QtxDialog.Close, QtxDialog.emitSignal(), QtxDialog.mySender, QtxDialog.OK, QtxDialog.testButtonFlags(), QtxDialog.testDialogFlags(), and QtxDialog.Yes.
| void QtxDialog::reject | ( | ) | [protected, virtual, slot, inherited] |
This method is used when any reject button is pressed (usually "Close", "Cancel", "No", etc).
If dialog flag QtxDialog.Reject is set, this function invokes rejectData() method, which should in this case return true to allow further processing.
If rejectData() returns false, this function just returns.
If rejectData() returns true, the Rejected result is set and signal according to the pressed control button is emitted. Then the default implementation of reject() method is called (which hides the dialog box and, depending on the dialog box flags, can close and destroy it).
Reimplemented in LightApp_PreferencesDlg.
References QtxDialog.button(), QtxDialog.Cancel, QtxDialog.Close, QtxDialog.emitSignal(), QtxDialog.mySender, QtxDialog.No, QtxDialog.Reject, QtxDialog.rejectData(), QtxDialog.testButtonFlags(), and QtxDialog.testDialogFlags().
| QFrame * QtxDialog::mainFrame | ( | ) | const [protected, inherited] |
Main frame is an internal widget which should contains all elements of dialog box except control buttons.
References QtxDialog.myMainFrame.
| bool QtxDialog::acceptData | ( | ) | const [protected, virtual, inherited] |
This method can be re-implemented in the successor class if it requires to check user input consistency. Default implementation returns true.
This method is called if dialog flag QtxDialog.Accept is set. If this method returns true, then dialog will be accepted and closed.
true if user input is valid Reimplemented in QtxPathDialog.
| bool QtxDialog::rejectData | ( | ) | const [protected, virtual, inherited] |
This method can be re-implemented in the successor class if it requires to check possibility to cancel dialog box safely. Default implementation returns true.
This method is called if dialog flag QtxDialog.Reject is set. If this method returns true, then dialog will be rejected and closed.
true if dialog box can be cancelled | QAbstractButton * QtxDialog::createButton | ( | QWidget * | parent | ) | [protected, virtual, inherited] |
This method is invoked from method insertButton().
| parent | parent widget |
| QAbstractButton * QtxDialog::button | ( | const int | f | ) | const [protected, inherited] |
| f | control button ID (QtxDialog.ButtonFlags) |
References QtxDialog.myButton.
| QtxDialog::ButtonMap QtxDialog::buttons | ( | const int | f = All | ) | const [protected, inherited] |
| f | control button(s) ID(s) (QtxDialog.ButtonFlags) |
References QtxDialog.myButton.
| int QtxDialog::buttonId | ( | const QAbstractButton * | b | ) | const [protected, inherited] |
| void QtxDialog::showEvent | ( | QShowEvent * | e | ) | [protected, virtual, inherited] |
Re-implemented from Qt.
| e | show event |
References QtxDialog.AlignOnce, Qtx.alignWidget(), QtxDialog.myAlignment, QtxDialog.myInited, and QtxDialog.testDialogFlags().
| void QtxDialog::hideEvent | ( | QHideEvent * | e | ) | [protected, virtual, inherited] |
Re-implemented from Qt.
| e | hide event |
| void QtxDialog::closeEvent | ( | QCloseEvent * | ) | [protected, virtual, inherited] |
| void QtxDialog::childEvent | ( | QChildEvent * | e | ) | [protected, virtual, inherited] |
| void QtxDialog::keyPressEvent | ( | QKeyEvent * | e | ) | [protected, virtual, inherited] |
Re-implemented from Qt.
Call reject() if "Escape" key is pressed. Call accept() if "Ctrl+Enter" key-sequence is pressed. Process "F1" key and emit signal dlgHelp(). Transfer "Ctrl+(Shift+)Tab" key-sequence press event to the child Tab widget (if there is any).
| e | key press event |
Reimplemented in Style_PrefDlg, and VTKViewer_MarkerDlg.
References QtxDialog.accept(), QtxDialog.Apply, QtxDialog.dlgApply(), QtxDialog.dlgHelp(), QtxDialog.Help, QtxDialog.isButtonEnabled(), QtxDialog.OK, QtxDialog.reject(), QtxDialog.testButtonFlags(), and QtxDialog.Yes.
ObjectMap LightApp_Dialog.myObjects [private] |
QMap<int,QString> LightApp_Dialog.myTypeNames [private] |
bool LightApp_Dialog.myIsExclusive [private] |
bool LightApp_Dialog.myIsBusy [private] |
QPixmap LightApp_Dialog.myPixmap [private] |