Revert "Rename a number of old tq methods that are no longer tq specific"

This reverts commit 64e14d1bc3.
pull/1/head
Timothy Pearson 13 years ago
parent 64e14d1bc3
commit abb955bc2a

@ -25,7 +25,7 @@
// TQt includes // TQt includes
#include <tqcheckbox.h> #include <tqcheckbox.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <layout.h> #include <tqlayout.h>
#include <tqregexp.h> #include <tqregexp.h>
#include <tqstring.h> #include <tqstring.h>
#include <ktextedit.h> #include <ktextedit.h>

@ -33,9 +33,9 @@
#include <kpushbutton.h> #include <kpushbutton.h>
// TQt includes // TQt includes
#include <clipboard.h> #include <tqclipboard.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <layout.h> #include <tqlayout.h>
#include <tqpainter.h> #include <tqpainter.h>
#include <tqpaintdevicemetrics.h> #include <tqpaintdevicemetrics.h>
#include <tqpicture.h> #include <tqpicture.h>
@ -208,7 +208,7 @@ void BarCodeDialog::copy()
DocumentItemDrag* drag = new DocumentItemDrag(); DocumentItemDrag* drag = new DocumentItemDrag();
drag->setDocumentItem( &list ); drag->setDocumentItem( &list );
kapp->clipboard()->setData( drag, TQClipboard::Clipboard ); kapp->tqclipboard()->setData( drag, TQClipboard::Clipboard );
} }
#include "barcodedialog.moc" #include "barcodedialog.moc"

@ -25,7 +25,7 @@
#include <tqcheckbox.h> #include <tqcheckbox.h>
#include <tqgroupbox.h> #include <tqgroupbox.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <layout.h> #include <tqlayout.h>
#include <tqmap.h> #include <tqmap.h>
#include <tqradiobutton.h> #include <tqradiobutton.h>
#include <tqtooltip.h> #include <tqtooltip.h>
@ -103,14 +103,14 @@ void AdvancedBarcodeDialog::getData( Barkode* b )
TBarcodeDlg::TBarcodeDlg(TQWidget *parent, const char *name ) TBarcodeDlg::TBarcodeDlg(TQWidget *parent, const char *name )
: TQWidget( parent, name ) : TQWidget( parent, name )
{ {
TQVBoxLayout* layout = new TQVBoxLayout( this, 6, 6 ); TQVBoxLayout* tqlayout = new TQVBoxLayout( this, 6, 6 );
TQGroupBox* gb = new TQGroupBox( i18n("TBarcode"), this ); TQGroupBox* gb = new TQGroupBox( i18n("TBarcode"), this );
gb->setColumnLayout(0, Qt::Vertical ); gb->setColumnLayout(0, Qt::Vertical );
gb->layout()->setSpacing( 6 ); gb->tqlayout()->setSpacing( 6 );
gb->layout()->setMargin( 11 ); gb->tqlayout()->setMargin( 11 );
gb->setEnabled( Barkode::haveTBarcode() || Barkode::haveTBarcode2() ); gb->setEnabled( Barkode::haveTBarcode() || Barkode::haveTBarcode2() );
TQVBoxLayout* gbLayout = new TQVBoxLayout( gb->layout() ); TQVBoxLayout* gbLayout = new TQVBoxLayout( gb->tqlayout() );
spinModule = new KDoubleNumInput( gb ); spinModule = new KDoubleNumInput( gb );
spinModule->setLabel( i18n("Module width (mm):"), AlignLeft | AlignVCenter ); spinModule->setLabel( i18n("Module width (mm):"), AlignLeft | AlignVCenter );
@ -144,7 +144,7 @@ TBarcodeDlg::TBarcodeDlg(TQWidget *parent, const char *name )
"tbarcode documentation for details. Normaly you do not want to change " "tbarcode documentation for details. Normaly you do not want to change "
"this value.</qt>") ); "this value.</qt>") );
layout->addWidget( gb ); tqlayout->addWidget( gb );
} }
void TBarcodeDlg::setData( Barkode* b ) void TBarcodeDlg::setData( Barkode* b )
@ -253,14 +253,14 @@ void TBarcodeDlg::getData( Barkode* b ) const
PDF417BarcodeDlg::PDF417BarcodeDlg(TQWidget *parent, const char *name ) PDF417BarcodeDlg::PDF417BarcodeDlg(TQWidget *parent, const char *name )
: TQWidget( parent, name ) : TQWidget( parent, name )
{ {
TQVBoxLayout* layout = new TQVBoxLayout( this, 6, 6 ); TQVBoxLayout* tqlayout = new TQVBoxLayout( this, 6, 6 );
TQGroupBox* gpdf = new TQGroupBox( i18n("PDF417"), this ); TQGroupBox* gpdf = new TQGroupBox( i18n("PDF417"), this );
gpdf->setColumnLayout(0, Qt::Vertical ); gpdf->setColumnLayout(0, Qt::Vertical );
gpdf->layout()->setSpacing( 6 ); gpdf->tqlayout()->setSpacing( 6 );
gpdf->layout()->setMargin( 11 ); gpdf->tqlayout()->setMargin( 11 );
gpdf->setEnabled( Barkode::haveTBarcode() || Barkode::havePDFBarcode() ); gpdf->setEnabled( Barkode::haveTBarcode() || Barkode::havePDFBarcode() );
TQVBoxLayout* gpdfLayout = new TQVBoxLayout( gpdf->layout() ); TQVBoxLayout* gpdfLayout = new TQVBoxLayout( gpdf->tqlayout() );
spinRow = new KIntNumInput( gpdf ); spinRow = new KIntNumInput( gpdf );
spinRow->setLabel( i18n("Rows:"), AlignLeft | AlignVCenter ); spinRow->setLabel( i18n("Rows:"), AlignLeft | AlignVCenter );
@ -277,7 +277,7 @@ PDF417BarcodeDlg::PDF417BarcodeDlg(TQWidget *parent, const char *name )
gpdfLayout->addWidget( spinRow ); gpdfLayout->addWidget( spinRow );
gpdfLayout->addWidget( spinCol ); gpdfLayout->addWidget( spinCol );
gpdfLayout->addWidget( spinErr ); gpdfLayout->addWidget( spinErr );
layout->addWidget( gpdf ); tqlayout->addWidget( gpdf );
} }
void PDF417BarcodeDlg::setData( Barkode* b ) void PDF417BarcodeDlg::setData( Barkode* b )
@ -365,9 +365,9 @@ SequenceDlg::SequenceDlg( TQWidget *parent, const char *name )
TQButtonGroup* group = new TQButtonGroup( i18n("Sequence"), this ); TQButtonGroup* group = new TQButtonGroup( i18n("Sequence"), this );
group->setColumnLayout(0, Qt::Vertical ); group->setColumnLayout(0, Qt::Vertical );
group->layout()->setSpacing( 6 ); group->tqlayout()->setSpacing( 6 );
group->layout()->setMargin( 11 ); group->tqlayout()->setMargin( 11 );
TQVBoxLayout* layout = new TQVBoxLayout( group->layout() ); TQVBoxLayout* tqlayout = new TQVBoxLayout( group->tqlayout() );
checkSequence = new TQCheckBox( i18n("&Enable sequence"), group ); checkSequence = new TQCheckBox( i18n("&Enable sequence"), group );
@ -383,12 +383,12 @@ SequenceDlg::SequenceDlg( TQWidget *parent, const char *name )
spinStart->setLabel( i18n("Start:"), AlignLeft | AlignVCenter ); spinStart->setLabel( i18n("Start:"), AlignLeft | AlignVCenter );
spinStart->setRange( -100000, 100000, 1, false ); spinStart->setRange( -100000, 100000, 1, false );
layout->addWidget( checkSequence ); tqlayout->addWidget( checkSequence );
layout->addWidget( radioNumbers ); tqlayout->addWidget( radioNumbers );
layout->addWidget( radioAlpha ); tqlayout->addWidget( radioAlpha );
layout->addWidget( radioAlphaNum ); tqlayout->addWidget( radioAlphaNum );
layout->addWidget( spinStep ); tqlayout->addWidget( spinStep );
layout->addWidget( spinStart ); tqlayout->addWidget( spinStart );
main->addWidget( group ); main->addWidget( group );
@ -443,10 +443,10 @@ ColorDlg::ColorDlg(TQWidget *parent, const char *name)
{ {
TQGroupBox* gb = new TQGroupBox( i18n("Colors"), this ); TQGroupBox* gb = new TQGroupBox( i18n("Colors"), this );
gb->setColumnLayout(0, Qt::Vertical ); gb->setColumnLayout(0, Qt::Vertical );
gb->layout()->setSpacing( 6 ); gb->tqlayout()->setSpacing( 6 );
gb->layout()->setMargin( 11 ); gb->tqlayout()->setMargin( 11 );
gb->setEnabled( Barkode::havePurePostscriptBarcode() ); gb->setEnabled( Barkode::havePurePostscriptBarcode() );
TQGridLayout* gbLayout = new TQGridLayout( gb->layout() ); TQGridLayout* gbLayout = new TQGridLayout( gb->tqlayout() );
buttonBarColor = new KColorButton( gb ); buttonBarColor = new KColorButton( gb );
buttonBackColor = new KColorButton( gb ); buttonBackColor = new KColorButton( gb );

@ -213,13 +213,13 @@ void BarcodeItem::drawIpl( TQTextStream* stream, IPLUtils* utils )
} }
int counter = utils->counter(); int counter = utils->counter();
TQString s = TQString("B%1;").arg( counter ); // field number TQString s = TQString("B%1;").tqarg( counter ); // field number
s += utils->fieldOrigin( rect().x(), rect().y() ); s += utils->fieldOrigin( rect().x(), rect().y() );
s += TQString("c%1;").arg( encoding ); // encoding type s += TQString("c%1;").tqarg( encoding ); // encoding type
s += TQString("h%1;").arg( rect().height() ); // height of barcode s += TQString("h%1;").tqarg( rect().height() ); // height of barcode
s += TQString("w%1;").arg( 3 ); // width of barcode (per line) s += TQString("w%1;").tqarg( 3 ); // width of barcode (per line)
s += TQString("d0,%1;").arg( value().length() ); // max length of data s += TQString("d0,%1;").tqarg( value().length() ); // max length of data
*stream << utils->field( s ); *stream << utils->field( s );
utils->addValue( value() ); utils->addValue( value() );
@ -235,11 +235,11 @@ void BarcodeItem::drawEPcl( TQTextStream* stream )
} }
// Coordinates cannot start at zero // Coordinates cannot start at zero
TQString s = TQString("B %1").arg( rect().x()+1 ); TQString s = TQString("B %1").tqarg( rect().x()+1 );
s += TQString(" %1 0").arg( rect().y() + rect().height() ); s += TQString(" %1 0").tqarg( rect().y() + rect().height() );
s += TQString(" %1 1 4").arg( encoding ); s += TQString(" %1 1 4").tqarg( encoding );
s += TQString(" %1 1").arg( rect().height() ); s += TQString(" %1 1").tqarg( rect().height() );
s += TQString(" %1").arg( value() ); s += TQString(" %1").tqarg( value() );
*stream << EPCLUtils::field( s ); *stream << EPCLUtils::field( s );
} }

