diff options
Diffstat (limited to 'kword/mailmerge')
-rw-r--r-- | kword/mailmerge/sql/KWMySqlCursor.h | 4 | ||||
-rw-r--r-- | kword/mailmerge/sql/KWQtSqlEasyFilter.cpp | 12 | ||||
-rw-r--r-- | kword/mailmerge/sql/KWQtSqlEasyFilter.h | 10 | ||||
-rw-r--r-- | kword/mailmerge/sql/KWQtSqlMailMergeOpen.cpp | 20 | ||||
-rw-r--r-- | kword/mailmerge/sql/KWQtSqlMailMergeOpen.h | 20 | ||||
-rw-r--r-- | kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.cpp | 58 | ||||
-rw-r--r-- | kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.h | 32 | ||||
-rw-r--r-- | kword/mailmerge/sql/KWQtSqlSerialDataSource.cpp | 50 | ||||
-rw-r--r-- | kword/mailmerge/sql/KWQtSqlSerialDataSource.h | 30 | ||||
-rw-r--r-- | kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.cpp | 22 | ||||
-rw-r--r-- | kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.h | 18 | ||||
-rw-r--r-- | kword/mailmerge/sql/qtsqldatasourceeditor.ui.h | 2 |
12 files changed, 139 insertions, 139 deletions
diff --git a/kword/mailmerge/sql/KWMySqlCursor.h b/kword/mailmerge/sql/KWMySqlCursor.h index a7843f6a..4a25323b 100644 --- a/kword/mailmerge/sql/KWMySqlCursor.h +++ b/kword/mailmerge/sql/KWMySqlCursor.h @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#ifndef _SERIALLETTER_TQtSql_STQLCURSOR_H_ -#define _SERIALLETTER_TQtSql_STQLCURSOR_H_ +#ifndef _SERIALLETTER_QtSql_SQLCURSOR_H_ +#define _SERIALLETTER_QtSql_SQLCURSOR_H_ /* FOR THE DIRTY HACK */ #include <tqsqlcursor.h> diff --git a/kword/mailmerge/sql/KWQtSqlEasyFilter.cpp b/kword/mailmerge/sql/KWQtSqlEasyFilter.cpp index c2c14249..8444b65c 100644 --- a/kword/mailmerge/sql/KWQtSqlEasyFilter.cpp +++ b/kword/mailmerge/sql/KWQtSqlEasyFilter.cpp @@ -1,12 +1,12 @@ -#include "KWTQtSqlEasyFilter.h" -#include "KWTQtSqlEasyFilter.moc" +#include "KWQtSqlEasyFilter.h" +#include "KWQtSqlEasyFilter.moc" #include <tqtable.h> #include <tqscrollview.h> #include <klocale.h> #include <tqlayout.h> #include <tqcheckbox.h> -KWTQtSqlEasyFilter::KWTQtSqlEasyFilter( TQWidget *tqparent) +KWQtSqlEasyFilter::KWQtSqlEasyFilter( TQWidget *tqparent) :KDialogBase( Swallow, i18n( "Mail Merge - Editor" ), Ok | Cancel, Ok, tqparent, "", true) { m_fieldList << "" <<"one" << "two" << "three" << "four"; @@ -43,7 +43,7 @@ KWTQtSqlEasyFilter::KWTQtSqlEasyFilter( TQWidget *tqparent) connect(m_table,TQT_SIGNAL(valueChanged ( int, int)),this,TQT_SLOT(slotValueChanged ( int, int))); } -void KWTQtSqlEasyFilter::createColumn(int i) +void KWQtSqlEasyFilter::createColumn(int i) { TQTableItem *it; m_table->setItem(0,i,it=new TQComboTableItem(m_table,m_fieldList,false)); @@ -61,7 +61,7 @@ void KWTQtSqlEasyFilter::createColumn(int i) } -void KWTQtSqlEasyFilter::slotValueChanged ( int row, int col ) +void KWQtSqlEasyFilter::slotValueChanged ( int row, int col ) { switch (row) { @@ -94,5 +94,5 @@ void KWTQtSqlEasyFilter::slotValueChanged ( int row, int col ) } } -KWTQtSqlEasyFilter::~KWTQtSqlEasyFilter(){;} +KWQtSqlEasyFilter::~KWQtSqlEasyFilter(){;} diff --git a/kword/mailmerge/sql/KWQtSqlEasyFilter.h b/kword/mailmerge/sql/KWQtSqlEasyFilter.h index f5602793..1384dec7 100644 --- a/kword/mailmerge/sql/KWQtSqlEasyFilter.h +++ b/kword/mailmerge/sql/KWQtSqlEasyFilter.h @@ -1,5 +1,5 @@ -#ifndef MAILMERGE_TQtSqlPLUGIN_EASYFILTER -#define MAILMERGE_TQtSqlPLUGIN_EASYFILTER +#ifndef MAILMERGE_QtSqlPLUGIN_EASYFILTER +#define MAILMERGE_QtSqlPLUGIN_EASYFILTER #include <kdialogbase.h> @@ -7,13 +7,13 @@ class TQTable; class TQScrollView; class TQStringList; -class KWTQtSqlEasyFilter: public KDialogBase +class KWQtSqlEasyFilter: public KDialogBase { Q_OBJECT TQ_OBJECT public: - KWTQtSqlEasyFilter( TQWidget *tqparent); - virtual ~KWTQtSqlEasyFilter(); + KWQtSqlEasyFilter( TQWidget *tqparent); + virtual ~KWQtSqlEasyFilter(); protected: void createColumn(int i); diff --git a/kword/mailmerge/sql/KWQtSqlMailMergeOpen.cpp b/kword/mailmerge/sql/KWQtSqlMailMergeOpen.cpp index 02ff145f..2518399b 100644 --- a/kword/mailmerge/sql/KWQtSqlMailMergeOpen.cpp +++ b/kword/mailmerge/sql/KWQtSqlMailMergeOpen.cpp @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include "KWTQtSqlMailMergeOpen.h" -#include "KWTQtSqlMailMergeOpen.moc" +#include "KWQtSqlMailMergeOpen.h" +#include "KWQtSqlMailMergeOpen.moc" #include <kcombobox.h> #include <klineedit.h> #include <kdebug.h> @@ -33,14 +33,14 @@ /****************************************************************** * - * Class: KWTQtSqlMailMergeOpen + * Class: KWQtSqlMailMergeOpen * ******************************************************************/ -KWTQtSqlMailMergeOpen::KWTQtSqlMailMergeOpen( TQWidget *tqparent, KWTQtSqlSerialDataSourceBase *db_ ) +KWQtSqlMailMergeOpen::KWQtSqlMailMergeOpen( TQWidget *tqparent, KWQtSqlSerialDataSourceBase *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())); + setMainWidget(widget=new KWQtSqlOpenWidget(plainPage())); widget->drivers->insertStringList(TQSqlDatabase::drivers()); widget->hostname->setText(db->hostname); widget->username->setText(db->username); @@ -54,9 +54,9 @@ KWTQtSqlMailMergeOpen::KWTQtSqlMailMergeOpen( TQWidget *tqparent, KWTQtSqlSerial this, TQT_SLOT(slotSave())); } -KWTQtSqlMailMergeOpen::~KWTQtSqlMailMergeOpen(){;} +KWQtSqlMailMergeOpen::~KWQtSqlMailMergeOpen(){;} -void KWTQtSqlMailMergeOpen::savedPropertiesChanged(const TQString& name) +void KWQtSqlMailMergeOpen::savedPropertiesChanged(const TQString& name) { if (name!=i18n("<not saved>")) { @@ -77,7 +77,7 @@ void KWTQtSqlMailMergeOpen::savedPropertiesChanged(const TQString& name) } -void KWTQtSqlMailMergeOpen::fillSavedProperties() +void KWQtSqlMailMergeOpen::fillSavedProperties() { widget->savedProperties->clear(); widget->savedProperties->insertItem(i18n("<not saved>")); @@ -91,7 +91,7 @@ void KWTQtSqlMailMergeOpen::fillSavedProperties() } } -void KWTQtSqlMailMergeOpen::slotSave() +void KWQtSqlMailMergeOpen::slotSave() { TQString value; bool ok; @@ -113,7 +113,7 @@ void KWTQtSqlMailMergeOpen::slotSave() } } -void KWTQtSqlMailMergeOpen::handleOk() +void KWQtSqlMailMergeOpen::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 9a427cc1..949dc2c6 100644 --- a/kword/mailmerge/sql/KWQtSqlMailMergeOpen.h +++ b/kword/mailmerge/sql/KWQtSqlMailMergeOpen.h @@ -17,33 +17,33 @@ * Boston, MA 02110-1301, USA. */ -#ifndef _SERIALLETTER_TQtSql_OPEN_EDITOR_H_ -#define _SERIALLETTER_TQtSql_OPEN_EDITOR_H_ +#ifndef _SERIALLETTER_QtSql_OPEN_EDITOR_H_ +#define _SERIALLETTER_QtSql_OPEN_EDITOR_H_ #include <tqdom.h> #include <kdialogbase.h> #include <tqwidget.h> #include "KWMailMergeDataSource.h" -#include "KWTQtSqlSerialDataSourceBase.h" -#include "tqtsqlopenwidget.h" +#include "KWQtSqlSerialDataSourceBase.h" +#include "qtsqlopenwidget.h" /****************************************************************** * - * Class: KWTQtSqlMailMergeOpen + * Class: KWQtSqlMailMergeOpen * ******************************************************************/ -class KWTQtSqlMailMergeOpen : public KDialogBase +class KWQtSqlMailMergeOpen : public KDialogBase { Q_OBJECT TQ_OBJECT public: - KWTQtSqlMailMergeOpen( TQWidget *tqparent, KWTQtSqlSerialDataSourceBase *db_ ); - ~KWTQtSqlMailMergeOpen(); + KWQtSqlMailMergeOpen( TQWidget *tqparent, KWQtSqlSerialDataSourceBase *db_ ); + ~KWQtSqlMailMergeOpen(); private: - KWTQtSqlSerialDataSourceBase *db; - KWTQtSqlOpenWidget *widget; + KWQtSqlSerialDataSourceBase *db; + KWQtSqlOpenWidget *widget; void fillSavedProperties(); diff --git a/kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.cpp b/kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.cpp index dd88750a..8020b0aa 100644 --- a/kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.cpp +++ b/kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.cpp @@ -17,9 +17,9 @@ * Boston, MA 02110-1301, USA. */ -#include "KWTQtSqlPowerSerialDataSource.h" -#include "KWTQtSqlPowerSerialDataSource.moc" -#include "KWTQtSqlMailMergeOpen.h" +#include "KWQtSqlPowerSerialDataSource.h" +#include "KWQtSqlPowerSerialDataSource.moc" +#include "KWQtSqlMailMergeOpen.h" #include <tqlayout.h> #include <tqdom.h> #include <kcombobox.h> @@ -33,27 +33,27 @@ #include <tqdatatable.h> #include <kdebug.h> -#define KWTQtSqlBarIcon( x ) BarIcon( x, db->KWInstance() ) +#define KWQtSqlBarIcon( x ) BarIcon( x, db->KWInstance() ) /****************************************************************** * - * Class: KWTQtSqlSerialDataSource + * Class: KWQtSqlSerialDataSource * ******************************************************************/ -KWTQtSqlPowerSerialDataSource::KWTQtSqlPowerSerialDataSource(KInstance *inst,TQObject *tqparent) - : KWTQtSqlSerialDataSourceBase(inst,tqparent),myquery(0) +KWQtSqlPowerSerialDataSource::KWQtSqlPowerSerialDataSource(KInstance *inst,TQObject *tqparent) + : KWQtSqlSerialDataSourceBase(inst,tqparent),myquery(0) { port=i18n("default"); } -KWTQtSqlPowerSerialDataSource::~KWTQtSqlPowerSerialDataSource() +KWQtSqlPowerSerialDataSource::~KWQtSqlPowerSerialDataSource() { if (myquery) delete myquery; - TQSqlDatabase::removeDatabase("KWTQTSTQLPOWER"); + TQSqlDatabase::removeDatabase("KWTQTSQLPOWER"); } -void KWTQtSqlPowerSerialDataSource::refresh(bool force) +void KWQtSqlPowerSerialDataSource::refresh(bool force) { if ((force) || (myquery==0)) { @@ -71,7 +71,7 @@ void KWTQtSqlPowerSerialDataSource::refresh(bool force) kdDebug()<<TQString("There were %1 rows in the query").tqarg(myquery->size())<<endl; } -TQString KWTQtSqlPowerSerialDataSource::getValue( const TQString &name, int record ) const +TQString KWQtSqlPowerSerialDataSource::getValue( const TQString &name, int record ) const { int num=record; @@ -83,7 +83,7 @@ TQString KWTQtSqlPowerSerialDataSource::getValue( const TQString &name, int reco return (myquery->value(name)).toString(); } -void KWTQtSqlPowerSerialDataSource::save( TQDomDocument &doc, TQDomElement &tqparent) +void KWQtSqlPowerSerialDataSource::save( TQDomDocument &doc, TQDomElement &tqparent) { TQDomElement def=doc.createElement(TQString::tqfromLatin1("DEFINITION")); tqparent.appendChild(def); @@ -111,7 +111,7 @@ void KWTQtSqlPowerSerialDataSource::save( TQDomDocument &doc, TQDomElement &tqpa } } -void KWTQtSqlPowerSerialDataSource::load( TQDomElement& tqparentElem ) +void KWQtSqlPowerSerialDataSource::load( TQDomElement& tqparentElem ) { clearSampleRecord(); TQDomNode defNd=tqparentElem.namedItem("DEFINITION"); @@ -149,37 +149,37 @@ void KWTQtSqlPowerSerialDataSource::load( TQDomElement& tqparentElem ) } } -bool KWTQtSqlPowerSerialDataSource::showConfigDialog(TQWidget *par,int action) +bool KWQtSqlPowerSerialDataSource::showConfigDialog(TQWidget *par,int action) { bool ret=false; if (action==KWSLEdit) { if ((!database) || (!database->isOpen()))openDatabase(); - KWTQtSqlPowerMailMergeEditor *dia=new KWTQtSqlPowerMailMergeEditor(par,this); + KWQtSqlPowerMailMergeEditor *dia=new KWQtSqlPowerMailMergeEditor(par,this); ret=dia->exec(); delete dia; } - else ret=KWTQtSqlSerialDataSourceBase::showConfigDialog(par,action); + else ret=KWQtSqlSerialDataSourceBase::showConfigDialog(par,action); return ret; } -void KWTQtSqlPowerSerialDataSource::clearSampleRecord() {sampleRecord.clear();} +void KWQtSqlPowerSerialDataSource::clearSampleRecord() {sampleRecord.clear();} -void KWTQtSqlPowerSerialDataSource::addSampleRecordEntry(TQString name) +void KWQtSqlPowerSerialDataSource::addSampleRecordEntry(TQString name) {sampleRecord[name]=name; }//i18n("No Value");} /****************************************************************** * - * Class: KWTQtSqlMailMergeEditor + * Class: KWQtSqlMailMergeEditor * ******************************************************************/ -KWTQtSqlPowerMailMergeEditor::KWTQtSqlPowerMailMergeEditor( TQWidget *tqparent, KWTQtSqlPowerSerialDataSource *db_ ) +KWQtSqlPowerMailMergeEditor::KWQtSqlPowerMailMergeEditor( TQWidget *tqparent, KWQtSqlPowerSerialDataSource *db_ ) :KDialogBase( Plain, i18n( "Mail Merge - Editor" ), Ok | Cancel, Ok, tqparent, "", true ), db( db_ ) { (new TQVBoxLayout(plainPage()))->setAutoAdd(true); - setMainWidget(widget=new KWTQtSqlPowerWidget(plainPage())); + setMainWidget(widget=new KWQtSqlPowerWidget(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())); @@ -188,13 +188,13 @@ KWTQtSqlPowerMailMergeEditor::KWTQtSqlPowerMailMergeEditor( TQWidget *tqparent, updateDBViews(); } -void KWTQtSqlPowerMailMergeEditor::slotSetQuery() +void KWQtSqlPowerMailMergeEditor::slotSetQuery() { db->query=widget->query->text(); db->refresh(true); } -void KWTQtSqlPowerMailMergeEditor::slotExecute() +void KWQtSqlPowerMailMergeEditor::slotExecute() { if (!db->database) if (!db->openDatabase()) return; TQString tmp=widget->query->text().upper(); @@ -211,7 +211,7 @@ void KWTQtSqlPowerMailMergeEditor::slotExecute() widget->queryresult->refresh(TQDataTable::RefreshAll); } -void KWTQtSqlPowerMailMergeEditor::slotTableChanged ( TQListBoxItem * item ) +void KWQtSqlPowerMailMergeEditor::slotTableChanged ( TQListBoxItem * item ) { widget->fields->clear(); if (item) @@ -225,9 +225,9 @@ void KWTQtSqlPowerMailMergeEditor::slotTableChanged ( TQListBoxItem * item ) } } -void KWTQtSqlPowerMailMergeEditor::openSetup() +void KWQtSqlPowerMailMergeEditor::openSetup() { - KWTQtSqlMailMergeOpen *dia=new KWTQtSqlMailMergeOpen(this,db); + KWQtSqlMailMergeOpen *dia=new KWQtSqlMailMergeOpen(this,db); if (dia->exec()) { db->openDatabase(); @@ -237,7 +237,7 @@ void KWTQtSqlPowerMailMergeEditor::openSetup() } -void KWTQtSqlPowerMailMergeEditor::updateDBViews() +void KWQtSqlPowerMailMergeEditor::updateDBViews() { widget->fields->clear(); widget->tables->clear(); @@ -245,12 +245,12 @@ void KWTQtSqlPowerMailMergeEditor::updateDBViews() widget->tables->insertStringList(db->database->tables()); } -KWTQtSqlPowerMailMergeEditor::~KWTQtSqlPowerMailMergeEditor(){;} +KWQtSqlPowerMailMergeEditor::~KWQtSqlPowerMailMergeEditor(){;} extern "C" { KWORD_MAILMERGE_EXPORT KWMailMergeDataSource *create_kwmailmerge_qtsqldb_power(KInstance *inst,TQObject *tqparent) { - return new KWTQtSqlPowerSerialDataSource(inst,tqparent); + return new KWQtSqlPowerSerialDataSource(inst,tqparent); } } diff --git a/kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.h b/kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.h index 1c36b196..6870afe1 100644 --- a/kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.h +++ b/kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.h @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#ifndef _SERIALLETTER_TQtSql_POWER_PLUGIN_H_ -#define _SERIALLETTER_TQtSql_POWER_PLUGIN_H_ +#ifndef _SERIALLETTER_QtSql_POWER_PLUGIN_H_ +#define _SERIALLETTER_QtSql_POWER_PLUGIN_H_ #include <tqdom.h> #include <klocale.h> @@ -33,22 +33,22 @@ #include "defs.h" #include "KWMailMergeDataSource.h" -#include "KWTQtSqlSerialDataSourceBase.h" +#include "KWQtSqlSerialDataSourceBase.h" #include "kwqtsqlpower.h" #include "KWMySqlCursor.h" /****************************************************************** * - * Class: KWTQtSqlSerialDataSource + * Class: KWQtSqlSerialDataSource * ******************************************************************/ -class KWTQtSqlPowerSerialDataSource: public KWTQtSqlSerialDataSourceBase +class KWQtSqlPowerSerialDataSource: public KWQtSqlSerialDataSourceBase { Q_OBJECT - TQ_OBJECT +// TQ_OBJECT public: - KWTQtSqlPowerSerialDataSource(KInstance *inst,TQObject *tqparent); - ~KWTQtSqlPowerSerialDataSource(); + KWQtSqlPowerSerialDataSource(KInstance *inst,TQObject *tqparent); + ~KWQtSqlPowerSerialDataSource(); virtual void save( TQDomDocument &doc,TQDomElement&); virtual void load( TQDomElement& elem ); @@ -60,7 +60,7 @@ class KWTQtSqlPowerSerialDataSource: public KWTQtSqlSerialDataSourceBase virtual void refresh(bool force); protected: - friend class KWTQtSqlPowerMailMergeEditor; + friend class KWQtSqlPowerMailMergeEditor; TQString query; KWMySqlCursor *myquery; @@ -71,21 +71,21 @@ class KWTQtSqlPowerSerialDataSource: public KWTQtSqlSerialDataSourceBase /****************************************************************** * - * Class: KWTQtSqlPowerMailMergeEditor + * Class: KWQtSqlPowerMailMergeEditor * ******************************************************************/ -class KWTQtSqlPowerMailMergeEditor : public KDialogBase +class KWQtSqlPowerMailMergeEditor : public KDialogBase { Q_OBJECT - TQ_OBJECT +// TQ_OBJECT public: - KWTQtSqlPowerMailMergeEditor( TQWidget *tqparent, KWTQtSqlPowerSerialDataSource *db_ ); - ~KWTQtSqlPowerMailMergeEditor(); + KWQtSqlPowerMailMergeEditor( TQWidget *tqparent, KWQtSqlPowerSerialDataSource *db_ ); + ~KWQtSqlPowerMailMergeEditor(); private: - KWTQtSqlPowerSerialDataSource *db; - KWTQtSqlPowerWidget *widget; + KWQtSqlPowerSerialDataSource *db; + KWQtSqlPowerWidget *widget; private slots: void openSetup(); void updateDBViews(); diff --git a/kword/mailmerge/sql/KWQtSqlSerialDataSource.cpp b/kword/mailmerge/sql/KWQtSqlSerialDataSource.cpp index fa5bc8f6..4476b4d3 100644 --- a/kword/mailmerge/sql/KWQtSqlSerialDataSource.cpp +++ b/kword/mailmerge/sql/KWQtSqlSerialDataSource.cpp @@ -17,9 +17,9 @@ * Boston, MA 02110-1301, USA. */ -#include "KWTQtSqlSerialDataSource.h" -#include "KWTQtSqlSerialDataSource.moc" -#include "KWTQtSqlEasyFilter.h" +#include "KWQtSqlSerialDataSource.h" +#include "KWQtSqlSerialDataSource.moc" +#include "KWQtSqlEasyFilter.h" #include <klocale.h> #include <tqlayout.h> @@ -30,28 +30,28 @@ #include <tqsqlquery.h> #include <kdebug.h> -#define KWTQtSqlBarIcon( x ) BarIcon( x, db->KWInstance() ) +#define KWQtSqlBarIcon( x ) BarIcon( x, db->KWInstance() ) /****************************************************************** * - * Class: KWTQtSqlSerialDataSource + * Class: KWQtSqlSerialDataSource * ******************************************************************/ -KWTQtSqlSerialDataSource::KWTQtSqlSerialDataSource(KInstance *inst,TQObject *tqparent) - : KWTQtSqlSerialDataSourceBase(inst,tqparent) +KWQtSqlSerialDataSource::KWQtSqlSerialDataSource(KInstance *inst,TQObject *tqparent) + : KWQtSqlSerialDataSourceBase(inst,tqparent) { myquery=0; } -KWTQtSqlSerialDataSource::~KWTQtSqlSerialDataSource() +KWQtSqlSerialDataSource::~KWQtSqlSerialDataSource() { delete myquery; - TQSqlDatabase::removeDatabase("KWTQTSTQLPOWER"); + TQSqlDatabase::removeDatabase("KWTQTSQLPOWER"); } -TQString KWTQtSqlSerialDataSource::getValue( const TQString &name, int record ) const +TQString KWQtSqlSerialDataSource::getValue( const TQString &name, int record ) const { int num=record; @@ -63,7 +63,7 @@ TQString KWTQtSqlSerialDataSource::getValue( const TQString &name, int record ) return (myquery->value(name)).toString(); } -void KWTQtSqlSerialDataSource::save( TQDomDocument & /*doc*/, TQDomElement & /*tqparent*/) +void KWQtSqlSerialDataSource::save( TQDomDocument & /*doc*/, TQDomElement & /*tqparent*/) { /* TQDomElement def=doc.createElement(TQString::tqfromLatin1("DEFINITION")); @@ -91,7 +91,7 @@ void KWTQtSqlSerialDataSource::save( TQDomDocument & /*doc*/, TQDomElement & /*t */ } -void KWTQtSqlSerialDataSource::load( TQDomElement& /*tqparentElem*/ ) +void KWQtSqlSerialDataSource::load( TQDomElement& /*tqparentElem*/ ) { /* db.clear(); @@ -117,21 +117,21 @@ void KWTQtSqlSerialDataSource::load( TQDomElement& /*tqparentElem*/ ) */ } -bool KWTQtSqlSerialDataSource::showConfigDialog(TQWidget *par,int action) +bool KWQtSqlSerialDataSource::showConfigDialog(TQWidget *par,int action) { bool ret=false; if (action==KWSLEdit) { - KWTQtSqlDataSourceEditor *dia=new KWTQtSqlDataSourceEditor(par,this); + KWQtSqlDataSourceEditor *dia=new KWQtSqlDataSourceEditor(par,this); ret=dia->exec(); delete dia; } - else ret=KWTQtSqlSerialDataSourceBase::showConfigDialog(par,action); + else ret=KWQtSqlSerialDataSourceBase::showConfigDialog(par,action); return ret; } -void KWTQtSqlSerialDataSource::refresh(bool force) +void KWQtSqlSerialDataSource::refresh(bool force) { if ((force) || (myquery==0)) { @@ -156,19 +156,19 @@ void KWTQtSqlSerialDataSource::refresh(bool force) /****************************************************************** * - * Class: KWTQtSqlDataSourceEditor + * Class: KWQtSqlDataSourceEditor * ******************************************************************/ -KWTQtSqlDataSourceEditor::KWTQtSqlDataSourceEditor( TQWidget *tqparent, KWTQtSqlSerialDataSource *db_ ) +KWQtSqlDataSourceEditor::KWQtSqlDataSourceEditor( TQWidget *tqparent, KWQtSqlSerialDataSource *db_ ) :KDialogBase( Plain, i18n( "Mail Merge - Editor" ), Ok | Cancel, Ok, tqparent, "", true ), db( db_ ) { tableName=db->tableName; filter=db->filter; (new TQVBoxLayout(plainPage()))->setAutoAdd(true); - setMainWidget(widget=new TQtSqlDataSourceEditor(plainPage())); + setMainWidget(widget=new QtSqlDataSourceEditor(plainPage())); connect(widget->tableCombo,TQT_SIGNAL(activated(int)),this,TQT_SLOT(tableChanged(int))); connect(widget->editFilter,TQT_SIGNAL(clicked()),this,TQT_SLOT(editFilter())); updateTableCombo(); @@ -176,7 +176,7 @@ KWTQtSqlDataSourceEditor::KWTQtSqlDataSourceEditor( TQWidget *tqparent, KWTQtSql // connect(this,TQT_SIGNAL(okClicked()),this,TQT_SLOT(slotSetQuery())); } -void KWTQtSqlDataSourceEditor::tableChanged(int item) +void KWQtSqlDataSourceEditor::tableChanged(int item) { tableName=widget->tableCombo->text(item); TQSqlCursor *tmpCursor=new TQSqlCursor(tableName,true,db->database); @@ -188,7 +188,7 @@ void KWTQtSqlDataSourceEditor::tableChanged(int item) widget->DataTable->refresh(TQDataTable::RefreshAll); } -void KWTQtSqlDataSourceEditor::updateTableCombo() +void KWQtSqlDataSourceEditor::updateTableCombo() { widget->tableCombo->clear(); if (!db->database) return; @@ -196,7 +196,7 @@ void KWTQtSqlDataSourceEditor::updateTableCombo() widget->tableCombo->insertStringList(db->database->tables()); } -void KWTQtSqlDataSourceEditor::slotSetQuery() +void KWQtSqlDataSourceEditor::slotSetQuery() { db->tableName=tableName; db->filter=filter; @@ -204,15 +204,15 @@ void KWTQtSqlDataSourceEditor::slotSetQuery() } -void KWTQtSqlDataSourceEditor::editFilter() +void KWQtSqlDataSourceEditor::editFilter() { - KWTQtSqlEasyFilter *f=new KWTQtSqlEasyFilter(static_cast<TQWidget*>(tqparent())); + KWQtSqlEasyFilter *f=new KWQtSqlEasyFilter(static_cast<TQWidget*>(tqparent())); f->exec(); } extern "C" { KWORD_MAILMERGE_EXPORT KWMailMergeDataSource *create_kwmailmerge_qtsqldb(KInstance *inst,TQObject *tqparent) { - return new KWTQtSqlSerialDataSource(inst,tqparent); + return new KWQtSqlSerialDataSource(inst,tqparent); } } diff --git a/kword/mailmerge/sql/KWQtSqlSerialDataSource.h b/kword/mailmerge/sql/KWQtSqlSerialDataSource.h index c415c19c..cc6061a9 100644 --- a/kword/mailmerge/sql/KWQtSqlSerialDataSource.h +++ b/kword/mailmerge/sql/KWQtSqlSerialDataSource.h @@ -17,27 +17,27 @@ * Boston, MA 02110-1301, USA. */ -#ifndef _SERIALLETTER_TQtSql_PLUGIN_H_ -#define _SERIALLETTER_TQtSql_PLUGIN_H_ +#ifndef _SERIALLETTER_QtSql_PLUGIN_H_ +#define _SERIALLETTER_QtSql_PLUGIN_H_ #include <tqdom.h> #include <tqsqlcursor.h> #include "KWMailMergeDataSource.h" -#include "KWTQtSqlSerialDataSourceBase.h" -#include "tqtsqldatasourceeditor.h" +#include "KWQtSqlSerialDataSourceBase.h" +#include "qtsqldatasourceeditor.h" /****************************************************************** * - * Class: KWTQtSqlSerialDataSource + * Class: KWQtSqlSerialDataSource * ******************************************************************/ -class KWTQtSqlSerialDataSource: public KWTQtSqlSerialDataSourceBase +class KWQtSqlSerialDataSource: public KWQtSqlSerialDataSourceBase { public: - KWTQtSqlSerialDataSource(KInstance *inst,TQObject *tqparent); - ~KWTQtSqlSerialDataSource(); + KWQtSqlSerialDataSource(KInstance *inst,TQObject *tqparent); + ~KWQtSqlSerialDataSource(); virtual void save( TQDomDocument &doc,TQDomElement&); virtual void load( TQDomElement& elem ); @@ -49,7 +49,7 @@ class KWTQtSqlSerialDataSource: public KWTQtSqlSerialDataSourceBase virtual bool showConfigDialog(TQWidget *,int); protected: - friend class KWTQtSqlDataSourceEditor; + friend class KWQtSqlDataSourceEditor; TQString tableName; TQString filter; TQSqlCursor *myquery; @@ -57,21 +57,21 @@ class KWTQtSqlSerialDataSource: public KWTQtSqlSerialDataSourceBase /****************************************************************** * - * Class: KWTQtSqlDataSourceEditor + * Class: KWQtSqlDataSourceEditor * ******************************************************************/ -class KWTQtSqlDataSourceEditor : public KDialogBase +class KWQtSqlDataSourceEditor : public KDialogBase { Q_OBJECT TQ_OBJECT public: - KWTQtSqlDataSourceEditor( TQWidget *tqparent, KWTQtSqlSerialDataSource *db_ ); - ~KWTQtSqlDataSourceEditor(){;} + KWQtSqlDataSourceEditor( TQWidget *tqparent, KWQtSqlSerialDataSource *db_ ); + ~KWQtSqlDataSourceEditor(){;} private: - KWTQtSqlSerialDataSource *db; - TQtSqlDataSourceEditor *widget; + KWQtSqlSerialDataSource *db; + QtSqlDataSourceEditor *widget; void updateTableCombo(); TQString filter; TQString tableName; diff --git a/kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.cpp b/kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.cpp index ddb32794..040c657e 100644 --- a/kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.cpp +++ b/kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.cpp @@ -17,9 +17,9 @@ * Boston, MA 02110-1301, USA. */ -#include "KWTQtSqlSerialDataSourceBase.h" -#include "KWTQtSqlSerialDataSourceBase.moc" -#include "KWTQtSqlMailMergeOpen.h" +#include "KWQtSqlSerialDataSourceBase.h" +#include "KWQtSqlSerialDataSourceBase.moc" +#include "KWQtSqlMailMergeOpen.h" #include <tqlayout.h> #include <tqdom.h> #include <kcombobox.h> @@ -40,31 +40,31 @@ /****************************************************************** * - * Class: KWTQtSqlSerialDataSourceBase + * Class: KWQtSqlSerialDataSourceBase * ******************************************************************/ -int KWTQtSqlSerialDataSourceBase::connectionId=0; +int KWQtSqlSerialDataSourceBase::connectionId=0; -KWTQtSqlSerialDataSourceBase::KWTQtSqlSerialDataSourceBase(KInstance *inst,TQObject *tqparent) +KWQtSqlSerialDataSourceBase::KWQtSqlSerialDataSourceBase(KInstance *inst,TQObject *tqparent) : KWMailMergeDataSource(inst,tqparent) { - DataBaseConnection=TQString("KWTQTSTQLPOWER")+tqparent->name()+TQString("--%1").tqarg(connectionId++); + DataBaseConnection=TQString("KWTQTSQLPOWER")+tqparent->name()+TQString("--%1").tqarg(connectionId++); port=i18n("default"); } -KWTQtSqlSerialDataSourceBase::~KWTQtSqlSerialDataSourceBase() +KWQtSqlSerialDataSourceBase::~KWQtSqlSerialDataSourceBase() { TQSqlDatabase::removeDatabase(DataBaseConnection); } -bool KWTQtSqlSerialDataSourceBase::showConfigDialog(TQWidget *par,int action) +bool KWQtSqlSerialDataSourceBase::showConfigDialog(TQWidget *par,int action) { bool ret=false; if (action==KWSLOpen) { - KWTQtSqlMailMergeOpen *dia=new KWTQtSqlMailMergeOpen(par,this); + KWQtSqlMailMergeOpen *dia=new KWQtSqlMailMergeOpen(par,this); ret=dia->exec(); if (ret) openDatabase(); @@ -73,7 +73,7 @@ bool KWTQtSqlSerialDataSourceBase::showConfigDialog(TQWidget *par,int action) return ret; } -bool KWTQtSqlSerialDataSourceBase::openDatabase() +bool KWQtSqlSerialDataSourceBase::openDatabase() { TQCString pwd; TQSqlDatabase::removeDatabase(DataBaseConnection); diff --git a/kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.h b/kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.h index a0705bdf..ee4e02a8 100644 --- a/kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.h +++ b/kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.h @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#ifndef _SERIALLETTER_TQtSql_BASE_H_ -#define _SERIALLETTER_TQtSql_BASE_H_ +#ifndef _SERIALLETTER_QtSql_BASE_H_ +#define _SERIALLETTER_QtSql_BASE_H_ #include <tqdom.h> #include <kdialogbase.h> @@ -26,28 +26,28 @@ #include <tqguardedptr.h> #include "KWMailMergeDataSource.h" -#include "tqtsqlopenwidget.h" +#include "qtsqlopenwidget.h" /****************************************************************** * - * Class: KWTQtSqlSerialDataSourceBase + * Class: KWQtSqlSerialDataSourceBase * ******************************************************************/ -class KWTQtSqlSerialDataSourceBase: public KWMailMergeDataSource +class KWQtSqlSerialDataSourceBase: public KWMailMergeDataSource { Q_OBJECT - TQ_OBJECT +// TQ_OBJECT K_DCOP public: - KWTQtSqlSerialDataSourceBase(KInstance *inst,TQObject *tqparent); - ~KWTQtSqlSerialDataSourceBase(); + KWQtSqlSerialDataSourceBase(KInstance *inst,TQObject *tqparent); + ~KWQtSqlSerialDataSourceBase(); virtual bool showConfigDialog(TQWidget *par,int action); protected: - friend class KWTQtSqlMailMergeOpen; + friend class KWQtSqlMailMergeOpen; TQString hostname; TQString username; TQString driver; diff --git a/kword/mailmerge/sql/qtsqldatasourceeditor.ui.h b/kword/mailmerge/sql/qtsqldatasourceeditor.ui.h index 160596f6..3f9fe366 100644 --- a/kword/mailmerge/sql/qtsqldatasourceeditor.ui.h +++ b/kword/mailmerge/sql/qtsqldatasourceeditor.ui.h @@ -7,7 +7,7 @@ *****************************************************************************/ -void TQtSqlDataSourceEditor::filterCheckBox_toggled( bool fcb_state ) +void QtSqlDataSourceEditor::filterCheckBox_toggled( bool fcb_state ) { editFilter->setEnabled(fcb_state); } |