OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
AppBase Class Reference

The API manager is used to manage the global objects required for this API to work. More...

#include "AppBase.h"

+ Inheritance diagram for AppBase:

Public Types

enum  StartOption { LogExport , NoAutoStart }
 
- Public Types inherited from ot::ActionHandler
typedef std::function< std::string(JsonDocument &) ActionHandlerMethodType)
 
- Public Types inherited from otoolkit::APIInterface
enum  InterfaceLogType { Information , Warning , Error }
 

Public Slots

void slotCopyRequested (const ot::CopyInformation &_info)
 
void slotPasteRequested (const ot::CopyInformation &_info)
 
void slotColorStyleChanged ()
 
void slotLockUI (bool _flag)
 
void slotLockSelectionAndModification (bool _flag)
 
void slotSetProgressBarVisibility (QString _progressMessage, bool _progressBaseVisible, bool _continuous)
 
void slotSetProgressBarValue (int _progressPercentage)
 
void slotRunCustomTimer (const QString &_timerId, int _intervalMs)
 
void queueCustomCallback (const QString &_callbackId)
 
void replaceInfoMessage (const QString &_message)
 Replace the current output window text with the provided one.
 
void appendInfoMessage (const QString &_message)
 Append a plain text message to the output.
 
void appendHtmlInfoMessage (const QString &_html)
 Append an HTML formatted message to the output.
 
void slotShowOutputContextMenu (QPoint _pos)
 
QVariantMap slotSendExecuteMessageToService (const QString &_serviceName, const QString &_message)
 Sends an execute message to the specified service and wait for the response.
 
QVariantMap slotSendExecuteMessageToUrl (const QString &_serviceUrl, const QString &_message)
 Sends an execute message to the specified service URL and wait for the response.
 
bool slotSendQueueMessageToService (const QString &_serviceName, const QString &_message)
 Sends a queue message to the specified service.
 
bool slotSendQueueMessageToUrl (const QString &_serviceUrl, const QString &_message)
 Sends a queue message to the specified service URL.
 
void slotShowInfoPrompt (const std::string &_title, const std::string &_message, const std::string &_detailedMessage)
 
void slotShowWarningPrompt (const std::string &_title, const std::string &_message, const std::string &_detailedMessage)
 
void slotShowErrorPrompt (const std::string &_title, const std::string &_message, const std::string &_detailedMessage)
 
void setTabToolBarTabOrder (const QStringList &_lst)
 
void activateToolBarTab (const QString &_tab)
 
void slotGraphicsItemRequested (const QString &_name, const QPointF &_pos)
 
void slotGraphicsElementsChanged (const ot::GraphicsChangeEvent &_event)
 
void slotGraphicsItemDoubleClicked (const ot::GraphicsItemCfg *_itemConfig)
 
void slotGraphicsConnectionRequested (const ot::UID &_fromUid, const std::string &_fromConnector, const ot::UID &_toUid, const std::string &_toConnector)
 
void slotGraphicsConnectionToConnectionRequested (const ot::UID &_fromItemUid, const std::string &_fromItemConnector, const ot::UID &_toConnectionUid, const ot::Point2DD &_newControlPoint)
 
void slotGraphicsSelectionChanged ()
 
void slotTextEditorSaveRequested ()
 
void slotTextLoadNextRequested (size_t _nextChunkStartIndex)
 
void slotTextLoadAllRequested (size_t _nextChunkStartIndex)
 
void slotTableSaveRequested ()
 
void slotVersionSelected (const std::string &_versionName)
 
void slotVersionDeselected ()
 
void slotRequestVersion (const std::string &_versionName)
 
QString determineAvailableViewTabText (const QString &_initialTabText)
 
void slotViewAdded (ot::WidgetView *_newView)
 
void slotViewFocusChanged (ot::WidgetView *_focusedView, ot::WidgetView *_previousView)
 
void slotViewCloseRequested (ot::WidgetView *_view)
 
void slotViewTabClicked (ot::WidgetView *_view)
 
void slotViewDataModifiedChanged (ot::WidgetView *_view)
 
void slotCreateProject ()
 Create a new project. Will show the project creation dialog.
 
void slotOpenProject ()
 Open the currently selected project in the welcome screen.
 
void slotOpenProjectFromIndex (int _index)
 
void slotRefreshProjectOverivew ()
 
void slotOpenSpecificProject (const QString &_projectName, const QString &_projectVersion)
 
void slotCopyProject ()
 
void slotRenameProject ()
 
void slotDeleteProject ()
 
void slotExportProject ()
 
void slotManageProjectAccess ()
 
void slotManageProjectOwner ()
 
void refreshWelcomeScreen ()
 Refreshes the welcome screen content. This function can be used to update the project list after projects were created, deleted, or modified.
 
QStringList getAvailableProjectNames () const
 
void downloadInstaller (QString gssUrl)
 Downloads the installer from the provided GSS URL and runs it.
 
void slotPropertyGridValueChanged (const ot::Property *_property)
 
void slotPropertyGridValueDeleteRequested (const ot::Property *_property)
 
void setNavigationTreeSortingEnabled (bool _enabled)
 
void setNavigationTreeMultiselectionEnabled (bool _enabled)
 
void clearNavigationTree ()
 
ot::UID findNavigationTreeItemByName (const QString &_itemName)
 
ot::UID addNavigationTreeItem (const ot::EntityTreeItem &_itemInfo)
 
void setNavigationTreeItemIcon (ot::UID _itemID, const QString &_iconName, const QString &_iconDefaultPath)
 
void setNavigationTreeItemText (ot::UID _itemID, const QString &_itemName)
 
void setNavigationTreeItemsSelected (const ot::UIDList &_itemIDs, bool _selected, bool _clearOtherSelection)
 
void setNavigationTreeItemSelected (ot::UID _itemID, bool _isSelected)
 
void setSingleNavigationTreeItemSelected (ot::UID _itemID, bool _isSelected)
 
void expandSingleNavigationTreeItem (ot::UID _itemID, bool _isExpanded)
 
bool isTreeItemExpanded (ot::UID _itemID)
 
bool isTreeItemSelected (ot::UID _itemID)
 
void toggleNavigationTreeItemSelection (ot::UID _itemID, bool _considerChilds)
 
void removeNavigationTreeItems (const std::vector< ot::UID > &itemIds)
 
void clearNavigationTreeSelection ()
 
QString getNavigationTreeItemText (ot::UID _itemID)
 
const ot::SelectionInformationgetSelectedNavigationTreeItems ()
 
void slotTreeItemSelectionChanged ()
 Navigation tree item selection has changed.
 
void slotTreeItemTextChanged (QTreeWidgetItem *_item, int _column)
 
void slotTreeItemFocused (QTreeWidgetItem *_item)
 
void slotHandleSelectionHasChanged (ot::SelectionHandlingResult *_result, ot::SelectionOrigin _eventOrigin)
 
void slotPlotResetItemSelectionRequest ()
 
void slotPlotCurveDoubleClicked (ot::UID _entityID, bool _hasControlModifier)
 
void servicesUiSetupCompleted ()
 Is called when the log-in dialog is available.
 
void projectOpenCompleted ()
 Is called when the project open operation is completed.
 
void projectCloseCompleted ()
 Is called when the project close operation is completed.
 
void slotProcessMessage (const QString &_json)
 

Signals

void logInDialogAvailable (QObject *_dialog)
 Is emitted when the log-in dialog is available.
 
void toolBarAvailable (QObject *_toolBar)
 Is emitted when the tool bar is available.
 
void loginSuccessful ()
 Is emitted when the log-in was successful and the default ui was created.
 
void projectOpened ()
 Is emitted when a project was opened.
 
void projectClosed ()
 Is emitted when a project was closed.
 
void servicesUiSetupComplete ()
 Is emitted when the services UI setup of all services in the session is complete.
 
void customTimerTimeout (const QString &_timerID)
 
void customQueueCallback (const QString &_callbackID)
 

Public Member Functions

virtual void log (const ot::LogMessage &_message) override
 Called when the a log message was created.
 
void handleLog (ot::JsonDocument &_jsonDocument)
 
std::string handleRegister (ot::JsonDocument &_jsonDocument)
 
void handleDeregister (ot::JsonDocument &_jsonDocument)
 
void handleClear ()
 
std::string handleGetDebugInfo ()
 
void handleSetGlobalLogFlags (ot::JsonDocument &_jsonDocument)
 
void handleSetCacheSize (ot::JsonDocument &_jsonDocument)
 
ot::ReturnMessage handleGetAllLogs ()
 
ot::ReturnMessage handleGetUserLogs (ot::JsonDocument &_jsonDocument)
 
void updateBufferSizeFromLogFlags (const ot::LogFlags &_flags)
 
virtual ~AppBase ()
 Deconstructor.
 
