2008-07-19 02:49:14 +12:00
|
|
|
/***************************************************************************
|
2009-04-27 10:04:51 +12:00
|
|
|
* Copyright (C) 2008 by BogDan Vatra <bogdan@licentia.eu> *
|
2020-04-07 03:37:34 +12:00
|
|
|
* Copyright (C) 2009-2020 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
|
|
|
***************************************************************************/
|
|
|
|
|
|
|
|
#ifndef MAINWINDOW_H
|
|
|
|
#define MAINWINDOW_H
|
|
|
|
|
|
|
|
#include <QtGui>
|
|
|
|
#include <QGraphicsItem>
|
2009-05-22 09:00:23 +12:00
|
|
|
#include <QMainWindow>
|
2016-12-15 12:33:17 +13:00
|
|
|
#include <QGraphicsScene>
|
2008-07-19 02:49:14 +12:00
|
|
|
|
|
|
|
#include "ui_mainWindow.h"
|
|
|
|
#include "barcodeitem.h"
|
|
|
|
|
2009-05-22 09:00:23 +12:00
|
|
|
class QAction;
|
|
|
|
class QActionGroup;
|
|
|
|
class QLabel;
|
|
|
|
class QMenu;
|
2009-05-20 02:05:26 +12:00
|
|
|
|
2008-07-19 02:49:14 +12:00
|
|
|
class MainWindow : public QWidget, private Ui::mainWindow
|
|
|
|
{
|
2019-11-26 10:20:21 +13:00
|
|
|
Q_OBJECT
|
2008-07-19 02:49:14 +12:00
|
|
|
|
2019-11-26 10:20:21 +13:00
|
|
|
Q_ENUMS(BarcodeTypes)
|
2008-07-19 02:49:14 +12:00
|
|
|
|
|
|
|
public:
|
2019-11-26 10:20:21 +13:00
|
|
|
enum BarcodeTypes
|
|
|
|
{
|
|
|
|
AUSREDIRECT = 68,
|
|
|
|
AUSREPLY = 66,
|
|
|
|
AUSROUTE = 67,
|
|
|
|
AUSPOST = 63,
|
|
|
|
AZTEC = 92,
|
|
|
|
AZRUNE = 128,
|
|
|
|
CHANNEL = 140,
|
|
|
|
CODABAR = 18,
|
|
|
|
CODABLOCK = 74,
|
|
|
|
CODE11 = 1,
|
|
|
|
CODE128 = 20,
|
|
|
|
CODE16K = 23,
|
|
|
|
C25LOGIC = 6,
|
|
|
|
C25IATA = 4,
|
|
|
|
C25IND = 7,
|
|
|
|
C25INTER = 3,
|
|
|
|
C25MATRIX = 2,
|
|
|
|
CODE32 = 129,
|
|
|
|
CODE39 = 8,
|
|
|
|
EXCODE39 = 9,
|
|
|
|
CODE49 = 24,
|
|
|
|
CODE93 = 25,
|
|
|
|
CODE_ONE = 141,
|
2020-06-05 05:45:25 +12:00
|
|
|
DAFT = 93,
|
2019-11-26 10:20:21 +13:00
|
|
|
DATAMATRIX = 71,
|
|
|
|
DPIDENT = 22,
|
|
|
|
DPLEIT = 21,
|
|
|
|
DOTCODE = 115,
|
|
|
|
KIX = 90,
|
|
|
|
EAN14 = 72,
|
|
|
|
EANX = 13,
|
|
|
|
FIM = 49,
|
|
|
|
FLAT = 28,
|
|
|
|
GRIDMATRIX = 142,
|
|
|
|
RSS_EXP = 31,
|
|
|
|
RSS_EXPSTACK = 81,
|
|
|
|
RSS_LTD = 30,
|
|
|
|
RSS14 = 29,
|
|
|
|
RSS14STACK = 79,
|
|
|
|
RSS14STACK_OMNI = 80,
|
|
|
|
HANXIN = 116,
|
|
|
|
ISBNX = 69,
|
2020-07-11 06:39:32 +12:00
|
|
|
ITF14 = 89,
|
2019-11-26 10:20:21 +13:00
|
|
|
JAPANPOST = 76,
|
|
|
|
KOREAPOST = 77,
|
|
|
|
LOGMARS = 50,
|
|
|
|
MAXICODE = 57,
|
|
|
|
MICROPDF417 = 84,
|
|
|
|
MICROQR = 97,
|
|
|
|
MSI_PLESSEY = 47,
|
|
|
|
NVE18 = 75,
|
|
|
|
PDF417 = 55,
|
|
|
|
PHARMA = 51,
|
|
|
|
PHARMA_TWO = 53,
|
|
|
|
PZN = 52,
|
|
|
|
PLANET = 82,
|
|
|
|
POSTNET = 40,
|
|
|
|
QRCODE = 58,
|
|
|
|
RMQR = 145,
|
|
|
|
RM4SCC = 70,
|
|
|
|
MAILMARK = 121,
|
|
|
|
TELEPEN = 32,
|
|
|
|
TELEPEN_NUM = 87,
|
|
|
|
PLESSEY = 86,
|
2020-04-07 03:37:34 +12:00
|
|
|
ULTRA = 144,
|
2019-11-26 10:20:21 +13:00
|
|
|
UPCA = 34,
|
|
|
|
UPCE = 37,
|
2020-07-11 06:39:32 +12:00
|
|
|
UPNQR = 143,
|
2020-06-05 05:45:25 +12:00
|
|
|
ONECODE = 85,
|
|
|
|
VIN = 73
|
2019-11-26 10:20:21 +13:00
|
|
|
};
|
2008-07-19 02:49:14 +12:00
|
|
|
|
|
|
|
public:
|
2019-11-26 10:20:21 +13:00
|
|
|
MainWindow(QWidget* parent = 0, Qt::WindowFlags fl = 0);
|
|
|
|
~MainWindow();
|
2008-07-19 02:49:14 +12:00
|
|
|
|
2009-05-22 09:00:23 +12:00
|
|
|
|
2008-07-19 02:49:14 +12:00
|
|
|
public slots:
|
2019-11-26 10:20:21 +13:00
|
|
|
void update_preview();
|
|
|
|
void change_options();
|
|
|
|
void on_fgcolor_clicked();
|
|
|
|
void on_bgcolor_clicked();
|
|
|
|
void composite_enable();
|
|
|
|
void composite_ean_check();
|
|
|
|
void maxi_primary();
|
|
|
|
void change_print_scale();
|
|
|
|
void autoheight_clicked();
|
2009-05-20 02:05:26 +12:00
|
|
|
|
2016-12-15 12:33:17 +13:00
|
|
|
protected:
|
|
|
|
void resizeEvent(QResizeEvent *event);
|
2017-10-24 08:37:52 +13:00
|
|
|
|
2009-05-20 02:05:26 +12:00
|
|
|
private slots:
|
2019-11-26 10:20:21 +13:00
|
|
|
bool save();
|
|
|
|
void about();
|
|
|
|
void quit_now();
|
|
|
|
void reset_view();
|
|
|
|
int open_data_dialog();
|
|
|
|
int open_sequence_dialog();
|
2017-05-16 08:12:19 +12:00
|
|
|
void copy_to_clipboard_svg();
|
|
|
|
void copy_to_clipboard_bmp();
|
2008-07-19 02:49:14 +12:00
|
|
|
|
|
|
|
private:
|
2019-11-26 10:20:21 +13:00
|
|
|
QColor m_fgcolor,m_bgcolor;
|
|
|
|
BarcodeItem m_bc;
|
|
|
|
QWidget *m_optionWidget;
|
|
|
|
QGraphicsScene *scene;
|
2008-07-19 02:49:14 +12:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|