diff --git a/3rdparty/necrolog b/3rdparty/necrolog index 10bd56c1c..8ebfada0f 160000 --- a/3rdparty/necrolog +++ b/3rdparty/necrolog @@ -1 +1 @@ -Subproject commit 10bd56c1cc713dc0d04add01d0f67ac05c0283a1 +Subproject commit 8ebfada0f8d545baf37958df31d61c281e17f3bc diff --git a/libquickevent/libquickeventcore/src/og/timems.cpp b/libquickevent/libquickeventcore/src/og/timems.cpp index 38812d016..dfa475521 100644 --- a/libquickevent/libquickeventcore/src/og/timems.cpp +++ b/libquickevent/libquickeventcore/src/og/timems.cpp @@ -8,6 +8,8 @@ namespace quickevent { namespace core { namespace og { +//bool TimeMs::m_oneTenthSecPrecision = false; + TimeMs::TimeMs() : m_msec(0), m_isValid(false) { diff --git a/libquickevent/libquickeventcore/src/og/timems.h b/libquickevent/libquickeventcore/src/og/timems.h index bb1b8730b..be673644c 100644 --- a/libquickevent/libquickeventcore/src/og/timems.h +++ b/libquickevent/libquickeventcore/src/og/timems.h @@ -26,7 +26,7 @@ class QUICKEVENTCORE_DECL_EXPORT TimeMs TimeMs(); TimeMs(int msec); -public: + bool isValid() const {return m_isValid;} bool operator==(const TimeMs &o) const { @@ -55,9 +55,13 @@ class QUICKEVENTCORE_DECL_EXPORT TimeMs static int msecIntervalAM(int from_time_msec, int to_time_msec); static void registerQVariantFunctions(); + + //static void setOneTenthSecPrecision(bool b) { m_oneTenthSecPrecision = b; } + //static bool isOneTenthSecPrecision() { return m_oneTenthSecPrecision; } private: int m_msec; bool m_isValid; + //static bool m_oneTenthSecPrecision; }; }}} diff --git a/quickevent/app/quickevent/plugins/Event/src/eventconfig.cpp b/quickevent/app/quickevent/plugins/Event/src/eventconfig.cpp index c396a8eb6..19d34de28 100644 --- a/quickevent/app/quickevent/plugins/Event/src/eventconfig.cpp +++ b/quickevent/app/quickevent/plugins/Event/src/eventconfig.cpp @@ -248,6 +248,11 @@ std::optional EventConfig::maximumCardCheckAdvanceSec() const return {}; } +bool EventConfig::isOneTenthSecResults() const +{ + return static_cast(value(QStringLiteral("oneTenthSecResults")).toInt()); +} + /* const QSet &EventConfig::knownKeys() { diff --git a/quickevent/app/quickevent/plugins/Event/src/eventconfig.h b/quickevent/app/quickevent/plugins/Event/src/eventconfig.h index d4a6e3809..51285e90e 100644 --- a/quickevent/app/quickevent/plugins/Event/src/eventconfig.h +++ b/quickevent/app/quickevent/plugins/Event/src/eventconfig.h @@ -51,6 +51,7 @@ class EventConfig : public QObject QDateTime eventDateTime() const; int dbVersion() const; std::optional maximumCardCheckAdvanceSec() const; + bool isOneTenthSecResults() const; private: void save_helper(QVariantMap &ret, const QString ¤t_path, const QVariant &val); QVariantMap setValue_helper(const QVariantMap &m, const QStringList &path, const QVariant &val); diff --git a/quickevent/app/quickevent/plugins/Event/src/eventdialogwidget.cpp b/quickevent/app/quickevent/plugins/Event/src/eventdialogwidget.cpp index c11c8eb2c..79972a25f 100644 --- a/quickevent/app/quickevent/plugins/Event/src/eventdialogwidget.cpp +++ b/quickevent/app/quickevent/plugins/Event/src/eventdialogwidget.cpp @@ -10,6 +10,8 @@ EventDialogWidget::EventDialogWidget(QWidget *parent) : setPersistentSettingsId("EventDialogWidget"); ui->setupUi(this); + ui->ed_oneTenthSecResults->setDisabled(true); + QRegularExpression rx("[a-z][a-z0-9_]*"); // PostgreSQL schema must start with small letter and it may contain small letters, digits and underscores only. QValidator *validator = new QRegularExpressionValidator(rx, this); ui->ed_eventId->setValidator(validator); @@ -63,6 +65,7 @@ void EventDialogWidget::loadParams(const QVariantMap ¶ms) ui->cbxDisciplineId->setCurrentIndex(0); ui->ed_importId->setText(params.value("importId").toString()); ui->ed_cardChecCheckTimeSec->setValue(params.value("cardChechCheckTimeSec").toInt()); + ui->ed_oneTenthSecResults->setCurrentIndex(params.value("oneTenthSecResults").toInt()); } QVariantMap EventDialogWidget::saveParams() @@ -82,5 +85,6 @@ QVariantMap EventDialogWidget::saveParams() ret["disciplineId"] = (ui->cbxDisciplineId->currentIndex() <= 0) ? 1 : ui->cbxDisciplineId->currentIndex() + 1; ret["importId"] = ui->ed_importId->text().toInt(); ret["cardChechCheckTimeSec"] = ui->ed_cardChecCheckTimeSec->value(); + ret["oneTenthSecResults"] = ui->ed_oneTenthSecResults->currentIndex(); return ret; } diff --git a/quickevent/app/quickevent/plugins/Event/src/eventdialogwidget.ui b/quickevent/app/quickevent/plugins/Event/src/eventdialogwidget.ui index a2836978a..e8d357dfc 100644 --- a/quickevent/app/quickevent/plugins/Event/src/eventdialogwidget.ui +++ b/quickevent/app/quickevent/plugins/Event/src/eventdialogwidget.ui @@ -316,6 +316,30 @@ + + + + 1/10 sec results + + + ed_handicapLength + + + + + + + + Disabled + + + + + Enabled + + + +