bool initialize ()
 Will initialize the API Returns: 0: OK -1: Was already initialized 1: Exception catched 2: Non exception catched 3: Log-in failed.
 
bool logIn ()
 
bool isInitialized () const
 Returns true if the API was initialized.
 
std::shared_ptr< QSettings > createSettingsInstance () const
 
void setUiServiceUID (ot::UID _uid)
 
ot::UID getUiServiceUID () const
 
void setViewerUID (ot::UID _uid)
 
ot::UID getViewerUID () const
 
void setModelUID (ot::UID _uid)
 
ot::UID getModelUID () const
 
ViewerComponentgetViewerComponent () const
 
ExternalServicesComponentgetExternalServicesComponent () const
 
void setCurrentProjectIsModified (bool _isModified=true)
 Will set the current project as modified and apply UI changes.
 
bool getCurrentProjectIsModified () const
 Will get the current project as modified state.
 
const LoginDatagetCurrentLoginData () const
 Will return the current username.
 
std::string getCurrentUserCollection () const
 Will return the current username.
 
ak::aWindow * mainWindow () const
 
ControlsManagercontrolsManager ()
 
LockManagerlockManager ()
 
ot::NavigationTreeViewgetProjectNavigation () const
 
bool runJSScriptFromFile (const QString &_filePath)
 
bool runJSScript (const QString &_scriptName, const QString &_scriptData)
 
virtual void log (const ot::LogMessage &_message) override
 Called when the a log message was created.
 
virtual void notify (ot::UID _senderId, ak::eventType _eventType, int _info1, int _info2) override
 Will call the callback function with the provided parameters.
 
virtual bool closeEvent () override
 
bool createNewProjectInDatabase (const QString &_projectName, const QString &_projectType)
 
void initializeDefaultUserSettings ()
 
void frontendSettingsChanged (const ot::Property *_property)
 
void viewerSettingsChanged (const ot::Property *_property)
 
void settingsChanged (const std::string &_owner, const ot::Property *_property)
 
void setWaitingAnimationVisible (bool flag) const
 
void createUi ()
 
void setDebug (bool)
 
bool debug () const
 
std::string getDebugInformation () const
 
ModelUIDtype createModel ()
 
ViewerUIDtype createView (ModelUIDtype _modelUID, const std::string &_projectName)
 
void setCurrentVisualizationTabFromEntityName (const std::string &_entityName, ot::WidgetViewBase::ViewType _viewType)
 Sets the current visualization tab.
 
void setCurrentVisualizationTabFromTitle (const std::string &_tabTitle)
 Sets the current visualization tab from the provided title.
 
std::string getCurrentVisualizationTabTitle ()
 
void importProject ()
 
void manageGroups ()
 
void exportLogs ()
 
void setSiteID (int _id)
 Will set the current site ID.
 
void setServiceURL (const std::string &_url)
 Will set the current Service URL of this service.
 
void setSessionServiceURL (const std::string &_url)
 Will set the session service URL.
 
void startSessionRefreshTimer ()
 
void setViewHandlingFlag (ot::ViewHandlingFlag _flag, bool _active=true)
 
void setViewHandlingFlags (const ot::ViewHandlingFlags &_flags)
 
const ot::ViewHandlingFlagsgetViewHandlingFlags () const
 
void renameEntity (const std::string &_fromPath, const std::string &_toPath)
 
int getSiteID () const
 Will return the current site ID.
 
ot::UID uiUID () const
 
void setRelayURLs (const std::string &)
 Will set the Relay URLs.
 
std::string getRelayURLs () const
 Will return the current Relay URLs.
 
const std::string & getServiceURL () const
 Will return the current Service URL.
 
const std::string & getSessionServiceURL () const
 Will return the session service URL.
 
void setCurrentProjectInfo (const ot::ProjectInformation &_info)
 
const ot::ProjectInformationgetCurrentProjectInfo () const
 
void switchToViewMenuTabIfNeeded () const
 
void switchToMenuTab (const std::string &_menu)
 
std::string getCurrentMenuTab ()
 
void closeAllViewerTabs ()
 
void clearSessionInformation ()
 Will clear the session information such as the project name, collection name and user name.
 
void restoreSessionState ()
 
void storeSessionState ()
 
bool storeSettingToDataBase (const ot::PropertyGridCfg &_config, const std::string &_subKey)
 
ot::PropertyGridCfg getSettingsFromDataBase (const std::string &_subKey)
 
void updateLogIntensityInfo ()
 
ot::ProjectOverviewWidget::ViewMode getWelcomeScreenViewMode () const
 
ToolBargetToolBar () const
 
void setupPropertyGrid (const ot::PropertyGridCfg &_configuration)
 
void clearModalPropertyGrid ()
 
void focusPropertyGridItem (const std::string &_group, const std::string &_name)
 
void setVisible3D (bool visible3D)
 
void setVisibleBlockPicker (bool visibleBlockPicker)
 
bool getVisible3D () const
 
bool getVisibleBlockPicker () const
 
void appendLogMessage (const ot::LogMessage &_message)
 Append a log message to the output. The following information will be used from the log message:
 
ot::VersionGraphManagerViewgetVersionGraph ()
 
void autoCloseUnpinnedViews (bool _ignoreCurrent)
 
ot::PropertyGridItemfindProperty (const std::string &_groupName, const std::string &_itemName)
 
ot::PropertyGridItemfindProperty (const std::list< std::string > &_groupPath, const std::string &_itemName)
 
std::string getPropertyType (const std::string &_groupName, const std::string &_itemName)
 
bool getPropertyIsDeletable (const std::string &_groupName, const std::string &_itemName)
 
ShortcutManagershortcutManager ()
 
void clearPropertyGrid ()
 
void lockPropertyGrid (bool flag)
 
void addGraphicsPickerPackage (const ot::GraphicsPickerCollectionPackage &_pckg)
 
void clearGraphicsPickerData ()
 Clears the graphics picker and stored service picker data.
 
ot::GraphicsViewViewcreateNewGraphicsEditor (const std::string &_entityName, const QString &_title, const std::string &_pickerKey, const ot::WidgetView::InsertFlags &_viewInsertFlags, const ot::VisualisationCfg &_visualizationConfig)
 
ot::GraphicsViewViewfindGraphicsEditor (const std::string &_entityName, const ot::UIDList &_visualizingEntities)
 
ot::GraphicsViewViewfindOrCreateGraphicsEditor (const std::string &_entityName, const QString &_title, const std::string &_pickerKey, const ot::WidgetView::InsertFlags &_viewInsertFlags, const ot::VisualisationCfg &_visualizationConfig)
 
std::list< ot::GraphicsViewView * > getAllGraphicsEditors ()
 
void closeGraphicsEditor (const std::string &_entityName)
 
ot::TextEditorViewcreateNewTextEditor (const ot::TextEditorCfg &_config, const ot::WidgetView::InsertFlags &_viewInsertFlags, const ot::UIDList &_visualizingEntities)
 
ot::TextEditorViewfindTextEditor (const std::string &_entityName, const ot::UIDList &_visualizingEntities)
 
ot::TextEditorViewfindOrCreateTextEditor (const ot::TextEditorCfg &_config, const ot::WidgetView::InsertFlags &_viewInsertFlags, const ot::UIDList &_visualizingEntities)
 
void closeTextEditor (const std::string &_entityName)
 
void closeAllTextEditors (const ot::BasicServiceInformation &_serviceInfo)
 
ot::TableViewcreateNewTable (const ot::TableCfg &_config, const ot::WidgetView::InsertFlags &_viewInsertFlags, const ot::UIDList &_visualizingEntities)
 
ot::TableViewfindTable (const std::string &_entityName, const ot::UIDList &_visualizingEntities)
 
ot::TableViewfindOrCreateTable (const ot::TableCfg &_config, const ot::WidgetView::InsertFlags &_viewInsertFlags, const ot::UIDList &_visualizingEntities)
 
void closeTable (const std::string &_name)
 
ot::PlotViewcreateNewPlot (const ot::Plot1DCfg &_config, const ot::WidgetView::InsertFlags &_viewInsertFlags, const ot::UIDList &_visualizingEntities)
 
ot::PlotViewfindPlot (const std::string &_entityName, const ot::UIDList &_visualizingEntities)
 
ot::PlotViewfindOrCreatePlot (const ot::Plot1DCfg &_config, const ot::WidgetView::InsertFlags &_viewInsertFlags, const ot::UIDList &_visualizingEntities)
 
void closePlot (const std::string &_name)
 
virtual ot::MessageDialogCfg::BasicButton showPrompt (const ot::MessageDialogCfg &_config, QWidget *_parent) override
 
