Structural changes and updates from tgotic

This commit is contained in:
hooper114 2009-11-22 15:38:15 +00:00
parent 073669a30f
commit dcefa4eee1
6 changed files with 1013 additions and 927 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,42 +1,85 @@
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <winver.h>
#ifdef GCC_WINDRES
VS_VERSION_INFO VERSIONINFO
#else
VS_VERSION_INFO VERSIONINFO
#endif
FILEVERSION 2,3,0,0
PRODUCTVERSION 2,3,0,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
#else
FILEFLAGS 0
#endif
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_APP
FILESUBTYPE VFT2_UNKNOWN
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4"
//language ID = U.S. English, char set = Windows, Multilingual
BEGIN
VALUE "FileDescription", "zint barcode generator\0"
VALUE "FileVersion", "2.3.0.0\0"
VALUE "InternalName", "zint.exe\0"
VALUE "LegalCopyright", "Copyright © 2009 Robin Stuart & BogDan Vatra\0"
VALUE "OriginalFilename", "zint.exe\0"
VALUE "ProductName", "zint\0"
VALUE "ProductVersion", "2.3.0.0\0"
VALUE "License", "GNU General Public License version 3\0"
VALUE "WWW", "http://www.sourceforge.net/projects/zint\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0409, 1250
END
END
100 ICON MOVEABLE PURE LOADONCALL DISCARDABLE "zint_black.ico"

View File

