QR codes rework
This commit is contained in:
parent
b341224c92
commit
1d51419a11
26 changed files with 595 additions and 2052 deletions
30
client/ui/pages_logic/QrDecoderLogic.h
Normal file
30
client/ui/pages_logic/QrDecoderLogic.h
Normal file
|
@ -0,0 +1,30 @@
|
|||
#ifndef QR_DECODER_LOGIC_H
|
||||
#define QR_DECODER_LOGIC_H
|
||||
|
||||
#include "PageLogicBase.h"
|
||||
|
||||
class UiLogic;
|
||||
|
||||
class QrDecoderLogic : public PageLogicBase
|
||||
{
|
||||
Q_OBJECT
|
||||
AUTO_PROPERTY(bool, detectingEnabled)
|
||||
AUTO_PROPERTY(int, totalChunksCount)
|
||||
AUTO_PROPERTY(int, receivedChunksCount)
|
||||
|
||||
public:
|
||||
Q_INVOKABLE void onUpdatePage() override;
|
||||
Q_INVOKABLE void onDetectedQrCode(const QString &code);
|
||||
|
||||
public:
|
||||
explicit QrDecoderLogic(UiLogic *uiLogic, QObject *parent = nullptr);
|
||||
~QrDecoderLogic() = default;
|
||||
|
||||
signals:
|
||||
void startDecode();
|
||||
void stopDecode();
|
||||
|
||||
private:
|
||||
QMap<int, QByteArray> m_chunks;
|
||||
};
|
||||
#endif // QR_DECODER_LOGIC_H
|
Loading…
Add table
Add a link
Reference in a new issue