Add data models to setup timers

This commit is contained in:
elecpower
2021-03-14 23:35:52 +11:00
parent b4478ea48f
commit c40136d08a
12 changed files with 179 additions and 137 deletions
+6
View File
@@ -47,6 +47,11 @@ class FieldRange
QString unit;
};
constexpr unsigned int TIMESTR_MASK_HRSMINS { 1 << 1 };
constexpr unsigned int TIMESTR_MASK_ZEROHRS { 1 << 2 };
constexpr unsigned int TIMESTR_MASK_PADSIGN { 1 << 3 };
namespace DataHelpers
{
enum BoolFormat {
@@ -59,5 +64,6 @@ namespace DataHelpers
QString boolToString(const bool value, const BoolFormat format);
QString getElementName(const QString & prefix, const unsigned int index, const char * name = 0, const bool padding = false);
QString timeToString(const int value, const unsigned int mask);
}