diff options
Diffstat (limited to 'kbarcode/configdialog.cpp')
-rw-r--r-- | kbarcode/configdialog.cpp | 122 |
1 files changed, 61 insertions, 61 deletions
diff --git a/kbarcode/configdialog.cpp b/kbarcode/configdialog.cpp index 787a560..3a9b320 100644 --- a/kbarcode/configdialog.cpp +++ b/kbarcode/configdialog.cpp @@ -19,15 +19,15 @@ #include "printersettings.h" #include "sqltables.h" -// Qt includes -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpaintdevicemetrics.h> -#include <qradiobutton.h> -#include <qsqldatabase.h> -#include <qtooltip.h> +// TQt includes +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpaintdevicemetrics.h> +#include <tqradiobutton.h> +#include <tqsqldatabase.h> +#include <tqtooltip.h> // KDE includes #include <kabc/addressee.h> @@ -43,12 +43,12 @@ #include <kmessagebox.h> #include <kpushbutton.h> -const QString cached = I18N_NOOP("There are currently %1 cached barcodes."); +const TQString cached = I18N_NOOP("There are currently %1 cached barcodes."); using namespace KABC; -ConfigDialog::ConfigDialog( QWidget* parent ) +ConfigDialog::ConfigDialog( TQWidget* tqparent ) : KDialogBase( IconList, i18n("Configure KBarcode"), KDialogBase::Ok|KDialogBase::Cancel, - KDialogBase::Ok, parent, "", true, true ) + KDialogBase::Ok, tqparent, "", true, true ) { setupTab2(); // Printer setupTab1(); // SQL @@ -63,26 +63,26 @@ ConfigDialog::~ConfigDialog() void ConfigDialog::setupTab1( ) { - QFrame* box = addPage( i18n("SQL Settings"), "", BarIcon("connect_no") ); - QVBoxLayout* layout = new QVBoxLayout( box, 6, 6 ); - QSpacerItem* spacer = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Expanding ); + TQFrame* box = addPage( i18n("SQL Settings"), "", BarIcon("connect_no") ); + TQVBoxLayout* tqlayout = new TQVBoxLayout( box, 6, 6 ); + TQSpacerItem* spacer = new TQSpacerItem( 0, 0, TQSizePolicy::Expanding, TQSizePolicy::Expanding ); sqlwidget = new SqlWidget( false, box, "sqlwidget" ); - layout->addWidget( sqlwidget ); - layout->addItem( spacer ); + tqlayout->addWidget( sqlwidget ); + tqlayout->addItem( spacer ); } void ConfigDialog::setupTab2() { labelprinterdata* lb = PrinterSettings::getInstance()->getData(); - QFrame* box = addPage( i18n("Print Settings"), "", BarIcon("fileprint") ); + TQFrame* box = addPage( i18n("Print Settings"), "", BarIcon("fileprint") ); - QVBoxLayout* tabLayout = new QVBoxLayout( box, 11, 6 ); - QHBoxLayout* Layout0 = new QHBoxLayout( 0, 6, 6 ); - QHBoxLayout* Layout1 = new QHBoxLayout( 0, 6, 6 ); - QSpacerItem* spacer = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Expanding ); + TQVBoxLayout* tabLayout = new TQVBoxLayout( box, 11, 6 ); + TQHBoxLayout* Layout0 = new TQHBoxLayout( 0, 6, 6 ); + TQHBoxLayout* Layout1 = new TQHBoxLayout( 0, 6, 6 ); + TQSpacerItem* spacer = new TQSpacerItem( 0, 0, TQSizePolicy::Expanding, TQSizePolicy::Expanding ); printerQuality = new KComboBox( false, box ); printerQuality->insertItem( i18n("Medium Resolution (300dpi)") ); @@ -107,9 +107,9 @@ void ConfigDialog::setupTab2() PrinterSettings::getInstance()->insertPageFormat( pageFormat ); pageFormat->setCurrentItem( lb->format ); - Layout0->addWidget( new QLabel( i18n("Printer Resolution:"), box ) ); + Layout0->addWidget( new TQLabel( i18n("Printer Resolution:"), box ) ); Layout0->addWidget( printerQuality ); - Layout1->addWidget( new QLabel( i18n("Preview Page Format:"), box ) ); + Layout1->addWidget( new TQLabel( i18n("Preview Page Format:"), box ) ); Layout1->addWidget( pageFormat ); tabLayout->addLayout( Layout0 ); tabLayout->addLayout( Layout1 ); @@ -120,37 +120,37 @@ void ConfigDialog::setupTab3() { labelprinterdata* lb = PrinterSettings::getInstance()->getData(); - QFrame* box = addPage( i18n("Import"), "", BarIcon("fileimport") ); - QGridLayout* grid = new QGridLayout( box, 2, 2 ); + TQFrame* box = addPage( i18n("Import"), "", BarIcon("fileimport") ); + TQGridLayout* grid = new TQGridLayout( box, 2, 2 ); - QLabel* label = new QLabel( box ); + TQLabel* label = new TQLabel( box ); label->setText( i18n("Comment:") ); grid->addWidget( label, 0, 0 ); comment = new KLineEdit( lb->comment, box ); grid->addWidget( comment, 0, 1 ); - label = new QLabel( box ); + label = new TQLabel( box ); label->setText( i18n( "Separator:" ) ); grid->addWidget( label, 1, 0 ); separator = new KLineEdit( lb->separator, box ); grid->addWidget( separator, 1, 1 ); - label = new QLabel( box ); + label = new TQLabel( box ); label->setText( i18n("Quote Character:") ); grid->addWidget( label, 2, 0 ); quote = new KLineEdit( lb->quote, box ); grid->addWidget( quote, 2, 1 ); - checkUseCustomNo = new QCheckBox( i18n("&Use customer article no. for import"), box ); + checkUseCustomNo = new TQCheckBox( i18n("&Use customer article no. for import"), box ); checkUseCustomNo->setChecked( lb->useCustomNo ); grid->addMultiCellWidget( checkUseCustomNo, 3, 3, 0, 2 ); - QHBoxLayout* Layout1 = new QHBoxLayout( 0, 6, 6 ); - Layout1->addWidget( new QLabel( i18n("File Format:"), box ) ); + TQHBoxLayout* Layout1 = new TQHBoxLayout( 0, 6, 6 ); + Layout1->addWidget( new TQLabel( i18n("File Format:"), box ) ); combo1 = new KComboBox( box ); combo1->insertItem( i18n("Quantity") ); @@ -171,7 +171,7 @@ void ConfigDialog::setupTab3() Layout1->addWidget( combo3 ); grid->addMultiCellLayout( Layout1, 4, 4, 0, 2 ); - QSpacerItem* spacer = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum ); + TQSpacerItem* spacer = new TQSpacerItem( 0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); grid->addItem( spacer, 5, 0 ); KConfig* config = kapp->config(); @@ -183,16 +183,16 @@ void ConfigDialog::setupTab3() void ConfigDialog::setupTab4() { - QFrame* box = addPage( i18n("Label Editor"), "", BarIcon("kbarcode") ); - QGridLayout* tabLayout = new QGridLayout( box, 11, 6 ); + TQFrame* box = addPage( i18n("Label Editor"), "", BarIcon("kbarcode") ); + TQGridLayout* tabLayout = new TQGridLayout( box, 11, 6 ); - checkNewDlg = new QCheckBox( box ); + checkNewDlg = new TQCheckBox( box ); checkNewDlg->setText( i18n("&Create a new label on startup") ); date = new KLineEdit( box ); - labelDate = new QLabel( box ); + labelDate = new TQLabel( box ); - connect( date, SIGNAL( textChanged( const QString & ) ), this, SLOT( updateDatePreview() ) ); + connect( date, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SLOT( updateDatePreview() ) ); spinGrid = new KIntNumInput( 0, box ); spinGrid->setLabel( i18n("Grid:" ), AlignLeft | AlignVCenter ); @@ -202,9 +202,9 @@ void ConfigDialog::setupTab4() tabLayout->addWidget( checkNewDlg, 0, 0 ); tabLayout->addMultiCellWidget( spinGrid, 1, 1, 0, 2 ); - tabLayout->addWidget( new QLabel( i18n("Grid Color:"), box ), 2, 0 ); + tabLayout->addWidget( new TQLabel( i18n("Grid Color:"), box ), 2, 0 ); tabLayout->addWidget( colorGrid, 2, 1 ); - tabLayout->addWidget( new QLabel( i18n("Date Format:"), box ), 3, 0 ); + tabLayout->addWidget( new TQLabel( i18n("Date Format:"), box ), 3, 0 ); tabLayout->addWidget( date, 3, 1 ); tabLayout->addWidget( labelDate, 3, 2 ); } @@ -212,17 +212,17 @@ void ConfigDialog::setupTab4() void ConfigDialog::setupTab5() { labelprinterdata* lb = PrinterSettings::getInstance()->getData(); - QFrame* box = addPage( i18n("On New"), "", BarIcon("filenew") ); + TQFrame* box = addPage( i18n("On New"), "", BarIcon("filenew") ); - QVBoxLayout* tabLayout = new QVBoxLayout( box, 11, 6 ); + TQVBoxLayout* tabLayout = new TQVBoxLayout( box, 11, 6 ); - QButtonGroup* bg = new QButtonGroup( i18n("On New Article"), box ); + TQButtonGroup* bg = new TQButtonGroup( i18n("On New Article"), box ); bg->setColumnLayout(0, Qt::Vertical ); - bg->layout()->setSpacing( 6 ); - bg->layout()->setMargin( 11 ); - QGridLayout* bgLayout = new QGridLayout( bg->layout() ); + bg->tqlayout()->setSpacing( 6 ); + bg->tqlayout()->setMargin( 11 ); + TQGridLayout* bgLayout = new TQGridLayout( bg->tqlayout() ); - QStringList alist, glist; + TQStringList alist, glist; alist.append( i18n("No Line Break") ); alist.append( i18n("Line Break") ); alist.append( i18n("Insert Label X") ); @@ -247,21 +247,21 @@ void ConfigDialog::setupTab5() bgLayout->setColStretch( 1, 3 ); - bgLayout->addWidget( new QLabel( "1.", bg ), 0, 0 ); - bgLayout->addWidget( new QLabel( "2.", bg ), 1, 0 ); - bgLayout->addWidget( new QLabel( "3.", bg ), 2, 0 ); - bgLayout->addWidget( new QLabel( "4.", bg ), 3, 0 ); + bgLayout->addWidget( new TQLabel( "1.", bg ), 0, 0 ); + bgLayout->addWidget( new TQLabel( "2.", bg ), 1, 0 ); + bgLayout->addWidget( new TQLabel( "3.", bg ), 2, 0 ); + bgLayout->addWidget( new TQLabel( "4.", bg ), 3, 0 ); bgLayout->addWidget( onNewArticle1, 0, 1 ); bgLayout->addWidget( onNewArticle2, 1, 1 ); bgLayout->addWidget( onNewArticle3, 2, 1 ); bgLayout->addWidget( onNewArticle4, 3, 1 ); - QButtonGroup* bg2 = new QButtonGroup( i18n("On New Group"), box ); + TQButtonGroup* bg2 = new TQButtonGroup( i18n("On New Group"), box ); bg2->setColumnLayout(0, Qt::Vertical ); - bg2->layout()->setSpacing( 6 ); - bg2->layout()->setMargin( 11 ); - QGridLayout* bg2Layout = new QGridLayout( bg2->layout() ); + bg2->tqlayout()->setSpacing( 6 ); + bg2->tqlayout()->setMargin( 11 ); + TQGridLayout* bg2Layout = new TQGridLayout( bg2->tqlayout() ); onNewGroup1 = new KComboBox( false, bg2 ); onNewGroup2 = new KComboBox( false, bg2 ); @@ -275,10 +275,10 @@ void ConfigDialog::setupTab5() bg2Layout->setColStretch( 1, 3 ); - bg2Layout->addWidget( new QLabel( "1.", bg2 ), 0, 0 ); - bg2Layout->addWidget( new QLabel( "2.", bg2 ), 1, 0 ); - bg2Layout->addWidget( new QLabel( "3.", bg2 ), 2, 0 ); - bg2Layout->addWidget( new QLabel( "4.", bg2 ), 3, 0 ); + bg2Layout->addWidget( new TQLabel( "1.", bg2 ), 0, 0 ); + bg2Layout->addWidget( new TQLabel( "2.", bg2 ), 1, 0 ); + bg2Layout->addWidget( new TQLabel( "3.", bg2 ), 2, 0 ); + bg2Layout->addWidget( new TQLabel( "4.", bg2 ), 3, 0 ); bg2Layout->addWidget( onNewGroup1, 0, 1 ); bg2Layout->addWidget( onNewGroup2, 1, 1 ); @@ -340,12 +340,12 @@ void ConfigDialog::accept() break; } - QDialog::accept(); + TQDialog::accept(); } void ConfigDialog::updateDatePreview() { - labelDate->setText( i18n("Preview: ") + QDateTime::currentDateTime().toString( date->text() ) ); + labelDate->setText( i18n("Preview: ") + TQDateTime::tqcurrentDateTime().toString( date->text() ) ); } #include "configdialog.moc" |