@ -24,14 +24,14 @@
#include <tqcheckbox.h> #include <tqcheckbox.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <layout.h> #include <tqlayout.h>
#include <tqvbuttongroup.h> #include <tqvbuttongroup.h>
BarcodePrinterDlg::BarcodePrinterDlg(TQWidget *parent, const char *name) BarcodePrinterDlg::BarcodePrinterDlg(TQWidget *parent, const char *name)
: KDialogBase( KDialogBase::Plain, i18n("Barcode Printer"), : KDialogBase( KDialogBase::Plain, i18n("Barcode Printer"),
KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, parent,name) KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, parent,name)
{ {
TQGridLayout* layout = new TQGridLayout( plainPage(), 6, 6 ); TQGridLayout* tqlayout = new TQGridLayout( plainPage(), 6, 6 );
TQLabel* label = new TQLabel( i18n("&Output Format:"), plainPage() ); TQLabel* label = new TQLabel( i18n("&Output Format:"), plainPage() );
comboFormat = new KComboBox( false, plainPage() ); comboFormat = new KComboBox( false, plainPage() );
@ -47,13 +47,13 @@ BarcodePrinterDlg::BarcodePrinterDlg(TQWidget *parent, const char *name)
comboDevice = new KComboBox( true, plainPage() ); comboDevice = new KComboBox( true, plainPage() );
label3->setBuddy( comboDevice ); label3->setBuddy( comboDevice );
layout->addWidget( label, 0, 0 ); tqlayout->addWidget( label, 0, 0 );
layout->addMultiCellWidget( comboFormat, 0, 0, 1, 2 ); tqlayout->addMultiCellWidget( comboFormat, 0, 0, 1, 2 );
layout->addMultiCellWidget( checkFile, 1, 1, 1, 2 ); tqlayout->addMultiCellWidget( checkFile, 1, 1, 1, 2 );
layout->addWidget( label2, 2, 0 ); tqlayout->addWidget( label2, 2, 0 );
layout->addWidget( requester, 2, 1 ); tqlayout->addWidget( requester, 2, 1 );
layout->addWidget( label3, 3, 0 ); tqlayout->addWidget( label3, 3, 0 );
layout->addMultiCellWidget( comboDevice, 3, 3, 1, 2 ); tqlayout->addMultiCellWidget( comboDevice, 3, 3, 1, 2 );
comboFormat->insertItem( i18n("TEC Printer (TEC)") ); comboFormat->insertItem( i18n("TEC Printer (TEC)") );
comboFormat->insertItem( i18n("Zebra Printer (ZPL)") ); comboFormat->insertItem( i18n("Zebra Printer (ZPL)") );

@ -300,7 +300,7 @@ void BatchPrinter::startImages()
else else
name += m_image_custom_filename; name += m_image_custom_filename;
TQString filename = name + TQString("_%1.").arg( i ) + KImageIO::suffix( m_image_format ); TQString filename = name + TQString("_%1.").tqarg( i ) + KImageIO::suffix( m_image_format );
unsigned int c = 0; unsigned int c = 0;
while( TQFile::exists( filename ) ) { while( TQFile::exists( filename ) ) {
@ -334,7 +334,7 @@ void BatchPrinter::startBCP()
TQFile file( m_path ); TQFile file( m_path );
if( !file.open( IO_WriteOnly ) ) // | IO_Raw ) ) if( !file.open( IO_WriteOnly ) ) // | IO_Raw ) )
{ {
KMessageBox::error( parent, TQString( i18n("<qt>Can't open the file or device <b>%1</b></qt>.") ).arg( m_path ) ); KMessageBox::error( parent, TQString( i18n("<qt>Can't open the file or device <b>%1</b></qt>.") ).tqarg( m_path ) );
return; return;
} }

@ -31,12 +31,12 @@
#include <tqbuffer.h> #include <tqbuffer.h>
#include <tqcheckbox.h> #include <tqcheckbox.h>
#include <clipboard.h> #include <tqclipboard.h>
#include <tqcursor.h> #include <tqcursor.h>
#include <tqdom.h> #include <tqdom.h>
#include <tqheader.h> #include <tqheader.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <layout.h> #include <tqlayout.h>
#include <tqradiobutton.h> #include <tqradiobutton.h>
#include <tqsqlselectcursor.h> #include <tqsqlselectcursor.h>
#include <tqtooltip.h> #include <tqtooltip.h>
@ -394,7 +394,7 @@ void BatchWizard::setupStackPage4()
TQFrame* buttons = new TQFrame( stack4 ); TQFrame* buttons = new TQFrame( stack4 );
buttons->setMargin( 10 ); buttons->setMargin( 10 );
TQVBoxLayout* layout = new TQVBoxLayout( buttons ); TQVBoxLayout* tqlayout = new TQVBoxLayout( buttons );
TQSpacerItem* spacer1 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Expanding ); TQSpacerItem* spacer1 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Expanding );
TQSpacerItem* spacer2 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Expanding ); TQSpacerItem* spacer2 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Expanding );
@ -413,12 +413,12 @@ void BatchWizard::setupStackPage4()
TQToolTip::add( buttonRemoveAddress, i18n("Remove selected contacts from the list of contacts which will be printed.") ); TQToolTip::add( buttonRemoveAddress, i18n("Remove selected contacts from the list of contacts which will be printed.") );
TQToolTip::add( buttonRemoveAllAddress, i18n("Remove all contacts from the list of contacts which will be printed.") ); TQToolTip::add( buttonRemoveAllAddress, i18n("Remove all contacts from the list of contacts which will be printed.") );
layout->addItem( spacer1 ); tqlayout->addItem( spacer1 );
layout->addWidget( buttonAddAllAddress ); tqlayout->addWidget( buttonAddAllAddress );
layout->addWidget( buttonAddAddress ); tqlayout->addWidget( buttonAddAddress );
layout->addWidget( buttonRemoveAddress ); tqlayout->addWidget( buttonRemoveAddress );
layout->addWidget( buttonRemoveAllAddress ); tqlayout->addWidget( buttonRemoveAllAddress );
layout->addItem( spacer2 ); tqlayout->addItem( spacer2 );
mainLayout->addWidget( list1 ); mainLayout->addWidget( list1 );
mainLayout->addWidget( buttons ); mainLayout->addWidget( buttons );
@ -558,7 +558,7 @@ void BatchWizard::printNow( const TQString & printer, bool bUserInteraction )
// let's check if the label file does even exist! // let's check if the label file does even exist!
if( !TQFile::exists( m_url->url() ) ) if( !TQFile::exists( m_url->url() ) )
{ {
KMessageBox::error( this, TQString( i18n("The label file %1 was not found") ).arg( m_url->url()) ); KMessageBox::error( this, TQString( i18n("The label file %1 was not found") ).tqarg( m_url->url()) );
return; return;
} }
@ -747,7 +747,7 @@ bool BatchWizard::addItem( const TQString & article, const TQString & group, int
TQString temp; TQString temp;
temp.sprintf("%0*i", 5, sqlList->childCount() + 1 ); temp.sprintf("%0*i", 5, sqlList->childCount() + 1 );
KListViewItem* item = new KListViewItem( sqlList, temp, TQString( "%1" ).arg( count ), KListViewItem* item = new KListViewItem( sqlList, temp, TQString( "%1" ).tqarg( count ),
article, group ); article, group );
sqlList->insertItem( item ); sqlList->insertItem( item );
@ -873,7 +873,7 @@ void BatchWizard::loadFromFile()
void BatchWizard::loadFromClipboard() void BatchWizard::loadFromClipboard()
{ {
TQClipboard *cb = KApplication::clipboard(); TQClipboard *cb = KApplication::tqclipboard();
loadData( cb->text() ); loadData( cb->text() );
} }
@ -1076,7 +1076,7 @@ bool BatchWizard::fillVarTable()
file.setCSVFile(true); file.setCSVFile(true);
if( !file.isValid() ) if( !file.isValid() )
{ {
KMessageBox::error( this, TQString( i18n("Can't open file: %1") ).arg( importCsvFile->url() ) ); KMessageBox::error( this, TQString( i18n("Can't open file: %1") ).tqarg( importCsvFile->url() ) );
return false; return false;
} }

@ -23,7 +23,7 @@
#include <tqbuttongroup.h> #include <tqbuttongroup.h>
#include <tqcheckbox.h> #include <tqcheckbox.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <layout.h> #include <tqlayout.h>
#include <tqpaintdevicemetrics.h> #include <tqpaintdevicemetrics.h>
#include <tqradiobutton.h> #include <tqradiobutton.h>
#include <tqsqldatabase.h> #include <tqsqldatabase.h>
@ -64,13 +64,13 @@ ConfigDialog::~ConfigDialog()
void ConfigDialog::setupTab1( ) void ConfigDialog::setupTab1( )
{ {
TQFrame* box = addPage( i18n("SQL Settings"), "", BarIcon("connect_no") ); TQFrame* box = addPage( i18n("SQL Settings"), "", BarIcon("connect_no") );
TQVBoxLayout* layout = new TQVBoxLayout( box, 6, 6 ); TQVBoxLayout* tqlayout = new TQVBoxLayout( box, 6, 6 );
TQSpacerItem* spacer = new TQSpacerItem( 0, 0, TQSizePolicy::Expanding, TQSizePolicy::Expanding ); TQSpacerItem* spacer = new TQSpacerItem( 0, 0, TQSizePolicy::Expanding, TQSizePolicy::Expanding );
sqlwidget = new SqlWidget( false, box, "sqlwidget" ); sqlwidget = new SqlWidget( false, box, "sqlwidget" );
layout->addWidget( sqlwidget ); tqlayout->addWidget( sqlwidget );
layout->addItem( spacer ); tqlayout->addItem( spacer );
} }
void ConfigDialog::setupTab2() void ConfigDialog::setupTab2()
@ -218,9 +218,9 @@ void ConfigDialog::setupTab5()
TQButtonGroup* bg = new TQButtonGroup( i18n("On New Article"), box ); TQButtonGroup* bg = new TQButtonGroup( i18n("On New Article"), box );
bg->setColumnLayout(0, Qt::Vertical ); bg->setColumnLayout(0, Qt::Vertical );
bg->layout()->setSpacing( 6 ); bg->tqlayout()->setSpacing( 6 );
bg->layout()->setMargin( 11 ); bg->tqlayout()->setMargin( 11 );
TQGridLayout* bgLayout = new TQGridLayout( bg->layout() ); TQGridLayout* bgLayout = new TQGridLayout( bg->tqlayout() );
TQStringList alist, glist; TQStringList alist, glist;
alist.append( i18n("No Line Break") ); alist.append( i18n("No Line Break") );
@ -259,9 +259,9 @@ void ConfigDialog::setupTab5()
TQButtonGroup* bg2 = new TQButtonGroup( i18n("On New Group"), box ); TQButtonGroup* bg2 = new TQButtonGroup( i18n("On New Group"), box );
bg2->setColumnLayout(0, Qt::Vertical ); bg2->setColumnLayout(0, Qt::Vertical );
bg2->layout()->setSpacing( 6 ); bg2->tqlayout()->setSpacing( 6 );
bg2->layout()->setMargin( 11 ); bg2->tqlayout()->setMargin( 11 );
TQGridLayout* bg2Layout = new TQGridLayout( bg2->layout() ); TQGridLayout* bg2Layout = new TQGridLayout( bg2->tqlayout() );
onNewGroup1 = new KComboBox( false, bg2 ); onNewGroup1 = new KComboBox( false, bg2 );
onNewGroup2 = new KComboBox( false, bg2 ); onNewGroup2 = new KComboBox( false, bg2 );
@ -345,7 +345,7 @@ void ConfigDialog::accept()
void ConfigDialog::updateDatePreview() void ConfigDialog::updateDatePreview()
{ {
labelDate->setText( i18n("Preview: ") + TQDateTime::currentDateTime().toString( date->text() ) ); labelDate->setText( i18n("Preview: ") + TQDateTime::tqcurrentDateTime().toString( date->text() ) );
} }
#include "configdialog.moc" #include "configdialog.moc"

@ -24,11 +24,11 @@
#include <tqbuttongroup.h> #include <tqbuttongroup.h>
#include <tqcheckbox.h> #include <tqcheckbox.h>
#include <tqcursor.h> #include <tqcursor.h>
#include <layout.h> #include <tqlayout.h>
#include <tqsqldatabase.h> #include <tqsqldatabase.h>
#include <tqradiobutton.h> #include <tqradiobutton.h>
#include <tqprinter.h> #include <tqprinter.h>
#include <textbrowser.h> #include <tqtextbrowser.h>
// KDE includes // KDE includes
#include <kapplication.h> #include <kapplication.h>
@ -151,7 +151,7 @@ void ConfWizard::setupPage3()
TextLabel1_2 = new TQLabel( page_3, "TextLabel1_2" ); TextLabel1_2 = new TQLabel( page_3, "TextLabel1_2" );
TextLabel1_2->setText( i18n( "KBarcode can create the required SQL tables for you.<br>KBarcode will add also some Label Definitions to the tables.<br>After that you can fill the tables with some example data." ) ); TextLabel1_2->setText( i18n( "KBarcode can create the required SQL tables for you.<br>KBarcode will add also some Label Definitions to the tables.<br>After that you can fill the tables with some example data." ) );
TextLabel1_2->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) ); TextLabel1_2->tqsetAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) );
pageLayout_3->addWidget( TextLabel1_2 ); pageLayout_3->addWidget( TextLabel1_2 );
Layout5_2 = new TQVBoxLayout( 0, 0, 6, "Layout5_2"); Layout5_2 = new TQVBoxLayout( 0, 0, 6, "Layout5_2");