@ -1,103 +1,103 @@
/*
Zint Barcode Generator - the open source barcode generator
Copyright (C) 2009 Robin Stuart <robin@zint.org.uk>
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, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <QDebug>
#include <QFileDialog>
#include <QUiLoader>
#include <QStringList>
#include <QMessageBox>
#include "datawindow.h"
#include <stdio.h>
DataWindow::DataWindow()
{
setupUi(this);
connect(btnCancel, SIGNAL( clicked( bool )), SLOT(quit_now()));
connect(btnReset, SIGNAL( clicked( bool )), SLOT(clear_data()));
connect(btnOK, SIGNAL( clicked( bool )), SLOT(okay()));
}
DataWindow::DataWindow(QString input)
{
setupUi(this);
txtDataInput->setPlainText(input);
txtDataInput->moveCursor(QTextCursor::End, QTextCursor::MoveAnchor);
connect(btnCancel, SIGNAL( clicked( bool )), SLOT(quit_now()));
connect(btnReset, SIGNAL( clicked( bool )), SLOT(clear_data()));
connect(btnOK, SIGNAL( clicked( bool )), SLOT(okay()));
connect(btnFromFile, SIGNAL( clicked( bool )), SLOT(from_file()));
}
DataWindow::~DataWindow()
{
}
void DataWindow::quit_now()
{
Valid = 0;
close();
}
void DataWindow::clear_data()
{
txtDataInput->clear();
}
void DataWindow::okay()
{
Valid = 1;
DataOutput = txtDataInput->toPlainText();
close();
}
void DataWindow::from_file()
{
//QString fileName;
//QFileDialog fdialog;
QFile file;
//fdialog.setFileMode(QFileDialog::ExistingFile);
//
//if(fdialog.exec()) {
// fileName = fdialog.selectedFiles().at(0);
//} else {
// return;
//}
QString fileName = QFileDialog::getOpenFileName(this,
tr("Open File"),
"./",
tr("All Files (*);;Text Files (*.txt)"));
if (fileName.isEmpty())
return;
file.setFileName(fileName);
if(!file.open(QIODevice::ReadOnly)) {
QMessageBox::critical(this, tr("Open Error"), tr("Could not open selected file."));
return;
}
QByteArray outstream = file.readAll();
txtDataInput->setPlainText(QString(outstream));
file.close();
/*
Zint Barcode Generator - the open source barcode generator
Copyright (C) 2009 Robin Stuart <robin@zint.org.uk>
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, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <QDebug>
#include <QFileDialog>
#include <QUiLoader>
#include <QStringList>
#include <QMessageBox>
#include "datawindow.h"
#include <stdio.h>
DataWindow::DataWindow()
{
setupUi(this);
connect(btnCancel, SIGNAL( clicked( bool )), SLOT(quit_now()));
connect(btnReset, SIGNAL( clicked( bool )), SLOT(clear_data()));
connect(btnOK, SIGNAL( clicked( bool )), SLOT(okay()));
}
DataWindow::DataWindow(QString input)
{
setupUi(this);
txtDataInput->setPlainText(input);
txtDataInput->moveCursor(QTextCursor::End, QTextCursor::MoveAnchor);
connect(btnCancel, SIGNAL( clicked( bool )), SLOT(quit_now()));
connect(btnReset, SIGNAL( clicked( bool )), SLOT(clear_data()));
connect(btnOK, SIGNAL( clicked( bool )), SLOT(okay()));
connect(btnFromFile, SIGNAL( clicked( bool )), SLOT(from_file()));
}
DataWindow::~DataWindow()
{
}
void DataWindow::quit_now()
{
Valid = 0;
close();
}
void DataWindow::clear_data()
{
txtDataInput->clear();
}
void DataWindow::okay()
{
Valid = 1;
DataOutput = txtDataInput->toPlainText();
close();
}
void DataWindow::from_file()
{
//QString fileName;
//QFileDialog fdialog;
QFile file;
//fdialog.setFileMode(QFileDialog::ExistingFile);
//
//if(fdialog.exec()) {
// fileName = fdialog.selectedFiles().at(0);
//} else {
// return;
//}
QString fileName = QFileDialog::getOpenFileName(this,
tr("Open File"),
"./",
tr("All Files (*);;Text Files (*.txt)"));
if (fileName.isEmpty())
return;
file.setFileName(fileName);
if(!file.open(QIODevice::ReadOnly)) {
QMessageBox::critical(this, tr("Open Error"), tr("Could not open selected file."));
return;
}
QByteArray outstream = file.readAll();
txtDataInput->setPlainText(QString(outstream));
file.close();
}

View File

@ -50,7 +50,7 @@
</item>
<item>
<property name="text">
<string>42 x 40 (Version 3)</string>
<string>42 x 42 (Version 3)</string>
</property>
</item>
<item>

View File

@ -30,7 +30,7 @@
</property>
<property name="windowIcon">
<iconset resource="resources.qrc">
<normaloff>:/images/zico.png</normaloff>:/images/zico.png</iconset>
<normaloff>:/images/zint_white.png</normaloff>:/images/zint_white.png</iconset>
</property>
<property name="locale">
<locale language="English" country="UnitedStates"/>

View File

@ -1,42 +1,85 @@
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <winver.h>
#ifdef GCC_WINDRES
VS_VERSION_INFO VERSIONINFO
#else
VS_VERSION_INFO VERSIONINFO
#endif
FILEVERSION 2,3,0,0
PRODUCTVERSION 2,3,0,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
#else
FILEFLAGS 0
#endif
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_APP
FILESUBTYPE VFT2_UNKNOWN
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "000904b0"
BEGIN
VALUE "CompanyName", "Robin Stuart & BogDan Vatra"
VALUE "FileDescription", "qtZint barcode generator"
VALUE "FileVersion", "2.3.0.0"
VALUE "InternalName", "qtZint"
VALUE "LegalCopyright", "Copyright © 2009 Robin Stuart & BogDan Vatra"
VALUE "License", "GNU General Public License version 3"
VALUE "OriginalFilename", "qtZint"
VALUE "ProductName", "qtZint"
VALUE "ProductVersion", "2.3.0.0"
VALUE "WWW", "http://www.zint.org.uk"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x9, 1200
END
END
100 ICON MOVEABLE PURE LOADONCALL DISCARDABLE "zint_white.ico"