From 4541cff71067e65367cea5ff44e5136934e8a333 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Mon, 19 Dec 2011 11:36:06 -0600 Subject: [PATCH] Remove additional unneeded tq method conversions --- kbarcode/barcodeitem.cpp | 20 ++--- kbarcode/batchprinter.cpp | 4 +- kbarcode/batchwizard.cpp | 6 +- kbarcode/csvfile.cpp | 8 +- kbarcode/csvfile.h | 4 +- kbarcode/csvimportdlg.cpp | 2 +- kbarcode/definition.cpp | 4 +- kbarcode/definitiondialog.cpp | 6 +- kbarcode/dsrichtext.cpp | 22 +++--- kbarcode/dsrichtext.h | 12 +-- kbarcode/dstextedit.cpp | 6 +- kbarcode/imageitem.cpp | 2 +- kbarcode/kactionmap.cpp | 4 +- kbarcode/kbarcode.cpp | 2 +- kbarcode/labeleditor.cpp | 12 +-- kbarcode/multilineeditdlg.cpp | 10 +-- kbarcode/mybarcode.cpp | 14 ++-- kbarcode/mycanvasview.cpp | 4 +- kbarcode/newlabel.cpp | 18 ++--- kbarcode/pixmapbarcode.cpp | 18 ++--- kbarcode/propertywidget.cpp | 2 +- kbarcode/purepostscript.cpp | 6 +- kbarcode/rectitem.cpp | 22 +++--- kbarcode/sqltables.cpp | 2 +- kbarcode/tbarcode2.cpp | 2 +- kbarcode/tec.cpp | 144 +++++++++++++++++----------------- kbarcode/textitem.cpp | 16 ++-- kbarcode/textlineitem.cpp | 16 ++-- kbarcode/tokendialog.cpp | 18 ++--- kbarcode/tokenprovider.cpp | 14 ++-- kbarcode/xmlutils.cpp | 8 +- kbarcode/zplutils.cpp | 4 +- 32 files changed, 216 insertions(+), 216 deletions(-) diff --git a/kbarcode/barcodeitem.cpp b/kbarcode/barcodeitem.cpp index 39af930..2b34aaa 100644 --- a/kbarcode/barcodeitem.cpp +++ b/kbarcode/barcodeitem.cpp @@ -213,13 +213,13 @@ void BarcodeItem::drawIpl( TQTextStream* stream, IPLUtils* utils ) } int counter = utils->counter(); - TQString s = TQString("B%1;").tqarg( counter ); // field number + TQString s = TQString("B%1;").arg( counter ); // field number s += utils->fieldOrigin( rect().x(), rect().y() ); - s += TQString("c%1;").tqarg( encoding ); // encoding type - s += TQString("h%1;").tqarg( rect().height() ); // height of barcode - s += TQString("w%1;").tqarg( 3 ); // width of barcode (per line) - s += TQString("d0,%1;").tqarg( value().length() ); // max length of data + s += TQString("c%1;").arg( encoding ); // encoding type + s += TQString("h%1;").arg( rect().height() ); // height of barcode + s += TQString("w%1;").arg( 3 ); // width of barcode (per line) + s += TQString("d0,%1;").arg( value().length() ); // max length of data *stream << utils->field( s ); utils->addValue( value() ); @@ -235,11 +235,11 @@ void BarcodeItem::drawEPcl( TQTextStream* stream ) } // Coordinates cannot start at zero - TQString s = TQString("B %1").tqarg( rect().x()+1 ); - s += TQString(" %1 0").tqarg( rect().y() + rect().height() ); - s += TQString(" %1 1 4").tqarg( encoding ); - s += TQString(" %1 1").tqarg( rect().height() ); - s += TQString(" %1").tqarg( value() ); + TQString s = TQString("B %1").arg( rect().x()+1 ); + s += TQString(" %1 0").arg( rect().y() + rect().height() ); + s += TQString(" %1 1 4").arg( encoding ); + s += TQString(" %1 1").arg( rect().height() ); + s += TQString(" %1").arg( value() ); *stream << EPCLUtils::field( s ); } diff --git a/kbarcode/batchprinter.cpp b/kbarcode/batchprinter.cpp index 9bc1409..2319fda 100644 --- a/kbarcode/batchprinter.cpp +++ b/kbarcode/batchprinter.cpp @@ -300,7 +300,7 @@ void BatchPrinter::startImages() else name += m_image_custom_filename; - TQString filename = name + TQString("_%1.").tqarg( i ) + KImageIO::suffix( m_image_format ); + TQString filename = name + TQString("_%1.").arg( i ) + KImageIO::suffix( m_image_format ); unsigned int c = 0; while( TQFile::exists( filename ) ) { @@ -334,7 +334,7 @@ void BatchPrinter::startBCP() TQFile file( m_path ); if( !file.open( IO_WriteOnly ) ) // | IO_Raw ) ) { - KMessageBox::error( parent, TQString( i18n("Can't open the file or device %1.") ).tqarg( m_path ) ); + KMessageBox::error( parent, TQString( i18n("Can't open the file or device %1.") ).arg( m_path ) ); return; } diff --git a/kbarcode/batchwizard.cpp b/kbarcode/batchwizard.cpp index ef1db26..c99b089 100644 --- a/kbarcode/batchwizard.cpp +++ b/kbarcode/batchwizard.cpp @@ -558,7 +558,7 @@ void BatchWizard::printNow( const TQString & printer, bool bUserInteraction ) // let's check if the label file does even exist! if( !TQFile::exists( m_url->url() ) ) { - KMessageBox::error( this, TQString( i18n("The label file %1 was not found") ).tqarg( m_url->url()) ); + KMessageBox::error( this, TQString( i18n("The label file %1 was not found") ).arg( m_url->url()) ); return; } @@ -747,7 +747,7 @@ bool BatchWizard::addItem( const TQString & article, const TQString & group, int TQString temp; temp.sprintf("%0*i", 5, sqlList->childCount() + 1 ); - KListViewItem* item = new KListViewItem( sqlList, temp, TQString( "%1" ).tqarg( count ), + KListViewItem* item = new KListViewItem( sqlList, temp, TQString( "%1" ).arg( count ), article, group ); sqlList->insertItem( item ); @@ -1076,7 +1076,7 @@ bool BatchWizard::fillVarTable() file.setCSVFile(true); if( !file.isValid() ) { - KMessageBox::error( this, TQString( i18n("Can't open file: %1") ).tqarg( importCsvFile->url() ) ); + KMessageBox::error( this, TQString( i18n("Can't open file: %1") ).arg( importCsvFile->url() ) ); return false; } diff --git a/kbarcode/csvfile.cpp b/kbarcode/csvfile.cpp index 880898f..960b4dd 100644 --- a/kbarcode/csvfile.cpp +++ b/kbarcode/csvfile.cpp @@ -55,18 +55,18 @@ CSVFile::CSVFile( TQBuffer & buf ) CSVFile::~CSVFile() { - if( m_stream.tqdevice() && m_stream.tqdevice()->isOpen() ) - m_stream.tqdevice()->close(); + if( m_stream.device() && m_stream.device()->isOpen() ) + m_stream.device()->close(); } TQStringList CSVFile::readNextLine() { TQString line; - if( !m_stream.tqdevice() ) + if( !m_stream.device() ) return TQStringList(); - if( !m_stream.tqdevice()->isOpen() ) + if( !m_stream.device()->isOpen() ) return TQStringList(); // walk through the lines until a line containing valid data diff --git a/kbarcode/csvfile.h b/kbarcode/csvfile.h index 9a0c829..9a3a7de 100644 --- a/kbarcode/csvfile.h +++ b/kbarcode/csvfile.h @@ -106,10 +106,10 @@ class CSVFile { bool CSVFile::isValid() const { - if( !m_stream.tqdevice() ) + if( !m_stream.device() ) return false; - return m_stream.tqdevice()->isOpen(); + return m_stream.device()->isOpen(); } bool CSVFile::isEof() const diff --git a/kbarcode/csvimportdlg.cpp b/kbarcode/csvimportdlg.cpp index e472d01..2f8e78e 100644 --- a/kbarcode/csvimportdlg.cpp +++ b/kbarcode/csvimportdlg.cpp @@ -386,7 +386,7 @@ void CSVImportDlg::accept() void CSVImportDlg::addWidth() { - listWidth->insertItem( TQString("%1").tqarg(spinNumber->value()), -1 ); + listWidth->insertItem( TQString("%1").arg(spinNumber->value()), -1 ); settingsChanged(); } diff --git a/kbarcode/definition.cpp b/kbarcode/definition.cpp index 23d1eca..251e092 100644 --- a/kbarcode/definition.cpp +++ b/kbarcode/definition.cpp @@ -136,7 +136,7 @@ Definition::Definition( TQWidget* parent ) Definition::Definition( int label_def_id, TQWidget* parent ) : m_parent( parent ) { - init( TQString("%1").tqarg( label_def_id ) ); + init( TQString("%1").arg( label_def_id ) ); } Definition::Definition( const TQString & label_def_id, TQWidget* parent ) @@ -224,7 +224,7 @@ void Definition::setId( const TQString & label_def_id ) void Definition::setId( int label_def_id ) { - init( TQString("%1").tqarg( label_def_id ) ); + init( TQString("%1").arg( label_def_id ) ); } void Definition::init( const TQString & label_def_id ) diff --git a/kbarcode/definitiondialog.cpp b/kbarcode/definitiondialog.cpp index 64da5c5..ae3cb64 100644 --- a/kbarcode/definitiondialog.cpp +++ b/kbarcode/definitiondialog.cpp @@ -96,11 +96,11 @@ DefinitionDialog::DefinitionDialog( TQWidget* parent, const char* name, bool mo Layout13->addWidget( TextLabel2 ); TextLabel3 = new TQLabel( this, "TextLabel3" ); - TextLabel3->setText( TQString( i18n( "Width (in %1):" ) ).tqarg( Measurements::system() ) ); + TextLabel3->setText( TQString( i18n( "Width (in %1):" ) ).arg( Measurements::system() ) ); Layout13->addWidget( TextLabel3 ); TextLabel4 = new TQLabel( this, "TextLabel4" ); - TextLabel4->setText( TQString( i18n( "Height (in %1):" ) ).tqarg( Measurements::system() ) ); + TextLabel4->setText( TQString( i18n( "Height (in %1):" ) ).arg( Measurements::system() ) ); Layout13->addWidget( TextLabel4 ); TextLabel5 = new TQLabel( this, "TextLabel5" ); @@ -335,7 +335,7 @@ void DefinitionDialog::updatePreview() preview->setRect( TQRect( (int)m.gapLeftMM(), (int)m.gapTopMM(), (int)m.widthMM(), (int)m.heightMM() ) ); preview->setMeasurements( m ); - preview->tqrepaint(); + preview->repaint(); } void DefinitionDialog::drawGraphic() diff --git a/kbarcode/dsrichtext.cpp b/kbarcode/dsrichtext.cpp index 2898f1d..b2444dc 100644 --- a/kbarcode/dsrichtext.cpp +++ b/kbarcode/dsrichtext.cpp @@ -74,11 +74,11 @@ DSRichText::~DSRichText() { } -void DSRichText::initFormat( formated_word* f, int tqalignment ) +void DSRichText::initFormat( formated_word* f, int alignment ) { f->text = TQString(); f->line = false; - f->tqalignment = tqalignment; + f->alignment = alignment; f->font = m_base; f->color = m_color; } @@ -147,7 +147,7 @@ void DSRichText::draw( TQPainter* p ) for( unsigned int i = 0; i < lines.count(); i++ ) { formated_line l = lines[i]; - if( l.formats.count() && l.formats[0].tqalignment == TQt::AlignJustify && i != lines.count() - 1 ) { + if( l.formats.count() && l.formats[0].alignment == TQt::AlignJustify && i != lines.count() - 1 ) { // last line in a paragraph is not justified (in blocksatz mode)! drawJustified( &l ); } else { @@ -157,7 +157,7 @@ void DSRichText::draw( TQPainter* p ) painter->setFont( f.font ); painter->setPen( TQPen( f.color ) ); - int a = f.tqalignment; + int a = f.alignment; if( a == TQt::AlignRight ) { a = TQt::AlignLeft; if( !x ) @@ -208,7 +208,7 @@ void DSRichText::drawJustified( formated_line* line ) bool DSRichText::parseParagraph() { - int tqalignment = 0; + int alignment = 0; formated_word f; TQString d = parse( text, "", pos ); //qDebug("D=" + d ); @@ -218,11 +218,11 @@ bool DSRichText::parseParagraph() if( d.isNull() ) return false; - d = parseParagraphTag( d, &tqalignment ); + d = parseParagraphTag( d, &alignment ); WordList words; TQString data; - initFormat( &f, tqalignment ); + initFormat( &f, alignment ); if( d.isEmpty() ) { // found empty paragraph @@ -237,7 +237,7 @@ bool DSRichText::parseParagraph() data.append( d[i] ); parseWords( data, &f, &words ); - initFormat( &f, tqalignment ); + initFormat( &f, alignment ); data = TQString(); // bail out now, otherwise there is @@ -250,7 +250,7 @@ bool DSRichText::parseParagraph() i += span.length(); if( span.startsWith( "") ) { d = d.mid( 3, d.length() - 3 ); } else if( d.startsWith("