@ -20,7 +20,7 @@
#include "printersettings.h" #include "printersettings.h"
#include <tqbuffer.h> #include <tqbuffer.h>
#include <textcodec.h> #include <tqtextcodec.h>
CSVFile::CSVFile( const TQString & filename ) CSVFile::CSVFile( const TQString & filename )
{ {
@ -55,18 +55,18 @@ CSVFile::CSVFile( TQBuffer & buf )
CSVFile::~CSVFile() CSVFile::~CSVFile()
{ {
if( m_stream.device() && m_stream.device()->isOpen() ) if( m_stream.tqdevice() && m_stream.tqdevice()->isOpen() )
m_stream.device()->close(); m_stream.tqdevice()->close();
} }
TQStringList CSVFile::readNextLine() TQStringList CSVFile::readNextLine()
{ {
TQString line; TQString line;
if( !m_stream.device() ) if( !m_stream.tqdevice() )
return TQStringList(); return TQStringList();
if( !m_stream.device()->isOpen() ) if( !m_stream.tqdevice()->isOpen() )
return TQStringList(); return TQStringList();
// walk through the lines until a line containing valid data // walk through the lines until a line containing valid data

@ -20,7 +20,7 @@
#include <tqfile.h> #include <tqfile.h>
#include <tqstringlist.h> #include <tqstringlist.h>
#include <textstream.h> #include <tqtextstream.h>
class TQBuffer; class TQBuffer;
@ -106,10 +106,10 @@ class CSVFile {
bool CSVFile::isValid() const bool CSVFile::isValid() const
{ {
if( !m_stream.device() ) if( !m_stream.tqdevice() )
return false; return false;
return m_stream.device()->isOpen(); return m_stream.tqdevice()->isOpen();
} }
bool CSVFile::isEof() const bool CSVFile::isEof() const

@ -29,13 +29,13 @@
#include <tqhbuttongroup.h> #include <tqhbuttongroup.h>
#include <tqheader.h> #include <tqheader.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <layout.h> #include <tqlayout.h>
#include <tqlistbox.h> #include <tqlistbox.h>
#include <tqprogressdialog.h> #include <tqprogressdialog.h>
#include <tqsqlquery.h> #include <tqsqlquery.h>
#include <tqtable.h> #include <tqtable.h>
#include <tqradiobutton.h> #include <tqradiobutton.h>
#include <textstream.h> #include <tqtextstream.h>
#include <tqvbox.h> #include <tqvbox.h>
// KDE includes // KDE includes
@ -91,7 +91,7 @@ CSVImportDlg::~CSVImportDlg()
void CSVImportDlg::createPage1() void CSVImportDlg::createPage1()
{ {
TQFrame* box = addPage( i18n("&Import Data") ); TQFrame* box = addPage( i18n("&Import Data") );
TQVBoxLayout* layout = new TQVBoxLayout( box, 6, 6 ); TQVBoxLayout* tqlayout = new TQVBoxLayout( box, 6, 6 );
TQGridLayout* grid = new TQGridLayout( 2 ); TQGridLayout* grid = new TQGridLayout( 2 );
requester = new KURLRequester( box ); requester = new KURLRequester( box );
@ -114,7 +114,7 @@ void CSVImportDlg::createPage1()
table->setReadOnly( true ); table->setReadOnly( true );
frame = new TQFrame( box ); frame = new TQFrame( box );
TQHBoxLayout* layout2 = new TQHBoxLayout( frame, 6, 6 ); TQHBoxLayout* tqlayout2 = new TQHBoxLayout( frame, 6, 6 );
spinCol = new KIntNumInput( frame ); spinCol = new KIntNumInput( frame );
spinCol->setLabel( i18n("Column:"), AlignLeft | AlignVCenter ); spinCol->setLabel( i18n("Column:"), AlignLeft | AlignVCenter );
@ -123,10 +123,10 @@ void CSVImportDlg::createPage1()
comboField = new KComboBox( false, frame ); comboField = new KComboBox( false, frame );
buttonSet = new KPushButton( i18n("Set"), frame ); buttonSet = new KPushButton( i18n("Set"), frame );
layout2->addWidget( spinCol ); tqlayout2->addWidget( spinCol );
layout2->addWidget( new TQLabel( i18n("Database field to use for this column:"), frame ) ); tqlayout2->addWidget( new TQLabel( i18n("Database field to use for this column:"), frame ) );
layout2->addWidget( comboField ); tqlayout2->addWidget( comboField );
layout2->addWidget( buttonSet ); tqlayout2->addWidget( buttonSet );
grid->addWidget( new TQLabel( i18n("File to import:"), box ), 0, 0 ); grid->addWidget( new TQLabel( i18n("File to import:"), box ), 0, 0 );
grid->addWidget( requester, 0, 1 ); grid->addWidget( requester, 0, 1 );
@ -139,17 +139,17 @@ void CSVImportDlg::createPage1()
grid->addWidget( checkLoadAll, 4, 0 ); grid->addWidget( checkLoadAll, 4, 0 );
grid->addWidget( spinLoadOnly, 4, 1 ); grid->addWidget( spinLoadOnly, 4, 1 );
layout->addLayout( grid ); tqlayout->addLayout( grid );
layout->addWidget( table ); tqlayout->addWidget( table );
layout->setStretchFactor( table, 2 ); tqlayout->setStretchFactor( table, 2 );
layout->addWidget( frame ); tqlayout->addWidget( frame );
} }
void CSVImportDlg::createPage2() void CSVImportDlg::createPage2()
{ {
labelprinterdata* lb = PrinterSettings::getInstance()->getData(); labelprinterdata* lb = PrinterSettings::getInstance()->getData();
TQFrame* mainBox = addPage( i18n("&Import Settings") ); TQFrame* mainBox = addPage( i18n("&Import Settings") );
TQVBoxLayout* layout = new TQVBoxLayout( mainBox, 6, 6 ); TQVBoxLayout* tqlayout = new TQVBoxLayout( mainBox, 6, 6 );
TQSpacerItem* spacer1 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding ); TQSpacerItem* spacer1 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
TQSpacerItem* spacer2 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding ); TQSpacerItem* spacer2 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
@ -163,10 +163,10 @@ void CSVImportDlg::createPage2()
groupFixed = new TQGroupBox( i18n("Fixed Field Width File"), hboxFrame ); groupFixed = new TQGroupBox( i18n("Fixed Field Width File"), hboxFrame );
groupCSV->setColumnLayout(0, Qt::Vertical ); groupCSV->setColumnLayout(0, Qt::Vertical );
groupCSV->layout()->setSpacing( 6 ); groupCSV->tqlayout()->setSpacing( 6 );
groupCSV->layout()->setMargin( 11 ); groupCSV->tqlayout()->setMargin( 11 );
TQVBoxLayout* vbox = new TQVBoxLayout( groupCSV->layout() ); TQVBoxLayout* vbox = new TQVBoxLayout( groupCSV->tqlayout() );
TQGridLayout* grid = new TQGridLayout( 2, 2 ); TQGridLayout* grid = new TQGridLayout( 2, 2 );
grid->setSpacing( 6 ); grid->setSpacing( 6 );
grid->setMargin( 11 ); grid->setMargin( 11 );
@ -196,10 +196,10 @@ void CSVImportDlg::createPage2()
vbox->addItem( spacer1 ); vbox->addItem( spacer1 );
groupFixed->setColumnLayout(0, Qt::Horizontal ); groupFixed->setColumnLayout(0, Qt::Horizontal );
groupFixed->layout()->setSpacing( 6 ); groupFixed->tqlayout()->setSpacing( 6 );
groupFixed->layout()->setMargin( 11 ); groupFixed->tqlayout()->setMargin( 11 );
TQHBoxLayout* groupFixedLayout = new TQHBoxLayout( groupFixed->layout() ); TQHBoxLayout* groupFixedLayout = new TQHBoxLayout( groupFixed->tqlayout() );
groupFixedLayout->setAlignment( TQt::AlignTop ); groupFixedLayout->tqsetAlignment( TQt::AlignTop );
listWidth = new KListBox( groupFixed ); listWidth = new KListBox( groupFixed );
@ -214,17 +214,17 @@ void CSVImportDlg::createPage2()
spinNumber->setValue( 1 ); spinNumber->setValue( 1 );
spinNumber->setFocus(); spinNumber->setFocus();
TQVBoxLayout* layout2 = new TQVBoxLayout( 0, 6, 6 ); TQVBoxLayout* tqlayout2 = new TQVBoxLayout( 0, 6, 6 );
layout2->addWidget( buttonAdd ); tqlayout2->addWidget( buttonAdd );
layout2->addWidget( buttonRemove ); tqlayout2->addWidget( buttonRemove );
layout2->addWidget( spinNumber ); tqlayout2->addWidget( spinNumber );
layout2->addItem( spacer2 ); tqlayout2->addItem( spacer2 );
groupFixedLayout->addWidget( listWidth ); groupFixedLayout->addWidget( listWidth );
groupFixedLayout->addLayout( layout2 ); groupFixedLayout->addLayout( tqlayout2 );
layout->addWidget( buttonGroup ); tqlayout->addWidget( buttonGroup );
layout->addWidget( hboxFrame ); tqlayout->addWidget( hboxFrame );
radioCSVFile->setChecked( true ); radioCSVFile->setChecked( true );
} }
@ -386,7 +386,7 @@ void CSVImportDlg::accept()
void CSVImportDlg::addWidth() void CSVImportDlg::addWidth()
{ {
listWidth->insertItem( TQString("%1").arg(spinNumber->value()), -1 ); listWidth->insertItem( TQString("%1").tqarg(spinNumber->value()), -1 );
settingsChanged(); settingsChanged();
} }

@ -22,7 +22,7 @@
#include "csvimportdlg.h" #include "csvimportdlg.h"
// TQt includes // TQt includes
#include <clipboard.h> #include <tqclipboard.h>
// KDE includes // KDE includes
#include <kaction.h> #include <kaction.h>

@ -19,7 +19,7 @@
#include "sqltables.h" #include "sqltables.h"
// TQt includes // TQt includes
#include <textstream.h> #include <tqtextstream.h>
#include <tqsqlquery.h> #include <tqsqlquery.h>
#include <tqregexp.h> #include <tqregexp.h>
@ -136,7 +136,7 @@ Definition::Definition( TQWidget* parent )
Definition::Definition( int label_def_id, TQWidget* parent ) Definition::Definition( int label_def_id, TQWidget* parent )
: m_parent( parent ) : m_parent( parent )
{ {
init( TQString("%1").arg( label_def_id ) ); init( TQString("%1").tqarg( label_def_id ) );
} }
Definition::Definition( const TQString & label_def_id, TQWidget* parent ) 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 ) void Definition::setId( int label_def_id )
{ {
init( TQString("%1").arg( label_def_id ) ); init( TQString("%1").tqarg( label_def_id ) );
} }
void Definition::init( const TQString & label_def_id ) void Definition::init( const TQString & label_def_id )

@ -24,7 +24,7 @@
#include <kpushbutton.h> #include <kpushbutton.h>
#include <krestrictedline.h> #include <krestrictedline.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <layout.h> #include <tqlayout.h>
#include <tqpainter.h> #include <tqpainter.h>
// KDE includes // KDE includes
@ -80,7 +80,7 @@ DefinitionDialog::DefinitionDialog( TQWidget* parent, const char* name, bool mo
{ {
resize( 465, 345 ); resize( 465, 345 );
setCaption( i18n( "Add Label Definition" ) ); setCaption( i18n( "Add Label Definition" ) );
TQHBoxLayout* layout = new TQHBoxLayout( this, 6, 6 ); TQHBoxLayout* tqlayout = new TQHBoxLayout( this, 6, 6 );
DefinitionDialogLayout = new TQVBoxLayout( 0, 11, 6, "DefinitionDialogLayout"); DefinitionDialogLayout = new TQVBoxLayout( 0, 11, 6, "DefinitionDialogLayout");
Layout17 = new TQHBoxLayout( 0, 0, 6, "Layout17"); Layout17 = new TQHBoxLayout( 0, 0, 6, "Layout17");
@ -96,11 +96,11 @@ DefinitionDialog::DefinitionDialog( TQWidget* parent, const char* name, bool mo
Layout13->addWidget( TextLabel2 ); Layout13->addWidget( TextLabel2 );
TextLabel3 = new TQLabel( this, "TextLabel3" ); TextLabel3 = new TQLabel( this, "TextLabel3" );
TextLabel3->setText( TQString( i18n( "Width (in %1):" ) ).arg( Measurements::system() ) ); TextLabel3->setText( TQString( i18n( "Width (in %1):" ) ).tqarg( Measurements::system() ) );
Layout13->addWidget( TextLabel3 ); Layout13->addWidget( TextLabel3 );
TextLabel4 = new TQLabel( this, "TextLabel4" ); TextLabel4 = new TQLabel( this, "TextLabel4" );
TextLabel4->setText( TQString( i18n( "Height (in %1):" ) ).arg( Measurements::system() ) ); TextLabel4->setText( TQString( i18n( "Height (in %1):" ) ).tqarg( Measurements::system() ) );
Layout13->addWidget( TextLabel4 ); Layout13->addWidget( TextLabel4 );
TextLabel5 = new TQLabel( this, "TextLabel5" ); TextLabel5 = new TQLabel( this, "TextLabel5" );
@ -202,8 +202,8 @@ DefinitionDialog::DefinitionDialog( TQWidget* parent, const char* name, bool mo
DefinitionDialogLayout->addLayout( Layout16 ); DefinitionDialogLayout->addLayout( Layout16 );
preview = new LabelPreview( this ); preview = new LabelPreview( this );
layout->addLayout( DefinitionDialogLayout ); tqlayout->addLayout( DefinitionDialogLayout );
layout->addWidget( preview ); tqlayout->addWidget( preview );
l = new TQLabel( this ); l = new TQLabel( this );
setExtension( l ); setExtension( l );
@ -335,7 +335,7 @@ void DefinitionDialog::updatePreview()
preview->setRect( TQRect( (int)m.gapLeftMM(), (int)m.gapTopMM(), (int)m.widthMM(), (int)m.heightMM() ) ); preview->setRect( TQRect( (int)m.gapLeftMM(), (int)m.gapTopMM(), (int)m.widthMM(), (int)m.heightMM() ) );
preview->setMeasurements( m ); preview->setMeasurements( m );
preview->repaint(); preview->tqrepaint();
} }
void DefinitionDialog::drawGraphic() void DefinitionDialog::drawGraphic()

@ -22,7 +22,7 @@
#include <tqobject.h> #include <tqobject.h>
#include <tqsortedlist.h> #include <tqsortedlist.h>
#include <tqstring.h> #include <tqstring.h>
#include <textstream.h> #include <tqtextstream.h>
#include <tqcolor.h> #include <tqcolor.h>
#include <tqpen.h> #include <tqpen.h>

@ -25,7 +25,7 @@
// TQt includes // TQt includes
#include <tqcheckbox.h> #include <tqcheckbox.h>
#include <textbrowser.h> #include <tqtextbrowser.h>
#include <tqsqldatabase.h> #include <tqsqldatabase.h>
// KDE includes // KDE includes

@ -74,11 +74,11 @@ DSRichText::~DSRichText()
{ {
} }
void DSRichText::initFormat( formated_word* f, int alignment ) void DSRichText::initFormat( formated_word* f, int tqalignment )
{ {
f->text = TQString(); f->text = TQString();
f->line = false; f->line = false;
f->alignment = alignment; f->tqalignment = tqalignment;
f->font = m_base; f->font = m_base;
f->color = m_color; f->color = m_color;
} }
@ -147,7 +147,7 @@ void DSRichText::draw( TQPainter* p )
for( unsigned int i = 0; i < lines.count(); i++ ) { for( unsigned int i = 0; i < lines.count(); i++ ) {
formated_line l = lines[i]; formated_line l = lines[i];
if( l.formats.count() && l.formats[0].alignment == TQt::AlignJustify && i != lines.count() - 1 ) { if( l.formats.count() && l.formats[0].tqalignment == TQt::AlignJustify && i != lines.count() - 1 ) {
// last line in a paragraph is not justified (in blocksatz mode)! // last line in a paragraph is not justified (in blocksatz mode)!
drawJustified( &l ); drawJustified( &l );
} else { } else {
@ -157,7 +157,7 @@ void DSRichText::draw( TQPainter* p )
painter->setFont( f.font ); painter->setFont( f.font );
painter->setPen( TQPen( f.color ) ); painter->setPen( TQPen( f.color ) );
int a = f.alignment; int a = f.tqalignment;
if( a == TQt::AlignRight ) { if( a == TQt::AlignRight ) {
a = TQt::AlignLeft; a = TQt::AlignLeft;
if( !x ) if( !x )
@ -208,7 +208,7 @@ void DSRichText::drawJustified( formated_line* line )
bool DSRichText::parseParagraph() bool DSRichText::parseParagraph()
{ {
int alignment = 0; int tqalignment = 0;
formated_word f; formated_word f;
TQString d = parse( text, "<p", "</p>", pos ); TQString d = parse( text, "<p", "</p>", pos );
//qDebug("D=" + d ); //qDebug("D=" + d );
@ -218,11 +218,11 @@ bool DSRichText::parseParagraph()
if( d.isNull() ) if( d.isNull() )
return false; return false;
d = parseParagraphTag( d, &alignment ); d = parseParagraphTag( d, &tqalignment );
WordList words; WordList words;
TQString data; TQString data;
initFormat( &f, alignment ); initFormat( &f, tqalignment );
if( d.isEmpty() ) { if( d.isEmpty() ) {
// found empty paragraph // found empty paragraph
@ -237,7 +237,7 @@ bool DSRichText::parseParagraph()
data.append( d[i] ); data.append( d[i] );
parseWords( data, &f, &words ); parseWords( data, &f, &words );
initFormat( &f, alignment ); initFormat( &f, tqalignment );
data = TQString(); data = TQString();
// bail out now, otherwise there is // bail out now, otherwise there is
@ -250,7 +250,7 @@ bool DSRichText::parseParagraph()
i += span.length(); i += span.length();
if( span.startsWith( "<span " ) ) { if( span.startsWith( "<span " ) ) {
initFormat( &f, alignment ); initFormat( &f, tqalignment );
f.font = parseStyle( parse( span, "style=\"", "\"", 0 ), &f.color ); f.font = parseStyle( parse( span, "style=\"", "\"", 0 ), &f.color );
} }
} }
@ -403,13 +403,13 @@ TQString DSRichText::replaceEscapeSequences( const TQString & t )
return tmp; return tmp;
} }
TQString DSRichText::parseParagraphTag( const TQString &t, int* alignment ) TQString DSRichText::parseParagraphTag( const TQString &t, int* tqalignment )
{ {
TQString d = TQString( t ); TQString d = TQString( t );
if( d.startsWith("<p>") ) { if( d.startsWith("<p>") ) {
d = d.mid( 3, d.length() - 3 ); d = d.mid( 3, d.length() - 3 );
} else if( d.startsWith("<p ") ) { } else if( d.startsWith("<p ") ) {
*alignment = parseAlignment( parse( d, "align=\"", "\"", 0 ) ); *tqalignment = parseAlignment( parse( d, "align=\"", "\"", 0 ) );
if( d.contains( ">" ) ) { if( d.contains( ">" ) ) {
int x = d.find(">" ) + 1; int x = d.find(">" ) + 1;
d = d.mid( x, d.length() - x ); d = d.mid( x, d.length() - x );

@ -31,13 +31,13 @@ class DSRichText;
/** This class represents one word, /** This class represents one word,
* formated with a font, a color and an * formated with a font, a color and an
* alignment. * tqalignment.
*/ */
struct formated_word { struct formated_word {
TQString text; TQString text;
TQFont font; TQFont font;
TQColor color; TQColor color;
int alignment; int tqalignment;
bool line; bool line;
}; };
@ -138,10 +138,10 @@ class DSRichText {
bool parseParagraph(); bool parseParagraph();
/** remove <p> and </p> from the TQString @p t and return it. /** remove <p> and </p> from the TQString @p t and return it.
* This function is also responsible for getting the * This function is also responsible for getting the
* correct alignment of the paragraph. * correct tqalignment of the paragraph.
*/ */
TQString parseParagraphTag( const TQString & t, int* alignment ); TQString parseParagraphTag( const TQString & t, int* tqalignment );
/** parse the align attribute of a <p> tag and return the corresponding TQt alignment value. /** parse the align attribute of a <p> tag and return the corresponding TQt tqalignment value.
*/ */
int parseAlignment( const TQString & align ); int parseAlignment( const TQString & align );
/** parse the css style attribute of a <span> tag and return a matching TQFont for these /** 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 ); TQFont parseStyle( const TQString & s, TQColor* color );
TQString parse( const TQString & t, const TQString & find, const TQString & end, int start ); TQString parse( const TQString & t, const TQString & find, const TQString & end, int start );
void parseWords( const TQString & t, formated_word* w, WordList* words ); void parseWords( const TQString & t, formated_word* w, WordList* words );
void initFormat( formated_word* f, int alignment ); void initFormat( formated_word* f, int tqalignment );
void initLine( TQValueList<formated_line>* l ); void initLine( TQValueList<formated_line>* l );
void updateSpacing( TQValueList<formated_line>* l, TQFontMetrics* fm ); void updateSpacing( TQValueList<formated_line>* l, TQFontMetrics* fm );
/** draw the line @p line justified as blockquote /** draw the line @p line justified as blockquote

@ -30,7 +30,7 @@ void DSTextEdit::fixParagraphs()
struct { struct {
TQFont font; TQFont font;
TQColor color; TQColor color;
int alignment; int tqalignment;
} tFormattings; } tFormattings;
TQString t; TQString t;
@ -57,7 +57,7 @@ void DSTextEdit::fixParagraphs()
t = this->text(); t = this->text();
tFormattings.font = this->currentFont(); tFormattings.font = this->currentFont();
tFormattings.color = this->color(); tFormattings.color = this->color();
tFormattings.alignment = this->alignment(); tFormattings.tqalignment = this->tqalignment();
while( pos != -1 ) while( pos != -1 )
{ {
@ -101,7 +101,7 @@ void DSTextEdit::fixParagraphs()
this->setCursorPosition( 0, index ); this->setCursorPosition( 0, index );
this->setCurrentFont( tFormattings.font ); this->setCurrentFont( tFormattings.font );
this->setColor( tFormattings.color ); this->setColor( tFormattings.color );
this->setAlignment( tFormattings.alignment ); this->tqsetAlignment( tFormattings.tqalignment );
this->setSelection( paraFrom, indexFrom, paraTo, indexTo ); this->setSelection( paraFrom, indexFrom, paraTo, indexTo );

@ -20,7 +20,7 @@
#include <kcharsets.h> #include <kcharsets.h>
#include <kglobal.h> #include <kglobal.h>
#include <klocale.h> #include <klocale.h>
#include <textcodec.h> #include <tqtextcodec.h>
EncodingCombo::EncodingCombo( TQWidget* parent ) EncodingCombo::EncodingCombo( TQWidget* parent )
: KComboBox( parent ) : KComboBox( parent )

@ -102,7 +102,7 @@ void ImageItem::drawEPcl( TQTextStream* stream )
for( int buf=0; buf < 3; buf++ ){ for( int buf=0; buf < 3; buf++ ){
*stream << TQString("GS %1 32 %1 %1 %1 %1 ") *stream << TQString("GS %1 32 %1 %1 %1 %1 ")
.arg(buf).arg(rect().x()).arg(rect().y()).arg(width).arg(height); .tqarg(buf).tqarg(rect().x()).tqarg(rect().y()).tqarg(width).tqarg(height);
for( int i=width-1; i >= 0; i-- ){ for( int i=width-1; i >= 0; i-- ){
for( int j=0; j < height; j++ ){ for( int j=0; j < height; j++ ){

@ -19,7 +19,7 @@
#include <tqimage.h> #include <tqimage.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <layout.h> #include <tqlayout.h>
#include <tqmenubar.h> #include <tqmenubar.h>
#include <tqmenudata.h> #include <tqmenudata.h>
#include <tqpixmap.h> #include <tqpixmap.h>
@ -67,14 +67,14 @@ public:
} }
void paintCell( TQPainter *p, const TQColorGroup &cg, void paintCell( TQPainter *p, const TQColorGroup &cg,
int column, int width, int alignment ) int column, int width, int tqalignment )
{ {
TQColorGroup _cg( cg ); TQColorGroup _cg( cg );
TQColor c = _cg.text(); TQColor c = _cg.text();
if( m_action && !m_action->isEnabled() ) if( m_action && !m_action->isEnabled() )
_cg.setColor( TQColorGroup::Text, TQt::gray ); _cg.setColor( TQColorGroup::Text, TQt::gray );
KListViewItem::paintCell( p, _cg, column, width, alignment ); KListViewItem::paintCell( p, _cg, column, width, tqalignment );
_cg.setColor( TQColorGroup::Text, c ); _cg.setColor( TQColorGroup::Text, c );
} }
@ -106,7 +106,7 @@ void KActionMapDlg::updateEnabledState()
KActionMap::KActionMap( KActionCollection* actions, TQWidget* parent, const char* name ) KActionMap::KActionMap( KActionCollection* actions, TQWidget* parent, const char* name )
: TQWidget( parent, name ), m_actions( actions ), m_showMenuTree( true ), m_grayOutItems( false ) : TQWidget( parent, name ), m_actions( actions ), m_showMenuTree( true ), m_grayOutItems( false )
{ {
TQVBoxLayout* layout = new TQVBoxLayout( this ); TQVBoxLayout* tqlayout = new TQVBoxLayout( this );
m_listView = new KListView( this ); m_listView = new KListView( this );
#if TDE_VERSION >= 0x030500 #if TDE_VERSION >= 0x030500
@ -123,9 +123,9 @@ KActionMap::KActionMap( KActionCollection* actions, TQWidget* parent, const char
m_listView->setAllColumnsShowFocus( true ); m_listView->setAllColumnsShowFocus( true );
#if TDE_VERSION >= 0x030500 #if TDE_VERSION >= 0x030500
layout->addWidget( m_searchLine ); tqlayout->addWidget( m_searchLine );
#endif #endif
layout->addWidget( m_listView ); tqlayout->addWidget( m_listView );
connect( m_listView, TQT_SIGNAL( executed( TQListViewItem* ) ), this, TQT_SLOT( slotExecuteAction( TQListViewItem* ) ) ); connect( m_listView, TQT_SIGNAL( executed( TQListViewItem* ) ), this, TQT_SLOT( slotExecuteAction( TQListViewItem* ) ) );
connect( actions, TQT_SIGNAL( inserted( KAction* ) ), this, TQT_SLOT( slotActionCollectionChanged() ) ); connect( actions, TQT_SIGNAL( inserted( KAction* ) ), this, TQT_SLOT( slotActionCollectionChanged() ) );

@ -27,7 +27,7 @@
// TQt includes // TQt includes
#include <tqgroupbox.h> #include <tqgroupbox.h>
#include <layout.h> #include <tqlayout.h>
// KDE includes // KDE includes
#include <kaction.h> #include <kaction.h>
@ -45,7 +45,7 @@ KBarcode::KBarcode( TQWidget *parent, const char *name, WFlags f)
{ {
TQGroupBox* w = new TQGroupBox( this ); TQGroupBox* w = new TQGroupBox( this );
w->setColumnLayout(0, Qt::Vertical ); w->setColumnLayout(0, Qt::Vertical );
TQVBoxLayout* layout = new TQVBoxLayout( w->layout() ); TQVBoxLayout* tqlayout = new TQVBoxLayout( w->tqlayout() );
setCentralWidget( w ); setCentralWidget( w );
buttonSingle = new KPushButton( i18n("Barcode &Generator..."), w ); buttonSingle = new KPushButton( i18n("Barcode &Generator..."), w );
@ -59,10 +59,10 @@ KBarcode::KBarcode( TQWidget *parent, const char *name, WFlags f)
buttonEditor->setIconSet( BarIconSet( "edit" ) ); buttonEditor->setIconSet( BarIconSet( "edit" ) );
buttonBatch->setIconSet( BarIconSet( "fileprint" ) ); buttonBatch->setIconSet( BarIconSet( "fileprint" ) );
layout->addWidget( buttonSingle ); tqlayout->addWidget( buttonSingle );
layout->addWidget( buttonEditor ); tqlayout->addWidget( buttonEditor );
layout->addWidget( buttonBatch ); tqlayout->addWidget( buttonBatch );
layout->addWidget( buttonData ); tqlayout->addWidget( buttonData );
connect( buttonSingle, TQT_SIGNAL( clicked() ), TQT_TQOBJECT(this), TQT_SLOT( startBarcode() ) ); connect( buttonSingle, TQT_SIGNAL( clicked() ), TQT_TQOBJECT(this), TQT_SLOT( startBarcode() ) );
connect( buttonEditor, TQT_SIGNAL( clicked() ), TQT_TQOBJECT(this), TQT_SLOT( startLabelEditor() ) ); connect( buttonEditor, TQT_SIGNAL( clicked() ), TQT_TQOBJECT(this), TQT_SLOT( startLabelEditor() ) );
@ -176,7 +176,7 @@ bool KBarcode::parseCmdLine()
eFormat = BatchPrinter::POSTSCRIPT; eFormat = BatchPrinter::POSTSCRIPT;
else else
{ {
KMessageBox::error( this, i18n("%1 is no valid output format for --output. Valid values are POSTSCRIPT, IMAGE and BARCODE.").arg( format ) ); KMessageBox::error( this, i18n("%1 is no valid output format for --output. Valid values are POSTSCRIPT, IMAGE and BARCODE.").tqarg( format ) );
} }
if( args->isSet("barcode") ) if( args->isSet("barcode") )

@ -54,7 +54,7 @@
#include <tqbuffer.h> #include <tqbuffer.h>
#include <tqcanvas.h> #include <tqcanvas.h>
#include <tqcheckbox.h> #include <tqcheckbox.h>
#include <clipboard.h> #include <tqclipboard.h>
#include <tqdockarea.h> #include <tqdockarea.h>
#include <tqdom.h> #include <tqdom.h>
#include <tqdragobject.h> #include <tqdragobject.h>
@ -62,7 +62,7 @@
#include <tqimage.h> #include <tqimage.h>
#include <tqinputdialog.h> #include <tqinputdialog.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <layout.h> #include <tqlayout.h>
#include <tqmap.h> #include <tqmap.h>
#include <tqmime.h> #include <tqmime.h>
#include <tqpainter.h> #include <tqpainter.h>
@ -71,7 +71,7 @@
#include <tqpoint.h> #include <tqpoint.h>
#include <tqprogressdialog.h> #include <tqprogressdialog.h>
#include <tqsqlquery.h> #include <tqsqlquery.h>
#include <textbrowser.h> #include <tqtextbrowser.h>
#include <tqtooltip.h> #include <tqtooltip.h>
#include <tqvalidator.h> #include <tqvalidator.h>
#include <tqxml.h> #include <tqxml.h>
@ -382,7 +382,7 @@ bool LabelEditor::openUrl( const TQString & url )
if( !d || d->getId() == -1 ) 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>") ).arg( filename ) ); KMessageBox::error( this, TQString( i18n("<qt>The file <b>%1</b> cannot be loaded as the label definition is missing.</qt>") ).tqarg( filename ) );
return false; return false;
} }
@ -696,15 +696,15 @@ void LabelEditor::changeSize()
// TODO: make sure that all items are redrawn. // TODO: make sure that all items are redrawn.
// Otherwise barcodes might become invisible when changing the label // Otherwise barcodes might become invisible when changing the label
c->update(); c->update();
cv->repaint(); cv->tqrepaint();
delete nl; delete nl;
} }
void LabelEditor::updateInfo() void LabelEditor::updateInfo()
{ {
statusBar()->changeItem( i18n("Size: ") + TQString("%1%2 x %3%4").arg( statusBar()->changeItem( i18n("Size: ") + TQString("%1%2 x %3%4").tqarg(
d->getMeasurements().width() ).arg( Measurements::system() d->getMeasurements().width() ).tqarg( Measurements::system()
).arg( d->getMeasurements().height() ).arg( Measurements::system() ), STATUS_ID_SIZE ); ).tqarg( d->getMeasurements().height() ).tqarg( Measurements::system() ), STATUS_ID_SIZE );
statusBar()->changeItem( i18n("Label Template: ") + d->getProducer() + " - " + d->getType(), STATUS_ID_TEMPLATE ); statusBar()->changeItem( i18n("Label Template: ") + d->getProducer() + " - " + d->getType(), STATUS_ID_TEMPLATE );
} }
@ -978,12 +978,12 @@ void LabelEditor::copy()
DocumentItemDrag* drag = new DocumentItemDrag(); DocumentItemDrag* drag = new DocumentItemDrag();
drag->setDocumentItem( &items ); drag->setDocumentItem( &items );
kapp->clipboard()->setData( drag, TQClipboard::Clipboard ); kapp->tqclipboard()->setData( drag, TQClipboard::Clipboard );
} }
void LabelEditor::paste() void LabelEditor::paste()
{ {
TQMimeSource* data = TQApplication::clipboard()->data(); TQMimeSource* data = TQApplication::tqclipboard()->data();
if ( DocumentItemDrag::canDecode( data ) ) if ( DocumentItemDrag::canDecode( data ) )
DocumentItemDrag::decode( data, cv, m_token, history ); DocumentItemDrag::decode( data, cv, m_token, history );
} }
@ -1005,7 +1005,7 @@ void LabelEditor::startBarcodeGen()
void LabelEditor::startLoadRecentEditor( const KURL& url ) void LabelEditor::startLoadRecentEditor( const KURL& url )
{ {
if( !TQFile::exists( url.path() ) ) { if( !TQFile::exists( url.path() ) ) {
KMessageBox::information( this, i18n("The file %1 does not exist.").arg( url.path() ) ); KMessageBox::information( this, i18n("The file %1 does not exist.").tqarg( url.path() ) );
recentAct->removeURL( url ); recentAct->removeURL( url );
return; return;
} }

@ -88,7 +88,7 @@ bool DocumentItemDrag::canDecode( TQMimeSource* e )
bool DocumentItemDrag::decode( TQMimeSource* mime, MyCanvasView* cv, TokenProvider* token, KCommandHistory* history ) bool DocumentItemDrag::decode( TQMimeSource* mime, MyCanvasView* cv, TokenProvider* token, KCommandHistory* history )
{ {
TQByteArray data = mime->encodedData( DocumentItemDrag::mimeType() ); TQByteArray data = mime->tqencodedData( DocumentItemDrag::mimeType() );
TQDomDocument doc( "KBarcodeClipboard" ); TQDomDocument doc( "KBarcodeClipboard" );
if( !doc.setContent( data ) ) if( !doc.setContent( data ) )
return false; return false;

@ -36,7 +36,7 @@
MultiLineEditor::MultiLineEditor( TokenProvider* token, TQWidget *parent, const char *name ) MultiLineEditor::MultiLineEditor( TokenProvider* token, TQWidget *parent, const char *name )
: TQWidget( parent, name ), m_token( token ) : TQWidget( parent, name ), m_token( token )
{ {
TQVBoxLayout* layout = new TQVBoxLayout( this, 6, 6 ); TQVBoxLayout* tqlayout = new TQVBoxLayout( this, 6, 6 );
// ksc = new KSpellConfig( this ); // ksc = new KSpellConfig( this );
@ -52,8 +52,8 @@ MultiLineEditor::MultiLineEditor( TokenProvider* token, TQWidget *parent, const
setupActions(); setupActions();
layout->addWidget( area ); tqlayout->addWidget( area );
layout->addWidget( editor ); tqlayout->addWidget( editor );
} }
@ -128,10 +128,10 @@ void MultiLineEditor::setupActions()
action_align_justify = new KToggleAction( i18n("&Justify"), "text_block", 0, ac, "format_align_justify" ); 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) ) ); connect( action_align_justify, TQT_SIGNAL( toggled(bool) ), TQT_TQOBJECT(this), TQT_SLOT( setAlignJustify(bool) ) );
action_align_left->setExclusiveGroup( "alignment" ); action_align_left->setExclusiveGroup( "tqalignment" );
action_align_center->setExclusiveGroup( "alignment" ); action_align_center->setExclusiveGroup( "tqalignment" );
action_align_right->setExclusiveGroup( "alignment" ); action_align_right->setExclusiveGroup( "tqalignment" );
action_align_justify->setExclusiveGroup( "alignment" ); action_align_justify->setExclusiveGroup( "tqalignment" );
//KAction* action_spell = KStdAction::spelling( this, TQT_SLOT( checkSpelling() ), ac ); //KAction* action_spell = KStdAction::spelling( this, TQT_SLOT( checkSpelling() ), ac );
@ -193,7 +193,7 @@ void MultiLineEditor::updateCharFmt()
void MultiLineEditor::updateAligment() void MultiLineEditor::updateAligment()
{ {
int align = editor->alignment(); int align = editor->tqalignment();
switch ( align ) { switch ( align ) {
case AlignRight: case AlignRight:
@ -241,25 +241,25 @@ void MultiLineEditor::formatColor()
void MultiLineEditor::setAlignLeft( bool yes ) void MultiLineEditor::setAlignLeft( bool yes )
{ {
if ( yes ) if ( yes )
editor->setAlignment( AlignLeft ); editor->tqsetAlignment( AlignLeft );
} }
void MultiLineEditor::setAlignRight( bool yes ) void MultiLineEditor::setAlignRight( bool yes )
{ {
if ( yes ) if ( yes )
editor->setAlignment( AlignRight ); editor->tqsetAlignment( AlignRight );
} }
void MultiLineEditor::setAlignCenter( bool yes ) void MultiLineEditor::setAlignCenter( bool yes )
{ {
if ( yes ) if ( yes )
editor->setAlignment( AlignCenter ); editor->tqsetAlignment( AlignCenter );
} }
void MultiLineEditor::setAlignJustify( bool yes ) void MultiLineEditor::setAlignJustify( bool yes )
{ {
if ( yes ) if ( yes )
editor->setAlignment( AlignJustify ); editor->tqsetAlignment( AlignJustify );
} }
void MultiLineEditor::insertNewField() void MultiLineEditor::insertNewField()

@ -138,7 +138,7 @@ bool BarCode::createPixmap( TQPixmap* target, int resx, int resy )
double sh = (double)s.height()/72 * resy; double sh = (double)s.height()/72 * resy;
KShellProcess proc2; KShellProcess proc2;
proc2 << "gs" << TQString("-g%1x%2").arg(int(sw*(double)barcode.scale)).arg(int(sh*(double)barcode.scale)) proc2 << "gs" << TQString("-g%1x%2").tqarg(int(sw*(double)barcode.scale)).tqarg(int(sh*(double)barcode.scale))
<< "-r" + TQString::number( resx*(double)barcode.scale ) + "x" + TQString::number( resy*(double)barcode.scale ) << "-r" + TQString::number( resx*(double)barcode.scale ) + "x" + TQString::number( resy*(double)barcode.scale )
<< "-sDEVICE=pbmraw" << "-sOutputFile=" + input->name() << "-sNOPAUSE" << "-sDEVICE=pbmraw" << "-sOutputFile=" + input->name() << "-sNOPAUSE"
<< "-q " + output->name() << "-c showpage" << "-c quit"; << "-q " + output->name() << "-c showpage" << "-c quit";
@ -246,17 +246,17 @@ bool BarCode::createTBarcode( KTempFile* output )
KShellProcess proc; KShellProcess proc;
proc << "tbarcodeclient" << "-f" + output->name(); proc << "tbarcodeclient" << "-f" + output->name();
if( !BarCode::hasFeature( barcode.type, BARCODE2D ) ) if( !BarCode::hasFeature( barcode.type, BARCODE2D ) )
proc << TQString( "m%1" ).arg( barcode.tbarcode.modulewidth * 1000 ); proc << TQString( "m%1" ).tqarg( barcode.tbarcode.modulewidth * 1000 );
if( BarCode::hasFeature( barcode.type, DATAMATRIX ) ) if( BarCode::hasFeature( barcode.type, DATAMATRIX ) )
proc << TQString( "Ds%1" ).arg( barcode.datamatrix.size ); proc << TQString( "Ds%1" ).tqarg( barcode.datamatrix.size );
if( BarCode::hasFeature( barcode.type, PDF417BARCODE ) ) if( BarCode::hasFeature( barcode.type, PDF417BARCODE ) )
proc << TQString( "Pr%1 Pc%2 Pe%3" ).arg( barcode.pdf417.row ) proc << TQString( "Pr%1 Pc%2 Pe%3" ).tqarg( barcode.pdf417.row )
.arg( barcode.pdf417.col ) .tqarg( barcode.pdf417.col )
.arg( barcode.pdf417.err ); .tqarg( barcode.pdf417.err );
proc << barcode.type << "tPS" << TQString("c%1").arg( barcode.tbarcode.checksum ) << flag << "d" + KShellProcess::quote( m_value ); proc << barcode.type << "tPS" << TQString("c%1").tqarg( barcode.tbarcode.checksum ) << flag << "d" + KShellProcess::quote( m_value );
proc.start( KProcess::Block, KProcess::NoCommunication ); proc.start( KProcess::Block, KProcess::NoCommunication );
proc.resume(); proc.resume();

@ -150,8 +150,8 @@ void MyCanvasView::contentsMouseMoveEvent(TQMouseEvent* e)
int x = (int)l.pixelToMm( e->x(), TQT_TQPAINTDEVICE(this), LabelUtils::DpiX ); int x = (int)l.pixelToMm( e->x(), TQT_TQPAINTDEVICE(this), LabelUtils::DpiX );
int y = (int)l.pixelToMm( e->y(), TQT_TQPAINTDEVICE(this), LabelUtils::DpiY ); int y = (int)l.pixelToMm( e->y(), TQT_TQPAINTDEVICE(this), LabelUtils::DpiY );
statusbar->changeItem( i18n("Position: ") + statusbar->changeItem( i18n("Position: ") +
TQString( "%1%2 x %3%4" ).arg( x ) TQString( "%1%2 x %3%4" ).tqarg( x )
.arg( Measurements::system() ).arg( y ).arg( Measurements::system()), mouseid ); .tqarg( Measurements::system() ).tqarg( y ).tqarg( Measurements::system()), mouseid );
} }
updateCursor( e->pos() ); updateCursor( e->pos() );

@ -23,7 +23,7 @@
#include <tqcheckbox.h> #include <tqcheckbox.h>
#include <tqgroupbox.h> #include <tqgroupbox.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <layout.h> #include <tqlayout.h>
#include <tqsqlquery.h> #include <tqsqlquery.h>
// KDE includes // KDE includes
@ -32,7 +32,7 @@
#include <kpushbutton.h> #include <kpushbutton.h>
#ifndef I2S #ifndef I2S
#define I2S(x) TQString("%1").arg(x) #define I2S(x) TQString("%1").tqarg(x)
#endif // I2S #endif // I2S
NewLabel::NewLabel( TQWidget* parent, const char* name, bool change, WFlags fl ) NewLabel::NewLabel( TQWidget* parent, const char* name, bool change, WFlags fl )
@ -55,10 +55,10 @@ NewLabel::NewLabel( TQWidget* parent, const char* name, bool change, WFlags fl
TQGroupBox* group1 = new TQGroupBox( this ); TQGroupBox* group1 = new TQGroupBox( this );
group1->setTitle( i18n( "Label" ) ); group1->setTitle( i18n( "Label" ) );
group1->setColumnLayout(0, Qt::Vertical ); group1->setColumnLayout(0, Qt::Vertical );
group1->layout()->setSpacing( 6 ); group1->tqlayout()->setSpacing( 6 );
group1->layout()->setMargin( 11 ); group1->tqlayout()->setMargin( 11 );
TQGridLayout* group1Layout = new TQGridLayout( group1->layout() ); TQGridLayout* group1Layout = new TQGridLayout( group1->tqlayout() );
group1Layout->setAlignment( TQt::AlignTop ); group1Layout->tqsetAlignment( TQt::AlignTop );
TextLabel2 = new TQLabel( group1, "TextLabel2" ); TextLabel2 = new TQLabel( group1, "TextLabel2" );
TextLabel2->setText( i18n( "Producer:" ) ); TextLabel2->setText( i18n( "Producer:" ) );
@ -89,10 +89,10 @@ NewLabel::NewLabel( TQWidget* parent, const char* name, bool change, WFlags fl
TextLabel4 = new TQLabel( this, "TextLabel4" ); TextLabel4 = new TQLabel( this, "TextLabel4" );
preview = new LabelPreview( this, "preview" ); preview = new LabelPreview( this, "preview" );
TQHBoxLayout* hlayout = new TQHBoxLayout( 0, 6, 6 ); TQHBoxLayout* htqlayout = new TQHBoxLayout( 0, 6, 6 );
hlayout->addWidget( TextLabel4 ); htqlayout->addWidget( TextLabel4 );
hlayout->addWidget( preview ); htqlayout->addWidget( preview );
NewLabelLayout->addLayout( hlayout ); NewLabelLayout->addLayout( htqlayout );
TQSpacerItem* spacer_3 = new TQSpacerItem( 0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding ); TQSpacerItem* spacer_3 = new TQSpacerItem( 0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
NewLabelLayout->addItem( spacer_3 ); NewLabelLayout->addItem( spacer_3 );
@ -171,12 +171,12 @@ void NewLabel::updateText()
i18n("%3<br>Vertical Gap: ") + I2S(d.getMeasurements().gapV()) + i18n("%3<br>Vertical Gap: ") + I2S(d.getMeasurements().gapV()) +
i18n("%4<br>Top Gap: ") + I2S(d.getMeasurements().gapTop()) + i18n("%4<br>Top Gap: ") + I2S(d.getMeasurements().gapTop()) +
i18n("%5<br>Left Gap: ") + I2S(d.getMeasurements().gapLeft()) + "%6<br>" i18n("%5<br>Left Gap: ") + I2S(d.getMeasurements().gapLeft()) + "%6<br>"
).arg( Measurements::system() ) ).tqarg( Measurements::system() )
.arg( Measurements::system() ) .tqarg( Measurements::system() )
.arg( Measurements::system() ) .tqarg( Measurements::system() )
.arg( Measurements::system() ) .tqarg( Measurements::system() )
.arg( Measurements::system() ) .tqarg( Measurements::system() )
.arg( Measurements::system() ) ); .tqarg( Measurements::system() ) );
preview->setRect( TQRect( (int)d.getMeasurements().gapLeftMM(), preview->setRect( TQRect( (int)d.getMeasurements().gapLeftMM(),
(int)d.getMeasurements().gapTopMM(), (int)d.getMeasurements().gapTopMM(),
@ -184,14 +184,14 @@ void NewLabel::updateText()
(int)d.getMeasurements().heightMM() ) ); (int)d.getMeasurements().heightMM() ) );
preview->setMeasurements( d.getMeasurements() ); preview->setMeasurements( d.getMeasurements() );
preview->setPrvEnabled( true ); preview->setPrvEnabled( true );
preview->repaint(); preview->tqrepaint();
curid = d.getId(); curid = d.getId();
} }
else else
{ {
TextLabel4->setText( i18n("No label selected.") ); TextLabel4->setText( i18n("No label selected.") );
preview->setPrvEnabled( false ); preview->setPrvEnabled( false );
preview->repaint(); preview->tqrepaint();
} }
} }

@ -32,7 +32,7 @@
#include <tqpainter.h> #include <tqpainter.h>
#include <tqpaintdevicemetrics.h> #include <tqpaintdevicemetrics.h>
#include <tqpixmap.h> #include <tqpixmap.h>
#include <textstream.h> #include <tqtextstream.h>
/* Margin added by GNU Barcode to the barcodes */ /* Margin added by GNU Barcode to the barcodes */
#define BARCODE_MARGIN 10 #define BARCODE_MARGIN 10
@ -172,9 +172,9 @@ bool PixmapBarcode::createPixmap( TQPixmap* target, int resx, int resy )
sh = (double)(size.y() + size.height()); sh = (double)(size.y() + size.height());
} }
cmd = TQString("gs -g%1x%2").arg(int(sw*(double)barkode->scaling())).arg(int(sh*(double)barkode->scaling())); cmd = TQString("gs -g%1x%2").tqarg(int(sw*(double)barkode->scaling())).tqarg(int(sh*(double)barkode->scaling()));
cmd += " -r" + TQString::number( resx*(double)barkode->scaling()) + "x" + TQString::number( resy*(double)barkode->scaling() ); cmd += " -r" + TQString::number( resx*(double)barkode->scaling()) + "x" + TQString::number( resy*(double)barkode->scaling() );
cmd += TQString(" -sDEVICE=%1 -sOutputFile=").arg( bMonocrome ? "pbmraw" : "ppm" ); cmd += TQString(" -sDEVICE=%1 -sOutputFile=").tqarg( bMonocrome ? "pbmraw" : "ppm" );
cmd += input->name(); cmd += input->name();
cmd += " -sNOPAUSE -q - -c showpage quit"; cmd += " -sNOPAUSE -q - -c showpage quit";
@ -394,24 +394,24 @@ TQString PixmapBarcode::createTBarcodeCmd()
// autocorrection // autocorrection
flag.append( barkode->tbarcodeOptions()->autocorrect() ? " Aon" : " Aoff" ); flag.append( barkode->tbarcodeOptions()->autocorrect() ? " Aon" : " Aoff" );
// barcode height // barcode height
flag.append( TQString( " h%1" ).arg( barkode->tbarcodeOptions()->height() ) ); flag.append( TQString( " h%1" ).tqarg( barkode->tbarcodeOptions()->height() ) );
// text above // text above
if( barkode->tbarcodeOptions()->above() ) if( barkode->tbarcodeOptions()->above() )
flag.append( " a" ); flag.append( " a" );
cmd = "tbarcodeclient "; cmd = "tbarcodeclient ";
if( !Barkode::hasFeature( barkode->type(), BARCODE2D ) ) if( !Barkode::hasFeature( barkode->type(), BARCODE2D ) )
cmd += TQString( " m%1" ).arg( barkode->tbarcodeOptions()->moduleWidth() * 1000 ); cmd += TQString( " m%1" ).tqarg( barkode->tbarcodeOptions()->moduleWidth() * 1000 );
if( Barkode::hasFeature( barkode->type(), DATAMATRIX ) ) if( Barkode::hasFeature( barkode->type(), DATAMATRIX ) )
cmd += TQString( " Ds%1" ).arg( barkode->datamatrixSize() ); cmd += TQString( " Ds%1" ).tqarg( barkode->datamatrixSize() );
if( Barkode::hasFeature( barkode->type(), PDF417BARCODE ) ) if( Barkode::hasFeature( barkode->type(), PDF417BARCODE ) )
cmd += TQString( " Pr%1 Pc%2 Pe%3" ).arg( barkode->pdf417Options()->row() ) cmd += TQString( " Pr%1 Pc%2 Pe%3" ).tqarg( barkode->pdf417Options()->row() )
.arg( barkode->pdf417Options()->col() ) .tqarg( barkode->pdf417Options()->col() )
.arg( barkode->pdf417Options()->err() ); .tqarg( barkode->pdf417Options()->err() );
cmd += " " + barkode->type() + TQString(" tPS c%1").arg( barkode->tbarcodeOptions()->checksum() ); cmd += " " + barkode->type() + TQString(" tPS c%1").tqarg( barkode->tbarcodeOptions()->checksum() );
cmd += flag + " d" + KShellProcess::quote( barkode->parsedValue() ); cmd += flag + " d" + KShellProcess::quote( barkode->parsedValue() );
return cmd; return cmd;

@ -24,7 +24,7 @@
// TQt includes // TQt includes
#include <tqiodevice.h> #include <tqiodevice.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <layout.h> #include <tqlayout.h>
#include <tqpainter.h> #include <tqpainter.h>
#include <tqscrollview.h> #include <tqscrollview.h>
#include <tqsqlcursor.h> #include <tqsqlcursor.h>

@ -20,7 +20,7 @@
// TQt includes // TQt includes
#include <tqcheckbox.h> #include <tqcheckbox.h>
#include <layout.h> #include <tqlayout.h>
// KDE includes // KDE includes
#include <knuminput.h> #include <knuminput.h>

@ -45,7 +45,7 @@
#include <tqcheckbox.h> #include <tqcheckbox.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <layout.h> #include <tqlayout.h>
#include <tqpainter.h> #include <tqpainter.h>
#include <tqradiobutton.h> #include <tqradiobutton.h>
#include <tqsqlquery.h> #include <tqsqlquery.h>
@ -519,7 +519,7 @@ void PropertyImage::applySettings( DocumentItem* item, KMacroCommand* command )
if( !imgUrl->url().isEmpty() ) if( !imgUrl->url().isEmpty() )
{ {
if( !pix.load( imgUrl->url() ) ) if( !pix.load( imgUrl->url() ) )
KMessageBox::error( NULL, TQString( i18n("Image format not supported for file: %1") ).arg( imgUrl->url() ) ); KMessageBox::error( NULL, TQString( i18n("Image format not supported for file: %1") ).tqarg( imgUrl->url() ) );
} }
else else
{ {

@ -22,7 +22,7 @@
#include <tqdom.h> #include <tqdom.h>
#include <tqfile.h> #include <tqfile.h>
#include <textstream.h> #include <tqtextstream.h>
#include <kstandarddirs.h> #include <kstandarddirs.h>
#include <ktempfile.h> #include <ktempfile.h>
@ -190,8 +190,8 @@ void PurePostscriptBarcode::createProgram( TQString & prg )
prg = "%!PS-Adobe-2.0 EPSF-2.0\n%%EndComments\n%%EndProlog\n"; prg = "%!PS-Adobe-2.0 EPSF-2.0\n%%EndComments\n%%EndProlog\n";
prg += m_program; prg += m_program;
prg += TQString("20 20 moveto\n(%1) (%2) %3 barcode\n") prg += TQString("20 20 moveto\n(%1) (%2) %3 barcode\n")
.arg( barkode->parsedValue() ) .tqarg( barkode->parsedValue() )
.arg( opt ).arg( type ); .tqarg( opt ).tqarg( type );
} }
TQRect PurePostscriptBarcode::bbox( const char* postscript, long postscript_size ) 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()->writeBlock( postscript, postscript_size );
psfile.file()->close(); psfile.file()->close();
if( !readFromPipe( TQString( gs_bbox ).arg( psfile.file()->name() ).latin1(), &buffer, &len ) || !len ) if( !readFromPipe( TQString( gs_bbox ).tqarg( psfile.file()->name() ).latin1(), &buffer, &len ) || !len )
{ {
psfile.unlink(); psfile.unlink();
return TQRect( 0, 0, 0, 0 ); return TQRect( 0, 0, 0, 0 );

@ -81,9 +81,9 @@ void RectItem::drawZpl( TQTextStream* stream )
*stream << ZPLUtils::fieldOrigin( rect().x(), rect().y() ); *stream << ZPLUtils::fieldOrigin( rect().x(), rect().y() );
if( m_circle ) if( m_circle )
*stream << TQString("~GE%1,%2,%3,B").arg( rect().width() ).arg( rect().height() ).arg( thick ); *stream << TQString("~GE%1,%2,%3,B").tqarg( rect().width() ).tqarg( rect().height() ).tqarg( thick );
else else
*stream << TQString("~GB%1,%2,%3,B,0").arg( rect().width() ).arg( rect().height() ).arg( thick ); *stream << TQString("~GB%1,%2,%3,B,0").tqarg( rect().width() ).tqarg( rect().height() ).tqarg( thick );
} }
void RectItem::drawIpl( TQTextStream* stream, IPLUtils* utils ) void RectItem::drawIpl( TQTextStream* stream, IPLUtils* utils )
@ -97,12 +97,12 @@ void RectItem::drawIpl( TQTextStream* stream, IPLUtils* utils )
{ {
int counter = utils->counter(); int counter = utils->counter();
TQString s = TQString("W%1;").arg( counter ); // field number TQString s = TQString("W%1;").tqarg( counter ); // field number
s += utils->fieldOrigin( rect().x(), rect().y() ); s += utils->fieldOrigin( rect().x(), rect().y() );
s += TQString("l%1;").arg( rect().width() ); // box length s += TQString("l%1;").tqarg( rect().width() ); // box length
s += TQString("h%1;").arg( rect().height() ); // box height s += TQString("h%1;").tqarg( rect().height() ); // box height
s += TQString("w%1;").arg( thick ); s += TQString("w%1;").tqarg( thick );
*stream << utils->field( s ); *stream << utils->field( s );
} }
@ -110,11 +110,11 @@ void RectItem::drawIpl( TQTextStream* stream, IPLUtils* utils )
void RectItem::drawEPcl( TQTextStream* stream ) void RectItem::drawEPcl( TQTextStream* stream )
{ {
TQString s = TQString("C %1").arg( rect().x()+1 ); TQString s = TQString("C %1").tqarg( rect().x()+1 );
s += TQString(" %1").arg( rect().y()+1 ); s += TQString(" %1").tqarg( rect().y()+1 );
s += TQString(" %1").arg( rect().width() ); s += TQString(" %1").tqarg( rect().width() );
s += TQString(" %1").arg( rect().height() ); s += TQString(" %1").tqarg( rect().height() );
s += TQString(" %1 2").arg( pen().width() ); s += TQString(" %1 2").tqarg( pen().width() );
*stream << EPCLUtils::field( s ); *stream << EPCLUtils::field( s );
} }

@ -20,7 +20,7 @@
// TQt includes // TQt includes
#include <tqcheckbox.h> #include <tqcheckbox.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <layout.h> #include <tqlayout.h>
#include <tqpainter.h> #include <tqpainter.h>
#include <tqpen.h> #include <tqpen.h>

@ -20,7 +20,7 @@
// TQt includes // TQt includes
#include <tqlabel.h> #include <tqlabel.h>
#include <layout.h> #include <tqlayout.h>
#include <tqsqlcursor.h> #include <tqsqlcursor.h>
// KDE includes // KDE includes
@ -35,16 +35,16 @@ AddAllDialog::AddAllDialog(TQWidget *parent, const char *name )
: KDialogBase( KDialogBase::Plain, i18n("Add Barcode_basic"), : KDialogBase( KDialogBase::Plain, i18n("Add Barcode_basic"),
KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, parent,name) KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, parent,name)
{ {
TQVBoxLayout* layout = new TQVBoxLayout( plainPage(), 6, 6 ); TQVBoxLayout* tqlayout = new TQVBoxLayout( plainPage(), 6, 6 );
group = new KLineEdit( plainPage() ); group = new KLineEdit( plainPage() );
number = new KIntNumInput( plainPage() ); number = new KIntNumInput( plainPage() );
number->setLabel( i18n( "Number of labels:" ) ); number->setLabel( i18n( "Number of labels:" ) );
number->setRange( 1, 10000, 1, false ); number->setRange( 1, 10000, 1, false );
layout->addWidget( new TQLabel( i18n("Group:"), plainPage() ) ); tqlayout->addWidget( new TQLabel( i18n("Group:"), plainPage() ) );
layout->addWidget( group ); tqlayout->addWidget( group );
layout->addWidget( number ); tqlayout->addWidget( number );
} }
TQString AddAllDialog::groupName() const TQString AddAllDialog::groupName() const
@ -79,7 +79,7 @@ void AddItemsDialog::init()
plainPage()->setFrameStyle( TQFrame::GroupBoxPanel | TQFrame::Sunken ); plainPage()->setFrameStyle( TQFrame::GroupBoxPanel | TQFrame::Sunken );
plainPage()->setLineWidth( 2 ); plainPage()->setLineWidth( 2 );
TQHBoxLayout* layout = new TQHBoxLayout( plainPage(), 6, 6 ); TQHBoxLayout* tqlayout = new TQHBoxLayout( plainPage(), 6, 6 );
group = new KLineEdit( plainPage() ); group = new KLineEdit( plainPage() );
article = new KLineEdit( plainPage() ); article = new KLineEdit( plainPage() );
@ -88,11 +88,11 @@ void AddItemsDialog::init()
number->setLabel( i18n( "Number of labels:" ), KNumInput::AlignLeft | KNumInput::AlignVCenter ); number->setLabel( i18n( "Number of labels:" ), KNumInput::AlignLeft | KNumInput::AlignVCenter );
number->setRange( 1, 10000, 1, false ); number->setRange( 1, 10000, 1, false );
layout->addWidget( number ); tqlayout->addWidget( number );
layout->addWidget( new TQLabel( i18n("Article:" ), plainPage() ) ); tqlayout->addWidget( new TQLabel( i18n("Article:" ), plainPage() ) );
layout->addWidget( article ); tqlayout->addWidget( article );
layout->addWidget( new TQLabel( i18n("Group:"), plainPage() ) ); tqlayout->addWidget( new TQLabel( i18n("Group:"), plainPage() ) );
layout->addWidget( group ); tqlayout->addWidget( group );
setButtonText( KDialogBase::User1, i18n("&Add") ); setButtonText( KDialogBase::User1, i18n("&Add") );

@ -23,7 +23,7 @@
#include <tqfile.h> #include <tqfile.h>
#include <tqgroupbox.h> #include <tqgroupbox.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <layout.h> #include <tqlayout.h>
#include <tqmap.h> #include <tqmap.h>
#include <tqprogressdialog.h> #include <tqprogressdialog.h>
#include <tqsqldatabase.h> #include <tqsqldatabase.h>
@ -383,7 +383,7 @@ void SqlTables::updateTables()
// check for field0 - field9 (1.4.0) // check for field0 - field9 (1.4.0)
TQStringList fields; TQStringList fields;
for( unsigned int i = 0; i < 10; i++ ) for( unsigned int i = 0; i < 10; i++ )
fields.append( TQString("field%1").arg( i ) ); fields.append( TQString("field%1").tqarg( i ) );
TQSqlQuery query("SHOW FIELDS FROM " TABLE_BASIC ); TQSqlQuery query("SHOW FIELDS FROM " TABLE_BASIC );
while ( query.next() ) while ( query.next() )
@ -511,15 +511,15 @@ const TQString SqlTables::getBarcodeMaxLength( const TQString & name )
SqlWidget::SqlWidget( bool showlabel, TQWidget* parent, const char* name ) SqlWidget::SqlWidget( bool showlabel, TQWidget* parent, const char* name )
: TQWidget( parent, name ) : TQWidget( parent, name )
{ {
TQVBoxLayout* layout = new TQVBoxLayout( this ); TQVBoxLayout* tqlayout = new TQVBoxLayout( this );
TQGroupBox* groupDatabase = new TQGroupBox( this ); TQGroupBox* groupDatabase = new TQGroupBox( this );
groupDatabase->setTitle( i18n( "Database Settings" ) ); groupDatabase->setTitle( i18n( "Database Settings" ) );
groupDatabase->setColumnLayout(0, Qt::Vertical ); groupDatabase->setColumnLayout(0, Qt::Vertical );
groupDatabase->layout()->setSpacing( 6 ); groupDatabase->tqlayout()->setSpacing( 6 );
groupDatabase->layout()->setMargin( 11 ); groupDatabase->tqlayout()->setMargin( 11 );
TQVBoxLayout* groupDatabaseLayout = new TQVBoxLayout( groupDatabase->layout() ); TQVBoxLayout* groupDatabaseLayout = new TQVBoxLayout( groupDatabase->tqlayout() );
groupDatabaseLayout->setAlignment( TQt::AlignTop ); groupDatabaseLayout->tqsetAlignment( TQt::AlignTop );
TQGridLayout* grid = new TQGridLayout( 2, 2 ); TQGridLayout* grid = new TQGridLayout( 2, 2 );
@ -576,7 +576,7 @@ SqlWidget::SqlWidget( bool showlabel, TQWidget* parent, const char* name )
if( showlabel ) if( showlabel )
groupDatabaseLayout->addWidget( new TQLabel( i18n("<b>You have to test your database settings before you can procede.</b>"), groupDatabase ) ); groupDatabaseLayout->addWidget( new TQLabel( i18n("<b>You have to test your database settings before you can procede.</b>"), groupDatabase ) );
layout->add( groupDatabase ); tqlayout->add( groupDatabase );
connect( buttonTest, TQT_SIGNAL( clicked() ), this, TQT_SLOT( testSettings() ) ); connect( buttonTest, TQT_SIGNAL( clicked() ), this, TQT_SLOT( testSettings() ) );

@ -141,7 +141,7 @@ TQRect TBarcode2::bbox( const char* postscript, long postscript_size )
psfile.file()->writeBlock( postscript, postscript_size ); psfile.file()->writeBlock( postscript, postscript_size );
psfile.file()->close(); psfile.file()->close();
if( !readFromPipe( TQString( gs_bbox ).arg( psfile.file()->name() ).latin1(), &buffer, &len ) || !len ) if( !readFromPipe( TQString( gs_bbox ).tqarg( psfile.file()->name() ).latin1(), &buffer, &len ) || !len )
{ {
psfile.unlink(); psfile.unlink();
return TQRect( 0, 0, 0, 0 ); return TQRect( 0, 0, 0, 0 );

@ -22,11 +22,11 @@
#include <unistd.h> #include <unistd.h>
// QT includes // QT includes
#include <clipboard.h> #include <tqclipboard.h>
#include <tqcursor.h> #include <tqcursor.h>
#include <tqgroupbox.h> #include <tqgroupbox.h>
#include <tqhbox.h> #include <tqhbox.h>
#include <layout.h> #include <tqlayout.h>
#include <tqpainter.h> #include <tqpainter.h>
#include <tqpaintdevicemetrics.h> #include <tqpaintdevicemetrics.h>
#include <tqprogressdialog.h> #include <tqprogressdialog.h>
@ -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. TQDomElement e = n.toElement(); // try to convert the node to an element.
if( !e.isNull() ) if( !e.isNull() )
if( e.tagName() == "id" ) { if( e.tagName() == "id" ) {
result += TQString("{D%1,").arg( convZeros((e.attribute( "height" ).toInt() + e.attribute( "gap_v" ).toInt())*10,4)); // Altura + Gap vertical result += TQString("{D%1,").tqarg( 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,").tqarg( convZeros(e.attribute( "width" ).toInt()*10,4) ); // Anchura
result += TQString("%1|}\n").arg( convZeros(e.attribute( "height" ).toInt()*10,4) ); // Altura result += TQString("%1|}\n").tqarg( convZeros(e.attribute( "height" ).toInt()*10,4) ); // Altura
result += TQString("{C|}\n"); // Clear buffer result += TQString("{C|}\n"); // Clear buffer
result += TQString("{U2;0130|}\n"); // BackFeed result += TQString("{U2;0130|}\n"); // BackFeed
result += TQString("{D%1,").arg( convZeros((e.attribute( "height" ).toInt() + e.attribute( "gap_v" ).toInt())*10,4)); // Altura + Gap vertical result += TQString("{D%1,").tqarg( 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,").tqarg( convZeros(e.attribute( "width" ).toInt()*10,4) ); // Anchura
result += TQString("%1|}\n").arg( convZeros(e.attribute( "height" ).toInt()*10,4) ); // Altura result += TQString("%1|}\n").tqarg( convZeros(e.attribute( "height" ).toInt()*10,4) ); // Altura
result += TQString("{AX;+000,+000,+00|}\n"); // Position Fine adjust result += TQString("{AX;+000,+000,+00|}\n"); // Position Fine adjust
result += TQString("{AY;+04,1|}\n"); // Print density 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(); if( e.tagName() == "value" ) data = e.text();
n = n.nextSibling(); n = n.nextSibling();
} }
result += TQString("{RB%1;").arg( convZeros(countBar, 2) ); // count de RB result += TQString("{RB%1;").tqarg( convZeros(countBar, 2) ); // count de RB
result += TQString("%1|}\n").arg( data ); // Data + fin result += TQString("%1|}\n").tqarg( data ); // Data + fin
countBar++; countBar++;
} else if( e.tagName() == "textfield" ) { } else if( e.tagName() == "textfield" ) {
result += TQString("{PC%1;").arg( convZeros(countText, 3) ); // count result += TQString("{PC%1;").tqarg( convZeros(countText, 3) ); // count
result += TQString("%1,").arg( posConv(e.attribute( "x_mm"), 4 ) ); // X position result += TQString("%1,").tqarg( posConv(e.attribute( "x_mm"), 4 ) ); // X position
result += TQString("%1,").arg( posConv(e.attribute( "y_mm"), 4 ) ); // Y position result += TQString("%1,").tqarg( posConv(e.attribute( "y_mm"), 4 ) ); // Y position
result += TQString("%1,").arg( "10" ); result += TQString("%1,").tqarg( "10" );
result += TQString("%1,").arg( "15" ); result += TQString("%1,").tqarg( "15" );
result += TQString("%1,").arg( "J" ); result += TQString("%1,").tqarg( "J" );
result += TQString("%1,").arg( "00" ); result += TQString("%1,").tqarg( "00" );
result += TQString("%1|}\n").arg( "B" ); result += TQString("%1|}\n").tqarg( "B" );
TQString etext; TQString etext;
TQDomNode n = e.firstChild(); TQDomNode n = e.firstChild();
@ -155,9 +155,9 @@ TQString tec452(const TQString &url, int count, const TQString &art, const TQStr
n = n.nextSibling(); n = n.nextSibling();
} }
result += TQString("{RC%1;").arg( convZeros(countText, 3) ); // count de RB result += TQString("{RC%1;").tqarg( convZeros(countText, 3) ); // count de RB
etext=getData(etext, art, group, id ); etext=getData(etext, art, group, id );
result += TQString("%1|}\n").arg( etext ); // Data + fin result += TQString("%1|}\n").tqarg( etext ); // Data + fin
countText++; countText++;
} }
else if( e.tagName() == "rect" ) { 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") { if (e.attribute("colorr")=="0" and e.attribute("colorg")=="0" and e.attribute("colorb")=="0") {
result += TQString("{XR;"); // XR result += TQString("{XR;"); // XR
result += TQString("%1,").arg( posConv(e.attribute( "x_mm"), 4 ) ); // X position result += TQString("%1,").tqarg( posConv(e.attribute( "x_mm"), 4 ) ); // X position
result += TQString("%1,").arg( posConv(e.attribute( "y_mm"), 4 ) ); // Y position result += TQString("%1,").tqarg( 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,").tqarg( 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,").tqarg( 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("A"); // Type of Clear
result += TQString("|}\n"); // FIN result += TQString("|}\n"); // FIN
result += TQString("{XR;"); // XR result += TQString("{XR;"); // XR
result += TQString("%1,").arg( posConv(e.attribute( "x_mm"), 4 ) ); // X position result += TQString("%1,").tqarg( posConv(e.attribute( "x_mm"), 4 ) ); // X position
result += TQString("%1,").arg( posConv(e.attribute( "y_mm"), 4 ) ); // Y position result += TQString("%1,").tqarg( 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,").tqarg( 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,").tqarg( 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("B"); // Type of Clear
result += TQString("|}\n"); // FIN result += TQString("|}\n"); // FIN
} }
else { else {
result += TQString("{LC;"); // LC result += TQString("{LC;"); // LC
result += TQString("%1,").arg( posConv(e.attribute( "x_mm"), 4 ) ); // X position result += TQString("%1,").tqarg( posConv(e.attribute( "x_mm"), 4 ) ); // X position
result += TQString("%1,").arg( posConv(e.attribute( "y_mm"), 4 ) ); // Y position result += TQString("%1,").tqarg( 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,").tqarg( 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,").tqarg( 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,"); // Type of line 0=line 1=Rectangulo 2=Jagged line 3=Rectangle with jagged lines
result += TQString("%1").arg(lineWidth(e)); // No. of line width dots 1-9 result += TQString("%1").tqarg(lineWidth(e)); // No. of line width dots 1-9
//result += TQString("999"); // Radius of rounded corners of a rectangle //result += TQString("999"); // Radius of rounded corners of a rectangle
result += TQString("|}\n"); // FIN result += TQString("|}\n"); // FIN
} }
} }
else if( e.tagName() == "line" ) { else if( e.tagName() == "line" ) {
result += TQString("{LC;"); // LC result += TQString("{LC;"); // LC
result += TQString("%1,").arg( posConv(e.attribute( "x_mm"), 4 ) ); // X position result += TQString("%1,").tqarg( posConv(e.attribute( "x_mm"), 4 ) ); // X position
result += TQString("%1,").arg( posConv(e.attribute( "y_mm"), 4 ) ); // Y position result += TQString("%1,").tqarg( 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,").tqarg( 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,").tqarg( 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("0,"); // Type of line 0=line 1=Rectangulo 2=Jagged line 3=Rectangle with jagged lines
result += TQString("%1").arg(lineWidth(e)); // No. of line width dots 1-9 result += TQString("%1").tqarg(lineWidth(e)); // No. of line width dots 1-9
//result += TQString("999"); // Radius of rounded corners of a rectangle //result += TQString("999"); // Radius of rounded corners of a rectangle
result += TQString("|}\n"); // FIN 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("{U1;0130|}\n"); // ForwardFeed
result += TQString("{XS;I,%1,0000C2000|}\n").arg(convZeros(count,4)); // Issue Command result += TQString("{XS;I,%1,0000C2000|}\n").tqarg(convZeros(count,4)); // Issue Command
return result; 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 convZeros( int count, int zeros )
{ {
TQString str= TQString("%1").arg(count); TQString str= TQString("%1").tqarg(count);
int l=strlen(str); //get the string length int l=strlen(str); //get the string length
for(;l<zeros;l++) str = TQString("0") + str; for(;l<zeros;l++) str = TQString("0") + str;
return str; return str;
@ -223,9 +223,9 @@ return str;
TQString posConv( TQString str, int zeros ) TQString posConv( TQString str, int zeros )
{ {
int point=str.find(".",0); int point=str.find(".",0);
TQString dec= TQString("%1").arg(str.mid(point+1,1)); TQString dec= TQString("%1").tqarg(str.mid(point+1,1));
str = str.mid(0,point); str = str.mid(0,point);
str = TQString("%1%2").arg(str).arg(dec); str = TQString("%1%2").tqarg(str).tqarg(dec);
return convZeros (str.toInt(), zeros); return convZeros (str.toInt(), zeros);
} }
@ -240,20 +240,20 @@ else return 0;
TQString code39 (const TQDomElement &e, int countBar) { TQString code39 (const TQDomElement &e, int countBar) {
TQString result; TQString result;
result += TQString("{XB%1;").arg( convZeros(countBar, 2) ); // count result += TQString("{XB%1;").tqarg( convZeros(countBar, 2) ); // count
result += TQString("%1").arg( posConv(e.attribute( "x_mm"), 4 ) ); // X position result += TQString("%1").tqarg( posConv(e.attribute( "x_mm"), 4 ) ); // X position
result += TQString(",%1").arg( posConv(e.attribute( "y_mm"), 4 ) ); // Y position result += TQString(",%1").tqarg( posConv(e.attribute( "y_mm"), 4 ) ); // Y position
result += TQString(",%1").arg( barcodeType( e.attribute( "type") ) ); // Type of bar code result += TQString(",%1").tqarg( barcodeType( e.attribute( "type") ) ); // Type of bar code
result += TQString(",%1").arg( withChecksum(e) ); // Type of check digit result += TQString(",%1").tqarg( withChecksum(e) ); // Type of check digit
result += TQString(",%1").arg( "03" ); // Narrow bar width result += TQString(",%1").tqarg( "03" ); // Narrow bar width
result += TQString(",%1").arg( "03" ); // Narrow space width result += TQString(",%1").tqarg( "03" ); // Narrow space width
result += TQString(",%1").arg( "06" ); // Wide bar width result += TQString(",%1").tqarg( "06" ); // Wide bar width
result += TQString(",%1").arg( "06" ); // Wide space width result += TQString(",%1").tqarg( "06" ); // Wide space width
result += TQString(",%1").arg( "03" ); // Character to Character space width result += TQString(",%1").tqarg( "03" ); // Character to Character space width
result += TQString(",%1").arg( rotation(e.attribute( "rotation", "0" ).toInt())); // Rotation angel of barcode result += TQString(",%1").tqarg( rotation(e.attribute( "rotation", "0" ).toInt())); // Rotation angel of barcode
result += TQString(",%1").arg( "0063" ); // height of barcode result += TQString(",%1").tqarg( "0063" ); // height of barcode
result += TQString(",+%1").arg( sequence(e) ); // Increment / Decrement result += TQString(",+%1").tqarg( 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(",%1").tqarg( 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(",00"); //Number of Zeros to be suppressed
result += TQString("|}\n"); // FIN result += TQString("|}\n"); // FIN
@ -371,17 +371,17 @@ return convZeros(e.attribute("sequencestep" ,"0").toInt() ,10);
TQString code128 (const TQDomElement &e, int countBar) { TQString code128 (const TQDomElement &e, int countBar) {
TQString result; TQString result;
result += TQString("{XB%1;").arg( convZeros(countBar, 2) ); // count result += TQString("{XB%1;").tqarg( convZeros(countBar, 2) ); // count
result += TQString("%1").arg( posConv(e.attribute( "x_mm"), 4 ) ); // X position result += TQString("%1").tqarg( posConv(e.attribute( "x_mm"), 4 ) ); // X position
result += TQString(",%1").arg( posConv(e.attribute( "y_mm"), 4 ) ); // Y position result += TQString(",%1").tqarg( posConv(e.attribute( "y_mm"), 4 ) ); // Y position
result += TQString(",%1").arg( barcodeType( e.attribute( "type") ) ); // Type of bar code result += TQString(",%1").tqarg( barcodeType( e.attribute( "type") ) ); // Type of bar code
result += TQString(",%1").arg( withChecksum(e) ); // Type of check digit result += TQString(",%1").tqarg( withChecksum(e) ); // Type of check digit
result += TQString(",%1").arg( "03" ); // 1 module width result += TQString(",%1").tqarg( "03" ); // 1 module width
result += TQString(",%1").arg( rotation(e.attribute( "rotation", "0" ).toInt())); // Rotation angel of barcode result += TQString(",%1").tqarg( rotation(e.attribute( "rotation", "0" ).toInt())); // Rotation angel of barcode
result += TQString(",%1").arg( "0063" ); // height of barcode result += TQString(",%1").tqarg( "0063" ); // height of barcode
result += TQString(",+%1").arg( sequence(e) ); // Increment / Decrement result += TQString(",+%1").tqarg( sequence(e) ); // Increment / Decrement
result += TQString(",000"); // Length of th WPC guard bar result += TQString(",000"); // Length of th WPC guard bar
result += TQString(",%1").arg( e.attribute( "text", "1" ).toInt() ); // Selection of print or non print of numerals under bars result += TQString(",%1").tqarg( 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(",00"); //Number of Zeros to be suppressed
result += TQString("|}\n"); // FIN result += TQString("|}\n"); // FIN
@ -457,15 +457,15 @@ return result;
TQString pdf417 (const TQDomElement &e, int countBar) { TQString pdf417 (const TQDomElement &e, int countBar) {
TQString result; TQString result;
result += TQString("{XB%1;").arg( convZeros(countBar, 2) ); // count result += TQString("{XB%1;").tqarg( convZeros(countBar, 2) ); // count
result += TQString("%1").arg( posConv(e.attribute( "x_mm"), 4 ) ); // X position result += TQString("%1").tqarg( posConv(e.attribute( "x_mm"), 4 ) ); // X position
result += TQString(",%1").arg( posConv(e.attribute( "y_mm"), 4 ) ); // Y position result += TQString(",%1").tqarg( posConv(e.attribute( "y_mm"), 4 ) ); // Y position
result += TQString(",P"); // Type of bar code ALWAYS PDF417 result += TQString(",P"); // Type of bar code ALWAYS PDF417
result += TQString(",%1").arg( withChecksum(e) ); // Type of check digit result += TQString(",%1").tqarg( withChecksum(e) ); // Type of check digit
result += TQString(",%1").arg( "03" ); // Module Width result += TQString(",%1").tqarg( "03" ); // Module Width
result += TQString(",%1").arg( convZeros(e.attribute("pdf417.col").toInt(),2 )); // Number of columns result += TQString(",%1").tqarg( 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").tqarg( rotation(e.attribute( "rotation", "0" ).toInt())); // Rotation angel of barcode
result += TQString(",%1").arg( "0063" ); // height of barcode result += TQString(",%1").tqarg( "0063" ); // height of barcode
result += TQString("|}\n"); // FIN result += TQString("|}\n"); // FIN
return result; return result;
@ -619,7 +619,7 @@ if (etext.contains("[barcode_no_customer]") ){
while( query.next() ) temp = TQString (query.value( 0 ).toString()); while( query.next() ) temp = TQString (query.value( 0 ).toString());
etext.replace("[barcode_no_customer]" , temp ); etext.replace("[barcode_no_customer]" , temp );
} }
if (etext.contains("[date]") ) etext.replace( "[date]" ,TQDateTime::currentDateTime().toString( KBarcodeSettings::getDateFormat() )); if (etext.contains("[date]") ) etext.replace( "[date]" ,TQDateTime::tqcurrentDateTime().toString( KBarcodeSettings::getDateFormat() ));
if (etext.contains("[time]") ) etext.replace( "[time]" ,TQTime::currentTime().toString()); if (etext.contains("[time]") ) etext.replace( "[time]" ,TQTime::currentTime().toString());
return etext;*/ return etext;*/

@ -22,11 +22,11 @@
#include <stdio.h> #include <stdio.h>
// QT includes // QT includes
#include <clipboard.h> #include <tqclipboard.h>
#include <tqcursor.h> #include <tqcursor.h>
#include <tqgroupbox.h> #include <tqgroupbox.h>
#include <tqhbox.h> #include <tqhbox.h>
#include <layout.h> #include <tqlayout.h>
#include <tqpainter.h> #include <tqpainter.h>
#include <tqpaintdevicemetrics.h> #include <tqpaintdevicemetrics.h>
#include <tqprogressdialog.h> #include <tqprogressdialog.h>

@ -134,14 +134,14 @@ void TextItem::drawIpl( TQTextStream* stream, IPLUtils* utils )
// simply remove all html tags.... // simply remove all html tags....
TQString data = m_text.replace( TQRegExp("<[^>]*>"), "" ); TQString data = m_text.replace( TQRegExp("<[^>]*>"), "" );
TQString s = TQString("H%1;").arg( counter ); // field number TQString s = TQString("H%1;").tqarg( counter ); // field number
s += utils->fieldOrigin( rect().x(), rect().y() ); s += utils->fieldOrigin( rect().x(), rect().y() );
s += TQString("c%1;").arg( 2 ); // font s += TQString("c%1;").tqarg( 2 ); // font
s += TQString("h%1;").arg( 2 ); // vertical magnification ("height") s += TQString("h%1;").tqarg( 2 ); // vertical magnification ("height")
s += TQString("w%1;").arg( 2 ); // horicontyl magnification ("width") s += TQString("w%1;").tqarg( 2 ); // horicontyl magnification ("width")
s += TQString("d0,%1;").arg( data.length() ); // max length of data ! s += TQString("d0,%1;").tqarg( data.length() ); // max length of data !
*stream << utils->field( s ); *stream << utils->field( s );
utils->addValue( data ); utils->addValue( data );
@ -165,9 +165,9 @@ void TextItem::drawEPcl( TQTextStream* stream )
TQStringList::Iterator line = lines.begin(); TQStringList::Iterator line = lines.begin();
for( int i=0; line != lines.end(); ++line, ++i ){ for( int i=0; line != lines.end(); ++line, ++i ){
TQString s = TQString("T %1").arg( rect().x() + 1 ); TQString s = TQString("T %1").tqarg( rect().x() + 1 );
s += TQString(" %1 0 0 0 50 1").arg( rect().y()+50+1 + i*52 ); s += TQString(" %1 0 0 0 50 1").tqarg( rect().y()+50+1 + i*52 );
s += TQString(" %1").arg( *line ); s += TQString(" %1").tqarg( *line );
*stream << EPCLUtils::field( s ); *stream << EPCLUtils::field( s );
} }
} }

@ -28,12 +28,12 @@
#include <tqdockarea.h> #include <tqdockarea.h>
#include <tqregexp.h> #include <tqregexp.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <layout.h> #include <tqlayout.h>
TextLineEditor::TextLineEditor( TokenProvider* token, TQWidget *parent, const char *name ) TextLineEditor::TextLineEditor( TokenProvider* token, TQWidget *parent, const char *name )
: TQWidget( parent, name ), m_token( token ) : TQWidget( parent, name ), m_token( token )
{ {
TQVBoxLayout* layout = new TQVBoxLayout( this, 6, 6 ); TQVBoxLayout* tqlayout = new TQVBoxLayout( this, 6, 6 );
@ -48,8 +48,8 @@ TextLineEditor::TextLineEditor( TokenProvider* token, TQWidget *parent, const ch
setupActions(); setupActions();
layout->addWidget( area ); tqlayout->addWidget( area );
layout->addWidget( editor ); tqlayout->addWidget( editor );

@ -99,14 +99,14 @@ void TextLineItem::drawIpl( TQTextStream* stream, IPLUtils* utils )
// simply remove all html tags.... // simply remove all html tags....
TQString data = m_text.replace( TQRegExp("<[^>]*>"), "" ); TQString data = m_text.replace( TQRegExp("<[^>]*>"), "" );
TQString s = TQString("H%1;").arg( counter ); // field number TQString s = TQString("H%1;").tqarg( counter ); // field number
s += utils->fieldOrigin( rect().x(), rect().y() ); s += utils->fieldOrigin( rect().x(), rect().y() );
s += TQString("c%1;").arg( 2 ); // font s += TQString("c%1;").tqarg( 2 ); // font
s += TQString("h%1;").arg( 2 ); // vertical magnification ("height") s += TQString("h%1;").tqarg( 2 ); // vertical magnification ("height")
s += TQString("w%1;").arg( 2 ); // horicontyl magnification ("width") s += TQString("w%1;").tqarg( 2 ); // horicontyl magnification ("width")
s += TQString("d0,%1;").arg( data.length() ); // max length of data ! s += TQString("d0,%1;").tqarg( data.length() ); // max length of data !
*stream << utils->field( s ); *stream << utils->field( s );
utils->addValue( data ); utils->addValue( data );
@ -129,9 +129,9 @@ void TextLineItem::drawEPcl( TQTextStream* stream )
TQStringList::Iterator line = lines.begin(); TQStringList::Iterator line = lines.begin();
for( int i=0; line != lines.end(); ++line, ++i ){ for( int i=0; line != lines.end(); ++line, ++i ){
TQString s = TQString("T %1").arg( rect().x() + 1 ); TQString s = TQString("T %1").tqarg( rect().x() + 1 );
s += TQString(" %1 0 0 0 50 1").arg( rect().y()+50+1 + i*52 ); s += TQString(" %1 0 0 0 50 1").tqarg( rect().y()+50+1 + i*52 );
s += TQString(" %1").arg( *line ); s += TQString(" %1").tqarg( *line );
*stream << EPCLUtils::field( s ); *stream << EPCLUtils::field( s );
} }
} }

@ -27,7 +27,7 @@
#include <tqhbox.h> #include <tqhbox.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <layout.h> #include <tqlayout.h>
#include <tqsplitter.h> #include <tqsplitter.h>
#include <tqtooltip.h> #include <tqtooltip.h>
#include <tqvaluelist.h> #include <tqvaluelist.h>
@ -36,7 +36,7 @@
#include <tqwidgetstack.h> #include <tqwidgetstack.h>
#include <tqradiobutton.h> #include <tqradiobutton.h>
#include <kcombobox.h> #include <kcombobox.h>
#include <textbrowser.h> #include <tqtextbrowser.h>
#include <kpushbutton.h> #include <kpushbutton.h>
TokenDialog::TokenDialog(TokenProvider* token ,TQWidget *parent, const char *name) TokenDialog::TokenDialog(TokenProvider* token ,TQWidget *parent, const char *name)
@ -125,9 +125,9 @@ void TokenDialog::setupStack2Page1()
{ {
stack2Page1 = new TQWidget(); stack2Page1 = new TQWidget();
TQVBoxLayout* layout = new TQVBoxLayout( stack2Page1 ); TQVBoxLayout* tqlayout = new TQVBoxLayout( stack2Page1 );
TQSplitter* splitter = new TQSplitter( stack2Page1 ); TQSplitter* splitter = new TQSplitter( stack2Page1 );
layout->addWidget( splitter ); tqlayout->addWidget( splitter );
TQVBox* left = new TQVBox( splitter ); TQVBox* left = new TQVBox( splitter );
TQVBox* right = new TQVBox( splitter ); TQVBox* right = new TQVBox( splitter );
@ -266,9 +266,9 @@ void TokenDialog::accept()
m_result = listVariable->currentText(); m_result = listVariable->currentText();
} }
else if( radioSQLQuery->isChecked() ) else if( radioSQLQuery->isChecked() )
m_result = TQString( "sqlquery:%2").arg( editQuery->text() ); m_result = TQString( "sqlquery:%2").tqarg( editQuery->text() );
else if( radioJavaScript->isChecked() ) else if( radioJavaScript->isChecked() )
m_result = TQString( "js:%2").arg( editJavaScript->text() ); m_result = TQString( "js:%2").tqarg( editJavaScript->text() );
m_result = "[" + m_result + "]"; m_result = "[" + m_result + "]";
} }
@ -279,10 +279,10 @@ void TokenDialog::accept()
if( item ) if( item )
{ {
for( unsigned int i = 0; i < m_tokens.count(); i++ ) for( unsigned int i = 0; i < m_tokens.count(); i++ )
if( TQString( "[%1]").arg( m_tokens[i].token ) == item->text( 0 ) ) if( TQString( "[%1]").tqarg( m_tokens[i].token ) == item->text( 0 ) )
{ {
if( m_tokens[i].appendix ) if( m_tokens[i].appendix )
m_result = TQString( "[%1%2]").arg( m_tokens[i].token ).arg( lineEdit->text() ); m_result = TQString( "[%1%2]").tqarg( m_tokens[i].token ).tqarg( lineEdit->text() );
else else
m_result = item->text( 0 ); m_result = item->text( 0 );
break; break;
@ -378,7 +378,7 @@ void TokenDialog::initStackPage2()
if( (*categories)[i].category == cat ) if( (*categories)[i].category == cat )
{ {
for( unsigned int z = 0; z < (*categories)[i].tokens.count(); z++ ) for( unsigned int z = 0; z < (*categories)[i].tokens.count(); z++ )
labelList->insertItem( new KListViewItem( labelList, TQString( "[%1]").arg( (*categories)[i].tokens[z].token ), labelList->insertItem( new KListViewItem( labelList, TQString( "[%1]").tqarg( (*categories)[i].tokens[z].token ),
(*categories)[i].tokens[z].description ) ); (*categories)[i].tokens[z].description ) );
break; break;
@ -396,7 +396,7 @@ void TokenDialog::categoryChanged( TQListBoxItem* item )
if( item->prev() == 0 ) if( item->prev() == 0 )
{ {
for( i = 0; i < m_tokens.count(); i++ ) for( i = 0; i < m_tokens.count(); i++ )
allList->insertItem( new KListViewItem( allList, TQString( "[%1]").arg( m_tokens[i].token ), allList->insertItem( new KListViewItem( allList, TQString( "[%1]").tqarg( m_tokens[i].token ),
m_tokens[i].description ) ); m_tokens[i].description ) );
} }
else else
@ -406,7 +406,7 @@ void TokenDialog::categoryChanged( TQListBoxItem* item )
if( TokenProvider::captionForCategory( (TokenProvider::ECategories)(*categories)[i].category ) == item->text() ) if( TokenProvider::captionForCategory( (TokenProvider::ECategories)(*categories)[i].category ) == item->text() )
{ {
for( unsigned int z = 0; z < (*categories)[i].tokens.count(); z++ ) for( unsigned int z = 0; z < (*categories)[i].tokens.count(); z++ )
allList->insertItem( new KListViewItem( allList, TQString( "[%1]").arg( (*categories)[i].tokens[z].token ), allList->insertItem( new KListViewItem( allList, TQString( "[%1]").tqarg( (*categories)[i].tokens[z].token ),
(*categories)[i].tokens[z].description ) ); (*categories)[i].tokens[z].description ) );
break; break;
@ -416,7 +416,7 @@ void TokenDialog::categoryChanged( TQListBoxItem* item )
// TODO: comparing by a user visible string cries for bugs!!! // TODO: comparing by a user visible string cries for bugs!!!
if( item->text() == i18n("Custom Values") ) if( item->text() == i18n("Custom Values") )
for( i=0;i<m_custom_tokens.count();i++ ) for( i=0;i<m_custom_tokens.count();i++ )
allList->insertItem( new KListViewItem( allList, TQString( "[%1]").arg( m_custom_tokens[i] ), allList->insertItem( new KListViewItem( allList, TQString( "[%1]").tqarg( m_custom_tokens[i] ),
i18n("Variable defined by the user for this label.") ) ); 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++ ) for( unsigned int i = 0; i < m_tokens.count(); i++ )
{ {
if( TQString( "[%1]").arg( m_tokens[i].token ) == item->text( 0 ) ) if( TQString( "[%1]").tqarg( m_tokens[i].token ) == item->text( 0 ) )
{ {
lineEdit->setEnabled( m_tokens[i].appendix ); lineEdit->setEnabled( m_tokens[i].appendix );
if( 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_DESC, i18n("Article description from barcode_basic") ) );
category.tokens.append( tToken( TOK_ARTICLE_NO, i18n("Article number from barcode_basic") ) ); category.tokens.append( tToken( TOK_ARTICLE_NO, i18n("Article number from barcode_basic") ) );
for( int i = 0; i < NUM_FIELDS; i++ ) for( int i = 0; i < NUM_FIELDS; i++ )
category.tokens.append( tToken( TQString( TOK_LINE ).arg( i ), category.tokens.append( tToken( TQString( TOK_LINE ).tqarg( i ),
TQString( TOK_LINE ).arg( i ) + " from customer_text" ) ); TQString( TOK_LINE ).tqarg( i ) + " from customer_text" ) );
for( int i = 0; i < NUM_FIELDS; i++ ) for( int i = 0; i < NUM_FIELDS; i++ )
category.tokens.append( tToken( TQString( TOK_FIELD ).arg( i ), category.tokens.append( tToken( TQString( TOK_FIELD ).tqarg( i ),
TQString( TOK_FIELD ).arg( i ) + " from barcode_basic" ) ); TQString( TOK_FIELD ).tqarg( i ) + " from barcode_basic" ) );
category.tokens.append( tToken( TOK_CUSTOMER_NO, i18n("customer number of the current customer") ) ); 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_CUSTOEMR_NAME, i18n("name of the current customer") ) );
category.tokens.append( tToken( TOK_BARCODE_NO, i18n("Barcode number from barcode_basic") ) ); 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++ ) for( i = 0; i < NUM_FIELDS; i++ )
{ {
const TQString c = TQString( TOK_LINE ).arg( i ); const TQString c = TQString( TOK_LINE ).tqarg( i );
if( t == c ) if( t == c )
ret = query( "SELECT " + c + " FROM " + TABLE_CUSTOMER_TEXT + " WHERE article_no='" + article_no + ret = query( "SELECT " + c + " FROM " + TABLE_CUSTOMER_TEXT + " WHERE article_no='" + article_no +
"' AND customer_no='" + customer_no + "'"); "' AND customer_no='" + customer_no + "'");
@ -468,7 +468,7 @@ TQString TokenProvider::process( const TQString & t )
for( i = 0; i < NUM_FIELDS; i++ ) for( i = 0; i < NUM_FIELDS; i++ )
{ {
const TQString c = TQString( TOK_FIELD ).arg( i ); const TQString c = TQString( TOK_FIELD ).tqarg( i );
if( t == c ) if( t == c )
ret = query("SELECT " + c + " FROM " + TABLE_BASIC + " WHERE article_no='" + article_no + "'"); ret = query("SELECT " + c + " FROM " + TABLE_BASIC + " WHERE article_no='" + article_no + "'");
} }
@ -516,7 +516,7 @@ TQString TokenProvider::process( const TQString & t )
ret = label_name; ret = label_name;
if( t == TOK_DATE ) if( t == TOK_DATE )
ret = TQDateTime::currentDateTime().toString( KBarcodeSettings::getDateFormat() ); ret = TQDateTime::tqcurrentDateTime().toString( KBarcodeSettings::getDateFormat() );
if( date_reg_exp.search(t,0) != -1 ) if( date_reg_exp.search(t,0) != -1 )
{ {
@ -558,7 +558,7 @@ TQString TokenProvider::process( const TQString & t )
if( m_printer && t == TOK_RESOLUTION ) if( m_printer && t == TOK_RESOLUTION )
{ {
TQPaintDeviceMetrics metrics( m_printer ); TQPaintDeviceMetrics metrics( m_printer );
ret = TQString( "%1dpi" ).arg( metrics.logicalDpiY() ); ret = TQString( "%1dpi" ).tqarg( metrics.logicalDpiY() );
} }
if( !m_serial.isEmpty() && t == TOK_SERIAL ) 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" ); TQDomElement labelid = root->ownerDocument().createElement( "id" );
writeDefinition( &labelid, def ); writeDefinition( &labelid, def );
labelid.appendChild( root->ownerDocument().createTextNode( TQString( "%1" ).arg(def->getId()) ) ); labelid.appendChild( root->ownerDocument().createTextNode( TQString( "%1" ).tqarg(def->getId()) ) );
data.appendChild( labelid ); data.appendChild( labelid );
root->appendChild( data ); root->appendChild( data );
@ -279,9 +279,9 @@ TQColor XMLUtils::readXMLColor( TQDomElement* tag, const TQString & prefix, TQCo
int g = c.green(); int g = c.green();
int b = c.blue(); int b = c.blue();
r = tag->attribute( prefix + "r", TQString("%1").arg( r ) ).toInt(); r = tag->attribute( prefix + "r", TQString("%1").tqarg( r ) ).toInt();
g = tag->attribute( prefix + "g", TQString("%1").arg( g ) ).toInt(); g = tag->attribute( prefix + "g", TQString("%1").tqarg( g ) ).toInt();
b = tag->attribute( prefix + "b", TQString("%1").arg( b ) ).toInt(); b = tag->attribute( prefix + "b", TQString("%1").tqarg( b ) ).toInt();
return TQColor( r, g, b); return TQColor( r, g, b);
} }

@ -24,7 +24,7 @@
#include <tqpaintdevicemetrics.h> #include <tqpaintdevicemetrics.h>
#include <tqregexp.h> #include <tqregexp.h>
#include <tqstring.h> #include <tqstring.h>
#include <textstream.h> #include <tqtextstream.h>
// font table for IPL, thanks to Erich Kitzmueller // font table for IPL, thanks to Erich Kitzmueller
struct { int size; int c; int h; int w; } iplfonttable[] = { struct { int size; int c; int h; int w; } iplfonttable[] = {
@ -123,7 +123,7 @@ TQString ZPLUtils::fieldOrigin( int x, int y )
{ {
TQString zpl = TQString(); TQString zpl = TQString();
zpl = TQString("^FO%1,%2\n").arg( x ).arg( y ); // field origin zpl = TQString("^FO%1,%2\n").tqarg( x ).tqarg( y ); // field origin
return zpl; return zpl;
} }
@ -243,7 +243,7 @@ TQString IPLUtils::field( const TQString & data )
TQString IPLUtils::fieldOrigin( int x, int y ) TQString IPLUtils::fieldOrigin( int x, int y )
{ {
return TQString("o%1,%2;f0;").arg( x ).arg( y ); // field origin return TQString("o%1,%2;f0;").tqarg( x ).tqarg( y ); // field origin
} }
TQString IPLUtils::footer() TQString IPLUtils::footer()

Loading…
Cancel
Save