Remove additional unneeded tq method conversions

(cherry picked from commit 4541cff710)
v3.5.13-sru
Timothy Pearson 13 years ago committed by Slávek Banko
parent 16d04a9d15
commit c3a149dc44

@ -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 );
}

@ -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("<qt>Can't open the file or device <b>%1</b></qt>.") ).tqarg( m_path ) );
KMessageBox::error( parent, TQString( i18n("<qt>Can't open the file or device <b>%1</b></qt>.") ).arg( m_path ) );
return;
}

@ -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;
}

@ -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

@ -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

@ -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();
}

@ -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 )

@ -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()

@ -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, "<p", "</p>", 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( "<span " ) ) {
initFormat( &f, tqalignment );
initFormat( &f, alignment );
f.font = parseStyle( parse( span, "style=\"", "\"", 0 ), &f.color );
}
}
@ -403,13 +403,13 @@ TQString DSRichText::replaceEscapeSequences( const TQString & t )
return tmp;
}
TQString DSRichText::parseParagraphTag( const TQString &t, int* tqalignment )
TQString DSRichText::parseParagraphTag( const TQString &t, int* alignment )
{
TQString d = TQString( t );
if( d.startsWith("<p>") ) {
d = d.mid( 3, d.length() - 3 );
} else if( d.startsWith("<p ") ) {
*tqalignment = parseAlignment( parse( d, "align=\"", "\"", 0 ) );
*alignment = parseAlignment( parse( d, "align=\"", "\"", 0 ) );
if( d.contains( ">" ) ) {
int x = d.find(">" ) + 1;
d = d.mid( x, d.length() - x );

@ -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 <p> and </p> 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 <p> tag and return the corresponding TQt tqalignment value.
TQString parseParagraphTag( const TQString & t, int* alignment );
/** parse the align attribute of a <p> tag and return the corresponding TQt alignment value.
*/
int parseAlignment( const TQString & align );
/** parse the css style attribute of a <span> 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<formated_line>* l );
void updateSpacing( TQValueList<formated_line>* l, TQFontMetrics* fm );
/** draw the line @p line justified as blockquote

@ -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 );

@ -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++ ){

@ -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 );
}

@ -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") )

@ -382,7 +382,7 @@ bool LabelEditor::openUrl( const TQString & url )
if( !d || d->getId() == -1 )
{
KMessageBox::error( this, TQString( i18n("<qt>The file <b>%1</b> cannot be loaded as the label definition is missing.</qt>") ).tqarg( filename ) );
KMessageBox::error( this, TQString( i18n("<qt>The file <b>%1</b> cannot be loaded as the label definition is missing.</qt>") ).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;
}

@ -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:

@ -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();

@ -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() );

@ -32,7 +32,7 @@
#include <kpushbutton.h>
#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<br>Vertical Gap: ") + I2S(d.getMeasurements().gapV()) +
i18n("%4<br>Top Gap: ") + I2S(d.getMeasurements().gapTop()) +
i18n("%5<br>Left Gap: ") + I2S(d.getMeasurements().gapLeft()) + "%6<br>"
).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();
}
}

@ -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;

@ -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
{

@ -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 );

@ -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 );
}

@ -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() )

@ -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 );

@ -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<zeros;l++) str = TQString("0") + str;
return str;
@ -223,9 +223,9 @@ return str;
TQString posConv( TQString str, int zeros )
{
int point=str.find(".",0);
TQString dec= TQString("%1").tqarg(str.mid(point+1,1));
TQString dec= TQString("%1").arg(str.mid(point+1,1));
str = str.mid(0,point);
str = TQString("%1%2").tqarg(str).tqarg(dec);
str = TQString("%1%2").arg(str).arg(dec);
return convZeros (str.toInt(), zeros);
}
@ -240,20 +240,20 @@ else return 0;
TQString code39 (const TQDomElement &e, int countBar) {
TQString result;
result += TQString("{XB%1;").tqarg( convZeros(countBar, 2) ); // 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( barcodeType( e.attribute( "type") ) ); // Type of bar code
result += TQString(",%1").tqarg( withChecksum(e) ); // Type of check digit
result += TQString(",%1").tqarg( "03" ); // Narrow bar width
result += TQString(",%1").tqarg( "03" ); // Narrow space width
result += TQString(",%1").tqarg( "06" ); // Wide bar width
result += TQString(",%1").tqarg( "06" ); // Wide space width
result += TQString(",%1").tqarg( "03" ); // Character to Character space width
result += TQString(",%1").tqarg( rotation(e.attribute( "rotation", "0" ).toInt())); // Rotation angel of barcode
result += TQString(",%1").tqarg( "0063" ); // height of barcode
result += TQString(",+%1").tqarg( sequence(e) ); // Increment / Decrement
result += TQString(",%1").tqarg( e.attribute( "text", "1" ).toInt() ); // Selection of print or non print of numerals under bars
result += TQString("{XB%1;").arg( convZeros(countBar, 2) ); // 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( barcodeType( e.attribute( "type") ) ); // Type of bar code
result += TQString(",%1").arg( withChecksum(e) ); // Type of check digit
result += TQString(",%1").arg( "03" ); // Narrow bar width
result += TQString(",%1").arg( "03" ); // Narrow space width
result += TQString(",%1").arg( "06" ); // Wide bar width
result += TQString(",%1").arg( "06" ); // Wide space width
result += TQString(",%1").arg( "03" ); // Character to Character space width
result += TQString(",%1").arg( rotation(e.attribute( "rotation", "0" ).toInt())); // Rotation angel of barcode
result += TQString(",%1").arg( "0063" ); // height of barcode
result += TQString(",+%1").arg( sequence(e) ); // Increment / Decrement
result += TQString(",%1").arg( e.attribute( "text", "1" ).toInt() ); // Selection of print or non print of numerals under bars
result += TQString(",00"); //Number of Zeros to be suppressed
result += TQString("|}\n"); // FIN
@ -371,17 +371,17 @@ return convZeros(e.attribute("sequencestep" ,"0").toInt() ,10);
TQString code128 (const TQDomElement &e, int countBar) {
TQString result;
result += TQString("{XB%1;").tqarg( convZeros(countBar, 2) ); // 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( barcodeType( e.attribute( "type") ) ); // Type of bar code
result += TQString(",%1").tqarg( withChecksum(e) ); // Type of check digit
result += TQString(",%1").tqarg( "03" ); // 1 module width
result += TQString(",%1").tqarg( rotation(e.attribute( "rotation", "0" ).toInt())); // Rotation angel of barcode
result += TQString(",%1").tqarg( "0063" ); // height of barcode
result += TQString(",+%1").tqarg( sequence(e) ); // Increment / Decrement
result += TQString("{XB%1;").arg( convZeros(countBar, 2) ); // 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( barcodeType( e.attribute( "type") ) ); // Type of bar code
result += TQString(",%1").arg( withChecksum(e) ); // Type of check digit
result += TQString(",%1").arg( "03" ); // 1 module width
result += TQString(",%1").arg( rotation(e.attribute( "rotation", "0" ).toInt())); // Rotation angel of barcode
result += TQString(",%1").arg( "0063" ); // height of barcode
result += TQString(",+%1").arg( sequence(e) ); // Increment / Decrement
result += TQString(",000"); // Length of th WPC guard bar
result += TQString(",%1").tqarg( e.attribute( "text", "1" ).toInt() ); // Selection of print or non print of numerals under bars
result += TQString(",%1").arg( e.attribute( "text", "1" ).toInt() ); // Selection of print or non print of numerals under bars
result += TQString(",00"); //Number of Zeros to be suppressed
result += TQString("|}\n"); // FIN
@ -457,15 +457,15 @@ return result;
TQString pdf417 (const TQDomElement &e, int countBar) {
TQString result;
result += TQString("{XB%1;").tqarg( convZeros(countBar, 2) ); // 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("{XB%1;").arg( convZeros(countBar, 2) ); // 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(",P"); // Type of bar code ALWAYS PDF417
result += TQString(",%1").tqarg( withChecksum(e) ); // Type of check digit
result += TQString(",%1").tqarg( "03" ); // Module Width
result += TQString(",%1").tqarg( convZeros(e.attribute("pdf417.col").toInt(),2 )); // Number of columns
result += TQString(",%1").tqarg( rotation(e.attribute( "rotation", "0" ).toInt())); // Rotation angel of barcode
result += TQString(",%1").tqarg( "0063" ); // height of barcode
result += TQString(",%1").arg( withChecksum(e) ); // Type of check digit
result += TQString(",%1").arg( "03" ); // Module Width
result += TQString(",%1").arg( convZeros(e.attribute("pdf417.col").toInt(),2 )); // Number of columns
result += TQString(",%1").arg( rotation(e.attribute( "rotation", "0" ).toInt())); // Rotation angel of barcode
result += TQString(",%1").arg( "0063" ); // height of barcode
result += TQString("|}\n"); // FIN
return result;

@ -134,14 +134,14 @@ void TextItem::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 );
@ -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 );
}
}

@ -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 );
}
}

@ -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;i<m_custom_tokens.count();i++ )
allList->insertItem( 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 )

@ -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 )

@ -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);
}

@ -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()

Loading…
Cancel
Save