" ) ) { int x = d.find(">" ) + 1; d = d.mid( x, d.length() - x ); diff --git a/kbarcode/dsrichtext.h b/kbarcode/dsrichtext.h index 8381419..8c56b56 100644 --- a/kbarcode/dsrichtext.h +++ b/kbarcode/dsrichtext.h @@ -31,13 +31,13 @@ class DSRichText; /** This class represents one word, * formated with a font, a color and an - * tqalignment. + * alignment. */ struct formated_word { TQString text; TQFont font; TQColor color; - int tqalignment; + int alignment; bool line; }; @@ -138,10 +138,10 @@ class DSRichText { bool parseParagraph(); /** remove

and

from the TQString @p t and return it. * This function is also responsible for getting the - * correct tqalignment of the paragraph. + * correct alignment of the paragraph. */ - TQString parseParagraphTag( const TQString & t, int* tqalignment ); - /** parse the align attribute of a

tag and return the corresponding TQt tqalignment value. + TQString parseParagraphTag( const TQString & t, int* alignment ); + /** parse the align attribute of a

tag and return the corresponding TQt alignment value. */ int parseAlignment( const TQString & align ); /** parse the css style attribute of a tag and return a matching TQFont for these @@ -150,7 +150,7 @@ class DSRichText { TQFont parseStyle( const TQString & s, TQColor* color ); TQString parse( const TQString & t, const TQString & find, const TQString & end, int start ); void parseWords( const TQString & t, formated_word* w, WordList* words ); - void initFormat( formated_word* f, int tqalignment ); + void initFormat( formated_word* f, int alignment ); void initLine( TQValueList* l ); void updateSpacing( TQValueList* l, TQFontMetrics* fm ); /** draw the line @p line justified as blockquote diff --git a/kbarcode/dstextedit.cpp b/kbarcode/dstextedit.cpp index 15eac64..713a52c 100644 --- a/kbarcode/dstextedit.cpp +++ b/kbarcode/dstextedit.cpp @@ -30,7 +30,7 @@ void DSTextEdit::fixParagraphs() struct { TQFont font; TQColor color; - int tqalignment; + int alignment; } tFormattings; TQString t; @@ -57,7 +57,7 @@ void DSTextEdit::fixParagraphs() t = this->text(); tFormattings.font = this->currentFont(); tFormattings.color = this->color(); - tFormattings.tqalignment = this->tqalignment(); + tFormattings.alignment = this->alignment(); while( pos != -1 ) { @@ -101,7 +101,7 @@ void DSTextEdit::fixParagraphs() this->setCursorPosition( 0, index ); this->setCurrentFont( tFormattings.font ); this->setColor( tFormattings.color ); - this->setAlignment( tFormattings.tqalignment ); + this->setAlignment( tFormattings.alignment ); this->setSelection( paraFrom, indexFrom, paraTo, indexTo ); diff --git a/kbarcode/imageitem.cpp b/kbarcode/imageitem.cpp index ea6b40b..a091c37 100644 --- a/kbarcode/imageitem.cpp +++ b/kbarcode/imageitem.cpp @@ -102,7 +102,7 @@ void ImageItem::drawEPcl( TQTextStream* stream ) for( int buf=0; buf < 3; buf++ ){ *stream << TQString("GS %1 32 %1 %1 %1 %1 ") - .tqarg(buf).tqarg(rect().x()).tqarg(rect().y()).tqarg(width).tqarg(height); + .arg(buf).arg(rect().x()).arg(rect().y()).arg(width).arg(height); for( int i=width-1; i >= 0; i-- ){ for( int j=0; j < height; j++ ){ diff --git a/kbarcode/kactionmap.cpp b/kbarcode/kactionmap.cpp index 9ff3b03..89852fe 100644 --- a/kbarcode/kactionmap.cpp +++ b/kbarcode/kactionmap.cpp @@ -67,14 +67,14 @@ public: } void paintCell( TQPainter *p, const TQColorGroup &cg, - int column, int width, int tqalignment ) + int column, int width, int alignment ) { TQColorGroup _cg( cg ); TQColor c = _cg.text(); if( m_action && !m_action->isEnabled() ) _cg.setColor( TQColorGroup::Text, TQt::gray ); - KListViewItem::paintCell( p, _cg, column, width, tqalignment ); + KListViewItem::paintCell( p, _cg, column, width, alignment ); _cg.setColor( TQColorGroup::Text, c ); } diff --git a/kbarcode/kbarcode.cpp b/kbarcode/kbarcode.cpp index d624812..3d13069 100644 --- a/kbarcode/kbarcode.cpp +++ b/kbarcode/kbarcode.cpp @@ -176,7 +176,7 @@ bool KBarcode::parseCmdLine() eFormat = BatchPrinter::POSTSCRIPT; else { - KMessageBox::error( this, i18n("%1 is no valid output format for --output. Valid values are POSTSCRIPT, IMAGE and BARCODE.").tqarg( format ) ); + KMessageBox::error( this, i18n("%1 is no valid output format for --output. Valid values are POSTSCRIPT, IMAGE and BARCODE.").arg( format ) ); } if( args->isSet("barcode") ) diff --git a/kbarcode/labeleditor.cpp b/kbarcode/labeleditor.cpp index 0e887f5..e9246e8 100644 --- a/kbarcode/labeleditor.cpp +++ b/kbarcode/labeleditor.cpp @@ -382,7 +382,7 @@ bool LabelEditor::openUrl( const TQString & url ) if( !d || d->getId() == -1 ) { - KMessageBox::error( this, TQString( i18n("The file %1 cannot be loaded as the label definition is missing.") ).tqarg( filename ) ); + KMessageBox::error( this, TQString( i18n("The file %1 cannot be loaded as the label definition is missing.") ).arg( filename ) ); return false; } @@ -696,15 +696,15 @@ void LabelEditor::changeSize() // TODO: make sure that all items are redrawn. // Otherwise barcodes might become invisible when changing the label c->update(); - cv->tqrepaint(); + cv->repaint(); delete nl; } void LabelEditor::updateInfo() { - statusBar()->changeItem( i18n("Size: ") + TQString("%1%2 x %3%4").tqarg( - d->getMeasurements().width() ).tqarg( Measurements::system() - ).tqarg( d->getMeasurements().height() ).tqarg( Measurements::system() ), STATUS_ID_SIZE ); + statusBar()->changeItem( i18n("Size: ") + TQString("%1%2 x %3%4").arg( + d->getMeasurements().width() ).arg( Measurements::system() + ).arg( d->getMeasurements().height() ).arg( Measurements::system() ), STATUS_ID_SIZE ); statusBar()->changeItem( i18n("Label Template: ") + d->getProducer() + " - " + d->getType(), STATUS_ID_TEMPLATE ); } @@ -1005,7 +1005,7 @@ void LabelEditor::startBarcodeGen() void LabelEditor::startLoadRecentEditor( const KURL& url ) { if( !TQFile::exists( url.path() ) ) { - KMessageBox::information( this, i18n("The file %1 does not exist.").tqarg( url.path() ) ); + KMessageBox::information( this, i18n("The file %1 does not exist.").arg( url.path() ) ); recentAct->removeURL( url ); return; } diff --git a/kbarcode/multilineeditdlg.cpp b/kbarcode/multilineeditdlg.cpp index 9e8dac8..4e09a67 100644 --- a/kbarcode/multilineeditdlg.cpp +++ b/kbarcode/multilineeditdlg.cpp @@ -128,10 +128,10 @@ void MultiLineEditor::setupActions() action_align_justify = new KToggleAction( i18n("&Justify"), "text_block", 0, ac, "format_align_justify" ); connect( action_align_justify, TQT_SIGNAL( toggled(bool) ), TQT_TQOBJECT(this), TQT_SLOT( setAlignJustify(bool) ) ); - action_align_left->setExclusiveGroup( "tqalignment" ); - action_align_center->setExclusiveGroup( "tqalignment" ); - action_align_right->setExclusiveGroup( "tqalignment" ); - action_align_justify->setExclusiveGroup( "tqalignment" ); + action_align_left->setExclusiveGroup( "alignment" ); + action_align_center->setExclusiveGroup( "alignment" ); + action_align_right->setExclusiveGroup( "alignment" ); + action_align_justify->setExclusiveGroup( "alignment" ); //KAction* action_spell = KStdAction::spelling( this, TQT_SLOT( checkSpelling() ), ac ); @@ -193,7 +193,7 @@ void MultiLineEditor::updateCharFmt() void MultiLineEditor::updateAligment() { - int align = editor->tqalignment(); + int align = editor->alignment(); switch ( align ) { case AlignRight: diff --git a/kbarcode/mybarcode.cpp b/kbarcode/mybarcode.cpp index e5c3db3..5a10207 100644 --- a/kbarcode/mybarcode.cpp +++ b/kbarcode/mybarcode.cpp @@ -138,7 +138,7 @@ bool BarCode::createPixmap( TQPixmap* target, int resx, int resy ) double sh = (double)s.height()/72 * resy; KShellProcess proc2; - proc2 << "gs" << TQString("-g%1x%2").tqarg(int(sw*(double)barcode.scale)).tqarg(int(sh*(double)barcode.scale)) + proc2 << "gs" << TQString("-g%1x%2").arg(int(sw*(double)barcode.scale)).arg(int(sh*(double)barcode.scale)) << "-r" + TQString::number( resx*(double)barcode.scale ) + "x" + TQString::number( resy*(double)barcode.scale ) << "-sDEVICE=pbmraw" << "-sOutputFile=" + input->name() << "-sNOPAUSE" << "-q " + output->name() << "-c showpage" << "-c quit"; @@ -246,17 +246,17 @@ bool BarCode::createTBarcode( KTempFile* output ) KShellProcess proc; proc << "tbarcodeclient" << "-f" + output->name(); if( !BarCode::hasFeature( barcode.type, BARCODE2D ) ) - proc << TQString( "m%1" ).tqarg( barcode.tbarcode.modulewidth * 1000 ); + proc << TQString( "m%1" ).arg( barcode.tbarcode.modulewidth * 1000 ); if( BarCode::hasFeature( barcode.type, DATAMATRIX ) ) - proc << TQString( "Ds%1" ).tqarg( barcode.datamatrix.size ); + proc << TQString( "Ds%1" ).arg( barcode.datamatrix.size ); if( BarCode::hasFeature( barcode.type, PDF417BARCODE ) ) - proc << TQString( "Pr%1 Pc%2 Pe%3" ).tqarg( barcode.pdf417.row ) - .tqarg( barcode.pdf417.col ) - .tqarg( barcode.pdf417.err ); + proc << TQString( "Pr%1 Pc%2 Pe%3" ).arg( barcode.pdf417.row ) + .arg( barcode.pdf417.col ) + .arg( barcode.pdf417.err ); - proc << barcode.type << "tPS" << TQString("c%1").tqarg( barcode.tbarcode.checksum ) << flag << "d" + KShellProcess::quote( m_value ); + proc << barcode.type << "tPS" << TQString("c%1").arg( barcode.tbarcode.checksum ) << flag << "d" + KShellProcess::quote( m_value ); proc.start( KProcess::Block, KProcess::NoCommunication ); proc.resume(); diff --git a/kbarcode/mycanvasview.cpp b/kbarcode/mycanvasview.cpp index f2b7596..2c7c7ef 100644 --- a/kbarcode/mycanvasview.cpp +++ b/kbarcode/mycanvasview.cpp @@ -150,8 +150,8 @@ void MyCanvasView::contentsMouseMoveEvent(TQMouseEvent* e) int x = (int)l.pixelToMm( e->x(), TQT_TQPAINTDEVICE(this), LabelUtils::DpiX ); int y = (int)l.pixelToMm( e->y(), TQT_TQPAINTDEVICE(this), LabelUtils::DpiY ); statusbar->changeItem( i18n("Position: ") + - TQString( "%1%2 x %3%4" ).tqarg( x ) - .tqarg( Measurements::system() ).tqarg( y ).tqarg( Measurements::system()), mouseid ); + TQString( "%1%2 x %3%4" ).arg( x ) + .arg( Measurements::system() ).arg( y ).arg( Measurements::system()), mouseid ); } updateCursor( e->pos() ); diff --git a/kbarcode/newlabel.cpp b/kbarcode/newlabel.cpp index d97dd47..d8a3016 100644 --- a/kbarcode/newlabel.cpp +++ b/kbarcode/newlabel.cpp @@ -32,7 +32,7 @@ #include #ifndef I2S - #define I2S(x) TQString("%1").tqarg(x) + #define I2S(x) TQString("%1").arg(x) #endif // I2S NewLabel::NewLabel( TQWidget* parent, const char* name, bool change, WFlags fl ) @@ -171,12 +171,12 @@ void NewLabel::updateText() i18n("%3
Vertical Gap: ") + I2S(d.getMeasurements().gapV()) + i18n("%4
Top Gap: ") + I2S(d.getMeasurements().gapTop()) + i18n("%5
Left Gap: ") + I2S(d.getMeasurements().gapLeft()) + "%6
" - ).tqarg( Measurements::system() ) - .tqarg( Measurements::system() ) - .tqarg( Measurements::system() ) - .tqarg( Measurements::system() ) - .tqarg( Measurements::system() ) - .tqarg( Measurements::system() ) ); + ).arg( Measurements::system() ) + .arg( Measurements::system() ) + .arg( Measurements::system() ) + .arg( Measurements::system() ) + .arg( Measurements::system() ) + .arg( Measurements::system() ) ); preview->setRect( TQRect( (int)d.getMeasurements().gapLeftMM(), (int)d.getMeasurements().gapTopMM(), @@ -184,14 +184,14 @@ void NewLabel::updateText() (int)d.getMeasurements().heightMM() ) ); preview->setMeasurements( d.getMeasurements() ); preview->setPrvEnabled( true ); - preview->tqrepaint(); + preview->repaint(); curid = d.getId(); } else { TextLabel4->setText( i18n("No label selected.") ); preview->setPrvEnabled( false ); - preview->tqrepaint(); + preview->repaint(); } } diff --git a/kbarcode/pixmapbarcode.cpp b/kbarcode/pixmapbarcode.cpp index ce07836..6e84193 100644 --- a/kbarcode/pixmapbarcode.cpp +++ b/kbarcode/pixmapbarcode.cpp @@ -172,9 +172,9 @@ bool PixmapBarcode::createPixmap( TQPixmap* target, int resx, int resy ) sh = (double)(size.y() + size.height()); } - cmd = TQString("gs -g%1x%2").tqarg(int(sw*(double)barkode->scaling())).tqarg(int(sh*(double)barkode->scaling())); + cmd = TQString("gs -g%1x%2").arg(int(sw*(double)barkode->scaling())).arg(int(sh*(double)barkode->scaling())); cmd += " -r" + TQString::number( resx*(double)barkode->scaling()) + "x" + TQString::number( resy*(double)barkode->scaling() ); - cmd += TQString(" -sDEVICE=%1 -sOutputFile=").tqarg( bMonocrome ? "pbmraw" : "ppm" ); + cmd += TQString(" -sDEVICE=%1 -sOutputFile=").arg( bMonocrome ? "pbmraw" : "ppm" ); cmd += input->name(); cmd += " -sNOPAUSE -q - -c showpage quit"; @@ -394,24 +394,24 @@ TQString PixmapBarcode::createTBarcodeCmd() // autocorrection flag.append( barkode->tbarcodeOptions()->autocorrect() ? " Aon" : " Aoff" ); // barcode height - flag.append( TQString( " h%1" ).tqarg( barkode->tbarcodeOptions()->height() ) ); + flag.append( TQString( " h%1" ).arg( barkode->tbarcodeOptions()->height() ) ); // text above if( barkode->tbarcodeOptions()->above() ) flag.append( " a" ); cmd = "tbarcodeclient "; if( !Barkode::hasFeature( barkode->type(), BARCODE2D ) ) - cmd += TQString( " m%1" ).tqarg( barkode->tbarcodeOptions()->moduleWidth() * 1000 ); + cmd += TQString( " m%1" ).arg( barkode->tbarcodeOptions()->moduleWidth() * 1000 ); if( Barkode::hasFeature( barkode->type(), DATAMATRIX ) ) - cmd += TQString( " Ds%1" ).tqarg( barkode->datamatrixSize() ); + cmd += TQString( " Ds%1" ).arg( barkode->datamatrixSize() ); if( Barkode::hasFeature( barkode->type(), PDF417BARCODE ) ) - cmd += TQString( " Pr%1 Pc%2 Pe%3" ).tqarg( barkode->pdf417Options()->row() ) - .tqarg( barkode->pdf417Options()->col() ) - .tqarg( barkode->pdf417Options()->err() ); + cmd += TQString( " Pr%1 Pc%2 Pe%3" ).arg( barkode->pdf417Options()->row() ) + .arg( barkode->pdf417Options()->col() ) + .arg( barkode->pdf417Options()->err() ); - cmd += " " + barkode->type() + TQString(" tPS c%1").tqarg( barkode->tbarcodeOptions()->checksum() ); + cmd += " " + barkode->type() + TQString(" tPS c%1").arg( barkode->tbarcodeOptions()->checksum() ); cmd += flag + " d" + KShellProcess::quote( barkode->parsedValue() ); return cmd; diff --git a/kbarcode/propertywidget.cpp b/kbarcode/propertywidget.cpp index 16cf783..a55c193 100644 --- a/kbarcode/propertywidget.cpp +++ b/kbarcode/propertywidget.cpp @@ -519,7 +519,7 @@ void PropertyImage::applySettings( DocumentItem* item, KMacroCommand* command ) if( !imgUrl->url().isEmpty() ) { if( !pix.load( imgUrl->url() ) ) - KMessageBox::error( NULL, TQString( i18n("Image format not supported for file: %1") ).tqarg( imgUrl->url() ) ); + KMessageBox::error( NULL, TQString( i18n("Image format not supported for file: %1") ).arg( imgUrl->url() ) ); } else { diff --git a/kbarcode/purepostscript.cpp b/kbarcode/purepostscript.cpp index cdbf1e9..43c7f84 100644 --- a/kbarcode/purepostscript.cpp +++ b/kbarcode/purepostscript.cpp @@ -190,8 +190,8 @@ void PurePostscriptBarcode::createProgram( TQString & prg ) prg = "%!PS-Adobe-2.0 EPSF-2.0\n%%EndComments\n%%EndProlog\n"; prg += m_program; prg += TQString("20 20 moveto\n(%1) (%2) %3 barcode\n") - .tqarg( barkode->parsedValue() ) - .tqarg( opt ).tqarg( type ); + .arg( barkode->parsedValue() ) + .arg( opt ).arg( type ); } TQRect PurePostscriptBarcode::bbox( const char* postscript, long postscript_size ) @@ -206,7 +206,7 @@ TQRect PurePostscriptBarcode::bbox( const char* postscript, long postscript_size psfile.file()->writeBlock( postscript, postscript_size ); psfile.file()->close(); - if( !readFromPipe( TQString( gs_bbox ).tqarg( psfile.file()->name() ).latin1(), &buffer, &len ) || !len ) + if( !readFromPipe( TQString( gs_bbox ).arg( psfile.file()->name() ).latin1(), &buffer, &len ) || !len ) { psfile.unlink(); return TQRect( 0, 0, 0, 0 ); diff --git a/kbarcode/rectitem.cpp b/kbarcode/rectitem.cpp index 40ce7fa..9e52e97 100644 --- a/kbarcode/rectitem.cpp +++ b/kbarcode/rectitem.cpp @@ -81,9 +81,9 @@ void RectItem::drawZpl( TQTextStream* stream ) *stream << ZPLUtils::fieldOrigin( rect().x(), rect().y() ); if( m_circle ) - *stream << TQString("~GE%1,%2,%3,B").tqarg( rect().width() ).tqarg( rect().height() ).tqarg( thick ); + *stream << TQString("~GE%1,%2,%3,B").arg( rect().width() ).arg( rect().height() ).arg( thick ); else - *stream << TQString("~GB%1,%2,%3,B,0").tqarg( rect().width() ).tqarg( rect().height() ).tqarg( thick ); + *stream << TQString("~GB%1,%2,%3,B,0").arg( rect().width() ).arg( rect().height() ).arg( thick ); } void RectItem::drawIpl( TQTextStream* stream, IPLUtils* utils ) @@ -97,12 +97,12 @@ void RectItem::drawIpl( TQTextStream* stream, IPLUtils* utils ) { int counter = utils->counter(); - TQString s = TQString("W%1;").tqarg( counter ); // field number + TQString s = TQString("W%1;").arg( counter ); // field number s += utils->fieldOrigin( rect().x(), rect().y() ); - s += TQString("l%1;").tqarg( rect().width() ); // box length - s += TQString("h%1;").tqarg( rect().height() ); // box height - s += TQString("w%1;").tqarg( thick ); + s += TQString("l%1;").arg( rect().width() ); // box length + s += TQString("h%1;").arg( rect().height() ); // box height + s += TQString("w%1;").arg( thick ); *stream << utils->field( s ); } @@ -110,11 +110,11 @@ void RectItem::drawIpl( TQTextStream* stream, IPLUtils* utils ) void RectItem::drawEPcl( TQTextStream* stream ) { - TQString s = TQString("C %1").tqarg( rect().x()+1 ); - s += TQString(" %1").tqarg( rect().y()+1 ); - s += TQString(" %1").tqarg( rect().width() ); - s += TQString(" %1").tqarg( rect().height() ); - s += TQString(" %1 2").tqarg( pen().width() ); + TQString s = TQString("C %1").arg( rect().x()+1 ); + s += TQString(" %1").arg( rect().y()+1 ); + s += TQString(" %1").arg( rect().width() ); + s += TQString(" %1").arg( rect().height() ); + s += TQString(" %1 2").arg( pen().width() ); *stream << EPCLUtils::field( s ); } diff --git a/kbarcode/sqltables.cpp b/kbarcode/sqltables.cpp index a9b6767..79ae9d7 100644 --- a/kbarcode/sqltables.cpp +++ b/kbarcode/sqltables.cpp @@ -383,7 +383,7 @@ void SqlTables::updateTables() // check for field0 - field9 (1.4.0) TQStringList fields; for( unsigned int i = 0; i < 10; i++ ) - fields.append( TQString("field%1").tqarg( i ) ); + fields.append( TQString("field%1").arg( i ) ); TQSqlQuery query("SHOW FIELDS FROM " TABLE_BASIC ); while ( query.next() ) diff --git a/kbarcode/tbarcode2.cpp b/kbarcode/tbarcode2.cpp index 22ae500..eb98756 100644 --- a/kbarcode/tbarcode2.cpp +++ b/kbarcode/tbarcode2.cpp @@ -141,7 +141,7 @@ TQRect TBarcode2::bbox( const char* postscript, long postscript_size ) psfile.file()->writeBlock( postscript, postscript_size ); psfile.file()->close(); - if( !readFromPipe( TQString( gs_bbox ).tqarg( psfile.file()->name() ).latin1(), &buffer, &len ) || !len ) + if( !readFromPipe( TQString( gs_bbox ).arg( psfile.file()->name() ).latin1(), &buffer, &len ) || !len ) { psfile.unlink(); return TQRect( 0, 0, 0, 0 ); diff --git a/kbarcode/tec.cpp b/kbarcode/tec.cpp index b217f4c..7d20b79 100644 --- a/kbarcode/tec.cpp +++ b/kbarcode/tec.cpp @@ -91,14 +91,14 @@ TQString tec452(const TQString &url, int count, const TQString &art, const TQStr TQDomElement e = n.toElement(); // try to convert the node to an element. if( !e.isNull() ) if( e.tagName() == "id" ) { - result += TQString("{D%1,").tqarg( convZeros((e.attribute( "height" ).toInt() + e.attribute( "gap_v" ).toInt())*10,4)); // Altura + Gap vertical - result += TQString("%1,").tqarg( convZeros(e.attribute( "width" ).toInt()*10,4) ); // Anchura - result += TQString("%1|}\n").tqarg( convZeros(e.attribute( "height" ).toInt()*10,4) ); // Altura + result += TQString("{D%1,").arg( convZeros((e.attribute( "height" ).toInt() + e.attribute( "gap_v" ).toInt())*10,4)); // Altura + Gap vertical + result += TQString("%1,").arg( convZeros(e.attribute( "width" ).toInt()*10,4) ); // Anchura + result += TQString("%1|}\n").arg( convZeros(e.attribute( "height" ).toInt()*10,4) ); // Altura result += TQString("{C|}\n"); // Clear buffer result += TQString("{U2;0130|}\n"); // BackFeed - result += TQString("{D%1,").tqarg( convZeros((e.attribute( "height" ).toInt() + e.attribute( "gap_v" ).toInt())*10,4)); // Altura + Gap vertical - result += TQString("%1,").tqarg( convZeros(e.attribute( "width" ).toInt()*10,4) ); // Anchura - result += TQString("%1|}\n").tqarg( convZeros(e.attribute( "height" ).toInt()*10,4) ); // Altura + result += TQString("{D%1,").arg( convZeros((e.attribute( "height" ).toInt() + e.attribute( "gap_v" ).toInt())*10,4)); // Altura + Gap vertical + result += TQString("%1,").arg( convZeros(e.attribute( "width" ).toInt()*10,4) ); // Anchura + result += TQString("%1|}\n").arg( convZeros(e.attribute( "height" ).toInt()*10,4) ); // Altura result += TQString("{AX;+000,+000,+00|}\n"); // Position Fine adjust result += TQString("{AY;+04,1|}\n"); // Print density fine adjust @@ -130,20 +130,20 @@ TQString tec452(const TQString &url, int count, const TQString &art, const TQStr if( e.tagName() == "value" ) data = e.text(); n = n.nextSibling(); } - result += TQString("{RB%1;").tqarg( convZeros(countBar, 2) ); // count de RB - result += TQString("%1|}\n").tqarg( data ); // Data + fin + result += TQString("{RB%1;").arg( convZeros(countBar, 2) ); // count de RB + result += TQString("%1|}\n").arg( data ); // Data + fin countBar++; } else if( e.tagName() == "textfield" ) { - result += TQString("{PC%1;").tqarg( convZeros(countText, 3) ); // count - result += TQString("%1,").tqarg( posConv(e.attribute( "x_mm"), 4 ) ); // X position - result += TQString("%1,").tqarg( posConv(e.attribute( "y_mm"), 4 ) ); // Y position - result += TQString("%1,").tqarg( "10" ); - result += TQString("%1,").tqarg( "15" ); - result += TQString("%1,").tqarg( "J" ); - result += TQString("%1,").tqarg( "00" ); - result += TQString("%1|}\n").tqarg( "B" ); + result += TQString("{PC%1;").arg( convZeros(countText, 3) ); // count + result += TQString("%1,").arg( posConv(e.attribute( "x_mm"), 4 ) ); // X position + result += TQString("%1,").arg( posConv(e.attribute( "y_mm"), 4 ) ); // Y position + result += TQString("%1,").arg( "10" ); + result += TQString("%1,").arg( "15" ); + result += TQString("%1,").arg( "J" ); + result += TQString("%1,").arg( "00" ); + result += TQString("%1|}\n").arg( "B" ); TQString etext; TQDomNode n = e.firstChild(); @@ -155,9 +155,9 @@ TQString tec452(const TQString &url, int count, const TQString &art, const TQStr n = n.nextSibling(); } - result += TQString("{RC%1;").tqarg( convZeros(countText, 3) ); // count de RB + result += TQString("{RC%1;").arg( convZeros(countText, 3) ); // count de RB etext=getData(etext, art, group, id ); - result += TQString("%1|}\n").tqarg( etext ); // Data + fin + result += TQString("%1|}\n").arg( etext ); // Data + fin countText++; } else if( e.tagName() == "rect" ) { @@ -165,40 +165,40 @@ TQString tec452(const TQString &url, int count, const TQString &art, const TQStr if (e.attribute("colorr")=="0" and e.attribute("colorg")=="0" and e.attribute("colorb")=="0") { result += TQString("{XR;"); // XR - result += TQString("%1,").tqarg( posConv(e.attribute( "x_mm"), 4 ) ); // X position - result += TQString("%1,").tqarg( posConv(e.attribute( "y_mm"), 4 ) ); // Y position - result += TQString("%1,").tqarg( convZeros(posConv(e.attribute( "x_mm"), 4 ).toInt()+posConv(e.attribute( "width_mm"),4 ).toInt(),4)); // X position - result += TQString("%1,").tqarg( convZeros(posConv(e.attribute( "y_mm"), 4 ).toInt()+posConv(e.attribute( "height_mm"),4 ).toInt(),4)); // Y position + result += TQString("%1,").arg( posConv(e.attribute( "x_mm"), 4 ) ); // X position + result += TQString("%1,").arg( posConv(e.attribute( "y_mm"), 4 ) ); // Y position + result += TQString("%1,").arg( convZeros(posConv(e.attribute( "x_mm"), 4 ).toInt()+posConv(e.attribute( "width_mm"),4 ).toInt(),4)); // X position + result += TQString("%1,").arg( convZeros(posConv(e.attribute( "y_mm"), 4 ).toInt()+posConv(e.attribute( "height_mm"),4 ).toInt(),4)); // Y position result += TQString("A"); // Type of Clear result += TQString("|}\n"); // FIN result += TQString("{XR;"); // XR - result += TQString("%1,").tqarg( posConv(e.attribute( "x_mm"), 4 ) ); // X position - result += TQString("%1,").tqarg( posConv(e.attribute( "y_mm"), 4 ) ); // Y position - result += TQString("%1,").tqarg( convZeros(posConv(e.attribute( "x_mm"), 4 ).toInt()+posConv(e.attribute( "width_mm"),4 ).toInt(),4)); // X position - result += TQString("%1,").tqarg( convZeros(posConv(e.attribute( "y_mm"), 4 ).toInt()+posConv(e.attribute( "height_mm"),4 ).toInt(),4)); // Y position + result += TQString("%1,").arg( posConv(e.attribute( "x_mm"), 4 ) ); // X position + result += TQString("%1,").arg( posConv(e.attribute( "y_mm"), 4 ) ); // Y position + result += TQString("%1,").arg( convZeros(posConv(e.attribute( "x_mm"), 4 ).toInt()+posConv(e.attribute( "width_mm"),4 ).toInt(),4)); // X position + result += TQString("%1,").arg( convZeros(posConv(e.attribute( "y_mm"), 4 ).toInt()+posConv(e.attribute( "height_mm"),4 ).toInt(),4)); // Y position result += TQString("B"); // Type of Clear result += TQString("|}\n"); // FIN } else { result += TQString("{LC;"); // LC - result += TQString("%1,").tqarg( posConv(e.attribute( "x_mm"), 4 ) ); // X position - result += TQString("%1,").tqarg( posConv(e.attribute( "y_mm"), 4 ) ); // Y position - result += TQString("%1,").tqarg( convZeros(posConv(e.attribute( "x_mm"), 4 ).toInt()+posConv(e.attribute( "width_mm"),4 ).toInt(),4)); // X position - result += TQString("%1,").tqarg( convZeros(posConv(e.attribute( "y_mm"), 4 ).toInt()+posConv(e.attribute( "height_mm"),4 ).toInt(),4)); // Y position + result += TQString("%1,").arg( posConv(e.attribute( "x_mm"), 4 ) ); // X position + result += TQString("%1,").arg( posConv(e.attribute( "y_mm"), 4 ) ); // Y position + result += TQString("%1,").arg( convZeros(posConv(e.attribute( "x_mm"), 4 ).toInt()+posConv(e.attribute( "width_mm"),4 ).toInt(),4)); // X position + result += TQString("%1,").arg( convZeros(posConv(e.attribute( "y_mm"), 4 ).toInt()+posConv(e.attribute( "height_mm"),4 ).toInt(),4)); // Y position result += TQString("1,"); // Type of line 0=line 1=Rectangulo 2=Jagged line 3=Rectangle with jagged lines - result += TQString("%1").tqarg(lineWidth(e)); // No. of line width dots 1-9 + result += TQString("%1").arg(lineWidth(e)); // No. of line width dots 1-9 //result += TQString("999"); // Radius of rounded corners of a rectangle result += TQString("|}\n"); // FIN } } else if( e.tagName() == "line" ) { result += TQString("{LC;"); // LC - result += TQString("%1,").tqarg( posConv(e.attribute( "x_mm"), 4 ) ); // X position - result += TQString("%1,").tqarg( posConv(e.attribute( "y_mm"), 4 ) ); // Y position - result += TQString("%1,").tqarg( convZeros(posConv(e.attribute( "x_mm"), 4 ).toInt()+posConv(e.attribute( "width_mm"),4 ).toInt(),4)); // X position - result += TQString("%1,").tqarg( convZeros(posConv(e.attribute( "y_mm"), 4 ).toInt()+posConv(e.attribute( "height_mm"),4 ).toInt(),4)); // Y position + result += TQString("%1,").arg( posConv(e.attribute( "x_mm"), 4 ) ); // X position + result += TQString("%1,").arg( posConv(e.attribute( "y_mm"), 4 ) ); // Y position + result += TQString("%1,").arg( convZeros(posConv(e.attribute( "x_mm"), 4 ).toInt()+posConv(e.attribute( "width_mm"),4 ).toInt(),4)); // X position + result += TQString("%1,").arg( convZeros(posConv(e.attribute( "y_mm"), 4 ).toInt()+posConv(e.attribute( "height_mm"),4 ).toInt(),4)); // Y position result += TQString("0,"); // Type of line 0=line 1=Rectangulo 2=Jagged line 3=Rectangle with jagged lines - result += TQString("%1").tqarg(lineWidth(e)); // No. of line width dots 1-9 + result += TQString("%1").arg(lineWidth(e)); // No. of line width dots 1-9 //result += TQString("999"); // Radius of rounded corners of a rectangle result += TQString("|}\n"); // FIN } @@ -206,7 +206,7 @@ TQString tec452(const TQString &url, int count, const TQString &art, const TQStr } result += TQString("{U1;0130|}\n"); // ForwardFeed - result += TQString("{XS;I,%1,0000C2000|}\n").tqarg(convZeros(count,4)); // Issue Command + result += TQString("{XS;I,%1,0000C2000|}\n").arg(convZeros(count,4)); // Issue Command return result; } @@ -214,7 +214,7 @@ TQString tec452(const TQString &url, int count, const TQString &art, const TQStr TQString convZeros( int count, int zeros ) { -TQString str= TQString("%1").tqarg(count); +TQString str= TQString("%1").arg(count); int l=strlen(str); //get the string length for(;l]*>"), "" ); - TQString s = TQString("H%1;").tqarg( counter ); // field number + TQString s = TQString("H%1;").arg( counter ); // field number s += utils->fieldOrigin( rect().x(), rect().y() ); - s += TQString("c%1;").tqarg( 2 ); // font - s += TQString("h%1;").tqarg( 2 ); // vertical magnification ("height") - s += TQString("w%1;").tqarg( 2 ); // horicontyl magnification ("width") - s += TQString("d0,%1;").tqarg( data.length() ); // max length of data ! + s += TQString("c%1;").arg( 2 ); // font + s += TQString("h%1;").arg( 2 ); // vertical magnification ("height") + s += TQString("w%1;").arg( 2 ); // horicontyl magnification ("width") + s += TQString("d0,%1;").arg( data.length() ); // max length of data ! *stream << utils->field( s ); utils->addValue( data ); @@ -165,9 +165,9 @@ void TextItem::drawEPcl( TQTextStream* stream ) TQStringList::Iterator line = lines.begin(); for( int i=0; line != lines.end(); ++line, ++i ){ - TQString s = TQString("T %1").tqarg( rect().x() + 1 ); - s += TQString(" %1 0 0 0 50 1").tqarg( rect().y()+50+1 + i*52 ); - s += TQString(" %1").tqarg( *line ); + TQString s = TQString("T %1").arg( rect().x() + 1 ); + s += TQString(" %1 0 0 0 50 1").arg( rect().y()+50+1 + i*52 ); + s += TQString(" %1").arg( *line ); *stream << EPCLUtils::field( s ); } } diff --git a/kbarcode/textlineitem.cpp b/kbarcode/textlineitem.cpp index c387bc2..2beaabf 100644 --- a/kbarcode/textlineitem.cpp +++ b/kbarcode/textlineitem.cpp @@ -99,14 +99,14 @@ void TextLineItem::drawIpl( TQTextStream* stream, IPLUtils* utils ) // simply remove all html tags.... TQString data = m_text.replace( TQRegExp("<[^>]*>"), "" ); - TQString s = TQString("H%1;").tqarg( counter ); // field number + TQString s = TQString("H%1;").arg( counter ); // field number s += utils->fieldOrigin( rect().x(), rect().y() ); - s += TQString("c%1;").tqarg( 2 ); // font - s += TQString("h%1;").tqarg( 2 ); // vertical magnification ("height") - s += TQString("w%1;").tqarg( 2 ); // horicontyl magnification ("width") - s += TQString("d0,%1;").tqarg( data.length() ); // max length of data ! + s += TQString("c%1;").arg( 2 ); // font + s += TQString("h%1;").arg( 2 ); // vertical magnification ("height") + s += TQString("w%1;").arg( 2 ); // horicontyl magnification ("width") + s += TQString("d0,%1;").arg( data.length() ); // max length of data ! *stream << utils->field( s ); utils->addValue( data ); @@ -129,9 +129,9 @@ void TextLineItem::drawEPcl( TQTextStream* stream ) TQStringList::Iterator line = lines.begin(); for( int i=0; line != lines.end(); ++line, ++i ){ - TQString s = TQString("T %1").tqarg( rect().x() + 1 ); - s += TQString(" %1 0 0 0 50 1").tqarg( rect().y()+50+1 + i*52 ); - s += TQString(" %1").tqarg( *line ); + TQString s = TQString("T %1").arg( rect().x() + 1 ); + s += TQString(" %1 0 0 0 50 1").arg( rect().y()+50+1 + i*52 ); + s += TQString(" %1").arg( *line ); *stream << EPCLUtils::field( s ); } } diff --git a/kbarcode/tokendialog.cpp b/kbarcode/tokendialog.cpp index 83a6575..1a3de7d 100644 --- a/kbarcode/tokendialog.cpp +++ b/kbarcode/tokendialog.cpp @@ -266,9 +266,9 @@ void TokenDialog::accept() m_result = listVariable->currentText(); } else if( radioSQLQuery->isChecked() ) - m_result = TQString( "sqlquery:%2").tqarg( editQuery->text() ); + m_result = TQString( "sqlquery:%2").arg( editQuery->text() ); else if( radioJavaScript->isChecked() ) - m_result = TQString( "js:%2").tqarg( editJavaScript->text() ); + m_result = TQString( "js:%2").arg( editJavaScript->text() ); m_result = "[" + m_result + "]"; } @@ -279,10 +279,10 @@ void TokenDialog::accept() if( item ) { for( unsigned int i = 0; i < m_tokens.count(); i++ ) - if( TQString( "[%1]").tqarg( m_tokens[i].token ) == item->text( 0 ) ) + if( TQString( "[%1]").arg( m_tokens[i].token ) == item->text( 0 ) ) { if( m_tokens[i].appendix ) - m_result = TQString( "[%1%2]").tqarg( m_tokens[i].token ).tqarg( lineEdit->text() ); + m_result = TQString( "[%1%2]").arg( m_tokens[i].token ).arg( lineEdit->text() ); else m_result = item->text( 0 ); break; @@ -378,7 +378,7 @@ void TokenDialog::initStackPage2() if( (*categories)[i].category == cat ) { for( unsigned int z = 0; z < (*categories)[i].tokens.count(); z++ ) - labelList->insertItem( new KListViewItem( labelList, TQString( "[%1]").tqarg( (*categories)[i].tokens[z].token ), + labelList->insertItem( new KListViewItem( labelList, TQString( "[%1]").arg( (*categories)[i].tokens[z].token ), (*categories)[i].tokens[z].description ) ); break; @@ -396,7 +396,7 @@ void TokenDialog::categoryChanged( TQListBoxItem* item ) if( item->prev() == 0 ) { for( i = 0; i < m_tokens.count(); i++ ) - allList->insertItem( new KListViewItem( allList, TQString( "[%1]").tqarg( m_tokens[i].token ), + allList->insertItem( new KListViewItem( allList, TQString( "[%1]").arg( m_tokens[i].token ), m_tokens[i].description ) ); } else @@ -406,7 +406,7 @@ void TokenDialog::categoryChanged( TQListBoxItem* item ) if( TokenProvider::captionForCategory( (TokenProvider::ECategories)(*categories)[i].category ) == item->text() ) { for( unsigned int z = 0; z < (*categories)[i].tokens.count(); z++ ) - allList->insertItem( new KListViewItem( allList, TQString( "[%1]").tqarg( (*categories)[i].tokens[z].token ), + allList->insertItem( new KListViewItem( allList, TQString( "[%1]").arg( (*categories)[i].tokens[z].token ), (*categories)[i].tokens[z].description ) ); break; @@ -416,7 +416,7 @@ void TokenDialog::categoryChanged( TQListBoxItem* item ) // TODO: comparing by a user visible string cries for bugs!!! if( item->text() == i18n("Custom Values") ) for( i=0;iinsertItem( new KListViewItem( allList, TQString( "[%1]").tqarg( m_custom_tokens[i] ), + allList->insertItem( new KListViewItem( allList, TQString( "[%1]").arg( m_custom_tokens[i] ), i18n("Variable defined by the user for this label.") ) ); } } @@ -425,7 +425,7 @@ void TokenDialog::itemChanged( TQListViewItem* item ) { for( unsigned int i = 0; i < m_tokens.count(); i++ ) { - if( TQString( "[%1]").tqarg( m_tokens[i].token ) == item->text( 0 ) ) + if( TQString( "[%1]").arg( m_tokens[i].token ) == item->text( 0 ) ) { lineEdit->setEnabled( m_tokens[i].appendix ); if( m_tokens[i].appendix ) diff --git a/kbarcode/tokenprovider.cpp b/kbarcode/tokenprovider.cpp index a66d09b..63ba755 100644 --- a/kbarcode/tokenprovider.cpp +++ b/kbarcode/tokenprovider.cpp @@ -216,11 +216,11 @@ void TokenProvider::init() category.tokens.append( tToken( TOK_ARTICLE_DESC, i18n("Article description from barcode_basic") ) ); category.tokens.append( tToken( TOK_ARTICLE_NO, i18n("Article number from barcode_basic") ) ); for( int i = 0; i < NUM_FIELDS; i++ ) - category.tokens.append( tToken( TQString( TOK_LINE ).tqarg( i ), - TQString( TOK_LINE ).tqarg( i ) + " from customer_text" ) ); + category.tokens.append( tToken( TQString( TOK_LINE ).arg( i ), + TQString( TOK_LINE ).arg( i ) + " from customer_text" ) ); for( int i = 0; i < NUM_FIELDS; i++ ) - category.tokens.append( tToken( TQString( TOK_FIELD ).tqarg( i ), - TQString( TOK_FIELD ).tqarg( i ) + " from barcode_basic" ) ); + category.tokens.append( tToken( TQString( TOK_FIELD ).arg( i ), + TQString( TOK_FIELD ).arg( i ) + " from barcode_basic" ) ); category.tokens.append( tToken( TOK_CUSTOMER_NO, i18n("customer number of the current customer") ) ); category.tokens.append( tToken( TOK_CUSTOEMR_NAME, i18n("name of the current customer") ) ); category.tokens.append( tToken( TOK_BARCODE_NO, i18n("Barcode number from barcode_basic") ) ); @@ -460,7 +460,7 @@ TQString TokenProvider::process( const TQString & t ) { for( i = 0; i < NUM_FIELDS; i++ ) { - const TQString c = TQString( TOK_LINE ).tqarg( i ); + const TQString c = TQString( TOK_LINE ).arg( i ); if( t == c ) ret = query( "SELECT " + c + " FROM " + TABLE_CUSTOMER_TEXT + " WHERE article_no='" + article_no + "' AND customer_no='" + customer_no + "'"); @@ -468,7 +468,7 @@ TQString TokenProvider::process( const TQString & t ) for( i = 0; i < NUM_FIELDS; i++ ) { - const TQString c = TQString( TOK_FIELD ).tqarg( i ); + const TQString c = TQString( TOK_FIELD ).arg( i ); if( t == c ) ret = query("SELECT " + c + " FROM " + TABLE_BASIC + " WHERE article_no='" + article_no + "'"); } @@ -558,7 +558,7 @@ TQString TokenProvider::process( const TQString & t ) if( m_printer && t == TOK_RESOLUTION ) { TQPaintDeviceMetrics metrics( m_printer ); - ret = TQString( "%1dpi" ).tqarg( metrics.logicalDpiY() ); + ret = TQString( "%1dpi" ).arg( metrics.logicalDpiY() ); } if( !m_serial.isEmpty() && t == TOK_SERIAL ) diff --git a/kbarcode/xmlutils.cpp b/kbarcode/xmlutils.cpp index 27cbfb8..e87e999 100644 --- a/kbarcode/xmlutils.cpp +++ b/kbarcode/xmlutils.cpp @@ -112,7 +112,7 @@ void XMLUtils::writeXMLHeader( TQDomNode* root, const TQString & description, De TQDomElement labelid = root->ownerDocument().createElement( "id" ); writeDefinition( &labelid, def ); - labelid.appendChild( root->ownerDocument().createTextNode( TQString( "%1" ).tqarg(def->getId()) ) ); + labelid.appendChild( root->ownerDocument().createTextNode( TQString( "%1" ).arg(def->getId()) ) ); data.appendChild( labelid ); root->appendChild( data ); @@ -279,9 +279,9 @@ TQColor XMLUtils::readXMLColor( TQDomElement* tag, const TQString & prefix, TQCo int g = c.green(); int b = c.blue(); - r = tag->attribute( prefix + "r", TQString("%1").tqarg( r ) ).toInt(); - g = tag->attribute( prefix + "g", TQString("%1").tqarg( g ) ).toInt(); - b = tag->attribute( prefix + "b", TQString("%1").tqarg( b ) ).toInt(); + r = tag->attribute( prefix + "r", TQString("%1").arg( r ) ).toInt(); + g = tag->attribute( prefix + "g", TQString("%1").arg( g ) ).toInt(); + b = tag->attribute( prefix + "b", TQString("%1").arg( b ) ).toInt(); return TQColor( r, g, b); } diff --git a/kbarcode/zplutils.cpp b/kbarcode/zplutils.cpp index 239959a..c9fe674 100644 --- a/kbarcode/zplutils.cpp +++ b/kbarcode/zplutils.cpp @@ -123,7 +123,7 @@ TQString ZPLUtils::fieldOrigin( int x, int y ) { TQString zpl = TQString(); - zpl = TQString("^FO%1,%2\n").tqarg( x ).tqarg( y ); // field origin + zpl = TQString("^FO%1,%2\n").arg( x ).arg( y ); // field origin return zpl; } @@ -243,7 +243,7 @@ TQString IPLUtils::field( const TQString & data ) TQString IPLUtils::fieldOrigin( int x, int y ) { - return TQString("o%1,%2;f0;").tqarg( x ).tqarg( y ); // field origin + return TQString("o%1,%2;f0;").arg( x ).arg( y ); // field origin } TQString IPLUtils::footer()