ot::MessageDialogCfg::BasicButton showPrompt (const std::string &_title, const std::string &_message, const std::string &_detailedMessage, ot::MessageDialogCfg::BasicIcon _icon, const ot::MessageDialogCfg::BasicButtons &_buttons)
 
void destroyObjects (const std::vector< ot::UID > &_objects)
 
void makeWidgetViewCurrentWithoutInputFocus (ot::WidgetView *_view, bool _ignoreEntitySelect)
 
bool openNewInstance (const ot::ProjectInformation &_projectInfo, const std::string &_customVersion)
 
void editProjectInformation (const std::string &_senderUrl, const std::string &_callbackAction)
 
virtual void log (const ot::LogMessage &_message) override
 Called when the a log message was created.
 
virtual void log (const QString &_sender, InterfaceLogType _type, const QString &_message) override
 
virtual bool addTool (otoolkit::Tool *_tool) override
 
virtual void updateStatusString (const QString &_statusText) override
 
virtual void updateStatusStringAsError (const QString &_statusText) override
 
virtual void registerToolActivityNotifier (otoolkit::ToolActivityNotifier *_notifier) override
 
virtual void removeToolActivityNotifier (otoolkit::ToolActivityNotifier *_notifier) override
 
virtual otoolkit::SettingsRef createSettingsInstance () override
 
virtual const QWidget * rootWidget () const override
 
virtual void closeEvent (QCloseEvent *_event) override
 
void setUrl (const QString &_url)
 
const QString & url () const
 
void parseStartArgs (const std::string &_args)
 
void setApplicationInstance (QApplication *_app)
 
QApplication * applicationInstance ()
 
void setUpdateTransparentColorStyleValueEnabled (bool _enabled)
 
bool getUpdateTransparentColorStyleValueEnabled () const
 
void updateTransparentColorStyleValue ()
 
bool getIgnoreToolAutoStart () const
 
- 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.
 
bool operator== (const ServiceBase &_other) const
 
bool operator!= (const ServiceBase &_other) const
 
virtual ~ServiceBase ()
 Deconstructor.
 
virtual void addToJsonObject (JsonValue &_object, JsonAllocator &_allocator) const override
 Serialize the object data into the provided JSON object by using the provided allocator.
 
virtual void setFromJsonObject (const ConstJsonObject &_object) override
 Set the data by deserializing the object. Set the object contents from the provided JSON object.
 
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 () const
 Return the service ID.
 
int getSessionCount () const
 Return the session count.
 
const std::string & getServiceURL () const
 Return the service URL.
 
const std::string & getServiceName () const
 Return the service name.
 
const std::string & getServiceType () const
 Return the service type.
 
const std::string & getSiteID () const
 Return the site ID.
 
BasicServiceInformation getBasicServiceInformation () const
 
- Public Member Functions inherited from ot::Serializable
 Serializable ()=default
 
virtual ~Serializable ()=default
 
virtual std::string toJson () const
 Create a JSON string from the object data.
 
- Public Member Functions inherited from ot::AbstractLogNotifier
 AbstractLogNotifier ()
 
virtual ~AbstractLogNotifier ()
 
void setCustomDeleteLogNotifier (bool _customDelete=true)
 Will set the delete later flag. If delete later is set, the creator keeps ownership of this object even after it is added to the LogDispatcher.
 
bool getCustomDeleteLogNotifier () const
 Returns true if the delete later mode is set.
 
- Public Member Functions inherited from ot::ActionHandler
 ActionHandler (ActionDispatcherBase *_dispatcher=&ot::ActionDispatcher::instance())
 Creates a new ActionHandler that will register all created [handlers] at the provided [action dispatcher].
 
 ActionHandler (ActionHandler &&_other) noexcept
 Move constructor.
 
 ~ActionHandler ()
 
ActionHandleroperator= (ActionHandler &&_other) noexcept
 Move assignment operator.
 
template<typename Function >
bool connectAction (const std::string &_actionName, Function &&_func, const ot::MessageTypeFlags &_messageFlags=ot::DEFAULT_MESSAGE_TYPE, const ActionDispatcherBase::InsertFlags &_insertFlags=ActionDispatcherBase::NoFlags)
 Creates a new [handler] and registers it at the currently set [action dispatcher]. The ActionHandler will take ownership of the created handler and will remove it from the dispatcher when destroyed.
 
template<typename Function >
bool connectAction (const std::initializer_list< std::string > &_actionNames, Function &&_func, const ot::MessageTypeFlags &_messageFlags=ot::DEFAULT_MESSAGE_TYPE, const ActionDispatcherBase::InsertFlags &_insertFlags=ActionDispatcherBase::NoFlags)
 Creates a new [handler] and registers it at the currently set [action dispatcher]. The ActionHandler will take ownership of the created handler and will remove it from the dispatcher when destroyed.
 
template<typename Function >
bool connectAction (const std::list< std::string > &_actionNames, Function &&_func, const ot::MessageTypeFlags &_messageFlags=ot::DEFAULT_MESSAGE_TYPE, const ActionDispatcherBase::InsertFlags &_insertFlags=ActionDispatcherBase::NoFlags)
 Creates a new [handler] and registers it at the currently set [action dispatcher]. The ActionHandler will take ownership of the created handler and will remove it from the dispatcher when destroyed.
 
template<typename T , typename Method >
bool connectAction (const std::string &_actionName, T *_instance, Method &&_method, const ot::MessageTypeFlags &_messageFlags=ot::DEFAULT_MESSAGE_TYPE, const ActionDispatcherBase::InsertFlags &_insertFlags=ActionDispatcherBase::NoFlags)
 Creates a new [handler] and registers it at the currently set [action dispatcher]. The ActionHandler will take ownership of the created handler and will remove it from the dispatcher when destroyed.
 
template<typename T , typename Method >
bool connectAction (const std::initializer_list< std::string > &_actionNames, T *_instance, Method &&_method, const ot::MessageTypeFlags &_messageFlags=ot::DEFAULT_MESSAGE_TYPE, const ActionDispatcherBase::InsertFlags &_insertFlags=ActionDispatcherBase::NoFlags)
 Creates a new [handler] and registers it at the currently set [action dispatcher]. The ActionHandler will take ownership of the created handler and will remove it from the dispatcher when destroyed.
 
template<typename T , typename Method >
bool connectAction (const std::list< std::string > &_actionNames, T *_instance, Method &&_method, const ot::MessageTypeFlags &_messageFlags=ot::DEFAULT_MESSAGE_TYPE, const ActionDispatcherBase::InsertFlags &_insertFlags=ActionDispatcherBase::NoFlags)
 Creates a new [handler] and registers it at the currently set [action dispatcher]. The ActionHandler will take ownership of the created handler and will remove it from the dispatcher when destroyed.
 
- Public Member Functions inherited from ot::MessageBoxHandler
 MessageBoxHandler ()
 
virtual ~MessageBoxHandler ()
 

Static Public Member Functions

static AppBaseinstance (void)
 
static AppBaseinstance ()
 
static AppBaseinstance (QApplication *_app=(QApplication *) nullptr)
 
- Static Public Member Functions inherited from ot::WindowAPI
static QWidget * getRootWidget ()
 
static void lockUI (bool _flag=true)
 
static void unlockUI ()
 
static void lockSelectionAndModification (bool _flag)
 
static void setProgressBarVisibility (QString _progressMessage, bool _progressBaseVisible, bool _continuous)
 Will turn on or off the progress bar visibility and set the progress message.
 
static void setProgressBarValue (int _progressPercentage)
 Will set the percentage of the progress bar.
 
static void showInfoPrompt (const std::string &_title, const std::string &_message, const std::string &_detailedMessage=std::string())
 
static void showWarningPrompt (const std::string &_title, const std::string &_message, const std::string &_detailedMessage=std::string())
 
static void showErrorPrompt (const std::string &_title, const std::string &_message, const std::string &_detailedMessage=std::string())
 
static void appendOutputMessage (const std::string &_message)
 
static void appendOutputMessage (const StyledTextBuilder &_message)
 
- Static Public Member Functions inherited from ot::CommunicationAPI
static void setDefaultConnectorServiceUrl (const std::string &_url)
 
static bool sendExecute (const std::string &_message, std::string &_response)
 
static bool sendQueue (const std::string &_message)
 
static bool sendExecute (const std::string &_receiverUrl, const std::string &_message, std::string &_response)
 
static bool sendQueue (const std::string &_receiverUrl, const std::string &_message)
 
static bool sendExecuteToService (const BasicServiceInformation &_serviceInfo, const std::string &_message, std::string &_response)
 
static bool sendQueueToService (const BasicServiceInformation &_serviceInfo, const std::string &_message)
 
- Static Public Member Functions inherited from ot::CurrentProjectAPI
static void activateModelVersion (const std::string &_versionName)
 

Protected Member Functions

virtual QWidget * getRootWidgetAPI () override
 
