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> *
|
2016-02-21 01:37:50 +13:00
|
|
|
* Copyright (C) 2009-2016 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
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
Q_ENUMS(BarcodeTypes)
|
|
|
|
|
|
|
|
public:
|
|
|
|
enum BarcodeTypes
|
|
|
|
{
|
2009-10-21 22:08:44 +13:00
|
|
|
AUSREDIRECT =68,
|
2009-04-27 10:04:51 +12:00
|
|
|
AUSREPLY =66,
|
|
|
|
AUSROUTE =67,
|
2009-10-21 22:08:44 +13:00
|
|
|
AUSPOST =63,
|
2009-04-27 10:04:51 +12:00
|
|
|
AZTEC =92,
|
|
|
|
AZRUNE =128,
|
2009-05-17 02:19:43 +12:00
|
|
|
CHANNEL =140,
|
2009-07-05 08:48:42 +12:00
|
|
|
CODABAR =18,
|
2016-08-25 06:37:49 +12:00
|
|
|
CODABLOCK =74,
|
2008-09-24 21:38:32 +12:00
|
|
|
CODE11 =1,
|
2009-04-27 10:04:51 +12:00
|
|
|
CODE128 =20,
|
|
|
|
CODE16K =23,
|
2008-09-24 21:38:32 +12:00
|
|
|
C25LOGIC =6,
|
2009-04-27 10:04:51 +12:00
|
|
|
C25IATA =4,
|
2008-09-24 21:38:32 +12:00
|
|
|
C25IND =7,
|
2009-04-27 10:04:51 +12:00
|
|
|
C25INTER =3,
|
|
|
|
C25MATRIX =2,
|
|
|
|
CODE32 =129,
|
2008-09-24 21:38:32 +12:00
|
|
|
CODE39 =8,
|
|
|
|
EXCODE39 =9,
|
2009-05-10 23:47:20 +12:00
|
|
|
CODE49 =24,
|
2008-09-24 21:38:32 +12:00
|
|
|
CODE93 =25,
|
2009-07-05 08:48:42 +12:00
|
|
|
CODE_ONE =141,
|
2009-04-27 10:04:51 +12:00
|
|
|
DATAMATRIX =71,
|
|
|
|
DPIDENT =22,
|
|
|
|
DPLEIT =21,
|
2016-08-14 20:58:38 +12:00
|
|
|
DOTCODE =115,
|
2009-04-27 10:04:51 +12:00
|
|
|
KIX =90,
|
|
|
|
EAN14 =72,
|
|
|
|
EANX =13,
|
2008-09-24 21:38:32 +12:00
|
|
|
FIM =49,
|
2009-04-27 10:04:51 +12:00
|
|
|
FLAT =28,
|
2009-10-21 22:08:44 +13:00
|
|
|
GRIDMATRIX =142,
|
2016-02-18 02:01:56 +13:00
|
|
|
RSS_EXP =31,
|
|
|
|
RSS_EXPSTACK =81,
|
|
|
|
RSS_LTD =30,
|
|
|
|
RSS14 =29,
|
|
|
|
RSS14STACK =79,
|
2016-04-08 04:13:43 +12:00
|
|
|
RSS14STACK_OMNI =80,
|
|
|
|
HANXIN =116,
|
2009-04-27 10:04:51 +12:00
|
|
|
ITF14 =89,
|
|
|
|
ISBNX =69,
|
|
|
|
JAPANPOST =76,
|
|
|
|
KOREAPOST =77,
|
2008-09-24 21:38:32 +12:00
|
|
|
LOGMARS =50,
|
2009-04-27 10:04:51 +12:00
|
|
|
MAXICODE =57,
|
|
|
|
MICROPDF417 =84,
|
|
|
|
MICROQR =97,
|
|
|
|
MSI_PLESSEY =47,
|
|
|
|
NVE18 =75,
|
|
|
|
PDF417 =55,
|
2008-09-24 21:38:32 +12:00
|
|
|
PHARMA =51,
|
|
|
|
PHARMA_TWO =53,
|
2009-04-27 10:04:51 +12:00
|
|
|
PZN =52,
|
|
|
|
PLANET =82,
|
|
|
|
POSTNET =40,
|
2008-09-24 21:38:32 +12:00
|
|
|
QRCODE =58,
|
|
|
|
RM4SCC =70,
|
2009-04-27 10:04:51 +12:00
|
|
|
TELEPEN =32,
|
2008-09-28 10:37:39 +13:00
|
|
|
TELEPEN_NUM =87,
|
2009-04-27 10:04:51 +12:00
|
|
|
PLESSEY =86,
|
2017-07-24 05:09:30 +12:00
|
|
|
UPNQR =143,
|
2009-04-27 10:04:51 +12:00
|
|
|
UPCA =34,
|
|
|
|
UPCE =37,
|
|
|
|
ONECODE =85
|
2008-07-19 02:49:14 +12:00
|
|
|
};
|
|
|
|
|
|
|
|
public:
|
2016-12-12 04:29:06 +13:00
|
|
|
MainWindow(QWidget* parent = 0, Qt::WindowFlags fl = 0);
|
2008-07-19 02:49:14 +12:00
|
|
|
~MainWindow();
|
|
|
|
|
2009-05-22 09:00:23 +12:00
|
|
|
|
2008-07-19 02:49:14 +12:00
|
|
|
public slots:
|
2009-04-27 10:04:51 +12:00
|
|
|
void update_preview();
|
|
|
|
void change_options();
|
2008-07-19 02:49:14 +12:00
|
|
|
void on_fgcolor_clicked();
|
|
|
|
void on_bgcolor_clicked();
|
2009-04-27 10:04:51 +12:00
|
|
|
void composite_enable();
|
|
|
|
void composite_ean_check();
|
|
|
|
void maxi_primary();
|
2009-05-20 02:05:26 +12:00
|
|
|
void change_print_scale();
|
|
|
|
|
2016-12-15 12:33:17 +13:00
|
|
|
protected:
|
|
|
|
void resizeEvent(QResizeEvent *event);
|
|
|
|
|
2009-05-20 02:05:26 +12:00
|
|
|
private slots:
|
|
|
|
bool save();
|
|
|
|
void about();
|
|
|
|
void quit_now();
|
2009-07-17 00:59:22 +12:00
|
|
|
void reset_view();
|
2009-09-17 20:01:49 +12:00
|
|
|
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:
|
2009-05-20 02:05:26 +12:00
|
|
|
/* void createActions();
|
|
|
|
void createMenus(); */
|
|
|
|
|
2008-07-19 02:49:14 +12:00
|
|
|
QColor m_fgcolor,m_bgcolor;
|
|
|
|
BarcodeItem m_bc;
|
2009-05-22 09:00:23 +12:00
|
|
|
QWidget *m_optionWidget;
|
2016-12-15 12:33:17 +13:00
|
|
|
QGraphicsScene *scene;
|
2009-05-20 02:05:26 +12:00
|
|
|
/* QMenu *fileMenu;
|
|
|
|
QMenu *helpMenu;
|
|
|
|
QAction *saveAct;
|
|
|
|
QAction *aboutQtAct; */
|
2008-07-19 02:49:14 +12:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|