OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
AppBase.h
Go to the documentation of this file.
1
4// ###########################################################################################################################################################################################################################################################################################################################
5
6#pragma once
7
8#include "QtMetaTypes.h"
9
10// Frontend header
11#include "uiServiceTypes.h" // Model and View types
12#include "LoginData.h"
13
14// AK header
15#include <akCore/aException.h>
17#include <akWidgets/aWindow.h>
18
19#include "OTCore/Logger.h"
20#include "OTCore/Point2D.h"
21#include "OTCore/ServiceBase.h"
22#include "OTCore/OwnerService.h"
23#include "OTGui/Property.h"
24#include "OTGui/TableCfg.h"
25#include "OTGui/TextEditorCfg.h"
33
35#include <akCore/aNotifier.h>
36
37// Qt header
38#include <qobject.h>
39#include <qstring.h>
40#include <qicon.h>
41#include <QtCore/qsettings.h>
42
43// C++ header
44#include <map>
45#include <vector>
46
47// Forward declaration
48class QWidget;
49class QTreeWidgetItem;
50class ViewerComponent;
51class ControlsManager;
52class LockManager;
55class ShortcutManager;
56class OldWelcomeScreen;
57
58// Forward declaration
59class ToolBar;
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; }
79
84
86class AppBase : public QObject, public ot::ServiceBase, public ak::aWindowEventHandler, public ak::aNotifier, public ot::AbstractLogNotifier, public ot::MessageBoxHandler {
87 Q_OBJECT
88public:
89 enum class ViewHandlingConfig : uint32_t {
90 NoConfig = 0 << 0,
91 SkipEntitySelection = 1 << 0
92 };
94
96 virtual ~AppBase();
97
98 // ##############################################################################################
99
100 // Base functions
101
109 bool initialize();
110
111 bool logIn(void);
112
114 bool isInitialized(void) const;
115
116 std::shared_ptr<QSettings> createSettingsInstance(void) const;
117
118 // ##############################################################################################
119
120 // Component functions
121
122 void setUiServiceUID(ak::UID _uid) { m_uid = _uid; };
123 ak::UID getUiServiceUID(void) const { return m_uid; }
124
125 void setViewerUID(ak::UID _uid) { m_viewerUid = _uid; };
126 ak::UID getViewerUID(void) const { return m_viewerUid; };
127
128 void setModelUID(ak::UID _uid) { m_modelUid = _uid; };
129 ak::UID getModelUID(void) const { return m_modelUid; };
130
131 ViewerComponent* getViewerComponent(void) const { return m_viewerComponent; };
132 ExternalServicesComponent* getExternalServicesComponent(void) const { return m_ExternalServicesComponent; };
133
135 void setCurrentProjectIsModified(bool _isModified = true);
136
138 bool getCurrentProjectIsModified(void) const;
139
141 const LoginData& getCurrentLoginData(void) const { return m_loginData; };
142
144 std::string getCurrentUserCollection(void) const { return m_currentUserCollection; };
145
146 ak::aWindow * mainWindow(void);
147
149
150 LockManager * lockManager(void);
151
152 // ##############################################################################################
153
154 // Event handling
155
157 virtual void log(const ot::LogMessage& _message) override;
158
166 virtual void notify(ak::UID _senderId, ak::eventType _eventType, int _info1, int _info2) override;
167
168 virtual bool closeEvent(void) override;
169
170 bool createNewProjectInDatabase(const QString& _projectName, const QString & _projectType);
171
172public:
173
175
176 void frontendSettingsChanged(const ot::Property* _property);
177
178 void viewerSettingsChanged(const ot::Property* _property);
179
180 void settingsChanged(const std::string& _owner, const ot::Property* _property);
181
182 void setWaitingAnimationVisible(bool flag);
183
184 // ##############################################################################################
185
186 //
187
188 void createUi(void);
189
190 void setDebug(bool);
191
192 bool debug(void) const;
193
194 void registerSession(const std::string& _projectName, const std::string& _collectionName);
195
197
198 ViewerUIDtype createView(ModelUIDtype _modelUID, const std::string& _projectName);
199
200 void setCurrentVisualizationTabFromEntityName(const std::string& _entityName, ot::WidgetViewBase::ViewType _viewType);
201 void setCurrentVisualizationTabFromTitle(const std::string& _tabTitle);
202 std::string getCurrentVisualizationTabTitle(void);
203
204 void importProject(void);
205 void manageGroups(void);
206
207 // ############################################################################################
208
209 // Information setter
210
212 void setSiteID(int _id);
213
215 void setServiceURL(const std::string & _url);
216
218 void setSessionServiceURL(const std::string & _url);
219
220 void SetCollectionName(const std::string _collectionName);
221 void startSessionRefreshTimer(void);
222
223 void setViewHandlingConfigFlag(ViewHandlingConfig _flag, bool _active = true) { m_viewHandling.setFlag(_flag, _active); };
224 void setViewHandlingConfigFlags(const ViewHandlingFlags& _flags) { m_viewHandling = _flags; };
225 const ViewHandlingFlags& getViewHandlingConfigFlags(void) const { return m_viewHandling; };
226
227 // ############################################################################################
228
229 // Information gathering
230
232 int getSiteID(void) const { return m_siteID; }
233
234 ak::UID uiUID(void) const { return m_uid; }
235
237 void setRelayURLs(const std::string &);
238
240 std::string getRelayURLs(void) const;
241
243 const std::string & getServiceURL(void) const { return m_uiServiceURL; }
244
246 const std::string & getSessionServiceURL(void) const { return m_sessionServiceURL; }
247
249 const std::string & getCurrentProjectName(void) const { return m_currentProjectName; }
250
251 const std::string& getCurrentProjectType(void) const { return m_currentProjectType; };
252
254 void setCurrentProjectName(const std::string & _name) { m_currentProjectName = _name; }
255
256 void setCurrentProjectType(const std::string& _type) { m_currentProjectType = _type; };
257
258 std::string getCollectionName() const { return m_collectionName; }
259
260 void switchToViewTab(void);
261
262 void switchToTab(const std::string &menu);
263
264 void closeAllViewerTabs(void);
265
267 void clearSessionInformation(void);
268
269 void restoreSessionState(void);
270 void storeSessionState(void);
271
272 bool storeSettingToDataBase(const ot::PropertyGridCfg& _config, const std::string& _subKey);
273
274 ot::PropertyGridCfg getSettingsFromDataBase(const std::string& _subKey);
275
276 void updateLogIntensityInfo(void);
277
278public Q_SLOTS:
279 void lockUI(bool flag);
280 void refreshWelcomeScreen(void);
281 void lockSelectionAndModification(bool flag);
282
284 void setProgressBarVisibility(const char *progressMessage, bool progressBaseVisible, bool continuous);
285
287 void setProgressBarValue(int progressPercentage);
288
289public:
290
291 QString availableTabText(const QString& _initialTabText);
292
293 ToolBar * getToolBar(void) const { return m_ttb; }
294
295 void setTabToolBarTabOrder(const QStringList& _lst);
296 void activateToolBarTab(const QString& _tab);
297
298 // ##############################################################################################
299
300 // Navigation
301
302 void setNavigationTreeSortingEnabled(bool _enabled);
303 void setNavigationTreeMultiselectionEnabled(bool _enabled);
304
305 void clearNavigationTree(void);
306
307 ak::ID addNavigationTreeItem(const QString & _treePath, char _delimiter, bool _isEditable, bool selectChildren);
308
309 void setNavigationTreeItemIcon(ak::ID _itemID, const QString & _iconName, const QString & _iconDefaultPath);
310
311 void setNavigationTreeItemText(ak::ID _itemID, const QString & _itemName);
312
313 void setNavigationTreeItemSelected(ak::ID _itemID, bool _isSelected);
314
315 void setSingleNavigationTreeItemSelected(ak::ID _itemID, bool _isSelected);
316
317 void expandSingleNavigationTreeItem(ak::ID _itemID, bool _isExpanded);
318
319 bool isTreeItemExpanded(ak::ID _itemID);
320
321 void toggleNavigationTreeItemSelection(ak::ID _itemID, bool _considerChilds);
322
323 void removeNavigationTreeItems(const std::vector<ak::ID> & itemIds);
324
326
327 void setupPropertyGrid(const ot::PropertyGridCfg& _configuration);
328
329 void focusPropertyGridItem(const std::string& _group, const std::string& _name);
330
331 //void fillPropertyGrid(const std::string &settings);
332
333 QString getNavigationTreeItemText(ak::ID _itemID);
334
335 std::vector<int> getSelectedNavigationTreeItems(void);
336
337 void setVisible3D(bool visible3D) { m_visible3D = visible3D; }
338 void setVisible1D(bool visible1D) { m_visible1D = visible1D; }
339 void setVisibleBlockPicker(bool visibleBlockPicker) { m_visibleBlockPicker = visibleBlockPicker; }
340
341 bool getVisible3D() { return m_visible3D; }
342 bool getVisible1D() { return m_visible1D; }
343 bool getVisibleBlockPicker() { return m_visibleBlockPicker; }
344
345 // Info text output
346
347 void replaceInfoMessage(const QString& _message);
348
349 void appendInfoMessage(const QString& _message);
350 void appendHtmlInfoMessage(const QString& _html);
351
352 ot::VersionGraphManagerView* getVersionGraph(void) { return m_versionGraph; };
353
354 // ##############################################################################################
355
356 // Property grid
357
358 ot::PropertyGridItem* findProperty(const std::string& _groupName, const std::string& _itemName);
359 ot::PropertyGridItem* findProperty(const std::list<std::string>& _groupPath, const std::string& _itemName);
360
361 std::string getPropertyType(const std::string& _groupName, const std::string& _itemName);
362
363 bool getPropertyIsDeletable(const std::string& _groupName, const std::string& _itemName);
364
365 ShortcutManager * shortcutManager(void) { return m_shortcutManager; }
366
367 void clearPropertyGrid(void);
368
369 void lockPropertyGrid(bool flag);
370
371 // ###########################################################################################################################################################################################################################################################################################################################
372
373 // Graphics
374
376
378 void clearGraphicsPickerData(void);
379
380 ot::GraphicsViewView* createNewGraphicsEditor(const std::string& _entityName, const QString& _title, ot::BasicServiceInformation _serviceInfo, const ot::WidgetView::InsertFlags& _viewInsertFlags);
381
382 ot::GraphicsViewView* findGraphicsEditor(const std::string& _entityName);
383
384 ot::GraphicsViewView* findOrCreateGraphicsEditor(const std::string& _entityName, const QString& _title, const ot::BasicServiceInformation& _serviceInfo, const ot::WidgetView::InsertFlags& _viewInsertFlags);
385
386 std::list<ot::GraphicsViewView*> getAllGraphicsEditors(void);
387
388 // ###########################################################################################################################################################################################################################################################################################################################
389
390 // Text Editor
391
392 ot::TextEditorView* createNewTextEditor(const ot::TextEditorCfg& _config, const ot::BasicServiceInformation& _serviceInfo, const ot::WidgetView::InsertFlags& _viewInsertFlags);
393
394 ot::TextEditorView* findTextEditor(const std::string& _entityName);
395
397
398 void closeTextEditor(const std::string& _entityName);
399
400 void closeAllTextEditors(const ot::BasicServiceInformation& _serviceInfo);
401
402 // ###########################################################################################################################################################################################################################################################################################################################
403
404 // Table
405
406 ot::TableView* createNewTable(const ot::TableCfg& _config, const ot::BasicServiceInformation& _serviceInfo, const ot::WidgetView::InsertFlags& _viewInsertFlags);
407
408 ot::TableView* findTable(const std::string& _entityName);
409
410 ot::TableView* findOrCreateTable(const ot::TableCfg& _config, const ot::BasicServiceInformation& _serviceInfo, const ot::WidgetView::InsertFlags& _viewInsertFlags);
411
412 void closeTable(const std::string& _name);
413
414 // ######################################################################################################################
415
416 // Prompt
417
419
420 ot::MessageDialogCfg::BasicButton showPrompt(const std::string& _message, const std::string& _title, ot::MessageDialogCfg::BasicIcon _icon, const ot::MessageDialogCfg::BasicButtons& _buttons);
421
422public Q_SLOTS:
423 void showInfoPrompt(const std::string& _message, const std::string& _title);
424
425 void showWarningPrompt(const std::string& _message, const std::string& _title);
426
427 void showErrorPrompt(const std::string& _message, const std::string& _title);
428
429public:
430
431 // #######################################################################################################################
432
433 void destroyObjects(const std::vector<ak::UID> & _objects);
434
435 void makeWidgetViewCurrentWithoutInputFocus(ot::WidgetView* _view, bool _ignoreEntitySelect);
436
437 static AppBase * instance(void);
438
439 // #######################################################################################################################
440
441 // Asynchronous callbacks
442
443public Q_SLOTS:
444 void slotGraphicsItemRequested(const QString& _name, const QPointF& _pos);
445 void slotGraphicsItemChanged(const ot::GraphicsItemCfg* _newConfig);
446 void slotGraphicsConnectionRequested(const ot::UID& _fromUid, const std::string& _fromConnector, const ot::UID& _toUid, const std::string& _toConnector);
447 void slotGraphicsConnectionToConnectionRequested(const ot::UID& _fromItemUid, const std::string& _fromItemConnector, const ot::UID& _toConnectionUid, const ot::Point2DD& _newControlPoint);
449 void slotGraphicsRemoveItemsRequested(const ot::UIDList& _items, const std::list<std::string>& _connections);
450
452 void slotTableSaveRequested(void);
453
454 // ###########################################################################################################################################################################################################################################################################################################################
455
456 // Private: Slots
457
458private Q_SLOTS:
459 void slotVersionSelected(const std::string& _versionName);
460 void slotVersionDeselected(void);
461 void slotRequestVersion(const std::string& _versionName);
462
463 void slotViewFocusChanged(ot::WidgetView* _focusedView, ot::WidgetView* _previousView);
464 void slotViewCloseRequested(ot::WidgetView* _view);
465 void slotColorStyleChanged(const ot::ColorStyle& _style);
466
467 // ###########################################################################################################################################################################################################################################################################################################################
468
469 // Private: Welcome Screen Slots
470
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);
479
480 // ###########################################################################################################################################################################################################################################################################################################################
481
482 // Private: Property grid slots
483
484 void slotPropertyGridValueChanged(const ot::Property* _property);
485 void slotPropertyGridValueDeleteRequested(const ot::Property* _property);
486
487 // ###########################################################################################################################################################################################################################################################################################################################
488
489 // Private: Tree slots
490
491 void slotTreeItemSelectionChanged(void);
492 void slotTreeItemTextChanged(QTreeWidgetItem* _item, int _column);
493 void slotTreeItemFocused(QTreeWidgetItem* _item);
494
495private:
496 enum class AppState {
497 NoState = 0x00,
498 RestoringSettingsState = 0x01,
499 LoggedInState = 0x10,
500 ProjectOpenState = 0x20
501 };
502 typedef ot::Flags<AppState> AppStateFlags;
503
504 friend class ToolBar;
506
508 AppBase();
509
510 void exportProjectWorker(std::string selectedProjectName, std::string exportFileName);
511 void importProjectWorker(std::string projectName, std::string currentUser, std::string importFileName);
512
513 void sessionRefreshTimer(const std::string _sessionUserName, const std::string _authorizationUrl);
514
515 bool checkForContinue(const std::string& _title);
516
517 void fillGraphicsPicker(const ot::BasicServiceInformation& _serviceInfo);
518
519 void clearGraphicsPicker(void);
520
521 void cleanupWidgetViewInfo(ot::WidgetView* _view);
522
523 AppStateFlags m_state;
524 ViewHandlingFlags m_viewHandling;
525
526 std::string m_uiServiceURL;
527 int m_siteID;
528 std::string m_relayURLs;
529 std::string m_currentProjectName;
530 std::string m_currentProjectType;
531 std::string m_collectionName;
532
533 std::string m_currentUserCollection;
534 std::string m_sessionServiceURL;
535
536 bool m_appIsRunning;
537 bool m_isInitialized;
538 bool m_isDebug;
539 bool m_widgetIsWelcome;
540
541 bool m_projectStateIsModified;
542
543 ViewerComponent * m_viewerComponent;
544 ExternalServicesComponent * m_ExternalServicesComponent;
545
546 ProjectOverviewWidget* m_welcomeScreen;
547
548 ShortcutManager * m_shortcutManager;
549
550 LoginData m_loginData;
551
552 // Default UI
553
554 ToolBar * m_ttb;
555 ot::NavigationTreeView* m_projectNavigation;
556 ot::PropertyGridView* m_propertyGrid;
557 ot::PlainTextEditView* m_output;
558 ot::GraphicsPickerView* m_graphicsPicker;
559 ot::GraphicsPickerCollectionManager m_graphicsPickerManager;
560 ak::UID m_uid;
561 ak::UID m_mainWindow;
562 ak::UID m_viewerUid;
563 ak::UID m_modelUid;
564
565 ot::Label* m_logIntensity;
566
567 struct StateInformation {
568 bool viewShown;
569 std::string window;
570 std::string view;
571 };
572 StateInformation m_currentStateWindow;
573
574 ot::WidgetView* m_lastFocusedCentralView;
575
576 ot::VersionGraphManagerView* m_versionGraph;
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;
580
581 bool m_visible3D;
582 bool m_visible1D;
583 bool m_visibleBlockPicker;
584
585 AppBase(AppBase&) = delete;
586 AppBase& operator = (AppBase&) = delete;
587
588 OT_ADD_PRIVATE_FLAG_FUNCTIONS(AppBase::AppState)
589};
590
#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
OpenTwin Logging system.
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 ProjectOverviewWidget.h:65
Definition ShortcutManager.h:26
Definition ToolBar.h:21
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
Definition aWindow.h:38
Used to receive every log message that is generated.
Definition Logger.h:395
The BasicServiceInformation class is used to hold a service name and type. The BasicServiceInformatio...
Definition BasicServiceInformation.h:21
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
Definition Label.h:17
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 TableCfg.h:19
Definition TableView.h:14
Definition TextEditorCfg.h:19
Definition TextEditorView.h:14
Definition VersionGraphManagerView.h:14
ViewType
Definition WidgetViewBase.h:49
The WidgetView class is used to integrate the Qt-ADS functionallity into open twin.
Definition WidgetView.h:32
Definition uiAPI.h:45
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
Definition Connector.h:8
unsigned long UID
Unique identifier (32 bit unsigned integer)
Definition CoreTypes.h:27
std::list< UID > UIDList
Unique identifier list.
Definition CoreTypes.h:31
Definition AppBase.h:80
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