virtual void lockUIAPI (bool _flag) override
 
virtual void lockSelectionAndModificationAPI (bool _flag) override
 
virtual void setProgressBarVisibilityAPI (QString _progressMessage, bool _progressBaseVisible, bool _continuous) override
 
virtual void setProgressBarValueAPI (int _progressPercentage) override
 
virtual void showInfoPromptAPI (const std::string &_title, const std::string &_message, const std::string &_detailedMessage) override
 
virtual void showWarningPromptAPI (const std::string &_title, const std::string &_message, const std::string &_detailedMessage) override
 
virtual void showErrorPromptAPI (const std::string &_title, const std::string &_message, const std::string &_detailedMessage) override
 
virtual void appendOutputMessageAPI (const std::string &_message) override
 
virtual void appendOutputMessageAPI (const ot::StyledTextBuilder &_message) override
 
virtual bool sendExecuteAPI (const std::string &_receiverUrl, const std::string &_message, std::string &_response) override
 
virtual bool sendQueueAPI (const std::string &_receiverUrl, const std::string &_message) override
 
virtual bool sendExecuteToServiceAPI (const ot::BasicServiceInformation &_serviceInfo, const std::string &_message, std::string &_response) override
 
virtual bool sendQueueToServiceAPI (const ot::BasicServiceInformation &_serviceInfo, const std::string &_message) override
 
virtual void activateModelVersionAPI (const std::string &_versionName) override
 
- Protected Member Functions inherited from ot::WindowAPI
 WindowAPI ()
 
virtual ~WindowAPI ()
 
- Protected Member Functions inherited from ot::CommunicationAPI
 CommunicationAPI ()
 
virtual ~CommunicationAPI ()
 
- Protected Member Functions inherited from ot::CurrentProjectAPI
 CurrentProjectAPI ()
 
virtual ~CurrentProjectAPI ()
 
- Protected Member Functions inherited from otoolkit::APIInterface
 APIInterface ()
 
virtual ~APIInterface ()
 

Private Member Functions

virtual ~AppBase ()
 

Friends

class ToolBar
 
class KeyboardCommandHandler
 

Detailed Description

The API manager is used to manage the global objects required for this API to work.

Member Enumeration Documentation

◆ StartOption

Enumerator
LogExport 
NoAutoStart 

Constructor & Destructor Documentation

◆ ~AppBase()

virtual AppBase::~AppBase ( )
virtual

Deconstructor.

Member Function Documentation

◆ activateModelVersionAPI()

void AppBase::activateModelVersionAPI ( const std::string & _versionName)
overrideprotectedvirtual

◆ activateToolBarTab

void AppBase::activateToolBarTab ( const QString & _tab)
slot

◆ addGraphicsPickerPackage()

◆ addNavigationTreeItem

ot::UID AppBase::addNavigationTreeItem ( const ot::EntityTreeItem & _itemInfo)
slot

◆ addTool()

bool AppBase::addTool ( otoolkit::Tool * _tool)
overridevirtual

◆ appendHtmlInfoMessage

void AppBase::appendHtmlInfoMessage ( const QString & _html)
slot

Append an HTML formatted message to the output.

Parameters
_htmlThe HTML formatted message to append.

References ot::PlainTextEditView::getPlainTextEdit().

◆ appendInfoMessage

void AppBase::appendInfoMessage ( const QString & _message)
slot

Append a plain text message to the output.

Parameters
_messageThe message to append.

References ot::PlainTextEditView::getPlainTextEdit().

◆ appendLogMessage()

void AppBase::appendLogMessage ( const ot::LogMessage & _message)

Append a log message to the output. The following information will be used from the log message:

  • Message Type
  • Service Name
  • Text
    Parameters
    _messageThe log message to append.

References ot::WindowAPI::appendOutputMessage(), ot::LogMessage::getFlags(), ot::LogMessage::getServiceName(), ot::LogMessage::getText(), ot::TEST_LOG, and ot::WARNING_LOG.

◆ appendOutputMessageAPI() [1/2]

void AppBase::appendOutputMessageAPI ( const ot::StyledTextBuilder & _message)
overrideprotectedvirtual

◆ appendOutputMessageAPI() [2/2]

void AppBase::appendOutputMessageAPI ( const std::string & _message)
overrideprotectedvirtual

Implements ot::WindowAPI.

References appendInfoMessage().

◆ applicationInstance()

QApplication * AppBase::applicationInstance ( )
inline

◆ autoCloseUnpinnedViews()

◆ clearGraphicsPickerData()

void AppBase::clearGraphicsPickerData ( )

Clears the graphics picker and stored service picker data.

References ot::GraphicsPickerManager::clear().

◆ clearModalPropertyGrid()

◆ clearNavigationTree

void AppBase::clearNavigationTree ( )
slot

◆ clearNavigationTreeSelection

void AppBase::clearNavigationTreeSelection ( )
slot

◆ clearPropertyGrid()

void AppBase::clearPropertyGrid ( )

◆ clearSessionInformation()

void AppBase::clearSessionInformation ( )

Will clear the session information such as the project name, collection name and user name.

◆ closeAllTextEditors()

◆ closeAllViewerTabs()

◆ closeEvent() [1/2]

◆ closeEvent() [2/2]

void AppBase::closeEvent ( QCloseEvent * _event)
overridevirtual

◆ closeGraphicsEditor()

void AppBase::closeGraphicsEditor ( const std::string & _entityName)

◆ closePlot()

void AppBase::closePlot ( const std::string & _name)

◆ closeTable()

void AppBase::closeTable ( const std::string & _name)

◆ closeTextEditor()

void AppBase::closeTextEditor ( const std::string & _entityName)

◆ controlsManager()

ControlsManager * AppBase::controlsManager ( )

◆ createModel()

◆ createNewGraphicsEditor()

ot::GraphicsViewView * AppBase::createNewGraphicsEditor ( const std::string & _entityName,
const QString & _title,
const std::string & _pickerKey,
const ot::WidgetView::InsertFlags & _viewInsertFlags,
const ot::VisualisationCfg & _visualizationConfig )

References ot::WidgetViewManager::addView(), ot::All, ot::Grid::AutoScaleGrid, ot::GraphicsView::connectionRequested(), ot::GraphicsView::connectionToConnectionRequested(), ot::GraphicsView::copyRequested(), ot::DotLine, ot::GraphicsView::elementsChanged(), findGraphicsEditor(), ot::VisualisationCfg::getCustomViewFlags(), ot::GraphicsView::getGraphicsScene(), ot::GraphicsViewView::getGraphicsView(), ot::VisualisationCfg::getVisualisingEntities(), ot::GlobalWidgetViewManager::instance(), ot::GraphicsView::itemDoubleClicked(), ot::GraphicsView::itemRequested(), lockManager(), ot::ModelWrite, OT_INFO_SERVICE_TYPE_MODEL, OT_LOG_D, OT_LOG_EAS, ot::GraphicsView::pasteRequested(), ot::RoundCap, ot::GraphicsScene::selectionChangeFinished(), ot::PenFCfg::setCap(), ot::GraphicsView::setDropsEnabled(), ot::GraphicsView::setGraphicsViewFlag(), ot::GraphicsView::setGraphicsViewName(), ot::GraphicsScene::setGridFlags(), ot::GraphicsScene::setGridLineStyle(), ot::GraphicsScene::setGridSnapMode(), ot::GraphicsView::setPickerKey(), ot::GraphicsView::setSceneMargins(), ot::PenFCfg::setStyle(), ot::WidgetView::setViewData(), ot::WidgetViewBase::setViewFlags(), ot::PenFCfg::setWidth(), ot::Grid::ShowNormalLines, slotCopyRequested(), slotGraphicsConnectionRequested(), slotGraphicsConnectionToConnectionRequested(), slotGraphicsElementsChanged(), slotGraphicsItemDoubleClicked(), slotGraphicsItemRequested(), slotGraphicsSelectionChanged(), slotPasteRequested(), ot::Grid::SnapTopLeft, LockManager::uiElementCreated(), ot::WidgetViewBase::ViewGraphics, ot::WidgetViewBase::ViewIsCentral, ot::WidgetViewBase::ViewIsCloseable, ot::WidgetViewBase::ViewIsPinnable, ot::GraphicsView::ViewManagesSceneRect, and ot::WidgetViewBase::ViewNameAsTitle.

◆ createNewPlot()

◆ createNewProjectInDatabase()

bool AppBase::createNewProjectInDatabase ( const QString & _projectName,
const QString & _projectType )

◆ createNewTable()

◆ createNewTextEditor()

◆ createSettingsInstance() [1/2]

otoolkit::SettingsRef AppBase::createSettingsInstance ( void ) const

◆ createSettingsInstance() [2/2]

