diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:30:05 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:30:05 -0600 |
commit | 64e14d1bc38e39001b5ec84a6e13198ef3c67315 (patch) | |
tree | 437361622d1cb449120e4eb6ca9265f3e838db8c | |
parent | fb010b103703b3229758ce9cf1341979cc450204 (diff) | |
download | kbarcode-64e14d1bc38e39001b5ec84a6e13198ef3c67315.tar.gz kbarcode-64e14d1bc38e39001b5ec84a6e13198ef3c67315.zip |
Rename a number of old tq methods that are no longer tq specific
49 files changed, 386 insertions, 386 deletions
diff --git a/kbarcode/barcodecombo.cpp b/kbarcode/barcodecombo.cpp index 9bc571a..8f08a62 100644 --- a/kbarcode/barcodecombo.cpp +++ b/kbarcode/barcodecombo.cpp @@ -25,7 +25,7 @@ // TQt includes #include <tqcheckbox.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqregexp.h> #include <tqstring.h> #include <ktextedit.h> diff --git a/kbarcode/barcodedialog.cpp b/kbarcode/barcodedialog.cpp index 2bdb1d9..f2af72f 100644 --- a/kbarcode/barcodedialog.cpp +++ b/kbarcode/barcodedialog.cpp @@ -33,9 +33,9 @@ #include <kpushbutton.h> // TQt includes -#include <tqclipboard.h> +#include <clipboard.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqpainter.h> #include <tqpaintdevicemetrics.h> #include <tqpicture.h> @@ -208,7 +208,7 @@ void BarCodeDialog::copy() DocumentItemDrag* drag = new DocumentItemDrag(); drag->setDocumentItem( &list ); - kapp->tqclipboard()->setData( drag, TQClipboard::Clipboard ); + kapp->clipboard()->setData( drag, TQClipboard::Clipboard ); } #include "barcodedialog.moc" diff --git a/kbarcode/barcodedialogs.cpp b/kbarcode/barcodedialogs.cpp index 9856689..e18bd02 100644 --- a/kbarcode/barcodedialogs.cpp +++ b/kbarcode/barcodedialogs.cpp @@ -25,7 +25,7 @@ #include <tqcheckbox.h> #include <tqgroupbox.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqmap.h> #include <tqradiobutton.h> #include <tqtooltip.h> @@ -103,14 +103,14 @@ void AdvancedBarcodeDialog::getData( Barkode* b ) TBarcodeDlg::TBarcodeDlg(TQWidget *parent, const char *name ) : TQWidget( parent, name ) { - TQVBoxLayout* tqlayout = new TQVBoxLayout( this, 6, 6 ); + TQVBoxLayout* layout = new TQVBoxLayout( this, 6, 6 ); TQGroupBox* gb = new TQGroupBox( i18n("TBarcode"), this ); gb->setColumnLayout(0, Qt::Vertical ); - gb->tqlayout()->setSpacing( 6 ); - gb->tqlayout()->setMargin( 11 ); + gb->layout()->setSpacing( 6 ); + gb->layout()->setMargin( 11 ); gb->setEnabled( Barkode::haveTBarcode() || Barkode::haveTBarcode2() ); - TQVBoxLayout* gbLayout = new TQVBoxLayout( gb->tqlayout() ); + TQVBoxLayout* gbLayout = new TQVBoxLayout( gb->layout() ); spinModule = new KDoubleNumInput( gb ); 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 " "this value.</qt>") ); - tqlayout->addWidget( gb ); + layout->addWidget( gb ); } void TBarcodeDlg::setData( Barkode* b ) @@ -253,14 +253,14 @@ void TBarcodeDlg::getData( Barkode* b ) const PDF417BarcodeDlg::PDF417BarcodeDlg(TQWidget *parent, const char *name ) : TQWidget( parent, name ) { - TQVBoxLayout* tqlayout = new TQVBoxLayout( this, 6, 6 ); + TQVBoxLayout* layout = new TQVBoxLayout( this, 6, 6 ); TQGroupBox* gpdf = new TQGroupBox( i18n("PDF417"), this ); gpdf->setColumnLayout(0, Qt::Vertical ); - gpdf->tqlayout()->setSpacing( 6 ); - gpdf->tqlayout()->setMargin( 11 ); + gpdf->layout()->setSpacing( 6 ); + gpdf->layout()->setMargin( 11 ); gpdf->setEnabled( Barkode::haveTBarcode() || Barkode::havePDFBarcode() ); - TQVBoxLayout* gpdfLayout = new TQVBoxLayout( gpdf->tqlayout() ); + TQVBoxLayout* gpdfLayout = new TQVBoxLayout( gpdf->layout() ); spinRow = new KIntNumInput( gpdf ); spinRow->setLabel( i18n("Rows:"), AlignLeft | AlignVCenter ); @@ -277,7 +277,7 @@ PDF417BarcodeDlg::PDF417BarcodeDlg(TQWidget *parent, const char *name ) gpdfLayout->addWidget( spinRow ); gpdfLayout->addWidget( spinCol ); gpdfLayout->addWidget( spinErr ); - tqlayout->addWidget( gpdf ); + layout->addWidget( gpdf ); } void PDF417BarcodeDlg::setData( Barkode* b ) @@ -365,9 +365,9 @@ SequenceDlg::SequenceDlg( TQWidget *parent, const char *name ) TQButtonGroup* group = new TQButtonGroup( i18n("Sequence"), this ); group->setColumnLayout(0, Qt::Vertical ); - group->tqlayout()->setSpacing( 6 ); - group->tqlayout()->setMargin( 11 ); - TQVBoxLayout* tqlayout = new TQVBoxLayout( group->tqlayout() ); + group->layout()->setSpacing( 6 ); + group->layout()->setMargin( 11 ); + TQVBoxLayout* layout = new TQVBoxLayout( group->layout() ); 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->setRange( -100000, 100000, 1, false ); - tqlayout->addWidget( checkSequence ); - tqlayout->addWidget( radioNumbers ); - tqlayout->addWidget( radioAlpha ); - tqlayout->addWidget( radioAlphaNum ); - tqlayout->addWidget( spinStep ); - tqlayout->addWidget( spinStart ); + layout->addWidget( checkSequence ); + layout->addWidget( radioNumbers ); + layout->addWidget( radioAlpha ); + layout->addWidget( radioAlphaNum ); + layout->addWidget( spinStep ); + layout->addWidget( spinStart ); main->addWidget( group ); @@ -443,10 +443,10 @@ ColorDlg::ColorDlg(TQWidget *parent, const char *name) { TQGroupBox* gb = new TQGroupBox( i18n("Colors"), this ); gb->setColumnLayout(0, Qt::Vertical ); - gb->tqlayout()->setSpacing( 6 ); - gb->tqlayout()->setMargin( 11 ); + gb->layout()->setSpacing( 6 ); + gb->layout()->setMargin( 11 ); gb->setEnabled( Barkode::havePurePostscriptBarcode() ); - TQGridLayout* gbLayout = new TQGridLayout( gb->tqlayout() ); + TQGridLayout* gbLayout = new TQGridLayout( gb->layout() ); buttonBarColor = new KColorButton( gb ); buttonBackColor = new KColorButton( gb ); diff --git a/kbarcode/barcodeitem.cpp b/kbarcode/barcodeitem.cpp index 39af930..2b34aaa 100644 --- a/kbarcode/barcodeitem.cpp +++ b/kbarcode/barcodeitem.cpp @@ -213,13 +213,13 @@ void BarcodeItem::drawIpl( TQTextStream* stream, IPLUtils* utils ) } int counter = utils->counter(); - TQString s = TQString("B%1;").tqarg( counter ); // field number + TQString s = TQString("B%1;").arg( counter ); // field number s += utils->fieldOrigin( rect().x(), rect().y() ); - s += TQString("c%1;").tqarg( encoding ); // encoding type - s += TQString("h%1;").tqarg( rect().height() ); // height of barcode - s += TQString("w%1;").tqarg( 3 ); // width of barcode (per line) - s += TQString("d0,%1;").tqarg( value().length() ); // max length of data + s += TQString("c%1;").arg( encoding ); // encoding type + s += TQString("h%1;").arg( rect().height() ); // height of barcode + s += TQString("w%1;").arg( 3 ); // width of barcode (per line) + s += TQString("d0,%1;").arg( value().length() ); // max length of data *stream << utils->field( s ); utils->addValue( value() ); @@ -235,11 +235,11 @@ void BarcodeItem::drawEPcl( TQTextStream* stream ) } // Coordinates cannot start at zero - TQString s = TQString("B %1").tqarg( rect().x()+1 ); - s += TQString(" %1 0").tqarg( rect().y() + rect().height() ); - s += TQString(" %1 1 4").tqarg( encoding ); - s += TQString(" %1 1").tqarg( rect().height() ); - s += TQString(" %1").tqarg( value() ); + TQString s = TQString("B %1").arg( rect().x()+1 ); + s += TQString(" %1 0").arg( rect().y() + rect().height() ); + s += TQString(" %1 1 4").arg( encoding ); + s += TQString(" %1 1").arg( rect().height() ); + s += TQString(" %1").arg( value() ); *stream << EPCLUtils::field( s ); } diff --git a/kbarcode/barcodeprinterdlg.cpp b/kbarcode/barcodeprinterdlg.cpp index 4a76091..9ee6199 100644 --- a/kbarcode/barcodeprinterdlg.cpp +++ b/kbarcode/barcodeprinterdlg.cpp @@ -24,14 +24,14 @@ #include <tqcheckbox.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqvbuttongroup.h> BarcodePrinterDlg::BarcodePrinterDlg(TQWidget *parent, const char *name) : KDialogBase( KDialogBase::Plain, i18n("Barcode Printer"), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, parent,name) { - TQGridLayout* tqlayout = new TQGridLayout( plainPage(), 6, 6 ); + TQGridLayout* layout = new TQGridLayout( plainPage(), 6, 6 ); TQLabel* label = new TQLabel( i18n("&Output Format:"), plainPage() ); comboFormat = new KComboBox( false, plainPage() ); @@ -47,13 +47,13 @@ BarcodePrinterDlg::BarcodePrinterDlg(TQWidget *parent, const char *name) comboDevice = new KComboBox( true, plainPage() ); label3->setBuddy( comboDevice ); - tqlayout->addWidget( label, 0, 0 ); - tqlayout->addMultiCellWidget( comboFormat, 0, 0, 1, 2 ); - tqlayout->addMultiCellWidget( checkFile, 1, 1, 1, 2 ); - tqlayout->addWidget( label2, 2, 0 ); - tqlayout->addWidget( requester, 2, 1 ); - tqlayout->addWidget( label3, 3, 0 ); - tqlayout->addMultiCellWidget( comboDevice, 3, 3, 1, 2 ); + layout->addWidget( label, 0, 0 ); + layout->addMultiCellWidget( comboFormat, 0, 0, 1, 2 ); + layout->addMultiCellWidget( checkFile, 1, 1, 1, 2 ); + layout->addWidget( label2, 2, 0 ); + layout->addWidget( requester, 2, 1 ); + layout->addWidget( label3, 3, 0 ); + layout->addMultiCellWidget( comboDevice, 3, 3, 1, 2 ); comboFormat->insertItem( i18n("TEC Printer (TEC)") ); comboFormat->insertItem( i18n("Zebra Printer (ZPL)") ); diff --git a/kbarcode/batchprinter.cpp b/kbarcode/batchprinter.cpp index 9bc1409..2319fda 100644 --- a/kbarcode/batchprinter.cpp +++ b/kbarcode/batchprinter.cpp @@ -300,7 +300,7 @@ void BatchPrinter::startImages() else name += m_image_custom_filename; - TQString filename = name + TQString("_%1.").tqarg( i ) + KImageIO::suffix( m_image_format ); + TQString filename = name + TQString("_%1.").arg( i ) + KImageIO::suffix( m_image_format ); unsigned int c = 0; while( TQFile::exists( filename ) ) { @@ -334,7 +334,7 @@ void BatchPrinter::startBCP() TQFile file( m_path ); if( !file.open( IO_WriteOnly ) ) // | IO_Raw ) ) { - KMessageBox::error( parent, TQString( i18n("<qt>Can't open the file or device <b>%1</b></qt>.") ).tqarg( m_path ) ); + KMessageBox::error( parent, TQString( i18n("<qt>Can't open the file or device <b>%1</b></qt>.") ).arg( m_path ) ); return; } diff --git a/kbarcode/batchwizard.cpp b/kbarcode/batchwizard.cpp index ef1db26..951f4bd 100644 --- a/kbarcode/batchwizard.cpp +++ b/kbarcode/batchwizard.cpp @@ -31,12 +31,12 @@ #include <tqbuffer.h> #include <tqcheckbox.h> -#include <tqclipboard.h> +#include <clipboard.h> #include <tqcursor.h> #include <tqdom.h> #include <tqheader.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqradiobutton.h> #include <tqsqlselectcursor.h> #include <tqtooltip.h> @@ -394,7 +394,7 @@ void BatchWizard::setupStackPage4() TQFrame* buttons = new TQFrame( stack4 ); buttons->setMargin( 10 ); - TQVBoxLayout* tqlayout = new TQVBoxLayout( buttons ); + TQVBoxLayout* layout = new TQVBoxLayout( buttons ); TQSpacerItem* spacer1 = 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( buttonRemoveAllAddress, i18n("Remove all contacts from the list of contacts which will be printed.") ); - tqlayout->addItem( spacer1 ); - tqlayout->addWidget( buttonAddAllAddress ); - tqlayout->addWidget( buttonAddAddress ); - tqlayout->addWidget( buttonRemoveAddress ); - tqlayout->addWidget( buttonRemoveAllAddress ); - tqlayout->addItem( spacer2 ); + layout->addItem( spacer1 ); + layout->addWidget( buttonAddAllAddress ); + layout->addWidget( buttonAddAddress ); + layout->addWidget( buttonRemoveAddress ); + layout->addWidget( buttonRemoveAllAddress ); + layout->addItem( spacer2 ); mainLayout->addWidget( list1 ); 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! if( !TQFile::exists( m_url->url() ) ) { - KMessageBox::error( this, TQString( i18n("The label file %1 was not found") ).tqarg( m_url->url()) ); + KMessageBox::error( this, TQString( i18n("The label file %1 was not found") ).arg( m_url->url()) ); return; } @@ -747,7 +747,7 @@ bool BatchWizard::addItem( const TQString & article, const TQString & group, int TQString temp; temp.sprintf("%0*i", 5, sqlList->childCount() + 1 ); - KListViewItem* item = new KListViewItem( sqlList, temp, TQString( "%1" ).tqarg( count ), + KListViewItem* item = new KListViewItem( sqlList, temp, TQString( "%1" ).arg( count ), article, group ); sqlList->insertItem( item ); @@ -873,7 +873,7 @@ void BatchWizard::loadFromFile() void BatchWizard::loadFromClipboard() { - TQClipboard *cb = KApplication::tqclipboard(); + TQClipboard *cb = KApplication::clipboard(); loadData( cb->text() ); } @@ -1076,7 +1076,7 @@ bool BatchWizard::fillVarTable() file.setCSVFile(true); if( !file.isValid() ) { - KMessageBox::error( this, TQString( i18n("Can't open file: %1") ).tqarg( importCsvFile->url() ) ); + KMessageBox::error( this, TQString( i18n("Can't open file: %1") ).arg( importCsvFile->url() ) ); return false; } diff --git a/kbarcode/configdialog.cpp b/kbarcode/configdialog.cpp index 139c2ec..3f39638 100644 --- a/kbarcode/configdialog.cpp +++ b/kbarcode/configdialog.cpp @@ -23,7 +23,7 @@ #include <tqbuttongroup.h> #include <tqcheckbox.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqpaintdevicemetrics.h> #include <tqradiobutton.h> #include <tqsqldatabase.h> @@ -64,13 +64,13 @@ ConfigDialog::~ConfigDialog() void ConfigDialog::setupTab1( ) { TQFrame* box = addPage( i18n("SQL Settings"), "", BarIcon("connect_no") ); - TQVBoxLayout* tqlayout = new TQVBoxLayout( box, 6, 6 ); + TQVBoxLayout* layout = new TQVBoxLayout( box, 6, 6 ); TQSpacerItem* spacer = new TQSpacerItem( 0, 0, TQSizePolicy::Expanding, TQSizePolicy::Expanding ); sqlwidget = new SqlWidget( false, box, "sqlwidget" ); - tqlayout->addWidget( sqlwidget ); - tqlayout->addItem( spacer ); + layout->addWidget( sqlwidget ); + layout->addItem( spacer ); } void ConfigDialog::setupTab2() @@ -218,9 +218,9 @@ void ConfigDialog::setupTab5() TQButtonGroup* bg = new TQButtonGroup( i18n("On New Article"), box ); bg->setColumnLayout(0, Qt::Vertical ); - bg->tqlayout()->setSpacing( 6 ); - bg->tqlayout()->setMargin( 11 ); - TQGridLayout* bgLayout = new TQGridLayout( bg->tqlayout() ); + bg->layout()->setSpacing( 6 ); + bg->layout()->setMargin( 11 ); + TQGridLayout* bgLayout = new TQGridLayout( bg->layout() ); TQStringList alist, glist; alist.append( i18n("No Line Break") ); @@ -259,9 +259,9 @@ void ConfigDialog::setupTab5() TQButtonGroup* bg2 = new TQButtonGroup( i18n("On New Group"), box ); bg2->setColumnLayout(0, Qt::Vertical ); - bg2->tqlayout()->setSpacing( 6 ); - bg2->tqlayout()->setMargin( 11 ); - TQGridLayout* bg2Layout = new TQGridLayout( bg2->tqlayout() ); + bg2->layout()->setSpacing( 6 ); + bg2->layout()->setMargin( 11 ); + TQGridLayout* bg2Layout = new TQGridLayout( bg2->layout() ); onNewGroup1 = new KComboBox( false, bg2 ); onNewGroup2 = new KComboBox( false, bg2 ); @@ -345,7 +345,7 @@ void ConfigDialog::accept() void ConfigDialog::updateDatePreview() { - labelDate->setText( i18n("Preview: ") + TQDateTime::tqcurrentDateTime().toString( date->text() ) ); + labelDate->setText( i18n("Preview: ") + TQDateTime::currentDateTime().toString( date->text() ) ); } #include "configdialog.moc" diff --git a/kbarcode/confwizard.cpp b/kbarcode/confwizard.cpp index 76e31bd..d372879 100644 --- a/kbarcode/confwizard.cpp +++ b/kbarcode/confwizard.cpp @@ -24,11 +24,11 @@ #include <tqbuttongroup.h> #include <tqcheckbox.h> #include <tqcursor.h> -#include <tqlayout.h> +#include <layout.h> #include <tqsqldatabase.h> #include <tqradiobutton.h> #include <tqprinter.h> -#include <tqtextbrowser.h> +#include <textbrowser.h> // KDE includes #include <kapplication.h> @@ -151,7 +151,7 @@ void ConfWizard::setupPage3() 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->tqsetAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) ); + TextLabel1_2->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) ); pageLayout_3->addWidget( TextLabel1_2 ); Layout5_2 = new TQVBoxLayout( 0, 0, 6, "Layout5_2"); diff --git a/kbarcode/csvfile.cpp b/kbarcode/csvfile.cpp index 880898f..15eeb38 100644 --- a/kbarcode/csvfile.cpp +++ b/kbarcode/csvfile.cpp @@ -20,7 +20,7 @@ #include "printersettings.h" #include <tqbuffer.h> -#include <tqtextcodec.h> +#include <textcodec.h> CSVFile::CSVFile( const TQString & filename ) { @@ -55,18 +55,18 @@ CSVFile::CSVFile( TQBuffer & buf ) CSVFile::~CSVFile() { - if( m_stream.tqdevice() && m_stream.tqdevice()->isOpen() ) - m_stream.tqdevice()->close(); + if( m_stream.device() && m_stream.device()->isOpen() ) + m_stream.device()->close(); } TQStringList CSVFile::readNextLine() { TQString line; - if( !m_stream.tqdevice() ) + if( !m_stream.device() ) return TQStringList(); - if( !m_stream.tqdevice()->isOpen() ) + if( !m_stream.device()->isOpen() ) return TQStringList(); // walk through the lines until a line containing valid data diff --git a/kbarcode/csvfile.h b/kbarcode/csvfile.h index 9a0c829..fb38796 100644 --- a/kbarcode/csvfile.h +++ b/kbarcode/csvfile.h @@ -20,7 +20,7 @@ #include <tqfile.h> #include <tqstringlist.h> -#include <tqtextstream.h> +#include <textstream.h> class TQBuffer; @@ -106,10 +106,10 @@ class CSVFile { bool CSVFile::isValid() const { - if( !m_stream.tqdevice() ) + if( !m_stream.device() ) return false; - return m_stream.tqdevice()->isOpen(); + return m_stream.device()->isOpen(); } bool CSVFile::isEof() const diff --git a/kbarcode/csvimportdlg.cpp b/kbarcode/csvimportdlg.cpp index 875549d..c952fb6 100644 --- a/kbarcode/csvimportdlg.cpp +++ b/kbarcode/csvimportdlg.cpp @@ -29,13 +29,13 @@ #include <tqhbuttongroup.h> #include <tqheader.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlistbox.h> #include <tqprogressdialog.h> #include <tqsqlquery.h> #include <tqtable.h> #include <tqradiobutton.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqvbox.h> // KDE includes @@ -91,7 +91,7 @@ CSVImportDlg::~CSVImportDlg() void CSVImportDlg::createPage1() { TQFrame* box = addPage( i18n("&Import Data") ); - TQVBoxLayout* tqlayout = new TQVBoxLayout( box, 6, 6 ); + TQVBoxLayout* layout = new TQVBoxLayout( box, 6, 6 ); TQGridLayout* grid = new TQGridLayout( 2 ); requester = new KURLRequester( box ); @@ -114,7 +114,7 @@ void CSVImportDlg::createPage1() table->setReadOnly( true ); frame = new TQFrame( box ); - TQHBoxLayout* tqlayout2 = new TQHBoxLayout( frame, 6, 6 ); + TQHBoxLayout* layout2 = new TQHBoxLayout( frame, 6, 6 ); spinCol = new KIntNumInput( frame ); spinCol->setLabel( i18n("Column:"), AlignLeft | AlignVCenter ); @@ -123,10 +123,10 @@ void CSVImportDlg::createPage1() comboField = new KComboBox( false, frame ); buttonSet = new KPushButton( i18n("Set"), frame ); - tqlayout2->addWidget( spinCol ); - tqlayout2->addWidget( new TQLabel( i18n("Database field to use for this column:"), frame ) ); - tqlayout2->addWidget( comboField ); - tqlayout2->addWidget( buttonSet ); + layout2->addWidget( spinCol ); + layout2->addWidget( new TQLabel( i18n("Database field to use for this column:"), frame ) ); + layout2->addWidget( comboField ); + layout2->addWidget( buttonSet ); grid->addWidget( new TQLabel( i18n("File to import:"), box ), 0, 0 ); grid->addWidget( requester, 0, 1 ); @@ -139,17 +139,17 @@ void CSVImportDlg::createPage1() grid->addWidget( checkLoadAll, 4, 0 ); grid->addWidget( spinLoadOnly, 4, 1 ); - tqlayout->addLayout( grid ); - tqlayout->addWidget( table ); - tqlayout->setStretchFactor( table, 2 ); - tqlayout->addWidget( frame ); + layout->addLayout( grid ); + layout->addWidget( table ); + layout->setStretchFactor( table, 2 ); + layout->addWidget( frame ); } void CSVImportDlg::createPage2() { labelprinterdata* lb = PrinterSettings::getInstance()->getData(); TQFrame* mainBox = addPage( i18n("&Import Settings") ); - TQVBoxLayout* tqlayout = new TQVBoxLayout( mainBox, 6, 6 ); + TQVBoxLayout* layout = new TQVBoxLayout( mainBox, 6, 6 ); TQSpacerItem* spacer1 = 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 ); groupCSV->setColumnLayout(0, Qt::Vertical ); - groupCSV->tqlayout()->setSpacing( 6 ); - groupCSV->tqlayout()->setMargin( 11 ); + groupCSV->layout()->setSpacing( 6 ); + groupCSV->layout()->setMargin( 11 ); - TQVBoxLayout* vbox = new TQVBoxLayout( groupCSV->tqlayout() ); + TQVBoxLayout* vbox = new TQVBoxLayout( groupCSV->layout() ); TQGridLayout* grid = new TQGridLayout( 2, 2 ); grid->setSpacing( 6 ); grid->setMargin( 11 ); @@ -196,10 +196,10 @@ void CSVImportDlg::createPage2() vbox->addItem( spacer1 ); groupFixed->setColumnLayout(0, Qt::Horizontal ); - groupFixed->tqlayout()->setSpacing( 6 ); - groupFixed->tqlayout()->setMargin( 11 ); - TQHBoxLayout* groupFixedLayout = new TQHBoxLayout( groupFixed->tqlayout() ); - groupFixedLayout->tqsetAlignment( TQt::AlignTop ); + groupFixed->layout()->setSpacing( 6 ); + groupFixed->layout()->setMargin( 11 ); + TQHBoxLayout* groupFixedLayout = new TQHBoxLayout( groupFixed->layout() ); + groupFixedLayout->setAlignment( TQt::AlignTop ); listWidth = new KListBox( groupFixed ); @@ -214,17 +214,17 @@ void CSVImportDlg::createPage2() spinNumber->setValue( 1 ); spinNumber->setFocus(); - TQVBoxLayout* tqlayout2 = new TQVBoxLayout( 0, 6, 6 ); - tqlayout2->addWidget( buttonAdd ); - tqlayout2->addWidget( buttonRemove ); - tqlayout2->addWidget( spinNumber ); - tqlayout2->addItem( spacer2 ); + TQVBoxLayout* layout2 = new TQVBoxLayout( 0, 6, 6 ); + layout2->addWidget( buttonAdd ); + layout2->addWidget( buttonRemove ); + layout2->addWidget( spinNumber ); + layout2->addItem( spacer2 ); groupFixedLayout->addWidget( listWidth ); - groupFixedLayout->addLayout( tqlayout2 ); + groupFixedLayout->addLayout( layout2 ); - tqlayout->addWidget( buttonGroup ); - tqlayout->addWidget( hboxFrame ); + layout->addWidget( buttonGroup ); + layout->addWidget( hboxFrame ); radioCSVFile->setChecked( true ); } @@ -386,7 +386,7 @@ void CSVImportDlg::accept() void CSVImportDlg::addWidth() { - listWidth->insertItem( TQString("%1").tqarg(spinNumber->value()), -1 ); + listWidth->insertItem( TQString("%1").arg(spinNumber->value()), -1 ); settingsChanged(); } diff --git a/kbarcode/databasebrowser.cpp b/kbarcode/databasebrowser.cpp index 1490cc5..1fd40ab 100644 --- a/kbarcode/databasebrowser.cpp +++ b/kbarcode/databasebrowser.cpp @@ -22,7 +22,7 @@ #include "csvimportdlg.h" // TQt includes -#include <tqclipboard.h> +#include <clipboard.h> // KDE includes #include <kaction.h> diff --git a/kbarcode/definition.cpp b/kbarcode/definition.cpp index 23d1eca..ce53ad1 100644 --- a/kbarcode/definition.cpp +++ b/kbarcode/definition.cpp @@ -19,7 +19,7 @@ #include "sqltables.h" // TQt includes -#include <tqtextstream.h> +#include <textstream.h> #include <tqsqlquery.h> #include <tqregexp.h> @@ -136,7 +136,7 @@ Definition::Definition( TQWidget* parent ) Definition::Definition( int label_def_id, TQWidget* parent ) : m_parent( parent ) { - init( TQString("%1").tqarg( label_def_id ) ); + init( TQString("%1").arg( label_def_id ) ); } Definition::Definition( const TQString & label_def_id, TQWidget* parent ) @@ -224,7 +224,7 @@ void Definition::setId( const TQString & label_def_id ) void Definition::setId( int label_def_id ) { - init( TQString("%1").tqarg( label_def_id ) ); + init( TQString("%1").arg( label_def_id ) ); } void Definition::init( const TQString & label_def_id ) diff --git a/kbarcode/definitiondialog.cpp b/kbarcode/definitiondialog.cpp index 64da5c5..f371707 100644 --- a/kbarcode/definitiondialog.cpp +++ b/kbarcode/definitiondialog.cpp @@ -24,7 +24,7 @@ #include <kpushbutton.h> #include <krestrictedline.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqpainter.h> // KDE includes @@ -80,7 +80,7 @@ DefinitionDialog::DefinitionDialog( TQWidget* parent, const char* name, bool mo { resize( 465, 345 ); setCaption( i18n( "Add Label Definition" ) ); - TQHBoxLayout* tqlayout = new TQHBoxLayout( this, 6, 6 ); + TQHBoxLayout* layout = new TQHBoxLayout( this, 6, 6 ); DefinitionDialogLayout = new TQVBoxLayout( 0, 11, 6, "DefinitionDialogLayout"); Layout17 = new TQHBoxLayout( 0, 0, 6, "Layout17"); @@ -96,11 +96,11 @@ DefinitionDialog::DefinitionDialog( TQWidget* parent, const char* name, bool mo Layout13->addWidget( TextLabel2 ); TextLabel3 = new TQLabel( this, "TextLabel3" ); - TextLabel3->setText( TQString( i18n( "Width (in %1):" ) ).tqarg( Measurements::system() ) ); + TextLabel3->setText( TQString( i18n( "Width (in %1):" ) ).arg( Measurements::system() ) ); Layout13->addWidget( TextLabel3 ); TextLabel4 = new TQLabel( this, "TextLabel4" ); - TextLabel4->setText( TQString( i18n( "Height (in %1):" ) ).tqarg( Measurements::system() ) ); + TextLabel4->setText( TQString( i18n( "Height (in %1):" ) ).arg( Measurements::system() ) ); Layout13->addWidget( TextLabel4 ); TextLabel5 = new TQLabel( this, "TextLabel5" ); @@ -202,8 +202,8 @@ DefinitionDialog::DefinitionDialog( TQWidget* parent, const char* name, bool mo DefinitionDialogLayout->addLayout( Layout16 ); preview = new LabelPreview( this ); - tqlayout->addLayout( DefinitionDialogLayout ); - tqlayout->addWidget( preview ); + layout->addLayout( DefinitionDialogLayout ); + layout->addWidget( preview ); l = new TQLabel( this ); 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->setMeasurements( m ); - preview->tqrepaint(); + preview->repaint(); } void DefinitionDialog::drawGraphic() diff --git a/kbarcode/documentitem.h b/kbarcode/documentitem.h index d1891b1..d58aa3f 100644 --- a/kbarcode/documentitem.h +++ b/kbarcode/documentitem.h @@ -22,7 +22,7 @@ #include <tqobject.h> #include <tqsortedlist.h> #include <tqstring.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqcolor.h> #include <tqpen.h> diff --git a/kbarcode/dsmainwindow.cpp b/kbarcode/dsmainwindow.cpp index 6005d45..4de9b13 100644 --- a/kbarcode/dsmainwindow.cpp +++ b/kbarcode/dsmainwindow.cpp @@ -25,7 +25,7 @@ // TQt includes #include <tqcheckbox.h> -#include <tqtextbrowser.h> +#include <textbrowser.h> #include <tqsqldatabase.h> // KDE includes diff --git a/kbarcode/dsrichtext.cpp b/kbarcode/dsrichtext.cpp index 2898f1d..b2444dc 100644 --- a/kbarcode/dsrichtext.cpp +++ b/kbarcode/dsrichtext.cpp @@ -74,11 +74,11 @@ DSRichText::~DSRichText() { } -void DSRichText::initFormat( formated_word* f, int tqalignment ) +void DSRichText::initFormat( formated_word* f, int alignment ) { f->text = TQString(); f->line = false; - f->tqalignment = tqalignment; + f->alignment = alignment; f->font = m_base; f->color = m_color; } @@ -147,7 +147,7 @@ void DSRichText::draw( TQPainter* p ) for( unsigned int i = 0; i < lines.count(); i++ ) { formated_line l = lines[i]; - if( l.formats.count() && l.formats[0].tqalignment == TQt::AlignJustify && i != lines.count() - 1 ) { + if( l.formats.count() && l.formats[0].alignment == TQt::AlignJustify && i != lines.count() - 1 ) { // last line in a paragraph is not justified (in blocksatz mode)! drawJustified( &l ); } else { @@ -157,7 +157,7 @@ void DSRichText::draw( TQPainter* p ) painter->setFont( f.font ); painter->setPen( TQPen( f.color ) ); - int a = f.tqalignment; + int a = f.alignment; if( a == TQt::AlignRight ) { a = TQt::AlignLeft; if( !x ) @@ -208,7 +208,7 @@ void DSRichText::drawJustified( formated_line* line ) bool DSRichText::parseParagraph() { - int tqalignment = 0; + int alignment = 0; formated_word f; TQString d = parse( text, "<p", "</p>", pos ); //qDebug("D=" + d ); @@ -218,11 +218,11 @@ bool DSRichText::parseParagraph() if( d.isNull() ) return false; - d = parseParagraphTag( d, &tqalignment ); + d = parseParagraphTag( d, &alignment ); WordList words; TQString data; - initFormat( &f, tqalignment ); + initFormat( &f, alignment ); if( d.isEmpty() ) { // found empty paragraph @@ -237,7 +237,7 @@ bool DSRichText::parseParagraph() data.append( d[i] ); parseWords( data, &f, &words ); - initFormat( &f, tqalignment ); + initFormat( &f, alignment ); data = TQString(); // bail out now, otherwise there is @@ -250,7 +250,7 @@ bool DSRichText::parseParagraph() i += span.length(); if( span.startsWith( "<span " ) ) { - initFormat( &f, tqalignment ); + initFormat( &f, alignment ); f.font = parseStyle( parse( span, "style=\"", "\"", 0 ), &f.color ); } } @@ -403,13 +403,13 @@ TQString DSRichText::replaceEscapeSequences( const TQString & t ) return tmp; } -TQString DSRichText::parseParagraphTag( const TQString &t, int* tqalignment ) +TQString DSRichText::parseParagraphTag( const TQString &t, int* alignment ) { TQString d = TQString( t ); if( d.startsWith("<p>") ) { d = d.mid( 3, d.length() - 3 ); } else if( d.startsWith("<p ") ) { - *tqalignment = parseAlignment( parse( d, "align=\"", "\"", 0 ) ); + *alignment = parseAlignment( parse( d, "align=\"", "\"", 0 ) ); if( d.contains( ">" ) ) { int x = d.find(">" ) + 1; d = d.mid( x, d.length() - x ); diff --git a/kbarcode/dsrichtext.h b/kbarcode/dsrichtext.h index 8381419..8c56b56 100644 --- a/kbarcode/dsrichtext.h +++ b/kbarcode/dsrichtext.h @@ -31,13 +31,13 @@ class DSRichText; /** This class represents one word, * formated with a font, a color and an - * tqalignment. + * alignment. */ struct formated_word { TQString text; TQFont font; TQColor color; - int tqalignment; + int alignment; bool line; }; @@ -138,10 +138,10 @@ class DSRichText { bool parseParagraph(); /** remove <p> and </p> from the TQString @p t and return it. * This function is also responsible for getting the - * correct tqalignment of the paragraph. + * correct alignment of the paragraph. */ - TQString parseParagraphTag( const TQString & t, int* tqalignment ); - /** parse the align attribute of a <p> tag and return the corresponding TQt tqalignment value. + TQString parseParagraphTag( const TQString & t, int* alignment ); + /** parse the align attribute of a <p> tag and return the corresponding TQt alignment value. */ int parseAlignment( const TQString & align ); /** parse the css style attribute of a <span> tag and return a matching TQFont for these @@ -150,7 +150,7 @@ class DSRichText { TQFont parseStyle( const TQString & s, TQColor* color ); TQString parse( const TQString & t, const TQString & find, const TQString & end, int start ); void parseWords( const TQString & t, formated_word* w, WordList* words ); - void initFormat( formated_word* f, int tqalignment ); + void initFormat( formated_word* f, int alignment ); void initLine( TQValueList<formated_line>* l ); void updateSpacing( TQValueList<formated_line>* l, TQFontMetrics* fm ); /** draw the line @p line justified as blockquote diff --git a/kbarcode/dstextedit.cpp b/kbarcode/dstextedit.cpp index 8965756..713a52c 100644 --- a/kbarcode/dstextedit.cpp +++ b/kbarcode/dstextedit.cpp @@ -30,7 +30,7 @@ void DSTextEdit::fixParagraphs() struct { TQFont font; TQColor color; - int tqalignment; + int alignment; } tFormattings; TQString t; @@ -57,7 +57,7 @@ void DSTextEdit::fixParagraphs() t = this->text(); tFormattings.font = this->currentFont(); tFormattings.color = this->color(); - tFormattings.tqalignment = this->tqalignment(); + tFormattings.alignment = this->alignment(); while( pos != -1 ) { @@ -101,7 +101,7 @@ void DSTextEdit::fixParagraphs() this->setCursorPosition( 0, index ); this->setCurrentFont( tFormattings.font ); this->setColor( tFormattings.color ); - this->tqsetAlignment( tFormattings.tqalignment ); + this->setAlignment( tFormattings.alignment ); this->setSelection( paraFrom, indexFrom, paraTo, indexTo ); diff --git a/kbarcode/encodingcombo.cpp b/kbarcode/encodingcombo.cpp index 0904df8..bfe82d1 100644 --- a/kbarcode/encodingcombo.cpp +++ b/kbarcode/encodingcombo.cpp @@ -20,7 +20,7 @@ #include <kcharsets.h> #include <kglobal.h> #include <klocale.h> -#include <tqtextcodec.h> +#include <textcodec.h> EncodingCombo::EncodingCombo( TQWidget* parent ) : KComboBox( parent ) diff --git a/kbarcode/imageitem.cpp b/kbarcode/imageitem.cpp index ea6b40b..a091c37 100644 --- a/kbarcode/imageitem.cpp +++ b/kbarcode/imageitem.cpp @@ -102,7 +102,7 @@ void ImageItem::drawEPcl( TQTextStream* stream ) for( int buf=0; buf < 3; buf++ ){ *stream << TQString("GS %1 32 %1 %1 %1 %1 ") - .tqarg(buf).tqarg(rect().x()).tqarg(rect().y()).tqarg(width).tqarg(height); + .arg(buf).arg(rect().x()).arg(rect().y()).arg(width).arg(height); for( int i=width-1; i >= 0; i-- ){ for( int j=0; j < height; j++ ){ diff --git a/kbarcode/kactionmap.cpp b/kbarcode/kactionmap.cpp index 9ff3b03..d90274d 100644 --- a/kbarcode/kactionmap.cpp +++ b/kbarcode/kactionmap.cpp @@ -19,7 +19,7 @@ #include <tqimage.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqmenubar.h> #include <tqmenudata.h> #include <tqpixmap.h> @@ -67,14 +67,14 @@ public: } void paintCell( TQPainter *p, const TQColorGroup &cg, - int column, int width, int tqalignment ) + int column, int width, int alignment ) { TQColorGroup _cg( cg ); TQColor c = _cg.text(); if( m_action && !m_action->isEnabled() ) _cg.setColor( TQColorGroup::Text, TQt::gray ); - KListViewItem::paintCell( p, _cg, column, width, tqalignment ); + KListViewItem::paintCell( p, _cg, column, width, alignment ); _cg.setColor( TQColorGroup::Text, c ); } @@ -106,7 +106,7 @@ void KActionMapDlg::updateEnabledState() KActionMap::KActionMap( KActionCollection* actions, TQWidget* parent, const char* name ) : TQWidget( parent, name ), m_actions( actions ), m_showMenuTree( true ), m_grayOutItems( false ) { - TQVBoxLayout* tqlayout = new TQVBoxLayout( this ); + TQVBoxLayout* layout = new TQVBoxLayout( this ); m_listView = new KListView( this ); #if TDE_VERSION >= 0x030500 @@ -123,9 +123,9 @@ KActionMap::KActionMap( KActionCollection* actions, TQWidget* parent, const char m_listView->setAllColumnsShowFocus( true ); #if TDE_VERSION >= 0x030500 - tqlayout->addWidget( m_searchLine ); + layout->addWidget( m_searchLine ); #endif - tqlayout->addWidget( m_listView ); + layout->addWidget( m_listView ); connect( m_listView, TQT_SIGNAL( executed( TQListViewItem* ) ), this, TQT_SLOT( slotExecuteAction( TQListViewItem* ) ) ); connect( actions, TQT_SIGNAL( inserted( KAction* ) ), this, TQT_SLOT( slotActionCollectionChanged() ) ); diff --git a/kbarcode/kbarcode.cpp b/kbarcode/kbarcode.cpp index d624812..feed5d9 100644 --- a/kbarcode/kbarcode.cpp +++ b/kbarcode/kbarcode.cpp @@ -27,7 +27,7 @@ // TQt includes #include <tqgroupbox.h> -#include <tqlayout.h> +#include <layout.h> // KDE includes #include <kaction.h> @@ -45,7 +45,7 @@ KBarcode::KBarcode( TQWidget *parent, const char *name, WFlags f) { TQGroupBox* w = new TQGroupBox( this ); w->setColumnLayout(0, Qt::Vertical ); - TQVBoxLayout* tqlayout = new TQVBoxLayout( w->tqlayout() ); + TQVBoxLayout* layout = new TQVBoxLayout( w->layout() ); setCentralWidget( 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" ) ); buttonBatch->setIconSet( BarIconSet( "fileprint" ) ); - tqlayout->addWidget( buttonSingle ); - tqlayout->addWidget( buttonEditor ); - tqlayout->addWidget( buttonBatch ); - tqlayout->addWidget( buttonData ); + layout->addWidget( buttonSingle ); + layout->addWidget( buttonEditor ); + layout->addWidget( buttonBatch ); + layout->addWidget( buttonData ); connect( buttonSingle, TQT_SIGNAL( clicked() ), TQT_TQOBJECT(this), TQT_SLOT( startBarcode() ) ); connect( buttonEditor, TQT_SIGNAL( clicked() ), TQT_TQOBJECT(this), TQT_SLOT( startLabelEditor() ) ); @@ -176,7 +176,7 @@ bool KBarcode::parseCmdLine() eFormat = BatchPrinter::POSTSCRIPT; else { - KMessageBox::error( this, i18n("%1 is no valid output format for --output. Valid values are POSTSCRIPT, IMAGE and BARCODE.").tqarg( format ) ); + KMessageBox::error( this, i18n("%1 is no valid output format for --output. Valid values are POSTSCRIPT, IMAGE and BARCODE.").arg( format ) ); } if( args->isSet("barcode") ) diff --git a/kbarcode/labeleditor.cpp b/kbarcode/labeleditor.cpp index 0e887f5..c188ea4 100644 --- a/kbarcode/labeleditor.cpp +++ b/kbarcode/labeleditor.cpp @@ -54,7 +54,7 @@ #include <tqbuffer.h> #include <tqcanvas.h> #include <tqcheckbox.h> -#include <tqclipboard.h> +#include <clipboard.h> #include <tqdockarea.h> #include <tqdom.h> #include <tqdragobject.h> @@ -62,7 +62,7 @@ #include <tqimage.h> #include <tqinputdialog.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqmap.h> #include <tqmime.h> #include <tqpainter.h> @@ -71,7 +71,7 @@ #include <tqpoint.h> #include <tqprogressdialog.h> #include <tqsqlquery.h> -#include <tqtextbrowser.h> +#include <textbrowser.h> #include <tqtooltip.h> #include <tqvalidator.h> #include <tqxml.h> @@ -382,7 +382,7 @@ bool LabelEditor::openUrl( const TQString & url ) if( !d || d->getId() == -1 ) { - KMessageBox::error( this, TQString( i18n("<qt>The file <b>%1</b> cannot be loaded as the label definition is missing.</qt>") ).tqarg( filename ) ); + KMessageBox::error( this, TQString( i18n("<qt>The file <b>%1</b> cannot be loaded as the label definition is missing.</qt>") ).arg( filename ) ); return false; } @@ -696,15 +696,15 @@ void LabelEditor::changeSize() // TODO: make sure that all items are redrawn. // Otherwise barcodes might become invisible when changing the label c->update(); - cv->tqrepaint(); + cv->repaint(); delete nl; } void LabelEditor::updateInfo() { - statusBar()->changeItem( i18n("Size: ") + TQString("%1%2 x %3%4").tqarg( - d->getMeasurements().width() ).tqarg( Measurements::system() - ).tqarg( d->getMeasurements().height() ).tqarg( Measurements::system() ), STATUS_ID_SIZE ); + statusBar()->changeItem( i18n("Size: ") + TQString("%1%2 x %3%4").arg( + d->getMeasurements().width() ).arg( Measurements::system() + ).arg( d->getMeasurements().height() ).arg( Measurements::system() ), STATUS_ID_SIZE ); statusBar()->changeItem( i18n("Label Template: ") + d->getProducer() + " - " + d->getType(), STATUS_ID_TEMPLATE ); } @@ -978,12 +978,12 @@ void LabelEditor::copy() DocumentItemDrag* drag = new DocumentItemDrag(); drag->setDocumentItem( &items ); - kapp->tqclipboard()->setData( drag, TQClipboard::Clipboard ); + kapp->clipboard()->setData( drag, TQClipboard::Clipboard ); } void LabelEditor::paste() { - TQMimeSource* data = TQApplication::tqclipboard()->data(); + TQMimeSource* data = TQApplication::clipboard()->data(); if ( DocumentItemDrag::canDecode( data ) ) DocumentItemDrag::decode( data, cv, m_token, history ); } @@ -1005,7 +1005,7 @@ void LabelEditor::startBarcodeGen() void LabelEditor::startLoadRecentEditor( const KURL& url ) { if( !TQFile::exists( url.path() ) ) { - KMessageBox::information( this, i18n("The file %1 does not exist.").tqarg( url.path() ) ); + KMessageBox::information( this, i18n("The file %1 does not exist.").arg( url.path() ) ); recentAct->removeURL( url ); return; } diff --git a/kbarcode/mimesources.cpp b/kbarcode/mimesources.cpp index f3dce8d..23278bb 100644 --- a/kbarcode/mimesources.cpp +++ b/kbarcode/mimesources.cpp @@ -88,7 +88,7 @@ bool DocumentItemDrag::canDecode( TQMimeSource* e ) bool DocumentItemDrag::decode( TQMimeSource* mime, MyCanvasView* cv, TokenProvider* token, KCommandHistory* history ) { - TQByteArray data = mime->tqencodedData( DocumentItemDrag::mimeType() ); + TQByteArray data = mime->encodedData( DocumentItemDrag::mimeType() ); TQDomDocument doc( "KBarcodeClipboard" ); if( !doc.setContent( data ) ) return false; diff --git a/kbarcode/multilineeditdlg.cpp b/kbarcode/multilineeditdlg.cpp index 582536e..3c73623 100644 --- a/kbarcode/multilineeditdlg.cpp +++ b/kbarcode/multilineeditdlg.cpp @@ -36,7 +36,7 @@ MultiLineEditor::MultiLineEditor( TokenProvider* token, TQWidget *parent, const char *name ) : TQWidget( parent, name ), m_token( token ) { - TQVBoxLayout* tqlayout = new TQVBoxLayout( this, 6, 6 ); + TQVBoxLayout* layout = new TQVBoxLayout( this, 6, 6 ); // ksc = new KSpellConfig( this ); @@ -52,8 +52,8 @@ MultiLineEditor::MultiLineEditor( TokenProvider* token, TQWidget *parent, const setupActions(); - tqlayout->addWidget( area ); - tqlayout->addWidget( editor ); + layout->addWidget( area ); + layout->addWidget( editor ); } @@ -128,10 +128,10 @@ void MultiLineEditor::setupActions() action_align_justify = new KToggleAction( i18n("&Justify"), "text_block", 0, ac, "format_align_justify" ); connect( action_align_justify, TQT_SIGNAL( toggled(bool) ), TQT_TQOBJECT(this), TQT_SLOT( setAlignJustify(bool) ) ); - action_align_left->setExclusiveGroup( "tqalignment" ); - action_align_center->setExclusiveGroup( "tqalignment" ); - action_align_right->setExclusiveGroup( "tqalignment" ); - action_align_justify->setExclusiveGroup( "tqalignment" ); + action_align_left->setExclusiveGroup( "alignment" ); + action_align_center->setExclusiveGroup( "alignment" ); + action_align_right->setExclusiveGroup( "alignment" ); + action_align_justify->setExclusiveGroup( "alignment" ); //KAction* action_spell = KStdAction::spelling( this, TQT_SLOT( checkSpelling() ), ac ); @@ -193,7 +193,7 @@ void MultiLineEditor::updateCharFmt() void MultiLineEditor::updateAligment() { - int align = editor->tqalignment(); + int align = editor->alignment(); switch ( align ) { case AlignRight: @@ -241,25 +241,25 @@ void MultiLineEditor::formatColor() void MultiLineEditor::setAlignLeft( bool yes ) { if ( yes ) - editor->tqsetAlignment( AlignLeft ); + editor->setAlignment( AlignLeft ); } void MultiLineEditor::setAlignRight( bool yes ) { if ( yes ) - editor->tqsetAlignment( AlignRight ); + editor->setAlignment( AlignRight ); } void MultiLineEditor::setAlignCenter( bool yes ) { if ( yes ) - editor->tqsetAlignment( AlignCenter ); + editor->setAlignment( AlignCenter ); } void MultiLineEditor::setAlignJustify( bool yes ) { if ( yes ) - editor->tqsetAlignment( AlignJustify ); + editor->setAlignment( AlignJustify ); } void MultiLineEditor::insertNewField() diff --git a/kbarcode/mybarcode.cpp b/kbarcode/mybarcode.cpp index e5c3db3..5a10207 100644 --- a/kbarcode/mybarcode.cpp +++ b/kbarcode/mybarcode.cpp @@ -138,7 +138,7 @@ bool BarCode::createPixmap( TQPixmap* target, int resx, int resy ) double sh = (double)s.height()/72 * resy; KShellProcess proc2; - proc2 << "gs" << TQString("-g%1x%2").tqarg(int(sw*(double)barcode.scale)).tqarg(int(sh*(double)barcode.scale)) + proc2 << "gs" << TQString("-g%1x%2").arg(int(sw*(double)barcode.scale)).arg(int(sh*(double)barcode.scale)) << "-r" + TQString::number( resx*(double)barcode.scale ) + "x" + TQString::number( resy*(double)barcode.scale ) << "-sDEVICE=pbmraw" << "-sOutputFile=" + input->name() << "-sNOPAUSE" << "-q " + output->name() << "-c showpage" << "-c quit"; @@ -246,17 +246,17 @@ bool BarCode::createTBarcode( KTempFile* output ) KShellProcess proc; proc << "tbarcodeclient" << "-f" + output->name(); if( !BarCode::hasFeature( barcode.type, BARCODE2D ) ) - proc << TQString( "m%1" ).tqarg( barcode.tbarcode.modulewidth * 1000 ); + proc << TQString( "m%1" ).arg( barcode.tbarcode.modulewidth * 1000 ); if( BarCode::hasFeature( barcode.type, DATAMATRIX ) ) - proc << TQString( "Ds%1" ).tqarg( barcode.datamatrix.size ); + proc << TQString( "Ds%1" ).arg( barcode.datamatrix.size ); if( BarCode::hasFeature( barcode.type, PDF417BARCODE ) ) - proc << TQString( "Pr%1 Pc%2 Pe%3" ).tqarg( barcode.pdf417.row ) - .tqarg( barcode.pdf417.col ) - .tqarg( barcode.pdf417.err ); + proc << TQString( "Pr%1 Pc%2 Pe%3" ).arg( barcode.pdf417.row ) + .arg( barcode.pdf417.col ) + .arg( barcode.pdf417.err ); - proc << barcode.type << "tPS" << TQString("c%1").tqarg( barcode.tbarcode.checksum ) << flag << "d" + KShellProcess::quote( m_value ); + proc << barcode.type << "tPS" << TQString("c%1").arg( barcode.tbarcode.checksum ) << flag << "d" + KShellProcess::quote( m_value ); proc.start( KProcess::Block, KProcess::NoCommunication ); proc.resume(); diff --git a/kbarcode/mycanvasview.cpp b/kbarcode/mycanvasview.cpp index f2b7596..2c7c7ef 100644 --- a/kbarcode/mycanvasview.cpp +++ b/kbarcode/mycanvasview.cpp @@ -150,8 +150,8 @@ void MyCanvasView::contentsMouseMoveEvent(TQMouseEvent* e) int x = (int)l.pixelToMm( e->x(), TQT_TQPAINTDEVICE(this), LabelUtils::DpiX ); int y = (int)l.pixelToMm( e->y(), TQT_TQPAINTDEVICE(this), LabelUtils::DpiY ); statusbar->changeItem( i18n("Position: ") + - TQString( "%1%2 x %3%4" ).tqarg( x ) - .tqarg( Measurements::system() ).tqarg( y ).tqarg( Measurements::system()), mouseid ); + TQString( "%1%2 x %3%4" ).arg( x ) + .arg( Measurements::system() ).arg( y ).arg( Measurements::system()), mouseid ); } updateCursor( e->pos() ); diff --git a/kbarcode/newlabel.cpp b/kbarcode/newlabel.cpp index 9d636ce..f40975e 100644 --- a/kbarcode/newlabel.cpp +++ b/kbarcode/newlabel.cpp @@ -23,7 +23,7 @@ #include <tqcheckbox.h> #include <tqgroupbox.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqsqlquery.h> // KDE includes @@ -32,7 +32,7 @@ #include <kpushbutton.h> #ifndef I2S - #define I2S(x) TQString("%1").tqarg(x) + #define I2S(x) TQString("%1").arg(x) #endif // I2S NewLabel::NewLabel( TQWidget* parent, const char* name, bool change, WFlags fl ) @@ -55,10 +55,10 @@ NewLabel::NewLabel( TQWidget* parent, const char* name, bool change, WFlags fl TQGroupBox* group1 = new TQGroupBox( this ); group1->setTitle( i18n( "Label" ) ); group1->setColumnLayout(0, Qt::Vertical ); - group1->tqlayout()->setSpacing( 6 ); - group1->tqlayout()->setMargin( 11 ); - TQGridLayout* group1Layout = new TQGridLayout( group1->tqlayout() ); - group1Layout->tqsetAlignment( TQt::AlignTop ); + group1->layout()->setSpacing( 6 ); + group1->layout()->setMargin( 11 ); + TQGridLayout* group1Layout = new TQGridLayout( group1->layout() ); + group1Layout->setAlignment( TQt::AlignTop ); TextLabel2 = new TQLabel( group1, "TextLabel2" ); TextLabel2->setText( i18n( "Producer:" ) ); @@ -89,10 +89,10 @@ NewLabel::NewLabel( TQWidget* parent, const char* name, bool change, WFlags fl TextLabel4 = new TQLabel( this, "TextLabel4" ); preview = new LabelPreview( this, "preview" ); - TQHBoxLayout* htqlayout = new TQHBoxLayout( 0, 6, 6 ); - htqlayout->addWidget( TextLabel4 ); - htqlayout->addWidget( preview ); - NewLabelLayout->addLayout( htqlayout ); + TQHBoxLayout* hlayout = new TQHBoxLayout( 0, 6, 6 ); + hlayout->addWidget( TextLabel4 ); + hlayout->addWidget( preview ); + NewLabelLayout->addLayout( hlayout ); TQSpacerItem* spacer_3 = new TQSpacerItem( 0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding ); NewLabelLayout->addItem( spacer_3 ); @@ -171,12 +171,12 @@ void NewLabel::updateText() i18n("%3<br>Vertical Gap: ") + I2S(d.getMeasurements().gapV()) + i18n("%4<br>Top Gap: ") + I2S(d.getMeasurements().gapTop()) + i18n("%5<br>Left Gap: ") + I2S(d.getMeasurements().gapLeft()) + "%6<br>" - ).tqarg( Measurements::system() ) - .tqarg( Measurements::system() ) - .tqarg( Measurements::system() ) - .tqarg( Measurements::system() ) - .tqarg( Measurements::system() ) - .tqarg( Measurements::system() ) ); + ).arg( Measurements::system() ) + .arg( Measurements::system() ) + .arg( Measurements::system() ) + .arg( Measurements::system() ) + .arg( Measurements::system() ) + .arg( Measurements::system() ) ); preview->setRect( TQRect( (int)d.getMeasurements().gapLeftMM(), (int)d.getMeasurements().gapTopMM(), @@ -184,14 +184,14 @@ void NewLabel::updateText() (int)d.getMeasurements().heightMM() ) ); preview->setMeasurements( d.getMeasurements() ); preview->setPrvEnabled( true ); - preview->tqrepaint(); + preview->repaint(); curid = d.getId(); } else { TextLabel4->setText( i18n("No label selected.") ); preview->setPrvEnabled( false ); - preview->tqrepaint(); + preview->repaint(); } } diff --git a/kbarcode/pixmapbarcode.cpp b/kbarcode/pixmapbarcode.cpp index ce07836..20db81f 100644 --- a/kbarcode/pixmapbarcode.cpp +++ b/kbarcode/pixmapbarcode.cpp @@ -32,7 +32,7 @@ #include <tqpainter.h> #include <tqpaintdevicemetrics.h> #include <tqpixmap.h> -#include <tqtextstream.h> +#include <textstream.h> /* Margin added by GNU Barcode to the barcodes */ #define BARCODE_MARGIN 10 @@ -172,9 +172,9 @@ bool PixmapBarcode::createPixmap( TQPixmap* target, int resx, int resy ) sh = (double)(size.y() + size.height()); } - cmd = TQString("gs -g%1x%2").tqarg(int(sw*(double)barkode->scaling())).tqarg(int(sh*(double)barkode->scaling())); + cmd = TQString("gs -g%1x%2").arg(int(sw*(double)barkode->scaling())).arg(int(sh*(double)barkode->scaling())); cmd += " -r" + TQString::number( resx*(double)barkode->scaling()) + "x" + TQString::number( resy*(double)barkode->scaling() ); - cmd += TQString(" -sDEVICE=%1 -sOutputFile=").tqarg( bMonocrome ? "pbmraw" : "ppm" ); + cmd += TQString(" -sDEVICE=%1 -sOutputFile=").arg( bMonocrome ? "pbmraw" : "ppm" ); cmd += input->name(); cmd += " -sNOPAUSE -q - -c showpage quit"; @@ -394,24 +394,24 @@ TQString PixmapBarcode::createTBarcodeCmd() // autocorrection flag.append( barkode->tbarcodeOptions()->autocorrect() ? " Aon" : " Aoff" ); // barcode height - flag.append( TQString( " h%1" ).tqarg( barkode->tbarcodeOptions()->height() ) ); + flag.append( TQString( " h%1" ).arg( barkode->tbarcodeOptions()->height() ) ); // text above if( barkode->tbarcodeOptions()->above() ) flag.append( " a" ); cmd = "tbarcodeclient "; if( !Barkode::hasFeature( barkode->type(), BARCODE2D ) ) - cmd += TQString( " m%1" ).tqarg( barkode->tbarcodeOptions()->moduleWidth() * 1000 ); + cmd += TQString( " m%1" ).arg( barkode->tbarcodeOptions()->moduleWidth() * 1000 ); if( Barkode::hasFeature( barkode->type(), DATAMATRIX ) ) - cmd += TQString( " Ds%1" ).tqarg( barkode->datamatrixSize() ); + cmd += TQString( " Ds%1" ).arg( barkode->datamatrixSize() ); if( Barkode::hasFeature( barkode->type(), PDF417BARCODE ) ) - cmd += TQString( " Pr%1 Pc%2 Pe%3" ).tqarg( barkode->pdf417Options()->row() ) - .tqarg( barkode->pdf417Options()->col() ) - .tqarg( barkode->pdf417Options()->err() ); + cmd += TQString( " Pr%1 Pc%2 Pe%3" ).arg( barkode->pdf417Options()->row() ) + .arg( barkode->pdf417Options()->col() ) + .arg( barkode->pdf417Options()->err() ); - cmd += " " + barkode->type() + TQString(" tPS c%1").tqarg( barkode->tbarcodeOptions()->checksum() ); + cmd += " " + barkode->type() + TQString(" tPS c%1").arg( barkode->tbarcodeOptions()->checksum() ); cmd += flag + " d" + KShellProcess::quote( barkode->parsedValue() ); return cmd; diff --git a/kbarcode/previewdialog.cpp b/kbarcode/previewdialog.cpp index 1e3a2d5..30eab22 100644 --- a/kbarcode/previewdialog.cpp +++ b/kbarcode/previewdialog.cpp @@ -24,7 +24,7 @@ // TQt includes #include <tqiodevice.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqpainter.h> #include <tqscrollview.h> #include <tqsqlcursor.h> diff --git a/kbarcode/printlabeldlg.cpp b/kbarcode/printlabeldlg.cpp index 13d6eaa..128377b 100644 --- a/kbarcode/printlabeldlg.cpp +++ b/kbarcode/printlabeldlg.cpp @@ -20,7 +20,7 @@ // TQt includes #include <tqcheckbox.h> -#include <tqlayout.h> +#include <layout.h> // KDE includes #include <knuminput.h> diff --git a/kbarcode/propertywidget.cpp b/kbarcode/propertywidget.cpp index 16cf783..6091030 100644 --- a/kbarcode/propertywidget.cpp +++ b/kbarcode/propertywidget.cpp @@ -45,7 +45,7 @@ #include <tqcheckbox.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqpainter.h> #include <tqradiobutton.h> #include <tqsqlquery.h> @@ -519,7 +519,7 @@ void PropertyImage::applySettings( DocumentItem* item, KMacroCommand* command ) if( !imgUrl->url().isEmpty() ) { if( !pix.load( imgUrl->url() ) ) - KMessageBox::error( NULL, TQString( i18n("Image format not supported for file: %1") ).tqarg( imgUrl->url() ) ); + KMessageBox::error( NULL, TQString( i18n("Image format not supported for file: %1") ).arg( imgUrl->url() ) ); } else { diff --git a/kbarcode/purepostscript.cpp b/kbarcode/purepostscript.cpp index cdbf1e9..5b004cd 100644 --- a/kbarcode/purepostscript.cpp +++ b/kbarcode/purepostscript.cpp @@ -22,7 +22,7 @@ #include <tqdom.h> #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #include <kstandarddirs.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 += m_program; prg += TQString("20 20 moveto\n(%1) (%2) %3 barcode\n") - .tqarg( barkode->parsedValue() ) - .tqarg( opt ).tqarg( type ); + .arg( barkode->parsedValue() ) + .arg( opt ).arg( type ); } TQRect PurePostscriptBarcode::bbox( const char* postscript, long postscript_size ) @@ -206,7 +206,7 @@ TQRect PurePostscriptBarcode::bbox( const char* postscript, long postscript_size psfile.file()->writeBlock( postscript, postscript_size ); psfile.file()->close(); - if( !readFromPipe( TQString( gs_bbox ).tqarg( psfile.file()->name() ).latin1(), &buffer, &len ) || !len ) + if( !readFromPipe( TQString( gs_bbox ).arg( psfile.file()->name() ).latin1(), &buffer, &len ) || !len ) { psfile.unlink(); return TQRect( 0, 0, 0, 0 ); diff --git a/kbarcode/rectitem.cpp b/kbarcode/rectitem.cpp index 40ce7fa..9e52e97 100644 --- a/kbarcode/rectitem.cpp +++ b/kbarcode/rectitem.cpp @@ -81,9 +81,9 @@ void RectItem::drawZpl( TQTextStream* stream ) *stream << ZPLUtils::fieldOrigin( rect().x(), rect().y() ); if( m_circle ) - *stream << TQString("~GE%1,%2,%3,B").tqarg( rect().width() ).tqarg( rect().height() ).tqarg( thick ); + *stream << TQString("~GE%1,%2,%3,B").arg( rect().width() ).arg( rect().height() ).arg( thick ); else - *stream << TQString("~GB%1,%2,%3,B,0").tqarg( rect().width() ).tqarg( rect().height() ).tqarg( thick ); + *stream << TQString("~GB%1,%2,%3,B,0").arg( rect().width() ).arg( rect().height() ).arg( thick ); } void RectItem::drawIpl( TQTextStream* stream, IPLUtils* utils ) @@ -97,12 +97,12 @@ void RectItem::drawIpl( TQTextStream* stream, IPLUtils* utils ) { int counter = utils->counter(); - TQString s = TQString("W%1;").tqarg( counter ); // field number + TQString s = TQString("W%1;").arg( counter ); // field number s += utils->fieldOrigin( rect().x(), rect().y() ); - s += TQString("l%1;").tqarg( rect().width() ); // box length - s += TQString("h%1;").tqarg( rect().height() ); // box height - s += TQString("w%1;").tqarg( thick ); + s += TQString("l%1;").arg( rect().width() ); // box length + s += TQString("h%1;").arg( rect().height() ); // box height + s += TQString("w%1;").arg( thick ); *stream << utils->field( s ); } @@ -110,11 +110,11 @@ void RectItem::drawIpl( TQTextStream* stream, IPLUtils* utils ) void RectItem::drawEPcl( TQTextStream* stream ) { - TQString s = TQString("C %1").tqarg( rect().x()+1 ); - s += TQString(" %1").tqarg( rect().y()+1 ); - s += TQString(" %1").tqarg( rect().width() ); - s += TQString(" %1").tqarg( rect().height() ); - s += TQString(" %1 2").tqarg( pen().width() ); + TQString s = TQString("C %1").arg( rect().x()+1 ); + s += TQString(" %1").arg( rect().y()+1 ); + s += TQString(" %1").arg( rect().width() ); + s += TQString(" %1").arg( rect().height() ); + s += TQString(" %1 2").arg( pen().width() ); *stream << EPCLUtils::field( s ); } diff --git a/kbarcode/rectsettingsdlg.cpp b/kbarcode/rectsettingsdlg.cpp index be348f2..59bc986 100644 --- a/kbarcode/rectsettingsdlg.cpp +++ b/kbarcode/rectsettingsdlg.cpp @@ -20,7 +20,7 @@ // TQt includes #include <tqcheckbox.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqpainter.h> #include <tqpen.h> diff --git a/kbarcode/smalldialogs.cpp b/kbarcode/smalldialogs.cpp index 6c1a873..305afea 100644 --- a/kbarcode/smalldialogs.cpp +++ b/kbarcode/smalldialogs.cpp @@ -20,7 +20,7 @@ // TQt includes #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqsqlcursor.h> // KDE includes @@ -35,16 +35,16 @@ AddAllDialog::AddAllDialog(TQWidget *parent, const char *name ) : KDialogBase( KDialogBase::Plain, i18n("Add Barcode_basic"), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, parent,name) { - TQVBoxLayout* tqlayout = new TQVBoxLayout( plainPage(), 6, 6 ); + TQVBoxLayout* layout = new TQVBoxLayout( plainPage(), 6, 6 ); group = new KLineEdit( plainPage() ); number = new KIntNumInput( plainPage() ); number->setLabel( i18n( "Number of labels:" ) ); number->setRange( 1, 10000, 1, false ); - tqlayout->addWidget( new TQLabel( i18n("Group:"), plainPage() ) ); - tqlayout->addWidget( group ); - tqlayout->addWidget( number ); + layout->addWidget( new TQLabel( i18n("Group:"), plainPage() ) ); + layout->addWidget( group ); + layout->addWidget( number ); } TQString AddAllDialog::groupName() const @@ -79,7 +79,7 @@ void AddItemsDialog::init() plainPage()->setFrameStyle( TQFrame::GroupBoxPanel | TQFrame::Sunken ); plainPage()->setLineWidth( 2 ); - TQHBoxLayout* tqlayout = new TQHBoxLayout( plainPage(), 6, 6 ); + TQHBoxLayout* layout = new TQHBoxLayout( plainPage(), 6, 6 ); group = 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->setRange( 1, 10000, 1, false ); - tqlayout->addWidget( number ); - tqlayout->addWidget( new TQLabel( i18n("Article:" ), plainPage() ) ); - tqlayout->addWidget( article ); - tqlayout->addWidget( new TQLabel( i18n("Group:"), plainPage() ) ); - tqlayout->addWidget( group ); + layout->addWidget( number ); + layout->addWidget( new TQLabel( i18n("Article:" ), plainPage() ) ); + layout->addWidget( article ); + layout->addWidget( new TQLabel( i18n("Group:"), plainPage() ) ); + layout->addWidget( group ); setButtonText( KDialogBase::User1, i18n("&Add") ); diff --git a/kbarcode/sqltables.cpp b/kbarcode/sqltables.cpp index fc9db01..a9d1a66 100644 --- a/kbarcode/sqltables.cpp +++ b/kbarcode/sqltables.cpp @@ -23,7 +23,7 @@ #include <tqfile.h> #include <tqgroupbox.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqmap.h> #include <tqprogressdialog.h> #include <tqsqldatabase.h> @@ -383,7 +383,7 @@ void SqlTables::updateTables() // check for field0 - field9 (1.4.0) TQStringList fields; for( unsigned int i = 0; i < 10; i++ ) - fields.append( TQString("field%1").tqarg( i ) ); + fields.append( TQString("field%1").arg( i ) ); TQSqlQuery query("SHOW FIELDS FROM " TABLE_BASIC ); while ( query.next() ) @@ -511,15 +511,15 @@ const TQString SqlTables::getBarcodeMaxLength( const TQString & name ) SqlWidget::SqlWidget( bool showlabel, TQWidget* parent, const char* name ) : TQWidget( parent, name ) { - TQVBoxLayout* tqlayout = new TQVBoxLayout( this ); + TQVBoxLayout* layout = new TQVBoxLayout( this ); TQGroupBox* groupDatabase = new TQGroupBox( this ); groupDatabase->setTitle( i18n( "Database Settings" ) ); groupDatabase->setColumnLayout(0, Qt::Vertical ); - groupDatabase->tqlayout()->setSpacing( 6 ); - groupDatabase->tqlayout()->setMargin( 11 ); - TQVBoxLayout* groupDatabaseLayout = new TQVBoxLayout( groupDatabase->tqlayout() ); - groupDatabaseLayout->tqsetAlignment( TQt::AlignTop ); + groupDatabase->layout()->setSpacing( 6 ); + groupDatabase->layout()->setMargin( 11 ); + TQVBoxLayout* groupDatabaseLayout = new TQVBoxLayout( groupDatabase->layout() ); + groupDatabaseLayout->setAlignment( TQt::AlignTop ); TQGridLayout* grid = new TQGridLayout( 2, 2 ); @@ -576,7 +576,7 @@ SqlWidget::SqlWidget( bool showlabel, TQWidget* parent, const char* name ) if( showlabel ) groupDatabaseLayout->addWidget( new TQLabel( i18n("<b>You have to test your database settings before you can procede.</b>"), groupDatabase ) ); - tqlayout->add( groupDatabase ); + layout->add( groupDatabase ); connect( buttonTest, TQT_SIGNAL( clicked() ), this, TQT_SLOT( testSettings() ) ); diff --git a/kbarcode/tbarcode2.cpp b/kbarcode/tbarcode2.cpp index 22ae500..eb98756 100644 --- a/kbarcode/tbarcode2.cpp +++ b/kbarcode/tbarcode2.cpp @@ -141,7 +141,7 @@ TQRect TBarcode2::bbox( const char* postscript, long postscript_size ) psfile.file()->writeBlock( postscript, postscript_size ); psfile.file()->close(); - if( !readFromPipe( TQString( gs_bbox ).tqarg( psfile.file()->name() ).latin1(), &buffer, &len ) || !len ) + if( !readFromPipe( TQString( gs_bbox ).arg( psfile.file()->name() ).latin1(), &buffer, &len ) || !len ) { psfile.unlink(); return TQRect( 0, 0, 0, 0 ); diff --git a/kbarcode/tec.cpp b/kbarcode/tec.cpp index f0b6ba2..dfb725b 100644 --- a/kbarcode/tec.cpp +++ b/kbarcode/tec.cpp @@ -22,11 +22,11 @@ #include <unistd.h> // QT includes -#include <tqclipboard.h> +#include <clipboard.h> #include <tqcursor.h> #include <tqgroupbox.h> #include <tqhbox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqpainter.h> #include <tqpaintdevicemetrics.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. if( !e.isNull() ) if( e.tagName() == "id" ) { - result += TQString("{D%1,").tqarg( convZeros((e.attribute( "height" ).toInt() + e.attribute( "gap_v" ).toInt())*10,4)); // Altura + Gap vertical - result += TQString("%1,").tqarg( convZeros(e.attribute( "width" ).toInt()*10,4) ); // Anchura - result += TQString("%1|}\n").tqarg( convZeros(e.attribute( "height" ).toInt()*10,4) ); // Altura + result += TQString("{D%1,").arg( convZeros((e.attribute( "height" ).toInt() + e.attribute( "gap_v" ).toInt())*10,4)); // Altura + Gap vertical + result += TQString("%1,").arg( convZeros(e.attribute( "width" ).toInt()*10,4) ); // Anchura + result += TQString("%1|}\n").arg( convZeros(e.attribute( "height" ).toInt()*10,4) ); // Altura result += TQString("{C|}\n"); // Clear buffer result += TQString("{U2;0130|}\n"); // BackFeed - result += TQString("{D%1,").tqarg( convZeros((e.attribute( "height" ).toInt() + e.attribute( "gap_v" ).toInt())*10,4)); // Altura + Gap vertical - result += TQString("%1,").tqarg( convZeros(e.attribute( "width" ).toInt()*10,4) ); // Anchura - result += TQString("%1|}\n").tqarg( convZeros(e.attribute( "height" ).toInt()*10,4) ); // Altura + result += TQString("{D%1,").arg( convZeros((e.attribute( "height" ).toInt() + e.attribute( "gap_v" ).toInt())*10,4)); // Altura + Gap vertical + result += TQString("%1,").arg( convZeros(e.attribute( "width" ).toInt()*10,4) ); // Anchura + result += TQString("%1|}\n").arg( convZeros(e.attribute( "height" ).toInt()*10,4) ); // Altura result += TQString("{AX;+000,+000,+00|}\n"); // Position Fine adjust result += TQString("{AY;+04,1|}\n"); // Print density fine adjust @@ -130,20 +130,20 @@ TQString tec452(const TQString &url, int count, const TQString &art, const TQStr if( e.tagName() == "value" ) data = e.text(); n = n.nextSibling(); } - result += TQString("{RB%1;").tqarg( convZeros(countBar, 2) ); // count de RB - result += TQString("%1|}\n").tqarg( data ); // Data + fin + result += TQString("{RB%1;").arg( convZeros(countBar, 2) ); // count de RB + result += TQString("%1|}\n").arg( data ); // Data + fin countBar++; } else if( e.tagName() == "textfield" ) { - result += TQString("{PC%1;").tqarg( convZeros(countText, 3) ); // count - result += TQString("%1,").tqarg( posConv(e.attribute( "x_mm"), 4 ) ); // X position - result += TQString("%1,").tqarg( posConv(e.attribute( "y_mm"), 4 ) ); // Y position - result += TQString("%1,").tqarg( "10" ); - result += TQString("%1,").tqarg( "15" ); - result += TQString("%1,").tqarg( "J" ); - result += TQString("%1,").tqarg( "00" ); - result += TQString("%1|}\n").tqarg( "B" ); + result += TQString("{PC%1;").arg( convZeros(countText, 3) ); // count + result += TQString("%1,").arg( posConv(e.attribute( "x_mm"), 4 ) ); // X position + result += TQString("%1,").arg( posConv(e.attribute( "y_mm"), 4 ) ); // Y position + result += TQString("%1,").arg( "10" ); + result += TQString("%1,").arg( "15" ); + result += TQString("%1,").arg( "J" ); + result += TQString("%1,").arg( "00" ); + result += TQString("%1|}\n").arg( "B" ); TQString etext; TQDomNode n = e.firstChild(); @@ -155,9 +155,9 @@ TQString tec452(const TQString &url, int count, const TQString &art, const TQStr n = n.nextSibling(); } - result += TQString("{RC%1;").tqarg( convZeros(countText, 3) ); // count de RB + result += TQString("{RC%1;").arg( convZeros(countText, 3) ); // count de RB etext=getData(etext, art, group, id ); - result += TQString("%1|}\n").tqarg( etext ); // Data + fin + result += TQString("%1|}\n").arg( etext ); // Data + fin countText++; } else if( e.tagName() == "rect" ) { @@ -165,40 +165,40 @@ TQString tec452(const TQString &url, int count, const TQString &art, const TQStr if (e.attribute("colorr")=="0" and e.attribute("colorg")=="0" and e.attribute("colorb")=="0") { result += TQString("{XR;"); // XR - result += TQString("%1,").tqarg( posConv(e.attribute( "x_mm"), 4 ) ); // X position - result += TQString("%1,").tqarg( posConv(e.attribute( "y_mm"), 4 ) ); // Y position - result += TQString("%1,").tqarg( convZeros(posConv(e.attribute( "x_mm"), 4 ).toInt()+posConv(e.attribute( "width_mm"),4 ).toInt(),4)); // X position - result += TQString("%1,").tqarg( convZeros(posConv(e.attribute( "y_mm"), 4 ).toInt()+posConv(e.attribute( "height_mm"),4 ).toInt(),4)); // Y position + result += TQString("%1,").arg( posConv(e.attribute( "x_mm"), 4 ) ); // X position + result += TQString("%1,").arg( posConv(e.attribute( "y_mm"), 4 ) ); // Y position + result += TQString("%1,").arg( convZeros(posConv(e.attribute( "x_mm"), 4 ).toInt()+posConv(e.attribute( "width_mm"),4 ).toInt(),4)); // X position + result += TQString("%1,").arg( convZeros(posConv(e.attribute( "y_mm"), 4 ).toInt()+posConv(e.attribute( "height_mm"),4 ).toInt(),4)); // Y position result += TQString("A"); // Type of Clear result += TQString("|}\n"); // FIN result += TQString("{XR;"); // XR - result += TQString("%1,").tqarg( posConv(e.attribute( "x_mm"), 4 ) ); // X position - result += TQString("%1,").tqarg( posConv(e.attribute( "y_mm"), 4 ) ); // Y position - result += TQString("%1,").tqarg( convZeros(posConv(e.attribute( "x_mm"), 4 ).toInt()+posConv(e.attribute( "width_mm"),4 ).toInt(),4)); // X position - result += TQString("%1,").tqarg( convZeros(posConv(e.attribute( "y_mm"), 4 ).toInt()+posConv(e.attribute( "height_mm"),4 ).toInt(),4)); // Y position + result += TQString("%1,").arg( posConv(e.attribute( "x_mm"), 4 ) ); // X position + result += TQString("%1,").arg( posConv(e.attribute( "y_mm"), 4 ) ); // Y position + result += TQString("%1,").arg( convZeros(posConv(e.attribute( "x_mm"), 4 ).toInt()+posConv(e.attribute( "width_mm"),4 ).toInt(),4)); // X position + result += TQString("%1,").arg( convZeros(posConv(e.attribute( "y_mm"), 4 ).toInt()+posConv(e.attribute( "height_mm"),4 ).toInt(),4)); // Y position result += TQString("B"); // Type of Clear result += TQString("|}\n"); // FIN } else { result += TQString("{LC;"); // LC - result += TQString("%1,").tqarg( posConv(e.attribute( "x_mm"), 4 ) ); // X position - result += TQString("%1,").tqarg( posConv(e.attribute( "y_mm"), 4 ) ); // Y position - result += TQString("%1,").tqarg( convZeros(posConv(e.attribute( "x_mm"), 4 ).toInt()+posConv(e.attribute( "width_mm"),4 ).toInt(),4)); // X position - result += TQString("%1,").tqarg( convZeros(posConv(e.attribute( "y_mm"), 4 ).toInt()+posConv(e.attribute( "height_mm"),4 ).toInt(),4)); // Y position + result += TQString("%1,").arg( posConv(e.attribute( "x_mm"), 4 ) ); // X position + result += TQString("%1,").arg( posConv(e.attribute( "y_mm"), 4 ) ); // Y position + result += TQString("%1,").arg( convZeros(posConv(e.attribute( "x_mm"), 4 ).toInt()+posConv(e.attribute( "width_mm"),4 ).toInt(),4)); // X position + result += TQString("%1,").arg( convZeros(posConv(e.attribute( "y_mm"), 4 ).toInt()+posConv(e.attribute( "height_mm"),4 ).toInt(),4)); // Y position result += TQString("1,"); // Type of line 0=line 1=Rectangulo 2=Jagged line 3=Rectangle with jagged lines - result += TQString("%1").tqarg(lineWidth(e)); // No. of line width dots 1-9 + result += TQString("%1").arg(lineWidth(e)); // No. of line width dots 1-9 //result += TQString("999"); // Radius of rounded corners of a rectangle result += TQString("|}\n"); // FIN } } else if( e.tagName() == "line" ) { result += TQString("{LC;"); // LC - result += TQString("%1,").tqarg( posConv(e.attribute( "x_mm"), 4 ) ); // X position - result += TQString("%1,").tqarg( posConv(e.attribute( "y_mm"), 4 ) ); // Y position - result += TQString("%1,").tqarg( convZeros(posConv(e.attribute( "x_mm"), 4 ).toInt()+posConv(e.attribute( "width_mm"),4 ).toInt(),4)); // X position - result += TQString("%1,").tqarg( convZeros(posConv(e.attribute( "y_mm"), 4 ).toInt()+posConv(e.attribute( "height_mm"),4 ).toInt(),4)); // Y position + result += TQString("%1,").arg( posConv(e.attribute( "x_mm"), 4 ) ); // X position + result += TQString("%1,").arg( posConv(e.attribute( "y_mm"), 4 ) ); // Y position + result += TQString("%1,").arg( convZeros(posConv(e.attribute( "x_mm"), 4 ).toInt()+posConv(e.attribute( "width_mm"),4 ).toInt(),4)); // X position + result += TQString("%1,").arg( convZeros(posConv(e.attribute( "y_mm"), 4 ).toInt()+posConv(e.attribute( "height_mm"),4 ).toInt(),4)); // Y position result += TQString("0,"); // Type of line 0=line 1=Rectangulo 2=Jagged line 3=Rectangle with jagged lines - result += TQString("%1").tqarg(lineWidth(e)); // No. of line width dots 1-9 + result += TQString("%1").arg(lineWidth(e)); // No. of line width dots 1-9 //result += TQString("999"); // Radius of rounded corners of a rectangle result += TQString("|}\n"); // FIN } @@ -206,7 +206,7 @@ TQString tec452(const TQString &url, int count, const TQString &art, const TQStr } result += TQString("{U1;0130|}\n"); // ForwardFeed - result += TQString("{XS;I,%1,0000C2000|}\n").tqarg(convZeros(count,4)); // Issue Command + result += TQString("{XS;I,%1,0000C2000|}\n").arg(convZeros(count,4)); // Issue Command return result; } @@ -214,7 +214,7 @@ TQString tec452(const TQString &url, int count, const TQString &art, const TQStr TQString convZeros( int count, int zeros ) { -TQString str= TQString("%1").tqarg(count); +TQString str= TQString("%1").arg(count); int l=strlen(str); //get the string length for(;l<zeros;l++) str = TQString("0") + str; return str; @@ -223,9 +223,9 @@ return str; TQString posConv( TQString str, int zeros ) { int point=str.find(".",0); -TQString dec= TQString("%1").tqarg(str.mid(point+1,1)); +TQString dec= TQString("%1").arg(str.mid(point+1,1)); str = str.mid(0,point); -str = TQString("%1%2").tqarg(str).tqarg(dec); +str = TQString("%1%2").arg(str).arg(dec); return convZeros (str.toInt(), zeros); } @@ -240,20 +240,20 @@ else return 0; TQString code39 (const TQDomElement &e, int countBar) { TQString result; - result += TQString("{XB%1;").tqarg( convZeros(countBar, 2) ); // count - result += TQString("%1").tqarg( posConv(e.attribute( "x_mm"), 4 ) ); // X position - result += TQString(",%1").tqarg( posConv(e.attribute( "y_mm"), 4 ) ); // Y position - result += TQString(",%1").tqarg( barcodeType( e.attribute( "type") ) ); // Type of bar code - result += TQString(",%1").tqarg( withChecksum(e) ); // Type of check digit - result += TQString(",%1").tqarg( "03" ); // Narrow bar width - result += TQString(",%1").tqarg( "03" ); // Narrow space width - result += TQString(",%1").tqarg( "06" ); // Wide bar width - result += TQString(",%1").tqarg( "06" ); // Wide space width - result += TQString(",%1").tqarg( "03" ); // Character to Character space width - result += TQString(",%1").tqarg( rotation(e.attribute( "rotation", "0" ).toInt())); // Rotation angel of barcode - result += TQString(",%1").tqarg( "0063" ); // height of barcode - result += TQString(",+%1").tqarg( sequence(e) ); // Increment / Decrement - result += TQString(",%1").tqarg( e.attribute( "text", "1" ).toInt() ); // Selection of print or non print of numerals under bars + result += TQString("{XB%1;").arg( convZeros(countBar, 2) ); // count + result += TQString("%1").arg( posConv(e.attribute( "x_mm"), 4 ) ); // X position + result += TQString(",%1").arg( posConv(e.attribute( "y_mm"), 4 ) ); // Y position + result += TQString(",%1").arg( barcodeType( e.attribute( "type") ) ); // Type of bar code + result += TQString(",%1").arg( withChecksum(e) ); // Type of check digit + result += TQString(",%1").arg( "03" ); // Narrow bar width + result += TQString(",%1").arg( "03" ); // Narrow space width + result += TQString(",%1").arg( "06" ); // Wide bar width + result += TQString(",%1").arg( "06" ); // Wide space width + result += TQString(",%1").arg( "03" ); // Character to Character space width + result += TQString(",%1").arg( rotation(e.attribute( "rotation", "0" ).toInt())); // Rotation angel of barcode + result += TQString(",%1").arg( "0063" ); // height of barcode + result += TQString(",+%1").arg( sequence(e) ); // Increment / Decrement + result += TQString(",%1").arg( e.attribute( "text", "1" ).toInt() ); // Selection of print or non print of numerals under bars result += TQString(",00"); //Number of Zeros to be suppressed result += TQString("|}\n"); // FIN @@ -371,17 +371,17 @@ return convZeros(e.attribute("sequencestep" ,"0").toInt() ,10); TQString code128 (const TQDomElement &e, int countBar) { TQString result; - result += TQString("{XB%1;").tqarg( convZeros(countBar, 2) ); // count - result += TQString("%1").tqarg( posConv(e.attribute( "x_mm"), 4 ) ); // X position - result += TQString(",%1").tqarg( posConv(e.attribute( "y_mm"), 4 ) ); // Y position - result += TQString(",%1").tqarg( barcodeType( e.attribute( "type") ) ); // Type of bar code - result += TQString(",%1").tqarg( withChecksum(e) ); // Type of check digit - result += TQString(",%1").tqarg( "03" ); // 1 module width - result += TQString(",%1").tqarg( rotation(e.attribute( "rotation", "0" ).toInt())); // Rotation angel of barcode - result += TQString(",%1").tqarg( "0063" ); // height of barcode - result += TQString(",+%1").tqarg( sequence(e) ); // Increment / Decrement + result += TQString("{XB%1;").arg( convZeros(countBar, 2) ); // count + result += TQString("%1").arg( posConv(e.attribute( "x_mm"), 4 ) ); // X position + result += TQString(",%1").arg( posConv(e.attribute( "y_mm"), 4 ) ); // Y position + result += TQString(",%1").arg( barcodeType( e.attribute( "type") ) ); // Type of bar code + result += TQString(",%1").arg( withChecksum(e) ); // Type of check digit + result += TQString(",%1").arg( "03" ); // 1 module width + result += TQString(",%1").arg( rotation(e.attribute( "rotation", "0" ).toInt())); // Rotation angel of barcode + result += TQString(",%1").arg( "0063" ); // height of barcode + result += TQString(",+%1").arg( sequence(e) ); // Increment / Decrement result += TQString(",000"); // Length of th WPC guard bar - result += TQString(",%1").tqarg( e.attribute( "text", "1" ).toInt() ); // Selection of print or non print of numerals under bars + result += TQString(",%1").arg( e.attribute( "text", "1" ).toInt() ); // Selection of print or non print of numerals under bars result += TQString(",00"); //Number of Zeros to be suppressed result += TQString("|}\n"); // FIN @@ -457,15 +457,15 @@ return result; TQString pdf417 (const TQDomElement &e, int countBar) { TQString result; - result += TQString("{XB%1;").tqarg( convZeros(countBar, 2) ); // count - result += TQString("%1").tqarg( posConv(e.attribute( "x_mm"), 4 ) ); // X position - result += TQString(",%1").tqarg( posConv(e.attribute( "y_mm"), 4 ) ); // Y position + result += TQString("{XB%1;").arg( convZeros(countBar, 2) ); // count + result += TQString("%1").arg( posConv(e.attribute( "x_mm"), 4 ) ); // X position + result += TQString(",%1").arg( posConv(e.attribute( "y_mm"), 4 ) ); // Y position result += TQString(",P"); // Type of bar code ALWAYS PDF417 - result += TQString(",%1").tqarg( withChecksum(e) ); // Type of check digit - result += TQString(",%1").tqarg( "03" ); // Module Width - result += TQString(",%1").tqarg( convZeros(e.attribute("pdf417.col").toInt(),2 )); // Number of columns - result += TQString(",%1").tqarg( rotation(e.attribute( "rotation", "0" ).toInt())); // Rotation angel of barcode - result += TQString(",%1").tqarg( "0063" ); // height of barcode + result += TQString(",%1").arg( withChecksum(e) ); // Type of check digit + result += TQString(",%1").arg( "03" ); // Module Width + result += TQString(",%1").arg( convZeros(e.attribute("pdf417.col").toInt(),2 )); // Number of columns + result += TQString(",%1").arg( rotation(e.attribute( "rotation", "0" ).toInt())); // Rotation angel of barcode + result += TQString(",%1").arg( "0063" ); // height of barcode result += TQString("|}\n"); // FIN return result; @@ -619,7 +619,7 @@ if (etext.contains("[barcode_no_customer]") ){ while( query.next() ) temp = TQString (query.value( 0 ).toString()); etext.replace("[barcode_no_customer]" , temp ); } -if (etext.contains("[date]") ) etext.replace( "[date]" ,TQDateTime::tqcurrentDateTime().toString( KBarcodeSettings::getDateFormat() )); +if (etext.contains("[date]") ) etext.replace( "[date]" ,TQDateTime::currentDateTime().toString( KBarcodeSettings::getDateFormat() )); if (etext.contains("[time]") ) etext.replace( "[time]" ,TQTime::currentTime().toString()); return etext;*/ diff --git a/kbarcode/tec.h b/kbarcode/tec.h index 73de630..84b4174 100644 --- a/kbarcode/tec.h +++ b/kbarcode/tec.h @@ -22,11 +22,11 @@ #include <stdio.h> // QT includes -#include <tqclipboard.h> +#include <clipboard.h> #include <tqcursor.h> #include <tqgroupbox.h> #include <tqhbox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqpainter.h> #include <tqpaintdevicemetrics.h> #include <tqprogressdialog.h> diff --git a/kbarcode/textitem.cpp b/kbarcode/textitem.cpp index 61b792e..0b00e7a 100644 --- a/kbarcode/textitem.cpp +++ b/kbarcode/textitem.cpp @@ -134,14 +134,14 @@ void TextItem::drawIpl( TQTextStream* stream, IPLUtils* utils ) // simply remove all html tags.... TQString data = m_text.replace( TQRegExp("<[^>]*>"), "" ); - TQString s = TQString("H%1;").tqarg( counter ); // field number + TQString s = TQString("H%1;").arg( counter ); // field number s += utils->fieldOrigin( rect().x(), rect().y() ); - s += TQString("c%1;").tqarg( 2 ); // font - s += TQString("h%1;").tqarg( 2 ); // vertical magnification ("height") - s += TQString("w%1;").tqarg( 2 ); // horicontyl magnification ("width") - s += TQString("d0,%1;").tqarg( data.length() ); // max length of data ! + s += TQString("c%1;").arg( 2 ); // font + s += TQString("h%1;").arg( 2 ); // vertical magnification ("height") + s += TQString("w%1;").arg( 2 ); // horicontyl magnification ("width") + s += TQString("d0,%1;").arg( data.length() ); // max length of data ! *stream << utils->field( s ); utils->addValue( data ); @@ -165,9 +165,9 @@ void TextItem::drawEPcl( TQTextStream* stream ) TQStringList::Iterator line = lines.begin(); for( int i=0; line != lines.end(); ++line, ++i ){ - TQString s = TQString("T %1").tqarg( rect().x() + 1 ); - s += TQString(" %1 0 0 0 50 1").tqarg( rect().y()+50+1 + i*52 ); - s += TQString(" %1").tqarg( *line ); + TQString s = TQString("T %1").arg( rect().x() + 1 ); + s += TQString(" %1 0 0 0 50 1").arg( rect().y()+50+1 + i*52 ); + s += TQString(" %1").arg( *line ); *stream << EPCLUtils::field( s ); } } diff --git a/kbarcode/textlineedit.cpp b/kbarcode/textlineedit.cpp index 79347f2..d3528b4 100644 --- a/kbarcode/textlineedit.cpp +++ b/kbarcode/textlineedit.cpp @@ -28,12 +28,12 @@ #include <tqdockarea.h> #include <tqregexp.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> TextLineEditor::TextLineEditor( TokenProvider* token, TQWidget *parent, const char *name ) : TQWidget( parent, name ), m_token( token ) { - TQVBoxLayout* tqlayout = new TQVBoxLayout( this, 6, 6 ); + TQVBoxLayout* layout = new TQVBoxLayout( this, 6, 6 ); @@ -48,8 +48,8 @@ TextLineEditor::TextLineEditor( TokenProvider* token, TQWidget *parent, const ch setupActions(); - tqlayout->addWidget( area ); - tqlayout->addWidget( editor ); + layout->addWidget( area ); + layout->addWidget( editor ); diff --git a/kbarcode/textlineitem.cpp b/kbarcode/textlineitem.cpp index c387bc2..2beaabf 100644 --- a/kbarcode/textlineitem.cpp +++ b/kbarcode/textlineitem.cpp @@ -99,14 +99,14 @@ void TextLineItem::drawIpl( TQTextStream* stream, IPLUtils* utils ) // simply remove all html tags.... TQString data = m_text.replace( TQRegExp("<[^>]*>"), "" ); - TQString s = TQString("H%1;").tqarg( counter ); // field number + TQString s = TQString("H%1;").arg( counter ); // field number s += utils->fieldOrigin( rect().x(), rect().y() ); - s += TQString("c%1;").tqarg( 2 ); // font - s += TQString("h%1;").tqarg( 2 ); // vertical magnification ("height") - s += TQString("w%1;").tqarg( 2 ); // horicontyl magnification ("width") - s += TQString("d0,%1;").tqarg( data.length() ); // max length of data ! + s += TQString("c%1;").arg( 2 ); // font + s += TQString("h%1;").arg( 2 ); // vertical magnification ("height") + s += TQString("w%1;").arg( 2 ); // horicontyl magnification ("width") + s += TQString("d0,%1;").arg( data.length() ); // max length of data ! *stream << utils->field( s ); utils->addValue( data ); @@ -129,9 +129,9 @@ void TextLineItem::drawEPcl( TQTextStream* stream ) TQStringList::Iterator line = lines.begin(); for( int i=0; line != lines.end(); ++line, ++i ){ - TQString s = TQString("T %1").tqarg( rect().x() + 1 ); - s += TQString(" %1 0 0 0 50 1").tqarg( rect().y()+50+1 + i*52 ); - s += TQString(" %1").tqarg( *line ); + TQString s = TQString("T %1").arg( rect().x() + 1 ); + s += TQString(" %1 0 0 0 50 1").arg( rect().y()+50+1 + i*52 ); + s += TQString(" %1").arg( *line ); *stream << EPCLUtils::field( s ); } } diff --git a/kbarcode/tokendialog.cpp b/kbarcode/tokendialog.cpp index 83a6575..ab1465b 100644 --- a/kbarcode/tokendialog.cpp +++ b/kbarcode/tokendialog.cpp @@ -27,7 +27,7 @@ #include <tqhbox.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqsplitter.h> #include <tqtooltip.h> #include <tqvaluelist.h> @@ -36,7 +36,7 @@ #include <tqwidgetstack.h> #include <tqradiobutton.h> #include <kcombobox.h> -#include <tqtextbrowser.h> +#include <textbrowser.h> #include <kpushbutton.h> TokenDialog::TokenDialog(TokenProvider* token ,TQWidget *parent, const char *name) @@ -125,9 +125,9 @@ void TokenDialog::setupStack2Page1() { stack2Page1 = new TQWidget(); - TQVBoxLayout* tqlayout = new TQVBoxLayout( stack2Page1 ); + TQVBoxLayout* layout = new TQVBoxLayout( stack2Page1 ); TQSplitter* splitter = new TQSplitter( stack2Page1 ); - tqlayout->addWidget( splitter ); + layout->addWidget( splitter ); TQVBox* left = new TQVBox( splitter ); TQVBox* right = new TQVBox( splitter ); @@ -266,9 +266,9 @@ void TokenDialog::accept() m_result = listVariable->currentText(); } else if( radioSQLQuery->isChecked() ) - m_result = TQString( "sqlquery:%2").tqarg( editQuery->text() ); + m_result = TQString( "sqlquery:%2").arg( editQuery->text() ); else if( radioJavaScript->isChecked() ) - m_result = TQString( "js:%2").tqarg( editJavaScript->text() ); + m_result = TQString( "js:%2").arg( editJavaScript->text() ); m_result = "[" + m_result + "]"; } @@ -279,10 +279,10 @@ void TokenDialog::accept() if( item ) { for( unsigned int i = 0; i < m_tokens.count(); i++ ) - if( TQString( "[%1]").tqarg( m_tokens[i].token ) == item->text( 0 ) ) + if( TQString( "[%1]").arg( m_tokens[i].token ) == item->text( 0 ) ) { if( m_tokens[i].appendix ) - m_result = TQString( "[%1%2]").tqarg( m_tokens[i].token ).tqarg( lineEdit->text() ); + m_result = TQString( "[%1%2]").arg( m_tokens[i].token ).arg( lineEdit->text() ); else m_result = item->text( 0 ); break; @@ -378,7 +378,7 @@ void TokenDialog::initStackPage2() if( (*categories)[i].category == cat ) { for( unsigned int z = 0; z < (*categories)[i].tokens.count(); z++ ) - labelList->insertItem( new KListViewItem( labelList, TQString( "[%1]").tqarg( (*categories)[i].tokens[z].token ), + labelList->insertItem( new KListViewItem( labelList, TQString( "[%1]").arg( (*categories)[i].tokens[z].token ), (*categories)[i].tokens[z].description ) ); break; @@ -396,7 +396,7 @@ void TokenDialog::categoryChanged( TQListBoxItem* item ) if( item->prev() == 0 ) { for( i = 0; i < m_tokens.count(); i++ ) - allList->insertItem( new KListViewItem( allList, TQString( "[%1]").tqarg( m_tokens[i].token ), + allList->insertItem( new KListViewItem( allList, TQString( "[%1]").arg( m_tokens[i].token ), m_tokens[i].description ) ); } else @@ -406,7 +406,7 @@ void TokenDialog::categoryChanged( TQListBoxItem* item ) if( TokenProvider::captionForCategory( (TokenProvider::ECategories)(*categories)[i].category ) == item->text() ) { for( unsigned int z = 0; z < (*categories)[i].tokens.count(); z++ ) - allList->insertItem( new KListViewItem( allList, TQString( "[%1]").tqarg( (*categories)[i].tokens[z].token ), + allList->insertItem( new KListViewItem( allList, TQString( "[%1]").arg( (*categories)[i].tokens[z].token ), (*categories)[i].tokens[z].description ) ); break; @@ -416,7 +416,7 @@ void TokenDialog::categoryChanged( TQListBoxItem* item ) // TODO: comparing by a user visible string cries for bugs!!! if( item->text() == i18n("Custom Values") ) for( i=0;i<m_custom_tokens.count();i++ ) - allList->insertItem( new KListViewItem( allList, TQString( "[%1]").tqarg( m_custom_tokens[i] ), + allList->insertItem( new KListViewItem( allList, TQString( "[%1]").arg( m_custom_tokens[i] ), i18n("Variable defined by the user for this label.") ) ); } } @@ -425,7 +425,7 @@ void TokenDialog::itemChanged( TQListViewItem* item ) { for( unsigned int i = 0; i < m_tokens.count(); i++ ) { - if( TQString( "[%1]").tqarg( m_tokens[i].token ) == item->text( 0 ) ) + if( TQString( "[%1]").arg( m_tokens[i].token ) == item->text( 0 ) ) { lineEdit->setEnabled( m_tokens[i].appendix ); if( m_tokens[i].appendix ) diff --git a/kbarcode/tokenprovider.cpp b/kbarcode/tokenprovider.cpp index ca3cc02..63ba755 100644 --- a/kbarcode/tokenprovider.cpp +++ b/kbarcode/tokenprovider.cpp @@ -216,11 +216,11 @@ void TokenProvider::init() category.tokens.append( tToken( TOK_ARTICLE_DESC, i18n("Article description from barcode_basic") ) ); category.tokens.append( tToken( TOK_ARTICLE_NO, i18n("Article number from barcode_basic") ) ); for( int i = 0; i < NUM_FIELDS; i++ ) - category.tokens.append( tToken( TQString( TOK_LINE ).tqarg( i ), - TQString( TOK_LINE ).tqarg( i ) + " from customer_text" ) ); + category.tokens.append( tToken( TQString( TOK_LINE ).arg( i ), + TQString( TOK_LINE ).arg( i ) + " from customer_text" ) ); for( int i = 0; i < NUM_FIELDS; i++ ) - category.tokens.append( tToken( TQString( TOK_FIELD ).tqarg( i ), - TQString( TOK_FIELD ).tqarg( i ) + " from barcode_basic" ) ); + category.tokens.append( tToken( TQString( TOK_FIELD ).arg( i ), + TQString( TOK_FIELD ).arg( i ) + " from barcode_basic" ) ); category.tokens.append( tToken( TOK_CUSTOMER_NO, i18n("customer number of the current customer") ) ); category.tokens.append( tToken( TOK_CUSTOEMR_NAME, i18n("name of the current customer") ) ); category.tokens.append( tToken( TOK_BARCODE_NO, i18n("Barcode number from barcode_basic") ) ); @@ -460,7 +460,7 @@ TQString TokenProvider::process( const TQString & t ) { for( i = 0; i < NUM_FIELDS; i++ ) { - const TQString c = TQString( TOK_LINE ).tqarg( i ); + const TQString c = TQString( TOK_LINE ).arg( i ); if( t == c ) ret = query( "SELECT " + c + " FROM " + TABLE_CUSTOMER_TEXT + " WHERE article_no='" + article_no + "' AND customer_no='" + customer_no + "'"); @@ -468,7 +468,7 @@ TQString TokenProvider::process( const TQString & t ) for( i = 0; i < NUM_FIELDS; i++ ) { - const TQString c = TQString( TOK_FIELD ).tqarg( i ); + const TQString c = TQString( TOK_FIELD ).arg( i ); if( t == c ) ret = query("SELECT " + c + " FROM " + TABLE_BASIC + " WHERE article_no='" + article_no + "'"); } @@ -516,7 +516,7 @@ TQString TokenProvider::process( const TQString & t ) ret = label_name; if( t == TOK_DATE ) - ret = TQDateTime::tqcurrentDateTime().toString( KBarcodeSettings::getDateFormat() ); + ret = TQDateTime::currentDateTime().toString( KBarcodeSettings::getDateFormat() ); if( date_reg_exp.search(t,0) != -1 ) { @@ -558,7 +558,7 @@ TQString TokenProvider::process( const TQString & t ) if( m_printer && t == TOK_RESOLUTION ) { TQPaintDeviceMetrics metrics( m_printer ); - ret = TQString( "%1dpi" ).tqarg( metrics.logicalDpiY() ); + ret = TQString( "%1dpi" ).arg( metrics.logicalDpiY() ); } if( !m_serial.isEmpty() && t == TOK_SERIAL ) diff --git a/kbarcode/xmlutils.cpp b/kbarcode/xmlutils.cpp index 27cbfb8..e87e999 100644 --- a/kbarcode/xmlutils.cpp +++ b/kbarcode/xmlutils.cpp @@ -112,7 +112,7 @@ void XMLUtils::writeXMLHeader( TQDomNode* root, const TQString & description, De TQDomElement labelid = root->ownerDocument().createElement( "id" ); writeDefinition( &labelid, def ); - labelid.appendChild( root->ownerDocument().createTextNode( TQString( "%1" ).tqarg(def->getId()) ) ); + labelid.appendChild( root->ownerDocument().createTextNode( TQString( "%1" ).arg(def->getId()) ) ); data.appendChild( labelid ); root->appendChild( data ); @@ -279,9 +279,9 @@ TQColor XMLUtils::readXMLColor( TQDomElement* tag, const TQString & prefix, TQCo int g = c.green(); int b = c.blue(); - r = tag->attribute( prefix + "r", TQString("%1").tqarg( r ) ).toInt(); - g = tag->attribute( prefix + "g", TQString("%1").tqarg( g ) ).toInt(); - b = tag->attribute( prefix + "b", TQString("%1").tqarg( b ) ).toInt(); + r = tag->attribute( prefix + "r", TQString("%1").arg( r ) ).toInt(); + g = tag->attribute( prefix + "g", TQString("%1").arg( g ) ).toInt(); + b = tag->attribute( prefix + "b", TQString("%1").arg( b ) ).toInt(); return TQColor( r, g, b); } diff --git a/kbarcode/zplutils.cpp b/kbarcode/zplutils.cpp index 239959a..e989a89 100644 --- a/kbarcode/zplutils.cpp +++ b/kbarcode/zplutils.cpp @@ -24,7 +24,7 @@ #include <tqpaintdevicemetrics.h> #include <tqregexp.h> #include <tqstring.h> -#include <tqtextstream.h> +#include <textstream.h> // font table for IPL, thanks to Erich Kitzmueller struct { int size; int c; int h; int w; } iplfonttable[] = { @@ -123,7 +123,7 @@ TQString ZPLUtils::fieldOrigin( int x, int y ) { TQString zpl = TQString(); - zpl = TQString("^FO%1,%2\n").tqarg( x ).tqarg( y ); // field origin + zpl = TQString("^FO%1,%2\n").arg( x ).arg( y ); // field origin return zpl; } @@ -243,7 +243,7 @@ TQString IPLUtils::field( const TQString & data ) TQString IPLUtils::fieldOrigin( int x, int y ) { - return TQString("o%1,%2;f0;").tqarg( x ).tqarg( y ); // field origin + return TQString("o%1,%2;f0;").arg( x ).arg( y ); // field origin } TQString IPLUtils::footer() |