OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
uiAPI.h
Go to the documentation of this file.
1/*
2 * File: uiAPI.h
3 * Package: akAPI
4 *
5 * Created on: February 06, 2020
6 * Author: Alexander Kuester
7 * Copyright (c) 2022 Alexander Kuester
8 * This file is part of the uiCore component.
9 * This file is subject to the terms and conditions defined in
10 * file 'LICENSE', which is part of this source code package.
11 */
12
13#pragma once
14
15// AK header
16#include <akCore/aException.h>
17#include <akCore/akCore.h>
19
21
22// Qt header
23#include <qstring.h> // QString
24#include <qicon.h> // QIcon
25#include <qstringlist.h> // QStringList
26#include <qstringlist.h>
27#include <qsize.h>
28#include <qpixmap.h>
29#include <qbytearray.h>
30
31// std header
32#include <vector> // vector<>
33#include <map> // map<>
34
35// Forward declaration
36class QSurfaceFormat;
37class QWidget;
38class QMovie;
39class QTabBar;
40class QSettings;
41class QDockWidget;
42class QScreen;
43class QApplication;
44
45namespace ak {
46
47 // Forward declaration
48 class aMessenger;
49 class aNotifier;
50 class aUidManager;
51 class aObjectManager;
53
54 namespace uiAPI {
55
57 class apiManager {
58 public:
60 apiManager();
61
63 virtual ~apiManager();
64
69 void ini(
70 QApplication* _applicationInstance,
71 const QString & _organizationName,
72 const QString & _applicationName
73 );
74
76 bool isInitialized(void) const;
77
79 QSurfaceFormat * getDefaultSurfaceFormat(void);
80
81 QApplication* app() { return m_app; }
82
83 QScreen* screen() { return m_screen; }
84
85 QSettings * settings(void) const { return m_settings; }
86
87 protected:
88 QApplication* m_app;
90 QSurfaceFormat * m_defaultSurfaceFormat;
91 QScreen* m_screen;
92
95 QSettings * m_settings;
96
98
100
101 private:
102 apiManager(const apiManager &) = delete;
103 apiManager & operator = (const apiManager &) = delete;
104 };
105
106 // ###############################################################################################################################################
107
114 QApplication* _applicationInstance,
115 const QString & _organizationName,
116 const QString & _applicationName
117 );
118
120 UICORE_API_EXPORT void destroy(void);
121
125 eventType _types
126 );
127
131 eventType _types
132 );
133
137 bool _enabled
138 );
139
142
144 UICORE_API_EXPORT std::vector<eventType> enabledEventTypes(void);
145
147 UICORE_API_EXPORT std::vector<eventType> disabledEventTypes(void);
148
152 UID _objectUid
153 );
154
158 UID _objectUID
159 );
160
163
164 // ###############################################################################################################################################
165
166 // message functions
167
175 UID _senderUid,
176 ak::aNotifier * _notifier
177 );
178
186 eventType _event,
187 ak::aNotifier * _notifier
188 );
189
196 ak::aNotifier * _notifier
197 );
198
208 UID _senderUid,
209 eventType _event,
210 int _info1 = 0,
211 int _info2 = 0
212 );
213
217 int _count
218 );
219
220 // ###############################################################################################################################################
221
222 // object creation
223
231 UID _creatorUid,
232 const QString & _text,
233 const QString & _iconName,
234 const QString & _iconSubFolder = QString("32")
235 );
236
243 UID _craetorUid,
244 const QString & _text,
245 const QIcon & _icon
246 );
247
254 UID _creatorUid,
255 const QString & _text,
256 bool _checked = false
257 );
258
263 UID _creatorUid,
264 const QString & _initialText = QString("")
265 );
266
271 UID _creatorUid,
272 const QString & _initialText,
273 const QString & _infoLabelText
274 );
275
282 UID _creatorUid,
283 UID _parentUid,
284 const QString & _text = QString("")
285 );
286
290 UID _creatorUid
291 );
292
296 UID _creatorUid
297 );
298
303 UID _creatorUid,
304 const QString & _text
305 );
306
312 UID _creatorUid,
313 const QString & _text,
314 const QIcon & _icon
315 );
316
323 UID _creatorUid,
324 const QString & _text,
325 const QString & _iconName,
326 const QString & _iconFolder
327 );
328
333 UID _creatorUid
334 );
335
336 // Object creation
337
338 // ###############################################################################################################################################
339
340 // Action
341
342 namespace action {
343
348 UID _actionUID,
349 bool _enabled
350 );
351
356 UID _actionUID,
357 const QString & _text
358 );
359
364 UID _actionUID,
365 const QIcon & _icon
366 );
367
373 UID _actionUID,
374 const QString & _iconName,
375 const QString & _iconFolder
376 );
377
381 UID _actionUID
382 );
383
384 } // namespace action
385
386 // ###############################################################################################################################################
387
388 // CheckBox
389
390 namespace checkBox {
391
393 UID _checkBoxUID,
394 bool _checked
395 );
396
398 UID _checkBoxUID,
399 const QString & _text
400 );
401
403 UID _checkBoxUID,
404 bool _enabled
405 );
406
407 UICORE_API_EXPORT QString text(
408 UID _checkBoxUID
409 );
410
412 UID _checkBoxUID
413 );
414
416 UID _checkBoxUID
417 );
418
419 }
420
421 // ###############################################################################################################################################
422
423 // Container
424
425 namespace container {
426
431 UID _containerUID,
432 UID _objectUID
433 );
434
439 UID _containerUID,
440 bool _isEnabled = true
441 );
442
446 UID _containerUID
447 );
448 }
449
450 // ###############################################################################################################################################
451
452 // Dialog
453
454 namespace dialog {
455
457 UICORE_API_EXPORT QString openDirectory(const QString & _title, const QString & _initialDir);
458
459 }
460
461 // ###############################################################################################################################################
462
463 // Line edit
464
465 namespace lineEdit {
466
471 UID _lineEditUid,
472 const QString & _text
473 );
474
479 UID _lineEditUid,
480 bool _error
481 );
482
487 UID _lineEditUid,
488 bool _isForeground
489 );
490
495 UID _lineEditUid,
496 bool _enabled
497 );
498
501 UICORE_API_EXPORT QString text(
502 UID _lineEditUid
503 );
504
508 UID _lineEditUid
509 );
510 }
511
512 // ###############################################################################################################################################
513
514 // Nice line edit
515
516 namespace niceLineEdit {
517
522 UID _lineEditUid,
523 const QString & _text
524 );
525
530 UID _lineEditUid,
531 bool _error
532 );
533
538 UID _lineEditUid,
539 bool _isForeground
540 );
541
546 UID _lineEditUid,
547 const QString & _text
548 );
549
554 UID _lineEditUid,
555 bool _enabled
556 );
557
560 UICORE_API_EXPORT QString text(
561 UID _lineEditUid
562 );
563
567 UID _lineEditUid
568 );
569
573 UID _lineEditUid
574 );
575 }
576
577 // ###############################################################################################################################################
578
579 // Object
580
581 namespace object {
582
587 UID _objectUID,
588 bool _ignoreIfObjectHasChildObjects = false
589 );
590
596 UID _objectUID,
597 const QString & _name
598 );
599
603 UID _objectUID
604 );
605
610 const QString & _name
611 );
612
618 UID _objectUID,
619 const QString & _toolTip
620 );
621
627 UID _objectUID,
628 bool _enabled = true
629 );
630
635 UID _objectUID
636 );
637
641 UID _objectUID
642 );
643
647 UID _objectUID
648 );
649
652 template<class T> T * get(
653 UID _objectUID
654 ) {
655 T * obj = nullptr;
656 obj = dynamic_cast<T *>(getObjectManager()->object(_objectUID));
657 if (obj == nullptr) {
658 assert(0);
660 }
661 return obj;
662 }
663
664 }
665
666 // ###############################################################################################################################################
667
668 // Timer
669
670 namespace timer {
671
673 UID _timerUID
674 );
675
677 UID _timerUID,
678 int _interval
679 );
680
682 UID _timerUID
683 );
684
686 UID _timerUID,
687 int _interval
688 );
689
691 UID _timerUID
692 );
693
695 UID _timerUID,
696 int _interval
697 );
698
700 UID _timerUID
701 );
702
703 } // namespace timer
704
705 // ###############################################################################################################################################
706
707 // ToolButton
708
709 namespace toolButton {
710
713 UID _toolButtonUID
714 );
715
719 UID _toolButtonUID
720 );
721
725 UID _toolButtonUID
726 );
727
732 UID _toolButtonUID,
733 bool _enabled = true
734 );
735
740 UID _toolButtonUID,
741 const QString & _text
742 );
743
748 UID _toolButtonUID,
749 const QString & _text
750 );
751
756 UID _toolButtonUID,
757 const QIcon & _icon
758 );
759
765 UID _toolButtonUID,
766 const QString & _iconName,
767 const QString & _iconFolder
768 );
769
770 } // namespace toolButton
771
772 // ###############################################################################################################################################
773
774 // Window
775
776 namespace window {
777
782 UID _windowUID,
783 aWindowEventHandler * _eventHandler
784 );
785
789 UID _windowUID
790 );
791
796 UID _windowUID,
797 aWindowEventHandler * _eventHandler
798 );
799
804 UID _windowUID,
805 bool _visible = true,
806 bool _delayed = true
807 );
808
813 UID _windowUID,
814 bool _visible = true,
815 bool _delayed = true
816 );
817
822 UID _windowUID,
823 const QString & _text
824 );
825
830 UID _windowUID,
831 int _value
832 );
833
838 UID _windowUID,
839 bool _continuous = true
840 );
841
846 UID _windowUID,
847 bool _visible = true
848 );
849
852 UID _windowUID,
853 bool _isEnabled
854 );
855
859 UID _windowUID
860 );
861
862 UICORE_API_EXPORT std::string getCurrentToolBarTabText(UID _windowUID);
863
867 UID _windowUID
868 );
869
873
875 UID _windowUID,
876 bool _enable
877 );
878
883 UID _windowUID,
884 ID _tabID
885 );
886
888 UID _windowUID,
889 const QString& _tabName
890 );
891
896 UID _windowUID,
897 const QString & _title
898 );
899
904 UID _windowUID,
905 const QIcon & _icon
906 );
907
911 UID _windowUID
912 );
913
917 UID _windowUID
918 );
919
923 UID _windowUID
924 );
925
929 UID _windowUID
930 );
931
935 UID _windowUID
936 );
937
942 UID _windowUID,
943 UID _widgetUID
944 );
945
950 UID _windowUID,
951 QWidget * _widget
952 );
953
957 UID _windowUID
958 );
959
963 UID _windowUID
964 );
965
969 UID _windowUID
970 );
971
975 UID _windowUID
976 );
977
981 UID _windowUID
982 );
983
988 UID _windowUID,
989 bool _visible = true
990 );
991
996 UID _windowUID,
997 QMovie * _movie
998 );
999
1004 UID _windowUID,
1005 const QString & _animationName
1006 );
1007
1013 UID _windowUID,
1014 int _width,
1015 int _height
1016 );
1017
1020
1023 UID _windowUID,
1024 int _width,
1025 int _height
1026 );
1027
1029 UICORE_API_EXPORT std::string saveState(
1030 UID _windowUID,
1031 std::string _currentState = ""
1032 );
1033
1036 UID _windowUID,
1037 const std::string & _state,
1038 bool _setPositionAndSize = true
1039 );
1040
1042 UID _windowUID,
1043 const QStringList& _list
1044 );
1045
1047 UID _windowUID,
1048 const QString& _tabName
1049 );
1050
1051 } // namespace window
1052
1053 // ###############################################################################################################################################
1054
1055 // Crypto
1056
1057 namespace crypto {
1058
1059 UICORE_API_EXPORT QString hash(
1060 const QString & _orig,
1061 HashAlgorithm _algorithm
1062 );
1063
1064 }
1065
1066 // ###############################################################################################################################################
1067
1072 UID _creatorUid
1073 );
1074
1075 // ###############################################################################################################################################
1076
1077 // parameters
1078
1082
1086
1089 UICORE_API_EXPORT const QIcon & getIcon(
1090 const QString & _iconName,
1091 const QString & _iconSubPath
1092 );
1093
1096 const QString & _iconName
1097 );
1098
1100 UICORE_API_EXPORT const QPixmap & getPixmap(
1101 const QString & _name
1102 );
1103
1106 UICORE_API_EXPORT QMovie * getMovie(
1107 const QString& _name
1108 );
1109
1110 // ###############################################################################################################################################
1111
1112 // Settings
1113
1114 namespace settings {
1115
1117 const QString & _settingsName,
1118 const QString & _defaultValue = QString("")
1119 );
1120
1122 const QString & _settingsName,
1123 int _defaultValue = 0
1124 );
1125
1127 const QString & _settingsName,
1128 double _defaultValue = 0.0
1129 );
1130
1132 const QString & _settingsName,
1133 float _defaultValue = 0.0
1134 );
1135
1137 const QString & _settingsName,
1138 bool _defaultValue = 0.0
1139 );
1140
1142 const QString & _settingsName,
1143 const QByteArray & _defaultValue = QByteArray()
1144 );
1145
1147 const QString & _settingsName,
1148 const QString & _value
1149 );
1150
1152 const QString & _settingsName,
1153 int _value
1154 );
1155
1157 const QString & _settingsName,
1158 double _value
1159 );
1160
1162 const QString & _settingsName,
1163 float _value
1164 );
1165
1167 const QString & _settingsName,
1168 bool _value
1169 );
1170
1172 const QString & _settingsName,
1173 const QByteArray & _value
1174 );
1175 }
1176
1177 // ###############################################################################################################################################
1178
1179 // special
1180
1181 namespace special {
1182
1186 eventType _type
1187 );
1188
1192 valueType _type
1193 );
1194
1198 textAlignment _type
1199 );
1200
1204 dockLocation _dockLocation
1205 );
1206
1210 tabLocation _tabLocation
1211 );
1212
1216 keyType _type
1217 );
1218
1222 objectType _type
1223 );
1224
1226 const QDate & _date,
1227 dateFormat _format,
1228 const QString & _delimiter
1229 );
1230
1232 const QTime & _time,
1233 timeFormat _format,
1234 const QString & _delimiter,
1235 const QString & _millisecondDelimiter = "."
1236 );
1237
1240 UID _senderUID,
1241 eventType _eventType,
1242 int _info1,
1243 int _info2
1244 );
1245
1246 }
1247
1248 } // namespace uiAPI
1249
1250} // namespace ak
#define UICORE_API_EXPORT
Definition globalDataTypes.h:20
Definition aException.h:135
Class used to forward messages to receivers This class is used to forward a message to receivers....
Definition aMessenger.h:34
This abstract class is used to provide the receiver functionallity used in the messaging class.
Definition aNotifier.h:22
The objectManager is used for creating and manipulating objects and widgets All objects created here ...
Definition aObjectManager.h:40
aObject * object(UID _objectUid)
Will return the object with the specified object UID.
Definition aObjectManager.cpp:298
This class is used to manage UIDs. This UID manager is incrementing the UID on each getId call.
Definition aUidMangager.h:25
Definition aWindowEventHandler.h:19
The API manager is used to manage the global objects required for this API to work.
Definition uiAPI.h:57
bool m_isInitialized
Definition uiAPI.h:97
bool isInitialized(void) const
Returns true if the API was initialized.
Definition uiAPI.cpp:126
QApplication * m_app
Definition uiAPI.h:88
QScreen * screen()
Definition uiAPI.h:83
void ini(QApplication *_applicationInstance, const QString &_organizationName, const QString &_applicationName)
Will initialize the API.
Definition uiAPI.cpp:101
QSettings * settings(void) const
Definition uiAPI.h:85
QApplication * app()
Definition uiAPI.h:81
QSurfaceFormat * m_defaultSurfaceFormat
True if the core application is already running.
Definition uiAPI.h:90
QString m_applicationName
Definition uiAPI.h:94
QSettings * m_settings
Definition uiAPI.h:95
apiManager()
Constructor.
Definition uiAPI.cpp:68
QSurfaceFormat * getDefaultSurfaceFormat(void)
Will return the default surface format.
Definition uiAPI.cpp:128
virtual ~apiManager()
Deconstructor.
Definition uiAPI.cpp:80
bool m_appIsRunning
The core application.
Definition uiAPI.h:89
QScreen * m_screen
Definition uiAPI.h:91
QString m_companyName
Definition uiAPI.h:93
aUidManager * m_fileUidManager
If true, then the API was initialized.
Definition uiAPI.h:99
UICORE_API_EXPORT void setEnabled(UID _actionUID, bool _enabled)
Will set the enabled state of the action.
Definition uiAPI.cpp:339
UICORE_API_EXPORT void setText(UID _actionUID, const QString &_text)
Will set the text of the action.
Definition uiAPI.cpp:344
UICORE_API_EXPORT QString getText(UID _actionUID)
Will return the text of the action.
Definition uiAPI.cpp:362
UICORE_API_EXPORT void setIcon(UID _actionUID, const QIcon &_icon)
Will set the icon of the action.
Definition uiAPI.cpp:349
UICORE_API_EXPORT void setChecked(UID _checkBoxUID, bool _checked)
Definition uiAPI.cpp:372
UICORE_API_EXPORT bool isEnabled(UID _checkBoxUID)
Definition uiAPI.cpp:395
UICORE_API_EXPORT QString text(UID _checkBoxUID)
Definition uiAPI.cpp:387
UICORE_API_EXPORT void setEnabled(UID _checkBoxUID, bool _enabled)
Definition uiAPI.cpp:382
UICORE_API_EXPORT bool isChecked(UID _checkBoxUID)
Definition uiAPI.cpp:391
UICORE_API_EXPORT void setText(UID _checkBoxUID, const QString &_text)
Definition uiAPI.cpp:377
UICORE_API_EXPORT void addObject(UID _containerUID, UID _objectUID)
Will add an object to the specified container.
Definition uiAPI.cpp:403
UICORE_API_EXPORT bool isEnabled(UID _containerUID)
Will return the enabled state of the specified container.
Definition uiAPI.cpp:413
UICORE_API_EXPORT void setEnabled(UID _containerUID, bool _isEnabled=true)
Will set the enabled state of the specified container.
Definition uiAPI.cpp:408
UICORE_API_EXPORT QString hash(const QString &_orig, HashAlgorithm _algorithm)
Definition uiAPI.cpp:993
UICORE_API_EXPORT QString openDirectory(const QString &_title, const QString &_initialDir)
Will show an open directory dialog and return the selected directory.
Definition uiAPI.cpp:423
UICORE_API_EXPORT void setText(UID _lineEditUid, const QString &_text)
Will set the line edit text.
Definition uiAPI.cpp:431
UICORE_API_EXPORT QString text(UID _lineEditUid)
Will return the line edit text.
Definition uiAPI.cpp:451
UICORE_API_EXPORT void setEnabled(UID _lineEditUid, bool _enabled)
Will set the line edit enabled state.
Definition uiAPI.cpp:446
UICORE_API_EXPORT void setErrorStateIsForeground(UID _lineEditUid, bool _isForeground)
Will set wather the error state will have an impact on the foreground or the background.
Definition uiAPI.cpp:441
UICORE_API_EXPORT void setErrorState(UID _lineEditUid, bool _error)
Will set the nice line edit error state.
Definition uiAPI.cpp:436
UICORE_API_EXPORT bool isEnabled(UID _lineEditUid)
Will return the line edit enabled state.
Definition uiAPI.cpp:455
UICORE_API_EXPORT void setErrorState(UID _lineEditUid, bool _error)
Will set the nice line edit error state.
Definition uiAPI.cpp:468
UICORE_API_EXPORT bool isEnabled(UID _lineEditUid)
Will return the nice line edit enabled state.
Definition uiAPI.cpp:496
UICORE_API_EXPORT QString infoLabelText(UID _lineEditUid)
Will return the nice line edit info label text.
Definition uiAPI.cpp:492
UICORE_API_EXPORT void setErrorStateIsForeground(UID _lineEditUid, bool _isForeground)
Will set wather the error state will have an impact on the foreground or the background.
Definition uiAPI.cpp:473
UICORE_API_EXPORT QString text(UID _lineEditUid)
Will return the nice line edit text.
Definition uiAPI.cpp:488
UICORE_API_EXPORT void setInfoLabelText(UID _lineEditUid, const QString &_text)
Will set the nice line edit info label text.
Definition uiAPI.cpp:478
UICORE_API_EXPORT void setEnabled(UID _lineEditUid, bool _enabled)
Will set the nice line edit enabled state.
Definition uiAPI.cpp:483
UICORE_API_EXPORT void setText(UID _lineEditUid, const QString &_text)
Will set the nice line edit text.
Definition uiAPI.cpp:463
T * get(UID _objectUID)
Will cast and return the object with the specified id.
Definition uiAPI.h:652
UICORE_API_EXPORT objectType type(UID _objectUID)
Will return the object type of the specified object.
Definition uiAPI.cpp:596
UICORE_API_EXPORT void setEnabled(UID _objectUID, bool _enabled=true)
Will set the objects enabeld state For the list of suitable objects refer to the documentation.
Definition uiAPI.cpp:545
UICORE_API_EXPORT QString getObjectUniqueName(UID _objectUID)
Will return the unique name set to the object.
Definition uiAPI.cpp:517
UICORE_API_EXPORT void setToolTip(UID _objectUID, const QString &_toolTip)
Will set the objects ToolTip For the list of suitable objects refer to the documentation.
Definition uiAPI.cpp:530
UICORE_API_EXPORT void setObjectUniqueName(UID _objectUID, const QString &_name)
Will set an object name to the specified object so it can be accessed later. The name must be unique!
Definition uiAPI.cpp:512
UICORE_API_EXPORT bool getIsEnabled(UID _objectUID)
Will return the objects enabeld state For the list of suitable objects refer to the documentation.
Definition uiAPI.cpp:568
UICORE_API_EXPORT UID getUidFromObjectUniqueName(const QString &_name)
Will return the UID of the object with the specified name Will return ak::invalidUID if there is no o...
Definition uiAPI.cpp:521
UICORE_API_EXPORT bool exists(UID _objectUID)
Will return true if the specified object exists.
Definition uiAPI.cpp:589
UICORE_API_EXPORT double getDouble(const QString &_settingsName, double _defaultValue=0.0)
Definition uiAPI.cpp:1059
UICORE_API_EXPORT QByteArray getByteArray(const QString &_settingsName, const QByteArray &_defaultValue=QByteArray())
Definition uiAPI.cpp:1080
UICORE_API_EXPORT int getInt(const QString &_settingsName, int _defaultValue=0)
Definition uiAPI.cpp:1052
UICORE_API_EXPORT QString getString(const QString &_settingsName, const QString &_defaultValue=QString(""))
Definition uiAPI.cpp:1045
UICORE_API_EXPORT void setByteArray(const QString &_settingsName, const QByteArray &_value)
Definition uiAPI.cpp:1122
UICORE_API_EXPORT void setInt(const QString &_settingsName, int _value)
Definition uiAPI.cpp:1094
UICORE_API_EXPORT void setString(const QString &_settingsName, const QString &_value)
Definition uiAPI.cpp:1087
UICORE_API_EXPORT void setBool(const QString &_settingsName, bool _value)
Definition uiAPI.cpp:1115
UICORE_API_EXPORT void setFloat(const QString &_settingsName, float _value)
Definition uiAPI.cpp:1108
UICORE_API_EXPORT void setDouble(const QString &_settingsName, double _value)
Definition uiAPI.cpp:1101
UICORE_API_EXPORT float getFloat(const QString &_settingsName, float _defaultValue=0.0)
Definition uiAPI.cpp:1066
UICORE_API_EXPORT bool getBool(const QString &_settingsName, bool _defaultValue=0.0)
Definition uiAPI.cpp:1073
UICORE_API_EXPORT QString toEventText(UID _senderUID, eventType _eventType, int _info1, int _info2)
Will create a JSON type representation of the event.
Definition uiAPI.cpp:1233
UICORE_API_EXPORT QString toString(eventType _type)
Will return a string representation of the provided eventType.
Definition uiAPI.cpp:1133
UICORE_API_EXPORT void setInterval(UID _timerUID, int _interval)
Definition uiAPI.cpp:619
UICORE_API_EXPORT void shoot(UID _timerUID)
Definition uiAPI.cpp:630
UICORE_API_EXPORT void start(UID _timerUID)
Definition uiAPI.cpp:654
UICORE_API_EXPORT void stop(UID _timerUID)
Definition uiAPI.cpp:678
UICORE_API_EXPORT int getInterval(UID _timerUID)
Definition uiAPI.cpp:609
UICORE_API_EXPORT void setText(UID _toolButtonUID, const QString &_text)
Will set the text of the toolButton.
Definition uiAPI.cpp:735
UICORE_API_EXPORT void setIcon(UID _toolButtonUID, const QIcon &_icon)
Will set the icon of the toolButton.
Definition uiAPI.cpp:757
UICORE_API_EXPORT void setToolTip(UID _toolButtonUID, const QString &_text)
Will set the ToolTip of the toolButton.
Definition uiAPI.cpp:746
UICORE_API_EXPORT void setEnabled(UID _toolButtonUID, bool _enabled=true)
Will set the enabled state of the toolButton.
Definition uiAPI.cpp:724
UICORE_API_EXPORT QString getToolTip(UID _toolButtonUID)
Will get the current ToolTip of the toolButton.
Definition uiAPI.cpp:714
UICORE_API_EXPORT bool getIsEnabled(UID _toolButtonUID)
Will return the current enabled state of the toolButton.
Definition uiAPI.cpp:694
UICORE_API_EXPORT QString getText(UID _toolButtonUID)
Will get the text of the toolButton.
Definition uiAPI.cpp:704
UICORE_API_EXPORT bool getStatusProgressContinuous(UID _windowUID)
Will return the continuous option of the status progress bar at the provided window.
Definition uiAPI.cpp:898
UICORE_API_EXPORT ID getCurrentTabToolBarTab(UID _windowUID)
Will return the current tab of the tab tool bar at the specified window.
Definition uiAPI.cpp:837
UICORE_API_EXPORT int getTabToolBarTabCount(UID _windowUID)
Will return the tab count of the tab tool bar at the specified window.
Definition uiAPI.cpp:853
UICORE_API_EXPORT void setWindowIcon(UID _windowUID, const QIcon &_icon)
Will set the icon at the specified window.
Definition uiAPI.cpp:877
UICORE_API_EXPORT void resize(UID _windowUID, int _width, int _height)
Will resize the window.
Definition uiAPI.cpp:957
UICORE_API_EXPORT void showMaximized(UID _windowUID)
Will show the window as maximized.
Definition uiAPI.cpp:912
UICORE_API_EXPORT void close(UID _windowUID)
Will close the provided window.
Definition uiAPI.cpp:791
UICORE_API_EXPORT void setStatusLabelText(UID _windowUID, const QString &_text)
Will set the status label text at the provided window.
Definition uiAPI.cpp:812
UICORE_API_EXPORT std::string getCurrentToolBarTabText(UID _windowUID)
Definition uiAPI.cpp:841
UICORE_API_EXPORT QString getStatusLabelText(UID _windowUID)
Will return the status label text at the provided window.
Definition uiAPI.cpp:890
UICORE_API_EXPORT void showNormal(UID _windowUID)
Will show the window.
Definition uiAPI.cpp:916
UICORE_API_EXPORT void setTitle(UID _windowUID, const QString &_title)
Will set the title at the specified window.
Definition uiAPI.cpp:872
UICORE_API_EXPORT void addEventHandler(UID _windowUID, aWindowEventHandler *_eventHandler)
Will add the provided event handler to the window.
Definition uiAPI.cpp:786
UICORE_API_EXPORT void showMinimized(UID _windowUID)
Will show the window as minimized.
Definition uiAPI.cpp:920
UICORE_API_EXPORT QPoint position(UID _windowUID)
Will return the position of the window.
Definition uiAPI.cpp:928
UICORE_API_EXPORT void setTabToolBarVisible(UID _windowUID, bool _visible=true)
Will set the visible state of the tabToolbar in the specified window.
Definition uiAPI.cpp:827
UICORE_API_EXPORT void setTabToolbarDoubleClickEnabled(UID _windowUID, bool _isEnabled)
Will set the enabled state of double click event in the tab toolbar.
Definition uiAPI.cpp:832
UICORE_API_EXPORT void removeEventHandler(UID _windowUID, aWindowEventHandler *_eventHandler)
Will remove the provided event handler from the window.
Definition uiAPI.cpp:795
UICORE_API_EXPORT int getStatusProgressValue(UID _windowUID)
Will return the status progress bar value at the provided window.
Definition uiAPI.cpp:894
UICORE_API_EXPORT void setStatusProgressContinuous(UID _windowUID, bool _continuous=true)
Will set the continuous option of the status progress bar at the provided window.
Definition uiAPI.cpp:822
UICORE_API_EXPORT void setCentralWidget(UID _windowUID, UID _widgetUID)
Will set the windows central widget (The widget will be added to a container, the actual central widg...
Definition uiAPI.cpp:902
UICORE_API_EXPORT bool getStatusProgressVisible(UID _windowUID)
Will return true if the status progress bar is visible at the provided window.
Definition uiAPI.cpp:886
UICORE_API_EXPORT std::string saveState(UID _windowUID, std::string _currentState="")
Will return the state of the window so it can be restored.
Definition uiAPI.cpp:963
UICORE_API_EXPORT void setTabToolBarTabOrder(UID _windowUID, const QStringList &_list)
Definition uiAPI.cpp:978
UICORE_API_EXPORT void setStatusLabelVisible(UID _windowUID, bool _visible=true, bool _delayed=true)
Will set the visible state of the status label of the provided window.
Definition uiAPI.cpp:800
UICORE_API_EXPORT void setCurrentTabToolBarTab(UID _windowUID, ID _tabID)
Will set the specified tab toolbar tab as current at the specified window.
Definition uiAPI.cpp:862
UICORE_API_EXPORT void setWaitingAnimationVisible(UID _windowUID, bool _visible=true)
Will set the visible state of the waiting animation.
Definition uiAPI.cpp:932
UICORE_API_EXPORT void activateToolBarTab(UID _windowUID, const QString &_tabName)
Definition uiAPI.cpp:983
UICORE_API_EXPORT QSize size(UID _windowUID)
Will return the size of the window.
Definition uiAPI.cpp:924
UICORE_API_EXPORT void enableTabToolBar(UID _windowUID, bool _enable)
Will enable or disable the tab tool bar at the specified window.
Definition uiAPI.cpp:857
UICORE_API_EXPORT double devicePixelRatio(void)
Will return the device pixel ratio of the currently used device.
Definition uiAPI.cpp:955
UICORE_API_EXPORT bool restoreState(UID _windowUID, const std::string &_state, bool _setPositionAndSize=true)
Will return the state of the window so it can be restored.
Definition uiAPI.cpp:970
UICORE_API_EXPORT bool getStatusLabelVisible(UID _windowUID)
Will return true if the status label is visible at the provided window.
Definition uiAPI.cpp:882
UICORE_API_EXPORT void setStatusProgressValue(UID _windowUID, int _value)
Will set the value of the status progress bar at the provided window.
Definition uiAPI.cpp:817
UICORE_API_EXPORT void setCentralWidgetMinimumSize(UID _windowUID, int _width, int _height)
Will set the central widget minimum size.
Definition uiAPI.cpp:949
UICORE_API_EXPORT void setStatusProgressVisible(UID _windowUID, bool _visible=true, bool _delayed=true)
Will set the visible state of the status progress bar of the provided window.
Definition uiAPI.cpp:806
UICORE_API_EXPORT void setWaitingAnimation(UID _windowUID, QMovie *_movie)
Will set the movie as waiting animation in the window.
Definition uiAPI.cpp:937
UICORE_API_EXPORT const QPixmap & getPixmap(const QString &_name)
Will return the icon with the specified name and path.
Definition uiAPI.cpp:1029
UICORE_API_EXPORT void sendMessage(UID _senderUid, eventType _event, int _info1=0, int _info2=0)
Will send a message to the messanger.
Definition uiAPI.cpp:209
UICORE_API_EXPORT void registerUidNotifier(UID _senderUid, ak::aNotifier *_notifier)
Will register the notifier at the messenger The provided notifier will get a new uid if not done so b...
Definition uiAPI.cpp:186
UICORE_API_EXPORT void setMessengerEnabled(bool _enabled)
Will set the enabled state of the messenger.
Definition uiAPI.cpp:151
UICORE_API_EXPORT UID createAction(UID _creatorUid, const QString &_text, const QString &_iconName, const QString &_iconSubFolder=QString("32"))
Will create a new Action and return its UID.
Definition uiAPI.cpp:231
UICORE_API_EXPORT const QIcon & getIcon(const QString &_iconName, const QString &_iconSubPath)
WIll return the icon with the specified name and path.
Definition uiAPI.cpp:1016
UICORE_API_EXPORT UID getObjectCreator(UID _objectUID)
Will return the creator UID of the specified object.
Definition uiAPI.cpp:172
UICORE_API_EXPORT const QIcon & getApplicationIcon(const QString &_iconName)
Will return the application icon with the specified name and path.
Definition uiAPI.cpp:1023
UICORE_API_EXPORT void disableEventTypes(eventType _types)
Will disable the provided event types to be send.
Definition uiAPI.cpp:147
UICORE_API_EXPORT void registerAllMessagesNotifier(ak::aNotifier *_notifier)
Will register the notifier for all messages send at the global messenger The provided notifier will g...
Definition uiAPI.cpp:202
UICORE_API_EXPORT QWidget * getWidget(UID _objectUid)
Will return the QWidget of the specifed object.
Definition uiAPI.cpp:168
UICORE_API_EXPORT UID createToolButton(UID _creatorUid)
Will create a toolButton and return its UID.
Definition uiAPI.cpp:292
UICORE_API_EXPORT QMovie * getMovie(const QString &_name)
Will return the movie with the specified name and path.
Definition uiAPI.cpp:1035
UICORE_API_EXPORT std::vector< eventType > disabledEventTypes(void)
Will return the disabled event types that will be send.
Definition uiAPI.cpp:166
UICORE_API_EXPORT bool messengerIsEnabled(void)
Will return the current enabled state for the messenger.
Definition uiAPI.cpp:159
UICORE_API_EXPORT std::vector< eventType > enabledEventTypes(void)
Will return the enabled event types that will be send.
Definition uiAPI.cpp:164
UICORE_API_EXPORT void setSurfaceFormatDefaultSamplesCount(int _count)
Will set the samples count for the default surface formt.
Definition uiAPI.cpp:219
UICORE_API_EXPORT UID createLineEdit(UID _creatorUid, const QString &_initialText=QString(""))
Will create a line edit and return its UID param _creatorUid The UID of the creator.
Definition uiAPI.cpp:259
UICORE_API_EXPORT UID createNiceLineEdit(UID _creatorUid, const QString &_initialText, const QString &_infoLabelText)
Will create a nice line edit.
Definition uiAPI.cpp:267
UICORE_API_EXPORT UID createTabToolBarSubContainer(UID _creatorUid, UID _parentUid, const QString &_text=QString(""))
Will create a new TabToolBar subcountainer and return its UID.
Definition uiAPI.cpp:276
UICORE_API_EXPORT aMessenger * getMessenger(void)
Will return the messenger.
Definition uiAPI.cpp:1014
UICORE_API_EXPORT UID createCheckbox(UID _creatorUid, const QString &_text, bool _checked=false)
Will create a new CheckBox and return its UID.
Definition uiAPI.cpp:250
UICORE_API_EXPORT void registerEventTypeNotifier(eventType _event, ak::aNotifier *_notifier)
Will register the notifier at the messenger The provided notifier will get a new uid if not done so b...
Definition uiAPI.cpp:194
UICORE_API_EXPORT UID createTimer(UID _creatorUid)
Will create a new timer and return its UID.
Definition uiAPI.cpp:285
UICORE_API_EXPORT UID createUid(void)
Will generate a new UID and return it.
Definition uiAPI.cpp:1009
UICORE_API_EXPORT void destroy(void)
Will destroy all objects created by this API.
Definition uiAPI.cpp:141
UICORE_API_EXPORT void ini(QApplication *_applicationInstance, const QString &_organizationName, const QString &_applicationName)
Will initialize the application.
Definition uiAPI.cpp:135
UICORE_API_EXPORT UID createWindow(UID _creatorUid)
Will create a new UI manager and return its UID.
Definition uiAPI.cpp:326
UICORE_API_EXPORT void enableEventTypes(eventType _types)
Will enable the provided event types to be send.
Definition uiAPI.cpp:143
UICORE_API_EXPORT aObjectManager * getObjectManager(void)
Will return the object manager used in this API.
Definition uiAPI.cpp:179
UICORE_API_EXPORT void creatorDestroyed(UID _creatorUid)
Will destroy all objects created by this creator.
Definition uiAPI.cpp:1000
Definition uiAPI.h:45
timeFormat
Describes the time format.
Definition akCore.h:217
valueType
Definition akCore.h:223
unsigned long long UID
The UID datatype used for objects.
Definition globalDataTypes.h:65
objectType
Describes the type of an object.
Definition akCore.h:167
tabLocation
Descirbes the tab location.
Definition akCore.h:202
textAlignment
Describes the text alignment.
Definition akCore.h:210
HashAlgorithm
Definition akCore.h:121
eventType
Describes the type of an event.
Definition akCore.h:86
int ID
The ID datatype used for items.
Definition globalDataTypes.h:68
dockLocation
Describes the dock location of a dock widget.
Definition akCore.h:79
keyType
Definition akCore.h:143
dateFormat
Describes the date format.
Definition akCore.h:71