virtual otoolkit::SettingsRef AppBase::createSettingsInstance ( )
overridevirtual

◆ createUi()

void AppBase::createUi ( )

References ot::WidgetViewManager::addView(), ot::All, ot::WidgetViewBase::Bottom, BUILD_INFO, WelcomeWidget::copyProjectRequest(), ot::NavigationTreeView::copyRequested(), WelcomeWidget::createProjectRequest(), ot::WidgetViewBase::CustomView, ot::WidgetViewBase::Default, WelcomeWidget::deleteProjectRequest(), e, WelcomeWidget::exportProjectRequest(), ot::ServiceBase::getBasicServiceInformation(), LoginData::getDatabaseUrl(), ot::WidgetViewManager::getDockManager(), ot::GraphicsPickerView::getGraphicsPicker(), ot::PlainTextEditView::getPlainTextEdit(), ot::PropertyGridView::getPropertyGrid(), WelcomeWidget::getQWidget(), LoginData::getSessionPassword(), LoginData::getSessionUser(), ToolBar::getStartPage(), ot::NavigationTreeView::getTree(), ot::WidgetView::getViewDockWidget(), ot::WidgetViewManager::IgnoreInputFocusOnViewInsert, ot::WidgetViewManager::InputFocusCentralViewOnFocusChange, ot::GlobalWidgetViewManager::instance(), ot::WidgetViewBase::Left, lockManager(), ExternalServicesComponent::lockManager(), ot::ModelWrite, ot::NavigationAll, ot::NavigationWrite, OBJ_ALIAS_MainWindow, WelcomeWidget::openProjectRequest(), OT_LOG_D, OT_LOG_E, OTAssertNullptr, ot::NavigationTreeView::pasteRequested(), WelcomeWidget::projectAccessRequest(), WelcomeWidget::projectOwnerRequest(), ot::Properties, ot::PropertyGrid::propertyChanged(), ot::PropertyGrid::propertyDeleteRequested(), LockManager::registerLockable(), ot::Flags< T, Storage >::remove(), WelcomeWidget::renameProjectRequest(), ot::WidgetViewBase::Right, ot::NavigationSelectionManager::selectionHasChanged(), ot::Flags< T, Storage >::set(), ot::WidgetView::setAsCurrentViewTab(), ot::PlainTextEdit::setAutoScrollToBottomEnabled(), ot::WidgetViewManager::setConfigFlags(), ViewerComponent::setDataBaseConnectionInformation(), ViewerComponent::setFontPath(), ot::StyledSvgWidget::setMaintainAspectRatio(), ot::GraphicsPickerManager::setPicker(), ot::WidgetView::setViewData(), ot::WidgetView::setViewIsPermanent(), slotCopyProject(), slotCopyRequested(), slotCreateProject(), slotDeleteProject(), slotExportProject(), slotHandleSelectionHasChanged(), slotManageProjectAccess(), slotManageProjectOwner(), slotOpenProject(), slotPasteRequested(), slotPropertyGridValueChanged(), slotPropertyGridValueDeleteRequested(), WelcomeWidget::slotRefreshProjectList(), slotRenameProject(), slotShowErrorPrompt(), slotShowOutputContextMenu(), slotTreeItemFocused(), slotTreeItemSelectionChanged(), slotTreeItemTextChanged(), slotViewAdded(), slotViewCloseRequested(), slotViewDataModifiedChanged(), slotViewFocusChanged(), slotViewTabClicked(), TITLE_DOCK_OUTPUT, TITLE_DOCK_PROJECTNAVIGATION, TITLE_DOCK_PROPERTIES, ToolBar, toolBarAvailable(), LockManager::uiElementCreated(), LockManager::uiViewCreated(), updateLogIntensityInfo(), ot::WidgetViewManager::UseBestAreaFinderOnViewInsert, ot::WidgetViewManager::viewAdded(), ot::WidgetViewManager::viewCloseRequested(), ot::WidgetViewManager::viewDataModifiedChanged(), ot::WidgetViewBase::ViewDefaultCloseHandling, ot::WidgetViewManager::viewFocusChanged(), ot::WidgetViewBase::ViewGraphicsPicker, ot::WidgetViewBase::ViewIsCentral, ot::WidgetViewBase::ViewIsCloseable, ot::WidgetViewBase::ViewIsSide, ot::WidgetViewBase::ViewNavigation, ot::WidgetViewBase::ViewProperties, ot::WidgetViewManager::viewTabClicked(), ot::WidgetViewBase::ViewText, and WAITING_ANIMATION_NAME.

◆ createView()

ViewerUIDtype AppBase::createView ( ModelUIDtype _modelUID,
const std::string & _projectName )

References ot::WidgetViewManager::addView(), ot::All, ot::Color::b(), ot::WidgetViewBase::Bottom, ViewerComponent::createViewer(), determineAvailableViewTabText(), ot::Color::g(), ot::ServiceBase::getBasicServiceInformation(), ot::ProjectInformation::getCollectionName(), getCurrentProjectInfo(), LoginData::getDatabaseUrl(), ot::WidgetViewManager::getDockManager(), ot::VersionGraphManager::getGraph(), ot::GraphicsPickerView::getGraphicsPicker(), ot::GraphicsPicker::getQWidget(), LoginData::getSessionPassword(), LoginData::getSessionUser(), ot::VersionGraphManagerView::getVersionGraphManager(), getViewerComponent(), ViewerComponent::getViewerWidget(), ot::WidgetView::getViewWidget(), getVisible3D(), getVisibleBlockPicker(), ot::VersionGraph::IgnoreActivateRequestOnReadOnly, DataBase::initializeConnection(), DataBase::instance(), ot::GlobalWidgetViewManager::instance(), instance(), ot::WidgetView::KeepCurrentFocus, lockManager(), ot::ModelWrite, OT_LOG_EA, ot::Color::r(), DataBase::setCollectionName(), DataBase::setUserCredentials(), ot::VersionGraph::setVersionGraphConfigFlags(), ot::WidgetView::setViewData(), slotRequestVersion(), slotVersionDeselected(), slotVersionSelected(), LockManager::uiElementCreated(), LockManager::uiElementDestroyed(), ot::VersionGraph::versionActivateRequest(), ot::VersionGraph::versionDeselected(), ot::VersionGraph::versionSelected(), ot::WidgetViewBase::View3D, ot::WidgetViewBase::ViewIsCentral, ot::WidgetViewBase::ViewIsSide, and ot::WidgetViewBase::ViewVersion.

◆ customQueueCallback

void AppBase::customQueueCallback ( const QString & _callbackID)
signal

◆ customTimerTimeout

void AppBase::customTimerTimeout ( const QString & _timerID)
signal

◆ debug()

bool AppBase::debug ( ) const

◆ destroyObjects()

void AppBase::destroyObjects ( const std::vector< ot::UID > & _objects)

◆ determineAvailableViewTabText

QString AppBase::determineAvailableViewTabText ( const QString & _initialTabText)
slot

◆ downloadInstaller

void AppBase::downloadInstaller ( QString gssUrl)
slot

Downloads the installer from the provided GSS URL and runs it.

References downloadFrontendInstaller(), ot::IconManager::getApplicationIcon(), ot::SystemProcess::runApplication(), and ot::AppExitCode::Success.

◆ editProjectInformation()

void AppBase::editProjectInformation ( const std::string & _senderUrl,
const std::string & _callbackAction )

◆ expandSingleNavigationTreeItem

void AppBase::expandSingleNavigationTreeItem ( ot::UID _itemID,
bool _isExpanded )
slot

◆ exportLogs()

◆ findGraphicsEditor()

ot::GraphicsViewView * AppBase::findGraphicsEditor ( const std::string & _entityName,
const ot::UIDList & _visualizingEntities )

◆ findNavigationTreeItemByName

ot::UID AppBase::findNavigationTreeItemByName ( const QString & _itemName)
slot

◆ findOrCreateGraphicsEditor()

ot::GraphicsViewView * AppBase::findOrCreateGraphicsEditor ( const std::string & _entityName,
const QString & _title,
const std::string & _pickerKey,
const ot::WidgetView::InsertFlags & _viewInsertFlags,
const ot::VisualisationCfg & _visualizationConfig )

◆ findOrCreatePlot()

ot::PlotView * AppBase::findOrCreatePlot ( const ot::Plot1DCfg & _config,
const ot::WidgetView::InsertFlags & _viewInsertFlags,
const ot::UIDList & _visualizingEntities )

◆ findOrCreateTable()

ot::TableView * AppBase::findOrCreateTable ( const ot::TableCfg & _config,
const ot::WidgetView::InsertFlags & _viewInsertFlags,
const ot::UIDList & _visualizingEntities )

◆ findOrCreateTextEditor()

