mirror of
https://github.com/binary-kitchen/doorlockd
synced 2024-12-22 10:24:26 +01:00
Some improvements
This commit is contained in:
parent
60ed23486b
commit
b1ea4426a9
@ -39,7 +39,18 @@ std::unique_ptr<MainWindow> mainWindow = nullptr;
|
||||
|
||||
static void onDoorlockUpdate(const Clientmessage &msg)
|
||||
{
|
||||
l("Updated to current token: " + msg.token(), LogLevel::info);
|
||||
const auto& doormessage = msg.doormessage();
|
||||
l("Received message", LogLevel::info);
|
||||
l((std::string)" token" + msg.token(),
|
||||
LogLevel::info);
|
||||
l((std::string)" open: " + std::to_string(doormessage.isOpen),
|
||||
LogLevel::info);
|
||||
l((std::string)" button lock: " + std::to_string(doormessage.isLockButton),
|
||||
LogLevel::info);
|
||||
l((std::string)" button unlock: " + std::to_string(doormessage.isUnlockButton),
|
||||
LogLevel::info);
|
||||
l((std::string)" emergency open: " + std::to_string(doormessage.isEmergencyUnlock),
|
||||
LogLevel::info);
|
||||
if (mainWindow) {
|
||||
mainWindow->setQRCode(msg.token());
|
||||
}
|
||||
|
@ -2,9 +2,9 @@
|
||||
#define MAINWINDOW_H
|
||||
|
||||
#include <QApplication>
|
||||
#include <QHBoxLayout>
|
||||
#include <QMainWindow>
|
||||
#include <QStatusBar>
|
||||
#include <QHBoxLayout>
|
||||
|
||||
#include "qrwidget.h"
|
||||
|
||||
@ -14,12 +14,9 @@ public:
|
||||
MainWindow() :
|
||||
QMainWindow()
|
||||
{
|
||||
layout = new QHBoxLayout;
|
||||
|
||||
_qrWidget = new QRWidget;
|
||||
|
||||
statusBar()->showMessage(tr("Boofar"));
|
||||
|
||||
QHBoxLayout *layout = new QHBoxLayout;
|
||||
|
||||
layout->addWidget(_qrWidget);
|
||||
|
||||
QWidget* window = new QWidget;
|
||||
@ -38,6 +35,7 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
QHBoxLayout* layout = { nullptr };
|
||||
QRWidget* _qrWidget = { nullptr };
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user