#ifndef DLGQRCODEFORMAT_H #define DLGQRCODEFORMAT_H #include #include "ViewModels.h" namespace Ui { class DlgQrcodeFormat; } enum QRCodeType { QR_CODE_TYPE_DATA_MATRIX = 0, QR_CODE_TYPE_QRCODE = 1, }; enum QRCodeLevel { QR_CODE_LEVEL_L = 0, QR_CODE_LEVEL_M = 1, QR_CODE_LEVEL_H = 2, QR_CODE_LEVEL_Q = 3, }; enum QRCodeSize { QR_CODE_SIZE_DEFAULT, QR_CODE_SIZE_8X18, QR_CODE_SIZE_8X32, QR_CODE_SIZE_12X26, QR_CODE_SIZE_12X36, QR_CODE_SIZE_16X36, QR_CODE_SIZE_16X48, }; struct DlgQrcodeFormatVM { QRCodeType type = QR_CODE_TYPE_QRCODE; QRCodeLevel level = QR_CODE_LEVEL_L; QRCodeSize size = QR_CODE_SIZE_DEFAULT; InkType inkType = INK_TYPE_BLACK; }; Q_DECLARE_METATYPE(DlgQrcodeFormatVM); class DlgQrcodeFormat : public QDialog { Q_OBJECT public: explicit DlgQrcodeFormat(QWidget *parent = nullptr); ~DlgQrcodeFormat(); void setViewModel(DlgQrcodeFormatVM vm); DlgQrcodeFormatVM viewModel(); private: Ui::DlgQrcodeFormat *ui; DlgQrcodeFormatVM m_vm; }; #endif // DLGQRCODEFORMAT_H