#include "UiComponent.h"
Public Types | |
| enum | entitySelectionType { FACE , EDGE , SHAPE , TRANSFORM } |
| enum | entitySelectionAction { PORT , REMOVE_FACE , BOOLEAN_ADD , BOOLEAN_SUBTRACT , BOOLEAN_INTERSECT , TRANSFORM_SHAPES , CHAMFER_EDGE , BLEND_EDGE } |
Public Member Functions | |
| UiComponent (const std::string &_name, const std::string &_type, const std::string &_url, serviceID_t _id, ApplicationBase *_application) | |
| virtual | ~UiComponent () |
| void | addMenuPage (const std::string &_pageName) |
| Will add a new menu page in the UI. | |
| void | addMenuGroup (const std::string &_pageName, const std::string &_groupName) |
| Will add a new menu group in the specified menu page at the UI. | |
| void | addMenuSubGroup (const std::string &_pageName, const std::string &_groupName, const std::string &_subgroupName) |
| Will add a new menu subgroup in the specified menu group at the UI. | |
| void | addMenuButton (const std::string &_pageName, const std::string &_groupName, const std::string &_buttonName, const std::string &_text, const LockTypeFlags &_lockTypes, const std::string &_iconName, const std::string &_iconFolder=std::string("Default"), const std::string &_keySequence=std::string("")) |
| Will add a new ToolButton in the specified menu group at the UI. | |
| void | addMenuButton (ot::MenuButtonDescription &_menuButtonDescription, const LockTypeFlags &_lockTypes, const std::string &_iconName, const std::string &_iconFolder=std::string("Default"), const std::string &_keySequence=std::string("")) |
| void | addMenuButton (const std::string &_pageName, const std::string &_groupName, const std::string &_subgroupName, const std::string &_buttonName, const std::string &_text, const LockTypeFlags &_lockTypes, const std::string &_iconName, const std::string &_iconFolder=std::string("Default"), const std::string &_keySequence=std::string("")) |
| Will add a new ToolButton in the specified menu sub group at the UI. | |
| void | addMenuCheckbox (const std::string &_pageName, const std::string &_groupName, const std::string &_checkboxName, const std::string &_checkboxText, bool _isChecked, const LockTypeFlags &_lockTypes) |
| Will add a new CheckBox in the specified menu group at the UI. | |
| void | addMenuCheckbox (const std::string &_pageName, const std::string &_groupName, const std::string &_subgroupName, const std::string &_checkboxName, const std::string &_checkboxText, bool _isChecked, const LockTypeFlags &_lockTypes) |
| Will add a new CheckBox in the specified menu sub group at the UI. | |
| void | addMenuLineEdit (const std::string &_pageName, const std::string &_groupName, const std::string &_lineEditName, const std::string &_labelText, const std::string &_initialText, const LockTypeFlags &_lockTypes) |
| Will add a new LineEdit in the specified menu group at the UI. | |
| void | addMenuLineEdit (const std::string &_pageName, const std::string &_groupName, const std::string &_subgroupName, const std::string &_lineEditName, const std::string &_labelText, const std::string &_initialText, const LockTypeFlags &_lockTypes) |
| Will add a new LineEdit in the specified menu group at the UI. | |
| void | activateMenuPage (const std::string &_pageName) |
| void | addShortcut (const std::string &_keySequence) |
| Will add a new shortcut The shortcut will be listened application wide. | |
| void | createRubberband (const std::string &_note, const std::string &_configurationJson) |
| Will create a rubberband and start the sequence according to the configuration. | |
| void | setControlToolTip (const std::string &_controlName, const std::string &_toolTipText) const |
| Will set the tool tip for the specified object that is placed in the menu. | |
| void | setControlToolTip (const std::string &_pageName, const std::string &_groupName, const std::string &_controlName, const std::string &_toolTipText) const |
| Will set the tool tip for the specified object that is placed in the menu. | |
| void | setControlToolTip (const std::string &_gepaName, const std::string &_groupName, const std::string &_subgroupName, const std::string &_controlName, const std::string &_toolTipText) const |
| Will set the tool tip for the specified object that is placed in the menu. | |
| void | setControlsEnabledState (const std::list< std::string > &_enabledControls, const std::list< std::string > &_disabledControls) const |
| Will set the enabled state of the provided controls. | |
| void | setLineEditValues (const std::string &_controlName, const std::string &_text, bool _errorState=false) const |
| Will set the provided values to the line edit. | |
| void | setCheckboxValues (const std::string &_controlName, bool _checkedState) const |
| Will set tthe provided values to the checkbox. | |
| void | lockUI (const LockTypeFlags &_lockTypes) const |
| Will lock the UI Elements that belong to the provided lock type. | |
| void | unlockUI (const LockTypeFlags &_lockTypes) const |
| Will unlock the UI Elements that belong to the provided lock type. | |
| void | setProgressInformation (std::string message, bool continuous) |
| Will set the progress bar text. This also turns on the progress bar visibility. | |
| void | setProgress (int percentage) |
| Will set the percentage of the progress bar. | |
| void | closeProgressInformation (void) |
| Will hide the progress bar. | |
| void | switchMenuTab (const std::string &_pageName) const |
| Will switch current menu tab to the one provided. | |
| void | registerForModelEvents (void) const |
| Will register for model events at the UI. | |
| void | deregisterForModelEvents (void) const |
| Will deregister from the model events at the UI. | |
| void | addIconSearchPath (const std::string &_iconPath) |
| Will add the provided path to the uiService icon manager This function has no effect when running in release mode. | |
| void | notifyUiSetupCompleted (void) |
| Will notify the ui that this service completed its frontend setup. | |
| void | displayMessage (const std::string &_message) const |
| Will display a message in the Frontends output window. | |
| void | displayStyledMessage (const StyledTextBuilder &_builder) const |
| Will display a styled text message in the Frontends output window. | |
| void | displayErrorPrompt (const std::string &_message) const |
| Will display a message in a error prompt dialog. | |
| void | displayWarningPrompt (const std::string &_message) const |
| Will display a message in a warning prompt dialog. | |
| void | displayInformationPrompt (const std::string &_message) const |
| Will display a message in a information prompt dialog. | |
| void | addControlNameToList (std::list< std::string > &_list, const std::string &_pageName, const std::string &_groupName, const std::string &_controlName) |
| Will add the control name of the item that is located at the menu. | |
| void | addControlNameToList (std::list< std::string > &_list, const std::string &_pageName, const std::string &_groupName, const std::string &_subgroupName, const std::string &_controlName) |
| Will add the control name of the item that is located at the menu. | |
| void | removeUIElements (const std::list< std::string > &_itemList) |
| Will remove the specified UI elements from the UI. | |
| void | removeAllUIElements (void) |
| Will remove all UI elements this service has created. | |
| void | enterEntitySelectionMode (UID _visualizationModelUID, entitySelectionType _selectionType, bool _allowMultipleSelection, const std::string &_filter, entitySelectionAction _actionType, const std::string &_message, const std::map< std::string, std::string > &_options, ot::serviceID_t _serviceToReplyTo) const |
| void | freeze3DView (UID _visualizationModelUID, bool _flag) |
| void | refreshSelection (UID _visualizationModelUID) |
| void | refreshAllViews (UID visualizationModelID) |
| void | sendUpdatedControlState (void) |
| void | setControlState (const std::string controlName, bool enabled) |
| bool | sendMessage (bool _queue, JsonDocument &_doc, std::string &_response) |
Public Member Functions inherited from ot::ServiceBase | |
| ServiceBase () | |
| Constructor. | |
| ServiceBase (const std::string &_name, const std::string &_type) | |
| Constructor. | |
| ServiceBase (const std::string &_name, const std::string &_type, const std::string &_url, serviceID_t _id, const std::string &_siteId=std::string()) | |
| Constructor. | |
| ServiceBase (const ServiceBase &_other) | |
| Copy constructor. | |
| ServiceBase & | operator= (const ServiceBase &_other) |
| bool | operator== (const ServiceBase &_other) const |
| bool | operator!= (const ServiceBase &_other) const |
| virtual | ~ServiceBase () |
| Deconstructor. | |
| void | setServiceID (serviceID_t _id) |
| Set the service ID. | |
| void | setServiceURL (const std::string &_url) |
| Set the service URL. | |
| void | setServiceName (const std::string &_name) |
| Set the service name. | |
| void | setServiceType (const std::string &_type) |
| Set the service type. | |
| void | setSiteId (const std::string &_id) |
| Set the site ID. | |
| void | setSessionCount (int _count) |
| Set the session count. | |
| serviceID_t | getServiceID (void) const |
| Return the service ID. | |
| int | getServiceIDAsInt (void) const |
| Return the service ID as an Integer (The service ID is an Integer stored as a String) | |
| int | getSessionCount (void) const |
| Return the session count. | |
| const std::string & | getServiceURL (void) const |
| Return the service URL. | |
| std::string | getServiceName (void) const |
| Return the service name. | |
| std::string | getServiceType (void) const |
| Return the service type. | |
| std::string | getSiteId (void) const |
| Return the site ID. | |
| BasicServiceInformation | getBasicServiceInformation (void) const |
Protected Member Functions | |
| bool | controlNameExists (const std::string &_name) const |
| Will return true if the provided control was created here Usually used in debug mode. | |
Protected Attributes | |
| ApplicationBase * | m_application |
| std::list< std::string > | m_uiElements |
| The application base this component belings to. | |
| std::map< std::string, bool > | m_uiControlState |
| List of all UI elements that werde created by this component. | |
| std::map< std::string, bool > | m_uiControlStateInUI |
Protected Attributes inherited from ot::ServiceBase | |
| serviceID_t | m_serviceID |
| std::string | m_serviceURL |
| Service ID. | |
| std::string | m_serviceName |
| Service URL. | |
| std::string | m_serviceType |
| Service name. | |
| std::string | m_siteId |
| Service type. | |
| int | m_sessionCount |
| Site ID. | |
Friends | |
| class | ApplicationBase |
| ot::components::UiComponent::UiComponent | ( | const std::string & | _name, |
| const std::string & | _type, | ||
| const std::string & | _url, | ||
| serviceID_t | _id, | ||
| ApplicationBase * | _application ) |
|
virtual |
| void ot::components::UiComponent::activateMenuPage | ( | const std::string & | _pageName | ) |
| void ot::components::UiComponent::addControlNameToList | ( | std::list< std::string > & | _list, |
| const std::string & | _pageName, | ||
| const std::string & | _groupName, | ||
| const std::string & | _controlName ) |
Will add the control name of the item that is located at the menu.
| _list | The list to add the item to |
| _pageName | The name of the page the controls' group is located at |
| _groupName | The name of the group the controls' subgroup is located at |
| _controlName | The name of the control |
| void ot::components::UiComponent::addControlNameToList | ( | std::list< std::string > & | _list, |
| const std::string & | _pageName, | ||
| const std::string & | _groupName, | ||
| const std::string & | _subgroupName, | ||
| const std::string & | _controlName ) |
Will add the control name of the item that is located at the menu.
| _list | The list to add the item to |
| _pageName | The name of the page the controls' group is located at |
| _groupName | The name of the group the controls' subgroup is located at |
| _subgroupName | The name of the subgroup the control is located at |
| _controlName | The name of the control |
| void ot::components::UiComponent::addIconSearchPath | ( | const std::string & | _iconPath | ) |
Will add the provided path to the uiService icon manager This function has no effect when running in release mode.
| void ot::components::UiComponent::addMenuButton | ( | const std::string & | _pageName, |
| const std::string & | _groupName, | ||
| const std::string & | _buttonName, | ||
| const std::string & | _text, | ||
| const LockTypeFlags & | _lockTypes, | ||
| const std::string & | _iconName, | ||
| const std::string & | _iconFolder = std::string("Default"), | ||
| const std::string & | _keySequence = std::string("") ) |
Will add a new ToolButton in the specified menu group at the UI.
| _pageName | The name of the page the group is located at |
| _groupName | The name of the group to add the action at |
| _buttonName | The name of the button |
| _text | The text of the button |
| _keySequence | The shortcut key sequence to trigger this button (you can use ot::ui::keySequenceToString() for help, include openTwin/uiTypes) |
| _lockTypes | The lock type groups that this control belongs to (refer to documentation) |
| _iconName | The name of the icon that should be displayed in the action (refer to documentation) |
| _iconFolder | The folder the icon is located at (refer to documentation) |
| void ot::components::UiComponent::addMenuButton | ( | const std::string & | _pageName, |
| const std::string & | _groupName, | ||
| const std::string & | _subgroupName, | ||
| const std::string & | _buttonName, | ||
| const std::string & | _text, | ||
| const LockTypeFlags & | _lockTypes, | ||
| const std::string & | _iconName, | ||
| const std::string & | _iconFolder = std::string("Default"), | ||
| const std::string & | _keySequence = std::string("") ) |
Will add a new ToolButton in the specified menu sub group at the UI.
| _pageName | The name of the page the group is located at |
| _groupName | The name of the group the subgroup is located at |
| _subgroupName | The name of the subgorup the button will be placed at |
| _buttonName | The name of the button |
| _text | The text of the button |
| _lockTypes | The lock type groups that this control belongs to (refer to documentation) |
| _iconName | The name of the icon that should be displayed in the action (refer to documentation) |
| _iconFolder | The folder the icon is located at (refer to documentation) |
| _keySequence | The shortcut key sequence to trigger this button (you can use ot::ui::keySequenceToString() for help, include openTwin/uiTypes) |
| void ot::components::UiComponent::addMenuButton | ( | ot::MenuButtonDescription & | _menuButtonDescription, |
| const LockTypeFlags & | _lockTypes, | ||
| const std::string & | _iconName, | ||
| const std::string & | _iconFolder = std::string("Default"), | ||
| const std::string & | _keySequence = std::string("") ) |
| void ot::components::UiComponent::addMenuCheckbox | ( | const std::string & | _pageName, |
| const std::string & | _groupName, | ||
| const std::string & | _checkboxName, | ||
| const std::string & | _checkboxText, | ||
| bool | _isChecked, | ||
| const LockTypeFlags & | _lockTypes ) |
Will add a new CheckBox in the specified menu group at the UI.
| _pageName | The name of the page the group is located at |
| _groupName | The name of the group to add the CheckBox at |
| _buttonName | The name of the CheckBox |
| _iconName | The name of the icon that should be displayed in the action (refer to documentation) |
| _lockTypes | The lock type groups that this control belongs to (refer to documentation) |
| void ot::components::UiComponent::addMenuCheckbox | ( | const std::string & | _pageName, |
| const std::string & | _groupName, | ||
| const std::string & | _subgroupName, | ||
| const std::string & | _checkboxName, | ||
| const std::string & | _checkboxText, | ||
| bool | _isChecked, | ||
| const LockTypeFlags & | _lockTypes ) |
Will add a new CheckBox in the specified menu sub group at the UI.
| _pageName | The name of the page the group is located at |
| _groupName | The name of the group the subgroup is located at |
| _subgroupName | The name of the subgorup the CheckBox will be placed at |
| _buttonName | The name of the CheckBox |
| _iconName | The name of the icon that should be displayed in the action (refer to documentation) |
| _lockTypes | The lock type groups that this control belongs to (refer to documentation) |
| void ot::components::UiComponent::addMenuGroup | ( | const std::string & | _pageName, |
| const std::string & | _groupName ) |
Will add a new menu group in the specified menu page at the UI.
| _pageName | The name of the page to add the group at |
| _groupName | The name of the group |
| void ot::components::UiComponent::addMenuLineEdit | ( | const std::string & | _pageName, |
| const std::string & | _groupName, | ||
| const std::string & | _lineEditName, | ||
| const std::string & | _labelText, | ||
| const std::string & | _initialText, | ||
| const LockTypeFlags & | _lockTypes ) |
Will add a new LineEdit in the specified menu group at the UI.
| _pageName | The name of the page the group is located at |
| _groupName | The name of the group to add the LineEdit at |
| _buttonName | The name of the LineEdit |
| _iconName | The name of the icon that should be displayed in the action (refer to documentation) |
| _lockTypes | The lock type groups that this control belongs to (refer to documentation) |
| void ot::components::UiComponent::addMenuLineEdit | ( | const std::string & | _pageName, |
| const std::string & | _groupName, | ||
| const std::string & | _subgroupName, | ||
| const std::string & | _lineEditName, | ||
| const std::string & | _labelText, | ||
| const std::string & | _initialText, | ||
| const LockTypeFlags & | _lockTypes ) |
Will add a new LineEdit in the specified menu group at the UI.
| _pageName | The name of the page the group is located at |
| _groupName | The name of the group the subgroup is located at |
| _subgroupName | The name of the subgorup the LineEdit will be placed at |
| _buttonName | The name of the LineEdit |
| _iconName | The name of the icon that should be displayed in the action (refer to documentation) |
| _lockTypes | The lock type groups that this control belongs to (refer to documentation) |
| void ot::components::UiComponent::addMenuPage | ( | const std::string & | _pageName | ) |
Will add a new menu page in the UI.
| _pageName | The name of the page to add |
| void ot::components::UiComponent::addMenuSubGroup | ( | const std::string & | _pageName, |
| const std::string & | _groupName, | ||
| const std::string & | _subgroupName ) |
Will add a new menu subgroup in the specified menu group at the UI.
| _pageName | The name of the page to add the group at |
| _groupName | The name of the group |
| void ot::components::UiComponent::addShortcut | ( | const std::string & | _keySequence | ) |
Will add a new shortcut The shortcut will be listened application wide.
| _keySequence | The shortcut key sequence to trigger this button (you can use ot::ui::keySequenceToString() for help, include openTwin/uiTypes) |
| void ot::components::UiComponent::closeProgressInformation | ( | void | ) |
Will hide the progress bar.
|
protected |
Will return true if the provided control was created here Usually used in debug mode.
| void ot::components::UiComponent::createRubberband | ( | const std::string & | _note, |
| const std::string & | _configurationJson ) |
Will create a rubberband and start the sequence according to the configuration.
| _note | The note for the rubberband, the note will be attatched to the response once the rubberband sequence is over |
| _json | The json document describing the rubberband |
| void ot::components::UiComponent::deregisterForModelEvents | ( | void | ) | const |
Will deregister from the model events at the UI.
| void ot::components::UiComponent::displayErrorPrompt | ( | const std::string & | _message | ) | const |
Will display a message in a error prompt dialog.
| _message | The message to display |
| void ot::components::UiComponent::displayInformationPrompt | ( | const std::string & | _message | ) | const |
Will display a message in a information prompt dialog.
| _message | The message to display |
| void ot::components::UiComponent::displayMessage | ( | const std::string & | _message | ) | const |
Will display a message in the Frontends output window.
| _message | The message to display. |
| void ot::components::UiComponent::displayStyledMessage | ( | const StyledTextBuilder & | _builder | ) | const |
Will display a styled text message in the Frontends output window.
| _builder | StyledTextBuilder containing the message |
| void ot::components::UiComponent::displayWarningPrompt | ( | const std::string & | _message | ) | const |
Will display a message in a warning prompt dialog.
| _message | The message to display |
| void ot::components::UiComponent::enterEntitySelectionMode | ( | UID | _visualizationModelUID, |
| entitySelectionType | _selectionType, | ||
| bool | _allowMultipleSelection, | ||
| const std::string & | _filter, | ||
| entitySelectionAction | _actionType, | ||
| const std::string & | _message, | ||
| const std::map< std::string, std::string > & | _options, | ||
| ot::serviceID_t | _serviceToReplyTo ) const |
| void ot::components::UiComponent::freeze3DView | ( | UID | _visualizationModelUID, |
| bool | _flag ) |
| void ot::components::UiComponent::lockUI | ( | const LockTypeFlags & | _lockTypes | ) | const |
Will lock the UI Elements that belong to the provided lock type.
| _lockTypes | The lock type Groups to lock in the UI |
| void ot::components::UiComponent::notifyUiSetupCompleted | ( | void | ) |
Will notify the ui that this service completed its frontend setup.
| void ot::components::UiComponent::refreshAllViews | ( | UID | visualizationModelID | ) |
| void ot::components::UiComponent::refreshSelection | ( | UID | _visualizationModelUID | ) |
| void ot::components::UiComponent::registerForModelEvents | ( | void | ) | const |
Will register for model events at the UI.
| void ot::components::UiComponent::removeAllUIElements | ( | void | ) |
Will remove all UI elements this service has created.
| void ot::components::UiComponent::removeUIElements | ( | const std::list< std::string > & | _itemList | ) |
Will remove the specified UI elements from the UI.
| bool ot::components::UiComponent::sendMessage | ( | bool | _queue, |
| JsonDocument & | _doc, | ||
| std::string & | _response ) |
| void ot::components::UiComponent::sendUpdatedControlState | ( | void | ) |
| void ot::components::UiComponent::setCheckboxValues | ( | const std::string & | _controlName, |
| bool | _checkedState ) const |
Will set tthe provided values to the checkbox.
| _controlName | The name of the checkbox |
| _checkedState | The checked state to set |
| void ot::components::UiComponent::setControlsEnabledState | ( | const std::list< std::string > & | _enabledControls, |
| const std::list< std::string > & | _disabledControls ) const |
Will set the enabled state of the provided controls.
| _enabledControls | The names of the controls that should be enabled |
| _disabledControls | The names of the controls that should be disabled |
| void ot::components::UiComponent::setControlState | ( | const std::string | controlName, |
| bool | enabled ) |
| void ot::components::UiComponent::setControlToolTip | ( | const std::string & | _controlName, |
| const std::string & | _toolTipText ) const |
Will set the tool tip for the specified object that is placed in the menu.
| _controlName | The name of the control to set the tool tip at |
| _toolTipText | The text of the tool tip |
| void ot::components::UiComponent::setControlToolTip | ( | const std::string & | _gepaName, |
| const std::string & | _groupName, | ||
| const std::string & | _subgroupName, | ||
| const std::string & | _controlName, | ||
| const std::string & | _toolTipText ) const |
Will set the tool tip for the specified object that is placed in the menu.
| _pageName | The name of the page the controls' group is located at |
| _groupName | The name of the group the controls' subgroup is located at |
| _subgroupName | The name of the subgroup the control is located at |
| _controlName | The name of the control to set the tool tip at |
| _toolTipText | The text of the tool tip |
| void ot::components::UiComponent::setControlToolTip | ( | const std::string & | _pageName, |
| const std::string & | _groupName, | ||
| const std::string & | _controlName, | ||
| const std::string & | _toolTipText ) const |
Will set the tool tip for the specified object that is placed in the menu.
| _pageName | The name of the page the controls' group is located at |
| _groupName | The name of the group the control is located at |
| _controlName | The name of the control to set the tool tip at |
| _toolTipText | The text of the tool tip |
| void ot::components::UiComponent::setLineEditValues | ( | const std::string & | _controlName, |
| const std::string & | _text, | ||
| bool | _errorState = false ) const |
Will set the provided values to the line edit.
| _controlName | The name of the line edit |
| _text | The text to set |
| _errorState | The error state to set |
| void ot::components::UiComponent::setProgress | ( | int | percentage | ) |
Will set the percentage of the progress bar.
| percentage | The percentage for the progress bar |
| void ot::components::UiComponent::setProgressInformation | ( | std::string | message, |
| bool | continuous ) |
Will set the progress bar text. This also turns on the progress bar visibility.
| message | The text for the progress bar |
| continuous | Indicate whether the progress bar should show a continous animation (no percentages) |
| void ot::components::UiComponent::switchMenuTab | ( | const std::string & | _pageName | ) | const |
Will switch current menu tab to the one provided.
| _pageName | The name of the page |
| void ot::components::UiComponent::unlockUI | ( | const LockTypeFlags & | _lockTypes | ) | const |
Will unlock the UI Elements that belong to the provided lock type.
| _lockTypes | The lock type Groups to unlock in the UI |
|
friend |
|
protected |
|
protected |
List of all UI elements that werde created by this component.
|
protected |
|
protected |
The application base this component belings to.