mirror of
https://github.com/wownero/wowlet.git
synced 2026-11-26 18:14:32 +01:00
refactor: merge qrcode directories
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
// SPDX-FileCopyrightText: 2020-2023 The Monero Project
|
||||
|
||||
#ifndef FEATHER_QRCODESCANDIALOG_H
|
||||
#define FEATHER_QRCODESCANDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QCamera>
|
||||
#include <QCameraImageCapture>
|
||||
#include <QTimer>
|
||||
#include <QVideoFrame>
|
||||
|
||||
#include "QrScanThread.h"
|
||||
|
||||
namespace Ui {
|
||||
class QrCodeScanDialog;
|
||||
}
|
||||
|
||||
class QrCodeScanDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit QrCodeScanDialog(QWidget *parent);
|
||||
~QrCodeScanDialog() override;
|
||||
|
||||
QString decodedString = "";
|
||||
|
||||
private slots:
|
||||
void onCameraSwitched(int index);
|
||||
void onDecoded(int type, const QString &data);
|
||||
void notifyError(const QString &msg);
|
||||
|
||||
private:
|
||||
void processAvailableImage(int id, const QVideoFrame &frame);
|
||||
void displayCaptureError(int, QCameraImageCapture::Error, const QString &errorString);
|
||||
void displayCameraError();
|
||||
void takeImage();
|
||||
|
||||
QScopedPointer<Ui::QrCodeScanDialog> ui;
|
||||
|
||||
QScopedPointer<QCamera> m_camera;
|
||||
QScopedPointer<QCameraImageCapture> m_imageCapture;
|
||||
|
||||
QrScanThread *m_thread;
|
||||
QTimer m_imageTimer;
|
||||
QList<QCameraInfo> m_cameras;
|
||||
};
|
||||
|
||||
#endif //FEATHER_QRCODESCANDIALOG_H
|
||||
Reference in New Issue
Block a user