20#include <QtCore/qstring.h>
21#include <QtCore/qflags.h>
22#include <QtCore/qcryptographichash.h>
117 etDeleted = (
unsigned long long ) (1) << 32
246 return static_cast<eventType>(
static_cast<int>(a) |
static_cast<int>(b));
251 return static_cast<colorAreaFlag>(
static_cast<int>(a) |
static_cast<int>(b));
283 template <
class T> std::vector<T>
toVector(
const std::list<T> & _list) {
285 ret.reserve(_list.size());
286 for (
auto itm : _list) { ret.push_back(itm); }
369 template <
class T> T
toNumber(
const std::string& _string,
bool & _failed) {
370 std::stringstream ss(_string);
374 if (ss.fail()) { _failed =
true; }
377 if (!rest.empty()) { _failed =
true; }
384 template <
class T> T
toNumber(
const QString& _string,
bool & _failed) {
385 return toNumber<T>(_string.toStdString(), _failed);
391 template <
class T> T
toNumber(
const char* _string,
bool & _failed) {
392 return toNumber<T>(std::string(_string), _failed);
#define UICORE_API_EXPORT
Definition globalDataTypes.h:20
UICORE_API_EXPORT keyType toKeyType(QKeyEvent *_event)
Will return the key type of the provided QKeyEvent If the key is not included in the keyType type a k...
Definition akCore.cpp:344
timeFormat
Describes the time format.
Definition akCore.h:217
@ tfHHMM
Definition akCore.h:218
@ tfHHMMSSMMMM
Definition akCore.h:220
@ tfHHMMSS
Definition akCore.h:219
valueType
Definition akCore.h:223
@ vtLosslessFloat
Definition akCore.h:233
@ vtString
Definition akCore.h:238
@ vtUint64
Definition akCore.h:241
@ vtColor
Definition akCore.h:226
@ vtFloat
Definition akCore.h:229
@ vtDouble
Definition akCore.h:228
@ vtArray
Definition akCore.h:224
@ vtNull
Definition akCore.h:234
@ vtUint
Definition akCore.h:240
@ vtDate
Definition akCore.h:227
@ vtNumber
Definition akCore.h:235
@ vtTime
Definition akCore.h:239
@ vtInt64
Definition akCore.h:231
@ vtLosslessDouble
Definition akCore.h:232
@ vtInt
Definition akCore.h:230
@ vtBool
Definition akCore.h:225
@ vtSelection
Definition akCore.h:237
@ vtObject
Definition akCore.h:236
eventType operator|(eventType a, eventType b)
Definition akCore.h:244
UICORE_API_EXPORT std::vector< int > toCharIndex(const char *str)
Definition akCore.cpp:188
objectType
Describes the type of an object.
Definition akCore.h:167
@ otAction
Definition akCore.h:169
@ otMenu
Definition akCore.h:174
@ otTabToolbarGroup
Definition akCore.h:177
@ otTree
Definition akCore.h:182
@ otLabel
Definition akCore.h:171
@ otNone
Definition akCore.h:168
@ otLineEdit
Definition akCore.h:172
@ otMainWindow
Definition akCore.h:173
@ otToolButton
Definition akCore.h:181
@ otTimer
Definition akCore.h:180
@ otTreeItem
Definition akCore.h:183
@ otTabToolbarPage
Definition akCore.h:178
@ otTabToolbar
Definition akCore.h:176
@ otTabToolbarSubgroup
Definition akCore.h:179
@ otCheckBox
Definition akCore.h:170
@ otNiceLineEdit
Definition akCore.h:175
colorAreaFlag
Definition akCore.h:35
@ cafBorderColorWindow
Definition akCore.h:38
@ cafDefaultBorderControls
Definition akCore.h:45
@ cafForegroundColorWindow
Definition akCore.h:37
@ cafBackgroundColorView
Definition akCore.h:62
@ cafTabToolBarGroupSeperatorLine
Definition akCore.h:61
@ cafBackgroundColorAlternate
Definition akCore.h:47
@ cafBackgroundColorControls
Definition akCore.h:42
@ cafBackgroundColorFocus
Definition akCore.h:49
@ cafBorderColorHeader
Definition akCore.h:41
@ cafForegroundColorError
Definition akCore.h:48
@ cafDefaultBorderHeader
Definition akCore.h:56
@ cafBorderColorControls
Definition akCore.h:44
@ cafBackgroundColorSelected
Definition akCore.h:50
@ cafBackgroundColorDialogWindow
Definition akCore.h:57
@ cafDefaultBorderWindow
Definition akCore.h:46
@ cafForegroundColorFocus
Definition akCore.h:51
@ cafBackgroundColorButton
Definition akCore.h:59
@ cafBackgroundColorHeader
Definition akCore.h:39
@ cafBackgroundColorTransparent
Definition akCore.h:53
@ cafForegroundColorSelected
Definition akCore.h:52
@ cafImagesTree
Definition akCore.h:54
@ cafBackgroundColorWindow
Definition akCore.h:36
@ cafForegroundColorDialogWindow
Definition akCore.h:58
@ cafForegroundColorButton
Definition akCore.h:60
@ cafForegroundColorHeader
Definition akCore.h:40
@ cafForegroundColorControls
Definition akCore.h:43
@ cafImagesDock
Definition akCore.h:55
UICORE_API_EXPORT bool isNumericOnly(const char *str)
Returns true if the provided C-String consists only of numerical characters.
Definition akCore.cpp:123
UICORE_API_EXPORT QString toQString(eventType _eventType)
Create a string representation of the provided ak::core::eventType.
Definition akCore.cpp:19
UICORE_API_EXPORT bool isInteger(const char *str)
Returns true if the provided C-String is in a format ready to be converted to an integer.
Definition akCore.cpp:105
T toNumber(const std::string &_string, bool &_failed)
Will convert and return the number specified in the string.
Definition akCore.h:369
std::vector< T > toVector(const std::list< T > &_list)
Will return a vector containing all the information from the list.
Definition akCore.h:283
UICORE_API_EXPORT dateFormat toDateFormat(const QString &_str)
Will return the date format that the provided string is representing.
Definition akCore.cpp:389
tabLocation
Descirbes the tab location.
Definition akCore.h:202
@ tabLocationDown
Definition akCore.h:204
@ tabLocationLeft
Definition akCore.h:205
@ tabLocationRight
Definition akCore.h:206
@ tabLocationUp
Definition akCore.h:203
promptType
Describes the promt type.
Definition akCore.h:187
@ promptYesNoCancelIconLeft
Definition akCore.h:198
@ promptOkCancelIconLeft
Definition akCore.h:195
@ promptOk
Definition akCore.h:188
@ promptIconLeft
Definition akCore.h:194
@ promptIgnoreRetryCancel
Definition akCore.h:193
@ promptRetryCancel
Definition akCore.h:192
@ promptYesNo
Definition akCore.h:189
@ promptYesNoCancel
Definition akCore.h:190
@ promptOkIconLeft
Definition akCore.h:196
@ promptYesNoIconLeft
Definition akCore.h:197
@ promptOkCancel
Definition akCore.h:191
textAlignment
Describes the text alignment.
Definition akCore.h:210
@ alignLeft
Definition akCore.h:211
@ alignCenter
Definition akCore.h:213
@ alignRight
Definition akCore.h:212
UICORE_API_EXPORT QCryptographicHash::Algorithm toQCryptographicHashAlgorithm(HashAlgorithm _algorhitm)
Will return the QCryptographicHash::Algorithm corresponding to the provided HashAlgorithm.
Definition akCore.cpp:146
UICORE_API_EXPORT Qt::AlignmentFlag toQtAlignmentFlag(textAlignment _textAlignment)
Will return the corresponding Qt text alignment.
Definition akCore.cpp:374
commandType
Describes the type of an command.
Definition akCore.h:66
@ ctClearCreatedObjects
Definition akCore.h:67
HashAlgorithm
Definition akCore.h:121
@ hashSha1
Definition akCore.h:132
@ hashSha_384
Definition akCore.h:135
@ hashRealSha3_224
Definition akCore.h:128
@ hashRealSha3_512
Definition akCore.h:131
@ hashRealSha3_256
Definition akCore.h:129
@ hashKeccak_224
Definition akCore.h:122
@ hashMd4
Definition akCore.h:126
@ hashSha3_256
Definition akCore.h:137
@ hashSha512
Definition akCore.h:140
@ hashSha3_224
Definition akCore.h:136
@ hashSha_256
Definition akCore.h:134
@ hashMd5
Definition akCore.h:127
@ hashKeccak_256
Definition akCore.h:123
@ hashKeccak_512
Definition akCore.h:125
@ hashKeccak_384
Definition akCore.h:124
@ hashRealSha3_384
Definition akCore.h:130
@ hashSha_224
Definition akCore.h:133
@ hashSha3_384
Definition akCore.h:138
@ hashSha3_512
Definition akCore.h:139
eventType
Describes the type of an event.
Definition akCore.h:86
@ etItemTextChanged
Definition akCore.h:103
@ etChanged
Definition akCore.h:89
@ etItemChanged
Definition akCore.h:102
@ etEditingFinished
Definition akCore.h:116
@ etDoubleClicked
Definition akCore.h:96
@ etTimeout
Definition akCore.h:111
@ etTabToolbarClicked
Definition akCore.h:110
@ etSelectionChanged
Definition akCore.h:107
@ etKeyPressed
Definition akCore.h:104
@ etKeyReleased
Definition akCore.h:105
@ etExpanded
Definition akCore.h:97
@ etCursorPosotionChanged
Definition akCore.h:94
@ etReturnPressed
Definition akCore.h:115
@ etCollpased
Definition akCore.h:93
@ etDestroyed
Definition akCore.h:95
@ etClicked
Definition akCore.h:91
@ etCleared
Definition akCore.h:90
@ etInvalidEntry
Definition akCore.h:100
@ etDeleted
Definition akCore.h:117
@ etFocused
Definition akCore.h:98
@ etFocusLeft
Definition akCore.h:99
@ etLocationChanged
Definition akCore.h:106
@ etToggeledChecked
Definition akCore.h:112
@ etVisibilityChanged
Definition akCore.h:114
@ etIndexChanged
Definition akCore.h:101
@ etStateChanged
Definition akCore.h:108
@ etToggeledUnchecked
Definition akCore.h:113
@ etTabToolbarChanged
Definition akCore.h:109
@ etUnknownEvent
Definition akCore.h:87
@ etActivated
Definition akCore.h:88
@ etClosing
Definition akCore.h:92
bool flagIsSet(colorAreaFlag _flags, colorAreaFlag _testFlag)
Definition akCore.h:254
UICORE_API_EXPORT QString hashString(const QString &_str, HashAlgorithm _algorhitm)
Will return a hashed string that was hashed by the specified algorhitm.
Definition akCore.cpp:174
dockLocation
Describes the dock location of a dock widget.
Definition akCore.h:79
@ dockRight
Definition akCore.h:81
@ dockBottom
Definition akCore.h:82
@ dockLeft
Definition akCore.h:80
UICORE_API_EXPORT bool isDecimal(const char *str)
Returns true if the provided C-String is in a format ready to be converted to a double or float.
Definition akCore.cpp:87
UICORE_API_EXPORT timeFormat toTimeFormat(const QString &_str)
Will return the time format that the provided string is representing.
Definition akCore.cpp:397
keyType
Definition akCore.h:143
@ keyF2
Definition akCore.h:154
@ keyF12
Definition akCore.h:153
@ keyF7
Definition akCore.h:159
@ keyEscape
Definition akCore.h:149
@ keyF10
Definition akCore.h:151
@ keyAlt
Definition akCore.h:145
@ keyF5
Definition akCore.h:157
@ keyF1
Definition akCore.h:150
@ keyF11
Definition akCore.h:152
@ keyF9
Definition akCore.h:161
@ keyF4
Definition akCore.h:156
@ keyAltGr
Definition akCore.h:146
@ keyReturn
Definition akCore.h:162
@ keyControl
Definition akCore.h:147
@ keySpace
Definition akCore.h:163
@ keyF8
Definition akCore.h:160
@ keyF6
Definition akCore.h:158
@ keyUnknown
Definition akCore.h:144
@ keyF3
Definition akCore.h:155
@ keyDelete
Definition akCore.h:148
dateFormat
Describes the date format.
Definition akCore.h:71
@ dfDDMMYYYY
Definition akCore.h:72
@ dfYYYYDDMM
Definition akCore.h:75
@ dfYYYYMMDD
Definition akCore.h:74
@ dfMMDDYYYY
Definition akCore.h:73