summaryrefslogtreecommitdiffstats
path: root/kbarcode/barcodedialogs.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-29 00:55:34 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-29 00:55:34 +0000
commitc4189d200e71c7ef82e9a6e34935ad225154d658 (patch)
treef7f29a1159e0402472ff2ab22617a8113f66263c /kbarcode/barcodedialogs.cpp
parent2f888b1578e65ec1bc514996eb509fcaf34462d6 (diff)
downloadkbarcode-c4189d200e71c7ef82e9a6e34935ad225154d658.tar.gz
kbarcode-c4189d200e71c7ef82e9a6e34935ad225154d658.zip
TQt4 port kbarcode
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kbarcode@1233956 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kbarcode/barcodedialogs.cpp')
-rw-r--r--kbarcode/barcodedialogs.cpp162
1 files changed, 81 insertions, 81 deletions
diff --git a/kbarcode/barcodedialogs.cpp b/kbarcode/barcodedialogs.cpp
index 28639a4..676265c 100644
--- a/kbarcode/barcodedialogs.cpp
+++ b/kbarcode/barcodedialogs.cpp
@@ -20,17 +20,17 @@
#include "purepostscript.h"
#include "tbarcode2.h"
-// Qt includes
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qmap.h>
-#include <qradiobutton.h>
-#include <qtooltip.h>
-#include <qvbox.h>
-#include <qvgroupbox.h>
+// TQt includes
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqmap.h>
+#include <tqradiobutton.h>
+#include <tqtooltip.h>
+#include <tqvbox.h>
+#include <tqvgroupbox.h>
// KDE includes
#include <kcombobox.h>
@@ -39,43 +39,43 @@
#include <kcolorbutton.h>
-AdvancedBarcodeDialog::AdvancedBarcodeDialog( QString type, QWidget* parent, const char* name )
+AdvancedBarcodeDialog::AdvancedBarcodeDialog( TQString type, TQWidget* tqparent, const char* name )
: KDialogBase( KDialogBase::Tabbed, i18n("Barcode Settings"),
- KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, parent,name)
+ KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, tqparent,name)
{
list.setAutoDelete( false );
if( Barkode::hasFeature( type, PDF417BARCODE ) ) {
- QVBox* box = addVBoxPage( i18n("PDF417") );
+ TQVBox* box = addVBoxPage( i18n("PDF417") );
PDF417BarcodeDlg* dlg = new PDF417BarcodeDlg( box );
list.append( (BarcodeDlgBase*)dlg );
}
if( Barkode::hasFeature( type, DATAMATRIX ) ) {
- QVBox* box = addVBoxPage( i18n("DataMatrix") );
+ TQVBox* box = addVBoxPage( i18n("DataMatrix") );
DataMatrixDlg* dlg = new DataMatrixDlg( box );
list.append( (BarcodeDlgBase*)dlg );
}
if( Barkode::hasFeature( type, TBARCODEADV ) ) {
- QVBox* box = addVBoxPage( i18n("TBarcode") );
+ TQVBox* box = addVBoxPage( i18n("TBarcode") );
TBarcodeDlg* dlg = new TBarcodeDlg( box );
list.append( (BarcodeDlgBase*)dlg );
}
if( Barkode::hasFeature( type, PUREADV ) ) {
- QVBox* box = addVBoxPage( i18n("Barcode Writer in Pure Postscript") );
+ TQVBox* box = addVBoxPage( i18n("Barcode Writer in Pure Postscript") );
PurePostscriptDlg* dlg = new PurePostscriptDlg( box );
list.append( (BarcodeDlgBase*)dlg );
}
if( Barkode::hasFeature( type, COLORED ) ) {
- QVBox* box = addVBoxPage( i18n("Colors") );
+ TQVBox* box = addVBoxPage( i18n("Colors") );
ColorDlg* dlg = new ColorDlg( box );
list.append( (BarcodeDlgBase*)dlg );
}
- QVBox* box = addVBoxPage( i18n("Sequence") );
+ TQVBox* box = addVBoxPage( i18n("Sequence") );
SequenceDlg* dlg = new SequenceDlg( box );
list.append( (BarcodeDlgBase*)dlg );
}
@@ -100,17 +100,17 @@ void AdvancedBarcodeDialog::getData( Barkode* b )
}
}
-TBarcodeDlg::TBarcodeDlg(QWidget *parent, const char *name )
- : QWidget( parent, name )
+TBarcodeDlg::TBarcodeDlg(TQWidget *tqparent, const char *name )
+ : TQWidget( tqparent, name )
{
- QVBoxLayout* layout = new QVBoxLayout( this, 6, 6 );
+ TQVBoxLayout* tqlayout = new TQVBoxLayout( this, 6, 6 );
- QGroupBox* gb = new QGroupBox( i18n("TBarcode"), this );
+ TQGroupBox* gb = new TQGroupBox( i18n("TBarcode"), this );
gb->setColumnLayout(0, Qt::Vertical );
- gb->layout()->setSpacing( 6 );
- gb->layout()->setMargin( 11 );
+ gb->tqlayout()->setSpacing( 6 );
+ gb->tqlayout()->setMargin( 11 );
gb->setEnabled( Barkode::haveTBarcode() || Barkode::haveTBarcode2() );
- QVBoxLayout* gbLayout = new QVBoxLayout( gb->layout() );
+ TQVBoxLayout* gbLayout = new TQVBoxLayout( gb->tqlayout() );
spinModule = new KDoubleNumInput( gb );
spinModule->setLabel( i18n("Module width (mm):"), AlignLeft | AlignVCenter );
@@ -120,16 +120,16 @@ TBarcodeDlg::TBarcodeDlg(QWidget *parent, const char *name )
spinHeight->setLabel( i18n("Barcode Height (mm):"), AlignLeft | AlignVCenter );
spinHeight->setRange( 1, 1000, 10, false );
- checkEscape = new QCheckBox( i18n("&Translate escape sequences"), gb );
- checkAbove = new QCheckBox( i18n("&Text above barcode"), gb );
- checkAutoCorrect = new QCheckBox( i18n("&Auto correction"), gb );
+ checkEscape = new TQCheckBox( i18n("&Translate escape sequences"), gb );
+ checkAbove = new TQCheckBox( i18n("&Text above barcode"), gb );
+ checkAutoCorrect = new TQCheckBox( i18n("&Auto correction"), gb );
comboCheckSum = new KComboBox( false, gb );
- QLabel* label = new QLabel( i18n("&Checksum calculation method:"), gb );
+ TQLabel* label = new TQLabel( i18n("&Checksum calculation method:"), gb );
label->setBuddy( comboCheckSum );
- QHBoxLayout * hbox = new QHBoxLayout( 0, 6, 6 );
+ TQHBoxLayout * hbox = new TQHBoxLayout( 0, 6, 6 );
hbox->addWidget( label );
hbox->addWidget( comboCheckSum );
@@ -140,11 +140,11 @@ TBarcodeDlg::TBarcodeDlg(QWidget *parent, const char *name )
gbLayout->addWidget( checkAutoCorrect );
gbLayout->addLayout( hbox );
- QToolTip::add( spinModule, i18n("<qt>Change the module with used by tbarcode. Take a look into the "
+ TQToolTip::add( spinModule, i18n("<qt>Change the module with used by tbarcode. Take a look into the "
"tbarcode documentation for details. Normaly you do not want to change "
"this value.</qt>") );
- layout->addWidget( gb );
+ tqlayout->addWidget( gb );
}
void TBarcodeDlg::setData( Barkode* b )
@@ -221,7 +221,7 @@ void TBarcodeDlg::setData( Barkode* b )
comboCheckSum->insertStringList( map.keys() );
- QMap<QString,int>::Iterator it;
+ TQMap<TQString,int>::Iterator it;
for ( it = map.begin(); it != map.end(); ++it ) {
if( it.data() == options->checksum() ) {
for( int i = 0; i < comboCheckSum->count(); i++ )
@@ -250,17 +250,17 @@ void TBarcodeDlg::getData( Barkode* b ) const
}
}
-PDF417BarcodeDlg::PDF417BarcodeDlg(QWidget *parent, const char *name )
- : QWidget( parent, name )
+PDF417BarcodeDlg::PDF417BarcodeDlg(TQWidget *tqparent, const char *name )
+ : TQWidget( tqparent, name )
{
- QVBoxLayout* layout = new QVBoxLayout( this, 6, 6 );
+ TQVBoxLayout* tqlayout = new TQVBoxLayout( this, 6, 6 );
- QGroupBox* gpdf = new QGroupBox( i18n("PDF417"), this );
+ TQGroupBox* gpdf = new TQGroupBox( i18n("PDF417"), this );
gpdf->setColumnLayout(0, Qt::Vertical );
- gpdf->layout()->setSpacing( 6 );
- gpdf->layout()->setMargin( 11 );
+ gpdf->tqlayout()->setSpacing( 6 );
+ gpdf->tqlayout()->setMargin( 11 );
gpdf->setEnabled( Barkode::haveTBarcode() || Barkode::havePDFBarcode() );
- QVBoxLayout* gpdfLayout = new QVBoxLayout( gpdf->layout() );
+ TQVBoxLayout* gpdfLayout = new TQVBoxLayout( gpdf->tqlayout() );
spinRow = new KIntNumInput( gpdf );
spinRow->setLabel( i18n("Rows:"), AlignLeft | AlignVCenter );
@@ -277,7 +277,7 @@ PDF417BarcodeDlg::PDF417BarcodeDlg(QWidget *parent, const char *name )
gpdfLayout->addWidget( spinRow );
gpdfLayout->addWidget( spinCol );
gpdfLayout->addWidget( spinErr );
- layout->addWidget( gpdf );
+ tqlayout->addWidget( gpdf );
}
void PDF417BarcodeDlg::setData( Barkode* b )
@@ -304,16 +304,16 @@ void PDF417BarcodeDlg::getData( Barkode* b ) const
}
}
-DataMatrixDlg::DataMatrixDlg(QWidget *parent, const char *name )
- : QWidget( parent, name )
+DataMatrixDlg::DataMatrixDlg(TQWidget *tqparent, const char *name )
+ : TQWidget( tqparent, name )
{
- QHBoxLayout* datamLayout = new QHBoxLayout( this, 6, 6 );
+ TQHBoxLayout* datamLayout = new TQHBoxLayout( this, 6, 6 );
comboDataMatrix = new KComboBox( false, this );
- datamLayout->addWidget( new QLabel( i18n("Data Matrix symbol sizes (rows x cols):"), this ) );
+ datamLayout->addWidget( new TQLabel( i18n("Data Matrix symbol sizes (rows x cols):"), this ) );
datamLayout->addWidget( comboDataMatrix );
- datamLayout->addItem( new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Minimum ) );
+ datamLayout->addItem( new TQSpacerItem( 0, 0, TQSizePolicy::Minimum, TQSizePolicy::Minimum ) );
comboDataMatrix->insertItem( i18n("Automatic calculation" ) );
comboDataMatrix->insertItem( "10 x 10" );
@@ -358,22 +358,22 @@ void DataMatrixDlg::getData( Barkode* b ) const
b->setDatamatrixSize( comboDataMatrix->currentItem() );
}
-SequenceDlg::SequenceDlg( QWidget *parent, const char *name )
- : QWidget( parent, name )
+SequenceDlg::SequenceDlg( TQWidget *tqparent, const char *name )
+ : TQWidget( tqparent, name )
{
- QVBoxLayout* main = new QVBoxLayout( this, 6, 6 );
+ TQVBoxLayout* main = new TQVBoxLayout( this, 6, 6 );
- QButtonGroup* group = new QButtonGroup( i18n("Sequence"), this );
+ TQButtonGroup* group = new TQButtonGroup( i18n("Sequence"), this );
group->setColumnLayout(0, Qt::Vertical );
- group->layout()->setSpacing( 6 );
- group->layout()->setMargin( 11 );
- QVBoxLayout* layout = new QVBoxLayout( group->layout() );
+ group->tqlayout()->setSpacing( 6 );
+ group->tqlayout()->setMargin( 11 );
+ TQVBoxLayout* tqlayout = new TQVBoxLayout( group->tqlayout() );
- checkSequence = new QCheckBox( i18n("&Enable sequence"), group );
+ checkSequence = new TQCheckBox( i18n("&Enable sequence"), group );
- radioNumbers = new QRadioButton( i18n("Iterate over numbers 0-9"), group );
- radioAlpha = new QRadioButton( i18n("Iterate over characters A-Z"), group );
- radioAlphaNum = new QRadioButton( i18n("Iterate over A-Z, 0-9"), group );
+ radioNumbers = new TQRadioButton( i18n("Iterate over numbers 0-9"), group );
+ radioAlpha = new TQRadioButton( i18n("Iterate over characters A-Z"), group );
+ radioAlphaNum = new TQRadioButton( i18n("Iterate over A-Z, 0-9"), group );
spinStep = new KIntNumInput( group );
spinStep->setLabel( i18n("Step:"), AlignLeft | AlignVCenter );
@@ -383,19 +383,19 @@ SequenceDlg::SequenceDlg( QWidget *parent, const char *name )
spinStart->setLabel( i18n("Start:"), AlignLeft | AlignVCenter );
spinStart->setRange( -100000, 100000, 1, false );
- layout->addWidget( checkSequence );
- layout->addWidget( radioNumbers );
- layout->addWidget( radioAlpha );
- layout->addWidget( radioAlphaNum );
- layout->addWidget( spinStep );
- layout->addWidget( spinStart );
+ tqlayout->addWidget( checkSequence );
+ tqlayout->addWidget( radioNumbers );
+ tqlayout->addWidget( radioAlpha );
+ tqlayout->addWidget( radioAlphaNum );
+ tqlayout->addWidget( spinStep );
+ tqlayout->addWidget( spinStart );
main->addWidget( group );
- connect( checkSequence, SIGNAL( clicked() ), this, SLOT( enableControls() ) );
- connect( radioNumbers, SIGNAL( clicked() ), this, SLOT( enableControls() ) );
- connect( radioAlpha, SIGNAL( clicked() ), this, SLOT( enableControls() ) );
- connect( radioAlphaNum, SIGNAL( clicked() ), this, SLOT( enableControls() ) );
+ connect( checkSequence, TQT_SIGNAL( clicked() ), this, TQT_SLOT( enableControls() ) );
+ connect( radioNumbers, TQT_SIGNAL( clicked() ), this, TQT_SLOT( enableControls() ) );
+ connect( radioAlpha, TQT_SIGNAL( clicked() ), this, TQT_SLOT( enableControls() ) );
+ connect( radioAlphaNum, TQT_SIGNAL( clicked() ), this, TQT_SLOT( enableControls() ) );
}
void SequenceDlg::setData( Barkode* b )
@@ -438,23 +438,23 @@ void SequenceDlg::enableControls()
spinStart->setEnabled( checkSequence->isChecked() && radioNumbers->isChecked() );
}
-ColorDlg::ColorDlg(QWidget *parent, const char *name)
- : QVBox( parent, name )
+ColorDlg::ColorDlg(TQWidget *tqparent, const char *name)
+ : TQVBox( tqparent, name )
{
- QGroupBox* gb = new QGroupBox( i18n("Colors"), this );
+ TQGroupBox* gb = new TQGroupBox( i18n("Colors"), this );
gb->setColumnLayout(0, Qt::Vertical );
- gb->layout()->setSpacing( 6 );
- gb->layout()->setMargin( 11 );
+ gb->tqlayout()->setSpacing( 6 );
+ gb->tqlayout()->setMargin( 11 );
gb->setEnabled( Barkode::havePurePostscriptBarcode() );
- QGridLayout* gbLayout = new QGridLayout( gb->layout() );
+ TQGridLayout* gbLayout = new TQGridLayout( gb->tqlayout() );
buttonBarColor = new KColorButton( gb );
buttonBackColor = new KColorButton( gb );
buttonTextColor = new KColorButton( gb );
- gbLayout->addWidget( new QLabel( i18n("Bar Color:"), gb ), 0, 0 );
- gbLayout->addWidget( new QLabel( i18n("Background Color:"), gb ), 1, 0 );
- gbLayout->addWidget( new QLabel( i18n("Text Color:"), gb ), 2, 0 );
+ gbLayout->addWidget( new TQLabel( i18n("Bar Color:"), gb ), 0, 0 );
+ gbLayout->addWidget( new TQLabel( i18n("Background Color:"), gb ), 1, 0 );
+ gbLayout->addWidget( new TQLabel( i18n("Text Color:"), gb ), 2, 0 );
gbLayout->addWidget( buttonBarColor, 0, 1 );
gbLayout->addWidget( buttonBackColor, 1, 1 );
gbLayout->addWidget( buttonTextColor, 2, 1 );
@@ -474,13 +474,13 @@ void ColorDlg::getData( Barkode* b ) const
b->setTextColor( buttonTextColor->color() );
}
-PurePostscriptDlg::PurePostscriptDlg(QWidget *parent, const char *name)
- : QVBox( parent, name )
+PurePostscriptDlg::PurePostscriptDlg(TQWidget *tqparent, const char *name)
+ : TQVBox( tqparent, name )
{
- QVGroupBox* gb = new QVGroupBox( i18n("Barcode Writer in Pure Postscript"), this );
+ TQVGroupBox* gb = new TQVGroupBox( i18n("Barcode Writer in Pure Postscript"), this );
gb->setEnabled( Barkode::havePurePostscriptBarcode() );
- checkChecksum = new QCheckBox( i18n("Enable &Checksum"), gb );
+ checkChecksum = new TQCheckBox( i18n("Enable &Checksum"), gb );
}
void PurePostscriptDlg::setData( Barkode* b )