diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-29 00:55:34 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-29 00:55:34 +0000 |
commit | c4189d200e71c7ef82e9a6e34935ad225154d658 (patch) | |
tree | f7f29a1159e0402472ff2ab22617a8113f66263c /kbarcode/tbarcode2.cpp | |
parent | 2f888b1578e65ec1bc514996eb509fcaf34462d6 (diff) | |
download | kbarcode-c4189d200e71c7ef82e9a6e34935ad225154d658.tar.gz kbarcode-c4189d200e71c7ef82e9a6e34935ad225154d658.zip |
TQt4 port kbarcode
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kbarcode@1233956 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kbarcode/tbarcode2.cpp')
-rw-r--r-- | kbarcode/tbarcode2.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/kbarcode/tbarcode2.cpp b/kbarcode/tbarcode2.cpp index a07ff41..22ae500 100644 --- a/kbarcode/tbarcode2.cpp +++ b/kbarcode/tbarcode2.cpp @@ -20,8 +20,8 @@ #include <stdlib.h> -#include <qdom.h> -#include <qfile.h> +#include <tqdom.h> +#include <tqfile.h> #include <kprocess.h> #include <ktempfile.h> @@ -41,7 +41,7 @@ void TBarcodeOptions::defaults() m_height = 20; } -void TBarcodeOptions::load( const QDomElement* tag ) +void TBarcodeOptions::load( const TQDomElement* tag ) { this->setModuleWidth( tag->attribute( "tbarcode.modulewidth", "0.353" ).toDouble() ); this->setEscape( tag->attribute( "tbarcode.escape", "0" ).toInt() ); @@ -51,7 +51,7 @@ void TBarcodeOptions::load( const QDomElement* tag ) this->setHeight( tag->attribute( "tbarcode.height", "0" ).toInt() ); } -void TBarcodeOptions::save( QDomElement* tag ) +void TBarcodeOptions::save( TQDomElement* tag ) { tag->setAttribute( "tbarcode.modulewidth", this->moduleWidth() ); tag->setAttribute( "tbarcode.escape", this->escape() ); @@ -100,7 +100,7 @@ const TBarcode2 & TBarcode2::operator=( const BarkodeEngine & rhs ) bool TBarcode2::createPostscript( char** postscript, long* postscript_size ) { - QString cmd; + TQString cmd; const char* text; const TBarcodeOptions* tbarcode = (dynamic_cast<TBarcodeOptions*>(barkode->engine()->options())); @@ -129,22 +129,22 @@ bool TBarcode2::createPostscript( char** postscript, long* postscript_size ) return true; } -QRect TBarcode2::bbox( const char* postscript, long postscript_size ) +TQRect TBarcode2::bbox( const char* postscript, long postscript_size ) { const char* gs_bbox = "gs -sDEVICE=bbox -sNOPAUSE -q %1 -c showpage quit 2>&1"; char* buffer = NULL; long len = 0; - QRect size; + TQRect size; - KTempFile psfile( QString::null, ".ps" ); + KTempFile psfile( TQString(), ".ps" ); psfile.file()->writeBlock( postscript, postscript_size ); psfile.file()->close(); - if( !readFromPipe( QString( gs_bbox ).arg( psfile.file()->name() ).latin1(), &buffer, &len ) || !len ) + if( !readFromPipe( TQString( gs_bbox ).tqarg( psfile.file()->name() ).latin1(), &buffer, &len ) || !len ) { psfile.unlink(); - return QRect( 0, 0, 0, 0 ); + return TQRect( 0, 0, 0, 0 ); } else psfile.unlink(); |