File indexing completed on 2024-05-12 04:01:32
0001 /* 0002 SPDX-FileCopyrightText: 2021 Volker Krause <vkrause@kde.org> 0003 SPDX-License-Identifier: MIT 0004 */ 0005 0006 #ifndef PRISON_ZXINGUTILS_P_H 0007 #define PRISON_ZXINGUTILS_P_H 0008 0009 #include <string> 0010 0011 namespace ZXing 0012 { 0013 class BitMatrix; 0014 } 0015 0016 class QColor; 0017 class QImage; 0018 class QVariant; 0019 0020 namespace Prison 0021 { 0022 /** Utilities for interfacing with ZXing. */ 0023 namespace ZXingUtil 0024 { 0025 /** Convert barcode content (string or byte array) to the input 0026 * format expected by ZXing. 0027 */ 0028 std::wstring toStdWString(const QVariant &data); 0029 0030 /** Convert the bitmatrix output of ZXing to a QImage. */ 0031 QImage toImage(const ZXing::BitMatrix &matrix, const QColor &foreground, const QColor &background); 0032 } 0033 0034 } 0035 0036 #endif