2008-07-19 02:49:14 +12:00
|
|
|
/***************************************************************************
|
2021-01-29 09:43:26 +13:00
|
|
|
* Copyright (C) 2008 by BogDan Vatra <bogdan@licentia.eu> *
|
2024-10-08 04:04:22 +13:00
|
|
|
* Copyright (C) 2009-2024 by Robin Stuart <rstuart114@gmail.com> *
|
2008-07-19 02:49:14 +12:00
|
|
|
* *
|
2008-09-18 06:38:53 +12:00
|
|
|
* This program is free software: you can redistribute it and/or modify *
|
2008-07-19 02:49:14 +12:00
|
|
|
* it under the terms of the GNU General Public License as published by *
|
2008-09-18 06:38:53 +12:00
|
|
|
* the Free Software Foundation, either version 3 of the License, or *
|
2008-07-19 02:49:14 +12:00
|
|
|
* (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 *
|
2008-09-18 06:38:53 +12:00
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
2008-07-19 02:49:14 +12:00
|
|
|
***************************************************************************/
|
|
|
|
|
|
|
|
#include <QApplication>
|
2009-11-18 11:36:04 +13:00
|
|
|
#include "mainwindow.h"
|
2008-07-19 02:49:14 +12:00
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
2021-01-29 09:43:26 +13:00
|
|
|
Q_INIT_RESOURCE(resources);
|
2017-10-24 08:37:52 +13:00
|
|
|
|
2024-11-09 05:54:38 +13:00
|
|
|
#if defined(__linux__) && QT_VERSION >= 0x50100 /* `qEnvironmentVariableIsEmpty()` introduced Qt 5.1 */
|
2024-10-08 04:04:22 +13:00
|
|
|
/* Not compatible with Wayland for some reason(s) so use X11 unless overridden */
|
2024-11-09 05:54:38 +13:00
|
|
|
if (QGuiApplication::platformName() != "xcb" && qEnvironmentVariableIsEmpty("QT_QPA_PLATFORM")) {
|
2024-10-08 04:04:22 +13:00
|
|
|
qputenv("QT_QPA_PLATFORM", QByteArrayLiteral("xcb"));
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2022-05-19 21:17:51 +12:00
|
|
|
#if QT_VERSION >= 0x50600 && QT_VERSION < 0x60100
|
2022-04-11 05:34:51 +12:00
|
|
|
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
|
|
|
#endif
|
2021-01-29 09:43:26 +13:00
|
|
|
#if QT_VERSION >= 0x50400
|
|
|
|
/* Suppresses "Qt WebEngine seems to be initialized from a plugin" warning */
|
|
|
|
QApplication::setAttribute(Qt::AA_ShareOpenGLContexts);
|
|
|
|
#endif
|
2023-03-30 21:51:31 +13:00
|
|
|
#if defined(_WIN32) && QT_VERSION >= 0x50A01 && QT_VERSION < 0x60000
|
2022-06-25 01:38:48 +12:00
|
|
|
/* Suppresses help question mark in dialogs */
|
|
|
|
QApplication::setAttribute(Qt::AA_DisableWindowContextHelpButton);
|
|
|
|
#endif
|
2021-01-29 09:43:26 +13:00
|
|
|
|
|
|
|
QApplication app(argc, argv);
|
2017-10-24 08:37:52 +13:00
|
|
|
|
2021-01-29 09:43:26 +13:00
|
|
|
MainWindow w;
|
Add compliant height, using ZINT_COMPLIANT_HEIGHT flag for back-compatibility
Rename barcode funcs to same as BARCODE_XXX name
library: barcode funcs array for dispatch, used for ZBarcode_ValidID() also
general: change is_sane() comparison to nonzero from ZINT_ERROR_INVALID_OPTION
MAILMARK: fuller error messages
CODABAR: add option to show check character in HRT
zint.h: use 0xNNNN for OR-able defines
GUI: add guard descent height reset button, add Zint version to window title,
static get_zint_version() method, use QStringLiteral (QSL shorthand),
use SIGNAL(toggled()), add errtxt "popup" and status bar, add icons,
add saveAs shortcut, add main menu, context menus and actions, add help,
reset_view() -> reset_colours(), add copy to clipboard as EMF/GIF/PNG/TIF,
lessen triggering of update_preview(), shorten names of getters/setters,
simplify/shorten some update_preview() logic in switch,
CODEONE disable structapp for Version S
qzint.cpp: add on_errored signal, add missing getters, add test
2021-10-09 12:13:39 +13:00
|
|
|
// Seem to need to do this before showing the window
|
|
|
|
w.setWindowTitle(w.windowTitle() + ' ' + MainWindow::get_zint_version());
|
2021-01-29 09:43:26 +13:00
|
|
|
w.show();
|
|
|
|
return app.exec();
|
|
|
|
}
|
Add multiple segments support for AZTEC, CODEONE, DATAMATRIX, DOTCODE,
GRIDMATRIX, HANXIN, MAXICODE, MICROPDF417, PDF417, QRCODE, RMQR, ULTRA
RMQR: fix ECI encoding (wrong bit length for indicator)
MICROQR: check versions M1 and M2 for allowed characters so as to give
better error messages
DOTCODE: some small optimizations
common.c: add is_chr(), segs_length(), segs_cpy()
CODEONE/CODE128/DOTCODE/GRIDMATRIX/HANXIN/MAXICODE/QRCODE/ULTRA: add
namespace prefixes to static funcs/data
includes: use Z_ prefix, unuse double underscore prefixes (guard defines)
manual.txt: compress some tables using double/treble column sets
2022-05-10 06:50:50 +12:00
|
|
|
|
|
|
|
/* vim: set ts=4 sw=4 et : */
|