summaryrefslogtreecommitdiffstats
path: root/kword/mailmerge
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kword/mailmerge
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kword/mailmerge')
-rw-r--r--kword/mailmerge/KWClassicSerialDataSource.cpp244
-rw-r--r--kword/mailmerge/KWClassicSerialDataSource.h85
-rw-r--r--kword/mailmerge/kabc/KWMailMergeKABC.cpp92
-rw-r--r--kword/mailmerge/kabc/KWMailMergeKABC.h39
-rw-r--r--kword/mailmerge/kabc/KWMailMergeKABCConfig.cpp190
-rw-r--r--kword/mailmerge/kabc/KWMailMergeKABCConfig.h33
-rw-r--r--kword/mailmerge/kabc/addresspicker.ui32
-rw-r--r--kword/mailmerge/kspread/kwmailmerge_kspread.cpp40
-rw-r--r--kword/mailmerge/kspread/kwmailmerge_kspread.h19
-rw-r--r--kword/mailmerge/kspread/kwmailmerge_kspread_config.cpp40
-rw-r--r--kword/mailmerge/kspread/kwmailmerge_kspread_config.h5
-rw-r--r--kword/mailmerge/sql/KWMySqlCursor.h48
-rw-r--r--kword/mailmerge/sql/KWQtSqlEasyFilter.cpp50
-rw-r--r--kword/mailmerge/sql/KWQtSqlEasyFilter.h23
-rw-r--r--kword/mailmerge/sql/KWQtSqlMailMergeOpen.cpp56
-rw-r--r--kword/mailmerge/sql/KWQtSqlMailMergeOpen.h27
-rw-r--r--kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.cpp164
-rw-r--r--kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.h54
-rw-r--r--kword/mailmerge/sql/KWQtSqlSerialDataSource.cpp126
-rw-r--r--kword/mailmerge/sql/KWQtSqlSerialDataSource.h53
-rw-r--r--kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.cpp54
-rw-r--r--kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.h39
-rw-r--r--kword/mailmerge/sql/kwqtsqlpower.ui26
-rw-r--r--kword/mailmerge/sql/qtsqldatasourceeditor.ui24
-rw-r--r--kword/mailmerge/sql/qtsqldatasourceeditor.ui.h4
-rw-r--r--kword/mailmerge/sql/qtsqlopenwidget.ui28
26 files changed, 804 insertions, 791 deletions
diff --git a/kword/mailmerge/KWClassicSerialDataSource.cpp b/kword/mailmerge/KWClassicSerialDataSource.cpp
index 0b3f446f..d539f692 100644
--- a/kword/mailmerge/KWClassicSerialDataSource.cpp
+++ b/kword/mailmerge/KWClassicSerialDataSource.cpp
@@ -22,19 +22,19 @@
#include "KWClassicSerialDataSource.moc"
#include "KWMailMergeDataBase.h"
#include <kinputdialog.h>
-#include <qlabel.h>
-#include <qhbox.h>
-#include <qlayout.h>
-#include <qvbox.h>
-#include <qpushbutton.h>
-#include <qlineedit.h>
-#include <qvalidator.h>
+#include <tqlabel.h>
+#include <tqhbox.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
+#include <tqpushbutton.h>
+#include <tqlineedit.h>
+#include <tqvalidator.h>
#include <klocale.h>
#include <kdebug.h>
-#include <qtoolbutton.h>
-#include <qtooltip.h>
+#include <tqtoolbutton.h>
+#include <tqtooltip.h>
#include <kiconloader.h>
-#include <qheader.h>
+#include <tqheader.h>
#include "KWDocument.h"
#include "defs.h"
@@ -46,8 +46,8 @@
*
******************************************************************/
-KWClassicSerialDataSource::KWClassicSerialDataSource(KInstance *inst,QObject *parent)
- : KWMailMergeDataSource(inst,parent)
+KWClassicSerialDataSource::KWClassicSerialDataSource(KInstance *inst,TQObject *tqparent)
+ : KWMailMergeDataSource(inst,tqparent)
// : doc( doc_ )
{
}
@@ -56,7 +56,7 @@ KWClassicSerialDataSource::~KWClassicSerialDataSource()
{
}
-QString KWClassicSerialDataSource::getValue( const QString &name, int record ) const
+TQString KWClassicSerialDataSource::getValue( const TQString &name, int record ) const
{
int num = record;
/* if ( num == -1 )
@@ -68,7 +68,7 @@ QString KWClassicSerialDataSource::getValue( const QString &name, int record ) c
return db[ num ][ name ];
}
-void KWClassicSerialDataSource::setValue( const QString &name, const QString &value, int record )
+void KWClassicSerialDataSource::setValue( const TQString &name, const TQString &value, int record )
{
int num = record;
/* if ( num == -1 )
@@ -86,7 +86,7 @@ void KWClassicSerialDataSource::appendRecord()
db.append( record );
}
-void KWClassicSerialDataSource::addEntry( const QString &name )
+void KWClassicSerialDataSource::addEntry( const TQString &name )
{
sampleRecord[ name ] = i18n( "No Value" );
Db::Iterator it = db.begin();
@@ -94,7 +94,7 @@ void KWClassicSerialDataSource::addEntry( const QString &name )
( *it )[ name ] = sampleRecord[ name ];
}
-void KWClassicSerialDataSource::removeEntry( const QString &name )
+void KWClassicSerialDataSource::removeEntry( const TQString &name )
{
sampleRecord.remove( name );
Db::Iterator it = db.begin();
@@ -107,63 +107,63 @@ void KWClassicSerialDataSource::removeRecord( int i )
if ( (i < 0) || (i > (int)db.count() - 1) )
return;
- kdDebug()<<QString("Removing record %1").arg(i)<<endl;
+ kdDebug()<<TQString("Removing record %1").tqarg(i)<<endl;
Db::Iterator it = db.at( i);
db.remove( it );
}
-void KWClassicSerialDataSource::save( QDomDocument &doc, QDomElement &parent)
+void KWClassicSerialDataSource::save( TQDomDocument &doc, TQDomElement &tqparent)
{
- QDomElement def=doc.createElement(QString::fromLatin1("DEFINITION"));
- parent.appendChild(def);
+ TQDomElement def=doc.createElement(TQString::tqfromLatin1("DEFINITION"));
+ tqparent.appendChild(def);
for (DbRecord::Iterator it=sampleRecord.begin();it!=sampleRecord.end();++it)
{
- QDomElement defEnt=doc.createElement(QString::fromLatin1("FIELD"));
- defEnt.setAttribute(QString::fromLatin1("name"),it.key());
+ TQDomElement defEnt=doc.createElement(TQString::tqfromLatin1("FIELD"));
+ defEnt.setAttribute(TQString::tqfromLatin1("name"),it.key());
def.appendChild(defEnt);
}
- QDomElement cont=doc.createElement(QString::fromLatin1("CONTENT"));
- parent.appendChild(cont);
+ TQDomElement cont=doc.createElement(TQString::tqfromLatin1("CONTENT"));
+ tqparent.appendChild(cont);
for (Db::Iterator dbI=db.begin();dbI!=db.end();++dbI)
{
- QDomElement rec=doc.createElement(QString::fromLatin1("RECORD"));
+ TQDomElement rec=doc.createElement(TQString::tqfromLatin1("RECORD"));
cont.appendChild(rec);
for (DbRecord::Iterator it=sampleRecord.begin();it!=sampleRecord.end();++it)
{
- QDomElement recEnt=doc.createElement(QString::fromLatin1("ITEM"));
- recEnt.setAttribute(QString::fromLatin1("name"),it.key());
- recEnt.setAttribute(QString::fromLatin1("data"),(*dbI)[it.key()]);
+ TQDomElement recEnt=doc.createElement(TQString::tqfromLatin1("ITEM"));
+ recEnt.setAttribute(TQString::tqfromLatin1("name"),it.key());
+ recEnt.setAttribute(TQString::tqfromLatin1("data"),(*dbI)[it.key()]);
rec.appendChild(recEnt);
}
}
}
-void KWClassicSerialDataSource::load( QDomElement& parentElem )
+void KWClassicSerialDataSource::load( TQDomElement& tqparentElem )
{
db.clear();
sampleRecord.clear();
- QDomNode defNd=parentElem.namedItem("DEFINITION");
+ TQDomNode defNd=tqparentElem.namedItem("DEFINITION");
if (defNd.isNull()) return;
- QDomElement def=defNd.toElement();
- for (QDomElement defEnt=def.firstChild().toElement();!defEnt.isNull();defEnt=defEnt.nextSibling().toElement())
+ TQDomElement def=defNd.toElement();
+ for (TQDomElement defEnt=def.firstChild().toElement();!defEnt.isNull();defEnt=defEnt.nextSibling().toElement())
{
- sampleRecord[defEnt.attribute(QString::fromLatin1("name"))]=i18n( "No Value" );
+ sampleRecord[defEnt.attribute(TQString::tqfromLatin1("name"))]=i18n( "No Value" );
}
- QDomNode contNd=parentElem.namedItem("CONTENT");
+ TQDomNode contNd=tqparentElem.namedItem("CONTENT");
if (contNd.isNull()) return;
- for (QDomNode rec=contNd.firstChild();!rec.isNull();rec=rec.nextSibling())
+ for (TQDomNode rec=contNd.firstChild();!rec.isNull();rec=rec.nextSibling())
{
appendRecord();
- for (QDomElement recEnt=rec.firstChild().toElement();!recEnt.isNull();recEnt=recEnt.nextSibling().toElement())
+ for (TQDomElement recEnt=rec.firstChild().toElement();!recEnt.isNull();recEnt=recEnt.nextSibling().toElement())
{
- setValue(recEnt.attribute(QString::fromLatin1("name")),
- recEnt.attribute(QString::fromLatin1("data")),db.count()-1);
+ setValue(recEnt.attribute(TQString::tqfromLatin1("name")),
+ recEnt.attribute(TQString::tqfromLatin1("data")),db.count()-1);
}
}
}
-bool KWClassicSerialDataSource::showConfigDialog(QWidget *par,int action)
+bool KWClassicSerialDataSource::showConfigDialog(TQWidget *par,int action)
{
if (action==KWSLCreate)
{
@@ -171,7 +171,7 @@ bool KWClassicSerialDataSource::showConfigDialog(QWidget *par,int action)
sampleRecord.clear();
}
KWClassicMailMergeEditor *dia=new KWClassicMailMergeEditor( par, this );
- bool ret=(dia->exec()==QDialog::Accepted);
+ bool ret=(dia->exec()==TQDialog::Accepted);
delete dia;
return ret;
}
@@ -183,17 +183,17 @@ bool KWClassicSerialDataSource::showConfigDialog(QWidget *par,int action)
*
******************************************************************/
-KWClassicMailMergeEditorListItem::KWClassicMailMergeEditorListItem( QListView *parent )
- : QListViewItem( parent )
+KWClassicMailMergeEditorListItem::KWClassicMailMergeEditorListItem( TQListView *tqparent )
+ : TQListViewItem( tqparent )
{
- editWidget = new QLineEdit( listView()->viewport() );
+ editWidget = new TQLineEdit( listView()->viewport() );
listView()->addChild( editWidget );
}
-KWClassicMailMergeEditorListItem::KWClassicMailMergeEditorListItem( QListView *parent, QListViewItem *after )
- : QListViewItem( parent, after )
+KWClassicMailMergeEditorListItem::KWClassicMailMergeEditorListItem( TQListView *tqparent, TQListViewItem *after )
+ : TQListViewItem( tqparent, after )
{
- editWidget = new QLineEdit( listView()->viewport() );
+ editWidget = new TQLineEdit( listView()->viewport() );
listView()->addChild( editWidget );
}
@@ -202,26 +202,26 @@ KWClassicMailMergeEditorListItem::~KWClassicMailMergeEditorListItem()
delete editWidget;
}
-void KWClassicMailMergeEditorListItem::setText( int i, const QString &text )
+void KWClassicMailMergeEditorListItem::setText( int i, const TQString &text )
{
- QListViewItem::setText( i, text );
+ TQListViewItem::setText( i, text );
if ( i == 1 )
editWidget->setText( text );
}
-QString KWClassicMailMergeEditorListItem::text( int i ) const
+TQString KWClassicMailMergeEditorListItem::text( int i ) const
{
if ( i == 1 )
return editWidget->text();
- return QListViewItem::text( i );
+ return TQListViewItem::text( i );
}
void KWClassicMailMergeEditorListItem::setup()
{
- setHeight( QMAX( listView()->fontMetrics().height(),
- editWidget->sizeHint().height() ) );
- if ( listView()->columnWidth( 1 ) < editWidget->sizeHint().width() )
- listView()->setColumnWidth( 1, editWidget->sizeHint().width() );
+ setHeight( TQMAX( listView()->fontMetrics().height(),
+ editWidget->tqsizeHint().height() ) );
+ if ( listView()->columnWidth( 1 ) < editWidget->tqsizeHint().width() )
+ listView()->setColumnWidth( 1, editWidget->tqsizeHint().width() );
}
void KWClassicMailMergeEditorListItem::update()
@@ -238,24 +238,24 @@ void KWClassicMailMergeEditorListItem::update()
*
******************************************************************/
-KWClassicMailMergeEditorList::KWClassicMailMergeEditorList( QWidget *parent, KWClassicSerialDataSource *db_ )
- : QListView( parent ), db( db_ )
+KWClassicMailMergeEditorList::KWClassicMailMergeEditorList( TQWidget *tqparent, KWClassicSerialDataSource *db_ )
+ : TQListView( tqparent ), db( db_ )
{
setSorting( -1 );
addColumn( i18n( "Name" ) );
addColumn( i18n( "Value" ) );
header()->setMovingEnabled( FALSE );
- connect( header(), SIGNAL( sizeChange( int, int, int ) ),
- this, SLOT( columnSizeChange( int, int, int ) ) );
-// connect( header(), SIGNAL( sectionClicked( int ) ),
-// this, SLOT( sectionClicked( int ) ) );
- disconnect( header(), SIGNAL( sectionClicked( int ) ),
- this, SLOT( changeSortColumn( int ) ) );
+ connect( header(), TQT_SIGNAL( sizeChange( int, int, int ) ),
+ this, TQT_SLOT( columnSizeChange( int, int, int ) ) );
+// connect( header(), TQT_SIGNAL( sectionClicked( int ) ),
+// this, TQT_SLOT( sectionClicked( int ) ) );
+ disconnect( header(), TQT_SIGNAL( sectionClicked( int ) ),
+ this, TQT_SLOT( changeSortColumn( int ) ) );
currentRecord = -1;
}
-void KWClassicMailMergeEditorList::invalidateCurrentRecord()
+void KWClassicMailMergeEditorList::tqinvalidateCurrentRecord()
{
currentRecord=-1;
}
@@ -265,10 +265,10 @@ KWClassicMailMergeEditorList::~KWClassicMailMergeEditorList()
if ( currentRecord == -1 )
return;
- QListViewItemIterator lit( this );
- QMap< QString, QString >::ConstIterator it = db->getRecordEntries().begin();
+ TQListViewItemIterator lit( this );
+ TQMap< TQString, TQString >::ConstIterator it = db->getRecordEntries().begin();
for ( ; it != db->getRecordEntries().end(); ++it ) {
- QListViewItem *item = 0;
+ TQListViewItem *item = 0;
item = lit.current();
++lit;
if ( currentRecord != -1 && item )
@@ -289,7 +289,7 @@ void KWClassicMailMergeEditorList::sectionClicked( int )
void KWClassicMailMergeEditorList::updateItems()
{
- QListViewItemIterator it( this );
+ TQListViewItemIterator it( this );
for ( ; it.current(); ++it )
( (KWClassicMailMergeEditorListItem*)it.current() )->update();
}
@@ -300,11 +300,11 @@ void KWClassicMailMergeEditorList::displayRecord( int i )
return;
bool create = !firstChild();
- QListViewItemIterator lit( this );
- QMap< QString, QString >::ConstIterator it = db->getRecordEntries().begin();
- QListViewItem *after = 0;
+ TQListViewItemIterator lit( this );
+ TQMap< TQString, TQString >::ConstIterator it = db->getRecordEntries().begin();
+ TQListViewItem *after = 0;
for ( ; it != db->getRecordEntries().end(); ++it ) {
- QListViewItem *item = 0;
+ TQListViewItem *item = 0;
if ( create ) {
item = new KWClassicMailMergeEditorListItem( this, after );
item->setText( 0, it.key() );
@@ -329,72 +329,72 @@ void KWClassicMailMergeEditorList::displayRecord( int i )
*
******************************************************************/
-KWClassicMailMergeEditor::KWClassicMailMergeEditor( QWidget *parent, KWClassicSerialDataSource *db_ )
- : KDialogBase( Plain, i18n( "Mail Merge - Editor" ), Ok | Cancel, Ok, parent, "", true ), db( db_ )
+KWClassicMailMergeEditor::KWClassicMailMergeEditor( TQWidget *tqparent, KWClassicSerialDataSource *db_ )
+ : KDialogBase( Plain, i18n( "Mail Merge - Editor" ), Ok | Cancel, Ok, tqparent, "", true ), db( db_ )
{
back = plainPage();
- QVBoxLayout *l = new QVBoxLayout( back );
+ TQVBoxLayout *l = new TQVBoxLayout( back );
l->setAutoAdd(true);
l->setSpacing( KDialog::spacingHint() );
- QHBox *toolbar = new QHBox( back );
+ TQHBox *toolbar = new TQHBox( back );
- first = new QToolButton( toolbar );
+ first = new TQToolButton( toolbar );
first->setIconSet( SmallIconSet( "start" ) );
- first->setFixedSize( first->sizeHint() );
- connect(first, SIGNAL(clicked()), this, SLOT(firstRecord()));
+ first->setFixedSize( first->tqsizeHint() );
+ connect(first, TQT_SIGNAL(clicked()), this, TQT_SLOT(firstRecord()));
- back_ = new QToolButton( toolbar );
+ back_ = new TQToolButton( toolbar );
back_->setIconSet( SmallIconSet( "back" ) );
- back_->setFixedSize( back_->sizeHint() );
- connect(back_, SIGNAL(clicked()), this, SLOT(prevRecord()));
+ back_->setFixedSize( back_->tqsizeHint() );
+ connect(back_, TQT_SIGNAL(clicked()), this, TQT_SLOT(prevRecord()));
- records = new QSpinBox( 1, db->getNumRecords(), 1, toolbar );
- records->setMaximumHeight( records->sizeHint().height() );
- connect( records, SIGNAL( valueChanged( int ) ),
- this, SLOT( changeRecord( int ) ) );
+ records = new TQSpinBox( 1, db->getNumRecords(), 1, toolbar );
+ records->setMaximumHeight( records->tqsizeHint().height() );
+ connect( records, TQT_SIGNAL( valueChanged( int ) ),
+ this, TQT_SLOT( changeRecord( int ) ) );
- forward = new QToolButton( toolbar );
+ forward = new TQToolButton( toolbar );
forward->setIconSet( SmallIconSet( "forward" ) );
- forward->setFixedSize( forward->sizeHint() );
- connect(forward, SIGNAL(clicked()), this, SLOT(nextRecord()));
+ forward->setFixedSize( forward->tqsizeHint() );
+ connect(forward, TQT_SIGNAL(clicked()), this, TQT_SLOT(nextRecord()));
- finish = new QToolButton( toolbar );
+ finish = new TQToolButton( toolbar );
finish->setIconSet( SmallIconSet( "finish" ) );
- finish->setFixedSize( finish->sizeHint() );
- connect(finish, SIGNAL(clicked()), this, SLOT(lastRecord()));
+ finish->setFixedSize( finish->tqsizeHint() );
+ connect(finish, TQT_SIGNAL(clicked()), this, TQT_SLOT(lastRecord()));
- QWidget *sep = new QWidget( toolbar );
+ TQWidget *sep = new TQWidget( toolbar );
sep->setMaximumWidth( 10 );
- newRecord = new QToolButton( toolbar );
+ newRecord = new TQToolButton( toolbar );
newRecord->setIconSet( SmallIconSet( "sl_addrecord" ) );
- newRecord->setFixedSize( newRecord->sizeHint() );
- connect( newRecord, SIGNAL( clicked() ),
- this, SLOT( addRecord() ) );
- QToolTip::add( newRecord, i18n( "Add record" ) );
+ newRecord->setFixedSize( newRecord->tqsizeHint() );
+ connect( newRecord, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( addRecord() ) );
+ TQToolTip::add( newRecord, i18n( "Add record" ) );
- newEntry = new QToolButton( toolbar );
+ newEntry = new TQToolButton( toolbar );
newEntry->setIconSet( SmallIconSet( "sl_addentry" ) );
- newEntry->setFixedSize( newEntry->sizeHint() );
- connect( newEntry, SIGNAL( clicked() ),
- this, SLOT( addEntry() ) );
- QToolTip::add( newEntry, i18n( "Add entry" ) );
+ newEntry->setFixedSize( newEntry->tqsizeHint() );
+ connect( newEntry, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( addEntry() ) );
+ TQToolTip::add( newEntry, i18n( "Add entry" ) );
- deleteRecord = new QToolButton( toolbar );
+ deleteRecord = new TQToolButton( toolbar );
deleteRecord->setIconSet( SmallIconSet( "sl_delrecord" ) );
- deleteRecord->setFixedSize( deleteRecord->sizeHint() );
- connect( deleteRecord, SIGNAL( clicked() ),
- this, SLOT( removeRecord() ) );
- QToolTip::add( deleteRecord, i18n( "Remove record" ) );
+ deleteRecord->setFixedSize( deleteRecord->tqsizeHint() );
+ connect( deleteRecord, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( removeRecord() ) );
+ TQToolTip::add( deleteRecord, i18n( "Remove record" ) );
- deleteEntry = new QToolButton( toolbar );
+ deleteEntry = new TQToolButton( toolbar );
deleteEntry->setIconSet( SmallIconSet( "sl_delentry" ) );
- deleteEntry->setFixedSize( deleteEntry->sizeHint() );
- connect( deleteEntry, SIGNAL( clicked() ),
- this, SLOT( removeEntry() ) );
- QToolTip::add( deleteEntry, i18n( "Remove entry" ) );
+ deleteEntry->setFixedSize( deleteEntry->tqsizeHint() );
+ connect( deleteEntry, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( removeEntry() ) );
+ TQToolTip::add( deleteEntry, i18n( "Remove entry" ) );
dbList = new KWClassicMailMergeEditorList( back, db );
@@ -412,7 +412,7 @@ KWClassicMailMergeEditor::KWClassicMailMergeEditor( QWidget *parent, KWClassicSe
deleteRecord->setEnabled(false);
records->setEnabled(true);
}
- setInitialSize( QSize( 600, 400 ) );
+ setInitialSize( TQSize( 600, 400 ) );
updateButton();
}
@@ -451,7 +451,7 @@ void KWClassicMailMergeEditor::updateButton()
}
-void KWClassicMailMergeEditor::resizeEvent( QResizeEvent *e )
+void KWClassicMailMergeEditor::resizeEvent( TQResizeEvent *e )
{
KDialogBase::resizeEvent( e );
// back->resize( size() );
@@ -465,9 +465,9 @@ void KWClassicMailMergeEditor::changeRecord( int i )
void KWClassicMailMergeEditor::addEntry()
{
bool ok;
- QString value=KInputDialog::getText( i18n("Add Entry"),
+ TQString value=KInputDialog::getText( i18n("Add Entry"),
i18n("Enter entry name:"),
- QString::null,
+ TQString(),
&ok,
this);
if ((ok) && !value.isEmpty())
@@ -503,7 +503,7 @@ void KWClassicMailMergeEditor::addRecord()
void KWClassicMailMergeEditor::removeEntry()
{
- QListViewItem * item = dbList->selectedItem ();
+ TQListViewItem * item = dbList->selectedItem ();
if ( item )
{
db->removeEntry( item->text(0) );
@@ -512,7 +512,7 @@ void KWClassicMailMergeEditor::removeEntry()
dbList->updateItems();
updateButton();
}
-#if defined( Q_CC_GNU )
+#if defined( TQ_CC_GNU )
#warning reimplement
#endif
/*
@@ -521,7 +521,7 @@ void KWClassicMailMergeEditor::removeEntry()
KWMailMergeVariableInsertDia
*dia = new KWMailMergeVariableInsertDia( this, db );
- if ( dia->exec() == QDialog::Accepted ) {
+ if ( dia->exec() == TQDialog::Accepted ) {
dbList->clear();
db->removeEntry( dia->getName() );
changeRecord( records->value() + 1 );
@@ -537,7 +537,7 @@ void KWClassicMailMergeEditor::removeRecord()
return;
db->removeRecord( records->value() - 1 );
- dbList->invalidateCurrentRecord();
+ dbList->tqinvalidateCurrentRecord();
if ( db->getNumRecords() > 0 ) {
records->setRange( records->minValue(), records->maxValue() - 1 );
records->setValue( 1 );
@@ -561,9 +561,9 @@ void KWClassicMailMergeEditor::removeRecord()
}
extern "C" {
- KWORD_MAILMERGE_EXPORT KWMailMergeDataSource *create_kwmailmerge_classic(KInstance *inst,QObject *parent)
+ KWORD_MAILMERGE_EXPORT KWMailMergeDataSource *create_kwmailmerge_classic(KInstance *inst,TQObject *tqparent)
{
- return new KWClassicSerialDataSource(inst,parent);
+ return new KWClassicSerialDataSource(inst,tqparent);
}
}
diff --git a/kword/mailmerge/KWClassicSerialDataSource.h b/kword/mailmerge/KWClassicSerialDataSource.h
index 4f348dfe..713f41d8 100644
--- a/kword/mailmerge/KWClassicSerialDataSource.h
+++ b/kword/mailmerge/KWClassicSerialDataSource.h
@@ -21,52 +21,53 @@
#ifndef _SERIALLETTER_CLASSIC_PLUGIN_H_
#define _SERIALLETTER_CLASSIC_PLUGIN_H_
-#include <qdom.h>
-#include <qlistview.h>
+#include <tqdom.h>
+#include <tqlistview.h>
#include <kdialogbase.h>
#include <KoCustomVariablesDia.h>
#include "KWMailMergeDataSource.h"
-#include <qspinbox.h>
+#include <tqspinbox.h>
-class QHBox;
-class QVBox;
-class QPushButton;
-class QListBox;
-class QLabel;
-class QLineEdit;
-class QToolButton;
+class TQHBox;
+class TQVBox;
+class TQPushButton;
+class TQListBox;
+class TQLabel;
+class TQLineEdit;
+class TQToolButton;
/******************************************************************
*
* Class: KWClassicSerialDataSource
*
******************************************************************/
-typedef QValueList< DbRecord > Db;
+typedef TQValueList< DbRecord > Db;
class KWClassicSerialDataSource: public KWMailMergeDataSource
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWClassicSerialDataSource(KInstance *inst,QObject *parent);
+ KWClassicSerialDataSource(KInstance *inst,TQObject *tqparent);
~KWClassicSerialDataSource();
- virtual void save( QDomDocument &doc,QDomElement&);
- virtual void load( QDomElement& elem );
- virtual class QString getValue( const class QString &name, int record = -1 ) const;
+ virtual void save( TQDomDocument &doc,TQDomElement&);
+ virtual void load( TQDomElement& elem );
+ virtual class TQString getValue( const class TQString &name, int record = -1 ) const;
virtual int getNumRecords() const {
return (int)db.count();
}
- virtual bool showConfigDialog(QWidget *,int);
+ virtual bool showConfigDialog(TQWidget *,int);
virtual void refresh(bool){};
protected:
friend class KWClassicMailMergeEditor;
friend class KWClassicMailMergeEditorList;
- void setValue( const QString &name, const QString &value, int record = -1 );
+ void setValue( const TQString &name, const TQString &value, int record = -1 );
void appendRecord();
- void addEntry( const QString &name );
- void removeEntry( const QString &name );
+ void addEntry( const TQString &name );
+ void removeEntry( const TQString &name );
void removeRecord( int i );
Db db;
};
@@ -77,20 +78,20 @@ class KWClassicSerialDataSource: public KWMailMergeDataSource
*
******************************************************************/
-class KWClassicMailMergeEditorListItem : public QListViewItem
+class KWClassicMailMergeEditorListItem : public TQListViewItem
{
public:
- KWClassicMailMergeEditorListItem( QListView *parent );
- KWClassicMailMergeEditorListItem( QListView *parent, QListViewItem *after );
+ KWClassicMailMergeEditorListItem( TQListView *tqparent );
+ KWClassicMailMergeEditorListItem( TQListView *tqparent, TQListViewItem *after );
virtual ~KWClassicMailMergeEditorListItem();
- virtual void setText( int i, const QString &text );
- virtual QString text( int i ) const;
+ virtual void setText( int i, const TQString &text );
+ virtual TQString text( int i ) const;
void setup();
void update();
protected:
- QLineEdit *editWidget;
+ TQLineEdit *editWidget;
};
@@ -100,20 +101,21 @@ protected:
*
******************************************************************/
-class KWClassicMailMergeEditorList : public QListView
+class KWClassicMailMergeEditorList : public TQListView
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWClassicMailMergeEditorList( QWidget *parent, KWClassicSerialDataSource *db_ );
+ KWClassicMailMergeEditorList( TQWidget *tqparent, KWClassicSerialDataSource *db_ );
virtual ~KWClassicMailMergeEditorList();
- void invalidateCurrentRecord();
+ void tqinvalidateCurrentRecord();
void updateItems();
void displayRecord( int i );
void setSorting( int, bool increasing = TRUE ) {
- QListView::setSorting( -1, increasing );
+ TQListView::setSorting( -1, increasing );
}
protected slots:
@@ -135,27 +137,28 @@ protected:
class KWClassicMailMergeEditor : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWClassicMailMergeEditor( QWidget *parent, KWClassicSerialDataSource *db_ );
+ KWClassicMailMergeEditor( TQWidget *tqparent, KWClassicSerialDataSource *db_ );
protected:
- void resizeEvent( QResizeEvent *e );
+ void resizeEvent( TQResizeEvent *e );
void updateButton();
- QSpinBox *records;
+ TQSpinBox *records;
KWClassicMailMergeEditorList *dbList;
- QWidget *back;
+ TQWidget *back;
KWClassicSerialDataSource *db;
- QToolButton *first;
- QToolButton *back_;
- QToolButton *forward;
- QToolButton *finish;
- QToolButton *newRecord;
- QToolButton *newEntry;
- QToolButton *deleteRecord;
- QToolButton *deleteEntry;
+ TQToolButton *first;
+ TQToolButton *back_;
+ TQToolButton *forward;
+ TQToolButton *finish;
+ TQToolButton *newRecord;
+ TQToolButton *newEntry;
+ TQToolButton *deleteRecord;
+ TQToolButton *deleteEntry;
protected slots:
void changeRecord( int i );
diff --git a/kword/mailmerge/kabc/KWMailMergeKABC.cpp b/kword/mailmerge/kabc/KWMailMergeKABC.cpp
index a5df7e73..aeadae4c 100644
--- a/kword/mailmerge/kabc/KWMailMergeKABC.cpp
+++ b/kword/mailmerge/kabc/KWMailMergeKABC.cpp
@@ -33,8 +33,8 @@
#include "KWMailMergeKABC.h"
#include "KWMailMergeKABCConfig.h"
-KWMailMergeKABC::KWMailMergeKABC( KInstance *inst, QObject *parent )
- : KWMailMergeDataSource( inst, parent )
+KWMailMergeKABC::KWMailMergeKABC( KInstance *inst, TQObject *tqparent )
+ : KWMailMergeDataSource( inst, tqparent )
{
_addressBook = KABC::StdAddressBook::self();
_iterator = _addressBook->begin();
@@ -85,12 +85,12 @@ KWMailMergeKABC::KWMailMergeKABC( KInstance *inst, QObject *parent )
sampleRecord[ ("sortString" ) ] = KABC::Addressee::sortStringLabel();
sampleRecord[ ("URL" ) ] = KABC::Addressee::urlLabel();
sampleRecord[ ("Secrecy" ) ] = KABC::Addressee::secrecyLabel();
- sampleRecord[ ("Preferred address: Street" ) ] = QString( "preferedAddressStreet" );
- sampleRecord[ ("Preferred address: Locality" ) ] = QString( "preferedAddressLocality" );
- sampleRecord[ ("Preferred address: Region" ) ] = QString( "preferedAddressRegion" );
- sampleRecord[ ("Preferred address: Postal code" ) ] = QString( "preferedAddressPostalCode" );
- sampleRecord[ ("Preferred address: Country" ) ] = QString( "preferedAddressCountry" );
- sampleRecord[ ("Preferred address: Label" ) ] = QString( "preferedAddressLabel" );
+ sampleRecord[ ("Preferred address: Street" ) ] = TQString( "preferedAddressStreet" );
+ sampleRecord[ ("Preferred address: Locality" ) ] = TQString( "preferedAddressLocality" );
+ sampleRecord[ ("Preferred address: Region" ) ] = TQString( "preferedAddressRegion" );
+ sampleRecord[ ("Preferred address: Postal code" ) ] = TQString( "preferedAddressPostalCode" );
+ sampleRecord[ ("Preferred address: Country" ) ] = TQString( "preferedAddressCountry" );
+ sampleRecord[ ("Preferred address: Label" ) ] = TQString( "preferedAddressLabel" );
}
@@ -100,14 +100,14 @@ KWMailMergeKABC::~KWMailMergeKABC()
}
-void KWMailMergeKABC::addEntry( const QString &uid )
+void KWMailMergeKABC::addEntry( const TQString &uid )
{
_individualUIDs.append( uid );
makeUIDsExclusive();
}
-void KWMailMergeKABC::addList( const QString &id )
+void KWMailMergeKABC::addList( const TQString &id )
{
_lists.append( id );
parseList( id );
@@ -131,7 +131,7 @@ int KWMailMergeKABC::getNumRecords() const
}
-QString KWMailMergeKABC::getValue( const QString &name, int record ) const
+TQString KWMailMergeKABC::getValue( const TQString &name, int record ) const
{
kdDebug() << "KWMailMergeKABC::getValue(" << name << ", " << record << ")" << endl;
if ( record < 0 )
@@ -168,7 +168,7 @@ QString KWMailMergeKABC::getValue( const QString &name, int record ) const
if( !uidAvailable )
{
- return ( i18n ( "KAddressbook entry '%1' not available." ).arg( *_UIDIterator ) );
+ return ( i18n ( "KAddressbook entry '%1' not available." ).tqarg( *_UIDIterator ) );
}
@@ -342,24 +342,24 @@ QString KWMailMergeKABC::getValue( const QString &name, int record ) const
if ( name == "Time zone" )
{
KABC::TimeZone zone = addr.timeZone();
- return QString::number( zone.offset() );
+ return TQString::number( zone.offset() );
}
if ( name == "Geographic position" )
{
KABC::Geo geo = addr.geo();
- QString lat;
- QString longi;
+ TQString lat;
+ TQString longi;
if( geo.latitude()<0 )
- lat = QString( i18n("%1 South") ).arg( -geo.latitude() );
+ lat = TQString( i18n("%1 South") ).tqarg( -geo.latitude() );
else
- lat = QString( i18n("%1 North") ).arg( geo.latitude() );
+ lat = TQString( i18n("%1 North") ).tqarg( geo.latitude() );
if( geo.longitude()<0 )
// There is something going wrong, because "W" is replaced by "q ".
// Needs fix.
- longi = QString( i18n("%1 West") ).arg( -geo.longitude() );
+ longi = TQString( i18n("%1 West") ).tqarg( -geo.longitude() );
else
- longi = QString( i18n("%1 East") ).arg( geo.longitude() );
+ longi = TQString( i18n("%1 East") ).tqarg( geo.longitude() );
return i18n( "Geographic coordinates", "%1, %2" ).arg ( lat, longi );
}
@@ -390,34 +390,34 @@ QString KWMailMergeKABC::getValue( const QString &name, int record ) const
}
-QStringList KWMailMergeKABC::lists() const
+TQStringList KWMailMergeKABC::lists() const
{
return _lists;
}
-void KWMailMergeKABC::load( QDomElement& parentElem )
+void KWMailMergeKABC::load( TQDomElement& tqparentElem )
{
clear();
- QDomNode contentNode=parentElem.namedItem("CONTENT");
+ TQDomNode contentNode=tqparentElem.namedItem("CONTENT");
if( contentNode.isNull() )
return;
- for( QDomNode rec=contentNode.firstChild(); !rec.isNull(); rec=rec.nextSibling() )
+ for( TQDomNode rec=contentNode.firstChild(); !rec.isNull(); rec=rec.nextSibling() )
{
if( rec.nodeName()== "RECORD" )
{
- for( QDomElement recEnt=rec.firstChild().toElement(); !recEnt.isNull();
+ for( TQDomElement recEnt=rec.firstChild().toElement(); !recEnt.isNull();
recEnt=recEnt.nextSibling().toElement() )
{
- addEntry( recEnt.attribute( QString::fromLatin1("uid") ) );
+ addEntry( recEnt.attribute( TQString::tqfromLatin1("uid") ) );
}
}
else if( rec.nodeName() == "LIST" )
{
- for( QDomElement recEnt=rec.firstChild().toElement(); !recEnt.isNull();
+ for( TQDomElement recEnt=rec.firstChild().toElement(); !recEnt.isNull();
recEnt=recEnt.nextSibling().toElement() )
{
- addList( recEnt.attribute( QString::fromLatin1("listid") ) );
+ addList( recEnt.attribute( TQString::tqfromLatin1("listid") ) );
}
}
else
@@ -432,8 +432,8 @@ void KWMailMergeKABC::makeUIDsExclusive()
_exclusiveUIDs.sort();
kdDebug() << "KWMailMergeKABC::makeUIDsExclusive(): before: " << _exclusiveUIDs.join(",")
<< endl;
- QString uid;
- for( QStringList::Iterator it=_exclusiveUIDs.begin();
+ TQString uid;
+ for( TQStringList::Iterator it=_exclusiveUIDs.begin();
it!=_exclusiveUIDs.end(); ++it )
{
if( *it == uid )
@@ -447,7 +447,7 @@ void KWMailMergeKABC::makeUIDsExclusive()
}
-void KWMailMergeKABC::parseList( const QString& listName )
+void KWMailMergeKABC::parseList( const TQString& listName )
{
if( listName.isEmpty() )
return;
@@ -456,7 +456,7 @@ void KWMailMergeKABC::parseList( const QString& listName )
KABC::DistributionListManager dlm ( _addressBook );
dlm.load();
- QStringList::Iterator listIt;
+ TQStringList::Iterator listIt;
KABC::DistributionList* list = dlm.list( listName );
KABC::DistributionList::Entry::List entries = list->entries();
@@ -480,33 +480,33 @@ void KWMailMergeKABC::refresh( bool )
}
-void KWMailMergeKABC::save( QDomDocument& doc, QDomElement& parent)
+void KWMailMergeKABC::save( TQDomDocument& doc, TQDomElement& tqparent)
{
- QDomElement cont=doc.createElement(QString::fromLatin1("CONTENT"));
- parent.appendChild(cont);
+ TQDomElement cont=doc.createElement(TQString::tqfromLatin1("CONTENT"));
+ tqparent.appendChild(cont);
- QValueList<QString>::ConstIterator it = _individualUIDs.begin();
+ TQValueList<TQString>::ConstIterator it = _individualUIDs.begin();
for( ; it != _individualUIDs.end(); ++it )
{
- QDomElement rec=doc.createElement(QString::fromLatin1("RECORD"));
+ TQDomElement rec=doc.createElement(TQString::tqfromLatin1("RECORD"));
cont.appendChild(rec);
- QDomElement recEnt=doc.createElement(QString::fromLatin1("ITEM"));
- recEnt.setAttribute(QString::fromLatin1("uid"),*it);
+ TQDomElement recEnt=doc.createElement(TQString::tqfromLatin1("ITEM"));
+ recEnt.setAttribute(TQString::tqfromLatin1("uid"),*it);
rec.appendChild(recEnt);
}
it = _lists.begin();
for( ; !(it == _lists.end()); ++it )
{
- QDomElement rec=doc.createElement(QString::fromLatin1("LIST"));
+ TQDomElement rec=doc.createElement(TQString::tqfromLatin1("LIST"));
cont.appendChild(rec);
- QDomElement recEnt=doc.createElement(QString::fromLatin1("ITEM"));
- recEnt.setAttribute(QString::fromLatin1("listid"),*it);
+ TQDomElement recEnt=doc.createElement(TQString::tqfromLatin1("ITEM"));
+ recEnt.setAttribute(TQString::tqfromLatin1("listid"),*it);
rec.appendChild(recEnt);
}
}
-bool KWMailMergeKABC::showConfigDialog( QWidget* par, int action )
+bool KWMailMergeKABC::showConfigDialog( TQWidget* par, int action )
{
bool ret=false;
if (action == KWSLCreate )
@@ -518,7 +518,7 @@ bool KWMailMergeKABC::showConfigDialog( QWidget* par, int action )
{
KWMailMergeKABCConfig *dia=new KWMailMergeKABCConfig( par, this );
- ret=( dia->exec() == QDialog::Accepted );
+ ret=( dia->exec() == TQDialog::Accepted );
kdDebug() << "KWMailMergeKABCConfig::Accepted " << ret << endl;
delete dia;
}
@@ -528,7 +528,7 @@ bool KWMailMergeKABC::showConfigDialog( QWidget* par, int action )
}
-QStringList KWMailMergeKABC::singleRecords() const
+TQStringList KWMailMergeKABC::singleRecords() const
{
return _individualUIDs;
}
@@ -537,9 +537,9 @@ QStringList KWMailMergeKABC::singleRecords() const
extern "C"
{
- KWORD_MAILMERGE_EXPORT KWMailMergeDataSource *create_kwmailmerge_kabc( KInstance *inst, QObject *parent )
+ KWORD_MAILMERGE_EXPORT KWMailMergeDataSource *create_kwmailmerge_kabc( KInstance *inst, TQObject *tqparent )
{
- return new KWMailMergeKABC( inst, parent );
+ return new KWMailMergeKABC( inst, tqparent );
}
}
diff --git a/kword/mailmerge/kabc/KWMailMergeKABC.h b/kword/mailmerge/kabc/KWMailMergeKABC.h
index 2787ac6f..f2754117 100644
--- a/kword/mailmerge/kabc/KWMailMergeKABC.h
+++ b/kword/mailmerge/kabc/KWMailMergeKABC.h
@@ -23,8 +23,8 @@
#ifndef _KWMAILMERGE_KABC_H_
#define _KWMAILMERGE_KABC_H_
-#include <qdom.h>
-#include <qguardedptr.h>
+#include <tqdom.h>
+#include <tqguardedptr.h>
#include <kabc/addressbook.h>
@@ -33,20 +33,21 @@
class KWMailMergeKABC: public KWMailMergeDataSource
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWMailMergeKABC( KInstance *inst, QObject *parent );
+ KWMailMergeKABC( KInstance *inst, TQObject *tqparent );
~KWMailMergeKABC();
/**
Saves the mail merge list to the kword document.
*/
- virtual void save( QDomDocument&, QDomElement& );
+ virtual void save( TQDomDocument&, TQDomElement& );
/**
Loads the mail merge list stored in the kword document.
*/
- virtual void load( QDomElement& );
+ virtual void load( TQDomElement& );
/**
@param name The name of the value e.g. "Family name".
@@ -55,7 +56,7 @@ public:
If @p record equals -1, @p name is returned.
*/
- virtual class QString getValue( const class QString &name, int record = -1 ) const;
+ virtual class TQString getValue( const class TQString &name, int record = -1 ) const;
/**
@return The number of available contacts in mail merge list.
@@ -72,7 +73,7 @@ public:
/**
Shows a KWMailMergeKABCConfig dialog for selecting entries from KAddressbook.
*/
- virtual bool showConfigDialog( QWidget*, int action);
+ virtual bool showConfigDialog( TQWidget*, int action);
protected:
friend class KWMailMergeKABCConfig;
@@ -86,7 +87,7 @@ protected:
@param uid The entry's KABC::Addressee::uid().
*/
- void addEntry( const QString &uid );
+ void addEntry( const TQString &uid );
/**
Adds a distribution list to the mail merge list.
@@ -96,7 +97,7 @@ protected:
@param id The DistributionList::name().
*/
- void addList( const QString &id );
+ void addList( const TQString &id );
/**
Removes all entries and distribution lists from the mail merge list.
@@ -108,7 +109,7 @@ protected:
To be called by KWMailMergeKABCConfig::initSelectedLists()
*/
- virtual QStringList lists() const;
+ virtual TQStringList lists() const;
/**
@return The KABC::Addressee::uid() of all individually selected
@@ -116,7 +117,7 @@ protected:
To be called by KWMailMergeKABCConfig::initSelectedAddressees()
*/
- virtual QStringList singleRecords() const;
+ virtual TQStringList singleRecords() const;
private:
/**
@@ -132,47 +133,47 @@ private:
/**
Just an Iterator.
*/
- mutable QStringList::ConstIterator _UIDIterator;
+ mutable TQStringList::ConstIterator _UIDIterator;
/**
- The "real" mail merge list. A list of QStrings. Each represents
+ The "real" mail merge list. A list of TQStrings. Each represents
the KABC::Addressee::uid() of a KAdressbook entry.
There is no UID twice in this list.
Needed because selected contacts may appear in a selected
distribution list, too. And we don't want to print it multiple.
*/
- QStringList _exclusiveUIDs;
+ TQStringList _exclusiveUIDs;
/**
This list contains all the KABC::Addressee::uid() selected
individually with the KWMailMergeKABCConfig dialog.
*/
- QStringList _individualUIDs;
+ TQStringList _individualUIDs;
/**
This list contains all the KABC::Addressee::uid() from the distribution
lists selected with the KWMailMergeKABCConfig dialog.
*/
- QStringList _listUIDs;
+ TQStringList _listUIDs;
/**
This list contains all the DistributionList::name() selected with the
KWMailMergeKABCConfig dialog.
*/
- QStringList _lists;
+ TQStringList _lists;
/**
Appends all KABC::Addressee::uid() of a distribution list to _listUIDs
and updates the mail merge list.
- To be used by KWMailMergeKABCConfig::addList( const QString &id )
+ To be used by KWMailMergeKABCConfig::addList( const TQString &id )
only.
@param listName The DistributionList::name() of the distribution list.
*/
- void parseList( const QString& listName );
+ void parseList( const TQString& listName );
/**
Removes duplicate entries in the mail merge list.
diff --git a/kword/mailmerge/kabc/KWMailMergeKABCConfig.cpp b/kword/mailmerge/kabc/KWMailMergeKABCConfig.cpp
index dee519c3..1e54d0b9 100644
--- a/kword/mailmerge/kabc/KWMailMergeKABCConfig.cpp
+++ b/kword/mailmerge/kabc/KWMailMergeKABCConfig.cpp
@@ -19,9 +19,9 @@
*/
-#include <qvbox.h>
-#include <qlayout.h>
-#include <qlineedit.h>
+#include <tqvbox.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -39,13 +39,13 @@
#include "KWMailMergeKABCConfig.h"
-KWMailMergeKABCConfig::KWMailMergeKABCConfig( QWidget *parent, KWMailMergeKABC *db_)
+KWMailMergeKABCConfig::KWMailMergeKABCConfig( TQWidget *tqparent, KWMailMergeKABC *db_)
:KDialogBase( Plain, i18n( "Mail Merge - Editor" ),
- Ok | Cancel, Ok, parent, "", true)
+ Ok | Cancel, Ok, tqparent, "", true)
{
_db = db_;
- (new QVBoxLayout(plainPage()))->setAutoAdd(true);
+ (new TQVBoxLayout(plainPage()))->setAutoAdd(true);
setMainWidget( _ui=new AddressPickerUI( plainPage() ) );
updateAvailable();
@@ -65,13 +65,13 @@ void KWMailMergeKABCConfig::acceptSelection()
{
_db->clear();
- QListViewItem* top = _ui->mSelectedView->firstChild();
+ TQListViewItem* top = _ui->mSelectedView->firstChild();
while(top)
{
kdDebug() << "acceptSelection(): " << top->text(0) << endl;
if( top->text(0) == i18n("Distribution Lists") )
{
- QListViewItem* item = top->firstChild();
+ TQListViewItem* item = top->firstChild();
while(item)
{
kdDebug() << "acceptSelection(): " << item->text(0) << endl;
@@ -81,7 +81,7 @@ void KWMailMergeKABCConfig::acceptSelection()
}
else if( top->text(0) == i18n("Single Entries") )
{
- QListViewItem* item = top->firstChild();
+ TQListViewItem* item = top->firstChild();
while(item)
{
kdDebug() << "acceptSelection(): " << item->text(0) << endl;
@@ -97,16 +97,16 @@ void KWMailMergeKABCConfig::acceptSelection()
void KWMailMergeKABCConfig::addSelectedContacts()
{
- QListViewItemIterator it( _ui->mAvailableView, QListViewItemIterator::Selected );
- QListViewItem* selected = _ui->mSelectedView->findItem(
- i18n("Single Entries"), 0, Qt::ExactMatch );
- QListViewItem* selectedLists = _ui->mSelectedView->findItem(
- i18n("Distribution Lists"), 0, Qt::ExactMatch );
+ TQListViewItemIterator it( _ui->mAvailableView, TQListViewItemIterator::Selected );
+ TQListViewItem* selected = _ui->mSelectedView->tqfindItem(
+ i18n("Single Entries"), 0, TQt::ExactMatch );
+ TQListViewItem* selectedLists = _ui->mSelectedView->tqfindItem(
+ i18n("Distribution Lists"), 0, TQt::ExactMatch );
while ( it.current() )
{
if( it.current()->depth() > 0 )
{
- QString uid = it.current()->text( -1 );
+ TQString uid = it.current()->text( -1 );
kdDebug() << "addSelectedContacts(): uid :" << uid << endl;
if( !uid.isEmpty() )
{
@@ -119,7 +119,7 @@ void KWMailMergeKABCConfig::addSelectedContacts()
destroyAvailableClones( uid );
}
}
- else if( it.current()->parent()->text(0) == i18n("Distribution Lists") )
+ else if( it.current()->tqparent()->text(0) == i18n("Distribution Lists") )
{
if( selectedLists )
{
@@ -134,12 +134,12 @@ void KWMailMergeKABCConfig::addSelectedContacts()
}
-void KWMailMergeKABCConfig::destroyAvailableClones( const QString& uid )
+void KWMailMergeKABCConfig::destroyAvailableClones( const TQString& uid )
{
if( uid.isEmpty() )
return;
- QListViewItemIterator it( _ui->mAvailableView );
+ TQListViewItemIterator it( _ui->mAvailableView );
while ( it.current() )
{
@@ -155,18 +155,18 @@ void KWMailMergeKABCConfig::destroyAvailableClones( const QString& uid )
}
-void KWMailMergeKABCConfig::filterChanged( const QString& txt )
+void KWMailMergeKABCConfig::filterChanged( const TQString& txt )
{
kdDebug() << "KWMailMergeKABCConfig::filterChanged( " << txt << " )" << endl;
bool showAll = txt.isEmpty();
- QListViewItem* category = _ui->mAvailableView->firstChild();
+ TQListViewItem* category = _ui->mAvailableView->firstChild();
while(category)
{
if( category->text(0)!=i18n("Distribution Lists") )
{
- QListViewItem* item = category->firstChild();
+ TQListViewItem* item = category->firstChild();
while(item)
{
if(showAll)
@@ -175,7 +175,7 @@ void KWMailMergeKABCConfig::filterChanged( const QString& txt )
}
else
{
- item->setVisible( item->text(0).contains( txt, false ) );
+ item->setVisible( item->text(0).tqcontains( txt, false ) );
}
item = item->nextSibling();
}
@@ -192,11 +192,11 @@ void KWMailMergeKABCConfig::filterChanged( const QString& txt )
void KWMailMergeKABCConfig::initSelectedAddressees()
{
- QStringList records = _db->singleRecords();
+ TQStringList records = _db->singleRecords();
- QListViewItem* category = _ui->mAvailableView->firstChild();
- QListViewItem* selected = _ui->mSelectedView->findItem(
- i18n("Single Entries"), 0, Qt::ExactMatch );
+ TQListViewItem* category = _ui->mAvailableView->firstChild();
+ TQListViewItem* selected = _ui->mSelectedView->tqfindItem(
+ i18n("Single Entries"), 0, TQt::ExactMatch );
while ( category && (records.count()>0) )
{
if( category->text(0) != i18n("Distribution Lists") )
@@ -210,10 +210,10 @@ void KWMailMergeKABCConfig::initSelectedAddressees()
KWMailMergeKABCConfigListItem* nextItem =
static_cast<KWMailMergeKABCConfigListItem*> ( item->nextSibling() );
- for( QStringList::Iterator itRecords = records.begin();
+ for( TQStringList::Iterator itRecords = records.begin();
itRecords != records.end(); ++itRecords )
{
- QString uid = *itRecords;
+ TQString uid = *itRecords;
if( item->text(-1) == uid )
{
selected->insertItem( item );
@@ -235,24 +235,24 @@ void KWMailMergeKABCConfig::initSelectedAddressees()
void KWMailMergeKABCConfig::initSelectedLists()
{
- QStringList lists = _db->lists();
+ TQStringList lists = _db->lists();
kdDebug() << "::initSelectedLists()" << lists.join(",") << endl;
- QListViewItem* l = _ui->mAvailableView->findItem(
- i18n("Distribution Lists"), 0, Qt::ExactMatch );
- QListViewItem* selected = _ui->mSelectedView->findItem(
- i18n("Distribution Lists"), 0, Qt::ExactMatch );
+ TQListViewItem* l = _ui->mAvailableView->tqfindItem(
+ i18n("Distribution Lists"), 0, TQt::ExactMatch );
+ TQListViewItem* selected = _ui->mSelectedView->tqfindItem(
+ i18n("Distribution Lists"), 0, TQt::ExactMatch );
- QListViewItem* item = ( l->firstChild() );
+ TQListViewItem* item = ( l->firstChild() );
while( item && (lists.count()>0) )
{
- QListViewItem* nextItem = item->nextSibling();
+ TQListViewItem* nextItem = item->nextSibling();
- for( QStringList::Iterator itLists = lists.begin();
+ for( TQStringList::Iterator itLists = lists.begin();
itLists != lists.end(); ++itLists )
{
- QString id = *itLists;
+ TQString id = *itLists;
if( item->text(0) == id )
{
selected->insertItem( item );
@@ -267,34 +267,34 @@ void KWMailMergeKABCConfig::initSelectedLists()
void KWMailMergeKABCConfig::initSlotSignalConnections()
{
- connect( this, SIGNAL( okClicked() ), SLOT( acceptSelection() ) );
- connect( _ui->mAddButton, SIGNAL( clicked() ), SLOT( addSelectedContacts() ) );
- connect( _ui->mAddressBook, SIGNAL( clicked() ), SLOT( launchAddressbook() ) );
-
- connect( _ui->mAvailableView, SIGNAL( doubleClicked( QListViewItem *, const QPoint &, int ) ),
- SLOT( addSelectedContacts() ) );
-
- connect( _ui->mFilterEdit, SIGNAL( textChanged(const QString &) ),
- SLOT( filterChanged(const QString &) ) );
- connect( _ui->mRemoveButton, SIGNAL( clicked() ), SLOT( removeSelectedContacts() ) );
- connect( _ui->mSaveList, SIGNAL( clicked() ), SLOT( saveDistributionList() ) );
- connect( _ui->mSelectedView, SIGNAL( doubleClicked( QListViewItem *, const QPoint &, int ) ),
- SLOT( removeSelectedContacts() ) );
+ connect( this, TQT_SIGNAL( okClicked() ), TQT_SLOT( acceptSelection() ) );
+ connect( _ui->mAddButton, TQT_SIGNAL( clicked() ), TQT_SLOT( addSelectedContacts() ) );
+ connect( _ui->mAddressBook, TQT_SIGNAL( clicked() ), TQT_SLOT( launchAddressbook() ) );
+
+ connect( _ui->mAvailableView, TQT_SIGNAL( doubleClicked( TQListViewItem *, const TQPoint &, int ) ),
+ TQT_SLOT( addSelectedContacts() ) );
+
+ connect( _ui->mFilterEdit, TQT_SIGNAL( textChanged(const TQString &) ),
+ TQT_SLOT( filterChanged(const TQString &) ) );
+ connect( _ui->mRemoveButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removeSelectedContacts() ) );
+ connect( _ui->mSaveList, TQT_SIGNAL( clicked() ), TQT_SLOT( saveDistributionList() ) );
+ connect( _ui->mSelectedView, TQT_SIGNAL( doubleClicked( TQListViewItem *, const TQPoint &, int ) ),
+ TQT_SLOT( removeSelectedContacts() ) );
}
void KWMailMergeKABCConfig::launchAddressbook() const
{
- kapp->startServiceByDesktopName( "kaddressbook", QString() );
+ kapp->startServiceByDesktopName( "kaddressbook", TQString() );
}
-void KWMailMergeKABCConfig::removeContact( QListViewItem* item )
+void KWMailMergeKABCConfig::removeContact( TQListViewItem* item )
{
- QStringList& categories = _usedCategories;
- QListViewItem* availableLists = _ui->mAvailableView->findItem(
- i18n("Distribution Lists"), 0, Qt::ExactMatch );
+ TQStringList& categories = _usedCategories;
+ TQListViewItem* availableLists = _ui->mAvailableView->tqfindItem(
+ i18n("Distribution Lists"), 0, TQt::ExactMatch );
if( item->depth() > 0 )
{
if( !item->text( -1 ).isEmpty() ) // remove selected single entry here
@@ -302,14 +302,14 @@ void KWMailMergeKABCConfig::removeContact( QListViewItem* item )
KWMailMergeKABCConfigListItem* rightItem =
static_cast<KWMailMergeKABCConfigListItem*> ( item );
- QStringList entryCategories = rightItem->addressee().categories();
- for ( QStringList::Iterator itEntryCat = entryCategories.begin();
+ TQStringList entryCategories = rightItem->addressee().categories();
+ for ( TQStringList::Iterator itEntryCat = entryCategories.begin();
itEntryCat != entryCategories.end(); ++itEntryCat )
{
- int i = categories.findIndex(*itEntryCat);
+ int i = categories.tqfindIndex(*itEntryCat);
if( i == -1 )
{
- QListViewItem* category = new QListViewItem( _ui->mAvailableView,
+ TQListViewItem* category = new TQListViewItem( _ui->mAvailableView,
*itEntryCat );
categories.append( *itEntryCat );
@@ -320,23 +320,23 @@ void KWMailMergeKABCConfig::removeContact( QListViewItem* item )
{
KWMailMergeKABCConfigListItem* leftItem = new
KWMailMergeKABCConfigListItem(
- _ui->mAvailableView->findItem(
+ _ui->mAvailableView->tqfindItem(
*itEntryCat, 0,
- Qt::ExactMatch),
+ TQt::ExactMatch),
rightItem->addressee() );
}
}
if( entryCategories.isEmpty() )
{
- QString noCat = i18n("no category");
+ TQString noCat = i18n("no category");
KWMailMergeKABCConfigListItem* leftItem = new KWMailMergeKABCConfigListItem(
- _ui->mAvailableView->findItem(
- noCat, 0, Qt::ExactMatch),
+ _ui->mAvailableView->tqfindItem(
+ noCat, 0, TQt::ExactMatch),
rightItem->addressee() );
}
delete item;
}
- else if( item->parent()->text(0) == i18n("Distribution Lists") ) // remove a list
+ else if( item->tqparent()->text(0) == i18n("Distribution Lists") ) // remove a list
{
if( availableLists )
availableLists->insertItem( item );
@@ -346,7 +346,7 @@ void KWMailMergeKABCConfig::removeContact( QListViewItem* item )
void KWMailMergeKABCConfig::removeSelectedContacts()
{
- QListViewItemIterator it( _ui->mSelectedView, QListViewItemIterator::Selected );
+ TQListViewItemIterator it( _ui->mSelectedView, TQListViewItemIterator::Selected );
while( it.current() )
{
@@ -364,9 +364,9 @@ void KWMailMergeKABCConfig::saveDistributionList()
dlm.load();
bool ok = false;
- QString listName = KInputDialog::getText( i18n("New Distribution List"),
+ TQString listName = KInputDialog::getText( i18n("New Distribution List"),
i18n("Please enter name:"),
- QString::null, &ok,
+ TQString(), &ok,
this );
if ( !ok || listName.isEmpty() )
return;
@@ -376,15 +376,15 @@ void KWMailMergeKABCConfig::saveDistributionList()
KMessageBox::information( 0,
i18n( "<qt>Distribution list with the given name <b>%1</b> "
"already exists. Please select a different name.</qt>" )
- .arg( listName ) );
+ .tqarg( listName ) );
return;
}
KABC::DistributionList *distList = new KABC::DistributionList( &dlm, listName );
- QListViewItem* newListItem = new QListViewItem( _ui->mSelectedView->findItem(
- i18n("Distribution Lists"),0 , Qt::ExactMatch), listName );
+ TQListViewItem* newListItem = new TQListViewItem( _ui->mSelectedView->tqfindItem(
+ i18n("Distribution Lists"),0 , TQt::ExactMatch), listName );
- QListViewItem* category = _ui->mSelectedView->firstChild();
+ TQListViewItem* category = _ui->mSelectedView->firstChild();
while(category)
{
if( category->text(0)==i18n("Single Entries") )
@@ -397,15 +397,15 @@ void KWMailMergeKABCConfig::saveDistributionList()
distList->insertEntry( item->addressee() );
KABC::Addressee addr = item->addressee();
- QString formattedName = addr.formattedName();
- QListViewItem* newItem = new QListViewItem(
+ TQString formattedName = addr.formattedName();
+ TQListViewItem* newItem = new TQListViewItem(
newListItem, item->addressee().formattedName() );
newItem->setEnabled( false );
item = static_cast<KWMailMergeKABCConfigListItem*>( item->nextSibling() );
}
- QListViewItemIterator it ( category->firstChild() );
+ TQListViewItemIterator it ( category->firstChild() );
while( it.current() )
{
removeContact( it.current() );
@@ -428,10 +428,10 @@ void KWMailMergeKABCConfig::updateAvailable()
//
// First append the addressees.
//
- QListViewItem* noCategory = new QListViewItem( _ui->mAvailableView,
+ TQListViewItem* noCategory = new TQListViewItem( _ui->mAvailableView,
i18n("no category") );
- QStringList& categories = _usedCategories ;
+ TQStringList& categories = _usedCategories ;
categories.clear();
KABC::AddressBook *addressBook = KABC::StdAddressBook::self();
@@ -439,16 +439,16 @@ void KWMailMergeKABCConfig::updateAvailable()
itAddr != addressBook->end(); ++itAddr )
{
- QStringList entryCategories = itAddr->categories();
- for ( QStringList::Iterator itCat = entryCategories.begin();
+ TQStringList entryCategories = itAddr->categories();
+ for ( TQStringList::Iterator itCat = entryCategories.begin();
itCat != entryCategories.end(); ++itCat )
{
- int i = categories.findIndex(*itCat);
+ int i = categories.tqfindIndex(*itCat);
// Create category, if not yet in listview and append item to it.
if( i == -1 )
{
- QListViewItem* category = new QListViewItem( _ui->mAvailableView, *itCat );
+ TQListViewItem* category = new TQListViewItem( _ui->mAvailableView, *itCat );
categories.append( *itCat );
KWMailMergeKABCConfigListItem* item = new KWMailMergeKABCConfigListItem(
@@ -458,8 +458,8 @@ void KWMailMergeKABCConfig::updateAvailable()
else
{
KWMailMergeKABCConfigListItem* item = new KWMailMergeKABCConfigListItem(
- _ui->mAvailableView->findItem(
- *itCat, 0, Qt::ExactMatch),
+ _ui->mAvailableView->tqfindItem(
+ *itCat, 0, TQt::ExactMatch),
*itAddr );
}
@@ -478,11 +478,11 @@ void KWMailMergeKABCConfig::updateAvailable()
KABC::DistributionListManager dlm ( addressBook );
dlm.load();
- QStringList distributionLists = dlm.listNames();
- QListViewItem* distributionListsItem = new QListViewItem( _ui->mAvailableView,
+ TQStringList distributionLists = dlm.listNames();
+ TQListViewItem* distributionListsItem = new TQListViewItem( _ui->mAvailableView,
i18n("Distribution Lists") );
- QStringList::Iterator itDistributionLists;
+ TQStringList::Iterator itDistributionLists;
for( itDistributionLists = distributionLists.begin();
itDistributionLists != distributionLists.end(); ++itDistributionLists )
@@ -491,15 +491,15 @@ void KWMailMergeKABCConfig::updateAvailable()
KABC::DistributionList::Entry::List entries = list->entries();
- QListViewItem* listItem = new QListViewItem( distributionListsItem,
+ TQListViewItem* listItem = new TQListViewItem( distributionListsItem,
*itDistributionLists );
KABC::DistributionList::Entry::List::Iterator itList;
for ( itList = entries.begin(); itList != entries.end(); ++itList )
{
- // Create a normal QListViewItem and disable it, because this is not a
+ // Create a normal TQListViewItem and disable it, because this is not a
// distribution-list-editor. KAddressbook should be used instead.
- QListViewItem* item = new QListViewItem(
+ TQListViewItem* item = new TQListViewItem(
listItem, (*itList).addressee.formattedName() );
item->setEnabled( false );
}
@@ -509,15 +509,15 @@ void KWMailMergeKABCConfig::updateAvailable()
-KWMailMergeKABCConfigListItem::KWMailMergeKABCConfigListItem( QListView *parent,
- const KABC::Addressee& addressEntry ) : QListViewItem( parent )
+KWMailMergeKABCConfigListItem::KWMailMergeKABCConfigListItem( TQListView *tqparent,
+ const KABC::Addressee& addressEntry ) : TQListViewItem( tqparent )
{
setText( 0, addressEntry.formattedName() );
_addressEntry = addressEntry;
}
-KWMailMergeKABCConfigListItem::KWMailMergeKABCConfigListItem( QListViewItem *parent,
- const KABC::Addressee& addressEntry ) : QListViewItem( parent )
+KWMailMergeKABCConfigListItem::KWMailMergeKABCConfigListItem( TQListViewItem *tqparent,
+ const KABC::Addressee& addressEntry ) : TQListViewItem( tqparent )
{
setText( 0, addressEntry.formattedName() );
_addressEntry = addressEntry;
@@ -531,7 +531,7 @@ KABC::Addressee KWMailMergeKABCConfigListItem::addressee() const
return _addressEntry;
}
-QString KWMailMergeKABCConfigListItem::text( int column ) const
+TQString KWMailMergeKABCConfigListItem::text( int column ) const
{
if( column == -1 )
{
@@ -539,7 +539,7 @@ QString KWMailMergeKABCConfigListItem::text( int column ) const
}
else
{
- return QListViewItem::text( column );
+ return TQListViewItem::text( column );
}
}
diff --git a/kword/mailmerge/kabc/KWMailMergeKABCConfig.h b/kword/mailmerge/kabc/KWMailMergeKABCConfig.h
index 335574b8..32fe74cd 100644
--- a/kword/mailmerge/kabc/KWMailMergeKABCConfig.h
+++ b/kword/mailmerge/kabc/KWMailMergeKABCConfig.h
@@ -34,8 +34,9 @@ class KWMailMergeKABC;
class KWMailMergeKABCConfig: public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWMailMergeKABCConfig( QWidget *parent, KWMailMergeKABC *db_ );
+ KWMailMergeKABCConfig( TQWidget *tqparent, KWMailMergeKABC *db_ );
virtual ~KWMailMergeKABCConfig();
@@ -57,14 +58,14 @@ private slots:
void launchAddressbook() const;
/**
- Updates the parent's mail merge list from items in the right Listview.
+ Updates the tqparent's mail merge list from items in the right Listview.
*/
void acceptSelection();
/**
Hides items in the left listview, which are not matching @p txt.
*/
- void filterChanged( const QString& txt );
+ void filterChanged( const TQString& txt );
/**
Saves the selected single entries to a new KABC::DistributionList in KAddressbook.
@@ -79,7 +80,7 @@ private:
/**
Store all categories used in the addressbook, to avoid some iterator cycles.
*/
- QStringList _usedCategories;
+ TQStringList _usedCategories;
/**
The mail merge list.
@@ -87,17 +88,17 @@ private:
KWMailMergeKABC *_db;
/**
- Removes duplicates in the left QListView, when moving an item to the right.
+ Removes duplicates in the left TQListView, when moving an item to the right.
*/
- void destroyAvailableClones( const QString& uid );
+ void destroyAvailableClones( const TQString& uid );
/**
- Appends the previously selected entries to the right QListView.
+ Appends the previously selected entries to the right TQListView.
*/
void initSelectedAddressees();
/**
- Appends the previously selected distribution lists to the right QListView.
+ Appends the previously selected distribution lists to the right TQListView.
*/
void initSelectedLists();
@@ -111,22 +112,22 @@ private:
Called by KWMailMergeKABCConfig::removeSelectedContacts().
*/
- void removeContact( QListViewItem* item );
+ void removeContact( TQListViewItem* item );
/**
Appends all KAddressbook entries in KABC::StdAddressBook::self() and all
- KABC::DistributionLists to the left QListView.
+ KABC::DistributionLists to the left TQListView.
*/
void updateAvailable();
};
-class KWMailMergeKABCConfigListItem : public QListViewItem
+class KWMailMergeKABCConfigListItem : public TQListViewItem
{
public:
- KWMailMergeKABCConfigListItem( QListView *parent, const KABC::Addressee& addressEntry );
- KWMailMergeKABCConfigListItem( QListViewItem *parent, const KABC::Addressee& addressEntry );
+ KWMailMergeKABCConfigListItem( TQListView *tqparent, const KABC::Addressee& addressEntry );
+ KWMailMergeKABCConfigListItem( TQListViewItem *tqparent, const KABC::Addressee& addressEntry );
virtual ~KWMailMergeKABCConfigListItem();
/**
@@ -135,11 +136,11 @@ public:
KABC::Addressee addressee() const;
/**
- This is an overloaded member function of QListViewItem::text( int column ).
+ This is an overloaded member function of TQListViewItem::text( int column ).
It Returns the KABC::Addressee::uid(), if column is set to -1.
- Otherwise QListViewItem::text( int column ) is returned.
+ Otherwise TQListViewItem::text( int column ) is returned.
*/
- QString text( int column ) const;
+ TQString text( int column ) const;
private:
diff --git a/kword/mailmerge/kabc/addresspicker.ui b/kword/mailmerge/kabc/addresspicker.ui
index ec179c3b..40521704 100644
--- a/kword/mailmerge/kabc/addresspicker.ui
+++ b/kword/mailmerge/kabc/addresspicker.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>AddressPickerUI</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>AddressPickerUI</cstring>
</property>
@@ -19,9 +19,9 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="1" column="1">
+ <widget class="TQLayoutWidget" row="1" column="1">
<property name="name">
- <cstring>layout10</cstring>
+ <cstring>tqlayout10</cstring>
</property>
<vbox>
<property name="name">
@@ -37,7 +37,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>16</height>
@@ -76,7 +76,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
@@ -85,7 +85,7 @@
</spacer>
</vbox>
</widget>
- <widget class="QPushButton" row="2" column="2">
+ <widget class="TQPushButton" row="2" column="2">
<property name="name">
<cstring>mSaveList</cstring>
</property>
@@ -99,15 +99,15 @@
<string>Save selected single entries to a new distribution list.</string>
</property>
</widget>
- <widget class="QLayoutWidget" row="2" column="0">
+ <widget class="TQLayoutWidget" row="2" column="0">
<property name="name">
- <cstring>layout1</cstring>
+ <cstring>tqlayout1</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>TextLabel2</cstring>
</property>
@@ -118,7 +118,7 @@
<cstring>mFilterEdit</cstring>
</property>
</widget>
- <widget class="QLineEdit">
+ <widget class="TQLineEdit">
<property name="name">
<cstring>mFilterEdit</cstring>
</property>
@@ -194,7 +194,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QPushButton" row="2" column="1">
+ <widget class="TQPushButton" row="2" column="1">
<property name="name">
<cstring>mAddressBook</cstring>
</property>
@@ -205,7 +205,7 @@
<string>Launch KAddressbook</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -217,14 +217,14 @@
<property name="text">
<string>&amp;Address Book</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>WordBreak|AlignCenter</set>
</property>
<property name="buddy" stdset="0">
<cstring>mAvailableView</cstring>
</property>
</widget>
- <widget class="QLabel" row="0" column="2">
+ <widget class="TQLabel" row="0" column="2">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -236,7 +236,7 @@
<property name="text">
<string>&amp;Selected Addresses</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>WordBreak|AlignCenter</set>
</property>
<property name="buddy" stdset="0">
@@ -287,7 +287,7 @@
</widget>
</grid>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kpushbutton.h</includehint>
<includehint>kpushbutton.h</includehint>
diff --git a/kword/mailmerge/kspread/kwmailmerge_kspread.cpp b/kword/mailmerge/kspread/kwmailmerge_kspread.cpp
index 738cf6d7..518699a8 100644
--- a/kword/mailmerge/kspread/kwmailmerge_kspread.cpp
+++ b/kword/mailmerge/kspread/kwmailmerge_kspread.cpp
@@ -29,8 +29,8 @@
using namespace KSpread;
-KWMailMergeKSpread::KWMailMergeKSpread( KInstance *instance, QObject *parent )
- : KWMailMergeDataSource( instance, parent ), _spreadSheetNumber( 1 )
+KWMailMergeKSpread::KWMailMergeKSpread( KInstance *instance, TQObject *tqparent )
+ : KWMailMergeDataSource( instance, tqparent ), _spreadSheetNumber( 1 )
{
}
@@ -43,7 +43,7 @@ int KWMailMergeKSpread::getNumRecords() const
return rows() - 2;
}
-QString KWMailMergeKSpread::getValue( const QString &name, int record ) const
+TQString KWMailMergeKSpread::getValue( const TQString &name, int record ) const
{
if ( record < 0 )
return name;
@@ -53,29 +53,29 @@ QString KWMailMergeKSpread::getValue( const QString &name, int record ) const
if ( cell )
return cellText( cell );
else
- return i18n( "Unkown mail merge variable: %1" ).arg( name );
+ return i18n( "Unkown mail merge variable: %1" ).tqarg( name );
}
-void KWMailMergeKSpread::load( QDomElement& parentElem )
+void KWMailMergeKSpread::load( TQDomElement& tqparentElem )
{
- QDomNode contentNode = parentElem.namedItem( "CONTENT" );
+ TQDomNode contentNode = tqparentElem.namedItem( "CONTENT" );
if ( contentNode.isNull() )
return;
- QDomElement element = contentNode.toElement();
+ TQDomElement element = contentNode.toElement();
if ( element.isNull() )
return;
- _url = element.attribute( QString::fromLatin1( "URL" ) );
- _spreadSheetNumber = element.attribute( QString::fromLatin1( "SpreadSheetNumber" ) ).toInt();
+ _url = element.attribute( TQString::tqfromLatin1( "URL" ) );
+ _spreadSheetNumber = element.attribute( TQString::tqfromLatin1( "SpreadSheetNumber" ) ).toInt();
initDocument();
}
-void KWMailMergeKSpread::save( QDomDocument& doc, QDomElement& parent )
+void KWMailMergeKSpread::save( TQDomDocument& doc, TQDomElement& tqparent )
{
- QDomElement content = doc.createElement( QString::fromLatin1( "CONTENT" ) );
- parent.appendChild( content );
+ TQDomElement content = doc.createElement( TQString::tqfromLatin1( "CONTENT" ) );
+ tqparent.appendChild( content );
content.setAttribute( "URL", _url.url() );
content.setAttribute( "SpreadSheetNumber", _spreadSheetNumber );
@@ -85,9 +85,9 @@ void KWMailMergeKSpread::refresh( bool )
{
}
-bool KWMailMergeKSpread::showConfigDialog( QWidget *parent, int )
+bool KWMailMergeKSpread::showConfigDialog( TQWidget *tqparent, int )
{
- KWMailMergeKSpreadConfig dlg( parent, this );
+ KWMailMergeKSpreadConfig dlg( tqparent, this );
int retval = dlg.exec();
if ( retval )
@@ -100,7 +100,7 @@ void KWMailMergeKSpread::initDocument()
{
_document = new Doc();
- connect( _document, SIGNAL( completed() ), SLOT( initSpreadSheets() ) );
+ connect( _document, TQT_SIGNAL( completed() ), TQT_SLOT( initSpreadSheets() ) );
_document->openURL( _url );
}
@@ -111,7 +111,7 @@ void KWMailMergeKSpread::initSpreadSheets()
_columnMap.clear();
sampleRecord.clear();
- QPtrListIterator<Sheet> it( _document->map()->sheetList() );
+ TQPtrListIterator<Sheet> it( _document->map()->sheetList() );
int counter = 0;
for ( it.toFirst(); it.current(), counter < _spreadSheetNumber; ++it ) {
_sheet = it.current();
@@ -172,9 +172,9 @@ int KWMailMergeKSpread::columns() const
return col;
}
-QString KWMailMergeKSpread::cellText( const Cell *cell ) const
+TQString KWMailMergeKSpread::cellText( const Cell *cell ) const
{
- QString text = QString::null;
+ TQString text = TQString();
if ( !cell->isDefault() && !cell->isEmpty() ) {
if ( cell->isFormula() )
@@ -202,9 +202,9 @@ QString KWMailMergeKSpread::cellText( const Cell *cell ) const
extern "C"
{
- KWORD_MAILMERGE_EXPORT KWMailMergeDataSource *create_kwmailmerge_kspread( KInstance *instance, QObject *parent )
+ KWORD_MAILMERGE_EXPORT KWMailMergeDataSource *create_kwmailmerge_kspread( KInstance *instance, TQObject *tqparent )
{
- return new KWMailMergeKSpread( instance, parent );
+ return new KWMailMergeKSpread( instance, tqparent );
}
}
diff --git a/kword/mailmerge/kspread/kwmailmerge_kspread.h b/kword/mailmerge/kspread/kwmailmerge_kspread.h
index 2d639074..2b039c01 100644
--- a/kword/mailmerge/kspread/kwmailmerge_kspread.h
+++ b/kword/mailmerge/kspread/kwmailmerge_kspread.h
@@ -21,8 +21,8 @@
#ifndef _KWMAILMERGE_KSPREAD_H_
#define _KWMAILMERGE_KSPREAD_H_
-#include <qdom.h>
-#include <qmap.h>
+#include <tqdom.h>
+#include <tqmap.h>
#include <kspread_doc.h>
#include <kspread_sheet.h>
@@ -32,20 +32,21 @@
class KWMailMergeKSpread: public KWMailMergeDataSource
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWMailMergeKSpread( KInstance *inst, QObject *parent );
+ KWMailMergeKSpread( KInstance *inst, TQObject *tqparent );
~KWMailMergeKSpread();
/**
Saves the mail merge list to the kword document.
*/
- virtual void save( QDomDocument&, QDomElement& );
+ virtual void save( TQDomDocument&, TQDomElement& );
/**
Loads the mail merge list stored in the kword document.
*/
- virtual void load( QDomElement& );
+ virtual void load( TQDomElement& );
/**
@param name The name of the value e.g. "Family name".
@@ -54,7 +55,7 @@ class KWMailMergeKSpread: public KWMailMergeDataSource
If @p record equals -1, @p name is returned.
*/
- virtual class QString getValue( const class QString &name, int record = -1 ) const;
+ virtual class TQString getValue( const class TQString &name, int record = -1 ) const;
/**
@return The number of available contacts in mail merge list.
@@ -71,7 +72,7 @@ class KWMailMergeKSpread: public KWMailMergeDataSource
/**
Shows a KWMailMergeKSpreadConfig dialog for selecting entries from KAddressbook.
*/
- virtual bool showConfigDialog( QWidget*, int action);
+ virtual bool showConfigDialog( TQWidget*, int action);
void setURL( const KURL &url ) { _url = url; }
@@ -92,14 +93,14 @@ class KWMailMergeKSpread: public KWMailMergeDataSource
int rows() const;
int columns() const;
- QString cellText( const KSpread::Cell* ) const;
+ TQString cellText( const KSpread::Cell* ) const;
KSpread::Doc *_document;
KSpread::Sheet* _sheet;
KURL _url;
int _spreadSheetNumber;
- QMap<QString, int> _columnMap;
+ TQMap<TQString, int> _columnMap;
};
#endif
diff --git a/kword/mailmerge/kspread/kwmailmerge_kspread_config.cpp b/kword/mailmerge/kspread/kwmailmerge_kspread_config.cpp
index fc170780..00f1ba20 100644
--- a/kword/mailmerge/kspread/kwmailmerge_kspread_config.cpp
+++ b/kword/mailmerge/kspread/kwmailmerge_kspread_config.cpp
@@ -19,8 +19,8 @@
*/
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kcombobox.h>
#include <klineedit.h>
@@ -34,9 +34,9 @@
using namespace KSpread;
-KWMailMergeKSpreadConfig::KWMailMergeKSpreadConfig( QWidget *parent, KWMailMergeKSpread *object )
+KWMailMergeKSpreadConfig::KWMailMergeKSpreadConfig( TQWidget *tqparent, KWMailMergeKSpread *object )
: KDialogBase( Plain, i18n( "Mail Merge - Editor" ),
- Ok | Cancel, Ok, parent, "", true ),
+ Ok | Cancel, Ok, tqparent, "", true ),
_document( 0 ), _initialPage( 1 )
{
_object = object;
@@ -46,8 +46,8 @@ KWMailMergeKSpreadConfig::KWMailMergeKSpreadConfig( QWidget *parent, KWMailMerge
_urlRequester->setURL( _object->url().url() );
_initialPage = _object->spreadSheetNumber();
- connect( _urlRequester, SIGNAL( urlSelected( const QString& ) ),
- SLOT( loadDocument() ) );
+ connect( _urlRequester, TQT_SIGNAL( urlSelected( const TQString& ) ),
+ TQT_SLOT( loadDocument() ) );
loadDocument();
slotTextChanged( _urlRequester->lineEdit()->text() );
@@ -75,7 +75,7 @@ void KWMailMergeKSpreadConfig::loadDocument()
if ( !_urlRequester->url().isEmpty() ) {
_document = new Doc();
- connect( _document, SIGNAL( completed() ), SLOT( documentLoaded() ) );
+ connect( _document, TQT_SIGNAL( completed() ), TQT_SLOT( documentLoaded() ) );
_document->openURL( _urlRequester->url() );
}
@@ -85,39 +85,39 @@ void KWMailMergeKSpreadConfig::documentLoaded()
{
_pageNumber->clear();
- QPtrListIterator<Sheet> it( _document->map()->sheetList() );
+ TQPtrListIterator<Sheet> it( _document->map()->sheetList() );
int counter = 1;
for ( it.toFirst(); it.current(); ++it ) {
- _pageNumber->insertItem( QString::number( counter ) );
+ _pageNumber->insertItem( TQString::number( counter ) );
counter++;
}
_pageNumber->setEnabled( true );
- _pageNumber->setCurrentText( QString::number( _initialPage ) );
+ _pageNumber->setCurrentText( TQString::number( _initialPage ) );
}
void KWMailMergeKSpreadConfig::initGUI()
{
- QFrame *page = plainPage();
+ TQFrame *page = plainPage();
- QGridLayout *layout = new QGridLayout( page, 2, 2, marginHint(), spacingHint() );
+ TQGridLayout *tqlayout = new TQGridLayout( page, 2, 2, marginHint(), spacingHint() );
- QLabel *label = new QLabel( i18n( "URL:" ), page );
- layout->addWidget( label, 0, 0 );
+ TQLabel *label = new TQLabel( i18n( "URL:" ), page );
+ tqlayout->addWidget( label, 0, 0 );
_urlRequester = new KURLRequester( page );
- layout->addWidget( _urlRequester, 0, 1 );
+ tqlayout->addWidget( _urlRequester, 0, 1 );
- label = new QLabel( i18n( "Page number:" ), page );
- layout->addWidget( label, 1, 0 );
+ label = new TQLabel( i18n( "Page number:" ), page );
+ tqlayout->addWidget( label, 1, 0 );
_pageNumber = new KComboBox( page );
_pageNumber->setEnabled( false );
- layout->addWidget( _pageNumber, 1, 1 );
- connect( _urlRequester->lineEdit() , SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotTextChanged( const QString & ) ) );
+ tqlayout->addWidget( _pageNumber, 1, 1 );
+ connect( _urlRequester->lineEdit() , TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotTextChanged( const TQString & ) ) );
}
-void KWMailMergeKSpreadConfig::slotTextChanged( const QString & _text )
+void KWMailMergeKSpreadConfig::slotTextChanged( const TQString & _text )
{
enableButtonOK( !_text.isEmpty() );
}
diff --git a/kword/mailmerge/kspread/kwmailmerge_kspread_config.h b/kword/mailmerge/kspread/kwmailmerge_kspread_config.h
index 6aacff63..31706e76 100644
--- a/kword/mailmerge/kspread/kwmailmerge_kspread_config.h
+++ b/kword/mailmerge/kspread/kwmailmerge_kspread_config.h
@@ -33,9 +33,10 @@ class KWMailMergeKSpread;
class KWMailMergeKSpreadConfig: public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWMailMergeKSpreadConfig( QWidget *parent, KWMailMergeKSpread *object );
+ KWMailMergeKSpreadConfig( TQWidget *tqparent, KWMailMergeKSpread *object );
virtual ~KWMailMergeKSpreadConfig();
@@ -44,7 +45,7 @@ class KWMailMergeKSpreadConfig: public KDialogBase
void loadDocument();
void documentLoaded();
- void slotTextChanged( const QString & _text );
+ void slotTextChanged( const TQString & _text );
private:
void initGUI();
diff --git a/kword/mailmerge/sql/KWMySqlCursor.h b/kword/mailmerge/sql/KWMySqlCursor.h
index e5e998b6..a7843f6a 100644
--- a/kword/mailmerge/sql/KWMySqlCursor.h
+++ b/kword/mailmerge/sql/KWMySqlCursor.h
@@ -17,12 +17,12 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef _SERIALLETTER_QtSql_SQLCURSOR_H_
-#define _SERIALLETTER_QtSql_SQLCURSOR_H_
+#ifndef _SERIALLETTER_TQtSql_STQLCURSOR_H_
+#define _SERIALLETTER_TQtSql_STQLCURSOR_H_
/* FOR THE DIRTY HACK */
-#include <qsqlcursor.h>
-#include <qsqldriver.h>
+#include <tqsqlcursor.h>
+#include <tqsqldriver.h>
/* END FOR THE DIRTY HACK */
/******************************************************************
@@ -34,35 +34,35 @@
-class KWMySqlCursor: public QSqlCursor
+class KWMySqlCursor: public TQSqlCursor
{
public:
- KWMySqlCursor( const QString & query = QString::null, bool autopopulate =
-TRUE, QSqlDatabase* db = 0 ): QSqlCursor( QString::null, autopopulate, db )
+ KWMySqlCursor( const TQString & query = TQString(), bool autopopulate =
+TRUE, TQSqlDatabase* db = 0 ): TQSqlCursor( TQString(), autopopulate, db )
{
exec( query );
if ( autopopulate )
- *(QSqlRecord*)this = ((QSqlQuery*)this)->driver()->record(
-*(QSqlQuery*)this );
- setMode( QSqlCursor::ReadOnly );
+ *(TQSqlRecord*)this = ((TQSqlQuery*)this)->driver()->record(
+*(TQSqlQuery*)this );
+ setMode( TQSqlCursor::ReadOnly );
}
- KWMySqlCursor( const KWMySqlCursor & other ): QSqlCursor( other ) {}
- KWMySqlCursor( const QSqlQuery & query, bool autopopulate = TRUE ):
-QSqlCursor( QString::null, autopopulate )
+ KWMySqlCursor( const KWMySqlCursor & other ): TQSqlCursor( other ) {}
+ KWMySqlCursor( const TQSqlQuery & query, bool autopopulate = TRUE ):
+TQSqlCursor( TQString(), autopopulate )
{
- *(QSqlQuery*)this = query;
+ *(TQSqlQuery*)this = query;
if ( autopopulate )
- *(QSqlRecord*)this = query.driver()->record( query );
- setMode( QSqlCursor::ReadOnly );
+ *(TQSqlRecord*)this = query.driver()->record( query );
+ setMode( TQSqlCursor::ReadOnly );
}
- bool select( const QString & /*filter*/, const QSqlIndex & /*sort*/ =
-QSqlIndex() ) { return exec( lastQuery() ); }
- QSqlIndex primaryIndex( bool /*prime*/ = TRUE ) const { return
-QSqlIndex(); }
- int insert( bool /*invalidate*/ = TRUE ) { return FALSE; }
- int update( bool /*invalidate*/ = TRUE ) { return FALSE; }
- int del( bool /*invalidate*/ = TRUE ) { return FALSE; }
- void setName( const QString& /*name*/, bool /*autopopulate*/ = TRUE ) {}
+ bool select( const TQString & /*filter*/, const TQSqlIndex & /*sort*/ =
+TQSqlIndex() ) { return exec( lastQuery() ); }
+ TQSqlIndex primaryIndex( bool /*prime*/ = TRUE ) const { return
+TQSqlIndex(); }
+ int insert( bool /*tqinvalidate*/ = TRUE ) { return FALSE; }
+ int update( bool /*tqinvalidate*/ = TRUE ) { return FALSE; }
+ int del( bool /*tqinvalidate*/ = TRUE ) { return FALSE; }
+ void setName( const TQString& /*name*/, bool /*autopopulate*/ = TRUE ) {}
};
diff --git a/kword/mailmerge/sql/KWQtSqlEasyFilter.cpp b/kword/mailmerge/sql/KWQtSqlEasyFilter.cpp
index 0f5e5ffb..c2c14249 100644
--- a/kword/mailmerge/sql/KWQtSqlEasyFilter.cpp
+++ b/kword/mailmerge/sql/KWQtSqlEasyFilter.cpp
@@ -1,19 +1,19 @@
-#include "KWQtSqlEasyFilter.h"
-#include "KWQtSqlEasyFilter.moc"
-#include <qtable.h>
-#include <qscrollview.h>
+#include "KWTQtSqlEasyFilter.h"
+#include "KWTQtSqlEasyFilter.moc"
+#include <tqtable.h>
+#include <tqscrollview.h>
#include <klocale.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
-KWQtSqlEasyFilter::KWQtSqlEasyFilter( QWidget *parent)
- :KDialogBase( Swallow, i18n( "Mail Merge - Editor" ), Ok | Cancel, Ok, parent, "", true)
+KWTQtSqlEasyFilter::KWTQtSqlEasyFilter( TQWidget *tqparent)
+ :KDialogBase( Swallow, i18n( "Mail Merge - Editor" ), Ok | Cancel, Ok, tqparent, "", true)
{
m_fieldList << "" <<"one" << "two" << "three" << "four";
m_sortingList << ""<<i18n("ascending")<<i18n("descending");
- m_operationList <<"="<<i18n("contains")<< "<" << ">";
+ m_operationList <<"="<<i18n("tqcontains")<< "<" << ">";
- m_table=new QTable(6,3,this);
+ m_table=new TQTable(6,3,this);
setMainWidget(m_table);
m_table->verticalHeader()->setLabel(0,i18n("Field"));
@@ -22,7 +22,7 @@ KWQtSqlEasyFilter::KWQtSqlEasyFilter( QWidget *parent)
m_table->verticalHeader()->setLabel(3,i18n("Operator"));
m_table->verticalHeader()->setLabel(4,i18n("Condition"));
m_table->verticalHeader()->setLabel(5,i18n("Value"));
- m_table->setSelectionMode(QTable::NoSelection);
+ m_table->setSelectionMode(TQTable::NoSelection);
m_table->setColumnMovingEnabled(true);
m_table->setSorting(false);
@@ -33,35 +33,35 @@ KWQtSqlEasyFilter::KWQtSqlEasyFilter( QWidget *parent)
int h=m_table->rowHeight(0);
for (int i=0;i<6;i++) h+=m_table->rowHeight(i);
- h+=m_table->horizontalHeader()->sizeHint().height();
+ h+=m_table->horizontalHeader()->tqsizeHint().height();
m_table->setMinimumHeight(h);
int w=0;
for (int i=0;i<3;i++) w+=m_table->columnWidth(i);
w+=m_table->verticalHeader()->headerWidth();
m_table->setMinimumWidth(w);
- connect(m_table,SIGNAL(valueChanged ( int, int)),this,SLOT(slotValueChanged ( int, int)));
+ connect(m_table,TQT_SIGNAL(valueChanged ( int, int)),this,TQT_SLOT(slotValueChanged ( int, int)));
}
-void KWQtSqlEasyFilter::createColumn(int i)
+void KWTQtSqlEasyFilter::createColumn(int i)
{
- QTableItem *it;
- m_table->setItem(0,i,it=new QComboTableItem(m_table,m_fieldList,false));
- m_table->setItem(1,i,it=new QComboTableItem(m_table,m_sortingList,false));
+ TQTableItem *it;
+ m_table->setItem(0,i,it=new TQComboTableItem(m_table,m_fieldList,false));
+ m_table->setItem(1,i,it=new TQComboTableItem(m_table,m_sortingList,false));
it->setEnabled(false);
- m_table->setItem(2,i,it=new QCheckTableItem(m_table,i18n("Yes")));
+ m_table->setItem(2,i,it=new TQCheckTableItem(m_table,i18n("Yes")));
it->setEnabled(false);
- m_table->setItem(3,i,it=new QCheckTableItem(m_table,i18n("NOT")));
+ m_table->setItem(3,i,it=new TQCheckTableItem(m_table,i18n("NOT")));
it->setEnabled(false);
- m_table->setItem(4,i,it=new QComboTableItem(m_table,m_operationList,false));
+ m_table->setItem(4,i,it=new TQComboTableItem(m_table,m_operationList,false));
it->setEnabled(false);
- m_table->setItem(5,i,it=new QTableItem(m_table,QTableItem::WhenCurrent,""));
+ m_table->setItem(5,i,it=new TQTableItem(m_table,TQTableItem::WhenCurrent,""));
it->setEnabled(false);
m_table->ensureCellVisible(0,i);
}
-void KWQtSqlEasyFilter::slotValueChanged ( int row, int col )
+void KWTQtSqlEasyFilter::slotValueChanged ( int row, int col )
{
switch (row)
{
@@ -75,7 +75,7 @@ void KWQtSqlEasyFilter::slotValueChanged ( int row, int col )
}
m_table->item(1,col)->setEnabled(true);
m_table->item(2,col)->setEnabled(true);
- bool enableSearch=(static_cast<QCheckTableItem*>(m_table->item(2,col))->isChecked());
+ bool enableSearch=(static_cast<TQCheckTableItem*>(m_table->item(2,col))->isChecked());
m_table->item(3,col)->setEnabled(enableSearch);
m_table->item(4,col)->setEnabled(enableSearch);
m_table->item(5,col)->setEnabled(enableSearch);
@@ -86,7 +86,7 @@ void KWQtSqlEasyFilter::slotValueChanged ( int row, int col )
}
break;
case 2:
- bool enSearch=static_cast<QCheckTableItem*>(m_table->item(row,col))->isChecked();
+ bool enSearch=static_cast<TQCheckTableItem*>(m_table->item(row,col))->isChecked();
m_table->item(3,col)->setEnabled(enSearch);
m_table->item(4,col)->setEnabled(enSearch);
m_table->item(5,col)->setEnabled(enSearch);
@@ -94,5 +94,5 @@ void KWQtSqlEasyFilter::slotValueChanged ( int row, int col )
}
}
-KWQtSqlEasyFilter::~KWQtSqlEasyFilter(){;}
+KWTQtSqlEasyFilter::~KWTQtSqlEasyFilter(){;}
diff --git a/kword/mailmerge/sql/KWQtSqlEasyFilter.h b/kword/mailmerge/sql/KWQtSqlEasyFilter.h
index aa20d494..f5602793 100644
--- a/kword/mailmerge/sql/KWQtSqlEasyFilter.h
+++ b/kword/mailmerge/sql/KWQtSqlEasyFilter.h
@@ -1,27 +1,28 @@
-#ifndef MAILMERGE_QtSqlPLUGIN_EASYFILTER
-#define MAILMERGE_QtSqlPLUGIN_EASYFILTER
+#ifndef MAILMERGE_TQtSqlPLUGIN_EASYFILTER
+#define MAILMERGE_TQtSqlPLUGIN_EASYFILTER
#include <kdialogbase.h>
-class QTable;
-class QScrollView;
-class QStringList;
+class TQTable;
+class TQScrollView;
+class TQStringList;
-class KWQtSqlEasyFilter: public KDialogBase
+class KWTQtSqlEasyFilter: public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWQtSqlEasyFilter( QWidget *parent);
- virtual ~KWQtSqlEasyFilter();
+ KWTQtSqlEasyFilter( TQWidget *tqparent);
+ virtual ~KWTQtSqlEasyFilter();
protected:
void createColumn(int i);
protected slots:
void slotValueChanged ( int, int);
private:
- QTable *m_table;
- QScrollView *m_view;
- QStringList m_fieldList,m_sortingList,m_operationList;
+ TQTable *m_table;
+ TQScrollView *m_view;
+ TQStringList m_fieldList,m_sortingList,m_operationList;
};
diff --git a/kword/mailmerge/sql/KWQtSqlMailMergeOpen.cpp b/kword/mailmerge/sql/KWQtSqlMailMergeOpen.cpp
index 099e92a8..02ff145f 100644
--- a/kword/mailmerge/sql/KWQtSqlMailMergeOpen.cpp
+++ b/kword/mailmerge/sql/KWQtSqlMailMergeOpen.cpp
@@ -17,51 +17,51 @@
* Boston, MA 02110-1301, USA.
*/
-#include "KWQtSqlMailMergeOpen.h"
-#include "KWQtSqlMailMergeOpen.moc"
+#include "KWTQtSqlMailMergeOpen.h"
+#include "KWTQtSqlMailMergeOpen.moc"
#include <kcombobox.h>
#include <klineedit.h>
#include <kdebug.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kconfig.h>
#include <kpushbutton.h>
#include <klineeditdlg.h>
#include <kiconloader.h>
-#include <qsqldatabase.h>
-#include <qguardedptr.h>
+#include <tqsqldatabase.h>
+#include <tqguardedptr.h>
#include <klocale.h>
/******************************************************************
*
- * Class: KWQtSqlMailMergeOpen
+ * Class: KWTQtSqlMailMergeOpen
*
******************************************************************/
-KWQtSqlMailMergeOpen::KWQtSqlMailMergeOpen( QWidget *parent, KWQtSqlSerialDataSourceBase *db_ )
- :KDialogBase( Plain, i18n( "Mail Merge - Setup Database Connection" ), Ok | Cancel, Ok, parent, "", true ), db( db_ ){
- (new QVBoxLayout(plainPage()))->setAutoAdd(true);
- setMainWidget(widget=new KWQtSqlOpenWidget(plainPage()));
- widget->drivers->insertStringList(QSqlDatabase::drivers());
+KWTQtSqlMailMergeOpen::KWTQtSqlMailMergeOpen( TQWidget *tqparent, KWTQtSqlSerialDataSourceBase *db_ )
+ :KDialogBase( Plain, i18n( "Mail Merge - Setup Database Connection" ), Ok | Cancel, Ok, tqparent, "", true ), db( db_ ){
+ (new TQVBoxLayout(plainPage()))->setAutoAdd(true);
+ setMainWidget(widget=new KWTQtSqlOpenWidget(plainPage()));
+ widget->drivers->insertStringList(TQSqlDatabase::drivers());
widget->hostname->setText(db->hostname);
widget->username->setText(db->username);
widget->port->setText(db->port);
widget->databasename->setText(db->databasename);
fillSavedProperties();
- connect(this,SIGNAL(okClicked()),this,SLOT(handleOk()));
- connect(widget->savedProperties,SIGNAL(activated(const QString&)),
- this, SLOT(savedPropertiesChanged(const QString&)));
- connect(widget->rememberButton,SIGNAL(clicked()),
- this, SLOT(slotSave()));
+ connect(this,TQT_SIGNAL(okClicked()),this,TQT_SLOT(handleOk()));
+ connect(widget->savedProperties,TQT_SIGNAL(activated(const TQString&)),
+ this, TQT_SLOT(savedPropertiesChanged(const TQString&)));
+ connect(widget->rememberButton,TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotSave()));
}
-KWQtSqlMailMergeOpen::~KWQtSqlMailMergeOpen(){;}
+KWTQtSqlMailMergeOpen::~KWTQtSqlMailMergeOpen(){;}
-void KWQtSqlMailMergeOpen::savedPropertiesChanged(const QString& name)
+void KWTQtSqlMailMergeOpen::savedPropertiesChanged(const TQString& name)
{
if (name!=i18n("<not saved>"))
{
KConfig conf("kwmailmergerc");
- conf.setGroup("KWSLQTDB:"+name);
+ conf.setGroup("KWSLTQTDB:"+name);
widget->hostname->setText(conf.readEntry("hostname",""));
widget->username->setText(conf.readEntry("username",""));
widget->port->setText(conf.readEntry("port",""));
@@ -77,32 +77,32 @@ void KWQtSqlMailMergeOpen::savedPropertiesChanged(const QString& name)
}
-void KWQtSqlMailMergeOpen::fillSavedProperties()
+void KWTQtSqlMailMergeOpen::fillSavedProperties()
{
widget->savedProperties->clear();
widget->savedProperties->insertItem(i18n("<not saved>"));
//Read data from configuration file and add entries
KConfig conf("kwmailmergerc");
- QStringList list=conf.groupList();
- for (QStringList::Iterator it=list.begin();it!=list.end();++it)
+ TQStringList list=conf.groupList();
+ for (TQStringList::Iterator it=list.begin();it!=list.end();++it)
{
- if ((*it).startsWith("KWSLQTDB:"))
+ if ((*it).startsWith("KWSLTQTDB:"))
widget->savedProperties->insertItem((*it).right((*it).length()-9));
}
}
-void KWQtSqlMailMergeOpen::slotSave()
+void KWTQtSqlMailMergeOpen::slotSave()
{
- QString value;
+ TQString value;
bool ok;
value=KLineEditDlg::getText(i18n("Store Settings"),i18n("Name:"),
- QString::null, &ok,this);
+ TQString(), &ok,this);
if (!ok) kdDebug()<<"Cancel was pressed"<<endl;
if (value.isEmpty()) kdDebug()<<"Name value was empty"<<endl;
if ((ok) && (!value.isEmpty()))
{
KConfig conf("kwmailmergerc");
- conf.setGroup("KWSLQTDB:"+value);
+ conf.setGroup("KWSLTQTDB:"+value);
conf.writeEntry("hostname",widget->hostname->text());
conf.writeEntry("username",widget->username->text());
conf.writeEntry("port",widget->port->text());
@@ -113,7 +113,7 @@ void KWQtSqlMailMergeOpen::slotSave()
}
}
-void KWQtSqlMailMergeOpen::handleOk()
+void KWTQtSqlMailMergeOpen::handleOk()
{
db->hostname=widget->hostname->text();
db->username=widget->username->text();
diff --git a/kword/mailmerge/sql/KWQtSqlMailMergeOpen.h b/kword/mailmerge/sql/KWQtSqlMailMergeOpen.h
index 66b3c329..9a427cc1 100644
--- a/kword/mailmerge/sql/KWQtSqlMailMergeOpen.h
+++ b/kword/mailmerge/sql/KWQtSqlMailMergeOpen.h
@@ -17,39 +17,40 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef _SERIALLETTER_QtSql_OPEN_EDITOR_H_
-#define _SERIALLETTER_QtSql_OPEN_EDITOR_H_
+#ifndef _SERIALLETTER_TQtSql_OPEN_EDITOR_H_
+#define _SERIALLETTER_TQtSql_OPEN_EDITOR_H_
-#include <qdom.h>
+#include <tqdom.h>
#include <kdialogbase.h>
-#include <qwidget.h>
+#include <tqwidget.h>
#include "KWMailMergeDataSource.h"
-#include "KWQtSqlSerialDataSourceBase.h"
-#include "qtsqlopenwidget.h"
+#include "KWTQtSqlSerialDataSourceBase.h"
+#include "tqtsqlopenwidget.h"
/******************************************************************
*
- * Class: KWQtSqlMailMergeOpen
+ * Class: KWTQtSqlMailMergeOpen
*
******************************************************************/
-class KWQtSqlMailMergeOpen : public KDialogBase
+class KWTQtSqlMailMergeOpen : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWQtSqlMailMergeOpen( QWidget *parent, KWQtSqlSerialDataSourceBase *db_ );
- ~KWQtSqlMailMergeOpen();
+ KWTQtSqlMailMergeOpen( TQWidget *tqparent, KWTQtSqlSerialDataSourceBase *db_ );
+ ~KWTQtSqlMailMergeOpen();
private:
- KWQtSqlSerialDataSourceBase *db;
- KWQtSqlOpenWidget *widget;
+ KWTQtSqlSerialDataSourceBase *db;
+ KWTQtSqlOpenWidget *widget;
void fillSavedProperties();
private slots:
void handleOk();
public slots:
-void savedPropertiesChanged(const QString&);
+void savedPropertiesChanged(const TQString&);
void slotSave();
};
diff --git a/kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.cpp b/kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.cpp
index 8f89274a..dd88750a 100644
--- a/kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.cpp
+++ b/kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.cpp
@@ -17,43 +17,43 @@
* Boston, MA 02110-1301, USA.
*/
-#include "KWQtSqlPowerSerialDataSource.h"
-#include "KWQtSqlPowerSerialDataSource.moc"
-#include "KWQtSqlMailMergeOpen.h"
-#include <qlayout.h>
-#include <qdom.h>
+#include "KWTQtSqlPowerSerialDataSource.h"
+#include "KWTQtSqlPowerSerialDataSource.moc"
+#include "KWTQtSqlMailMergeOpen.h"
+#include <tqlayout.h>
+#include <tqdom.h>
#include <kcombobox.h>
#include <klineedit.h>
#include <kpushbutton.h>
-#include <qsqldatabase.h>
-#include <qmessagebox.h>
+#include <tqsqldatabase.h>
+#include <tqmessagebox.h>
#include <kpassdlg.h>
-#include <qsqlrecord.h>
-#include <qsqlcursor.h>
-#include <qdatatable.h>
+#include <tqsqlrecord.h>
+#include <tqsqlcursor.h>
+#include <tqdatatable.h>
#include <kdebug.h>
-#define KWQtSqlBarIcon( x ) BarIcon( x, db->KWInstance() )
+#define KWTQtSqlBarIcon( x ) BarIcon( x, db->KWInstance() )
/******************************************************************
*
- * Class: KWQtSqlSerialDataSource
+ * Class: KWTQtSqlSerialDataSource
*
******************************************************************/
-KWQtSqlPowerSerialDataSource::KWQtSqlPowerSerialDataSource(KInstance *inst,QObject *parent)
- : KWQtSqlSerialDataSourceBase(inst,parent),myquery(0)
+KWTQtSqlPowerSerialDataSource::KWTQtSqlPowerSerialDataSource(KInstance *inst,TQObject *tqparent)
+ : KWTQtSqlSerialDataSourceBase(inst,tqparent),myquery(0)
{
port=i18n("default");
}
-KWQtSqlPowerSerialDataSource::~KWQtSqlPowerSerialDataSource()
+KWTQtSqlPowerSerialDataSource::~KWTQtSqlPowerSerialDataSource()
{
if (myquery) delete myquery;
- QSqlDatabase::removeDatabase("KWQTSQLPOWER");
+ TQSqlDatabase::removeDatabase("KWTQTSTQLPOWER");
}
-void KWQtSqlPowerSerialDataSource::refresh(bool force)
+void KWTQtSqlPowerSerialDataSource::refresh(bool force)
{
if ((force) || (myquery==0))
{
@@ -62,16 +62,16 @@ void KWQtSqlPowerSerialDataSource::refresh(bool force)
delete myquery;
myquery=0;
}
- QString tmp=query.upper();
+ TQString tmp=query.upper();
if (!tmp.startsWith("SELECT")) return;
if ((!database) || (!database->isOpen()))openDatabase();
myquery=new KWMySqlCursor(query,true,database);
- myquery->setMode(QSqlCursor::ReadOnly);
+ myquery->setMode(TQSqlCursor::ReadOnly);
}
- kdDebug()<<QString("There were %1 rows in the query").arg(myquery->size())<<endl;
+ kdDebug()<<TQString("There were %1 rows in the query").tqarg(myquery->size())<<endl;
}
-QString KWQtSqlPowerSerialDataSource::getValue( const QString &name, int record ) const
+TQString KWTQtSqlPowerSerialDataSource::getValue( const TQString &name, int record ) const
{
int num=record;
@@ -79,145 +79,145 @@ QString KWQtSqlPowerSerialDataSource::getValue( const QString &name, int record
if ( num < 0 || num > (int)myquery->size() )
return name;
if (!myquery->seek(num,false)) return i18n(">>>Illegal position within datasource<<<");
- if (!myquery->contains(name)) return i18n(">>>Field %1 is unknown in the current database query<<<").arg(name);
+ if (!myquery->tqcontains(name)) return i18n(">>>Field %1 is unknown in the current database query<<<").tqarg(name);
return (myquery->value(name)).toString();
}
-void KWQtSqlPowerSerialDataSource::save( QDomDocument &doc, QDomElement &parent)
+void KWTQtSqlPowerSerialDataSource::save( TQDomDocument &doc, TQDomElement &tqparent)
{
- QDomElement def=doc.createElement(QString::fromLatin1("DEFINITION"));
- parent.appendChild(def);
+ TQDomElement def=doc.createElement(TQString::tqfromLatin1("DEFINITION"));
+ tqparent.appendChild(def);
{
- QDomElement defEnt=doc.createElement(QString::fromLatin1("DATABASE"));
- defEnt.setAttribute(QString::fromLatin1("hostname"),hostname);
- defEnt.setAttribute(QString::fromLatin1("port"),port);
- defEnt.setAttribute(QString::fromLatin1("driver"),driver);
- defEnt.setAttribute(QString::fromLatin1("databasename"),databasename);
- defEnt.setAttribute(QString::fromLatin1("username"),username);
+ TQDomElement defEnt=doc.createElement(TQString::tqfromLatin1("DATABASE"));
+ defEnt.setAttribute(TQString::tqfromLatin1("hostname"),hostname);
+ defEnt.setAttribute(TQString::tqfromLatin1("port"),port);
+ defEnt.setAttribute(TQString::tqfromLatin1("driver"),driver);
+ defEnt.setAttribute(TQString::tqfromLatin1("databasename"),databasename);
+ defEnt.setAttribute(TQString::tqfromLatin1("username"),username);
def.appendChild(defEnt);
- defEnt=doc.createElement(QString::fromLatin1("QUERY"));
- defEnt.setAttribute(QString::fromLatin1("value"),query);
+ defEnt=doc.createElement(TQString::tqfromLatin1("TQUERY"));
+ defEnt.setAttribute(TQString::tqfromLatin1("value"),query);
def.appendChild(defEnt);
- QDomElement sampleEnt=doc.createElement(QString::fromLatin1("SAMPLERECORD"));
- parent.appendChild(sampleEnt);
+ TQDomElement sampleEnt=doc.createElement(TQString::tqfromLatin1("SAMPLERECORD"));
+ tqparent.appendChild(sampleEnt);
for (DbRecord::Iterator it=sampleRecord.begin();it!=sampleRecord.end();++it)
{
- QDomElement fieldEnt=doc.createElement(QString::fromLatin1("FIELD"));
- fieldEnt.setAttribute(QString::fromLatin1("name"),it.key());
+ TQDomElement fieldEnt=doc.createElement(TQString::tqfromLatin1("FIELD"));
+ fieldEnt.setAttribute(TQString::tqfromLatin1("name"),it.key());
sampleEnt.appendChild(fieldEnt);
}
}
}
-void KWQtSqlPowerSerialDataSource::load( QDomElement& parentElem )
+void KWTQtSqlPowerSerialDataSource::load( TQDomElement& tqparentElem )
{
clearSampleRecord();
- QDomNode defNd=parentElem.namedItem("DEFINITION");
+ TQDomNode defNd=tqparentElem.namedItem("DEFINITION");
if (!defNd.isNull())
{
- QDomElement def=defNd.toElement();
- QDomNode dbNd=def.namedItem("DATABASE");
+ TQDomElement def=defNd.toElement();
+ TQDomNode dbNd=def.namedItem("DATABASE");
if (!dbNd.isNull())
{
- QDomElement dbEnt=dbNd.toElement();
- if (dbEnt.tagName()==QString::fromLatin1("DATABASE"))
+ TQDomElement dbEnt=dbNd.toElement();
+ if (dbEnt.tagName()==TQString::tqfromLatin1("DATABASE"))
{
- hostname=dbEnt.attribute(QString::fromLatin1("hostname"));
- port=dbEnt.attribute(QString::fromLatin1("port"));
- driver=dbEnt.attribute(QString::fromLatin1("driver"));
- databasename=dbEnt.attribute(QString::fromLatin1("databasename"));
- username=dbEnt.attribute(QString::fromLatin1("username"));
+ hostname=dbEnt.attribute(TQString::tqfromLatin1("hostname"));
+ port=dbEnt.attribute(TQString::tqfromLatin1("port"));
+ driver=dbEnt.attribute(TQString::tqfromLatin1("driver"));
+ databasename=dbEnt.attribute(TQString::tqfromLatin1("databasename"));
+ username=dbEnt.attribute(TQString::tqfromLatin1("username"));
}
}
- QDomNode queryNd=def.namedItem("QUERY");
+ TQDomNode queryNd=def.namedItem("TQUERY");
if (!queryNd.isNull())
{
- query=queryNd.toElement().attribute(QString::fromLatin1("value"));
+ query=queryNd.toElement().attribute(TQString::tqfromLatin1("value"));
}
}
- defNd=parentElem.namedItem("SAMPLERECORD");
+ defNd=tqparentElem.namedItem("SAMPLERECORD");
if (!defNd.isNull())
{
- QDomElement def1=defNd.toElement();
- for (QDomElement defEnt=defNd.firstChild().toElement();!defEnt.isNull();defEnt=defEnt.nextSibling().toElement())
+ TQDomElement def1=defNd.toElement();
+ for (TQDomElement defEnt=defNd.firstChild().toElement();!defEnt.isNull();defEnt=defEnt.nextSibling().toElement())
{
- addSampleRecordEntry(defEnt.attribute(QString::fromLatin1("name")));
+ addSampleRecordEntry(defEnt.attribute(TQString::tqfromLatin1("name")));
}
}
}
-bool KWQtSqlPowerSerialDataSource::showConfigDialog(QWidget *par,int action)
+bool KWTQtSqlPowerSerialDataSource::showConfigDialog(TQWidget *par,int action)
{
bool ret=false;
if (action==KWSLEdit)
{
if ((!database) || (!database->isOpen()))openDatabase();
- KWQtSqlPowerMailMergeEditor *dia=new KWQtSqlPowerMailMergeEditor(par,this);
+ KWTQtSqlPowerMailMergeEditor *dia=new KWTQtSqlPowerMailMergeEditor(par,this);
ret=dia->exec();
delete dia;
}
- else ret=KWQtSqlSerialDataSourceBase::showConfigDialog(par,action);
+ else ret=KWTQtSqlSerialDataSourceBase::showConfigDialog(par,action);
return ret;
}
-void KWQtSqlPowerSerialDataSource::clearSampleRecord() {sampleRecord.clear();}
+void KWTQtSqlPowerSerialDataSource::clearSampleRecord() {sampleRecord.clear();}
-void KWQtSqlPowerSerialDataSource::addSampleRecordEntry(QString name)
+void KWTQtSqlPowerSerialDataSource::addSampleRecordEntry(TQString name)
{sampleRecord[name]=name; }//i18n("No Value");}
/******************************************************************
*
- * Class: KWQtSqlMailMergeEditor
+ * Class: KWTQtSqlMailMergeEditor
*
******************************************************************/
-KWQtSqlPowerMailMergeEditor::KWQtSqlPowerMailMergeEditor( QWidget *parent, KWQtSqlPowerSerialDataSource *db_ )
- :KDialogBase( Plain, i18n( "Mail Merge - Editor" ), Ok | Cancel, Ok, parent, "", true ), db( db_ )
+KWTQtSqlPowerMailMergeEditor::KWTQtSqlPowerMailMergeEditor( TQWidget *tqparent, KWTQtSqlPowerSerialDataSource *db_ )
+ :KDialogBase( Plain, i18n( "Mail Merge - Editor" ), Ok | Cancel, Ok, tqparent, "", true ), db( db_ )
{
- (new QVBoxLayout(plainPage()))->setAutoAdd(true);
- setMainWidget(widget=new KWQtSqlPowerWidget(plainPage()));
- connect(widget->setup,SIGNAL(clicked()),this,SLOT(openSetup()));
- connect(widget->tables,SIGNAL(currentChanged(QListBoxItem*)),this,SLOT(slotTableChanged(QListBoxItem*)));
- connect(widget->execute,SIGNAL(clicked()),this,SLOT(slotExecute()));
- connect(this,SIGNAL(okClicked()),this,SLOT(slotSetQuery()));
+ (new TQVBoxLayout(plainPage()))->setAutoAdd(true);
+ setMainWidget(widget=new KWTQtSqlPowerWidget(plainPage()));
+ connect(widget->setup,TQT_SIGNAL(clicked()),this,TQT_SLOT(openSetup()));
+ connect(widget->tables,TQT_SIGNAL(currentChanged(TQListBoxItem*)),this,TQT_SLOT(slotTableChanged(TQListBoxItem*)));
+ connect(widget->execute,TQT_SIGNAL(clicked()),this,TQT_SLOT(slotExecute()));
+ connect(this,TQT_SIGNAL(okClicked()),this,TQT_SLOT(slotSetQuery()));
widget->query->setText(db->query);
updateDBViews();
}
-void KWQtSqlPowerMailMergeEditor::slotSetQuery()
+void KWTQtSqlPowerMailMergeEditor::slotSetQuery()
{
db->query=widget->query->text();
db->refresh(true);
}
-void KWQtSqlPowerMailMergeEditor::slotExecute()
+void KWTQtSqlPowerMailMergeEditor::slotExecute()
{
if (!db->database) if (!db->openDatabase()) return;
- QString tmp=widget->query->text().upper();
+ TQString tmp=widget->query->text().upper();
if (!tmp.startsWith("SELECT")) return;
KWMySqlCursor *cur=new KWMySqlCursor(widget->query->text(),true,db->database);
- cur->setMode(QSqlCursor::ReadOnly);
+ cur->setMode(TQSqlCursor::ReadOnly);
db->clearSampleRecord();
- kdDebug()<<QString("Fieldname count %1").arg(cur->count())<<endl;
+ kdDebug()<<TQString("Fieldname count %1").tqarg(cur->count())<<endl;
for (uint i=0;i<cur->count();i++)
db->addSampleRecordEntry(cur->fieldName(i));
widget->queryresult->setSqlCursor(cur,true,true);
- widget->queryresult->refresh(QDataTable::RefreshAll);
+ widget->queryresult->refresh(TQDataTable::RefreshAll);
}
-void KWQtSqlPowerMailMergeEditor::slotTableChanged ( QListBoxItem * item )
+void KWTQtSqlPowerMailMergeEditor::slotTableChanged ( TQListBoxItem * item )
{
widget->fields->clear();
if (item)
{
if (!db->database) return;
- QSqlRecord rec=db->database->record(item->text());
+ TQSqlRecord rec=db->database->record(item->text());
for (uint i=0;i<rec.count();i++)
{
widget->fields->insertItem(rec.fieldName(i));
@@ -225,9 +225,9 @@ void KWQtSqlPowerMailMergeEditor::slotTableChanged ( QListBoxItem * item )
}
}
-void KWQtSqlPowerMailMergeEditor::openSetup()
+void KWTQtSqlPowerMailMergeEditor::openSetup()
{
- KWQtSqlMailMergeOpen *dia=new KWQtSqlMailMergeOpen(this,db);
+ KWTQtSqlMailMergeOpen *dia=new KWTQtSqlMailMergeOpen(this,db);
if (dia->exec())
{
db->openDatabase();
@@ -237,7 +237,7 @@ void KWQtSqlPowerMailMergeEditor::openSetup()
}
-void KWQtSqlPowerMailMergeEditor::updateDBViews()
+void KWTQtSqlPowerMailMergeEditor::updateDBViews()
{
widget->fields->clear();
widget->tables->clear();
@@ -245,12 +245,12 @@ void KWQtSqlPowerMailMergeEditor::updateDBViews()
widget->tables->insertStringList(db->database->tables());
}
-KWQtSqlPowerMailMergeEditor::~KWQtSqlPowerMailMergeEditor(){;}
+KWTQtSqlPowerMailMergeEditor::~KWTQtSqlPowerMailMergeEditor(){;}
extern "C" {
- KWORD_MAILMERGE_EXPORT KWMailMergeDataSource *create_kwmailmerge_qtsqldb_power(KInstance *inst,QObject *parent)
+ KWORD_MAILMERGE_EXPORT KWMailMergeDataSource *create_kwmailmerge_qtsqldb_power(KInstance *inst,TQObject *tqparent)
{
- return new KWQtSqlPowerSerialDataSource(inst,parent);
+ return new KWTQtSqlPowerSerialDataSource(inst,tqparent);
}
}
diff --git a/kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.h b/kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.h
index d7587eea..1c36b196 100644
--- a/kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.h
+++ b/kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.h
@@ -17,77 +17,79 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef _SERIALLETTER_QtSql_POWER_PLUGIN_H_
-#define _SERIALLETTER_QtSql_POWER_PLUGIN_H_
+#ifndef _SERIALLETTER_TQtSql_POWER_PLUGIN_H_
+#define _SERIALLETTER_TQtSql_POWER_PLUGIN_H_
-#include <qdom.h>
+#include <tqdom.h>
#include <klocale.h>
#include <kiconloader.h>
#include <kdialogbase.h>
-#include <qsqldatabase.h>
+#include <tqsqldatabase.h>
/* FOR THE DIRTY HACK */
-#include <qsqlcursor.h>
-#include <qsqldriver.h>
+#include <tqsqlcursor.h>
+#include <tqsqldriver.h>
/* END FOR THE DIRTY HACK */
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
#include "defs.h"
#include "KWMailMergeDataSource.h"
-#include "KWQtSqlSerialDataSourceBase.h"
+#include "KWTQtSqlSerialDataSourceBase.h"
#include "kwqtsqlpower.h"
#include "KWMySqlCursor.h"
/******************************************************************
*
- * Class: KWQtSqlSerialDataSource
+ * Class: KWTQtSqlSerialDataSource
*
******************************************************************/
-class KWQtSqlPowerSerialDataSource: public KWQtSqlSerialDataSourceBase
+class KWTQtSqlPowerSerialDataSource: public KWTQtSqlSerialDataSourceBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWQtSqlPowerSerialDataSource(KInstance *inst,QObject *parent);
- ~KWQtSqlPowerSerialDataSource();
+ KWTQtSqlPowerSerialDataSource(KInstance *inst,TQObject *tqparent);
+ ~KWTQtSqlPowerSerialDataSource();
- virtual void save( QDomDocument &doc,QDomElement&);
- virtual void load( QDomElement& elem );
- virtual class QString getValue( const class QString &name, int record = -1 ) const;
+ virtual void save( TQDomDocument &doc,TQDomElement&);
+ virtual void load( TQDomElement& elem );
+ virtual class TQString getValue( const class TQString &name, int record = -1 ) const;
virtual int getNumRecords() const {
return (myquery?((myquery->size()<0)?0:myquery->size()):0);
}
- virtual bool showConfigDialog(QWidget *,int);
+ virtual bool showConfigDialog(TQWidget *,int);
virtual void refresh(bool force);
protected:
- friend class KWQtSqlPowerMailMergeEditor;
- QString query;
+ friend class KWTQtSqlPowerMailMergeEditor;
+ TQString query;
KWMySqlCursor *myquery;
void clearSampleRecord();
- void addSampleRecordEntry(QString name);
+ void addSampleRecordEntry(TQString name);
};
/******************************************************************
*
- * Class: KWQtSqlPowerMailMergeEditor
+ * Class: KWTQtSqlPowerMailMergeEditor
*
******************************************************************/
-class KWQtSqlPowerMailMergeEditor : public KDialogBase
+class KWTQtSqlPowerMailMergeEditor : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWQtSqlPowerMailMergeEditor( QWidget *parent, KWQtSqlPowerSerialDataSource *db_ );
- ~KWQtSqlPowerMailMergeEditor();
+ KWTQtSqlPowerMailMergeEditor( TQWidget *tqparent, KWTQtSqlPowerSerialDataSource *db_ );
+ ~KWTQtSqlPowerMailMergeEditor();
private:
- KWQtSqlPowerSerialDataSource *db;
- KWQtSqlPowerWidget *widget;
+ KWTQtSqlPowerSerialDataSource *db;
+ KWTQtSqlPowerWidget *widget;
private slots:
void openSetup();
void updateDBViews();
- void slotTableChanged ( QListBoxItem * item );
+ void slotTableChanged ( TQListBoxItem * item );
void slotExecute();
void slotSetQuery();
};
diff --git a/kword/mailmerge/sql/KWQtSqlSerialDataSource.cpp b/kword/mailmerge/sql/KWQtSqlSerialDataSource.cpp
index 8835bf49..fa5bc8f6 100644
--- a/kword/mailmerge/sql/KWQtSqlSerialDataSource.cpp
+++ b/kword/mailmerge/sql/KWQtSqlSerialDataSource.cpp
@@ -17,41 +17,41 @@
* Boston, MA 02110-1301, USA.
*/
-#include "KWQtSqlSerialDataSource.h"
-#include "KWQtSqlSerialDataSource.moc"
-#include "KWQtSqlEasyFilter.h"
+#include "KWTQtSqlSerialDataSource.h"
+#include "KWTQtSqlSerialDataSource.moc"
+#include "KWTQtSqlEasyFilter.h"
#include <klocale.h>
-#include <qlayout.h>
-#include <qsqlcursor.h>
-#include <qdatatable.h>
-#include <qcheckbox.h>
-#include <qsqlrecord.h>
-#include <qsqlquery.h>
+#include <tqlayout.h>
+#include <tqsqlcursor.h>
+#include <tqdatatable.h>
+#include <tqcheckbox.h>
+#include <tqsqlrecord.h>
+#include <tqsqlquery.h>
#include <kdebug.h>
-#define KWQtSqlBarIcon( x ) BarIcon( x, db->KWInstance() )
+#define KWTQtSqlBarIcon( x ) BarIcon( x, db->KWInstance() )
/******************************************************************
*
- * Class: KWQtSqlSerialDataSource
+ * Class: KWTQtSqlSerialDataSource
*
******************************************************************/
-KWQtSqlSerialDataSource::KWQtSqlSerialDataSource(KInstance *inst,QObject *parent)
- : KWQtSqlSerialDataSourceBase(inst,parent)
+KWTQtSqlSerialDataSource::KWTQtSqlSerialDataSource(KInstance *inst,TQObject *tqparent)
+ : KWTQtSqlSerialDataSourceBase(inst,tqparent)
{
myquery=0;
}
-KWQtSqlSerialDataSource::~KWQtSqlSerialDataSource()
+KWTQtSqlSerialDataSource::~KWTQtSqlSerialDataSource()
{
delete myquery;
- QSqlDatabase::removeDatabase("KWQTSQLPOWER");
+ TQSqlDatabase::removeDatabase("KWTQTSTQLPOWER");
}
-QString KWQtSqlSerialDataSource::getValue( const QString &name, int record ) const
+TQString KWTQtSqlSerialDataSource::getValue( const TQString &name, int record ) const
{
int num=record;
@@ -59,79 +59,79 @@ QString KWQtSqlSerialDataSource::getValue( const QString &name, int record ) con
if ( num < 0 || num > (int)myquery->size() )
return name;
if (!myquery->seek(num,false)) return i18n(">>>Illegal position within datasource<<<");
- if (!myquery->contains(name)) return i18n(">>>Field %1 is unknown in the current database query<<<").arg(name);
+ if (!myquery->tqcontains(name)) return i18n(">>>Field %1 is unknown in the current database query<<<").tqarg(name);
return (myquery->value(name)).toString();
}
-void KWQtSqlSerialDataSource::save( QDomDocument & /*doc*/, QDomElement & /*parent*/)
+void KWTQtSqlSerialDataSource::save( TQDomDocument & /*doc*/, TQDomElement & /*tqparent*/)
{
/*
- QDomElement def=doc.createElement(QString::fromLatin1("DEFINITION"));
- parent.appendChild(def);
+ TQDomElement def=doc.createElement(TQString::tqfromLatin1("DEFINITION"));
+ tqparent.appendChild(def);
for (DbRecord::Iterator it=sampleRecord.begin();it!=sampleRecord.end();++it)
{
- QDomElement defEnt=doc.createElement(QString::fromLatin1("FIELD"));
- defEnt.setAttribute(QString::fromLatin1("name"),it.key());
+ TQDomElement defEnt=doc.createElement(TQString::tqfromLatin1("FIELD"));
+ defEnt.setAttribute(TQString::tqfromLatin1("name"),it.key());
def.appendChild(defEnt);
}
- QDomElement cont=doc.createElement(QString::fromLatin1("CONTENT"));
- parent.appendChild(cont);
+ TQDomElement cont=doc.createElement(TQString::tqfromLatin1("CONTENT"));
+ tqparent.appendChild(cont);
for (Db::Iterator dbI=db.begin();dbI!=db.end();++dbI)
{
- QDomElement rec=doc.createElement(QString::fromLatin1("RECORD"));
+ TQDomElement rec=doc.createElement(TQString::tqfromLatin1("RECORD"));
cont.appendChild(rec);
for (DbRecord::Iterator it=sampleRecord.begin();it!=sampleRecord.end();++it)
{
- QDomElement recEnt=doc.createElement(QString::fromLatin1("ITEM"));
- recEnt.setAttribute(QString::fromLatin1("name"),it.key());
- recEnt.setAttribute(QString::fromLatin1("data"),(*dbI)[it.key()]);
+ TQDomElement recEnt=doc.createElement(TQString::tqfromLatin1("ITEM"));
+ recEnt.setAttribute(TQString::tqfromLatin1("name"),it.key());
+ recEnt.setAttribute(TQString::tqfromLatin1("data"),(*dbI)[it.key()]);
rec.appendChild(recEnt);
}
}
*/
}
-void KWQtSqlSerialDataSource::load( QDomElement& /*parentElem*/ )
+void KWTQtSqlSerialDataSource::load( TQDomElement& /*tqparentElem*/ )
{
/*
db.clear();
sampleRecord.clear();
- QDomNode defNd=parentElem.namedItem("DEFINITION");
+ TQDomNode defNd=tqparentElem.namedItem("DEFINITION");
if (defNd.isNull()) return;
- QDomElement def=defNd.toElement();
- for (QDomElement defEnt=def.firstChild().toElement();!defEnt.isNull();defEnt=defEnt.nextSibling().toElement())
+ TQDomElement def=defNd.toElement();
+ for (TQDomElement defEnt=def.firstChild().toElement();!defEnt.isNull();defEnt=defEnt.nextSibling().toElement())
{
- sampleRecord[defEnt.attribute(QString::fromLatin1("name"))]=defEnt.attribute(QString::fromLatin1("name"));//i18n( "No Value" );
+ sampleRecord[defEnt.attribute(TQString::tqfromLatin1("name"))]=defEnt.attribute(TQString::tqfromLatin1("name"));//i18n( "No Value" );
}
- QDomNode contNd=parentElem.namedItem("CONTENT");
+ TQDomNode contNd=tqparentElem.namedItem("CONTENT");
if (contNd.isNull()) return;
- for (QDomNode rec=contNd.firstChild();!rec.isNull();rec=rec.nextSibling())
+ for (TQDomNode rec=contNd.firstChild();!rec.isNull();rec=rec.nextSibling())
{
appendRecord();
- for (QDomElement recEnt=rec.firstChild().toElement();!recEnt.isNull();recEnt=recEnt.nextSibling().toElement())
+ for (TQDomElement recEnt=rec.firstChild().toElement();!recEnt.isNull();recEnt=recEnt.nextSibling().toElement())
{
- setValue(recEnt.attribute(QString::fromLatin1("name")),
- recEnt.attribute(QString::fromLatin1("data")),db.count()-1);
+ setValue(recEnt.attribute(TQString::tqfromLatin1("name")),
+ recEnt.attribute(TQString::tqfromLatin1("data")),db.count()-1);
}
}
*/
}
-bool KWQtSqlSerialDataSource::showConfigDialog(QWidget *par,int action)
+bool KWTQtSqlSerialDataSource::showConfigDialog(TQWidget *par,int action)
{
bool ret=false;
if (action==KWSLEdit)
{
- KWQtSqlDataSourceEditor *dia=new KWQtSqlDataSourceEditor(par,this);
+ KWTQtSqlDataSourceEditor *dia=new KWTQtSqlDataSourceEditor(par,this);
ret=dia->exec();
delete dia;
}
- else ret=KWQtSqlSerialDataSourceBase::showConfigDialog(par,action);
+ else ret=KWTQtSqlSerialDataSourceBase::showConfigDialog(par,action);
return ret;
}
-void KWQtSqlSerialDataSource::refresh(bool force)
+void KWTQtSqlSerialDataSource::refresh(bool force)
{
if ((force) || (myquery==0))
{
@@ -142,11 +142,11 @@ void KWQtSqlSerialDataSource::refresh(bool force)
}
if ((!database) || (!database->isOpen())) openDatabase();
if ((!database) || (!database->isOpen())) return;
- myquery=new QSqlCursor(tableName,true,database);
- myquery->setMode(QSqlCursor::ReadOnly);
+ myquery=new TQSqlCursor(tableName,true,database);
+ myquery->setMode(TQSqlCursor::ReadOnly);
myquery->select(filter);
}
- kdDebug()<<QString("There were %1 rows in the query").arg(myquery->size())<<endl;
+ kdDebug()<<TQString("There were %1 rows in the query").tqarg(myquery->size())<<endl;
}
@@ -156,39 +156,39 @@ void KWQtSqlSerialDataSource::refresh(bool force)
/******************************************************************
*
- * Class: KWQtSqlDataSourceEditor
+ * Class: KWTQtSqlDataSourceEditor
*
******************************************************************/
-KWQtSqlDataSourceEditor::KWQtSqlDataSourceEditor( QWidget *parent, KWQtSqlSerialDataSource *db_ )
- :KDialogBase( Plain, i18n( "Mail Merge - Editor" ), Ok | Cancel, Ok, parent, "", true ), db( db_ )
+KWTQtSqlDataSourceEditor::KWTQtSqlDataSourceEditor( TQWidget *tqparent, KWTQtSqlSerialDataSource *db_ )
+ :KDialogBase( Plain, i18n( "Mail Merge - Editor" ), Ok | Cancel, Ok, tqparent, "", true ), db( db_ )
{
tableName=db->tableName;
filter=db->filter;
- (new QVBoxLayout(plainPage()))->setAutoAdd(true);
- setMainWidget(widget=new QtSqlDataSourceEditor(plainPage()));
- connect(widget->tableCombo,SIGNAL(activated(int)),this,SLOT(tableChanged(int)));
- connect(widget->editFilter,SIGNAL(clicked()),this,SLOT(editFilter()));
+ (new TQVBoxLayout(plainPage()))->setAutoAdd(true);
+ setMainWidget(widget=new TQtSqlDataSourceEditor(plainPage()));
+ connect(widget->tableCombo,TQT_SIGNAL(activated(int)),this,TQT_SLOT(tableChanged(int)));
+ connect(widget->editFilter,TQT_SIGNAL(clicked()),this,TQT_SLOT(editFilter()));
updateTableCombo();
-// connect(this,SIGNAL(okClicked()),this,SLOT(slotSetQuery()));
+// connect(this,TQT_SIGNAL(okClicked()),this,TQT_SLOT(slotSetQuery()));
}
-void KWQtSqlDataSourceEditor::tableChanged(int item)
+void KWTQtSqlDataSourceEditor::tableChanged(int item)
{
tableName=widget->tableCombo->text(item);
- QSqlCursor *tmpCursor=new QSqlCursor(tableName,true,db->database);
- tmpCursor->setMode(QSqlCursor::ReadOnly);
+ TQSqlCursor *tmpCursor=new TQSqlCursor(tableName,true,db->database);
+ tmpCursor->setMode(TQSqlCursor::ReadOnly);
if (widget->filterCheckBox->isChecked()) tmpCursor->select(filter);
widget->DataTable->setSqlCursor(tmpCursor,true,true);
- widget->DataTable->refresh(QDataTable::RefreshAll);
+ widget->DataTable->refresh(TQDataTable::RefreshAll);
}
-void KWQtSqlDataSourceEditor::updateTableCombo()
+void KWTQtSqlDataSourceEditor::updateTableCombo()
{
widget->tableCombo->clear();
if (!db->database) return;
@@ -196,7 +196,7 @@ void KWQtSqlDataSourceEditor::updateTableCombo()
widget->tableCombo->insertStringList(db->database->tables());
}
-void KWQtSqlDataSourceEditor::slotSetQuery()
+void KWTQtSqlDataSourceEditor::slotSetQuery()
{
db->tableName=tableName;
db->filter=filter;
@@ -204,15 +204,15 @@ void KWQtSqlDataSourceEditor::slotSetQuery()
}
-void KWQtSqlDataSourceEditor::editFilter()
+void KWTQtSqlDataSourceEditor::editFilter()
{
- KWQtSqlEasyFilter *f=new KWQtSqlEasyFilter(static_cast<QWidget*>(parent()));
+ KWTQtSqlEasyFilter *f=new KWTQtSqlEasyFilter(static_cast<TQWidget*>(tqparent()));
f->exec();
}
extern "C" {
- KWORD_MAILMERGE_EXPORT KWMailMergeDataSource *create_kwmailmerge_qtsqldb(KInstance *inst,QObject *parent)
+ KWORD_MAILMERGE_EXPORT KWMailMergeDataSource *create_kwmailmerge_qtsqldb(KInstance *inst,TQObject *tqparent)
{
- return new KWQtSqlSerialDataSource(inst,parent);
+ return new KWTQtSqlSerialDataSource(inst,tqparent);
}
}
diff --git a/kword/mailmerge/sql/KWQtSqlSerialDataSource.h b/kword/mailmerge/sql/KWQtSqlSerialDataSource.h
index e2051a2f..c415c19c 100644
--- a/kword/mailmerge/sql/KWQtSqlSerialDataSource.h
+++ b/kword/mailmerge/sql/KWQtSqlSerialDataSource.h
@@ -17,63 +17,64 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef _SERIALLETTER_QtSql_PLUGIN_H_
-#define _SERIALLETTER_QtSql_PLUGIN_H_
+#ifndef _SERIALLETTER_TQtSql_PLUGIN_H_
+#define _SERIALLETTER_TQtSql_PLUGIN_H_
-#include <qdom.h>
-#include <qsqlcursor.h>
+#include <tqdom.h>
+#include <tqsqlcursor.h>
#include "KWMailMergeDataSource.h"
-#include "KWQtSqlSerialDataSourceBase.h"
-#include "qtsqldatasourceeditor.h"
+#include "KWTQtSqlSerialDataSourceBase.h"
+#include "tqtsqldatasourceeditor.h"
/******************************************************************
*
- * Class: KWQtSqlSerialDataSource
+ * Class: KWTQtSqlSerialDataSource
*
******************************************************************/
-class KWQtSqlSerialDataSource: public KWQtSqlSerialDataSourceBase
+class KWTQtSqlSerialDataSource: public KWTQtSqlSerialDataSourceBase
{
public:
- KWQtSqlSerialDataSource(KInstance *inst,QObject *parent);
- ~KWQtSqlSerialDataSource();
+ KWTQtSqlSerialDataSource(KInstance *inst,TQObject *tqparent);
+ ~KWTQtSqlSerialDataSource();
- virtual void save( QDomDocument &doc,QDomElement&);
- virtual void load( QDomElement& elem );
- virtual class QString getValue( const class QString &name, int record = -1 ) const;
+ virtual void save( TQDomDocument &doc,TQDomElement&);
+ virtual void load( TQDomElement& elem );
+ virtual class TQString getValue( const class TQString &name, int record = -1 ) const;
virtual int getNumRecords() const {
return (myquery?((myquery->size()<0)?0:myquery->size()):0);
}
virtual void refresh(bool);
- virtual bool showConfigDialog(QWidget *,int);
+ virtual bool showConfigDialog(TQWidget *,int);
protected:
- friend class KWQtSqlDataSourceEditor;
- QString tableName;
- QString filter;
- QSqlCursor *myquery;
+ friend class KWTQtSqlDataSourceEditor;
+ TQString tableName;
+ TQString filter;
+ TQSqlCursor *myquery;
};
/******************************************************************
*
- * Class: KWQtSqlDataSourceEditor
+ * Class: KWTQtSqlDataSourceEditor
*
******************************************************************/
-class KWQtSqlDataSourceEditor : public KDialogBase
+class KWTQtSqlDataSourceEditor : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KWQtSqlDataSourceEditor( QWidget *parent, KWQtSqlSerialDataSource *db_ );
- ~KWQtSqlDataSourceEditor(){;}
+ KWTQtSqlDataSourceEditor( TQWidget *tqparent, KWTQtSqlSerialDataSource *db_ );
+ ~KWTQtSqlDataSourceEditor(){;}
private:
- KWQtSqlSerialDataSource *db;
- QtSqlDataSourceEditor *widget;
+ KWTQtSqlSerialDataSource *db;
+ TQtSqlDataSourceEditor *widget;
void updateTableCombo();
- QString filter;
- QString tableName;
+ TQString filter;
+ TQString tableName;
private slots:
void tableChanged(int);
diff --git a/kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.cpp b/kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.cpp
index 781c1ab5..ddb32794 100644
--- a/kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.cpp
+++ b/kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.cpp
@@ -17,20 +17,20 @@
* Boston, MA 02110-1301, USA.
*/
-#include "KWQtSqlSerialDataSourceBase.h"
-#include "KWQtSqlSerialDataSourceBase.moc"
-#include "KWQtSqlMailMergeOpen.h"
-#include <qlayout.h>
-#include <qdom.h>
+#include "KWTQtSqlSerialDataSourceBase.h"
+#include "KWTQtSqlSerialDataSourceBase.moc"
+#include "KWTQtSqlMailMergeOpen.h"
+#include <tqlayout.h>
+#include <tqdom.h>
#include <kcombobox.h>
#include <klineedit.h>
#include <kpushbutton.h>
-#include <qsqldatabase.h>
-#include <qmessagebox.h>
+#include <tqsqldatabase.h>
+#include <tqmessagebox.h>
#include <kpassdlg.h>
-#include <qsqlrecord.h>
-#include <qsqlcursor.h>
-#include <qdatatable.h>
+#include <tqsqlrecord.h>
+#include <tqsqlcursor.h>
+#include <tqdatatable.h>
#include <kdebug.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -40,31 +40,31 @@
/******************************************************************
*
- * Class: KWQtSqlSerialDataSourceBase
+ * Class: KWTQtSqlSerialDataSourceBase
*
******************************************************************/
-int KWQtSqlSerialDataSourceBase::connectionId=0;
+int KWTQtSqlSerialDataSourceBase::connectionId=0;
-KWQtSqlSerialDataSourceBase::KWQtSqlSerialDataSourceBase(KInstance *inst,QObject *parent)
- : KWMailMergeDataSource(inst,parent)
+KWTQtSqlSerialDataSourceBase::KWTQtSqlSerialDataSourceBase(KInstance *inst,TQObject *tqparent)
+ : KWMailMergeDataSource(inst,tqparent)
{
- DataBaseConnection=QString("KWQTSQLPOWER")+parent->name()+QString("--%1").arg(connectionId++);
+ DataBaseConnection=TQString("KWTQTSTQLPOWER")+tqparent->name()+TQString("--%1").tqarg(connectionId++);
port=i18n("default");
}
-KWQtSqlSerialDataSourceBase::~KWQtSqlSerialDataSourceBase()
+KWTQtSqlSerialDataSourceBase::~KWTQtSqlSerialDataSourceBase()
{
- QSqlDatabase::removeDatabase(DataBaseConnection);
+ TQSqlDatabase::removeDatabase(DataBaseConnection);
}
-bool KWQtSqlSerialDataSourceBase::showConfigDialog(QWidget *par,int action)
+bool KWTQtSqlSerialDataSourceBase::showConfigDialog(TQWidget *par,int action)
{
bool ret=false;
if (action==KWSLOpen)
{
- KWQtSqlMailMergeOpen *dia=new KWQtSqlMailMergeOpen(par,this);
+ KWTQtSqlMailMergeOpen *dia=new KWTQtSqlMailMergeOpen(par,this);
ret=dia->exec();
if (ret) openDatabase();
@@ -73,16 +73,16 @@ bool KWQtSqlSerialDataSourceBase::showConfigDialog(QWidget *par,int action)
return ret;
}
-bool KWQtSqlSerialDataSourceBase::openDatabase()
+bool KWTQtSqlSerialDataSourceBase::openDatabase()
{
- QCString pwd;
- QSqlDatabase::removeDatabase(DataBaseConnection);
- database=QSqlDatabase::addDatabase(driver,DataBaseConnection);
+ TQCString pwd;
+ TQSqlDatabase::removeDatabase(DataBaseConnection);
+ database=TQSqlDatabase::addDatabase(driver,DataBaseConnection);
if (database)
{
- if (database->lastError().type()!=QSqlError::None)
+ if (database->lastError().type()!=TQSqlError::None)
{
- QMessageBox::critical(0,i18n("Error"),database->lastError().databaseText(),QMessageBox::Abort,QMessageBox::NoButton,QMessageBox::NoButton);
+ TQMessageBox::critical(0,i18n("Error"),database->lastError().databaseText(),TQMessageBox::Abort,TQMessageBox::NoButton,TQMessageBox::NoButton);
return false;
}
database->setDatabaseName(databasename);
@@ -97,9 +97,9 @@ bool KWQtSqlSerialDataSourceBase::openDatabase()
{
return true;
}
- QMessageBox::critical(0,i18n("Error"),database->lastError().databaseText(),QMessageBox::Abort,QMessageBox::NoButton,QMessageBox::NoButton);
+ TQMessageBox::critical(0,i18n("Error"),database->lastError().databaseText(),TQMessageBox::Abort,TQMessageBox::NoButton,TQMessageBox::NoButton);
return false;
}
- QMessageBox::critical(0,i18n("Error"),i18n("Unable to create database object"),QMessageBox::Abort,QMessageBox::NoButton,QMessageBox::NoButton);
+ TQMessageBox::critical(0,i18n("Error"),i18n("Unable to create database object"),TQMessageBox::Abort,TQMessageBox::NoButton,TQMessageBox::NoButton);
return false;
}
diff --git a/kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.h b/kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.h
index 0e4586c3..a0705bdf 100644
--- a/kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.h
+++ b/kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.h
@@ -17,43 +17,44 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef _SERIALLETTER_QtSql_BASE_H_
-#define _SERIALLETTER_QtSql_BASE_H_
+#ifndef _SERIALLETTER_TQtSql_BASE_H_
+#define _SERIALLETTER_TQtSql_BASE_H_
-#include <qdom.h>
+#include <tqdom.h>
#include <kdialogbase.h>
-#include <qsqldatabase.h>
-#include <qguardedptr.h>
+#include <tqsqldatabase.h>
+#include <tqguardedptr.h>
#include "KWMailMergeDataSource.h"
-#include "qtsqlopenwidget.h"
+#include "tqtsqlopenwidget.h"
/******************************************************************
*
- * Class: KWQtSqlSerialDataSourceBase
+ * Class: KWTQtSqlSerialDataSourceBase
*
******************************************************************/
-class KWQtSqlSerialDataSourceBase: public KWMailMergeDataSource
+class KWTQtSqlSerialDataSourceBase: public KWMailMergeDataSource
{
Q_OBJECT
+ TQ_OBJECT
K_DCOP
public:
- KWQtSqlSerialDataSourceBase(KInstance *inst,QObject *parent);
- ~KWQtSqlSerialDataSourceBase();
+ KWTQtSqlSerialDataSourceBase(KInstance *inst,TQObject *tqparent);
+ ~KWTQtSqlSerialDataSourceBase();
- virtual bool showConfigDialog(QWidget *par,int action);
+ virtual bool showConfigDialog(TQWidget *par,int action);
protected:
- friend class KWQtSqlMailMergeOpen;
- QString hostname;
- QString username;
- QString driver;
- QString port;
- QString databasename;
- QGuardedPtr<QSqlDatabase> database;
- QString DataBaseConnection;
+ friend class KWTQtSqlMailMergeOpen;
+ TQString hostname;
+ TQString username;
+ TQString driver;
+ TQString port;
+ TQString databasename;
+ TQGuardedPtr<TQSqlDatabase> database;
+ TQString DataBaseConnection;
static int connectionId;
k_dcop:
bool openDatabase();
diff --git a/kword/mailmerge/sql/kwqtsqlpower.ui b/kword/mailmerge/sql/kwqtsqlpower.ui
index 4979166e..bd579f81 100644
--- a/kword/mailmerge/sql/kwqtsqlpower.ui
+++ b/kword/mailmerge/sql/kwqtsqlpower.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>KWQtSqlPowerWidget</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KWQtSqlPowerWidget</cstring>
</property>
@@ -25,7 +25,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>GroupBox3</cstring>
</property>
@@ -54,7 +54,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>120</height>
@@ -73,14 +73,14 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>120</height>
</size>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>TextLabel1_2</cstring>
</property>
@@ -91,7 +91,7 @@
<cstring>tables</cstring>
</property>
</widget>
- <widget class="QLabel" row="0" column="1">
+ <widget class="TQLabel" row="0" column="1">
<property name="name">
<cstring>TextLabel2</cstring>
</property>
@@ -104,7 +104,7 @@
</widget>
</grid>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>GroupBox6</cstring>
</property>
@@ -121,7 +121,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QDataTable">
+ <widget class="TQDataTable">
<property name="name">
<cstring>queryresult</cstring>
</property>
@@ -131,7 +131,7 @@
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout11</cstring>
</property>
@@ -145,7 +145,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>TextLabel1</cstring>
</property>
@@ -168,7 +168,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>300</width>
<height>0</height>
@@ -196,7 +196,7 @@
<property name="name">
<cstring>Line2</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>0</height>
@@ -229,5 +229,5 @@
<include location="global" impldecl="in declaration">klistbox.h</include>
<include location="global" impldecl="in declaration">kpushbutton.h</include>
</includes>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kword/mailmerge/sql/qtsqldatasourceeditor.ui b/kword/mailmerge/sql/qtsqldatasourceeditor.ui
index d0ad9902..a22ae687 100644
--- a/kword/mailmerge/sql/qtsqldatasourceeditor.ui
+++ b/kword/mailmerge/sql/qtsqldatasourceeditor.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>QtSqlDataSourceEditor</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>QtSqlDataSourceEditor</cstring>
</property>
@@ -22,7 +22,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout5</cstring>
</property>
@@ -36,7 +36,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>TextLabel1</cstring>
</property>
@@ -47,12 +47,12 @@
<cstring>tableCombo</cstring>
</property>
</widget>
- <widget class="QComboBox">
+ <widget class="TQComboBox">
<property name="name">
<cstring>tableCombo</cstring>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>filterCheckBox</cstring>
</property>
@@ -60,7 +60,7 @@
<string>&amp;Filter output</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>editFilter</cstring>
</property>
@@ -95,7 +95,7 @@
<enum>Horizontal</enum>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout6</cstring>
</property>
@@ -109,7 +109,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>TextLabel2</cstring>
</property>
@@ -133,7 +133,7 @@
</spacer>
</hbox>
</widget>
- <widget class="QDataTable">
+ <widget class="TQDataTable">
<property name="name">
<cstring>DataTable</cstring>
</property>
@@ -151,8 +151,8 @@
<includes>
<include location="local" impldecl="in implementation">qtsqldatasourceeditor.ui.h</include>
</includes>
-<slots>
+<Q_SLOTS>
<slot>filterCheckBox_toggled( bool fcb_state )</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
+</Q_SLOTS>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kword/mailmerge/sql/qtsqldatasourceeditor.ui.h b/kword/mailmerge/sql/qtsqldatasourceeditor.ui.h
index 23d90812..160596f6 100644
--- a/kword/mailmerge/sql/qtsqldatasourceeditor.ui.h
+++ b/kword/mailmerge/sql/qtsqldatasourceeditor.ui.h
@@ -1,13 +1,13 @@
/****************************************************************************
** ui.h extension file, included from the uic-generated form implementation.
**
-** If you wish to add, delete or rename slots use Qt Designer which will
+** If you wish to add, delete or rename slots use TQt Designer which will
** update this file, preserving your code. Create an init() slot in place of
** a constructor, and a destroy() slot in place of a destructor.
*****************************************************************************/
-void QtSqlDataSourceEditor::filterCheckBox_toggled( bool fcb_state )
+void TQtSqlDataSourceEditor::filterCheckBox_toggled( bool fcb_state )
{
editFilter->setEnabled(fcb_state);
}
diff --git a/kword/mailmerge/sql/qtsqlopenwidget.ui b/kword/mailmerge/sql/qtsqlopenwidget.ui
index 1b635131..80c190b3 100644
--- a/kword/mailmerge/sql/qtsqlopenwidget.ui
+++ b/kword/mailmerge/sql/qtsqlopenwidget.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>KWQtSqlOpenWidget</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KWQtSqlOpenWidget</cstring>
</property>
@@ -22,7 +22,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout10</cstring>
</property>
@@ -36,7 +36,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QComboBox">
+ <widget class="TQComboBox">
<property name="name">
<cstring>savedProperties</cstring>
</property>
@@ -67,7 +67,7 @@
</widget>
</hbox>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>GroupBox1</cstring>
</property>
@@ -84,7 +84,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
<cstring>Layout8</cstring>
</property>
@@ -98,7 +98,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout7</cstring>
</property>
@@ -112,7 +112,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>TextLabel1</cstring>
</property>
@@ -131,7 +131,7 @@
<cstring>hostname</cstring>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>TextLabel2_2</cstring>
</property>
@@ -150,7 +150,7 @@
<cstring>drivers</cstring>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>TextLabel2</cstring>
</property>
@@ -169,7 +169,7 @@
<cstring>databasename</cstring>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>TextLabel3</cstring>
</property>
@@ -188,7 +188,7 @@
<cstring>username</cstring>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>TextLabel4</cstring>
</property>
@@ -209,7 +209,7 @@
</widget>
</vbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout6</cstring>
</property>
@@ -283,7 +283,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
@@ -297,5 +297,5 @@
<include location="global" impldecl="in declaration">kcombobox.h</include>
<include location="global" impldecl="in declaration">kpushbutton.h</include>
</includes>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>