Add QR code scanner

This commit is contained in:
Tobias Fella
2023-12-16 16:46:30 +01:00
parent fbb4b962fa
commit c3fd2428a2
12 changed files with 319 additions and 41 deletions

View File

@@ -4,8 +4,37 @@
#include <QColor>
#include <QGuiApplication>
#include <QPalette>
#include <QQmlEngine>
#include <QRegularExpression>
#include <Quotient/connection.h>
#include <Quotient/user.h>
class QmlUtils : public QObject
{
Q_OBJECT
QML_ELEMENT
QML_SINGLETON
public:
static QmlUtils *create(QQmlEngine *, QJSEngine *)
{
QQmlEngine::setObjectOwnership(&instance(), QQmlEngine::CppOwnership);
return &instance();
}
static QmlUtils &instance()
{
static QmlUtils _instance;
return _instance;
}
Q_INVOKABLE QVariantMap getUser(Quotient::User *user) const;
private:
QmlUtils() = default;
};
namespace Utils
{