summaryrefslogtreecommitdiffstats
path: root/kbarcode/confwizard.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/confwizard.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/confwizard.cpp')
-rw-r--r--kbarcode/confwizard.cpp86
1 files changed, 43 insertions, 43 deletions
diff --git a/kbarcode/confwizard.cpp b/kbarcode/confwizard.cpp
index 7809c6c..fff2fb1 100644
--- a/kbarcode/confwizard.cpp
+++ b/kbarcode/confwizard.cpp
@@ -20,15 +20,15 @@
#include "printersettings.h"
#include "dsmainwindow.h"
-// Qt includes
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qcursor.h>
-#include <qlayout.h>
-#include <qsqldatabase.h>
-#include <qradiobutton.h>
-#include <qprinter.h>
-#include <qtextbrowser.h>
+// TQt includes
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqcursor.h>
+#include <tqlayout.h>
+#include <tqsqldatabase.h>
+#include <tqradiobutton.h>
+#include <tqprinter.h>
+#include <tqtextbrowser.h>
// KDE includes
#include <kapplication.h>
@@ -53,8 +53,8 @@ const char* description = I18N_NOOP(
"replacement for the creation of barcodes. All major types of barcodes "
"like EAN, UPC, CODE39 and ISBN are supported." );
-ConfWizard::ConfWizard( QWidget* parent, const char* name, bool modal )
- : KWizard( parent, name, modal )
+ConfWizard::ConfWizard( TQWidget* tqparent, const char* name, bool modal )
+ : KWizard( tqparent, name, modal )
{
setCaption( i18n( "Configure KBarcode" ) );
@@ -66,9 +66,9 @@ ConfWizard::ConfWizard( QWidget* parent, const char* name, bool modal )
setNextEnabled( page_2, false );
helpButton()->hide();
- connect( buttonCreate, SIGNAL( clicked() ), this, SLOT( create() ) );
- connect( buttonExample, SIGNAL( clicked() ), this, SLOT( example() ) );
- connect( checkDatabase, SIGNAL( clicked() ), this, SLOT( useDatabase() ) );
+ connect( buttonCreate, TQT_SIGNAL( clicked() ), this, TQT_SLOT( create() ) );
+ connect( buttonExample, TQT_SIGNAL( clicked() ), this, TQT_SLOT( example() ) );
+ connect( checkDatabase, TQT_SIGNAL( clicked() ), this, TQT_SLOT( useDatabase() ) );
}
ConfWizard::~ConfWizard()
@@ -83,21 +83,21 @@ void ConfWizard::accept()
void ConfWizard::setupPage1()
{
- page = new QWidget( this, "page" );
- pageLayout = new QVBoxLayout( page, 11, 6, "pageLayout");
+ page = new TQWidget( this, "page" );
+ pageLayout = new TQVBoxLayout( page, 11, 6, "pageLayout");
- Layout8 = new QHBoxLayout( 0, 0, 6, "Layout8");
+ Layout8 = new TQHBoxLayout( 0, 0, 6, "Layout8");
- Layout7 = new QVBoxLayout( 0, 0, 6, "Layout7");
+ Layout7 = new TQVBoxLayout( 0, 0, 6, "Layout7");
- logo = new QLabel( page, "logo" );
+ logo = new TQLabel( page, "logo" );
logo->setPixmap( locate("data", "kbarcode/logo.png") );
- QSpacerItem* spacer = new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ TQSpacerItem* spacer = new TQSpacerItem( 0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
pageLayout->addWidget( logo );
Layout7->addItem( spacer );
Layout8->addLayout( Layout7 );
- TextLabel2_2 = new QLabel( page, "TextLabel2_2" );
+ TextLabel2_2 = new TQLabel( page, "TextLabel2_2" );
TextLabel2_2->setText( i18n( "<qt><h1>Welcome to KBarcode</h1><br><br>") +
i18n( description ) + "</qt>" );
Layout8->addWidget( TextLabel2_2 );
@@ -113,10 +113,10 @@ void ConfWizard::setupPage1()
void ConfWizard::setupPage0()
{
- QWidget* page_0 = new QWidget( this, "page_0" );
- QVBoxLayout* pageLayout = new QVBoxLayout( page_0, 11, 6, "pageLayout");
+ TQWidget* page_0 = new TQWidget( this, "page_0" );
+ TQVBoxLayout* pageLayout = new TQVBoxLayout( page_0, 11, 6, "pageLayout");
- QTextBrowser* b = new QTextBrowser( page_0, "b" );
+ TQTextBrowser* b = new TQTextBrowser( page_0, "b" );
b->setText( DSMainWindow::systemCheck() );
pageLayout->addWidget( b );
@@ -126,17 +126,17 @@ void ConfWizard::setupPage0()
void ConfWizard::setupPage2()
{
- page_2 = new QWidget( this, "page_2" );
- pageLayout_2 = new QVBoxLayout( page_2, 11, 6, "pageLayout_2");
+ page_2 = new TQWidget( this, "page_2" );
+ pageLayout_2 = new TQVBoxLayout( page_2, 11, 6, "pageLayout_2");
- checkDatabase = new QCheckBox( page_2 );
+ checkDatabase = new TQCheckBox( page_2 );
checkDatabase->setText( i18n("&Use database with KBarcode") );
checkDatabase->setChecked( true );
sqlwidget = new SqlWidget( true, page_2, "sqlwidget" );
- connect( sqlwidget, SIGNAL( databaseWorking( bool ) ), this, SLOT( testSettings( bool ) ) );
+ connect( sqlwidget, TQT_SIGNAL( databaseWorking( bool ) ), this, TQT_SLOT( testSettings( bool ) ) );
- QSpacerItem* spacer_5 = new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ TQSpacerItem* spacer_5 = new TQSpacerItem( 0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
pageLayout_2->addWidget( checkDatabase );
pageLayout_2->addWidget( sqlwidget );
pageLayout_2->addItem( spacer_5 );
@@ -146,15 +146,15 @@ void ConfWizard::setupPage2()
void ConfWizard::setupPage3()
{
- page_3 = new QWidget( this, "page_3" );
- pageLayout_3 = new QVBoxLayout( page_3, 11, 6, "pageLayout_3");
+ page_3 = new TQWidget( this, "page_3" );
+ pageLayout_3 = new TQVBoxLayout( page_3, 11, 6, "pageLayout_3");
- TextLabel1_2 = new QLabel( page_3, "TextLabel1_2" );
+ TextLabel1_2 = new TQLabel( page_3, "TextLabel1_2" );
TextLabel1_2->setText( i18n( "KBarcode can create the required SQL tables for you.<br>KBarcode will add also some Label Definitions to the tables.<br>After that you can fill the tables with some example data." ) );
- TextLabel1_2->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) );
+ TextLabel1_2->tqsetAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) );
pageLayout_3->addWidget( TextLabel1_2 );
- Layout5_2 = new QVBoxLayout( 0, 0, 6, "Layout5_2");
+ Layout5_2 = new TQVBoxLayout( 0, 0, 6, "Layout5_2");
buttonCreate = new KPushButton( page_3, "buttonCreate" );
buttonCreate->setText( i18n( "&Create Tables" ) );
@@ -164,7 +164,7 @@ void ConfWizard::setupPage3()
buttonExample->setEnabled( FALSE );
buttonExample->setText( i18n( "&Add Example Data" ) );
Layout5_2->addWidget( buttonExample );
- QSpacerItem* spacer_6 = new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ TQSpacerItem* spacer_6 = new TQSpacerItem( 0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
Layout5_2->addItem( spacer_6 );
pageLayout_3->addLayout( Layout5_2 );
addPage( page_3, i18n( "Create Tables" ) );
@@ -177,7 +177,7 @@ void ConfWizard::testSettings( bool b )
void ConfWizard::create()
{
- KApplication::setOverrideCursor( Qt::WaitCursor );
+ KApplication::setOverrideCursor( TQt::WaitCursor );
if(!SqlTables::getInstance()->newTables( sqlwidget->username(), sqlwidget->password(), sqlwidget->hostname(), sqlwidget->database(), sqlwidget->driver() ) )
{
KApplication::restoreOverrideCursor();
@@ -186,7 +186,7 @@ void ConfWizard::create()
else
KApplication::restoreOverrideCursor();
- QSqlDatabase* db = QSqlDatabase::addDatabase( sqlwidget->driver() );
+ TQSqlDatabase* db = TQSqlDatabase::addDatabase( sqlwidget->driver() );
db->setDatabaseName( sqlwidget->database() );
db->setUserName( sqlwidget->username() );
db->setPassword( sqlwidget->password() );
@@ -197,7 +197,7 @@ void ConfWizard::create()
db->lastError().databaseText() + "</qt>" );
if( db->open() ) {
- KApplication::setOverrideCursor( Qt::WaitCursor );
+ KApplication::setOverrideCursor( TQt::WaitCursor );
SqlTables::getInstance()->importData(
locate("appdata", "labeldefinitions.sql"), db );
buttonExample->setEnabled( true );
@@ -209,7 +209,7 @@ void ConfWizard::create()
void ConfWizard::example()
{
- QSqlDatabase* db = QSqlDatabase::addDatabase( sqlwidget->driver() );
+ TQSqlDatabase* db = TQSqlDatabase::addDatabase( sqlwidget->driver() );
db->setDatabaseName( sqlwidget->database() );
db->setUserName( sqlwidget->username() );
db->setPassword( sqlwidget->password() );
@@ -227,15 +227,15 @@ void ConfWizard::example()
db->close();
}
-void ConfWizard::showPage( QWidget* page )
+void ConfWizard::showPage( TQWidget* page )
{
- QWizard::showPage(page);
+ TQWizard::showPage(page);
if( page == page_2 && !sqlwidget->driverCount() ) {
KMessageBox::information( this, i18n(
- "There are no Qt SQL drivers installed. "
+ "There are no TQt SQL drivers installed. "
"KBarcode needs those drivers to access the different SQL databases. "
- "This drivers are part of the Qt Source distribution and should also be part of "
+ "This drivers are part of the TQt Source distribution and should also be part of "
"your distribution. Please install them first.") );
}