mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
Restore backend_qt - static only now; qzint: legacy support for renamed methods
This commit is contained in:
@ -1,18 +1,19 @@
|
||||
# (c) 2008 by BogDan Vatra < bogdan@licentia.eu >
|
||||
# Copyright (C) 2008 by BogDan Vatra < bogdan@licentia.eu >
|
||||
# Copyright (C) 2009-2021 Robin Stuart <rstuart114@gmail.com>
|
||||
# vim: set ts=4 sw=4 et :
|
||||
|
||||
project(zint-qt)
|
||||
|
||||
include_directories(BEFORE "${CMAKE_SOURCE_DIR}/backend")
|
||||
include_directories(BEFORE "${CMAKE_SOURCE_DIR}/backend" "${CMAKE_SOURCE_DIR}/backend_qt")
|
||||
|
||||
set(zint-qt_SRCS barcodeitem.cpp main.cpp mainwindow.cpp datawindow.cpp sequencewindow.cpp exportwindow.cpp qzint.cpp)
|
||||
set(zint-qt_SRCS barcodeitem.cpp main.cpp mainwindow.cpp datawindow.cpp sequencewindow.cpp exportwindow.cpp)
|
||||
|
||||
if(USE_QT6)
|
||||
qt6_wrap_cpp(zint-qt_SRCS mainwindow.h datawindow.h sequencewindow.h exportwindow.h qzint.h)
|
||||
qt6_wrap_cpp(zint-qt_SRCS mainwindow.h datawindow.h sequencewindow.h exportwindow.h)
|
||||
qt6_wrap_ui(zint-qt_SRCS mainWindow.ui extData.ui extSequence.ui extExport.ui)
|
||||
qt6_add_resources(zint-qt_SRCS resources.qrc)
|
||||
else()
|
||||
qt5_wrap_cpp(zint-qt_SRCS mainwindow.h datawindow.h sequencewindow.h exportwindow.h qzint.h)
|
||||
qt5_wrap_cpp(zint-qt_SRCS mainwindow.h datawindow.h sequencewindow.h exportwindow.h)
|
||||
qt5_wrap_ui(zint-qt_SRCS mainWindow.ui extData.ui extSequence.ui extExport.ui)
|
||||
qt5_add_resources(zint-qt_SRCS resources.qrc)
|
||||
endif()
|
||||
@ -23,14 +24,14 @@ endif()
|
||||
# grpC25.ui grpCodablockF.ui grpDotCode.ui grpMicroPDF.ui grpRMQR.ui
|
||||
|
||||
add_executable(zint-qt ${zint-qt_SRCS})
|
||||
add_dependencies(zint-qt zint)
|
||||
add_dependencies(zint-qt zint QZint)
|
||||
|
||||
link_directories( "${CMAKE_BINARY_DIR}/backend" )
|
||||
link_directories("${CMAKE_BINARY_DIR}/backend" "${CMAKE_BINARY_DIR}/backend_qt")
|
||||
|
||||
if(USE_QT6)
|
||||
target_link_libraries(zint-qt zint Qt6::UiTools Qt6::Xml Qt6::Gui Qt6::Core)
|
||||
target_link_libraries(zint-qt zint QZint Qt6::UiTools Qt6::Xml Qt6::Gui Qt6::Core)
|
||||
else()
|
||||
target_link_libraries(zint-qt zint Qt5::UiTools Qt5::Xml Qt5::Gui Qt5::Core)
|
||||
target_link_libraries(zint-qt zint QZint Qt5::UiTools Qt5::Xml Qt5::Gui Qt5::Core)
|
||||
endif()
|
||||
|
||||
install(TARGETS zint-qt DESTINATION "${BIN_INSTALL_DIR}" RUNTIME)
|
||||
|
@ -13,16 +13,17 @@
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
/* vim: set ts=4 sw=4 et : */
|
||||
|
||||
#include <QDebug>
|
||||
#include "barcodeitem.h"
|
||||
|
||||
BarcodeItem::BarcodeItem()
|
||||
: QGraphicsItem()
|
||||
: QGraphicsItem()
|
||||
{
|
||||
w=693;
|
||||
h=378; // Default widget size when created
|
||||
ar = Zint::QZint::AspectRatioMode::IgnoreAspectRatio;
|
||||
w = 693;
|
||||
h = 378; // Default widget size when created
|
||||
ar = Zint::QZint::AspectRatioMode::IgnoreAspectRatio;
|
||||
}
|
||||
|
||||
BarcodeItem::~BarcodeItem()
|
||||
@ -36,12 +37,12 @@ void BarcodeItem::setSize(int width, int height) {
|
||||
|
||||
QRectF BarcodeItem::boundingRect() const
|
||||
{
|
||||
return QRectF(0, 0, w, h);
|
||||
return QRectF(0, 0, w, h);
|
||||
}
|
||||
|
||||
void BarcodeItem::paint(QPainter * painter, const QStyleOptionGraphicsItem * /*option*/, QWidget * /*widget*/)
|
||||
void BarcodeItem::paint(QPainter *painter, const QStyleOptionGraphicsItem * /*option*/, QWidget * /*widget*/)
|
||||
{
|
||||
bc.render(*painter,boundingRect(),ar);
|
||||
bc.render(*painter, boundingRect(), ar);
|
||||
}
|
||||
|
||||
|
||||
|
@ -13,12 +13,13 @@
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
/* vim: set ts=4 sw=4 et : */
|
||||
|
||||
#ifndef BARCODEITEM_H
|
||||
#define BARCODEITEM_H
|
||||
|
||||
#include <QGraphicsItem>
|
||||
#include "qzint.h"
|
||||
#include <qzint.h>
|
||||
|
||||
/**
|
||||
@author BogDan Vatra <taipan@licentia.eu>
|
||||
@ -27,18 +28,18 @@
|
||||
class BarcodeItem : public QGraphicsItem
|
||||
{
|
||||
public:
|
||||
BarcodeItem();
|
||||
~BarcodeItem();
|
||||
void setSize(int width, int height);
|
||||
QRectF boundingRect() const;
|
||||
void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = 0);
|
||||
BarcodeItem();
|
||||
~BarcodeItem();
|
||||
void setSize(int width, int height);
|
||||
QRectF boundingRect() const;
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
|
||||
|
||||
private:
|
||||
int w, h;
|
||||
int w, h;
|
||||
|
||||
public:
|
||||
mutable Zint::QZint bc;
|
||||
Zint::QZint::AspectRatioMode ar;
|
||||
mutable Zint::QZint bc;
|
||||
Zint::QZint::AspectRatioMode ar;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -3,6 +3,7 @@ TARGET = qtZint
|
||||
DEPENDPATH += . debug release
|
||||
INCLUDEPATH += .
|
||||
INCLUDEPATH += ../backend
|
||||
INCLUDEPATH += ../backend_qt
|
||||
!contains(DEFINES, NO_PNG) {
|
||||
INCLUDEPATH += ../../lpng
|
||||
INCLUDEPATH += ../../zlib
|
||||
@ -17,46 +18,7 @@ HEADERS += barcodeitem.h \
|
||||
datawindow.h \
|
||||
exportwindow.h \
|
||||
mainwindow.h \
|
||||
sequencewindow.h \
|
||||
qzint.h \
|
||||
..\backend\aztec.h \
|
||||
..\backend\big5.h \
|
||||
..\backend\bmp.h \
|
||||
..\backend\channel_precalcs.h \
|
||||
..\backend\code1.h \
|
||||
..\backend\code128.h \
|
||||
..\backend\code49.h \
|
||||
..\backend\common.h \
|
||||
..\backend\composite.h \
|
||||
..\backend\dmatrix.h \
|
||||
..\backend\eci.h \
|
||||
..\backend\eci_sb.h \
|
||||
..\backend\emf.h \
|
||||
..\backend\font.h \
|
||||
..\backend\gb18030.h \
|
||||
..\backend\gb2312.h \
|
||||
..\backend\general_field.h \
|
||||
..\backend\gridmtx.h \
|
||||
..\backend\gs1.h \
|
||||
..\backend\hanxin.h \
|
||||
..\backend\ksx1001.h \
|
||||
..\backend\large.h \
|
||||
..\backend\maxicode.h \
|
||||
..\backend\ms_stdint.h \
|
||||
..\backend\output.h \
|
||||
..\backend\pcx.h \
|
||||
..\backend\pdf417.h \
|
||||
..\backend\qr.h \
|
||||
..\backend\reedsol.h \
|
||||
..\backend\reedsol_logs.h \
|
||||
..\backend\rss.h \
|
||||
..\backend\sjis.h \
|
||||
..\backend\stdint_msvc.h \
|
||||
..\backend\tif.h \
|
||||
..\backend\tif_lzw.h \
|
||||
..\backend\zfiletypes.h \
|
||||
..\backend\zint.h \
|
||||
..\backend\zintconfig.h \
|
||||
sequencewindow.h
|
||||
|
||||
FORMS += extData.ui \
|
||||
extExport.ui \
|
||||
@ -70,8 +32,8 @@ FORMS += extData.ui \
|
||||
grpC49.ui \
|
||||
grpChannel.ui \
|
||||
grpCodabar.ui \
|
||||
grpCodeOne.ui \
|
||||
grpCodablockF.ui \
|
||||
grpCodeOne.ui \
|
||||
grpDAFT.ui \
|
||||
grpDBExtend.ui \
|
||||
grpDM.ui \
|
||||
@ -86,6 +48,7 @@ FORMS += extData.ui \
|
||||
grpPDF417.ui \
|
||||
grpQR.ui \
|
||||
grpRMQR.ui \
|
||||
grpUltra.ui \
|
||||
grpUPCA.ui \
|
||||
grpUPCEAN.ui \
|
||||
grpVIN.ui \
|
||||
@ -96,56 +59,7 @@ SOURCES += barcodeitem.cpp \
|
||||
exportwindow.cpp \
|
||||
main.cpp \
|
||||
mainwindow.cpp \
|
||||
sequencewindow.cpp \
|
||||
qzint.cpp \
|
||||
..\backend\2of5.c \
|
||||
..\backend\auspost.c \
|
||||
..\backend\aztec.c \
|
||||
..\backend\bmp.c \
|
||||
..\backend\codablock.c \
|
||||
..\backend\code.c \
|
||||
..\backend\code1.c \
|
||||
..\backend\code128.c \
|
||||
..\backend\code16k.c \
|
||||
..\backend\code49.c \
|
||||
..\backend\common.c \
|
||||
..\backend\composite.c \
|
||||
..\backend\dllversion.c \
|
||||
..\backend\dmatrix.c \
|
||||
..\backend\dotcode.c \
|
||||
..\backend\eci.c \
|
||||
..\backend\emf.c \
|
||||
..\backend\gb18030.c \
|
||||
..\backend\gb2312.c \
|
||||
..\backend\general_field.c \
|
||||
..\backend\gif.c \
|
||||
..\backend\gridmtx.c \
|
||||
..\backend\gs1.c \
|
||||
..\backend\hanxin.c \
|
||||
..\backend\imail.c \
|
||||
..\backend\large.c \
|
||||
..\backend\library.c \
|
||||
..\backend\mailmark.c \
|
||||
..\backend\maxicode.c \
|
||||
..\backend\medical.c \
|
||||
..\backend\output.c \
|
||||
..\backend\pcx.c \
|
||||
..\backend\pdf417.c \
|
||||
..\backend\plessey.c \
|
||||
..\backend\png.c \
|
||||
..\backend\postal.c \
|
||||
..\backend\ps.c \
|
||||
..\backend\qr.c \
|
||||
..\backend\raster.c \
|
||||
..\backend\reedsol.c \
|
||||
..\backend\rss.c \
|
||||
..\backend\sjis.c \
|
||||
..\backend\svg.c \
|
||||
..\backend\telepen.c \
|
||||
..\backend\tif.c \
|
||||
..\backend\ultra.c \
|
||||
..\backend\upcean.c \
|
||||
..\backend\vector.c
|
||||
sequencewindow.cpp
|
||||
|
||||
TRANSLATIONS = frontend_de.ts
|
||||
|
||||
@ -158,10 +72,10 @@ CONFIG += static
|
||||
|
||||
CONFIG += warn_on thread qt
|
||||
|
||||
INCLUDEPATH += ../backend
|
||||
|
||||
LIBS += -lQtZint
|
||||
QMAKE_LIBDIR += ../backend_qt/release
|
||||
LIBS += -lQt5Core
|
||||
QMAKE_LIBDIR += C:/qt/5.15.1static/lib
|
||||
QMAKE_LIBDIR += C:/qt/5.15.2static/lib
|
||||
|
||||
!contains(DEFINES, NO_PNG) {
|
||||
# Win
|
||||
|
@ -8,8 +8,7 @@ HEADERS += barcodeitem.h \
|
||||
datawindow.h \
|
||||
exportwindow.h \
|
||||
mainwindow.h \
|
||||
sequencewindow.h \
|
||||
qzint.h
|
||||
sequencewindow.h
|
||||
|
||||
FORMS += extData.ui \
|
||||
extExport.ui \
|
||||
@ -39,6 +38,7 @@ FORMS += extData.ui \
|
||||
grpPDF417.ui \
|
||||
grpQR.ui \
|
||||
grpRMQR.ui \
|
||||
grpUltra.ui \
|
||||
grpUPCA.ui \
|
||||
grpUPCEAN.ui \
|
||||
grpVIN.ui \
|
||||
@ -49,14 +49,14 @@ SOURCES += barcodeitem.cpp \
|
||||
exportwindow.cpp \
|
||||
main.cpp \
|
||||
mainwindow.cpp \
|
||||
sequencewindow.cpp \
|
||||
qzint.cpp
|
||||
|
||||
sequencewindow.cpp
|
||||
|
||||
RESOURCES += resources.qrc
|
||||
|
||||
RC_FILE += res/qtZint.rc
|
||||
|
||||
INCLUDEPATH += ../backend
|
||||
INCLUDEPATH += ../backend_qt ../backend
|
||||
|
||||
LIBS += -lzint
|
||||
LIBS += -lQtZintDLL -lzint
|
||||
QMAKE_LIBDIR += ../backend_qt/release
|
||||
QMAKE_LIBDIR += ../win32/Release
|
||||
|
@ -1,23 +1,24 @@
|
||||
Harald Oehlmann
|
||||
2020-01-05
|
||||
2021-06-24
|
||||
|
||||
How to build qzint.exe using:
|
||||
- QT 5.15.0 source package
|
||||
- MS Visual Studio 2015 (VC12)
|
||||
- QT 5.15.2 source package
|
||||
- MS Visual Studio 2015 (VC14)
|
||||
|
||||
Build static Qt:
|
||||
---------------
|
||||
- Go to: https://www.qt.io/offline-installers
|
||||
- Download the zip "Qt 5.15.x source packages" (nearly 1 GB):
|
||||
http://download.qt.io/official_releases/qt/5.15/5.15.0/single/qt-everywhere-src-5.15.0.zip
|
||||
- Unzip to C:\qt resulting in having the source in c:\qt\qt-everywhere-src-5.15.0
|
||||
- Install Python (ActivePython-3.7.4.0000-win64-x64-e0b99d60.msi) and make it available within the path.
|
||||
http://download.qt.io/official_releases/qt/5.15/5.15.2/single/qt-everywhere-src-5.15.2.zip
|
||||
- Unzip to C:\qt resulting in having the source in c:\qt\qt-everywhere-src-5.15.2
|
||||
- Install Python (https://www.python.org/downloads/windows/) and make it available within the path.
|
||||
|
||||
- Start the VS2015 x86 native console by the start menu entry:
|
||||
Visual Studio 2015\Visual Studio Tools\Windows Desktop Command Prompts\VS2015 x86 Native Tools-Eingabeaufforderung
|
||||
("Eingabeaufforderung" = "Command Prompt")
|
||||
|
||||
- cd C:\qt\qt-everywhere-src-5.15.0
|
||||
- configure.bat -static -release -prefix c:\qt\5.15.0static -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -no-openssl -opensource -confirm-license -make libs -nomake tools -nomake examples -nomake tests -mp
|
||||
- cd C:\qt\qt-everywhere-src-5.15.2
|
||||
- configure.bat -static -release -prefix c:\qt\5.15.2static -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -no-openssl -opensource -confirm-license -make libs -nomake tools -nomake examples -nomake tests -mp
|
||||
One may set another destination folder after the -prefix option.
|
||||
Attention, the upper command is one long line.
|
||||
- nmake
|
||||
@ -45,22 +46,31 @@ Build targets "Release Library" for zlib and libpng.
|
||||
Build zint:
|
||||
-----------
|
||||
- Start in the start menu: "VS2015 x86 Native Tools-Eingabeaufforderung"
|
||||
- set QTDIR=C:\Qt\5.15.0static
|
||||
- set PATH=C:\Qt\5.15.0static\bin;%PATH%
|
||||
- set QTDIR=C:\Qt\5.15.2static
|
||||
- set PATH=C:\Qt\5.15.2static\bin;%PATH%
|
||||
- set QMAKESPEC=win32-msvc
|
||||
- cd $ZH
|
||||
- cd frontend_qt
|
||||
|
||||
Note: if "rc.exe" not available, install a Windows Kit and update PATH (e.g.):
|
||||
- set "PATH=C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x86;%PATH%"
|
||||
|
||||
- cd backend_qt
|
||||
- qmake backend_qt.pro
|
||||
- nmake clean
|
||||
- nmake release
|
||||
|
||||
- cd ..\frontend_qt
|
||||
- qmake frontend_qt.pro
|
||||
- nmake clean
|
||||
- nmake release
|
||||
-> qzint.exe is in the release folder
|
||||
-> qtZint.exe is in the release folder
|
||||
|
||||
Note:
|
||||
For me, qt5core.lib was not found in the last step.
|
||||
I only found the solution to add:
|
||||
|
||||
QMAKE_LIBDIR += C:/qt/5.15.0static/lib
|
||||
QMAKE_LIBDIR += C:/qt/5.15.2static/lib
|
||||
|
||||
into frontend_qt.pro
|
||||
|
||||
There is for sure a better solution.
|
||||
There is for sure a better solution.
|
||||
|
@ -1,598 +0,0 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2008 by BogDan Vatra *
|
||||
* bogdan@licentia.eu *
|
||||
* Copyright (C) 2010-2021 Robin Stuart *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
/* vim: set ts=4 sw=4 et : */
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#if _MSC_VER >= 1900 /* MSVC 2015 */
|
||||
#pragma warning(disable: 4996) /* function or variable may be unsafe */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//#include <QDebug>
|
||||
#include "qzint.h"
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include <QFontMetrics>
|
||||
/* the following include was necessary to compile with QT 5.18 on Windows */
|
||||
/* QT 8.7 did not require it. */
|
||||
#include <QPainterPath>
|
||||
|
||||
namespace Zint {
|
||||
static const char *fontStyle = "Helvetica";
|
||||
static const char *fontStyleError = "Helvetica";
|
||||
static const int fontSizeError = 14; /* Point size */
|
||||
|
||||
QZint::QZint() {
|
||||
m_symbol = BARCODE_CODE128;
|
||||
m_height = 0.0f;
|
||||
m_borderType = 0;
|
||||
m_borderWidth = 0;
|
||||
m_fontSetting = 0;
|
||||
m_option_1 = -1;
|
||||
m_fgColor = Qt::black;
|
||||
m_bgColor = Qt::white;
|
||||
m_cmyk = false;
|
||||
m_zintSymbol = NULL;
|
||||
m_error = 0;
|
||||
m_input_mode = UNICODE_MODE;
|
||||
m_scale = 1.0f;
|
||||
m_option_3 = 0;
|
||||
m_show_hrt = 1;
|
||||
m_eci = 0;
|
||||
m_dotty = false;
|
||||
m_dot_size = 4.0f / 5.0f;
|
||||
target_size_horiz = 0;
|
||||
target_size_vert = 0;
|
||||
m_option_2 = 0;
|
||||
m_whitespace = 0;
|
||||
m_vwhitespace = 0;
|
||||
m_gs1parens = false;
|
||||
m_gssep = false;
|
||||
m_reader_init = false;
|
||||
m_rotate_angle = 0;
|
||||
m_debug = false;
|
||||
}
|
||||
|
||||
QZint::~QZint() {
|
||||
if (m_zintSymbol)
|
||||
ZBarcode_Delete(m_zintSymbol);
|
||||
}
|
||||
|
||||
void QZint::resetSymbol() {
|
||||
if (m_zintSymbol)
|
||||
ZBarcode_Delete(m_zintSymbol);
|
||||
|
||||
m_lastError.clear();
|
||||
m_zintSymbol = ZBarcode_Create();
|
||||
m_zintSymbol->output_options |= m_borderType | m_fontSetting;
|
||||
m_zintSymbol->symbology = m_symbol;
|
||||
m_zintSymbol->height = m_height;
|
||||
m_zintSymbol->whitespace_width = m_whitespace;
|
||||
m_zintSymbol->whitespace_height = m_vwhitespace;
|
||||
m_zintSymbol->border_width = m_borderWidth;
|
||||
m_zintSymbol->option_1 = m_option_1;
|
||||
m_zintSymbol->input_mode = m_input_mode;
|
||||
m_zintSymbol->option_2 = m_option_2;
|
||||
if (m_dotty) {
|
||||
m_zintSymbol->output_options |= BARCODE_DOTTY_MODE;
|
||||
}
|
||||
m_zintSymbol->dot_size = m_dot_size;
|
||||
m_zintSymbol->show_hrt = m_show_hrt ? 1 : 0;
|
||||
m_zintSymbol->eci = m_eci;
|
||||
m_zintSymbol->option_3 = m_option_3;
|
||||
m_zintSymbol->scale = m_scale;
|
||||
if (m_gs1parens) {
|
||||
m_zintSymbol->input_mode |= GS1PARENS_MODE;
|
||||
}
|
||||
if (m_gssep) {
|
||||
m_zintSymbol->output_options |= GS1_GS_SEPARATOR;
|
||||
}
|
||||
if (m_reader_init) {
|
||||
m_zintSymbol->output_options |= READER_INIT;
|
||||
}
|
||||
if (m_debug) {
|
||||
m_zintSymbol->debug |= ZINT_DEBUG_PRINT;
|
||||
}
|
||||
|
||||
strcpy(m_zintSymbol->fgcolour, m_fgColor.name().toLatin1().right(6));
|
||||
if (m_fgColor.alpha() != 0xff) {
|
||||
strcat(m_zintSymbol->fgcolour, m_fgColor.name(QColor::HexArgb).toLatin1().mid(1,2));
|
||||
}
|
||||
strcpy(m_zintSymbol->bgcolour, m_bgColor.name().toLatin1().right(6));
|
||||
if (m_bgColor.alpha() != 0xff) {
|
||||
strcat(m_zintSymbol->bgcolour, m_bgColor.name(QColor::HexArgb).toLatin1().mid(1,2));
|
||||
}
|
||||
if (m_cmyk) {
|
||||
m_zintSymbol->output_options |= CMYK_COLOUR;
|
||||
}
|
||||
strcpy(m_zintSymbol->primary, m_primaryMessage.toLatin1().left(127));
|
||||
}
|
||||
|
||||
void QZint::encode() {
|
||||
resetSymbol();
|
||||
QByteArray bstr = m_text.toUtf8();
|
||||
m_error = ZBarcode_Encode_and_Buffer_Vector(m_zintSymbol, (unsigned char *) bstr.data(), bstr.length(), 0); /* Note do our own rotation */
|
||||
m_lastError = m_zintSymbol->errtxt;
|
||||
|
||||
if (m_error < ZINT_ERROR) {
|
||||
m_borderType = m_zintSymbol->output_options & (BARCODE_BIND | BARCODE_BOX);
|
||||
m_height = m_zintSymbol->height;
|
||||
m_borderWidth = m_zintSymbol->border_width;
|
||||
m_whitespace = m_zintSymbol->whitespace_width;
|
||||
m_vwhitespace = m_zintSymbol->whitespace_height;
|
||||
emit encoded();
|
||||
}
|
||||
}
|
||||
|
||||
int QZint::symbol() const {
|
||||
return m_symbol;
|
||||
}
|
||||
|
||||
void QZint::setSymbol(int symbol) {
|
||||
m_symbol = symbol;
|
||||
}
|
||||
|
||||
int QZint::inputMode() const {
|
||||
return m_input_mode;
|
||||
}
|
||||
|
||||
void QZint::setInputMode(int input_mode) {
|
||||
m_input_mode = input_mode;
|
||||
}
|
||||
|
||||
QString QZint::text() const {
|
||||
return m_text;
|
||||
}
|
||||
|
||||
void QZint::setText(const QString & text) {
|
||||
m_text = text;
|
||||
}
|
||||
|
||||
QString QZint::primaryMessage() const {
|
||||
return m_primaryMessage;
|
||||
}
|
||||
|
||||
void QZint::setPrimaryMessage(const QString & primaryMessage) {
|
||||
m_primaryMessage = primaryMessage;
|
||||
}
|
||||
|
||||
float QZint::height() const {
|
||||
return m_height;
|
||||
}
|
||||
|
||||
void QZint::setHeight(float height) {
|
||||
m_height = height;
|
||||
}
|
||||
|
||||
int QZint::option2() const {
|
||||
return m_option_2;
|
||||
}
|
||||
|
||||
void QZint::setOption2(int option) {
|
||||
m_option_2 = option;
|
||||
}
|
||||
|
||||
int QZint::option3() const {
|
||||
return m_option_3;
|
||||
}
|
||||
|
||||
void QZint::setOption3(int option) {
|
||||
m_option_3 = option;
|
||||
}
|
||||
|
||||
float QZint::scale() const {
|
||||
return m_scale;
|
||||
}
|
||||
|
||||
void QZint::setScale(float scale) {
|
||||
m_scale = scale;
|
||||
}
|
||||
|
||||
bool QZint::dotty() const {
|
||||
return m_dotty;
|
||||
}
|
||||
|
||||
void QZint::setDotty(bool dotty) {
|
||||
m_dotty = dotty;
|
||||
}
|
||||
|
||||
void QZint::setDotSize(float dot_size) {
|
||||
m_dot_size = dot_size;
|
||||
}
|
||||
|
||||
QColor QZint::fgColor() const {
|
||||
return m_fgColor;
|
||||
}
|
||||
|
||||
void QZint::setFgColor(const QColor & fgColor) {
|
||||
m_fgColor = fgColor;
|
||||
}
|
||||
|
||||
QColor QZint::bgColor() const {
|
||||
return m_bgColor;
|
||||
}
|
||||
|
||||
void QZint::setBgColor(const QColor & bgColor) {
|
||||
m_bgColor = bgColor;
|
||||
}
|
||||
|
||||
void QZint::setCMYK(bool cmyk) {
|
||||
m_cmyk = cmyk;
|
||||
}
|
||||
|
||||
int QZint::borderType() const {
|
||||
return m_borderType;
|
||||
}
|
||||
|
||||
void QZint::setBorderType(int borderTypeIndex) {
|
||||
if (borderTypeIndex == 1) {
|
||||
m_borderType = BARCODE_BIND;
|
||||
} else if (borderTypeIndex == 2) {
|
||||
m_borderType = BARCODE_BOX;
|
||||
} else {
|
||||
m_borderType = 0;
|
||||
}
|
||||
}
|
||||
|
||||
int QZint::borderWidth() const {
|
||||
return m_borderWidth;
|
||||
}
|
||||
|
||||
void QZint::setBorderWidth(int boderWidth) {
|
||||
if (boderWidth < 0 || boderWidth > 16)
|
||||
boderWidth = 0;
|
||||
m_borderWidth = boderWidth;
|
||||
}
|
||||
|
||||
void QZint::setWhitespace(int whitespace) {
|
||||
m_whitespace = whitespace;
|
||||
}
|
||||
|
||||
void QZint::setVWhitespace(int vwhitespace) {
|
||||
m_vwhitespace = vwhitespace;
|
||||
}
|
||||
|
||||
int QZint::option1() const {
|
||||
return m_option_1;
|
||||
}
|
||||
|
||||
void QZint::setOption1(int option_1) {
|
||||
m_option_1 = option_1;
|
||||
}
|
||||
|
||||
void QZint::setFontSetting(int fontSettingIndex) {
|
||||
if (fontSettingIndex == 1) {
|
||||
m_fontSetting = BOLD_TEXT;
|
||||
} else if (fontSettingIndex == 2) {
|
||||
m_fontSetting = SMALL_TEXT;
|
||||
} else if (fontSettingIndex == 3) {
|
||||
m_fontSetting = SMALL_TEXT | BOLD_TEXT;
|
||||
} else {
|
||||
m_fontSetting = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void QZint::setShowText(bool show) {
|
||||
m_show_hrt = show;
|
||||
}
|
||||
|
||||
void QZint::setTargetSize(int width, int height) {
|
||||
target_size_horiz = width;
|
||||
target_size_vert = height;
|
||||
}
|
||||
|
||||
void QZint::setGSSep(bool gssep) {
|
||||
m_gssep = gssep;
|
||||
}
|
||||
|
||||
int QZint::rotateAngle() const {
|
||||
return m_rotate_angle;
|
||||
}
|
||||
|
||||
void QZint::setRotateAngle(int rotateIndex) {
|
||||
if (rotateIndex == 1) {
|
||||
m_rotate_angle = 90;
|
||||
} else if (rotateIndex == 2) {
|
||||
m_rotate_angle = 180;
|
||||
} else if (rotateIndex == 3) {
|
||||
m_rotate_angle = 270;
|
||||
} else {
|
||||
m_rotate_angle = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void QZint::setECI(int ECIIndex) {
|
||||
if (ECIIndex >= 1 && ECIIndex <= 11) {
|
||||
m_eci = ECIIndex + 2;
|
||||
} else if (ECIIndex >= 12 && ECIIndex <= 15) {
|
||||
m_eci = ECIIndex + 3;
|
||||
} else if (ECIIndex >= 16 && ECIIndex <= 26) {
|
||||
m_eci = ECIIndex + 4;
|
||||
} else if (ECIIndex == 27) {
|
||||
m_eci = 899; /* 8-bit binary data */
|
||||
} else {
|
||||
m_eci = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void QZint::setGS1Parens(bool gs1parens) {
|
||||
m_gs1parens = gs1parens;
|
||||
}
|
||||
|
||||
void QZint::setReaderInit(bool reader_init) {
|
||||
m_reader_init = reader_init;
|
||||
}
|
||||
|
||||
void QZint::setDebug(bool debug) {
|
||||
m_debug = debug;
|
||||
}
|
||||
|
||||
bool QZint::hasHRT(int symbology) const {
|
||||
return ZBarcode_Cap(symbology ? symbology : m_symbol, ZINT_CAP_HRT);
|
||||
}
|
||||
|
||||
bool QZint::isExtendable(int symbology) const {
|
||||
return ZBarcode_Cap(symbology ? symbology : m_symbol, ZINT_CAP_EXTENDABLE);
|
||||
}
|
||||
|
||||
bool QZint::supportsECI(int symbology) const {
|
||||
return ZBarcode_Cap(symbology ? symbology : m_symbol, ZINT_CAP_ECI);
|
||||
}
|
||||
|
||||
bool QZint::supportsGS1(int symbology) const {
|
||||
return ZBarcode_Cap(symbology ? symbology : m_symbol, ZINT_CAP_GS1);
|
||||
}
|
||||
|
||||
bool QZint::isFixedRatio(int symbology) const {
|
||||
return ZBarcode_Cap(symbology ? symbology : m_symbol, ZINT_CAP_FIXED_RATIO);
|
||||
}
|
||||
|
||||
bool QZint::isDotty(int symbology) const {
|
||||
return ZBarcode_Cap(symbology ? symbology : m_symbol, ZINT_CAP_DOTTY);
|
||||
}
|
||||
|
||||
bool QZint::supportsReaderInit(int symbology) const {
|
||||
return ZBarcode_Cap(symbology ? symbology : m_symbol, ZINT_CAP_READER_INIT);
|
||||
}
|
||||
|
||||
int QZint::getError() const {
|
||||
return m_error;
|
||||
}
|
||||
|
||||
QString QZint::error_message() const {
|
||||
return m_lastError;
|
||||
}
|
||||
|
||||
const QString & QZint::lastError() const {
|
||||
return m_lastError;
|
||||
}
|
||||
|
||||
bool QZint::hasErrors() const {
|
||||
return m_lastError.length();
|
||||
}
|
||||
|
||||
int QZint::getVersion() const {
|
||||
return ZBarcode_Version();
|
||||
}
|
||||
|
||||
bool QZint::save_to_file(QString filename) {
|
||||
resetSymbol();
|
||||
strcpy(m_zintSymbol->outfile, filename.toLatin1().left(255));
|
||||
QByteArray bstr = m_text.toUtf8();
|
||||
m_error = ZBarcode_Encode_and_Print(m_zintSymbol, (unsigned char *) bstr.data(), bstr.length(), m_rotate_angle);
|
||||
if (m_error >= ZINT_ERROR) {
|
||||
m_lastError = m_zintSymbol->errtxt;
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Qt::GlobalColor QZint::colourToQtColor(int colour) {
|
||||
switch (colour) {
|
||||
case 1: // Cyan
|
||||
return Qt::cyan;
|
||||
break;
|
||||
case 2: // Blue
|
||||
return Qt::blue;
|
||||
break;
|
||||
case 3: // Magenta
|
||||
return Qt::magenta;
|
||||
break;
|
||||
case 4: // Red
|
||||
return Qt::red;
|
||||
break;
|
||||
case 5: // Yellow
|
||||
return Qt::yellow;
|
||||
break;
|
||||
case 6: // Green
|
||||
return Qt::green;
|
||||
break;
|
||||
case 8: // White
|
||||
return Qt::white;
|
||||
break;
|
||||
default:
|
||||
return Qt::black;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void QZint::render(QPainter & painter, const QRectF & paintRect, AspectRatioMode mode) {
|
||||
struct zint_vector_rect *rect;
|
||||
struct zint_vector_hexagon *hex;
|
||||
struct zint_vector_circle *circle;
|
||||
struct zint_vector_string *string;
|
||||
|
||||
(void)mode; /* Not currently used */
|
||||
|
||||
encode();
|
||||
|
||||
painter.save();
|
||||
|
||||
if (m_error >= ZINT_ERROR) {
|
||||
painter.setRenderHint(QPainter::Antialiasing);
|
||||
QFont font(fontStyleError, fontSizeError);
|
||||
painter.setFont(font);
|
||||
painter.drawText(paintRect, Qt::AlignCenter | Qt::TextWordWrap, m_lastError);
|
||||
painter.restore();
|
||||
return;
|
||||
}
|
||||
|
||||
painter.setClipRect(paintRect, Qt::IntersectClip);
|
||||
|
||||
qreal xtr = paintRect.x();
|
||||
qreal ytr = paintRect.y();
|
||||
qreal scale;
|
||||
|
||||
qreal gwidth = m_zintSymbol->vector->width;
|
||||
qreal gheight = m_zintSymbol->vector->height;
|
||||
|
||||
if (m_rotate_angle == 90 || m_rotate_angle == 270) {
|
||||
if (paintRect.width() / gheight < paintRect.height() / gwidth) {
|
||||
scale = paintRect.width() / gheight;
|
||||
} else {
|
||||
scale = paintRect.height() / gwidth;
|
||||
}
|
||||
} else {
|
||||
if (paintRect.width() / gwidth < paintRect.height() / gheight) {
|
||||
scale = paintRect.width() / gwidth;
|
||||
} else {
|
||||
scale = paintRect.height() / gheight;
|
||||
}
|
||||
}
|
||||
|
||||
xtr += (qreal) (paintRect.width() - gwidth * scale) / 2.0;
|
||||
ytr += (qreal) (paintRect.height() - gheight * scale) / 2.0;
|
||||
|
||||
if (m_rotate_angle) {
|
||||
painter.translate(paintRect.width() / 2.0, paintRect.height() / 2.0); // Need to rotate around centre
|
||||
painter.rotate(m_rotate_angle);
|
||||
painter.translate(-paintRect.width() / 2.0, -paintRect.height() / 2.0); // Undo
|
||||
}
|
||||
|
||||
painter.translate(xtr, ytr);
|
||||
painter.scale(scale, scale);
|
||||
|
||||
QBrush bgBrush(m_bgColor);
|
||||
painter.fillRect(QRectF(0, 0, gwidth, gheight), bgBrush);
|
||||
|
||||
//Red square for diagnostics
|
||||
//painter.fillRect(QRect(0, 0, m_zintSymbol->vector->width, m_zintSymbol->vector->height), QBrush(QColor(255,0,0,255)));
|
||||
|
||||
// Plot rectangles
|
||||
rect = m_zintSymbol->vector->rectangles;
|
||||
if (rect) {
|
||||
QBrush brush(Qt::SolidPattern);
|
||||
while (rect) {
|
||||
if (rect->colour == -1) {
|
||||
brush.setColor(m_fgColor);
|
||||
} else {
|
||||
brush.setColor(colourToQtColor(rect->colour));
|
||||
}
|
||||
painter.fillRect(QRectF(rect->x, rect->y, rect->width, rect->height), brush);
|
||||
rect = rect->next;
|
||||
}
|
||||
}
|
||||
|
||||
// Plot hexagons
|
||||
hex = m_zintSymbol->vector->hexagons;
|
||||
if (hex) {
|
||||
painter.setRenderHint(QPainter::Antialiasing);
|
||||
QBrush fgBrush(m_fgColor);
|
||||
qreal previous_diameter = 0.0, radius = 0.0, half_radius = 0.0, half_sqrt3_radius = 0.0;
|
||||
while (hex) {
|
||||
if (previous_diameter != hex->diameter) {
|
||||
previous_diameter = hex->diameter;
|
||||
radius = 0.5 * previous_diameter;
|
||||
half_radius = 0.25 * previous_diameter;
|
||||
half_sqrt3_radius = 0.43301270189221932338 * previous_diameter;
|
||||
}
|
||||
|
||||
QPainterPath pt;
|
||||
pt.moveTo(hex->x, hex->y + radius);
|
||||
pt.lineTo(hex->x + half_sqrt3_radius, hex->y + half_radius);
|
||||
pt.lineTo(hex->x + half_sqrt3_radius, hex->y - half_radius);
|
||||
pt.lineTo(hex->x, hex->y - radius);
|
||||
pt.lineTo(hex->x - half_sqrt3_radius, hex->y - half_radius);
|
||||
pt.lineTo(hex->x - half_sqrt3_radius, hex->y + half_radius);
|
||||
pt.lineTo(hex->x, hex->y + radius);
|
||||
painter.fillPath(pt, fgBrush);
|
||||
|
||||
hex = hex->next;
|
||||
}
|
||||
}
|
||||
|
||||
// Plot dots (circles)
|
||||
circle = m_zintSymbol->vector->circles;
|
||||
if (circle) {
|
||||
painter.setRenderHint(QPainter::Antialiasing);
|
||||
QPen p;
|
||||
QBrush fgBrush(m_fgColor);
|
||||
qreal previous_diameter = 0.0, radius = 0.0;
|
||||
while (circle) {
|
||||
if (previous_diameter != circle->diameter) {
|
||||
previous_diameter = circle->diameter;
|
||||
radius = 0.5 * previous_diameter;
|
||||
}
|
||||
if (circle->colour) { // Set means use background colour
|
||||
p.setColor(m_bgColor);
|
||||
p.setWidth(0);
|
||||
painter.setPen(p);
|
||||
painter.setBrush(bgBrush);
|
||||
} else {
|
||||
p.setColor(m_fgColor);
|
||||
p.setWidth(0);
|
||||
painter.setPen(p);
|
||||
painter.setBrush(fgBrush);
|
||||
}
|
||||
painter.drawEllipse(QPointF(circle->x, circle->y), radius, radius);
|
||||
circle = circle->next;
|
||||
}
|
||||
}
|
||||
|
||||
// Plot text
|
||||
string = m_zintSymbol->vector->strings;
|
||||
if (string) {
|
||||
painter.setRenderHint(QPainter::Antialiasing);
|
||||
QPen p;
|
||||
p.setColor(m_fgColor);
|
||||
painter.setPen(p);
|
||||
bool bold = (m_zintSymbol->output_options & BOLD_TEXT) && (!isExtendable() || (m_zintSymbol->output_options & SMALL_TEXT));
|
||||
QFont font(fontStyle, -1 /*pointSize*/, bold ? QFont::Bold : -1);
|
||||
while (string) {
|
||||
font.setPixelSize(string->fsize);
|
||||
painter.setFont(font);
|
||||
QString content = QString::fromUtf8((const char *) string->text);
|
||||
/* string->y is baseline of font */
|
||||
if (string->halign == 1) { /* Left align */
|
||||
painter.drawText(QPointF(string->x, string->y), content);
|
||||
} else {
|
||||
QFontMetrics fm(painter.fontMetrics());
|
||||
int width = fm.boundingRect(content).width();
|
||||
if (string->halign == 2) { /* Right align */
|
||||
painter.drawText(QPointF(string->x - width, string->y), content);
|
||||
} else { /* Centre align */
|
||||
painter.drawText(QPointF(string->x - (width / 2.0), string->y), content);
|
||||
}
|
||||
}
|
||||
string = string->next;
|
||||
}
|
||||
}
|
||||
|
||||
painter.restore();
|
||||
}
|
||||
}
|
@ -1,172 +0,0 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2008 by BogDan Vatra *
|
||||
* bogdan@licentia.eu *
|
||||
* Copyright (C) 2010-2021 Robin Stuart *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
/* vim: set ts=4 sw=4 et : */
|
||||
|
||||
#ifndef BARCODERENDER_H
|
||||
#define BARCODERENDER_H
|
||||
#include <QColor>
|
||||
#include <QPainter>
|
||||
#include "zint.h"
|
||||
|
||||
namespace Zint
|
||||
{
|
||||
|
||||
class QZint : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
enum AspectRatioMode{IgnoreAspectRatio=0, KeepAspectRatio=1, CenterBarCode=2};
|
||||
|
||||
public:
|
||||
QZint();
|
||||
~QZint();
|
||||
|
||||
int symbol() const;
|
||||
void setSymbol(int symbol);
|
||||
|
||||
int inputMode() const;
|
||||
void setInputMode(int input_mode);
|
||||
|
||||
QString text() const;
|
||||
void setText(const QString & text);
|
||||
|
||||
QString primaryMessage() const;
|
||||
void setPrimaryMessage(const QString & primaryMessage);
|
||||
|
||||
float height() const;
|
||||
void setHeight(float height);
|
||||
|
||||
int option2() const;
|
||||
void setOption2(int option);
|
||||
|
||||
int option3() const;
|
||||
void setOption3(int option);
|
||||
|
||||
float scale() const;
|
||||
void setScale(float scale);
|
||||
|
||||
bool dotty() const;
|
||||
void setDotty(bool botty);
|
||||
|
||||
void setDotSize(float dot_size);
|
||||
|
||||
QColor fgColor() const;
|
||||
void setFgColor(const QColor & fgColor);
|
||||
|
||||
QColor bgColor() const;
|
||||
void setBgColor(const QColor & bgColor);
|
||||
|
||||
void setCMYK(bool cmyk);
|
||||
|
||||
int borderType() const;
|
||||
void setBorderType(int borderTypeIndex);
|
||||
|
||||
int borderWidth() const;
|
||||
void setBorderWidth(int boderWidth);
|
||||
|
||||
int option1() const;
|
||||
void setOption1(int option_1);
|
||||
|
||||
void setWhitespace(int whitespace);
|
||||
|
||||
void setVWhitespace(int vwhitespace);
|
||||
|
||||
void setFontSetting(int fontSettingIndex);
|
||||
|
||||
void setShowText(bool show);
|
||||
|
||||
void setTargetSize(int width, int height);
|
||||
|
||||
void setGSSep(bool gssep);
|
||||
|
||||
int rotateAngle() const;
|
||||
void setRotateAngle(int rotateIndex);
|
||||
|
||||
void setECI(int ECIIndex);
|
||||
|
||||
void setGS1Parens(bool gs1parens);
|
||||
|
||||
void setReaderInit(bool reader_init);
|
||||
|
||||
void setDebug(bool debug);
|
||||
|
||||
bool hasHRT(int symbology = 0) const;
|
||||
bool isExtendable(int symbology = 0) const;
|
||||
bool supportsECI(int symbology = 0) const;
|
||||
bool supportsGS1(int symbology = 0) const;
|
||||
bool isFixedRatio(int symbology = 0) const;
|
||||
bool isDotty(int symbology = 0) const;
|
||||
bool supportsReaderInit(int symbology = 0) const;
|
||||
|
||||
int getError() const;
|
||||
|
||||
QString error_message() const;
|
||||
|
||||
const QString & lastError() const;
|
||||
bool hasErrors() const;
|
||||
|
||||
bool save_to_file(QString filename);
|
||||
|
||||
void render(QPainter & painter, const QRectF & paintRect, AspectRatioMode mode=IgnoreAspectRatio);
|
||||
|
||||
int getVersion() const;
|
||||
|
||||
signals:
|
||||
void encoded();
|
||||
|
||||
private:
|
||||
void resetSymbol();
|
||||
void encode();
|
||||
static Qt::GlobalColor colourToQtColor(int colour);
|
||||
|
||||
private:
|
||||
int m_symbol;
|
||||
QString m_text;
|
||||
QString m_primaryMessage;
|
||||
float m_height;
|
||||
int m_borderType;
|
||||
int m_borderWidth;
|
||||
int m_fontSetting;
|
||||
int m_option_2;
|
||||
int m_option_1;
|
||||
int m_input_mode;
|
||||
QColor m_fgColor;
|
||||
QColor m_bgColor;
|
||||
bool m_cmyk;
|
||||
QString m_lastError;
|
||||
int m_error;
|
||||
int m_whitespace;
|
||||
int m_vwhitespace;
|
||||
zint_symbol * m_zintSymbol;
|
||||
float m_scale;
|
||||
int m_option_3;
|
||||
bool m_show_hrt;
|
||||
int m_eci;
|
||||
int m_rotate_angle;
|
||||
bool m_dotty;
|
||||
float m_dot_size;
|
||||
int target_size_horiz;
|
||||
int target_size_vert;
|
||||
bool m_gs1parens;
|
||||
bool m_gssep;
|
||||
bool m_reader_init;
|
||||
bool m_debug;
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user