|
From: <dom...@us...> - 2008-03-04 14:00:44
|
Revision: 33
http://kbarcode.svn.sourceforge.net/kbarcode/?rev=33&view=rev
Author: domseichter
Date: 2008-03-04 06:00:48 -0800 (Tue, 04 Mar 2008)
Log Message:
-----------
Batchprinter compiles now ... well other stuff still missing. But enough work for me today. University requests some time, too
Modified Paths:
--------------
trunk/src/batchprinter.cpp
trunk/src/zplutils.h
Modified: trunk/src/batchprinter.cpp
===================================================================
--- trunk/src/batchprinter.cpp 2008-03-04 13:33:09 UTC (rev 32)
+++ trunk/src/batchprinter.cpp 2008-03-04 14:00:48 UTC (rev 33)
@@ -26,9 +26,10 @@
// Qt includes
#include <qfile.h>
#include <qpainter.h>
+#include <QBuffer>
#include <QPaintDevice>
#include <QTextStream>
-#include <q3progressdialog.h>
+#include <QProgressDialog>
#include <QList>
#include <QPixmap>
@@ -132,7 +133,7 @@
// labels like article_no etc. (those who are created
// by events.
- for( unsigned int i = 0; i < m_data->count(); i++ )
+ for( int i = 0; i < m_data->count(); i++ )
{
Label l( def, buffer, m_name, printer, m_customer,
(*m_data)[i].article_no, (*m_data)[i].group );
@@ -301,7 +302,7 @@
else
name += m_image_custom_filename;
- QString filename = name + QString("_%1.").arg( i ) + KImageIO::suffix( m_image_format );
+ QString filename = name + QString("_%1.").arg( i ) + m_image_format; //KImageIO::suffix( m_image_format );
unsigned int c = 0;
while( QFile::exists( filename ) ) {
@@ -309,7 +310,7 @@
c++;
}
- pixmap.save( filename, m_image_format );
+ pixmap.save( filename, m_image_format.toLatin1().data() );
if( !checkProgressDialog( progress ) )
{
@@ -326,7 +327,7 @@
delete progress;
delete painter;
- new KRun( m_path );
+ new KRun( KUrl( m_path ), NULL );
}
void BatchPrinter::startBCP()
@@ -503,8 +504,8 @@
QProgressDialog* BatchPrinter::createProgressDialog( const QString & caption )
{
- QProgressDialog* progress = new QProgressDialog( caption, i18n("&Cancel"), m_labels+1, parent );
- progress->setProgress( 0 );
+ QProgressDialog* progress = new QProgressDialog( caption, i18n("&Cancel"), 0, m_labels+1, parent );
+ progress->setValue( 0 );
progress->show();
return progress;
}
@@ -512,8 +513,8 @@
bool BatchPrinter::checkProgressDialog( QProgressDialog* progress )
{
kapp->processEvents( 0 );
- progress->setProgress( progress->progress() + 1 );
- if( progress->wasCancelled() ) {
+ progress->setValue( progress->value() + 1 );
+ if( progress->wasCanceled() ) {
delete progress;
return false;
}
Modified: trunk/src/zplutils.h
===================================================================
--- trunk/src/zplutils.h 2008-03-04 13:33:09 UTC (rev 32)
+++ trunk/src/zplutils.h 2008-03-04 14:00:48 UTC (rev 33)
@@ -33,11 +33,14 @@
public:
BarcodePrinterDevice( double dpix, double dpiy );
- bool isExtDev() const { return true; }
bool paintingActive() const { return false; }
+ protected:
virtual int metric( int e ) const;
-
+
+ QPaintEngine* paintEngine() { return NULL; }
+ QPaintEngine* paintEngine() const { return NULL; }
+
private:
double m_resolution_x;
double m_resolution_y;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|