summaryrefslogtreecommitdiffstats
path: root/kword/mailmerge/sql
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-01-20 01:29:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-01-20 01:29:50 +0000
commit8362bf63dea22bbf6736609b0f49c152f975eb63 (patch)
tree0eea3928e39e50fae91d4e68b21b1e6cbae25604 /kword/mailmerge/sql
downloadkoffice-8362bf63dea22bbf6736609b0f49c152f975eb63.tar.gz
koffice-8362bf63dea22bbf6736609b0f49c152f975eb63.zip
Added old abandoned KDE3 version of koffice
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1077364 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kword/mailmerge/sql')
-rw-r--r--kword/mailmerge/sql/KWMySqlCursor.h69
-rw-r--r--kword/mailmerge/sql/KWQtSqlEasyFilter.cpp98
-rw-r--r--kword/mailmerge/sql/KWQtSqlEasyFilter.h29
-rw-r--r--kword/mailmerge/sql/KWQtSqlMailMergeOpen.cpp123
-rw-r--r--kword/mailmerge/sql/KWQtSqlMailMergeOpen.h57
-rw-r--r--kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.cpp256
-rw-r--r--kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.h96
-rw-r--r--kword/mailmerge/sql/KWQtSqlSerialDataSource.cpp218
-rw-r--r--kword/mailmerge/sql/KWQtSqlSerialDataSource.h85
-rw-r--r--kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.cpp105
-rw-r--r--kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.h63
-rw-r--r--kword/mailmerge/sql/Makefile.am28
-rw-r--r--kword/mailmerge/sql/kwqtsqlpower.ui233
-rw-r--r--kword/mailmerge/sql/kwserialletter_qtsqldb.desktop106
-rw-r--r--kword/mailmerge/sql/kwserialletter_qtsqldb_power.desktop107
-rw-r--r--kword/mailmerge/sql/qtsqldatasourceeditor.ui158
-rw-r--r--kword/mailmerge/sql/qtsqldatasourceeditor.ui.h13
-rw-r--r--kword/mailmerge/sql/qtsqlopenwidget.ui301
18 files changed, 2145 insertions, 0 deletions
diff --git a/kword/mailmerge/sql/KWMySqlCursor.h b/kword/mailmerge/sql/KWMySqlCursor.h
new file mode 100644
index 00000000..e5e998b6
--- /dev/null
+++ b/kword/mailmerge/sql/KWMySqlCursor.h
@@ -0,0 +1,69 @@
+/* This file is part of the KDE project
+ Copyright (C) 2001 Joseph Wenninger <jowenn@kde.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+*/
+
+#ifndef _SERIALLETTER_QtSql_SQLCURSOR_H_
+#define _SERIALLETTER_QtSql_SQLCURSOR_H_
+
+/* FOR THE DIRTY HACK */
+#include <qsqlcursor.h>
+#include <qsqldriver.h>
+/* END FOR THE DIRTY HACK */
+
+/******************************************************************
+ *
+ * DIRTY HACK FOR SOME INFLEXIBILITY IN QT3's SQL stuff
+ *
+ * This class is rom some Trolltech guy on QT-interest
+ ******************************************************************/
+
+
+
+class KWMySqlCursor: public QSqlCursor
+{
+public:
+ KWMySqlCursor( const QString & query = QString::null, bool autopopulate =
+TRUE, QSqlDatabase* db = 0 ): QSqlCursor( QString::null, autopopulate, db )
+ {
+ exec( query );
+ if ( autopopulate )
+ *(QSqlRecord*)this = ((QSqlQuery*)this)->driver()->record(
+*(QSqlQuery*)this );
+ setMode( QSqlCursor::ReadOnly );
+ }
+ KWMySqlCursor( const KWMySqlCursor & other ): QSqlCursor( other ) {}
+ KWMySqlCursor( const QSqlQuery & query, bool autopopulate = TRUE ):
+QSqlCursor( QString::null, autopopulate )
+ {
+ *(QSqlQuery*)this = query;
+ if ( autopopulate )
+ *(QSqlRecord*)this = query.driver()->record( query );
+ setMode( QSqlCursor::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 ) {}
+};
+
+
+#endif
diff --git a/kword/mailmerge/sql/KWQtSqlEasyFilter.cpp b/kword/mailmerge/sql/KWQtSqlEasyFilter.cpp
new file mode 100644
index 00000000..0f5e5ffb
--- /dev/null
+++ b/kword/mailmerge/sql/KWQtSqlEasyFilter.cpp
@@ -0,0 +1,98 @@
+#include "KWQtSqlEasyFilter.h"
+#include "KWQtSqlEasyFilter.moc"
+#include <qtable.h>
+#include <qscrollview.h>
+#include <klocale.h>
+#include <qlayout.h>
+#include <qcheckbox.h>
+
+KWQtSqlEasyFilter::KWQtSqlEasyFilter( QWidget *parent)
+ :KDialogBase( Swallow, i18n( "Mail Merge - Editor" ), Ok | Cancel, Ok, parent, "", true)
+{
+ m_fieldList << "" <<"one" << "two" << "three" << "four";
+ m_sortingList << ""<<i18n("ascending")<<i18n("descending");
+ m_operationList <<"="<<i18n("contains")<< "<" << ">";
+
+ m_table=new QTable(6,3,this);
+ setMainWidget(m_table);
+
+ m_table->verticalHeader()->setLabel(0,i18n("Field"));
+ m_table->verticalHeader()->setLabel(1,i18n("Sorting Order"));
+ m_table->verticalHeader()->setLabel(2,i18n("Include"));
+ 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->setColumnMovingEnabled(true);
+ m_table->setSorting(false);
+
+ for (int i=0; i<3; i++)
+ {
+ createColumn(i);
+ }
+
+ int h=m_table->rowHeight(0);
+ for (int i=0;i<6;i++) h+=m_table->rowHeight(i);
+ h+=m_table->horizontalHeader()->sizeHint().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)));
+}
+
+void KWQtSqlEasyFilter::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));
+ it->setEnabled(false);
+ m_table->setItem(2,i,it=new QCheckTableItem(m_table,i18n("Yes")));
+ it->setEnabled(false);
+ m_table->setItem(3,i,it=new QCheckTableItem(m_table,i18n("NOT")));
+ it->setEnabled(false);
+ m_table->setItem(4,i,it=new QComboTableItem(m_table,m_operationList,false));
+ it->setEnabled(false);
+ m_table->setItem(5,i,it=new QTableItem(m_table,QTableItem::WhenCurrent,""));
+ it->setEnabled(false);
+ m_table->ensureCellVisible(0,i);
+}
+
+
+void KWQtSqlEasyFilter::slotValueChanged ( int row, int col )
+{
+ switch (row)
+ {
+ case 0:
+ if ( !m_table->item(row,col)->text().isEmpty() )
+ {
+ if (col==m_table->numCols()-1)
+ {
+ m_table->insertColumns(col+1,1);
+ createColumn(col+1);
+ }
+ 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());
+ m_table->item(3,col)->setEnabled(enableSearch);
+ m_table->item(4,col)->setEnabled(enableSearch);
+ m_table->item(5,col)->setEnabled(enableSearch);
+ }
+ else
+ {
+ for (int i=1;i<6;i++) m_table->item(i,col)->setEnabled(false);
+ }
+ break;
+ case 2:
+ bool enSearch=static_cast<QCheckTableItem*>(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);
+ break;
+ }
+}
+
+KWQtSqlEasyFilter::~KWQtSqlEasyFilter(){;}
+
diff --git a/kword/mailmerge/sql/KWQtSqlEasyFilter.h b/kword/mailmerge/sql/KWQtSqlEasyFilter.h
new file mode 100644
index 00000000..aa20d494
--- /dev/null
+++ b/kword/mailmerge/sql/KWQtSqlEasyFilter.h
@@ -0,0 +1,29 @@
+#ifndef MAILMERGE_QtSqlPLUGIN_EASYFILTER
+#define MAILMERGE_QtSqlPLUGIN_EASYFILTER
+
+#include <kdialogbase.h>
+
+class QTable;
+class QScrollView;
+class QStringList;
+
+class KWQtSqlEasyFilter: public KDialogBase
+{
+ Q_OBJECT
+public:
+ KWQtSqlEasyFilter( QWidget *parent);
+ virtual ~KWQtSqlEasyFilter();
+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;
+
+
+};
+
+#endif
diff --git a/kword/mailmerge/sql/KWQtSqlMailMergeOpen.cpp b/kword/mailmerge/sql/KWQtSqlMailMergeOpen.cpp
new file mode 100644
index 00000000..099e92a8
--- /dev/null
+++ b/kword/mailmerge/sql/KWQtSqlMailMergeOpen.cpp
@@ -0,0 +1,123 @@
+/* This file is part of the KDE project
+ Copyright (C) 2001 Joseph Wenninger <jowenn@kde.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+*/
+
+#include "KWQtSqlMailMergeOpen.h"
+#include "KWQtSqlMailMergeOpen.moc"
+#include <kcombobox.h>
+#include <klineedit.h>
+#include <kdebug.h>
+#include <qlayout.h>
+#include <kconfig.h>
+#include <kpushbutton.h>
+#include <klineeditdlg.h>
+#include <kiconloader.h>
+#include <qsqldatabase.h>
+#include <qguardedptr.h>
+#include <klocale.h>
+
+/******************************************************************
+ *
+ * Class: KWQtSqlMailMergeOpen
+ *
+ ******************************************************************/
+
+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());
+ 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()));
+}
+
+KWQtSqlMailMergeOpen::~KWQtSqlMailMergeOpen(){;}
+
+void KWQtSqlMailMergeOpen::savedPropertiesChanged(const QString& name)
+{
+ if (name!=i18n("<not saved>"))
+ {
+ KConfig conf("kwmailmergerc");
+ conf.setGroup("KWSLQTDB:"+name);
+ widget->hostname->setText(conf.readEntry("hostname",""));
+ widget->username->setText(conf.readEntry("username",""));
+ widget->port->setText(conf.readEntry("port",""));
+ widget->databasename->setText(conf.readEntry("databasename",""));
+ }
+ else
+ {
+ widget->hostname->setText("");
+ widget->username->setText("");
+ widget->port->setText(i18n("default"));
+ widget->databasename->setText("");
+ }
+
+}
+
+void KWQtSqlMailMergeOpen::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)
+ {
+ if ((*it).startsWith("KWSLQTDB:"))
+ widget->savedProperties->insertItem((*it).right((*it).length()-9));
+ }
+}
+
+void KWQtSqlMailMergeOpen::slotSave()
+{
+ QString value;
+ bool ok;
+ value=KLineEditDlg::getText(i18n("Store Settings"),i18n("Name:"),
+ QString::null, &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.writeEntry("hostname",widget->hostname->text());
+ conf.writeEntry("username",widget->username->text());
+ conf.writeEntry("port",widget->port->text());
+ conf.writeEntry("databasename",widget->databasename->text());
+ conf.sync();
+ fillSavedProperties();
+ widget->savedProperties->setCurrentText(value);
+ }
+}
+
+void KWQtSqlMailMergeOpen::handleOk()
+{
+ db->hostname=widget->hostname->text();
+ db->username=widget->username->text();
+ db->port=widget->port->text();
+ db->databasename=widget->databasename->text();
+ db->driver=widget->drivers->currentText();
+}
diff --git a/kword/mailmerge/sql/KWQtSqlMailMergeOpen.h b/kword/mailmerge/sql/KWQtSqlMailMergeOpen.h
new file mode 100644
index 00000000..66b3c329
--- /dev/null
+++ b/kword/mailmerge/sql/KWQtSqlMailMergeOpen.h
@@ -0,0 +1,57 @@
+/* This file is part of the KDE project
+ Copyright (C) 2001 Joseph Wenninger <jowenn@kde.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+*/
+
+#ifndef _SERIALLETTER_QtSql_OPEN_EDITOR_H_
+#define _SERIALLETTER_QtSql_OPEN_EDITOR_H_
+
+#include <qdom.h>
+#include <kdialogbase.h>
+#include <qwidget.h>
+
+#include "KWMailMergeDataSource.h"
+#include "KWQtSqlSerialDataSourceBase.h"
+#include "qtsqlopenwidget.h"
+
+/******************************************************************
+ *
+ * Class: KWQtSqlMailMergeOpen
+ *
+ ******************************************************************/
+class KWQtSqlMailMergeOpen : public KDialogBase
+{
+ Q_OBJECT
+
+public:
+ KWQtSqlMailMergeOpen( QWidget *parent, KWQtSqlSerialDataSourceBase *db_ );
+ ~KWQtSqlMailMergeOpen();
+private:
+ KWQtSqlSerialDataSourceBase *db;
+ KWQtSqlOpenWidget *widget;
+
+ void fillSavedProperties();
+
+private slots:
+void handleOk();
+public slots:
+void savedPropertiesChanged(const QString&);
+void slotSave();
+};
+
+#endif
+
diff --git a/kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.cpp b/kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.cpp
new file mode 100644
index 00000000..8f89274a
--- /dev/null
+++ b/kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.cpp
@@ -0,0 +1,256 @@
+/* This file is part of the KDE project
+ Copyright (C) 2001 Joseph Wenninger <jowenn@kde.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+*/
+
+#include "KWQtSqlPowerSerialDataSource.h"
+#include "KWQtSqlPowerSerialDataSource.moc"
+#include "KWQtSqlMailMergeOpen.h"
+#include <qlayout.h>
+#include <qdom.h>
+#include <kcombobox.h>
+#include <klineedit.h>
+#include <kpushbutton.h>
+#include <qsqldatabase.h>
+#include <qmessagebox.h>
+#include <kpassdlg.h>
+#include <qsqlrecord.h>
+#include <qsqlcursor.h>
+#include <qdatatable.h>
+#include <kdebug.h>
+
+#define KWQtSqlBarIcon( x ) BarIcon( x, db->KWInstance() )
+
+/******************************************************************
+ *
+ * Class: KWQtSqlSerialDataSource
+ *
+ ******************************************************************/
+
+KWQtSqlPowerSerialDataSource::KWQtSqlPowerSerialDataSource(KInstance *inst,QObject *parent)
+ : KWQtSqlSerialDataSourceBase(inst,parent),myquery(0)
+{
+ port=i18n("default");
+}
+
+KWQtSqlPowerSerialDataSource::~KWQtSqlPowerSerialDataSource()
+{
+ if (myquery) delete myquery;
+ QSqlDatabase::removeDatabase("KWQTSQLPOWER");
+}
+
+void KWQtSqlPowerSerialDataSource::refresh(bool force)
+{
+ if ((force) || (myquery==0))
+ {
+ if (myquery)
+ {
+ delete myquery;
+ myquery=0;
+ }
+ QString tmp=query.upper();
+ if (!tmp.startsWith("SELECT")) return;
+ if ((!database) || (!database->isOpen()))openDatabase();
+ myquery=new KWMySqlCursor(query,true,database);
+ myquery->setMode(QSqlCursor::ReadOnly);
+ }
+ kdDebug()<<QString("There were %1 rows in the query").arg(myquery->size())<<endl;
+}
+
+QString KWQtSqlPowerSerialDataSource::getValue( const QString &name, int record ) const
+{
+ int num=record;
+
+ if (!myquery) return name;
+ 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);
+ return (myquery->value(name)).toString();
+}
+
+void KWQtSqlPowerSerialDataSource::save( QDomDocument &doc, QDomElement &parent)
+{
+ QDomElement def=doc.createElement(QString::fromLatin1("DEFINITION"));
+ parent.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);
+ def.appendChild(defEnt);
+
+ defEnt=doc.createElement(QString::fromLatin1("QUERY"));
+ defEnt.setAttribute(QString::fromLatin1("value"),query);
+ def.appendChild(defEnt);
+
+ QDomElement sampleEnt=doc.createElement(QString::fromLatin1("SAMPLERECORD"));
+ parent.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());
+ sampleEnt.appendChild(fieldEnt);
+ }
+ }
+}
+
+void KWQtSqlPowerSerialDataSource::load( QDomElement& parentElem )
+{
+ clearSampleRecord();
+ QDomNode defNd=parentElem.namedItem("DEFINITION");
+ if (!defNd.isNull())
+ {
+ QDomElement def=defNd.toElement();
+ QDomNode dbNd=def.namedItem("DATABASE");
+ if (!dbNd.isNull())
+ {
+ QDomElement dbEnt=dbNd.toElement();
+ if (dbEnt.tagName()==QString::fromLatin1("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"));
+ }
+ }
+ QDomNode queryNd=def.namedItem("QUERY");
+ if (!queryNd.isNull())
+ {
+ query=queryNd.toElement().attribute(QString::fromLatin1("value"));
+ }
+ }
+
+ defNd=parentElem.namedItem("SAMPLERECORD");
+ if (!defNd.isNull())
+ {
+ QDomElement def1=defNd.toElement();
+ for (QDomElement defEnt=defNd.firstChild().toElement();!defEnt.isNull();defEnt=defEnt.nextSibling().toElement())
+ {
+ addSampleRecordEntry(defEnt.attribute(QString::fromLatin1("name")));
+ }
+ }
+}
+
+bool KWQtSqlPowerSerialDataSource::showConfigDialog(QWidget *par,int action)
+{
+ bool ret=false;
+ if (action==KWSLEdit)
+ {
+ if ((!database) || (!database->isOpen()))openDatabase();
+ KWQtSqlPowerMailMergeEditor *dia=new KWQtSqlPowerMailMergeEditor(par,this);
+ ret=dia->exec();
+ delete dia;
+ }
+ else ret=KWQtSqlSerialDataSourceBase::showConfigDialog(par,action);
+ return ret;
+}
+
+void KWQtSqlPowerSerialDataSource::clearSampleRecord() {sampleRecord.clear();}
+
+void KWQtSqlPowerSerialDataSource::addSampleRecordEntry(QString name)
+{sampleRecord[name]=name; }//i18n("No Value");}
+
+
+/******************************************************************
+ *
+ * Class: KWQtSqlMailMergeEditor
+ *
+ ******************************************************************/
+
+KWQtSqlPowerMailMergeEditor::KWQtSqlPowerMailMergeEditor( QWidget *parent, KWQtSqlPowerSerialDataSource *db_ )
+ :KDialogBase( Plain, i18n( "Mail Merge - Editor" ), Ok | Cancel, Ok, parent, "", 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()));
+ widget->query->setText(db->query);
+ updateDBViews();
+}
+
+void KWQtSqlPowerMailMergeEditor::slotSetQuery()
+{
+ db->query=widget->query->text();
+ db->refresh(true);
+}
+
+void KWQtSqlPowerMailMergeEditor::slotExecute()
+{
+ if (!db->database) if (!db->openDatabase()) return;
+ QString tmp=widget->query->text().upper();
+ if (!tmp.startsWith("SELECT")) return;
+ KWMySqlCursor *cur=new KWMySqlCursor(widget->query->text(),true,db->database);
+ cur->setMode(QSqlCursor::ReadOnly);
+
+ db->clearSampleRecord();
+ kdDebug()<<QString("Fieldname count %1").arg(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);
+}
+
+void KWQtSqlPowerMailMergeEditor::slotTableChanged ( QListBoxItem * item )
+{
+ widget->fields->clear();
+ if (item)
+ {
+ if (!db->database) return;
+ QSqlRecord rec=db->database->record(item->text());
+ for (uint i=0;i<rec.count();i++)
+ {
+ widget->fields->insertItem(rec.fieldName(i));
+ }
+ }
+}
+
+void KWQtSqlPowerMailMergeEditor::openSetup()
+{
+ KWQtSqlMailMergeOpen *dia=new KWQtSqlMailMergeOpen(this,db);
+ if (dia->exec())
+ {
+ db->openDatabase();
+ updateDBViews();
+ }
+ delete dia;
+}
+
+
+void KWQtSqlPowerMailMergeEditor::updateDBViews()
+{
+ widget->fields->clear();
+ widget->tables->clear();
+ if (!db->database) return;
+ widget->tables->insertStringList(db->database->tables());
+}
+
+KWQtSqlPowerMailMergeEditor::~KWQtSqlPowerMailMergeEditor(){;}
+
+
+extern "C" {
+ KWORD_MAILMERGE_EXPORT KWMailMergeDataSource *create_kwmailmerge_qtsqldb_power(KInstance *inst,QObject *parent)
+ {
+ return new KWQtSqlPowerSerialDataSource(inst,parent);
+ }
+}
diff --git a/kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.h b/kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.h
new file mode 100644
index 00000000..d7587eea
--- /dev/null
+++ b/kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.h
@@ -0,0 +1,96 @@
+/* This file is part of the KDE project
+ Copyright (C) 2001 Joseph Wenninger <jowenn@kde.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+*/
+
+#ifndef _SERIALLETTER_QtSql_POWER_PLUGIN_H_
+#define _SERIALLETTER_QtSql_POWER_PLUGIN_H_
+
+#include <qdom.h>
+#include <klocale.h>
+#include <kiconloader.h>
+#include <kdialogbase.h>
+#include <qsqldatabase.h>
+/* FOR THE DIRTY HACK */
+#include <qsqlcursor.h>
+#include <qsqldriver.h>
+/* END FOR THE DIRTY HACK */
+#include <qguardedptr.h>
+
+#include "defs.h"
+#include "KWMailMergeDataSource.h"
+#include "KWQtSqlSerialDataSourceBase.h"
+#include "kwqtsqlpower.h"
+#include "KWMySqlCursor.h"
+
+/******************************************************************
+ *
+ * Class: KWQtSqlSerialDataSource
+ *
+ ******************************************************************/
+class KWQtSqlPowerSerialDataSource: public KWQtSqlSerialDataSourceBase
+{
+ Q_OBJECT
+ public:
+ KWQtSqlPowerSerialDataSource(KInstance *inst,QObject *parent);
+ ~KWQtSqlPowerSerialDataSource();
+
+ virtual void save( QDomDocument &doc,QDomElement&);
+ virtual void load( QDomElement& elem );
+ virtual class QString getValue( const class QString &name, int record = -1 ) const;
+ virtual int getNumRecords() const {
+ return (myquery?((myquery->size()<0)?0:myquery->size()):0);
+ }
+ virtual bool showConfigDialog(QWidget *,int);
+ virtual void refresh(bool force);
+
+ protected:
+ friend class KWQtSqlPowerMailMergeEditor;
+ QString query;
+ KWMySqlCursor *myquery;
+
+ void clearSampleRecord();
+ void addSampleRecordEntry(QString name);
+
+};
+
+/******************************************************************
+ *
+ * Class: KWQtSqlPowerMailMergeEditor
+ *
+ ******************************************************************/
+
+class KWQtSqlPowerMailMergeEditor : public KDialogBase
+{
+ Q_OBJECT
+
+public:
+ KWQtSqlPowerMailMergeEditor( QWidget *parent, KWQtSqlPowerSerialDataSource *db_ );
+ ~KWQtSqlPowerMailMergeEditor();
+private:
+ KWQtSqlPowerSerialDataSource *db;
+ KWQtSqlPowerWidget *widget;
+private slots:
+ void openSetup();
+ void updateDBViews();
+ void slotTableChanged ( QListBoxItem * item );
+ void slotExecute();
+ void slotSetQuery();
+};
+
+
+#endif
diff --git a/kword/mailmerge/sql/KWQtSqlSerialDataSource.cpp b/kword/mailmerge/sql/KWQtSqlSerialDataSource.cpp
new file mode 100644
index 00000000..8835bf49
--- /dev/null
+++ b/kword/mailmerge/sql/KWQtSqlSerialDataSource.cpp
@@ -0,0 +1,218 @@
+/* This file is part of the KDE project
+ Copyright (C) 2001 Joseph Wenninger <jowenn@kde.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+*/
+
+#include "KWQtSqlSerialDataSource.h"
+#include "KWQtSqlSerialDataSource.moc"
+#include "KWQtSqlEasyFilter.h"
+
+#include <klocale.h>
+#include <qlayout.h>
+#include <qsqlcursor.h>
+#include <qdatatable.h>
+#include <qcheckbox.h>
+#include <qsqlrecord.h>
+#include <qsqlquery.h>
+#include <kdebug.h>
+
+#define KWQtSqlBarIcon( x ) BarIcon( x, db->KWInstance() )
+
+/******************************************************************
+ *
+ * Class: KWQtSqlSerialDataSource
+ *
+ ******************************************************************/
+
+KWQtSqlSerialDataSource::KWQtSqlSerialDataSource(KInstance *inst,QObject *parent)
+ : KWQtSqlSerialDataSourceBase(inst,parent)
+{
+ myquery=0;
+}
+
+KWQtSqlSerialDataSource::~KWQtSqlSerialDataSource()
+{
+ delete myquery;
+ QSqlDatabase::removeDatabase("KWQTSQLPOWER");
+}
+
+
+QString KWQtSqlSerialDataSource::getValue( const QString &name, int record ) const
+{
+ int num=record;
+
+ if (!myquery) return name;
+ 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);
+ return (myquery->value(name)).toString();
+}
+
+void KWQtSqlSerialDataSource::save( QDomDocument & /*doc*/, QDomElement & /*parent*/)
+{
+/*
+ QDomElement def=doc.createElement(QString::fromLatin1("DEFINITION"));
+ parent.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());
+ def.appendChild(defEnt);
+ }
+ QDomElement cont=doc.createElement(QString::fromLatin1("CONTENT"));
+ parent.appendChild(cont);
+ for (Db::Iterator dbI=db.begin();dbI!=db.end();++dbI)
+ {
+ QDomElement rec=doc.createElement(QString::fromLatin1("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()]);
+ rec.appendChild(recEnt);
+ }
+ }
+*/
+}
+
+void KWQtSqlSerialDataSource::load( QDomElement& /*parentElem*/ )
+{
+/*
+ db.clear();
+ sampleRecord.clear();
+ QDomNode defNd=parentElem.namedItem("DEFINITION");
+ if (defNd.isNull()) return;
+ QDomElement def=defNd.toElement();
+ for (QDomElement defEnt=def.firstChild().toElement();!defEnt.isNull();defEnt=defEnt.nextSibling().toElement())
+ {
+ sampleRecord[defEnt.attribute(QString::fromLatin1("name"))]=defEnt.attribute(QString::fromLatin1("name"));//i18n( "No Value" );
+ }
+ QDomNode contNd=parentElem.namedItem("CONTENT");
+ if (contNd.isNull()) return;
+ for (QDomNode rec=contNd.firstChild();!rec.isNull();rec=rec.nextSibling())
+ {
+ appendRecord();
+ for (QDomElement recEnt=rec.firstChild().toElement();!recEnt.isNull();recEnt=recEnt.nextSibling().toElement())
+ {
+ setValue(recEnt.attribute(QString::fromLatin1("name")),
+ recEnt.attribute(QString::fromLatin1("data")),db.count()-1);
+ }
+ }
+*/
+}
+
+bool KWQtSqlSerialDataSource::showConfigDialog(QWidget *par,int action)
+{
+ bool ret=false;
+ if (action==KWSLEdit)
+ {
+ KWQtSqlDataSourceEditor *dia=new KWQtSqlDataSourceEditor(par,this);
+ ret=dia->exec();
+ delete dia;
+ }
+ else ret=KWQtSqlSerialDataSourceBase::showConfigDialog(par,action);
+
+ return ret;
+}
+
+void KWQtSqlSerialDataSource::refresh(bool force)
+{
+ if ((force) || (myquery==0))
+ {
+ if (myquery)
+ {
+ delete myquery;
+ myquery=0;
+ }
+ if ((!database) || (!database->isOpen())) openDatabase();
+ if ((!database) || (!database->isOpen())) return;
+ myquery=new QSqlCursor(tableName,true,database);
+ myquery->setMode(QSqlCursor::ReadOnly);
+ myquery->select(filter);
+ }
+ kdDebug()<<QString("There were %1 rows in the query").arg(myquery->size())<<endl;
+
+}
+
+
+
+
+
+/******************************************************************
+ *
+ * Class: KWQtSqlDataSourceEditor
+ *
+ ******************************************************************/
+
+
+
+KWQtSqlDataSourceEditor::KWQtSqlDataSourceEditor( QWidget *parent, KWQtSqlSerialDataSource *db_ )
+ :KDialogBase( Plain, i18n( "Mail Merge - Editor" ), Ok | Cancel, Ok, parent, "", 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()));
+ updateTableCombo();
+
+// connect(this,SIGNAL(okClicked()),this,SLOT(slotSetQuery()));
+}
+
+void KWQtSqlDataSourceEditor::tableChanged(int item)
+{
+ tableName=widget->tableCombo->text(item);
+ QSqlCursor *tmpCursor=new QSqlCursor(tableName,true,db->database);
+ tmpCursor->setMode(QSqlCursor::ReadOnly);
+
+ if (widget->filterCheckBox->isChecked()) tmpCursor->select(filter);
+
+ widget->DataTable->setSqlCursor(tmpCursor,true,true);
+ widget->DataTable->refresh(QDataTable::RefreshAll);
+}
+
+void KWQtSqlDataSourceEditor::updateTableCombo()
+{
+ widget->tableCombo->clear();
+ if (!db->database) return;
+ widget->tableCombo->insertItem("");
+ widget->tableCombo->insertStringList(db->database->tables());
+}
+
+void KWQtSqlDataSourceEditor::slotSetQuery()
+{
+ db->tableName=tableName;
+ db->filter=filter;
+ db->refresh(true);
+}
+
+
+void KWQtSqlDataSourceEditor::editFilter()
+{
+ KWQtSqlEasyFilter *f=new KWQtSqlEasyFilter(static_cast<QWidget*>(parent()));
+ f->exec();
+}
+
+extern "C" {
+ KWORD_MAILMERGE_EXPORT KWMailMergeDataSource *create_kwmailmerge_qtsqldb(KInstance *inst,QObject *parent)
+ {
+ return new KWQtSqlSerialDataSource(inst,parent);
+ }
+}
diff --git a/kword/mailmerge/sql/KWQtSqlSerialDataSource.h b/kword/mailmerge/sql/KWQtSqlSerialDataSource.h
new file mode 100644
index 00000000..e2051a2f
--- /dev/null
+++ b/kword/mailmerge/sql/KWQtSqlSerialDataSource.h
@@ -0,0 +1,85 @@
+/* This file is part of the KDE project
+ Copyright (C) 2001 Joseph Wenninger <jowenn@kde.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+*/
+
+#ifndef _SERIALLETTER_QtSql_PLUGIN_H_
+#define _SERIALLETTER_QtSql_PLUGIN_H_
+
+#include <qdom.h>
+#include <qsqlcursor.h>
+#include "KWMailMergeDataSource.h"
+#include "KWQtSqlSerialDataSourceBase.h"
+#include "qtsqldatasourceeditor.h"
+
+
+/******************************************************************
+ *
+ * Class: KWQtSqlSerialDataSource
+ *
+ ******************************************************************/
+
+class KWQtSqlSerialDataSource: public KWQtSqlSerialDataSourceBase
+{
+ public:
+ KWQtSqlSerialDataSource(KInstance *inst,QObject *parent);
+ ~KWQtSqlSerialDataSource();
+
+ virtual void save( QDomDocument &doc,QDomElement&);
+ virtual void load( QDomElement& elem );
+ virtual class QString getValue( const class QString &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);
+
+ protected:
+ friend class KWQtSqlDataSourceEditor;
+ QString tableName;
+ QString filter;
+ QSqlCursor *myquery;
+};
+
+/******************************************************************
+ *
+ * Class: KWQtSqlDataSourceEditor
+ *
+ ******************************************************************/
+
+class KWQtSqlDataSourceEditor : public KDialogBase
+{
+ Q_OBJECT
+
+public:
+ KWQtSqlDataSourceEditor( QWidget *parent, KWQtSqlSerialDataSource *db_ );
+ ~KWQtSqlDataSourceEditor(){;}
+private:
+ KWQtSqlSerialDataSource *db;
+ QtSqlDataSourceEditor *widget;
+ void updateTableCombo();
+ QString filter;
+ QString tableName;
+
+private slots:
+ void tableChanged(int);
+ void slotSetQuery();
+ void editFilter();
+};
+
+
+#endif
diff --git a/kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.cpp b/kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.cpp
new file mode 100644
index 00000000..781c1ab5
--- /dev/null
+++ b/kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.cpp
@@ -0,0 +1,105 @@
+/* This file is part of the KDE project
+ Copyright (C) 2001 Joseph Wenninger <jowenn@kde.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+*/
+
+#include "KWQtSqlSerialDataSourceBase.h"
+#include "KWQtSqlSerialDataSourceBase.moc"
+#include "KWQtSqlMailMergeOpen.h"
+#include <qlayout.h>
+#include <qdom.h>
+#include <kcombobox.h>
+#include <klineedit.h>
+#include <kpushbutton.h>
+#include <qsqldatabase.h>
+#include <qmessagebox.h>
+#include <kpassdlg.h>
+#include <qsqlrecord.h>
+#include <qsqlcursor.h>
+#include <qdatatable.h>
+#include <kdebug.h>
+#include <klocale.h>
+#include <kiconloader.h>
+
+
+
+
+/******************************************************************
+ *
+ * Class: KWQtSqlSerialDataSourceBase
+ *
+ ******************************************************************/
+
+int KWQtSqlSerialDataSourceBase::connectionId=0;
+
+KWQtSqlSerialDataSourceBase::KWQtSqlSerialDataSourceBase(KInstance *inst,QObject *parent)
+ : KWMailMergeDataSource(inst,parent)
+{
+ DataBaseConnection=QString("KWQTSQLPOWER")+parent->name()+QString("--%1").arg(connectionId++);
+ port=i18n("default");
+}
+
+KWQtSqlSerialDataSourceBase::~KWQtSqlSerialDataSourceBase()
+{
+ QSqlDatabase::removeDatabase(DataBaseConnection);
+}
+
+
+bool KWQtSqlSerialDataSourceBase::showConfigDialog(QWidget *par,int action)
+{
+ bool ret=false;
+ if (action==KWSLOpen)
+ {
+ KWQtSqlMailMergeOpen *dia=new KWQtSqlMailMergeOpen(par,this);
+
+ ret=dia->exec();
+ if (ret) openDatabase();
+ delete dia;
+ }
+ return ret;
+}
+
+bool KWQtSqlSerialDataSourceBase::openDatabase()
+{
+ QCString pwd;
+ QSqlDatabase::removeDatabase(DataBaseConnection);
+ database=QSqlDatabase::addDatabase(driver,DataBaseConnection);
+ if (database)
+ {
+ if (database->lastError().type()!=QSqlError::None)
+ {
+ QMessageBox::critical(0,i18n("Error"),database->lastError().databaseText(),QMessageBox::Abort,QMessageBox::NoButton,QMessageBox::NoButton);
+ return false;
+ }
+ database->setDatabaseName(databasename);
+ database->setUserName(username);
+ database->setHostName(hostname);
+ if ((port!=i18n("default"))&& (!port.isEmpty()))
+ database->setPort(port.toInt());
+
+ if (KPasswordDialog::getPassword(pwd, i18n("Please enter the password for the database connection"))
+ == KPasswordDialog::Accepted) database->setPassword(pwd);
+ if (database->open())
+ {
+ return true;
+ }
+ QMessageBox::critical(0,i18n("Error"),database->lastError().databaseText(),QMessageBox::Abort,QMessageBox::NoButton,QMessageBox::NoButton);
+ return false;
+ }
+ QMessageBox::critical(0,i18n("Error"),i18n("Unable to create database object"),QMessageBox::Abort,QMessageBox::NoButton,QMessageBox::NoButton);
+ return false;
+}
diff --git a/kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.h b/kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.h
new file mode 100644
index 00000000..0e4586c3
--- /dev/null
+++ b/kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.h
@@ -0,0 +1,63 @@
+/* This file is part of the KDE project
+ Copyright (C) 2001 Joseph Wenninger <jowenn@kde.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+*/
+
+#ifndef _SERIALLETTER_QtSql_BASE_H_
+#define _SERIALLETTER_QtSql_BASE_H_
+
+#include <qdom.h>
+#include <kdialogbase.h>
+#include <qsqldatabase.h>
+#include <qguardedptr.h>
+
+#include "KWMailMergeDataSource.h"
+#include "qtsqlopenwidget.h"
+
+
+
+/******************************************************************
+ *
+ * Class: KWQtSqlSerialDataSourceBase
+ *
+ ******************************************************************/
+class KWQtSqlSerialDataSourceBase: public KWMailMergeDataSource
+{
+ Q_OBJECT
+ K_DCOP
+ public:
+ KWQtSqlSerialDataSourceBase(KInstance *inst,QObject *parent);
+ ~KWQtSqlSerialDataSourceBase();
+
+ virtual bool showConfigDialog(QWidget *par,int action);
+
+ protected:
+ friend class KWQtSqlMailMergeOpen;
+ QString hostname;
+ QString username;
+ QString driver;
+ QString port;
+ QString databasename;
+ QGuardedPtr<QSqlDatabase> database;
+ QString DataBaseConnection;
+ static int connectionId;
+ k_dcop:
+ bool openDatabase();
+
+};
+
+#endif
diff --git a/kword/mailmerge/sql/Makefile.am b/kword/mailmerge/sql/Makefile.am
new file mode 100644
index 00000000..0c8595e0
--- /dev/null
+++ b/kword/mailmerge/sql/Makefile.am
@@ -0,0 +1,28 @@
+AM_CPPFLAGS = $(KOFFICE_INCLUDES) -I$(top_srcdir)/lib/kformula \
+ $(KOTEXT_INCLUDES) -I$(top_srcdir)/kword $(all_includes)
+
+kde_module_LTLIBRARIES = kwmailmerge_qtsqldb.la kwmailmerge_qtsqldb_power.la
+
+## Plugin encapsulating the QT SQL database interface
+kwmailmerge_qtsqldb_la_SOURCES = KWQtSqlSerialDataSource.cpp qtsqldatasourceeditor.ui \
+ KWQtSqlEasyFilter.cpp
+kwmailmerge_qtsqldb_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN)
+kwmailmerge_qtsqldb_la_LIBADD = libmailmergesqlcommon.la ../../libkwmailmerge_interface.la $(LIB_KDEUI)
+kwmailmerge_qtsqldb_la_COMPILE_FIRST = qtsqlopenwidget.h
+
+## 2. Plugin encapsulating the QT SQL database interface
+kwmailmerge_qtsqldb_power_la_SOURCES = KWQtSqlPowerSerialDataSource.cpp kwqtsqlpower.ui KWQtSqlPowerSerialDataSource.skel
+kwmailmerge_qtsqldb_power_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN)
+kwmailmerge_qtsqldb_power_la_LIBADD = libmailmergesqlcommon.la ../../libkwmailmerge_interface.la $(LIB_KDEUI)
+kwmailmerge_qtsqldb_power_la_COMPILE_FIRST = qtsqlopenwidget.h
+
+# Common files
+noinst_LTLIBRARIES = libmailmergesqlcommon.la
+libmailmergesqlcommon_la_SOURCES = KWQtSqlMailMergeOpen.cpp KWQtSqlSerialDataSourceBase.skel qtsqlopenwidget.ui KWQtSqlSerialDataSourceBase.cpp
+
+METASOURCES = AUTO
+
+#services_DATA=kwserialletter_qtsqldb.desktop kwserialletter_qtsqldb_power.desktop
+services_DATA=kwserialletter_qtsqldb_power.desktop
+servicesdir=$(kde_servicesdir)
+
diff --git a/kword/mailmerge/sql/kwqtsqlpower.ui b/kword/mailmerge/sql/kwqtsqlpower.ui
new file mode 100644
index 00000000..4979166e
--- /dev/null
+++ b/kword/mailmerge/sql/kwqtsqlpower.ui
@@ -0,0 +1,233 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>KWQtSqlPowerWidget</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>KWQtSqlPowerWidget</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>545</width>
+ <height>403</height>
+ </rect>
+ </property>
+ <property name="acceptDrops">
+ <bool>false</bool>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>GroupBox3</cstring>
+ </property>
+ <property name="title">
+ <string>Information</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="KListBox" row="1" column="1">
+ <property name="name">
+ <cstring>fields</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>120</height>
+ </size>
+ </property>
+ </widget>
+ <widget class="KListBox" row="1" column="0">
+ <property name="name">
+ <cstring>tables</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>120</height>
+ </size>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>TextLabel1_2</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Available tables:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>tables</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="1">
+ <property name="name">
+ <cstring>TextLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Fields of the selected table:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>fields</cstring>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>GroupBox6</cstring>
+ </property>
+ <property name="title">
+ <string>Query Result</string>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QDataTable">
+ <property name="name">
+ <cstring>queryresult</cstring>
+ </property>
+ <property name="rowMovingEnabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout11</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Query:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>query</cstring>
+ </property>
+ </widget>
+ <widget class="KLineEdit">
+ <property name="name">
+ <cstring>query</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>300</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="lineWidth">
+ <number>2</number>
+ </property>
+ <property name="frame">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="KPushButton">
+ <property name="name">
+ <cstring>execute</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Execute</string>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="Line">
+ <property name="name">
+ <cstring>Line2</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="frameShape">
+ <enum>VLine</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Sunken</enum>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ </widget>
+ <widget class="KPushButton">
+ <property name="name">
+ <cstring>setup</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Setup</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+</widget>
+<includes>
+ <include location="global" impldecl="in declaration">klineedit.h</include>
+ <include location="global" impldecl="in declaration">klistbox.h</include>
+ <include location="global" impldecl="in declaration">kpushbutton.h</include>
+</includes>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kword/mailmerge/sql/kwserialletter_qtsqldb.desktop b/kword/mailmerge/sql/kwserialletter_qtsqldb.desktop
new file mode 100644
index 00000000..3b06c655
--- /dev/null
+++ b/kword/mailmerge/sql/kwserialletter_qtsqldb.desktop
@@ -0,0 +1,106 @@
+[Desktop Entry]
+Type=Service
+ServiceTypes=KWord/MailMergePlugin
+
+Name=Qt-SQL Source (single table)
+Name[bg]=Източник Qt-SQL (една таблица)
+Name[ca]=Font Qt-SQL (taula única)
+Name[cy]=Ffynhonell Qt-SQL (tabl sengl)
+Name[da]=Qt-SQL-kilde (enkelt tabel)
+Name[de]=Qt-SQL (Einzeltabelle)
+Name[el]=Πηγή Qt-SQL (απλός πίνακας)
+Name[eo]=Qt-SQL-fonto (sola tabelo)
+Name[es]=Fuente Qt-SQL (una sola tabla)
+Name[et]=Qt-SQL allikas (üksik tabel)
+Name[eu]=Qt-SQL iturburua (taula bakarra)
+Name[fa]=متن Qt-SQL )جدول تک (
+Name[fi]=Qt-SQL lähde (ykai taulu)
+Name[fr]=Source Qt-SQL (table simple)
+Name[fy]=Qt-SQL-boarne (inkelfâldige tabel)
+Name[gl]=Fonte de Qt-SQL (táboa única)
+Name[he]=מקור Qt-SQL (טבלה בודדת)
+Name[hr]=Qt-SQL izvor (jedna tablica)
+Name[hu]=Qt-SQL adatforrás (egy tábla)
+Name[is]=QT-SQL ská (ein tafla)
+Name[it]=Fonte Qt-SQL (tabella singola)
+Name[ja]=Qt-SQL ソース (シングルテーブル)
+Name[km]=ប្រភព Qt-SQL (តារាង​តែ​មួយ)
+Name[lv]=Qt-SQL avots (viena tabula)
+Name[ms]=Sumber Qt-SQL (jadual tunggal)
+Name[nb]=Qt-SQL-kilde (en tabell)
+Name[nds]=Qt-SQL-Born (Enkeltabell)
+Name[ne]=Qt-SQL स्रोत (एकल तालिका)
+Name[nl]=Qt-SQL-bron (enkelvoudige tabel)
+Name[nn]=Qt-SQL-kjelde (enkel tabell)
+Name[pl]=Źródło Qt-SQL (pojedyncza tabela)
+Name[pt]=Fonte do Qt-SQL (tabela única)
+Name[pt_BR]=Qt-SQL (tabela única)
+Name[ru]=Исходный текст Qt-SQL (одна таблица)
+Name[se]=Qt-SQL-gáldu (oktageardanis tabealla)
+Name[sk]=Qt-SQL zdroj (jedna tabuľka)
+Name[sl]=Vir Qt-SQL (enojna tabela)
+Name[sr]=Qt-SQL извор (једна табела)
+Name[sr@Latn]=Qt-SQL izvor (jedna tabela)
+Name[sv]=QT-SQL-källa (enkel tabell)
+Name[uk]=Джерело Qt-SQL (одна таблиця)
+Name[uz]=Qt-SQL manbasi (bitta jadval)
+Name[uz@cyrillic]=Qt-SQL манбаси (битта жадвал)
+Name[zh_CN]=Qt-SQL 源(单表)
+Name[zh_TW]=Qt-SQL 來源 (單一表格)
+Comment=This datasource type lets you use SQL database tables stored on a SQL Server. Depending on your system configuration, MySQL, PostgreSQL and UnixODBC are among the supported database backends. There might even be more (Oracle in commercial Qt versions or 3rd party backends).
+Comment[ar]=هذا النّوع من المصادر البيانيّة يتيح لك إمكانية استخدام جداول قاعدة بيانيّة SQL مُخَزَّنة على خادم SQL. بحسب تهيئة نظامك، فإنّ MySQL، PostgreSQL و UnixODBC تُعتبر من بين ما هو مدعوم من وُجهات خلفيّة للقواعد البيانيّة. يمكن حتى أن يتواجد المزيد (Oracle في إصدارات Qt التِّجاريّة أو الوُجهات الخلفيّة المملوكة لطرف ثالث).
+Comment[az]=Bu mənbə sizə SQL verilənlər bazasını istifadə etməyə imkan verir. Sistem qurğularınızdan asılı olaraq : MySQL,Postgres,(Oracle, lisenziyalı QT buraxılışını işlədirsinizsə),....
+Comment[bg]=Този източник на данни използва таблица за съхранение на данните в СУБД (сървър SQL). В зависимост от настройките, поддръжка имат MySQL, PostgreSQL и UnixODBC. Може да има и още (Oracle в комерсиалните версии на Qt или други).
+Comment[bs]=Ovaj tip izvora podataka vam omogućuje da koristiti SQL tabele smještene na SQL serveru. Ovisno o konfiguraciji vašeg sistema, MySQL, PostgreSQL i UnixODBC su među podržanim bazama podataka. Možda čak i više od toga (Oracle u komercijalnim verzijama Qt-a ili backendima iz trećeg izvora).
+Comment[ca]=Aquest tipus de font de dades permet usar una base de dades SQL guardada a un servidor SQL. Depenent de la configuració del sistema, MySQL, PostgreSQL i UnixODBC estan entre les bases de dades permeses. Inclús n'hi poden haver més(Oracle comercial a la versió Qt i d'altres servidors).
+Comment[cs]=Tento zdroj dat vám umožní požívat tabulky SQL databází uložených na SQL serveru. V závislosti na vašem nastavení systému jsou podporovány databázové systémy MySQL, PostgreSQL a UnixODBC (Oracle je podporována v komerční verzi Qt nebo v databázových systémech jiných výrobců).
+Comment[cy]=Mae'r math yma o ffynhonnell ddata yn eich galluogi i ddefnyddio tablau cronfa ddata SQL sydd wedi eu storio ar weinydd SQL. Yn dibynnu ar ffurfweddiad eich system, mae MySQL, PostgreSQL a UnixODBC ymysg y cronfeydd data cefndirol a gynhelir. Efallai bod mwy ohonynt (Oracle mewn fersiynau masnachol Qt neu ôl-wynebau 3ydd blaid).
+Comment[da]=Denne datakildetype lader dig bruge SQL-databasetabeller gemt på en SQL-server. Afhængig af dine systemindstillinger er MySQL, PostgreSQL og UnixODBC blandt de understøttede underliggende databaser. Der er måske endda flere (Oracle i kommercielle Qt-versioner eller underliggende programmer fra tredjepartsudviklere).
+Comment[de]= Mit diesem Datenquellentyp können Sie Tabellen von SQL-Datenbanken verwenden, die sich auf einem SQL-Server befinden. Abhängig von der Systemeinrichtung: MySQL, PostgresSQL oder UnixODBC. Möglicherweise sogar weitere (etwa Oracle bei einer kommerziellen QT-Version oder Paketen von Drittanbietern).
+Comment[el]=Αυτός ο τύπος πηγής δεδομένων σας επιτρέπει να χρησιμοποιείτε πίνακες βάσεων δεδομένων SQL αποθηκευμένες σε έναν εξυπηρετητή SQL. Ανάλογα με τη ρύθμιση του συστήματος σας, οι MySQL, PostgreSQL και UnixODBC είναι μέσα στις υποστηριζόμενες βάσεις δεδομένων. Μπορεί να υπάρχουν και περισσότερες (Η Oracle σε εμπορικές εκδόσεις της Qt ή άλλες τρίτων κατασκευαστών).
+Comment[eo]=Tiu datumfonta tipo permesas uzi SQL-datumbazan tabelon en SQL-servilo. Depende de la konfiguraĵo de via sistemo estas subtenataj MySQL, PostgreSQL kaj UnixODBC. Povas esti pliaj (Orakolo en komercaj Qt-versioj aŭ triapartiaj datumbazajinterfacoj).
+Comment[es]=Este tipo de fuente de datos le permite utilizar tablas de bases de datos almacenadas en un servidor SQL. Dependiendo de la configuración de su sistema, MySQL, PostgreSQL, y UnixODBC están entre los interfaces de bases de datos soportados. Puede que haya incluso más (Oracle, si utiliza una versión de QT con licencia o interfaces de terceras partes).
+Comment[et]=See andmeallika tüüp lubab kasutada SQL-andmebaasi tabeleid, mida hoitakse SQL-serveris. Sõltuvalt süsteemi seadistustest on MySQL, PostgreSQL ja UnixODBC toetatud andmebaasisüsteemide hulgas. Neid võib olla isegi rohkem (Oracle kommertslikes Qt versioonides või kolmandate osapoolte mootorites).
+Comment[eu]=Datu-iturburu honek SQL zerbitzari batean gordetako SQL datu-baseko taulak erabiltzeko aukera ematen dizu. Zure sistemaren konfigurazioaren arabera, MySQL, PostgreSQL eta UnixODBC euskarriak onartzen dira. Gehiago ere egon daitezke (Oracle (Qt-ren bertsio komertzialetan) edo hirugarrenen beste euskarri batzuk).
+Comment[fa]=این نوع متن داده به شما اجازۀ استفاده از جدولهای دادگان SQL ذخیره‌شده در یک کارساز SQL را می‌دهد. بسته به پیکربندی سیستمتان، MySQL، PostgreSQL و UnixODBC، در میان پایانه‌های دادگان پشتیبانی‌شده می‌باشند. حتی ممکن است بیشتر باشند )Oracle در نسخه‌های تجاری Qt یا پایانه‌های گروه 3rd(.
+Comment[fi]=Tämä tietolähde käyttää SQL-tietokantojen tauluja. Riippuen järjestelmäsi asetuksista tuetaan MySQL, Postgres ja UnixODBC -tietokantoja. Kantoja voi myös olla enemmän (Oracle, jos omistat kaupallisen version QT:sta).
+Comment[fr]=Ce type de source de données vous permet d'utiliser des tables de base de données SQL stockées sur un serveur SQL. Selon votre configuration, ces tables peuvent venir de MySQL, PostgreSQL et UnixODBC, et d'autres encore (comme Oracle, si vous avez la licence commerciale de Qt, par exemple).
+Comment[fy]=Mei dit type gegevensboarne kinne jo SQL-databanktabellen dy bewarre binne op in SQL-tsjinner brûke. Ofhinklik fan jo systeemkonfiguraasje hearre MySQL, PostgreSQL en UnixOBC ta de stipe backends. Der binne mooglik mear (bgl. Oracle yn de kommersje Qt-ferzjes fan backends fan tredden).
+Comment[gl]=Este tipo de fonte de datos permítelle usar as táboas de base de datos armacenadas nun servidor de SQL. Dependendo da configuración do seu sistema, MySQL, PostgreSQL e UnixODBC encóntranse entre os sistemas soportados. Poden até existir máis (Oracle nas versións comerciais de Qt ou mesmo sistemas de terceiros).
+Comment[he]=טיפוס מקור נתונים זה מאפשר לך להשתמש בטבלאות של מסדי נתונים של SQL שמאוחסנות בשרת SQL. בין ממשקי מסדי הנתונים הנתמכים ניתן למנות את MySQL ,PostgreSQL ו־UnixODBC (התמיכה תלויה בהגדרות המערכת שלך). עשויים להיות אף ממשקים נתמכים נוספים, כמו Oracle בגירסאות מסחריות של Qt או ממשקי צד שלישי.
+Comment[hu]=Ez az adatforrástípus SQL-kiszolgálón tárolt SQL táblák elérését teszi lehetővé. A rendszer konfigurációjától függően MySQL, PostgreSQL és UnixODBC adatbázistípust lehet választani. Ezeken felül még más is előfordulhat (pl. Oracle a Qt fizetős változatában).
+Comment[is]=Þessi tegund gerir þér kleyft að nota SQL gagnagrunnstöflur sem liggja á SQL þjóni. MySQL, PostgreSQL og UnixODBC eru meðal studdra gagnagrunnsbakenda, háð kerfisuppsetningu þinni. Það gætu jafnvel verið fleiri (Oracle í verslunarútgáfu Qt eða þriðja aðila bakendar).
+Comment[it]=Questa fonte di dati permette di usare le tabelle di banche dati SQL memorizzate in un server SQL. A seconda della configurazione del tuo sistema, MySQL, PostgreSQL e UnixODBC potrebbero essere alcune delle banche dati supportate. Potrebbero essere supportate anche altre banche dati (Oracle nelle versioni commerciali di Qt o moduli di terze parti).
+Comment[ja]=このデータソースタイプは SQL サーバに保存されている SQL データベーステーブルを使用します。システム設定によりますが、MySQL, PostgreSQL, UnixODBC がサポートされているデータベース バックエンドです。他のものも使用可能かもしれません (Qt の商用バージョンでの Oracle や、サードパーティのバックエンドなど)。
+Comment[km]=ប្រភេទ​ប្រភព​ទិន្នន័យ​នេះ​អនុញ្ញាត​ឲ្យ​អ្នក​ប្រើ​តារាង​មូលដ្ឋាន​ទិន្នន័យ SQL ដែល​បាន​រក្សា​លើ​ម៉ាស៊ីន​បម្រើ SQL ។ ការ​ពឹងផ្អែក​លើ​ការ​កំណត់​រចនា​សម្ព័ន្ធ​ប្រព័ន្ធ​របស់​អ្នក MySQL, PostgreSQL និង UnixODBC គឺ​ក្នុង​ចំណោម​មូលដ្ឋាន​ទិន្នន័យ​ខាងក្រោយ​ដែល​បាន​គាំទ្រ ។ ប្រហែល​ជា​មាន​ច្រើន (Oracle ក្នុង​កំណែ​ពាណិជ្ជកម្ម Qt ឬ ភាគី​ខាងក្រោយ​ទីបី) ។
+Comment[lt]=Šis duomenų šaltinio tipas leidžia jums naudoti SQL duombazės lenteles išsaugotas SQL serveryje. Priklausomai nuo jūsų sistemos konfigūracijos MySQL, PostgreSQL ir UnixODBC yra tarp palaikomų duombazių tipų. Jų gali būti ir daugiau (Oracle komercinėse Qt versijose ar trečių šalių duombazių tipai).
+Comment[lv]=Šis datu avota tips ļauj jums izmantot SQL datubāzes tabulas, kas glabājas uz SQL servera. Atkarībā no jūsu sistēmas konfigurācijas: MySQL,PostgreSQL un UnixODBC ir starp atbalstītajām datubāzēm. Šeit var būt arī vairāk (Oracle, ja jūs izmantojiet komerciālu QT versiju vai trešo pušu risinājumus).
+Comment[ms]=Jenis sumber data ini membenarkan anda menggunakan jadual pangkalan data SQL yang distor dalam Pelayan SQL. Bergantung kepada konfigurasi sistem anda, MySQL, PostgreSQL dan UnixODBC antara bahagian belakang pangkalan data yang disokong. Mungkin terdapat lebih banyak lagi pilihan (Oracle dalam versi Qt komersil atau bahagian belakang pihak ketiga).
+Comment[mt]=Dan it-tip ta' sors iħallik tuża tabelli minn databases SQL fuq server SQL. Skond il-konfigurazzjoni tas-sistema tiegħek, jista' jkollok MySQL, PostgreSQL jew UnixODBC bħala sistemi sapportiti, u jista' jkun hemm oħrajn (Oracle fuq verżjonijiet kummerċjali ta' Qt jew oħrajn ta' terzi partiti).
+Comment[nb]=Datakilden lar deg bruke en databasetabell lagret på en SQL-tjener. Avhengig av oppsettet støttes databasetjenere som MySQL, PostgreSQL og UnixODBC. I tillegg finnes støtte for flere system (som Oracle i den kommersielle QT-utgaven eller tredjepartsystem).
+Comment[nds]= Mit dissen Datenborntyp laat sik SQL-Datenbanken vun en SQL-Server bruken. Afhängig vun Dien Systeeminstellen warrt Datenbankplegers för MySQL, PostgresSQL un UnixODBC ünnerstütt. Villicht ok mehr (t.B. Oracle in en warflich Qt-Verschoon oder Plegers vun anner Anbeders).
+Comment[ne]=यो डेटासंसाधन प्रकारले तपाईंलाई एसक्यूएल सर्भरमा संग्रह भएको एसक्यूएल डाटाबेस प्रयोग गर्न दिन्छ ।तपाईंको प्रणाली कन्फिगरेसनमा, माइएसक्यूएल, पोस्टग्रेएसक्यूएल र युनीक्सओडीबीसी भर परेर जुन समर्थित डाटाबेस ब्याकेन्डहरू हुन् । त्यहाँ पक्कै पनि अझ बढी (व्यापारिक क्यूटी संस्करणहरू वा तेस्रो पार्टीको ब्याकेन्डमा आकाशवाणी हुन्छन्)
+Comment[nl]=Met dit type gegevensbron kunt u SQL-databasetabellen die zijn opgeslagen op een SQL-server gebruiken. Afhankelijk van uw systeemconfiguratie behoren MySQL, PostgreSQL en UnixOBC tot de ondersteunde backends. Er zijn er mogelijk meer (bijv. Oracle in de commerciële Qt-versies of backends van derden).
+Comment[nn]=Med denne datakjeldetypen kan du bruka SQL-databasetabellar lagra på ein SQL-tenar. Avhengig av systemoppsettet kan du bruka MySQL, PostgreSQL og UnixODBC. Det finst kanskje til og med fleire. (Oracle i kommersielle Qt-versjonar eller tredjepartstillegg.)
+Comment[pl]=To źródło danych pozwala na przechowywanie tabel w bazach danych na serwerze SQL. W zależności od konfiguracji systemu: MySQL, PostgreSQL oraz UnixODBC są obsługiwane. Oczywiście może ich być więcej, np. Oracle w komercyjnej wersji Qt lub poprzez rozszerzenia innych firm.
+Comment[pt]=Este tipo de fonte de dados permite-lhe usar as tabelas de base de dados armazenadas num servidor de SQL. Dependendo da configuração do seu sistema, o MySQL, o PostgreSQL e o UnixODBC encontram-se entre os sistemas suportados. Podem até existir mais (o Oracle nas versões comerciais do Qt ou mesmo sistemas de terceiros).
+Comment[pt_BR]=Esta fonte de dados deixa você usar as tabelas do banco de dados SQL em seu Servidor SQL. Dependendo da configuração do seu sistema, MySQL, PostgreSQL e Unix ODBC estão entre os bancos de dados suportados. Podem existir outros (o Oracle em versões comerciais da Qt).
+Comment[ro]=Acest tip de sursă de date vă permite să utilizaţi tabelele SQL dintr-o bază de date a unui server SQL. În funcţie de configuraţia sistemului dumneavoastră aveţi acces la subsistemul MySQL, PostgreSQL şi UnixODBC. S-ar putea să existe chiar şi mai multe(Oracle în versiunile comerciale Qt sau subsisteme terţe).
+Comment[ru]=Этот тип данных позволит вам использовать таблицы на сервере баз данных. В зависимости от наличия в системе поддерживаются MySQL, PostgreSQL и UnixODBC. Помимо этого могут быть доступны Oracle в коммерческом Qt и прочие драйвера к базам данным от сторонних производителей
+Comment[se]=Dáinna diehtogáldošlájain sáhtát geavahit SQL-diehtovuođuid SQL-bálvás. MySQL, PostgreSQL ja UnixODBC leat dorjojuvvon diehtovuođđoduogážat. Dáidá gávdnot vel eanet, omd. Oracle kommersiealla QT-veršuvnnain dahje eará moduvllain.
+Comment[sk]=Tento zdroj dát umožňuje používať databázové tabuľky SQL. Podporované databáze sú MySQL, PostgreSQL, UnixODBC. (Prípadne aj Oracle, ak máte licencovanú verziu Qt alebo databáze iných výrobcov),...
+Comment[sl]=Ta tip vira podatkov vam omogoča uporabo zbirke tabel SQL, ki so shranjene na strežniku SQL. Glede na vašo konfiguracijo sistema so podprte med drugim zbirke MySQL, PostgreSQL in UnixODBC. Mogoče bodo tudi druge (Oracle v komercialnih različicah Qt ali podpore tretjih strani).
+Comment[sr]=Овај тип извора података вам омогућава да користите табеле из SQL базе података која се налази на SQL серверу. У зависности од подешавања вашег рачунара, MySQL, PostgreSQL и UnixODBC се налазе међу подржаним приступима бази. Могуће је да постоје и додатни приступи (Oracle у комерцијалним Qt верзијама итд.)
+Comment[sr@Latn]=Ovaj tip izvora podataka vam omogućava da koristite tabele iz SQL baze podataka koja se nalazi na SQL serveru. U zavisnosti od podešavanja vašeg računara, MySQL, PostgreSQL i UnixODBC se nalaze među podržanim pristupima bazi. Moguće je da postoje i dodatni pristupi (Oracle u komercijalnim Qt verzijama itd.)
+Comment[sv]=Den här typen av datakälla låter dig använda SQL-databastabeller lagrade på en SQL-server. Beroende på systeminställningarna finns MySQL, Postgres och UnixODBC bland de databaser som stöds. Det kan till och med finnas ännu fler (Oracle, om du använder en licensierad version av QT eller tredjepartsdatabaser).
+Comment[tg]=Ин намуди манбаъи маълумот ба шумо имкони истифодаи SQL асоси маълумот мизҳои дар Сервери SQL ҷойгир шуда.Аз шакли системаи шумо вобастааст, MySQL,PostSQL ва UnixODBC дар мобайни асоси маълумот дар анҷом.Дар он ҷо мумкин,ки бошад(Oracle дар коммерсияи Qt тафсир ё 3-ум қисми анҷом).
+Comment[tr]=Bu verikaynağı tipi bir SQL sunucusundaki SQL veritabanı tablolarını kullanmanıza izin verir.Sistem ayarlarınıza bağlı olarak MySQL, PostgreSQL ve UnixODBC desteklenen veritabanları arasındadır. Daha fazlası da olabilir. (Ticari Qt sürümlerindeki Oracle veya 3. şahıs veritabanları)
+Comment[uk]=Цей тип джерела даних дозволяє вам використовувати таблиці баз даних в серверах SQL. Відповідно до конфігурації вашої системи, підтримуються MySQL, PostgreSQL та UnixODBC. Можливо підтримуються і інші сервери БД (Oracle в комерційній поставці Qt або сервери сторонніх компаній).
+Comment[xh]=Uhlobo lwe mvelaphi ye data ikuvumela ukuba usebenzise iitafile zesiseko sedata ze SQL ezigcinwe Kumncedisi we SQL.Kuxhomekeke kuqwalaselo lwendlela yokusebenza, I SQL yam, PostgreSQL ne UnixODBC zikunye neziphelo zesiseko sedata esixhasiweyo. Kusenokuba nezingaphezulu (I Oracle ekwi thengiso lwenguqulelo ye QT okanye iziphelo zomntu wesithathu).
+Comment[zh_CN]=此数据库类型允许您使用存储于 SQL 服务器的 SQL 数据库表。根据您的系统配置不同,MySQL、PostgreSQL 和 UnixODBC 都是支持的后端数据库。可能还有更多(Qt 商业版中附带 Oracle 支持,或使用第三方后端)。
+Comment[zh_TW]=這個資料來源類別讓你使用在一個 SQL 伺服器上面的 SQL 資料表格。根據你的系統設定,MySQL、PostgreSQL 與 UnixODBC 都在支援之列。還會有更多(例如在商業版本的 QT 或是第三廠商提供相關支援)。
+
+X-KDE-Library=kwmailmerge_qtsqldb
+X-KDE-Capabilities=edit,open
+X-KDE-InternalName=QtSqlEasy
+X-KDE-PluginVersion=1
diff --git a/kword/mailmerge/sql/kwserialletter_qtsqldb_power.desktop b/kword/mailmerge/sql/kwserialletter_qtsqldb_power.desktop
new file mode 100644
index 00000000..7f45df9b
--- /dev/null
+++ b/kword/mailmerge/sql/kwserialletter_qtsqldb_power.desktop
@@ -0,0 +1,107 @@
+[Desktop Entry]
+Type=Service
+ServiceTypes=KWord/MailMergePlugin
+
+Name=Qt-SQL Source (power user)
+Name[bg]=Източник Qt-SQL (за напреднали)
+Name[ca]=Font Qt-SQL (usuari expert)
+Name[cs]=Qt-SQL zdroj (pokročilé)
+Name[cy]=Ffynhonell Qt-SQL (defnyddiwr medrus)
+Name[da]=Qt-SQL-kilde (avanceret bruger)
+Name[de]=Qt-SQL (für fortgeschrittene Benutzer)
+Name[el]=Πηγή Qt-SQL (προχωρημένου χρήστη)
+Name[eo]=Qt-SQL-fonto (sperta uzanto)
+Name[es]=Fuente Qt-SQL (usuario avanzado)
+Name[et]=Qt-SQL allikas (nõudlikule kasutajale)
+Name[eu]=Qt-SQL iturburua (erabiltzaile aurreratua)
+Name[fa]=متن Qt-SQL )کاربر توان(
+Name[fi]=Qt-SQL-lähde (tehokäyttäjä)
+Name[fr]=Source Qt-SQL (utilisateur expérimenté)
+Name[fy]=QT-SQL-boarne (avansearre brûkers)
+Name[gl]=Fonte de Qt-SQL (administración)
+Name[he]=מקור של Qt-SQL (משתמש מיומן)
+Name[hi]=क्यूटी-एसक्यूएल स्रोत (बड़े उपयोक्ता)
+Name[hu]=Qt-SQL-forrás (kiemelt felhasználó)
+Name[is]=QT-SQL skrá (lengra komnir notendur)
+Name[it]=Fonte Qt-SQL (utente esperto)
+Name[ja]=Qt-SQL ソース (パワーユーザ)
+Name[km]=ប្រភព Qt-SQL (អ្នកប្រើ​មាន​អំណាច)
+Name[lv]=Qt-SQL avots (power lietotājs)
+Name[ms]=Sumber Qt-SQL (pengguna kuasa)
+Name[nb]=Qt-SQL kilde (sjefsbruker)
+Name[nds]=Qt-SQL-Born (för künnige Brukers)
+Name[ne]=Qt-SQL स्रोत (पावर प्रयोगकर्ता)
+Name[nl]=QT-SQL-bron (geavanceerde gebruiker)
+Name[nn]=Qt-SQL-kjelde (kraftbrukar)
+Name[pl]=Źródło Qt-SQL (dla zaawansowanych użytkowników)
+Name[pt]=Fonte do Qt-SQL (administração)
+Name[pt_BR]=Qt-SQL (usuário avançado)
+Name[ru]=Исходный текст Qt-SQL (продвинутый пользователь)
+Name[se]=Qt-SQL-gáldu (áhppegeavaheaddji)
+Name[sk]=Qt-SQL zdroj (power user)
+Name[sl]=Vir Qt-SQL (zahtevni uporabnik)
+Name[sr]=Qt-SQL извор (администратор)
+Name[sr@Latn]=Qt-SQL izvor (administrator)
+Name[sv]=Qt-SQL-källa (avancerade användare)
+Name[tg]=Манбаъи Qt-SQL (истифодакунандаи зӯр)
+Name[tr]=Qt-SQL Kaynağı (sistem yöneticisi)
+Name[uk]=Джерело Qt-SQL (досвідчений користувач)
+Name[zh_CN]=Qt-SQL 源(高级用户)
+Name[zh_TW]=Qt-SQL 來源 (超級使用者)
+Comment=This datasource type lets you use SQL database tables stored on a SQL Server. Depending on your system configuration, MySQL, PostgreSQL and UnixODBC are among the supported database backends. There might even be more (Oracle in commercial Qt versions or 3rd party backends).
+Comment[ar]=هذا النّوع من المصادر البيانيّة يتيح لك إمكانية استخدام جداول قاعدة بيانيّة SQL مُخَزَّنة على خادم SQL. بحسب تهيئة نظامك، فإنّ MySQL، PostgreSQL و UnixODBC تُعتبر من بين ما هو مدعوم من وُجهات خلفيّة للقواعد البيانيّة. يمكن حتى أن يتواجد المزيد (Oracle في إصدارات Qt التِّجاريّة أو الوُجهات الخلفيّة المملوكة لطرف ثالث).
+Comment[az]=Bu mənbə sizə SQL verilənlər bazasını istifadə etməyə imkan verir. Sistem qurğularınızdan asılı olaraq : MySQL,Postgres,(Oracle, lisenziyalı QT buraxılışını işlədirsinizsə),....
+Comment[bg]=Този източник на данни използва таблица за съхранение на данните в СУБД (сървър SQL). В зависимост от настройките, поддръжка имат MySQL, PostgreSQL и UnixODBC. Може да има и още (Oracle в комерсиалните версии на Qt или други).
+Comment[bs]=Ovaj tip izvora podataka vam omogućuje da koristiti SQL tabele smještene na SQL serveru. Ovisno o konfiguraciji vašeg sistema, MySQL, PostgreSQL i UnixODBC su među podržanim bazama podataka. Možda čak i više od toga (Oracle u komercijalnim verzijama Qt-a ili backendima iz trećeg izvora).
+Comment[ca]=Aquest tipus de font de dades permet usar una base de dades SQL guardada a un servidor SQL. Depenent de la configuració del sistema, MySQL, PostgreSQL i UnixODBC estan entre les bases de dades permeses. Inclús n'hi poden haver més(Oracle comercial a la versió Qt i d'altres servidors).
+Comment[cs]=Tento zdroj dat vám umožní požívat tabulky SQL databází uložených na SQL serveru. V závislosti na vašem nastavení systému jsou podporovány databázové systémy MySQL, PostgreSQL a UnixODBC (Oracle je podporována v komerční verzi Qt nebo v databázových systémech jiných výrobců).
+Comment[cy]=Mae'r math yma o ffynhonnell ddata yn eich galluogi i ddefnyddio tablau cronfa ddata SQL sydd wedi eu storio ar weinydd SQL. Yn dibynnu ar ffurfweddiad eich system, mae MySQL, PostgreSQL a UnixODBC ymysg y cronfeydd data cefndirol a gynhelir. Efallai bod mwy ohonynt (Oracle mewn fersiynau masnachol Qt neu ôl-wynebau 3ydd blaid).
+Comment[da]=Denne datakildetype lader dig bruge SQL-databasetabeller gemt på en SQL-server. Afhængig af dine systemindstillinger er MySQL, PostgreSQL og UnixODBC blandt de understøttede underliggende databaser. Der er måske endda flere (Oracle i kommercielle Qt-versioner eller underliggende programmer fra tredjepartsudviklere).
+Comment[de]= Mit diesem Datenquellentyp können Sie Tabellen von SQL-Datenbanken verwenden, die sich auf einem SQL-Server befinden. Abhängig von der Systemeinrichtung: MySQL, PostgresSQL oder UnixODBC. Möglicherweise sogar weitere (etwa Oracle bei einer kommerziellen QT-Version oder Paketen von Drittanbietern).
+Comment[el]=Αυτός ο τύπος πηγής δεδομένων σας επιτρέπει να χρησιμοποιείτε πίνακες βάσεων δεδομένων SQL αποθηκευμένες σε έναν εξυπηρετητή SQL. Ανάλογα με τη ρύθμιση του συστήματος σας, οι MySQL, PostgreSQL και UnixODBC είναι μέσα στις υποστηριζόμενες βάσεις δεδομένων. Μπορεί να υπάρχουν και περισσότερες (Η Oracle σε εμπορικές εκδόσεις της Qt ή άλλες τρίτων κατασκευαστών).
+Comment[eo]=Tiu datumfonta tipo permesas uzi SQL-datumbazan tabelon en SQL-servilo. Depende de la konfiguraĵo de via sistemo estas subtenataj MySQL, PostgreSQL kaj UnixODBC. Povas esti pliaj (Orakolo en komercaj Qt-versioj aŭ triapartiaj datumbazajinterfacoj).
+Comment[es]=Este tipo de fuente de datos le permite utilizar tablas de bases de datos almacenadas en un servidor SQL. Dependiendo de la configuración de su sistema, MySQL, PostgreSQL, y UnixODBC están entre los interfaces de bases de datos soportados. Puede que haya incluso más (Oracle, si utiliza una versión de QT con licencia o interfaces de terceras partes).
+Comment[et]=See andmeallika tüüp lubab kasutada SQL-andmebaasi tabeleid, mida hoitakse SQL-serveris. Sõltuvalt süsteemi seadistustest on MySQL, PostgreSQL ja UnixODBC toetatud andmebaasisüsteemide hulgas. Neid võib olla isegi rohkem (Oracle kommertslikes Qt versioonides või kolmandate osapoolte mootorites).
+Comment[eu]=Datu-iturburu honek SQL zerbitzari batean gordetako SQL datu-baseko taulak erabiltzeko aukera ematen dizu. Zure sistemaren konfigurazioaren arabera, MySQL, PostgreSQL eta UnixODBC euskarriak onartzen dira. Gehiago ere egon daitezke (Oracle (Qt-ren bertsio komertzialetan) edo hirugarrenen beste euskarri batzuk).
+Comment[fa]=این نوع متن داده به شما اجازۀ استفاده از جدولهای دادگان SQL ذخیره‌شده در یک کارساز SQL را می‌دهد. بسته به پیکربندی سیستمتان، MySQL، PostgreSQL و UnixODBC، در میان پایانه‌های دادگان پشتیبانی‌شده می‌باشند. حتی ممکن است بیشتر باشند )Oracle در نسخه‌های تجاری Qt یا پایانه‌های گروه 3rd(.
+Comment[fi]=Tämä tietolähde käyttää SQL-tietokantojen tauluja. Riippuen järjestelmäsi asetuksista tuetaan MySQL, Postgres ja UnixODBC -tietokantoja. Kantoja voi myös olla enemmän (Oracle, jos omistat kaupallisen version QT:sta).
+Comment[fr]=Ce type de source de données vous permet d'utiliser des tables de base de données SQL stockées sur un serveur SQL. Selon votre configuration, ces tables peuvent venir de MySQL, PostgreSQL et UnixODBC, et d'autres encore (comme Oracle, si vous avez la licence commerciale de Qt, par exemple).
+Comment[fy]=Mei dit type gegevensboarne kinne jo SQL-databanktabellen dy bewarre binne op in SQL-tsjinner brûke. Ofhinklik fan jo systeemkonfiguraasje hearre MySQL, PostgreSQL en UnixOBC ta de stipe backends. Der binne mooglik mear (bgl. Oracle yn de kommersje Qt-ferzjes fan backends fan tredden).
+Comment[gl]=Este tipo de fonte de datos permítelle usar as táboas de base de datos armacenadas nun servidor de SQL. Dependendo da configuración do seu sistema, MySQL, PostgreSQL e UnixODBC encóntranse entre os sistemas soportados. Poden até existir máis (Oracle nas versións comerciais de Qt ou mesmo sistemas de terceiros).
+Comment[he]=טיפוס מקור נתונים זה מאפשר לך להשתמש בטבלאות של מסדי נתונים של SQL שמאוחסנות בשרת SQL. בין ממשקי מסדי הנתונים הנתמכים ניתן למנות את MySQL ,PostgreSQL ו־UnixODBC (התמיכה תלויה בהגדרות המערכת שלך). עשויים להיות אף ממשקים נתמכים נוספים, כמו Oracle בגירסאות מסחריות של Qt או ממשקי צד שלישי.
+Comment[hu]=Ez az adatforrástípus SQL-kiszolgálón tárolt SQL táblák elérését teszi lehetővé. A rendszer konfigurációjától függően MySQL, PostgreSQL és UnixODBC adatbázistípust lehet választani. Ezeken felül még más is előfordulhat (pl. Oracle a Qt fizetős változatában).
+Comment[is]=Þessi tegund gerir þér kleyft að nota SQL gagnagrunnstöflur sem liggja á SQL þjóni. MySQL, PostgreSQL og UnixODBC eru meðal studdra gagnagrunnsbakenda, háð kerfisuppsetningu þinni. Það gætu jafnvel verið fleiri (Oracle í verslunarútgáfu Qt eða þriðja aðila bakendar).
+Comment[it]=Questa fonte di dati permette di usare le tabelle di banche dati SQL memorizzate in un server SQL. A seconda della configurazione del tuo sistema, MySQL, PostgreSQL e UnixODBC potrebbero essere alcune delle banche dati supportate. Potrebbero essere supportate anche altre banche dati (Oracle nelle versioni commerciali di Qt o moduli di terze parti).
+Comment[ja]=このデータソースタイプは SQL サーバに保存されている SQL データベーステーブルを使用します。システム設定によりますが、MySQL, PostgreSQL, UnixODBC がサポートされているデータベース バックエンドです。他のものも使用可能かもしれません (Qt の商用バージョンでの Oracle や、サードパーティのバックエンドなど)。
+Comment[km]=ប្រភេទ​ប្រភព​ទិន្នន័យ​នេះ​អនុញ្ញាត​ឲ្យ​អ្នក​ប្រើ​តារាង​មូលដ្ឋាន​ទិន្នន័យ SQL ដែល​បាន​រក្សា​លើ​ម៉ាស៊ីន​បម្រើ SQL ។ ការ​ពឹងផ្អែក​លើ​ការ​កំណត់​រចនា​សម្ព័ន្ធ​ប្រព័ន្ធ​របស់​អ្នក MySQL, PostgreSQL និង UnixODBC គឺ​ក្នុង​ចំណោម​មូលដ្ឋាន​ទិន្នន័យ​ខាងក្រោយ​ដែល​បាន​គាំទ្រ ។ ប្រហែល​ជា​មាន​ច្រើន (Oracle ក្នុង​កំណែ​ពាណិជ្ជកម្ម Qt ឬ ភាគី​ខាងក្រោយ​ទីបី) ។
+Comment[lt]=Šis duomenų šaltinio tipas leidžia jums naudoti SQL duombazės lenteles išsaugotas SQL serveryje. Priklausomai nuo jūsų sistemos konfigūracijos MySQL, PostgreSQL ir UnixODBC yra tarp palaikomų duombazių tipų. Jų gali būti ir daugiau (Oracle komercinėse Qt versijose ar trečių šalių duombazių tipai).
+Comment[lv]=Šis datu avota tips ļauj jums izmantot SQL datubāzes tabulas, kas glabājas uz SQL servera. Atkarībā no jūsu sistēmas konfigurācijas: MySQL,PostgreSQL un UnixODBC ir starp atbalstītajām datubāzēm. Šeit var būt arī vairāk (Oracle, ja jūs izmantojiet komerciālu QT versiju vai trešo pušu risinājumus).
+Comment[ms]=Jenis sumber data ini membenarkan anda menggunakan jadual pangkalan data SQL yang distor dalam Pelayan SQL. Bergantung kepada konfigurasi sistem anda, MySQL, PostgreSQL dan UnixODBC antara bahagian belakang pangkalan data yang disokong. Mungkin terdapat lebih banyak lagi pilihan (Oracle dalam versi Qt komersil atau bahagian belakang pihak ketiga).
+Comment[mt]=Dan it-tip ta' sors iħallik tuża tabelli minn databases SQL fuq server SQL. Skond il-konfigurazzjoni tas-sistema tiegħek, jista' jkollok MySQL, PostgreSQL jew UnixODBC bħala sistemi sapportiti, u jista' jkun hemm oħrajn (Oracle fuq verżjonijiet kummerċjali ta' Qt jew oħrajn ta' terzi partiti).
+Comment[nb]=Datakilden lar deg bruke en databasetabell lagret på en SQL-tjener. Avhengig av oppsettet støttes databasetjenere som MySQL, PostgreSQL og UnixODBC. I tillegg finnes støtte for flere system (som Oracle i den kommersielle QT-utgaven eller tredjepartsystem).
+Comment[nds]= Mit dissen Datenborntyp laat sik SQL-Datenbanken vun en SQL-Server bruken. Afhängig vun Dien Systeeminstellen warrt Datenbankplegers för MySQL, PostgresSQL un UnixODBC ünnerstütt. Villicht ok mehr (t.B. Oracle in en warflich Qt-Verschoon oder Plegers vun anner Anbeders).
+Comment[ne]=यो डेटासंसाधन प्रकारले तपाईंलाई एसक्यूएल सर्भरमा संग्रह भएको एसक्यूएल डाटाबेस प्रयोग गर्न दिन्छ ।तपाईंको प्रणाली कन्फिगरेसनमा, माइएसक्यूएल, पोस्टग्रेएसक्यूएल र युनीक्सओडीबीसी भर परेर जुन समर्थित डाटाबेस ब्याकेन्डहरू हुन् । त्यहाँ पक्कै पनि अझ बढी (व्यापारिक क्यूटी संस्करणहरू वा तेस्रो पार्टीको ब्याकेन्डमा आकाशवाणी हुन्छन्)
+Comment[nl]=Met dit type gegevensbron kunt u SQL-databasetabellen die zijn opgeslagen op een SQL-server gebruiken. Afhankelijk van uw systeemconfiguratie behoren MySQL, PostgreSQL en UnixOBC tot de ondersteunde backends. Er zijn er mogelijk meer (bijv. Oracle in de commerciële Qt-versies of backends van derden).
+Comment[nn]=Med denne datakjeldetypen kan du bruka SQL-databasetabellar lagra på ein SQL-tenar. Avhengig av systemoppsettet kan du bruka MySQL, PostgreSQL og UnixODBC. Det finst kanskje til og med fleire. (Oracle i kommersielle Qt-versjonar eller tredjepartstillegg.)
+Comment[pl]=To źródło danych pozwala na przechowywanie tabel w bazach danych na serwerze SQL. W zależności od konfiguracji systemu: MySQL, PostgreSQL oraz UnixODBC są obsługiwane. Oczywiście może ich być więcej, np. Oracle w komercyjnej wersji Qt lub poprzez rozszerzenia innych firm.
+Comment[pt]=Este tipo de fonte de dados permite-lhe usar as tabelas de base de dados armazenadas num servidor de SQL. Dependendo da configuração do seu sistema, o MySQL, o PostgreSQL e o UnixODBC encontram-se entre os sistemas suportados. Podem até existir mais (o Oracle nas versões comerciais do Qt ou mesmo sistemas de terceiros).
+Comment[pt_BR]=Esta fonte de dados deixa você usar as tabelas do banco de dados SQL em seu Servidor SQL. Dependendo da configuração do seu sistema, MySQL, PostgreSQL e Unix ODBC estão entre os bancos de dados suportados. Podem existir outros (o Oracle em versões comerciais da Qt).
+Comment[ro]=Acest tip de sursă de date vă permite să utilizaţi tabelele SQL dintr-o bază de date a unui server SQL. În funcţie de configuraţia sistemului dumneavoastră aveţi acces la subsistemul MySQL, PostgreSQL şi UnixODBC. S-ar putea să existe chiar şi mai multe(Oracle în versiunile comerciale Qt sau subsisteme terţe).
+Comment[ru]=Этот тип данных позволит вам использовать таблицы на сервере баз данных. В зависимости от наличия в системе поддерживаются MySQL, PostgreSQL и UnixODBC. Помимо этого могут быть доступны Oracle в коммерческом Qt и прочие драйвера к базам данным от сторонних производителей
+Comment[se]=Dáinna diehtogáldošlájain sáhtát geavahit SQL-diehtovuođuid SQL-bálvás. MySQL, PostgreSQL ja UnixODBC leat dorjojuvvon diehtovuođđoduogážat. Dáidá gávdnot vel eanet, omd. Oracle kommersiealla QT-veršuvnnain dahje eará moduvllain.
+Comment[sk]=Tento zdroj dát umožňuje používať databázové tabuľky SQL. Podporované databáze sú MySQL, PostgreSQL, UnixODBC. (Prípadne aj Oracle, ak máte licencovanú verziu Qt alebo databáze iných výrobcov),...
+Comment[sl]=Ta tip vira podatkov vam omogoča uporabo zbirke tabel SQL, ki so shranjene na strežniku SQL. Glede na vašo konfiguracijo sistema so podprte med drugim zbirke MySQL, PostgreSQL in UnixODBC. Mogoče bodo tudi druge (Oracle v komercialnih različicah Qt ali podpore tretjih strani).
+Comment[sr]=Овај тип извора података вам омогућава да користите табеле из SQL базе података која се налази на SQL серверу. У зависности од подешавања вашег рачунара, MySQL, PostgreSQL и UnixODBC се налазе међу подржаним приступима бази. Могуће је да постоје и додатни приступи (Oracle у комерцијалним Qt верзијама итд.)
+Comment[sr@Latn]=Ovaj tip izvora podataka vam omogućava da koristite tabele iz SQL baze podataka koja se nalazi na SQL serveru. U zavisnosti od podešavanja vašeg računara, MySQL, PostgreSQL i UnixODBC se nalaze među podržanim pristupima bazi. Moguće je da postoje i dodatni pristupi (Oracle u komercijalnim Qt verzijama itd.)
+Comment[sv]=Den här typen av datakälla låter dig använda SQL-databastabeller lagrade på en SQL-server. Beroende på systeminställningarna finns MySQL, Postgres och UnixODBC bland de databaser som stöds. Det kan till och med finnas ännu fler (Oracle, om du använder en licensierad version av QT eller tredjepartsdatabaser).
+Comment[tg]=Ин намуди манбаъи маълумот ба шумо имкони истифодаи SQL асоси маълумот мизҳои дар Сервери SQL ҷойгир шуда.Аз шакли системаи шумо вобастааст, MySQL,PostSQL ва UnixODBC дар мобайни асоси маълумот дар анҷом.Дар он ҷо мумкин,ки бошад(Oracle дар коммерсияи Qt тафсир ё 3-ум қисми анҷом).
+Comment[tr]=Bu verikaynağı tipi bir SQL sunucusundaki SQL veritabanı tablolarını kullanmanıza izin verir.Sistem ayarlarınıza bağlı olarak MySQL, PostgreSQL ve UnixODBC desteklenen veritabanları arasındadır. Daha fazlası da olabilir. (Ticari Qt sürümlerindeki Oracle veya 3. şahıs veritabanları)
+Comment[uk]=Цей тип джерела даних дозволяє вам використовувати таблиці баз даних в серверах SQL. Відповідно до конфігурації вашої системи, підтримуються MySQL, PostgreSQL та UnixODBC. Можливо підтримуються і інші сервери БД (Oracle в комерційній поставці Qt або сервери сторонніх компаній).
+Comment[xh]=Uhlobo lwe mvelaphi ye data ikuvumela ukuba usebenzise iitafile zesiseko sedata ze SQL ezigcinwe Kumncedisi we SQL.Kuxhomekeke kuqwalaselo lwendlela yokusebenza, I SQL yam, PostgreSQL ne UnixODBC zikunye neziphelo zesiseko sedata esixhasiweyo. Kusenokuba nezingaphezulu (I Oracle ekwi thengiso lwenguqulelo ye QT okanye iziphelo zomntu wesithathu).
+Comment[zh_CN]=此数据库类型允许您使用存储于 SQL 服务器的 SQL 数据库表。根据您的系统配置不同,MySQL、PostgreSQL 和 UnixODBC 都是支持的后端数据库。可能还有更多(Qt 商业版中附带 Oracle 支持,或使用第三方后端)。
+Comment[zh_TW]=這個資料來源類別讓你使用在一個 SQL 伺服器上面的 SQL 資料表格。根據你的系統設定,MySQL、PostgreSQL 與 UnixODBC 都在支援之列。還會有更多(例如在商業版本的 QT 或是第三廠商提供相關支援)。
+
+X-KDE-Library=kwmailmerge_qtsqldb_power
+X-KDE-Capabilities=edit,open
+X-KDE-InternalName=QtSqlPower
+X-KDE-PluginVersion=1
diff --git a/kword/mailmerge/sql/qtsqldatasourceeditor.ui b/kword/mailmerge/sql/qtsqldatasourceeditor.ui
new file mode 100644
index 00000000..d0ad9902
--- /dev/null
+++ b/kword/mailmerge/sql/qtsqldatasourceeditor.ui
@@ -0,0 +1,158 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>QtSqlDataSourceEditor</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>QtSqlDataSourceEditor</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>493</width>
+ <height>270</height>
+ </rect>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout5</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Table:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>tableCombo</cstring>
+ </property>
+ </widget>
+ <widget class="QComboBox">
+ <property name="name">
+ <cstring>tableCombo</cstring>
+ </property>
+ </widget>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>filterCheckBox</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Filter output</string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>editFilter</cstring>
+ </property>
+ <property name="text">
+ <string>View or Edit Filter &amp;Rules</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ <widget class="Line">
+ <property name="name">
+ <cstring>Line1</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>HLine</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Sunken</enum>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout6</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Used database records:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>DataTable</cstring>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ <widget class="QDataTable">
+ <property name="name">
+ <cstring>DataTable</cstring>
+ </property>
+ </widget>
+ </vbox>
+</widget>
+<connections>
+ <connection>
+ <sender>filterCheckBox</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>QtSqlDataSourceEditor</receiver>
+ <slot>filterCheckBox_toggled(bool)</slot>
+ </connection>
+</connections>
+<includes>
+ <include location="local" impldecl="in implementation">qtsqldatasourceeditor.ui.h</include>
+</includes>
+<slots>
+ <slot>filterCheckBox_toggled( bool fcb_state )</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/kword/mailmerge/sql/qtsqldatasourceeditor.ui.h b/kword/mailmerge/sql/qtsqldatasourceeditor.ui.h
new file mode 100644
index 00000000..23d90812
--- /dev/null
+++ b/kword/mailmerge/sql/qtsqldatasourceeditor.ui.h
@@ -0,0 +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
+** 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 )
+{
+ editFilter->setEnabled(fcb_state);
+}
diff --git a/kword/mailmerge/sql/qtsqlopenwidget.ui b/kword/mailmerge/sql/qtsqlopenwidget.ui
new file mode 100644
index 00000000..1b635131
--- /dev/null
+++ b/kword/mailmerge/sql/qtsqlopenwidget.ui
@@ -0,0 +1,301 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>KWQtSqlOpenWidget</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>KWQtSqlOpenWidget</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>319</width>
+ <height>177</height>
+ </rect>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout10</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QComboBox">
+ <property name="name">
+ <cstring>savedProperties</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="KPushButton">
+ <property name="name">
+ <cstring>rememberButton</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&amp;Keep Settings...</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>GroupBox1</cstring>
+ </property>
+ <property name="title">
+ <string></string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget" row="0" column="0">
+ <property name="name">
+ <cstring>Layout8</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout7</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>1</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&amp;Hostname:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>hostname</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel2_2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>1</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&amp;Driver:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>drivers</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>1</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Database &amp;name:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>databasename</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel3</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>1</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&amp;Username:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>username</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel4</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>1</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&amp;Port:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>port</cstring>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout6</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="KLineEdit">
+ <property name="name">
+ <cstring>hostname</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="KComboBox">
+ <property name="name">
+ <cstring>drivers</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="KLineEdit">
+ <property name="name">
+ <cstring>databasename</cstring>
+ </property>
+ </widget>
+ <widget class="KLineEdit">
+ <property name="name">
+ <cstring>username</cstring>
+ </property>
+ </widget>
+ <widget class="KLineEdit">
+ <property name="name">
+ <cstring>port</cstring>
+ </property>
+ <property name="text">
+ <string>default</string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ </hbox>
+ </widget>
+ </grid>
+ </widget>
+ <spacer>
+ <property name="name" stdset="0">
+ <cstring>Spacer1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </vbox>
+</widget>
+<includes>
+ <include location="global" impldecl="in declaration">klineedit.h</include>
+ <include location="global" impldecl="in declaration">kcombobox.h</include>
+ <include location="global" impldecl="in declaration">kpushbutton.h</include>
+</includes>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>