41#include <QtCore/qsettings.h>
56class OldWelcomeScreen;
61namespace ak {
class aNotifier;
class aWindow; }
62namespace ak {
class aTreeWidget; }
63namespace ot {
class Label; }
64namespace ot {
class Property; }
65namespace ot {
class TableView; }
66namespace ot {
class WidgetView; }
67namespace ot {
class GraphicsItem; }
68namespace ot {
class GraphicsPicker; }
69namespace ot {
class TextEditorView; }
70namespace ot {
class GraphicsItemCfg; }
71namespace ot {
class GraphicsViewView; }
72namespace ot {
class PropertyGridView; }
73namespace ot {
class PropertyGridItem; }
74namespace ot {
class PlainTextEditView; }
75namespace ot {
class GraphicsPickerView; }
76namespace ot {
class NavigationTreeView; }
77namespace ot {
class AbstractSettingsItem; }
78namespace ot {
class VersionGraphManagerView; }
192 bool debug(
void)
const;
194 void registerSession(
const std::string& _projectName,
const std::string& _collectionName);
361 std::string
getPropertyType(
const std::string& _groupName,
const std::string& _itemName);
423 void showInfoPrompt(
const std::string& _message,
const std::string& _title);
427 void showErrorPrompt(
const std::string& _message,
const std::string& _title);
459 void slotVersionSelected(
const std::string& _versionName);
460 void slotVersionDeselected(
void);
461 void slotRequestVersion(
const std::string& _versionName);
471 void slotCreateProject(
void);
472 void slotOpenProject(
void);
473 void slotCopyProject(
void);
474 void slotRenameProject(
void);
475 void slotDeleteProject(
void);
476 void slotExportProject(
void);
477 void slotManageProjectAccess(
void);
478 void slotManageProjectOwner(
void);
484 void slotPropertyGridValueChanged(
const ot::Property* _property);
485 void slotPropertyGridValueDeleteRequested(
const ot::Property* _property);
491 void slotTreeItemSelectionChanged(
void);
492 void slotTreeItemTextChanged(QTreeWidgetItem* _item,
int _column);
493 void slotTreeItemFocused(QTreeWidgetItem* _item);
496 enum class AppState {
498 RestoringSettingsState = 0x01,
499 LoggedInState = 0x10,
500 ProjectOpenState = 0x20
510 void exportProjectWorker(std::string selectedProjectName, std::string exportFileName);
511 void importProjectWorker(std::string projectName, std::string currentUser, std::string importFileName);
513 void sessionRefreshTimer(
const std::string _sessionUserName,
const std::string _authorizationUrl);
515 bool checkForContinue(
const std::string& _title);
519 void clearGraphicsPicker(
void);
526 std::string m_uiServiceURL;
528 std::string m_relayURLs;
529 std::string m_currentProjectName;
530 std::string m_currentProjectType;
531 std::string m_collectionName;
533 std::string m_currentUserCollection;
534 std::string m_sessionServiceURL;
537 bool m_isInitialized;
539 bool m_widgetIsWelcome;
541 bool m_projectStateIsModified;
567 struct StateInformation {
572 StateInformation m_currentStateWindow;
577 std::map<std::string, ot::GraphicsViewView*> m_graphicsViews;
578 std::map<std::string, ot::TextEditorView*> m_textEditors;
579 std::map<std::string, ot::TableView*> m_tables;
583 bool m_visibleBlockPicker;
#define OT_ADD_PRIVATE_FLAG_FUNCTIONS(___enumName)
Will add the default bitwise operations for the provided private 32 bit bitfield. Use this at the bot...
Definition Flags.h:74
#define OT_ADD_FLAG_FUNCTIONS(___enumName)
Will add the default bitwise operations for the provided 32 bit bitfield. Use this at the bottom of t...
Definition Flags.h:60
The API manager is used to manage the global objects required for this API to work.
Definition AppBase.h:21
void setViewHandlingConfigFlags(const ViewHandlingFlags &_flags)
Definition AppBase.h:224
std::string getCurrentVisualizationTabTitle(void)
Definition AppBase.cpp:1058
void settingsChanged(const std::string &_owner, const ot::Property *_property)
Definition AppBase.cpp:642
ViewerUIDtype createView(ModelUIDtype _modelUID, const std::string &_projectName)
Definition AppBase.cpp:949
virtual void log(const ot::LogMessage &_message) override
Called when the a log message was created.
ak::UID uiUID(void) const
Definition AppBase.h:234
void slotGraphicsRemoveItemsRequested(const ot::UIDList &_items, const std::list< std::string > &_connections)
Definition AppBase.cpp:1989
LockManager * lockManager(void)
Definition AppBase.cpp:335
void createUi(void)
Definition AppBase.cpp:692
void closeAllViewerTabs(void)
Definition AppBase.cpp:1128
ak::UID getModelUID(void) const
Definition AppBase.h:129
void viewerSettingsChanged(const ot::Property *_property)
Definition AppBase.cpp:633
const std::string & getCurrentProjectType(void) const
Definition AppBase.h:251
void closeTextEditor(const std::string &_entityName)
Definition AppBase.cpp:1623
void setWaitingAnimationVisible(bool flag)
Definition AppBase.cpp:683
ToolBar * getToolBar(void) const
Definition AppBase.h:293
void setVisible3D(bool visible3D)
Definition AppBase.h:337
void setTabToolBarTabOrder(const QStringList &_lst)
Definition AppBase.cpp:1303
ak::UID getViewerUID(void) const
Definition AppBase.h:126
void setSingleNavigationTreeItemSelected(ak::ID _itemID, bool _isSelected)
Definition AppBase.cpp:1360
void setCurrentVisualizationTabFromTitle(const std::string &_tabTitle)
Definition AppBase.cpp:1049
void setSessionServiceURL(const std::string &_url)
Will set the session service URL.
Definition AppBase.cpp:1102
virtual void notify(ak::UID _senderId, ak::eventType _eventType, int _info1, int _info2) override
Will call the callback function with the provided parameters.
Definition AppBase.cpp:362
void makeWidgetViewCurrentWithoutInputFocus(ot::WidgetView *_view, bool _ignoreEntitySelect)
Definition AppBase.cpp:1754
void storeSessionState(void)
Definition AppBase.cpp:1181
void slotGraphicsConnectionRequested(const ot::UID &_fromUid, const std::string &_fromConnector, const ot::UID &_toUid, const std::string &_toConnector)
Definition AppBase.cpp:1856
void appendHtmlInfoMessage(const QString &_html)
Definition AppBase.cpp:1435
void setProgressBarVisibility(const char *progressMessage, bool progressBaseVisible, bool continuous)
Will turn on or off the progress bar visibility and set the progress message.
Definition AppBase.cpp:1277
bool isInitialized(void) const
Returns true if the API was initialized.
Definition AppBase.cpp:297
virtual ot::MessageDialogCfg::BasicButton showPrompt(const ot::MessageDialogCfg &_config) override
Definition AppBase.cpp:1707
void frontendSettingsChanged(const ot::Property *_property)
Definition AppBase.cpp:620
void setCurrentVisualizationTabFromEntityName(const std::string &_entityName, ot::WidgetViewBase::ViewType _viewType)
Definition AppBase.cpp:1040
void clearNavigationTree(void)
Definition AppBase.cpp:1323
ot::Flags< ViewHandlingConfig > ViewHandlingFlags
Definition AppBase.h:93
void startSessionRefreshTimer(void)
Definition AppBase.cpp:1068
void showInfoPrompt(const std::string &_message, const std::string &_title)
Definition AppBase.cpp:1726
bool getCurrentProjectIsModified(void) const
Will get the current project as modified state.
Definition AppBase.cpp:319
void setModelUID(ak::UID _uid)
Definition AppBase.h:128
const ViewHandlingFlags & getViewHandlingConfigFlags(void) const
Definition AppBase.h:225
const LoginData & getCurrentLoginData(void) const
Will return the current username.
Definition AppBase.h:141
ExternalServicesComponent * getExternalServicesComponent(void) const
Definition AppBase.h:132
void setVisible1D(bool visible1D)
Definition AppBase.h:338
void slotGraphicsSelectionChanged(void)
Definition AppBase.cpp:1942
void setNavigationTreeSortingEnabled(bool _enabled)
Definition AppBase.cpp:1315
bool debug(void) const
Definition AppBase.cpp:936
void lockPropertyGrid(bool flag)
Definition AppBase.cpp:1445
void importProject(void)
Definition AppBase.cpp:514
bool getPropertyIsDeletable(const std::string &_groupName, const std::string &_itemName)
Definition AppBase.cpp:1477
void showErrorPrompt(const std::string &_message, const std::string &_title)
Definition AppBase.cpp:1734
void replaceInfoMessage(const QString &_message)
Definition AppBase.cpp:1425
ot::TableView * findOrCreateTable(const ot::TableCfg &_config, const ot::BasicServiceInformation &_serviceInfo, const ot::WidgetView::InsertFlags &_viewInsertFlags)
Definition AppBase.cpp:1681
bool getVisibleBlockPicker()
Definition AppBase.h:343
void switchToViewTab(void)
Definition AppBase.cpp:1120
void setProgressBarValue(int progressPercentage)
Will set the percentage of the progress bar.
Definition AppBase.cpp:1285
std::shared_ptr< QSettings > createSettingsInstance(void) const
Definition AppBase.cpp:299
void destroyObjects(const std::vector< ak::UID > &_objects)
Definition AppBase.cpp:1740
ot::PropertyGridCfg getSettingsFromDataBase(const std::string &_subKey)
Definition AppBase.cpp:1208
bool storeSettingToDataBase(const ot::PropertyGridCfg &_config, const std::string &_subKey)
Definition AppBase.cpp:1200
ShortcutManager * shortcutManager(void)
Definition AppBase.h:365
void slotGraphicsConnectionToConnectionRequested(const ot::UID &_fromItemUid, const std::string &_fromItemConnector, const ot::UID &_toConnectionUid, const ot::Point2DD &_newControlPoint)
Definition AppBase.cpp:1897
void registerSession(const std::string &_projectName, const std::string &_collectionName)
Definition AppBase.cpp:938
void clearPropertyGrid(void)
Definition AppBase.cpp:1486
void toggleNavigationTreeItemSelection(ak::ID _itemID, bool _considerChilds)
Definition AppBase.cpp:1372
void closeAllTextEditors(const ot::BasicServiceInformation &_serviceInfo)
Definition AppBase.cpp:1634
int getSiteID(void) const
Will return the current site ID.
Definition AppBase.h:232
void setNavigationTreeMultiselectionEnabled(bool _enabled)
Definition AppBase.cpp:1319
void clearSessionInformation(void)
Will clear the session information such as the project name, collection name and user name.
Definition AppBase.cpp:1153
void setUiServiceUID(ak::UID _uid)
Definition AppBase.h:122
void activateToolBarTab(const QString &_tab)
Definition AppBase.cpp:1307
std::string getRelayURLs(void) const
Will return the current Relay URLs.
Definition AppBase.cpp:1118
void focusPropertyGridItem(const std::string &_group, const std::string &_name)
Definition AppBase.cpp:1415
void setNavigationTreeItemText(ak::ID _itemID, const QString &_itemName)
Definition AppBase.cpp:1352
std::list< ot::GraphicsViewView * > getAllGraphicsEditors(void)
Definition AppBase.cpp:1565
void setSiteID(int _id)
Will set the current site ID.
Definition AppBase.cpp:1092
bool initialize()
Will initialize the API Returns: 0: OK -1: Was already initialized 1: Exception catched 2: Non except...
Definition AppBase.cpp:193
QString availableTabText(const QString &_initialTabText)
Definition AppBase.cpp:1290
void switchToTab(const std::string &menu)
Definition AppBase.cpp:1124
void setDebug(bool)
Definition AppBase.cpp:934
void setVisibleBlockPicker(bool visibleBlockPicker)
Definition AppBase.h:339
void restoreSessionState(void)
Definition AppBase.cpp:1159
void initializeDefaultUserSettings(void)
Definition AppBase.cpp:605
std::string getCollectionName() const
Definition AppBase.h:258
void setupPropertyGrid(const ot::PropertyGridCfg &_configuration)
Definition AppBase.cpp:1396
void closeTable(const std::string &_name)
Definition AppBase.cpp:1692
std::string getPropertyType(const std::string &_groupName, const std::string &_itemName)
Definition AppBase.cpp:1466
ot::GraphicsViewView * createNewGraphicsEditor(const std::string &_entityName, const QString &_title, ot::BasicServiceInformation _serviceInfo, const ot::WidgetView::InsertFlags &_viewInsertFlags)
Definition AppBase.cpp:1500
ModelUIDtype createModel()
Definition AppBase.cpp:942
ot::TextEditorView * createNewTextEditor(const ot::TextEditorCfg &_config, const ot::BasicServiceInformation &_serviceInfo, const ot::WidgetView::InsertFlags &_viewInsertFlags)
Definition AppBase.cpp:1573
void setCurrentProjectType(const std::string &_type)
Definition AppBase.h:256
void appendInfoMessage(const QString &_message)
Definition AppBase.cpp:1429
void slotTableSaveRequested(void)
Definition AppBase.cpp:2073
void setCurrentProjectIsModified(bool _isModified=true)
Will set the current project as modified and apply UI changes.
Definition AppBase.cpp:307
void slotGraphicsItemRequested(const QString &_name, const QPointF &_pos)
Definition AppBase.cpp:1777
virtual bool closeEvent(void) override
This function will be called by the window when the closeEvent occurs If the return value is true the...
Definition AppBase.cpp:397
void slotTextEditorSaveRequested(void)
Definition AppBase.cpp:2017
bool getVisible1D()
Definition AppBase.h:342
void removeNavigationTreeItems(const std::vector< ak::ID > &itemIds)
Definition AppBase.cpp:1380
ak::aWindow * mainWindow(void)
Definition AppBase.cpp:323
std::vector< int > getSelectedNavigationTreeItems(void)
Definition AppBase.cpp:1392
void lockSelectionAndModification(bool flag)
Definition AppBase.cpp:447
void setServiceURL(const std::string &_url)
Will set the current Service URL of this service.
Definition AppBase.cpp:1096
void updateLogIntensityInfo(void)
Definition AppBase.cpp:1224
ot::PropertyGridItem * findProperty(const std::string &_groupName, const std::string &_itemName)
Definition AppBase.cpp:1458
void setNavigationTreeItemIcon(ak::ID _itemID, const QString &_iconName, const QString &_iconDefaultPath)
Definition AppBase.cpp:1334
const std::string & getSessionServiceURL(void) const
Will return the session service URL.
Definition AppBase.h:246
bool getVisible3D()
Definition AppBase.h:341
ot::GraphicsViewView * findGraphicsEditor(const std::string &_entityName)
Definition AppBase.cpp:1544
virtual ~AppBase()
Deconstructor.
ot::TextEditorView * findOrCreateTextEditor(const ot::TextEditorCfg &_config, const ot::BasicServiceInformation &_serviceInfo, const ot::WidgetView::InsertFlags &_viewInsertFlags)
Definition AppBase.cpp:1612
void slotGraphicsItemChanged(const ot::GraphicsItemCfg *_newConfig)
Definition AppBase.cpp:1818
void setCurrentProjectName(const std::string &_name)
Will set the name of the currently active project.
Definition AppBase.h:254
ak::ID addNavigationTreeItem(const QString &_treePath, char _delimiter, bool _isEditable, bool selectChildren)
Definition AppBase.cpp:1327
void expandSingleNavigationTreeItem(ak::ID _itemID, bool _isExpanded)
Definition AppBase.cpp:1364
const std::string & getServiceURL(void) const
Will return the current Service URL.
Definition AppBase.h:243
QString getNavigationTreeItemText(ak::ID _itemID)
Definition AppBase.cpp:1388
void setViewerUID(ak::UID _uid)
Definition AppBase.h:125
void clearNavigationTreeSelection(void)
Definition AppBase.cpp:1384
ot::TextEditorView * findTextEditor(const std::string &_entityName)
Definition AppBase.cpp:1602
void refreshWelcomeScreen(void)
Definition AppBase.cpp:482
ot::TableView * createNewTable(const ot::TableCfg &_config, const ot::BasicServiceInformation &_serviceInfo, const ot::WidgetView::InsertFlags &_viewInsertFlags)
Definition AppBase.cpp:1644
void setNavigationTreeItemSelected(ak::ID _itemID, bool _isSelected)
Definition AppBase.cpp:1356
void addGraphicsPickerPackage(const ot::GraphicsPickerCollectionPackage &_pckg, const ot::BasicServiceInformation &_serviceInfo)
Definition AppBase.cpp:1450
std::string getCurrentUserCollection(void) const
Will return the current username.
Definition AppBase.h:144
ControlsManager * controlsManager(void)
Definition AppBase.cpp:330
void setViewHandlingConfigFlag(ViewHandlingConfig _flag, bool _active=true)
Definition AppBase.h:223
const std::string & getCurrentProjectName(void) const
Will return the current project name.
Definition AppBase.h:249
void manageGroups(void)
Definition AppBase.cpp:559
ot::GraphicsViewView * findOrCreateGraphicsEditor(const std::string &_entityName, const QString &_title, const ot::BasicServiceInformation &_serviceInfo, const ot::WidgetView::InsertFlags &_viewInsertFlags)
Definition AppBase.cpp:1554
ak::UID getUiServiceUID(void) const
Definition AppBase.h:123
ot::VersionGraphManagerView * getVersionGraph(void)
Definition AppBase.h:352
bool isTreeItemExpanded(ak::ID _itemID)
Definition AppBase.cpp:1368
void lockUI(bool flag)
Definition AppBase.cpp:467
void clearGraphicsPickerData(void)
Clears the graphics picker and stored service picker data.
Definition AppBase.cpp:1494
ViewerComponent * getViewerComponent(void) const
Definition AppBase.h:131
void showWarningPrompt(const std::string &_message, const std::string &_title)
Definition AppBase.cpp:1730
void SetCollectionName(const std::string _collectionName)
Definition AppBase.cpp:1107
bool createNewProjectInDatabase(const QString &_projectName, const QString &_projectType)
Definition AppBase.cpp:440
ot::TableView * findTable(const std::string &_entityName)
Definition AppBase.cpp:1671
bool logIn(void)
Definition AppBase.cpp:221
void setRelayURLs(const std::string &)
Will set the Relay URLs.
Definition AppBase.cpp:1112
static AppBase * instance(void)
ViewHandlingConfig
Definition AppBase.h:89
@ SkipEntitySelection
Default view handling.
Definition ControlsManager.h:32
Definition ExternalServicesComponent.h:62
Definition ShortcutManager.h:56
Definition ControlsManager.h:67
Definition LoginData.h:14
Definition ProjectManagement.h:26
Definition ShortcutManager.h:26
Definition ViewerComponent.h:33
This abstract class is used to provide the receiver functionallity used in the messaging class.
Definition aNotifier.h:22
Definition aWindowEventHandler.h:19
Used to receive every log message that is generated.
Definition Logger.h:395
Definition ColorStyle.h:24
This class is used to manage flags. Don't forget to add OT_ADD_FLAG_FUNCTIONS and the bottom of your ...
Definition Flags.h:91
void setFlag(T _flag)
Set the provided flag.
Definition Flags.h:130
The GraphicsItemCfg is the base class for all graphics item configurations.
Definition GraphicsItemCfg.h:33
Definition GraphicsPickerCollectionManager.h:18
Package that will be used to fill the graphics picker The name of the editor must be unique....
Definition GraphicsPackage.h:24
Definition GraphicsPickerView.h:14
Definition GraphicsViewView.h:14
Contains information about the origin and the content of a log message.
Definition Logger.h:313
Definition MessageBoxHandler.h:14
Definition MessageDialogCfg.h:17
BasicButton
Definition MessageDialogCfg.h:19
BasicIcon
Definition MessageDialogCfg.h:42
Definition NavigationTreeView.h:15
Definition PlainTextEditView.h:14
2D Point with double values
Definition Point2D.h:144
Definition PropertyGridCfg.h:21
Definition PropertyGridItem.h:31
Definition PropertyGridView.h:14
The Property class is used as a base class for all Properties that can be displayed and modified in t...
Definition Property.h:21
General service information. The ServiceBase class is used to store the general service information.
Definition ServiceBase.h:23
Definition TableView.h:14
Definition TextEditorCfg.h:19
Definition TextEditorView.h:14
Definition VersionGraphManagerView.h:14
unsigned long long UID
The UID datatype used for objects.
Definition globalDataTypes.h:65
eventType
Describes the type of an event.
Definition akCore.h:86
int ID
The ID datatype used for items.
Definition globalDataTypes.h:68
unsigned long UID
Unique identifier (32 bit unsigned integer)
Definition CoreTypes.h:27
std::list< UID > UIDList
Unique identifier list.
Definition CoreTypes.h:31
ModelUIDtype model
Definition AppBase.h:82
ViewerUIDtype view
Definition AppBase.h:81
ot::UID ModelUIDtype
Definition uiServiceTypes.h:16
ot::UID ViewerUIDtype
Definition uiServiceTypes.h:14