ot::TextEditorView * AppBase::findOrCreateTextEditor ( const ot::TextEditorCfg & _config,
const ot::WidgetView::InsertFlags & _viewInsertFlags,
const ot::UIDList & _visualizingEntities )

◆ findPlot()

ot::PlotView * AppBase::findPlot ( const std::string & _entityName,
const ot::UIDList & _visualizingEntities )

◆ findProperty() [1/2]

ot::PropertyGridItem * AppBase::findProperty ( const std::list< std::string > & _groupPath,
const std::string & _itemName )

◆ findProperty() [2/2]

ot::PropertyGridItem * AppBase::findProperty ( const std::string & _groupName,
const std::string & _itemName )

◆ findTable()

ot::TableView * AppBase::findTable ( const std::string & _entityName,
const ot::UIDList & _visualizingEntities )

◆ findTextEditor()

ot::TextEditorView * AppBase::findTextEditor ( const std::string & _entityName,
const ot::UIDList & _visualizingEntities )

◆ focusPropertyGridItem()

void AppBase::focusPropertyGridItem ( const std::string & _group,
const std::string & _name )

◆ frontendSettingsChanged()

◆ getAllGraphicsEditors()

std::list< ot::GraphicsViewView * > AppBase::getAllGraphicsEditors ( )

◆ getAvailableProjectNames

QStringList AppBase::getAvailableProjectNames ( ) const
slot

◆ getCurrentLoginData()

const LoginData & AppBase::getCurrentLoginData ( ) const
inline

Will return the current username.

◆ getCurrentMenuTab()

std::string AppBase::getCurrentMenuTab ( )

◆ getCurrentProjectInfo()

const ot::ProjectInformation & AppBase::getCurrentProjectInfo ( ) const
inline

◆ getCurrentProjectIsModified()

bool AppBase::getCurrentProjectIsModified ( ) const

Will get the current project as modified state.

References ot::WidgetViewManager::getAnyViewContentModified(), and ot::GlobalWidgetViewManager::instance().

◆ getCurrentUserCollection()

std::string AppBase::getCurrentUserCollection ( ) const
inline

Will return the current username.

◆ getCurrentVisualizationTabTitle()

◆ getDebugInformation()

◆ getExternalServicesComponent()

ExternalServicesComponent * AppBase::getExternalServicesComponent ( ) const
inline

◆ getIgnoreToolAutoStart()

bool AppBase::getIgnoreToolAutoStart ( ) const
inline

◆ getModelUID()

ot::UID AppBase::getModelUID ( ) const
inline

◆ getNavigationTreeItemText

QString AppBase::getNavigationTreeItemText ( ot::UID _itemID)
slot

◆ getProjectNavigation()

ot::NavigationTreeView * AppBase::getProjectNavigation ( ) const
inline

◆ getPropertyIsDeletable()

bool AppBase::getPropertyIsDeletable ( const std::string & _groupName,
const std::string & _itemName )

◆ getPropertyType()

std::string AppBase::getPropertyType ( const std::string & _groupName,
const std::string & _itemName )

◆ getRelayURLs()

std::string AppBase::getRelayURLs ( ) const

Will return the current Relay URLs.

◆ getRootWidgetAPI()

QWidget * AppBase::getRootWidgetAPI ( )
overrideprotectedvirtual

Implements ot::WindowAPI.

References mainWindow().

◆ getSelectedNavigationTreeItems

const ot::SelectionInformation & AppBase::getSelectedNavigationTreeItems ( )
slot

◆ getServiceURL()

const std::string & AppBase::getServiceURL ( ) const
inline

Will return the current Service URL.

◆ getSessionServiceURL()

const std::string & AppBase::getSessionServiceURL ( ) const
inline

Will return the session service URL.

◆ getSettingsFromDataBase()

◆ getSiteID()

int AppBase::getSiteID ( ) const
inline

Will return the current site ID.

◆ getToolBar()

ToolBar * AppBase::getToolBar ( ) const
inline

◆ getUiServiceUID()

ot::UID AppBase::getUiServiceUID ( ) const
inline

◆ getUpdateTransparentColorStyleValueEnabled()

bool AppBase::getUpdateTransparentColorStyleValueEnabled ( ) const
inline

◆ getVersionGraph()

ot::VersionGraphManagerView * AppBase::getVersionGraph ( )
inline

◆ getViewerComponent()

ViewerComponent * AppBase::getViewerComponent ( ) const
inline

◆ getViewerUID()

ot::UID AppBase::getViewerUID ( ) const
inline

◆ getViewHandlingFlags()

const ot::ViewHandlingFlags & AppBase::getViewHandlingFlags ( ) const
inline

◆ getVisible3D()

bool AppBase::getVisible3D ( ) const
inline

◆ getVisibleBlockPicker()

bool AppBase::getVisibleBlockPicker ( ) const
inline

◆ getWelcomeScreenViewMode()

ot::ProjectOverviewWidget::ViewMode AppBase::getWelcomeScreenViewMode ( ) const

◆ handleClear()

void AppBase::handleClear ( )

◆ handleDeregister()

void AppBase::handleDeregister ( ot::JsonDocument & _jsonDocument)

◆ handleGetAllLogs()

ot::ReturnMessage AppBase::handleGetAllLogs ( )

◆ handleGetDebugInfo()

std::string AppBase::handleGetDebugInfo ( )

◆ handleGetUserLogs()

◆ handleLog()

◆ handleRegister()

std::string AppBase::handleRegister ( ot::JsonDocument & _jsonDocument)

◆ handleSetCacheSize()

void AppBase::handleSetCacheSize ( ot::JsonDocument & _jsonDocument)

◆ handleSetGlobalLogFlags()

void AppBase::handleSetGlobalLogFlags ( ot::JsonDocument & _jsonDocument)

◆ importProject()

◆ initialize()

bool AppBase::initialize ( )

Will initialize the API Returns: 0: OK -1: Was already initialized 1: Exception catched 2: Non exception catched 3: Log-in failed.

References ot::GlobalColorStyle::currentStyleChanged(), e, ot::IconManager::fileExists(), ot::IconManager::getIcon(), ot::GlobalColorStyle::instance(), OT_LOG_E, OT_UISERVICE_DEV_LOGGER_INIT, OTAssert, ot::IconManager::setDefaultProjectIcon(), and slotColorStyleChanged().

◆ initializeDefaultUserSettings()

◆ instance() [1/3]

static AppBase * AppBase::instance ( )
static

◆ instance() [2/3]

AppBase * AppBase::instance ( QApplication * _app = (QApplication*)nullptr)
static

References g_instance.

◆ instance() [3/3]

AppBase * AppBase::instance ( void )
static

References g_instance.

◆ isInitialized()

bool AppBase::isInitialized ( ) const

Returns true if the API was initialized.

◆ isTreeItemExpanded

bool AppBase::isTreeItemExpanded ( ot::UID _itemID)
slot

◆ isTreeItemSelected

bool AppBase::isTreeItemSelected ( ot::UID _itemID)
slot

◆ lockManager()

LockManager * AppBase::lockManager ( )

◆ lockPropertyGrid()

void AppBase::lockPropertyGrid ( bool flag)

◆ lockSelectionAndModificationAPI()

void AppBase::lockSelectionAndModificationAPI ( bool _flag)
overrideprotectedvirtual

◆ lockUIAPI()

void AppBase::lockUIAPI ( bool _flag)
overrideprotectedvirtual

Implements ot::WindowAPI.

References slotLockUI().

◆ log() [1/4]

void AppBase::log ( const ot::LogMessage & _message)
overridevirtual

Called when the a log message was created.

Implements ot::AbstractLogNotifier.

◆ log() [2/4]

virtual void AppBase::log ( const ot::LogMessage & _message)
overridevirtual

Called when the a log message was created.

Implements ot::AbstractLogNotifier.

◆ log() [3/4]

virtual void AppBase::log ( const ot::LogMessage & _message)
overridevirtual

Called when the a log message was created.

Implements ot::AbstractLogNotifier.

◆ log() [4/4]

void AppBase::log ( const QString & _sender,
InterfaceLogType _type,
const QString & _message )
overridevirtual

◆ logIn()

◆ logInDialogAvailable

void AppBase::logInDialogAvailable ( QObject * _dialog)
signal

Is emitted when the log-in dialog is available.

Parameters
_dialogPointer to the log-in dialog.

◆ loginSuccessful

void AppBase::loginSuccessful ( )
signal

Is emitted when the log-in was successful and the default ui was created.

◆ mainWindow()

aWindow * AppBase::mainWindow ( ) const

References ak::invalidUID, and OTAssert.

◆ makeWidgetViewCurrentWithoutInputFocus()

◆ manageGroups()

◆ notify()

void AppBase::notify ( ot::UID _senderId,
ak::eventType _eventType,
int _info1,
int _info2 )
overridevirtual

