11 #include <QModelIndex>
13 #define ASCII_NUL char(0)
14 #define ASCII_SOH char(1)
15 #define ASCII_STX char(2)
16 #define ASCII_ETX char(3)
17 #define ASCII_EOT char(4)
18 #define ASCII_ENQ char(5)
19 #define ASCII_ACK char(6)
20 #define ASCII_BEL char(7)
21 #define ASCII_BS char(8)
22 #define ASCII_HT char(9)
23 #define ASCII_LF char(10)
24 #define ASCII_VT char(11)
25 #define ASCII_FF char(12)
26 #define ASCII_CR char(13)
27 #define ASCII_SO char(14)
28 #define ASCII_SI char(15)
29 #define ASCII_DLE char(16)
30 #define ASCII_DC1 char(17)
31 #define ASCII_DC2 char(18)
32 #define ASCII_DC3 char(19)
33 #define ASCII_DC4 char(20)
34 #define ASCII_NAK char(21)
35 #define ASCII_SYN char(22)
36 #define ASCII_ETB char(23)
37 #define ASCII_CAN char(24)
38 #define ASCII_EM char(25)
39 #define ASCII_SUB char(26)
40 #define ASCII_ESC char(27)
41 #define ASCII_FS char(28)
42 #define ASCII_GS char(29)
43 #define ASCII_RS char(30)
44 #define ASCII_US char(31)
53 #define bps Bps::instance()
67 Bps& operator=(
const Bps& aBps);
158 AlignMiddleCenter = 4,
159 AlignMiddleRight = 5,
161 AlignBottomCenter = 7,
306 void mwait(
int aMilliseconds)
const;
401 double round(
double aValue,
int aDecPlaces = 3)
const;
423 inline bool isNaN(
double aValue)
const;
498 bool isEqual(
const QVariantMap& aFirst,
const QVariantMap& aSecond)
const;
702 static QModelIndexList
topIndexes(
const QModelIndexList& aIndexes);
854 inline bool Bps::isNaN(
double aValue)
const {
return aValue != aValue; }
Public include file for BPS CORE library macros.
#define BPSCORE_EXPORT
Declare class to be an import from the shared library.
Definition: bpscore_global.h:22
#define BPS_PRIVATE(Class)
Declare pointer to private object in a public class.
Definition: bpsglobals.h:102
BPS datastore class.
Definition: bpsdatastore.h:61
A class for decimal arithmetics.
Definition: bpsdecimal.h:87
Singleton Bps object as application global.
Definition: bps.h:59
bool isNaN(double aValue) const
Check if a double value is NaN.
QStringList alignmentTexts() const
QMap< QString, QString > lowerKeyStringMap(const QMap< QString, QString > &aStringMap)
Get a string map where all keys are lower case.
Rotation
Rotation in 90 degree steps.
Definition: bps.h:178
int decryptPin(int aUserid, int aPin) const
Decrypt a user PIN.
QStringList directionTexts() const
void emitMasterTableChanged(const QString &aTable)
Emit the signals masterTableChanged and tableChanged.
bool isEqual(const QVariant &aFirst, const QVariant &aSecond) const
Compare 2 QVariant for non-strict equality (so the QVariant type may differ).
QLocale locale() const
Get the locale to be used.
QMap< QString, QString > toStringMap(const QVariantMap &aVariantMap)
Convert a variant map to a string map.
VerticalAlignment
Vertical alignment.
Definition: bps.h:144
static QModelIndexList bottomIndexes(const QModelIndexList &aIndexes)
Reduces a list of tree indexes to the most bottom elements, by removing the indexes which are higher-...
double round(double aValue, int aDecPlaces=3) const
Round off as per standard commercial practice.
bool canEditInstallSettings()
Check if the the local installation settings are editable.
void tableChanged(const QString &aTable)
Emitted when emitTableChanged or emitMasterTableChanged is called by an application.
static bool treeModelIndexLessThan(const QModelIndex &aFirst, const QModelIndex &aSecond)
Compares two indexes of a tree model.
QString stripTimeFormat(const QString &aDateTimeFormat)
Strip the time format from a date/time format string, creating a date only format.
void emitTableChanged(const QString &aTable)
Emit the signal tableChanged.
Direction
Basic Compass Directions.
Definition: bps.h:168
QBrush invalidInputBackgroundBrush() const
HorizontalAlignment
Horizontal alignment.
Definition: bps.h:135
QDateTime makeDateTime(const QString &aDateTime)
Create QDateTime from a BPS date/time string.
bool isStrictlyEqual(const QVariant &aFirst, const QVariant &aSecond) const
Compare 2 QVariants for strict equality.
Alignment
General alignment.
Definition: bps.h:153
int indexOf(const QString &aCharList, const QVariant &aChar) const
Replacement for QString::indexOf to check for a single char position.
void setUserStatusPath(const QString &aPath)
Set a new user status path.
QVariant validatorValue(BpsDatastore *aDatastore, const QString &aTable, const QString &aKey, const QVariant &aDefValue=QVariant())
Reads a validator setting from the central system settings in Validators/table/key.
QMap< QString, QString > lowerKeyStringMap(const QVariantMap &aVariantMap)
Get a string map where all keys are lower case.
void wait(int aSeconds) const
Wait for a number of seconds.
void masterTableChanged(const QString &aTable)
Emitted when emitMasterTableChanged is called by an application.
void clearCache()
Clears all cached values from the object.
Access
Simple access control.
Definition: bps.h:126
NumStatus numStatus(const BpsDecimal &aValue) const
Returns the numeric status of a BpsDecimal value.
void sleep(int aSeconds) const
Sleep for a number of seconds.
bool isElevated()
Check if the current process is running with elevated or limited privilege.
ItemDataRole
Item data roles.
Definition: bps.h:102
int encryptPin(int aUserid, int aPin) const
Encrypt a user PIN.
QString directory(const QString &aName=QString()) const
Get a BPS application directory.
QString userStatusPath() const
The user status path is convenient to store local user settings additionally separated by database us...
QStringList accessTexts() const
bool isInfinite(double aValue) const
Check if a double value is infinite.
NumStatus numStatus(double aValue) const
Returns the numeric status of a double value.
static QModelIndexList topIndexes(const QModelIndexList &aIndexes)
Reduces a list of tree indexes to the topmost elements, by removing the indexes which are descendants...
bool printData(const QString &aPrinterName, const QString &aDocName, const QByteArray &aData) const
Send data to a printer.
static bool treeModelIndexGreaterThan(const QModelIndex &aFirst, const QModelIndex &aSecond)
Compares two indexes of a tree model.
QString trimMultilineText(BpsDatastore *aDatastore, const QString &aTable, const QString &aColumn, const QString &aText)
Apply a validators multi line text constraints (maxlines and maxperline) to a text and return the tri...
QVariantMap toVariantMap(const QMap< QString, QString > &aStringMap)
Convert a string map to a variant map.
QString computerName() const
Get the computer name.
QString personalFolder() const
Get the personal data folder.
void mwait(int aMilliseconds) const
Wait for a number of milliseconds.
Barcode
Type of the bar code construction element.
Definition: bps.h:219
Status
General purpose return status.
Definition: bps.h:80
bool printFile(const QString &aPrinterName, const QString &aDocName, const QString &aFileName) const
Send a file to a printer.
QString toString(const QVariant &aValue, int aDecPlaces=-3, int aMaxSize=17) const
Get string representation of a QVariant.
QString userName() const
Get the system user name.
static int modelIndexLevel(const QModelIndex &aIndex)
Find the level of a tree model index.
void usleep(int aMicroseconds) const
Sleep for a number of microseconds.
int indexOf(const QString &aCharList, const QString &aChar) const
Replacement for QString::indexOf to check for a single char position.
void msleep(int aMilliseconds) const
Sleep for a number of milliseconds.
QStringList eccLevelTexts() const
QString loadStyleSheet(const QString &aFilename) const
Load a style sheet with the given file name.
NumStatus
Numeric status.
Definition: bps.h:92
@ NumNegInfinite
Negative infinite.
Definition: bps.h:95
@ NumFinite
Finite.
Definition: bps.h:93
@ NumPosInfinite
Positive infinite.
Definition: bps.h:94
QStringList barcodeTexts() const
QString terminalName() const
Get the terminal name.
int screenResolution() const
QString createTempFile(const QString &aTemplate=QString()) const
Creates a temporary file and returns the complete file name.
QString printerShareName(const QString &aPrinterName) const
Get the share name of a printer if it is a network printer.
EccLevel
Error correction code level.
Definition: bps.h:200
QString nodeName() const
Get the node name.
bool isEqual(const QVariantMap &aFirst, const QVariantMap &aSecond) const
Compare a pair of QVariantMap for non-strict equality.