summaryrefslogtreecommitdiffstats
path: root/kspread/dialogs/kspread_dlg_database.cc
diff options
context:
space:
mode:
Diffstat (limited to 'kspread/dialogs/kspread_dlg_database.cc')
-rw-r--r--kspread/dialogs/kspread_dlg_database.cc436
1 files changed, 218 insertions, 218 deletions
diff --git a/kspread/dialogs/kspread_dlg_database.cc b/kspread/dialogs/kspread_dlg_database.cc
index ca64eb0b..1bca7c85 100644
--- a/kspread/dialogs/kspread_dlg_database.cc
+++ b/kspread/dialogs/kspread_dlg_database.cc
@@ -34,38 +34,38 @@
#include <knumvalidator.h>
#include <kpushbutton.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qframe.h>
-#include <qheader.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qsqldatabase.h>
-#include <qsqlerror.h>
-#include <qsqlfield.h>
-#include <qsqlquery.h>
-#include <qsqlrecord.h>
-#include <qtextedit.h>
-#include <qtooltip.h>
-#include <qvariant.h>
-#include <qwhatsthis.h>
-#include <qwidget.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqframe.h>
+#include <tqheader.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqsqldatabase.h>
+#include <tqsqlerror.h>
+#include <tqsqlfield.h>
+#include <tqsqlquery.h>
+#include <tqsqlrecord.h>
+#include <tqtextedit.h>
+#include <tqtooltip.h>
+#include <tqvariant.h>
+#include <tqwhatsthis.h>
+#include <tqwidget.h>
using namespace KSpread;
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
/********************************************************
* Database wizard *
********************************************************/
-DatabaseDialog::DatabaseDialog( View * parent, QRect const & rect, const char * name, bool modal, WFlags fl )
- : KWizard( (QWidget *) parent, name, modal, fl ),
+DatabaseDialog::DatabaseDialog( View * tqparent, TQRect const & rect, const char * name, bool modal, WFlags fl )
+ : KWizard( (TQWidget *) tqparent, name, modal, fl ),
m_currentPage( eDatabase ),
- m_pView( parent ),
+ m_pView( tqparent ),
m_targetRect( rect ),
m_dbConnection( 0L )
{
@@ -76,103 +76,103 @@ DatabaseDialog::DatabaseDialog( View * parent, QRect const & rect, const char *
// database page
- m_database = new QWidget( this, "m_database" );
- m_databaseLayout = new QGridLayout( m_database, 1, 1, -1, -1, "m_databaseLayout");
+ m_database = new TQWidget( this, "m_database" );
+ m_databaseLayout = new TQGridLayout( m_database, 1, 1, -1, -1, "m_databaseLayout");
- QFrame * Frame5 = new QFrame( m_database, "Frame5" );
- Frame5->setFrameShape( QFrame::MShape );
- Frame5->setFrameShadow( QFrame::MShadow );
- QVBoxLayout * Frame5Layout = new QVBoxLayout( Frame5, 11, 6, "Frame5Layout");
+ TQFrame * Frame5 = new TQFrame( m_database, "Frame5" );
+ Frame5->setFrameShape( TQFrame::MShape );
+ Frame5->setFrameShadow( TQFrame::MShadow );
+ TQVBoxLayout * Frame5Layout = new TQVBoxLayout( Frame5, 11, 6, "Frame5Layout");
- QFrame * Frame16 = new QFrame( Frame5, "Frame16" );
- Frame16->setFrameShape( QFrame::NoFrame );
- Frame16->setFrameShadow( QFrame::Plain );
- QGridLayout * Frame16Layout = new QGridLayout( Frame16, 1, 1, 11, 7, "Frame16Layout");
+ TQFrame * Frame16 = new TQFrame( Frame5, "Frame16" );
+ Frame16->setFrameShape( TQFrame::NoFrame );
+ Frame16->setFrameShadow( TQFrame::Plain );
+ TQGridLayout * Frame16Layout = new TQGridLayout( Frame16, 1, 1, 11, 7, "Frame16Layout");
- m_Type = new QLabel( Frame16, "m_Type" );
+ m_Type = new TQLabel( Frame16, "m_Type" );
m_Type->setText( i18n( "Type:" ) );
Frame16Layout->addWidget( m_Type, 0, 0 );
- QLabel * TextLabel4 = new QLabel( Frame16, "TextLabel4" );
+ TQLabel * TextLabel4 = new TQLabel( Frame16, "TextLabel4" );
TextLabel4->setText( i18n( "User name:\n"
"(if necessary)" ) );
Frame16Layout->addWidget( TextLabel4, 4, 0 );
- QLabel * TextLabel2 = new QLabel( Frame16, "TextLabel2" );
+ TQLabel * TextLabel2 = new TQLabel( Frame16, "TextLabel2" );
TextLabel2->setText( i18n( "Host:" ) );
Frame16Layout->addWidget( TextLabel2, 2, 0 );
- m_driver = new QComboBox( FALSE, Frame16, "m_driver" );
+ m_driver = new TQComboBox( FALSE, Frame16, "m_driver" );
Frame16Layout->addWidget( m_driver, 0, 1 );
- m_username = new QLineEdit( Frame16, "m_username" );
+ m_username = new TQLineEdit( Frame16, "m_username" );
Frame16Layout->addWidget( m_username, 4, 1 );
- m_host = new QLineEdit( Frame16, "m_host" );
+ m_host = new TQLineEdit( Frame16, "m_host" );
m_host->setText("localhost");
Frame16Layout->addWidget( m_host, 2, 1 );
- QLabel * TextLabel3 = new QLabel( Frame16, "TextLabel3" );
+ TQLabel * TextLabel3 = new TQLabel( Frame16, "TextLabel3" );
TextLabel3->setText( i18n( "Port:\n(if necessary)") );
Frame16Layout->addWidget( TextLabel3, 3, 0 );
- m_password = new QLineEdit( Frame16, "m_password" );
- m_password->setEchoMode( QLineEdit::Password );
+ m_password = new TQLineEdit( Frame16, "m_password" );
+ m_password->setEchoMode( TQLineEdit::Password );
Frame16Layout->addWidget( m_password, 5, 1 );
- m_port = new QLineEdit( Frame16, "m_port" );
+ m_port = new TQLineEdit( Frame16, "m_port" );
m_port->setValidator( new KIntValidator( m_port ) );
Frame16Layout->addWidget( m_port, 3, 1 );
- QLabel * dbName = new QLabel( Frame16, "dbName" );
+ TQLabel * dbName = new TQLabel( Frame16, "dbName" );
dbName->setText( i18n( "Database name: ") );
Frame16Layout->addWidget( dbName, 1, 0 );
- m_databaseName = new QLineEdit( Frame16, "m_databaseName" );
+ m_databaseName = new TQLineEdit( Frame16, "m_databaseName" );
Frame16Layout->addWidget( m_databaseName, 1, 1 );
- QLabel * TextLabel5 = new QLabel( Frame16, "TextLabel5" );
+ TQLabel * TextLabel5 = new TQLabel( Frame16, "TextLabel5" );
TextLabel5->setText( i18n( "Password:\n"
"(if necessary)" ) );
Frame16Layout->addWidget( TextLabel5, 5, 0 );
Frame5Layout->addWidget( Frame16 );
- m_databaseStatus = new QLabel( Frame5, "m_databaseStatus" );
- m_databaseStatus->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)5, 0, 0, m_databaseStatus->sizePolicy().hasHeightForWidth() ) );
- m_databaseStatus->setMaximumSize( QSize( 32767, 30 ) );
- m_databaseStatus->setText( " " );
- Frame5Layout->addWidget( m_databaseStatus );
+ m_databasetqStatus = new TQLabel( Frame5, "m_databasetqStatus" );
+ m_databasetqStatus->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)5, 0, 0, m_databasetqStatus->sizePolicy().hasHeightForWidth() ) );
+ m_databasetqStatus->setMaximumSize( TQSize( 32767, 30 ) );
+ m_databasetqStatus->setText( " " );
+ Frame5Layout->addWidget( m_databasetqStatus );
m_databaseLayout->addWidget( Frame5, 0, 1 );
- QFrame * Frame17 = new QFrame( m_database, "Frame17" );
- Frame17->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)7, 0, 0, Frame17->sizePolicy().hasHeightForWidth() ) );
- Frame17->setMinimumSize( QSize( 111, 0 ) );
- Frame17->setFrameShape( QFrame::NoFrame );
- Frame17->setFrameShadow( QFrame::Plain );
+ TQFrame * Frame17 = new TQFrame( m_database, "Frame17" );
+ Frame17->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)7, 0, 0, Frame17->sizePolicy().hasHeightForWidth() ) );
+ Frame17->setMinimumSize( TQSize( 111, 0 ) );
+ Frame17->setFrameShape( TQFrame::NoFrame );
+ Frame17->setFrameShadow( TQFrame::Plain );
m_databaseLayout->addWidget( Frame17, 0, 0 );
addPage( m_database, i18n( "Database" ) );
// new page
- m_sheet = new QWidget( this, "m_table" );
- m_sheetLayout = new QGridLayout( m_sheet, 1, 1, 11, 6, "m_tableLayout");
+ m_sheet = new TQWidget( this, "m_table" );
+ m_sheetLayout = new TQGridLayout( m_sheet, 1, 1, 11, 6, "m_tableLayout");
- QFrame * Frame5_2 = new QFrame( m_sheet, "Frame5_2" );
- Frame5_2->setFrameShape( QFrame::MShape );
- Frame5_2->setFrameShadow( QFrame::MShadow );
- QGridLayout * Frame5_2Layout = new QGridLayout( Frame5_2, 1, 1, 11, 6, "Frame5_2Layout");
+ TQFrame * Frame5_2 = new TQFrame( m_sheet, "Frame5_2" );
+ Frame5_2->setFrameShape( TQFrame::MShape );
+ Frame5_2->setFrameShadow( TQFrame::MShadow );
+ TQGridLayout * Frame5_2Layout = new TQGridLayout( Frame5_2, 1, 1, 11, 6, "Frame5_2Layout");
- QHBoxLayout * Layout21 = new QHBoxLayout( 0, 0, 6, "Layout21");
+ TQHBoxLayout * Layout21 = new TQHBoxLayout( 0, 0, 6, "Layout21");
- // QLabel * TextLabel12_2 = new QLabel( Frame5_2, "TextLabel12_2" );
+ // TQLabel * TextLabel12_2 = new TQLabel( Frame5_2, "TextLabel12_2" );
// TextLabel12_2->setText( i18n( "Database:" ) );
// Layout21->addWidget( TextLabel12_2 );
- // m_databaseList = new QComboBox( FALSE, Frame5_2, "m_databaseList" );
+ // m_databaseList = new TQComboBox( FALSE, Frame5_2, "m_databaseList" );
// Layout21->addWidget( m_databaseList );
// m_connectButton = new KPushButton( Frame5_2, "m_connectButton" );
@@ -181,11 +181,11 @@ DatabaseDialog::DatabaseDialog( View * parent, QRect const & rect, const char *
Frame5_2Layout->addLayout( Layout21, 0, 0 );
- m_sheetStatus = new QLabel( Frame5_2, "m_tableStatus" );
- m_sheetStatus->setText( " " );
- Frame5_2Layout->addWidget( m_sheetStatus, 3, 0 );
+ m_sheettqStatus = new TQLabel( Frame5_2, "m_tabletqStatus" );
+ m_sheettqStatus->setText( " " );
+ Frame5_2Layout->addWidget( m_sheettqStatus, 3, 0 );
- m_SelectSheetLabel = new QLabel( Frame5_2, "m_SelectSheetLabel" );
+ m_SelectSheetLabel = new TQLabel( Frame5_2, "m_SelectSheetLabel" );
m_SelectSheetLabel->setText( i18n( "Select tables:" ) );
Frame5_2Layout->addWidget( m_SelectSheetLabel, 1, 0 );
@@ -197,24 +197,24 @@ DatabaseDialog::DatabaseDialog( View * parent, QRect const & rect, const char *
m_sheetLayout->addWidget( Frame5_2, 0, 1 );
- QFrame * Frame17_2 = new QFrame( m_sheet, "Frame17_2" );
- Frame17_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)7, 0, 0, Frame17_2->sizePolicy().hasHeightForWidth() ) );
- Frame17_2->setMinimumSize( QSize( 111, 0 ) );
- Frame17_2->setFrameShape( QFrame::NoFrame );
- Frame17_2->setFrameShadow( QFrame::Plain );
+ TQFrame * Frame17_2 = new TQFrame( m_sheet, "Frame17_2" );
+ Frame17_2->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)7, 0, 0, Frame17_2->sizePolicy().hasHeightForWidth() ) );
+ Frame17_2->setMinimumSize( TQSize( 111, 0 ) );
+ Frame17_2->setFrameShape( TQFrame::NoFrame );
+ Frame17_2->setFrameShadow( TQFrame::Plain );
m_sheetLayout->addWidget( Frame17_2, 0, 0 );
addPage( m_sheet, i18n( "Sheets" ) );
- m_columns = new QWidget( this, "m_columns" );
- m_columnsLayout = new QGridLayout( m_columns, 1, 1, 11, 6, "m_columnsLayout");
+ m_columns = new TQWidget( this, "m_columns" );
+ m_columnsLayout = new TQGridLayout( m_columns, 1, 1, 11, 6, "m_columnsLayout");
- QFrame * Frame5_2_2 = new QFrame( m_columns, "Frame5_2_2" );
- Frame5_2_2->setFrameShape( QFrame::MShape );
- Frame5_2_2->setFrameShadow( QFrame::MShadow );
- QGridLayout * Frame5_2_2Layout = new QGridLayout( Frame5_2_2, 1, 1, 11, 6, "Frame5_2_2Layout");
+ TQFrame * Frame5_2_2 = new TQFrame( m_columns, "Frame5_2_2" );
+ Frame5_2_2->setFrameShape( TQFrame::MShape );
+ Frame5_2_2->setFrameShadow( TQFrame::MShadow );
+ TQGridLayout * Frame5_2_2Layout = new TQGridLayout( Frame5_2_2, 1, 1, 11, 6, "Frame5_2_2Layout");
- QLabel * TextLabel11_2 = new QLabel( Frame5_2_2, "TextLabel11_2" );
+ TQLabel * TextLabel11_2 = new TQLabel( Frame5_2_2, "TextLabel11_2" );
TextLabel11_2->setText( i18n( "Select columns:" ) );
Frame5_2_2Layout->addWidget( TextLabel11_2, 0, 0 );
@@ -227,57 +227,57 @@ DatabaseDialog::DatabaseDialog( View * parent, QRect const & rect, const char *
Frame5_2_2Layout->addWidget( m_columnView, 1, 0 );
- m_columnsStatus = new QLabel( Frame5_2_2, "m_columnsStatus" );
- m_columnsStatus->setText( " " );
- Frame5_2_2Layout->addWidget( m_columnsStatus, 2, 0 );
+ m_columnstqStatus = new TQLabel( Frame5_2_2, "m_columnstqStatus" );
+ m_columnstqStatus->setText( " " );
+ Frame5_2_2Layout->addWidget( m_columnstqStatus, 2, 0 );
m_columnsLayout->addWidget( Frame5_2_2, 0, 1 );
- QFrame * Frame17_3 = new QFrame( m_columns, "Frame17_3" );
- Frame17_3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)7, 0, 0, Frame17_3->sizePolicy().hasHeightForWidth() ) );
- Frame17_3->setMinimumSize( QSize( 111, 0 ) );
- Frame17_3->setFrameShape( QFrame::NoFrame );
- Frame17_3->setFrameShadow( QFrame::Plain );
+ TQFrame * Frame17_3 = new TQFrame( m_columns, "Frame17_3" );
+ Frame17_3->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)7, 0, 0, Frame17_3->sizePolicy().hasHeightForWidth() ) );
+ Frame17_3->setMinimumSize( TQSize( 111, 0 ) );
+ Frame17_3->setFrameShape( TQFrame::NoFrame );
+ Frame17_3->setFrameShadow( TQFrame::Plain );
m_columnsLayout->addWidget( Frame17_3, 0, 0 );
addPage( m_columns, i18n( "Columns" ) );
// options page
- m_options = new QWidget( this, "m_options" );
- m_optionsLayout = new QGridLayout( m_options, 1, 1, 11, 6, "m_optionsLayout");
+ m_options = new TQWidget( this, "m_options" );
+ m_optionsLayout = new TQGridLayout( m_options, 1, 1, 11, 6, "m_optionsLayout");
- QFrame * optionsFrame = new QFrame( m_options, "optionsFrame" );
- optionsFrame->setFrameShape( QFrame::MShape );
- optionsFrame->setFrameShadow( QFrame::MShadow );
- QGridLayout * optionsFrameLayout = new QGridLayout( optionsFrame, 1, 1, 11, 6, "optionsFrameLayout");
+ TQFrame * optionsFrame = new TQFrame( m_options, "optionsFrame" );
+ optionsFrame->setFrameShape( TQFrame::MShape );
+ optionsFrame->setFrameShadow( TQFrame::MShadow );
+ TQGridLayout * optionsFrameLayout = new TQGridLayout( optionsFrame, 1, 1, 11, 6, "optionsFrameLayout");
- m_columns_1 = new QComboBox( false, optionsFrame, "m_columns_1" );
+ m_columns_1 = new TQComboBox( false, optionsFrame, "m_columns_1" );
optionsFrameLayout->addWidget( m_columns_1, 2, 0 );
- m_operatorValue_2 = new QLineEdit( optionsFrame, "m_operatorValue_2" );
+ m_operatorValue_2 = new TQLineEdit( optionsFrame, "m_operatorValue_2" );
optionsFrameLayout->addWidget( m_operatorValue_2, 3, 2 );
- m_andBox = new QRadioButton( optionsFrame, "m_andBox" );
+ m_andBox = new TQRadioButton( optionsFrame, "m_andBox" );
m_andBox->setText( i18n( "Match all of the following (AND)" ) );
m_andBox->setChecked( true );
optionsFrameLayout->addMultiCellWidget( m_andBox, 0, 0, 0, 2 );
- m_orBox = new QRadioButton( optionsFrame, "m_orBox" );
+ m_orBox = new TQRadioButton( optionsFrame, "m_orBox" );
m_orBox->setText( i18n( "Match any of the following (OR)" ) );
optionsFrameLayout->addMultiCellWidget( m_orBox, 1, 1, 0, 2 );
- m_operatorValue_1 = new QLineEdit( optionsFrame, "m_operatorValue" );
+ m_operatorValue_1 = new TQLineEdit( optionsFrame, "m_operatorValue" );
optionsFrameLayout->addWidget( m_operatorValue_1, 2, 2 );
- m_columns_2 = new QComboBox( FALSE, optionsFrame, "m_columns_2" );
+ m_columns_2 = new TQComboBox( FALSE, optionsFrame, "m_columns_2" );
optionsFrameLayout->addWidget( m_columns_2, 3, 0 );
- m_operatorValue_3 = new QLineEdit( optionsFrame, "m_operatorValue_3" );
+ m_operatorValue_3 = new TQLineEdit( optionsFrame, "m_operatorValue_3" );
optionsFrameLayout->addWidget( m_operatorValue_3, 4, 2 );
- m_operator_1 = new QComboBox( FALSE, optionsFrame, "m_operator_1" );
+ m_operator_1 = new TQComboBox( FALSE, optionsFrame, "m_operator_1" );
m_operator_1->insertItem( i18n( "equals" ) );
m_operator_1->insertItem( i18n( "not equal" ) );
m_operator_1->insertItem( i18n( "in" ) );
@@ -290,7 +290,7 @@ DatabaseDialog::DatabaseDialog( View * parent, QRect const & rect, const char *
optionsFrameLayout->addWidget( m_operator_1, 2, 1 );
- m_operator_2 = new QComboBox( FALSE, optionsFrame, "m_operator_2" );
+ m_operator_2 = new TQComboBox( FALSE, optionsFrame, "m_operator_2" );
m_operator_2->insertItem( i18n( "equals" ) );
m_operator_2->insertItem( i18n( "not equal" ) );
m_operator_2->insertItem( i18n( "in" ) );
@@ -301,7 +301,7 @@ DatabaseDialog::DatabaseDialog( View * parent, QRect const & rect, const char *
optionsFrameLayout->addWidget( m_operator_2, 3, 1 );
- m_operator_3 = new QComboBox( FALSE, optionsFrame, "m_operator_3" );
+ m_operator_3 = new TQComboBox( FALSE, optionsFrame, "m_operator_3" );
m_operator_3->insertItem( i18n( "equals" ) );
m_operator_3->insertItem( i18n( "not equal" ) );
m_operator_3->insertItem( i18n( "in" ) );
@@ -312,88 +312,88 @@ DatabaseDialog::DatabaseDialog( View * parent, QRect const & rect, const char *
optionsFrameLayout->addWidget( m_operator_3, 4, 1 );
- m_columns_3 = new QComboBox( false, optionsFrame, "m_columns_3" );
+ m_columns_3 = new TQComboBox( false, optionsFrame, "m_columns_3" );
optionsFrameLayout->addWidget( m_columns_3, 4, 0 );
- m_distinct = new QCheckBox( optionsFrame, "m_distinct" );
+ m_distinct = new TQCheckBox( optionsFrame, "m_distinct" );
m_distinct->setText( i18n( "Distinct" ) );
optionsFrameLayout->addWidget( m_distinct, 7, 2 );
- QLabel * TextLabel19 = new QLabel( optionsFrame, "TextLabel19" );
+ TQLabel * TextLabel19 = new TQLabel( optionsFrame, "TextLabel19" );
TextLabel19->setText( i18n( "Sorted by" ) );
optionsFrameLayout->addWidget( TextLabel19, 5, 0 );
- m_columnsSort_1 = new QComboBox( false, optionsFrame, "m_columnsSort_1" );
+ m_columnsSort_1 = new TQComboBox( false, optionsFrame, "m_columnsSort_1" );
optionsFrameLayout->addWidget( m_columnsSort_1, 5, 1 );
- m_sortMode_1 = new QComboBox( false, optionsFrame, "m_sortMode_1" );
+ m_sortMode_1 = new TQComboBox( false, optionsFrame, "m_sortMode_1" );
m_sortMode_1->insertItem( i18n( "Ascending" ) );
m_sortMode_1->insertItem( i18n( "Descending" ) );
optionsFrameLayout->addWidget( m_sortMode_1, 5, 2 );
- QLabel * TextLabel19_2 = new QLabel( optionsFrame, "TextLabel19_2" );
+ TQLabel * TextLabel19_2 = new TQLabel( optionsFrame, "TextLabel19_2" );
TextLabel19_2->setText( i18n( "Sorted by" ) );
optionsFrameLayout->addWidget( TextLabel19_2, 6, 0 );
- m_columnsSort_2 = new QComboBox( false, optionsFrame, "m_columnsSort_2" );
+ m_columnsSort_2 = new TQComboBox( false, optionsFrame, "m_columnsSort_2" );
optionsFrameLayout->addWidget( m_columnsSort_2, 6, 1 );
- m_sortMode_2 = new QComboBox( false, optionsFrame, "m_sortMode_2" );
+ m_sortMode_2 = new TQComboBox( false, optionsFrame, "m_sortMode_2" );
m_sortMode_2->insertItem( i18n( "Ascending" ) );
m_sortMode_2->insertItem( i18n( "Descending" ) );
optionsFrameLayout->addWidget( m_sortMode_2, 6, 2 );
- QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ TQSpacerItem* spacer = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
optionsFrameLayout->addItem( spacer, 7, 1 );
- QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ TQSpacerItem* spacer_2 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
optionsFrameLayout->addItem( spacer_2, 7, 0 );
m_optionsLayout->addWidget( optionsFrame, 0, 1 );
- QFrame * Frame17_4 = new QFrame( m_options, "Frame17_4" );
- Frame17_4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)7, 0, 0, Frame17_4->sizePolicy().hasHeightForWidth() ) );
- Frame17_4->setMinimumSize( QSize( 111, 0 ) );
- Frame17_4->setFrameShape( QFrame::NoFrame );
- Frame17_4->setFrameShadow( QFrame::Plain );
+ TQFrame * Frame17_4 = new TQFrame( m_options, "Frame17_4" );
+ Frame17_4->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)7, 0, 0, Frame17_4->sizePolicy().hasHeightForWidth() ) );
+ Frame17_4->setMinimumSize( TQSize( 111, 0 ) );
+ Frame17_4->setFrameShape( TQFrame::NoFrame );
+ Frame17_4->setFrameShadow( TQFrame::Plain );
m_optionsLayout->addWidget( Frame17_4, 0, 0 );
addPage( m_options, i18n( "Query Options" ) );
// result page
- m_result = new QWidget( this, "m_result" );
- m_resultLayout = new QGridLayout( m_result, 1, 1, 11, 6, "m_resultLayout");
+ m_result = new TQWidget( this, "m_result" );
+ m_resultLayout = new TQGridLayout( m_result, 1, 1, 11, 6, "m_resultLayout");
- QFrame * Frame5_2_2_3 = new QFrame( m_result, "Frame5_2_2_3" );
- Frame5_2_2_3->setFrameShape( QFrame::MShape );
- Frame5_2_2_3->setFrameShadow( QFrame::MShadow );
- QGridLayout * Frame5_2_2_3Layout = new QGridLayout( Frame5_2_2_3, 1, 1, 11, 6, "Frame5_2_2_3Layout");
+ TQFrame * Frame5_2_2_3 = new TQFrame( m_result, "Frame5_2_2_3" );
+ Frame5_2_2_3->setFrameShape( TQFrame::MShape );
+ Frame5_2_2_3->setFrameShadow( TQFrame::MShadow );
+ TQGridLayout * Frame5_2_2_3Layout = new TQGridLayout( Frame5_2_2_3, 1, 1, 11, 6, "Frame5_2_2_3Layout");
- QLabel * TextLabel17 = new QLabel( Frame5_2_2_3, "TextLabel17" );
+ TQLabel * TextLabel17 = new TQLabel( Frame5_2_2_3, "TextLabel17" );
TextLabel17->setText( i18n( "SQL query:" ) );
Frame5_2_2_3Layout->addWidget( TextLabel17, 0, 0 );
- m_sqlQuery = new QTextEdit( Frame5_2_2_3, "m_sqlQuery" );
+ m_sqlQuery = new TQTextEdit( Frame5_2_2_3, "m_sqlQuery" );
Frame5_2_2_3Layout->addWidget( m_sqlQuery, 1, 0 );
- QFrame * Frame12 = new QFrame( Frame5_2_2_3, "Frame12" );
- Frame12->setFrameShape( QFrame::StyledPanel );
- Frame12->setFrameShadow( QFrame::Raised );
- QGridLayout * Frame12Layout = new QGridLayout( Frame12, 1, 1, 11, 6, "Frame12Layout");
+ TQFrame * Frame12 = new TQFrame( Frame5_2_2_3, "Frame12" );
+ Frame12->setFrameShape( TQFrame::StyledPanel );
+ Frame12->setFrameShadow( TQFrame::Raised );
+ TQGridLayout * Frame12Layout = new TQGridLayout( Frame12, 1, 1, 11, 6, "Frame12Layout");
- m_startingRegion = new QRadioButton( Frame12, "m_startingRegion" );
+ m_startingRegion = new TQRadioButton( Frame12, "m_startingRegion" );
m_startingRegion->setText( i18n( "Insert in region" ) );
Frame12Layout->addWidget( m_startingRegion, 0, 0 );
- m_cell = new QLineEdit( Frame12, "m_cell" );
+ m_cell = new TQLineEdit( Frame12, "m_cell" );
Frame12Layout->addWidget( m_cell, 1, 1 );
- m_region = new QLineEdit( Frame12, "m_region" );
+ m_region = new TQLineEdit( Frame12, "m_region" );
Frame12Layout->addWidget( m_region, 0, 1 );
- m_startingCell = new QRadioButton( Frame12, "m_startingCell" );
+ m_startingCell = new TQRadioButton( Frame12, "m_startingCell" );
m_startingCell->setText( i18n( "Starting in cell" ) );
m_startingCell->setChecked( TRUE );
Frame12Layout->addWidget( m_startingCell, 1, 0 );
@@ -401,11 +401,11 @@ DatabaseDialog::DatabaseDialog( View * parent, QRect const & rect, const char *
Frame5_2_2_3Layout->addWidget( Frame12, 2, 0 );
m_resultLayout->addWidget( Frame5_2_2_3, 0, 1 );
- QFrame * Frame17_5 = new QFrame( m_result, "Frame17_5" );
- Frame17_5->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)7, 0, 0, Frame17_5->sizePolicy().hasHeightForWidth() ) );
- Frame17_5->setMinimumSize( QSize( 111, 0 ) );
- Frame17_5->setFrameShape( QFrame::NoFrame );
- Frame17_5->setFrameShadow( QFrame::Plain );
+ TQFrame * Frame17_5 = new TQFrame( m_result, "Frame17_5" );
+ Frame17_5->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)7, 0, 0, Frame17_5->sizePolicy().hasHeightForWidth() ) );
+ Frame17_5->setMinimumSize( TQSize( 111, 0 ) );
+ Frame17_5->setFrameShape( TQFrame::NoFrame );
+ Frame17_5->setFrameShadow( TQFrame::Plain );
m_resultLayout->addWidget( Frame17_5, 0, 0 );
addPage( m_result, i18n( "Result" ) );
@@ -413,18 +413,18 @@ DatabaseDialog::DatabaseDialog( View * parent, QRect const & rect, const char *
finishButton()->setEnabled(false);
// signals and slots connections
- connect( m_orBox, SIGNAL( clicked() ), this, SLOT( orBox_clicked() ) );
- connect( m_andBox, SIGNAL( clicked() ), this, SLOT( andBox_clicked() ) );
- connect( m_startingCell, SIGNAL( clicked() ), this, SLOT( startingCell_clicked() ) );
- connect( m_startingRegion, SIGNAL( clicked() ), this, SLOT( startingRegion_clicked() ) );
- connect( m_driver, SIGNAL( activated(int) ), this, SLOT( databaseDriverChanged(int) ) );
- connect( m_host, SIGNAL( textChanged(const QString &) ), this, SLOT( databaseHostChanged(const QString &) ) );
- connect( m_databaseName, SIGNAL( textChanged(const QString &) ), this, SLOT( databaseNameChanged(const QString &) ) );
- connect( m_sheetView, SIGNAL( contextMenuRequested( QListViewItem *, const QPoint &, int ) ),
- this, SLOT( popupSheetViewMenu(QListViewItem *, const QPoint &, int ) ) );
- connect( m_sheetView, SIGNAL( clicked( QListViewItem * ) ), this, SLOT( sheetViewClicked( QListViewItem * ) ) );
-
- QStringList str = QSqlDatabase::drivers();
+ connect( m_orBox, TQT_SIGNAL( clicked() ), this, TQT_SLOT( orBox_clicked() ) );
+ connect( m_andBox, TQT_SIGNAL( clicked() ), this, TQT_SLOT( andBox_clicked() ) );
+ connect( m_startingCell, TQT_SIGNAL( clicked() ), this, TQT_SLOT( startingCell_clicked() ) );
+ connect( m_startingRegion, TQT_SIGNAL( clicked() ), this, TQT_SLOT( startingRegion_clicked() ) );
+ connect( m_driver, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( databaseDriverChanged(int) ) );
+ connect( m_host, TQT_SIGNAL( textChanged(const TQString &) ), this, TQT_SLOT( databaseHostChanged(const TQString &) ) );
+ connect( m_databaseName, TQT_SIGNAL( textChanged(const TQString &) ), this, TQT_SLOT( databaseNameChanged(const TQString &) ) );
+ connect( m_sheetView, TQT_SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint &, int ) ),
+ this, TQT_SLOT( popupSheetViewMenu(TQListViewItem *, const TQPoint &, int ) ) );
+ connect( m_sheetView, TQT_SIGNAL( clicked( TQListViewItem * ) ), this, TQT_SLOT( sheetViewClicked( TQListViewItem * ) ) );
+
+ TQStringList str = TQSqlDatabase::drivers();
m_driver->insertItem("");
m_driver->insertStringList( str );
@@ -439,7 +439,7 @@ DatabaseDialog::DatabaseDialog( View * parent, QRect const & rect, const char *
DatabaseDialog::~DatabaseDialog()
{
- // no need to delete child widgets, Qt does it all for us
+ // no need to delete child widgets, TQt does it all for us
if ( m_dbConnection )
m_dbConnection->close();
}
@@ -579,8 +579,8 @@ void DatabaseDialog::accept()
}
int i;
- QString queryStr;
- QString tmp = m_sqlQuery->text();
+ TQString queryStr;
+ TQString tmp = m_sqlQuery->text();
for ( i = 0; i < (int) tmp.length(); ++i )
{
if ( tmp[i] != '\n' )
@@ -590,7 +590,7 @@ void DatabaseDialog::accept()
}
Cell * cell;
- QSqlQuery query( QString::null, m_dbConnection );
+ TQSqlQuery query( TQString(), m_dbConnection );
// Check the whole query for SQL that might modify database.
// If there is an update command, then it must be at the start of the string,
@@ -598,8 +598,8 @@ void DatabaseDialog::accept()
// An update command must also be followed by a space, or it would be parsed
// as an identifier.
// For sanity, also check that there is a SELECT
- QRegExp couldModifyDB( "(^|[( \\s])(UPDATE|DELETE|INSERT|CREATE) ", false /* cs */ );
- QRegExp couldQueryDB( "(^|[( \\s])(SELECT) ", false /* cs */ );
+ TQRegExp couldModifyDB( "(^|[( \\s])(UPDATE|DELETE|INSERT|CREATE) ", false /* cs */ );
+ TQRegExp couldQueryDB( "(^|[( \\s])(SELECT) ", false /* cs */ );
if (couldModifyDB.search( queryStr ) != -1 || couldQueryDB.search ( queryStr ) == -1 )
{
@@ -647,7 +647,7 @@ void DatabaseDialog::accept()
if ( !m_pView->doc()->undoLocked() )
{
- QRect r(left, top, count, height);
+ TQRect r(left, top, count, height);
UndoInsertData * undo = new UndoInsertData( m_pView->doc(), sheet, r );
m_pView->doc()->addCommand( undo );
}
@@ -692,7 +692,7 @@ void DatabaseDialog::accept()
bool DatabaseDialog::databaseDoNext()
{
- m_dbConnection = QSqlDatabase::addDatabase( m_driver->currentText() );
+ m_dbConnection = TQSqlDatabase::addDatabase( m_driver->currentText() );
if ( m_dbConnection )
{
@@ -717,11 +717,11 @@ bool DatabaseDialog::databaseDoNext()
m_dbConnection->setPort( port );
}
- m_databaseStatus->setText( i18n("Connecting to database...") );
+ m_databasetqStatus->setText( i18n("Connecting to database...") );
if ( m_dbConnection->open() )
{
- m_databaseStatus->setText( i18n("Connected. Retrieving table information...") );
- QStringList sheetList( m_dbConnection->tables() );
+ m_databasetqStatus->setText( i18n("Connected. Retrieving table information...") );
+ TQStringList sheetList( m_dbConnection->tables() );
if ( sheetList.isEmpty() )
{
@@ -734,21 +734,21 @@ bool DatabaseDialog::databaseDoNext()
for ( i = 0; i < sheetList.size(); ++i )
{
- QCheckListItem * item = new QCheckListItem( m_sheetView, sheetList[i],
- QCheckListItem::CheckBox );
+ TQCheckListItem * item = new TQCheckListItem( m_sheetView, sheetList[i],
+ TQCheckListItem::CheckBox );
item->setOn(false);
m_sheetView->insertItem( item );
}
m_sheetView->setEnabled( true );
- m_databaseStatus->setText( " " );
+ m_databasetqStatus->setText( " " );
}
else
{
- QSqlError error = m_dbConnection->lastError();
- QString errorMsg;
- QString err1 = error.driverText();
- QString err2 = error.databaseText();
+ TQSqlError error = m_dbConnection->lastError();
+ TQString errorMsg;
+ TQString err1 = error.driverText();
+ TQString err2 = error.databaseText();
if ( !err1.isEmpty() )
{
errorMsg.append( error.driverText() );
@@ -759,7 +759,7 @@ bool DatabaseDialog::databaseDoNext()
errorMsg.append( error.databaseText() );
errorMsg.append( "\n" );
}
- m_databaseStatus->setText( " " );
+ m_databasetqStatus->setText( " " );
KMessageBox::error( this, errorMsg );
return false;
@@ -768,7 +768,7 @@ bool DatabaseDialog::databaseDoNext()
else
{
KMessageBox::error( this, i18n("Driver could not be loaded") );
- m_databaseStatus->setText( " " );
+ m_databasetqStatus->setText( " " );
return false;
}
setNextEnabled(m_sheet, true);
@@ -778,14 +778,14 @@ bool DatabaseDialog::databaseDoNext()
bool DatabaseDialog::sheetsDoNext()
{
- m_databaseStatus->setText( i18n("Retrieving meta data of tables...") );
- QStringList sheets;
+ m_databasetqStatus->setText( i18n("Retrieving meta data of tables...") );
+ TQStringList sheets;
- for (QListViewItem * item = (QCheckListItem *) m_sheetView->firstChild(); item; item = item->nextSibling())
+ for (TQListViewItem * item = (TQCheckListItem *) m_sheetView->firstChild(); item; item = item->nextSibling())
{
- if (((QCheckListItem * ) item)->isOn())
+ if (((TQCheckListItem * ) item)->isOn())
{
- sheets.append(((QCheckListItem * ) item)->text());
+ sheets.append(((TQCheckListItem * ) item)->text());
}
}
@@ -796,21 +796,21 @@ bool DatabaseDialog::sheetsDoNext()
}
m_columnView->clear();
- QSqlRecord info;
- QCheckListItem * item;
+ TQSqlRecord info;
+ TQCheckListItem * item;
for (int i = 0; i < (int) sheets.size(); ++i)
{
info = m_dbConnection->record( sheets[i] );
for (int j = 0; j < (int) info.count(); ++j)
{
- QString name = info.fieldName(j);
- item = new QCheckListItem( m_columnView, name,
- QCheckListItem::CheckBox );
+ TQString name = info.fieldName(j);
+ item = new TQCheckListItem( m_columnView, name,
+ TQCheckListItem::CheckBox );
item->setOn(false);
m_columnView->insertItem( item );
item->setText( 1, sheets[i] );
- QSqlField * field = info.field(name);
- item->setText( 2, QVariant::typeToName(field->type()) );
+ TQSqlField * field = info.field(name);
+ item->setText( 2, TQVariant::typeToName(field->type()) );
}
}
m_columnView->setSorting(1, true);
@@ -824,12 +824,12 @@ bool DatabaseDialog::sheetsDoNext()
bool DatabaseDialog::columnsDoNext()
{
- QStringList columns;
- for (QListViewItem * item = m_columnView->firstChild(); item; item = item->nextSibling())
+ TQStringList columns;
+ for (TQListViewItem * item = m_columnView->firstChild(); item; item = item->nextSibling())
{
- if (((QCheckListItem * ) item)->isOn())
+ if (((TQCheckListItem * ) item)->isOn())
{
- columns.append( item->text(1) + "." + ((QCheckListItem * ) item)->text());
+ columns.append( item->text(1) + "." + ((TQCheckListItem * ) item)->text());
}
}
@@ -858,11 +858,11 @@ bool DatabaseDialog::columnsDoNext()
}
-QString DatabaseDialog::getWhereCondition(QString const & column,
- QString const & value,
+TQString DatabaseDialog::getWhereCondition(TQString const & column,
+ TQString const & value,
int op)
{
- QString wherePart;
+ TQString wherePart;
switch( op )
{
@@ -908,7 +908,7 @@ QString DatabaseDialog::getWhereCondition(QString const & column,
if ( op != 2 && op != 3 )
{
- QString val;
+ TQString val;
bool ok = false;
value.toDouble(&ok);
@@ -929,7 +929,7 @@ QString DatabaseDialog::getWhereCondition(QString const & column,
}
else // "in" & "not in"
{
- QString val;
+ TQString val;
if (value[0] != '(')
val = "(";
val += value;
@@ -941,21 +941,21 @@ QString DatabaseDialog::getWhereCondition(QString const & column,
return wherePart;
}
-QString DatabaseDialog::exchangeWildcards(QString const & value)
+TQString DatabaseDialog::exchangeWildcards(TQString const & value)
{
- QString str(value);
- int p = str.find('*');
+ TQString str(value);
+ int p = str.tqfind('*');
while ( p > -1 )
{
- str = str.replace( p, 1, "%" );
- p = str.find('*');
+ str = str.tqreplace( p, 1, "%" );
+ p = str.tqfind('*');
}
- p = str.find('?');
+ p = str.tqfind('?');
while ( p > -1 )
{
- str = str.replace( p, 1, "_" );
- p = str.find('?');
+ str = str.tqreplace( p, 1, "_" );
+ p = str.tqfind('?');
}
return str;
}
@@ -964,8 +964,8 @@ bool DatabaseDialog::optionsDoNext()
{
if ( m_operator_1->currentItem() == 4 )
{
- if ( ( m_operatorValue_1->text().find('*') != -1 )
- || ( m_operatorValue_1->text().find('?') != -1 ) )
+ if ( ( m_operatorValue_1->text().tqfind('*') != -1 )
+ || ( m_operatorValue_1->text().tqfind('?') != -1 ) )
{
// xgettext: no-c-format
int res = KMessageBox::warningYesNo( this, i18n("'*' or '?' are not valid wildcards in SQL. "
@@ -978,8 +978,8 @@ bool DatabaseDialog::optionsDoNext()
if ( m_operator_2->currentItem() == 4 )
{
- if ( ( m_operatorValue_2->text().find('*') != -1 )
- || ( m_operatorValue_2->text().find('?') != -1 ) )
+ if ( ( m_operatorValue_2->text().tqfind('*') != -1 )
+ || ( m_operatorValue_2->text().tqfind('?') != -1 ) )
{
// xgettext: no-c-format
int res = KMessageBox::warningYesNo( this, i18n("'*' or '?' are not valid wildcards in SQL. "
@@ -992,8 +992,8 @@ bool DatabaseDialog::optionsDoNext()
if ( m_operator_3->currentItem() == 4 )
{
- if ( ( m_operatorValue_3->text().find('*') != -1 )
- || ( m_operatorValue_3->text().find('?') != -1 ) )
+ if ( ( m_operatorValue_3->text().tqfind('*') != -1 )
+ || ( m_operatorValue_3->text().tqfind('?') != -1 ) )
{
// xgettext: no-c-format
int res = KMessageBox::warningYesNo( this, i18n("'*' or '?' are not valid wildcards in SQL. "
@@ -1004,7 +1004,7 @@ bool DatabaseDialog::optionsDoNext()
}
}
- QString query("SELECT ");
+ TQString query("SELECT ");
if (m_distinct->isChecked())
query += "DISTINCT ";
@@ -1020,16 +1020,16 @@ bool DatabaseDialog::optionsDoNext()
query += "\nFROM ";
- QListViewItem * item = (QCheckListItem *) m_sheetView->firstChild();
+ TQListViewItem * item = (TQCheckListItem *) m_sheetView->firstChild();
bool b = false;
while ( item )
{
- if (((QCheckListItem * ) item)->isOn())
+ if (((TQCheckListItem * ) item)->isOn())
{
if ( b )
query += ", ";
b = true;
- query += ((QCheckListItem * ) item)->text();
+ query += ((TQCheckListItem * ) item)->text();
}
item = item->nextSibling();
}
@@ -1131,7 +1131,7 @@ void DatabaseDialog::connectButton_clicked()
qWarning( "DatabaseDialog::connectButton_clicked(): Not implemented yet!" );
}
-void DatabaseDialog::databaseNameChanged(const QString & s)
+void DatabaseDialog::databaseNameChanged(const TQString & s)
{
if ( !m_driver->currentText().isEmpty() && !s.isEmpty()
&& !m_host->text().isEmpty() )
@@ -1140,7 +1140,7 @@ void DatabaseDialog::databaseNameChanged(const QString & s)
setNextEnabled(m_database, false);
}
-void DatabaseDialog::databaseHostChanged(const QString & s)
+void DatabaseDialog::databaseHostChanged(const TQString & s)
{
if ( !m_driver->currentText().isEmpty() && !s.isEmpty()
&& !m_databaseName->text().isEmpty() )
@@ -1158,16 +1158,16 @@ void DatabaseDialog::databaseDriverChanged(int index)
setNextEnabled(m_database, false);
}
-void DatabaseDialog::popupSheetViewMenu( QListViewItem *, const QPoint &, int )
+void DatabaseDialog::popupSheetViewMenu( TQListViewItem *, const TQPoint &, int )
{
// TODO: popup menu with "Select All", "Inverse selection", "remove selection"
}
-void DatabaseDialog::sheetViewClicked( QListViewItem * )
+void DatabaseDialog::sheetViewClicked( TQListViewItem * )
{
// if ( item )
// {
-// QCheckListItem * i = (QCheckListItem *) item;
+// TQCheckListItem * i = (TQCheckListItem *) item;
// i->setOn( !i->isOn() );
// }
// kdDebug() << "clicked" << endl;
@@ -1176,4 +1176,4 @@ void DatabaseDialog::sheetViewClicked( QListViewItem * )
#include "kspread_dlg_database.moc"
-#endif // QT_NO_SQL
+#endif // TQT_NO_SQL