Will call the callback function with the provided parameters.

Parameters
_senderIdThe sender ID the message was send from
_messageThe message
_messageTypeThe type of the messsage
_info1Message addition 1
_info2Message addition 2
Exceptions
sim::Exceptionto forward exceptions coming from the application core class

References e, ak::etTabToolbarChanged, WelcomeWidget::getQWidget(), ot::GlobalWidgetViewManager::instance(), OT_LOG_E, and WelcomeWidget::slotRefreshProjectList().

◆ openNewInstance()

◆ parseStartArgs()

void AppBase::parseStartArgs ( const std::string & _args)

References LogExport, NoAutoStart, and OT_LOG_W.

◆ projectCloseCompleted

void AppBase::projectCloseCompleted ( )
slot

Is called when the project close operation is completed.

References projectClosed().

◆ projectClosed

void AppBase::projectClosed ( )
signal

Is emitted when a project was closed.

◆ projectOpenCompleted

void AppBase::projectOpenCompleted ( )
slot

Is called when the project open operation is completed.

References projectOpened().

◆ projectOpened

void AppBase::projectOpened ( )
signal

Is emitted when a project was opened.

◆ queueCustomCallback

void AppBase::queueCustomCallback ( const QString & _callbackId)
slot

◆ refreshWelcomeScreen

void AppBase::refreshWelcomeScreen ( )
slot

Refreshes the welcome screen content. This function can be used to update the project list after projects were created, deleted, or modified.

References WelcomeWidget::slotRefreshProjectList().

◆ registerToolActivityNotifier()

void AppBase::registerToolActivityNotifier ( otoolkit::ToolActivityNotifier * _notifier)
overridevirtual

◆ removeNavigationTreeItems

void AppBase::removeNavigationTreeItems ( const std::vector< ot::UID > & itemIds)
slot

◆ removeToolActivityNotifier()

void AppBase::removeToolActivityNotifier ( otoolkit::ToolActivityNotifier * _notifier)
overridevirtual

◆ renameEntity()

void AppBase::renameEntity ( const std::string & _fromPath,
const std::string & _toPath )

◆ replaceInfoMessage

void AppBase::replaceInfoMessage ( const QString & _message)
slot

Replace the current output window text with the provided one.

Parameters
_messageThe message to set.

References ot::PlainTextEditView::getPlainTextEdit().

◆ restoreSessionState()

◆ rootWidget()

virtual const QWidget * AppBase::rootWidget ( void ) const
inlineoverridevirtual

◆ runJSScript()

bool AppBase::runJSScript ( const QString & _scriptName,
const QString & _scriptData )

◆ runJSScriptFromFile()

bool AppBase::runJSScriptFromFile ( const QString & _filePath)

References OT_LOG_E, and runJSScript().

◆ sendExecuteAPI()

bool AppBase::sendExecuteAPI ( const std::string & _receiverUrl,
const std::string & _message,
std::string & _response )
overrideprotectedvirtual

◆ sendExecuteToServiceAPI()

bool AppBase::sendExecuteToServiceAPI ( const ot::BasicServiceInformation & _serviceInfo,
const std::string & _message,
std::string & _response )
overrideprotectedvirtual

◆ sendQueueAPI()

bool AppBase::sendQueueAPI ( const std::string & _receiverUrl,
const std::string & _message )
overrideprotectedvirtual

◆ sendQueueToServiceAPI()

bool AppBase::sendQueueToServiceAPI ( const ot::BasicServiceInformation & _serviceInfo,
const std::string & _message )
overrideprotectedvirtual

◆ servicesUiSetupComplete

void AppBase::servicesUiSetupComplete ( )
signal

Is emitted when the services UI setup of all services in the session is complete.

◆ servicesUiSetupCompleted

void AppBase::servicesUiSetupCompleted ( )
slot

Is called when the log-in dialog is available.

References servicesUiSetupComplete().

◆ setApplicationInstance()

void AppBase::setApplicationInstance ( QApplication * _app)
inline

◆ setCurrentProjectInfo()

void AppBase::setCurrentProjectInfo ( const ot::ProjectInformation & _info)
inline

◆ setCurrentProjectIsModified()

void AppBase::setCurrentProjectIsModified ( bool _isModified = true)

Will set the current project as modified and apply UI changes.

References ot::ProjectInformation::getProjectName().

◆ setCurrentVisualizationTabFromEntityName()

void AppBase::setCurrentVisualizationTabFromEntityName ( const std::string & _entityName,
ot::WidgetViewBase::ViewType _viewType )

Sets the current visualization tab.

Parameters
_entityNameName of the entity to set the tab for.
_viewTypeType of the view to set the tab for.

References ot::WidgetViewManager::getConfigFlags(), ot::WidgetViewManager::InputFocusOnFocusChangeMask, ot::GlobalWidgetViewManager::instance(), OT_SLECTION_TEST_LOG, ot::WidgetViewManager::setConfigFlags(), ot::WidgetViewManager::setCurrentView(), and ot::WidgetViewBase::toString().

◆ setCurrentVisualizationTabFromTitle()

void AppBase::setCurrentVisualizationTabFromTitle ( const std::string & _tabTitle)

◆ setDebug()

void AppBase::setDebug ( bool _debug)

◆ setModelUID()

void AppBase::setModelUID ( ot::UID _uid)
inline

◆ setNavigationTreeItemIcon

void AppBase::setNavigationTreeItemIcon ( ot::UID _itemID,
const QString & _iconName,
const QString & _iconDefaultPath )
slot

◆ setNavigationTreeItemSelected

void AppBase::setNavigationTreeItemSelected ( ot::UID _itemID,
bool _isSelected )
slot

◆ setNavigationTreeItemsSelected

void AppBase::setNavigationTreeItemsSelected ( const ot::UIDList & _itemIDs,
bool _selected,
bool _clearOtherSelection )
slot

◆ setNavigationTreeItemText

void AppBase::setNavigationTreeItemText ( ot::UID _itemID,
const QString & _itemName )
slot

◆ setNavigationTreeMultiselectionEnabled

void AppBase::setNavigationTreeMultiselectionEnabled ( bool _enabled)
slot

◆ setNavigationTreeSortingEnabled

void AppBase::setNavigationTreeSortingEnabled ( bool _enabled)
slot

◆ setProgressBarValueAPI()

void AppBase::setProgressBarValueAPI ( int _progressPercentage)
overrideprotectedvirtual

Implements ot::WindowAPI.

References slotSetProgressBarValue().

◆ setProgressBarVisibilityAPI()

void AppBase::setProgressBarVisibilityAPI ( QString _progressMessage,
bool _progressBaseVisible,
bool _continuous )
overrideprotectedvirtual

◆ setRelayURLs()

void AppBase::setRelayURLs ( const std::string & _url)

Will set the Relay URLs.

References ExternalServicesComponent::setMessagingRelay().

◆ setServiceURL()

void AppBase::setServiceURL ( const std::string & _url)

Will set the current Service URL of this service.

References ExternalServicesComponent::setUiServiceURL().

◆ setSessionServiceURL()

void AppBase::setSessionServiceURL ( const std::string & _url)

Will set the session service URL.

References ExternalServicesComponent::setSessionServiceURL().

◆ setSingleNavigationTreeItemSelected

void AppBase::setSingleNavigationTreeItemSelected ( ot::UID _itemID,
bool _isSelected )
slot

◆ setSiteID()

void AppBase::setSiteID ( int _id)

Will set the current site ID.

◆ setTabToolBarTabOrder

void AppBase::setTabToolBarTabOrder ( const QStringList & _lst)
slot

◆ settingsChanged()

◆ setUiServiceUID()

void AppBase::setUiServiceUID ( ot::UID _uid)
inline

◆ setUpdateTransparentColorStyleValueEnabled()

void AppBase::setUpdateTransparentColorStyleValueEnabled ( bool _enabled)

◆ setupPropertyGrid()

◆ setUrl()

void AppBase::setUrl ( const QString & _url)

References OT_LOG_D.

◆ setViewerUID()

void AppBase::setViewerUID ( ot::UID _uid)
inline

◆ setViewHandlingFlag()

void AppBase::setViewHandlingFlag ( ot::ViewHandlingFlag _flag,
bool _active = true )
inline

◆ setViewHandlingFlags()

void AppBase::setViewHandlingFlags ( const ot::ViewHandlingFlags & _flags)
inline

◆ setVisible3D()

void AppBase::setVisible3D ( bool visible3D)
inline

◆ setVisibleBlockPicker()

void AppBase::setVisibleBlockPicker ( bool visibleBlockPicker)
inline

◆ setWaitingAnimationVisible()

void AppBase::setWaitingAnimationVisible ( bool flag) const

◆ shortcutManager()

