This commit is contained in:
2026-02-23 22:34:50 +00:00
commit 603d5b51bd
19 changed files with 1381 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
#include "timebridge.h"
#include <QLocale>
#include <QTime>
QString TimeBridge::currentTimeString(bool includeSeconds) const {
const auto format =
includeSeconds ? QLocale::LongFormat : QLocale::ShortFormat;
return QLocale().toString(QTime::currentTime(), format);
}
+16
View File
@@ -0,0 +1,16 @@
#pragma once
#include <qqmlintegration.h>
#include <QObject>
#include <QString>
class TimeBridge : public QObject {
Q_OBJECT
QML_ELEMENT
public:
using QObject::QObject;
Q_INVOKABLE QString currentTimeString(bool includeSeconds) const;
};