ShortcutManager * AppBase::shortcutManager ( )
inline

◆ showErrorPromptAPI()

void AppBase::showErrorPromptAPI ( const std::string & _title,
const std::string & _message,
const std::string & _detailedMessage )
overrideprotectedvirtual

Implements ot::WindowAPI.

References slotShowErrorPrompt().

◆ showInfoPromptAPI()

void AppBase::showInfoPromptAPI ( const std::string & _title,
const std::string & _message,
const std::string & _detailedMessage )
overrideprotectedvirtual

Implements ot::WindowAPI.

References slotShowInfoPrompt().

◆ showPrompt() [1/2]

ot::MessageDialogCfg::BasicButton AppBase::showPrompt ( const ot::MessageDialogCfg & _config,
QWidget * _parent )
overridevirtual

◆ showPrompt() [2/2]

◆ showWarningPromptAPI()

void AppBase::showWarningPromptAPI ( const std::string & _title,
const std::string & _message,
const std::string & _detailedMessage )
overrideprotectedvirtual

Implements ot::WindowAPI.

References slotShowWarningPrompt().

◆ slotColorStyleChanged

◆ slotCopyProject

◆ slotCopyRequested

◆ slotCreateProject

◆ slotDeleteProject

◆ slotExportProject

void AppBase::slotExportProject ( )
slot

◆ slotGraphicsConnectionRequested

◆ slotGraphicsConnectionToConnectionRequested

◆ slotGraphicsElementsChanged

◆ slotGraphicsItemDoubleClicked

◆ slotGraphicsItemRequested

◆ slotGraphicsSelectionChanged

◆ slotHandleSelectionHasChanged

◆ slotLockSelectionAndModification

◆ slotLockUI

void AppBase::slotLockUI ( bool _flag)
slot

◆ slotManageProjectAccess

◆ slotManageProjectOwner

◆ slotOpenProject

void AppBase::slotOpenProject ( )
slot

Open the currently selected project in the welcome screen.

References WelcomeWidget::getSelectedProjects(), OT_LOG_EA, and slotOpenSpecificProject().

◆ slotOpenProjectFromIndex

void AppBase::slotOpenProjectFromIndex ( int _index)
slot

◆ slotOpenSpecificProject

◆ slotPasteRequested

◆ slotPlotCurveDoubleClicked

◆ slotPlotResetItemSelectionRequest

◆ slotProcessMessage

void AppBase::slotProcessMessage ( const QString & _json)
slot

◆ slotPropertyGridValueChanged

void AppBase::slotPropertyGridValueChanged ( const ot::Property * _property)
slot

◆ slotPropertyGridValueDeleteRequested

void AppBase::slotPropertyGridValueDeleteRequested ( const ot::Property * _property)
slot

◆ slotRefreshProjectOverivew

void AppBase::slotRefreshProjectOverivew ( )
slot

◆ slotRenameProject

◆ slotRequestVersion

void AppBase::slotRequestVersion ( const std::string & _versionName)
slot

◆ slotRunCustomTimer

void AppBase::slotRunCustomTimer ( const QString & _timerId,
int _intervalMs )
slot

References customTimerTimeout().

◆ slotSendExecuteMessageToService

QVariantMap AppBase::slotSendExecuteMessageToService ( const QString & _serviceName,
const QString & _message )
slot

Sends an execute message to the specified service and wait for the response.

Parameters
_serviceNameName of the service to send the message to.
_messageMessage to send.
Returns
Map containing a boolean "success" indicating the success of the operation and a string "response" containing the response string.

References ExternalServicesComponent::getServiceFromName(), result, and slotSendExecuteMessageToUrl().

◆ slotSendExecuteMessageToUrl

QVariantMap AppBase::slotSendExecuteMessageToUrl ( const QString & _serviceUrl,
const QString & _message )
slot

Sends an execute message to the specified service URL and wait for the response.

Parameters
_serviceUrlURL of the service to send the message to.
_messageMessage to send.
Returns
Map containing a boolean "success" indicating the success of the operation and a string "response" containing the response string.

References result, and sendExecuteAPI().

◆ slotSendQueueMessageToService

bool AppBase::slotSendQueueMessageToService ( const QString & _serviceName,
const QString & _message )
slot

Sends a queue message to the specified service.

Parameters
_serviceNameName of the service to send the message to.
_messageMessage to send.
Returns
True on success, false on failure.

References ExternalServicesComponent::getServiceFromName(), and slotSendQueueMessageToUrl().

◆ slotSendQueueMessageToUrl

bool AppBase::slotSendQueueMessageToUrl ( const QString & _serviceUrl,
const QString & _message )
slot

Sends a queue message to the specified service URL.

Parameters
_serviceUrlURL of the service to send the message to.
_messageMessage to send.
Returns
True on success, false on failure.

References sendQueueAPI().

◆ slotSetProgressBarValue

void AppBase::slotSetProgressBarValue ( int _progressPercentage)
slot

◆ slotSetProgressBarVisibility

void AppBase::slotSetProgressBarVisibility ( QString _progressMessage,
bool _progressBaseVisible,
bool _continuous )
slot

◆ slotShowErrorPrompt

void AppBase::slotShowErrorPrompt ( const std::string & _title,
const std::string & _message,
const std::string & _detailedMessage )
slot

◆ slotShowInfoPrompt

void AppBase::slotShowInfoPrompt ( const std::string & _title,
const std::string & _message,
const std::string & _detailedMessage )
slot

◆ slotShowOutputContextMenu

void AppBase::slotShowOutputContextMenu ( QPoint _pos)
slot

◆ slotShowWarningPrompt

void AppBase::slotShowWarningPrompt ( const std::string & _title,
const std::string & _message,
const std::string & _detailedMessage )
slot

◆ slotTableSaveRequested

◆ slotTextEditorSaveRequested

◆ slotTextLoadAllRequested

void AppBase::slotTextLoadAllRequested ( size_t _nextChunkStartIndex)
slot

◆ slotTextLoadNextRequested

void AppBase::slotTextLoadNextRequested ( size_t _nextChunkStartIndex)
slot

◆ slotTreeItemFocused

void AppBase::slotTreeItemFocused ( QTreeWidgetItem * _item)
slot

References OT_LOG_EA.

◆ slotTreeItemSelectionChanged

void AppBase::slotTreeItemSelectionChanged ( )
slot

Navigation tree item selection has changed.

References OT_SLECTION_TEST_LOG, and ot::User.

◆ slotTreeItemTextChanged

void AppBase::slotTreeItemTextChanged ( QTreeWidgetItem * _item,
int _column )
slot

◆ slotVersionDeselected

◆ slotVersionSelected

void AppBase::slotVersionSelected ( const std::string & _versionName)
slot

◆ slotViewAdded

◆ slotViewCloseRequested

◆ slotViewDataModifiedChanged

◆ slotViewFocusChanged

◆ slotViewTabClicked

void AppBase::slotViewTabClicked ( ot::WidgetView * _view)
slot

◆ startSessionRefreshTimer()

void AppBase::startSessionRefreshTimer ( )

◆ storeSessionState()

◆ storeSettingToDataBase()

bool AppBase::storeSettingToDataBase ( const ot::PropertyGridCfg & _config,
const std::string & _subKey )

◆ switchToMenuTab()

void AppBase::switchToMenuTab ( const std::string & _menu)

◆ switchToViewMenuTabIfNeeded()

void AppBase::switchToViewMenuTabIfNeeded ( ) const

◆ toggleNavigationTreeItemSelection

void AppBase::toggleNavigationTreeItemSelection ( ot::UID _itemID,
bool _considerChilds )
slot

◆ toolBarAvailable

void AppBase::toolBarAvailable ( QObject * _toolBar)
signal

Is emitted when the tool bar is available.

Parameters
_toolBarPointer to the tool bar.

◆ uiUID()

ot::UID AppBase::uiUID ( ) const
inline

◆ updateBufferSizeFromLogFlags()

void AppBase::updateBufferSizeFromLogFlags ( const ot::LogFlags & _flags)

◆ updateLogIntensityInfo()

◆ updateStatusString()

void AppBase::updateStatusString ( const QString & _statusText)
overridevirtual

◆ updateStatusStringAsError()

void AppBase::updateStatusStringAsError ( const QString & _statusText)
overridevirtual

◆ updateTransparentColorStyleValue()

◆ url()

const QString & AppBase::url ( ) const
inline

◆ viewerSettingsChanged()

void AppBase::viewerSettingsChanged ( const ot::Property * _property)

◆ ~AppBase()

AppBase::~AppBase ( )
privatevirtual

Friends And Related Symbol Documentation

◆ KeyboardCommandHandler

friend class KeyboardCommandHandler
friend

◆ ToolBar

friend class ToolBar
friend

The documentation for this class was generated from the following files: