summaryrefslogtreecommitdiffstats
path: root/kexi/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/plugins')
-rw-r--r--kexi/plugins/forms/kexiactionselectiondialog.cpp288
-rw-r--r--kexi/plugins/forms/kexiactionselectiondialog.h23
-rw-r--r--kexi/plugins/forms/kexiactionselectiondialog_p.h9
-rw-r--r--kexi/plugins/forms/kexidataawarewidgetinfo.cpp4
-rw-r--r--kexi/plugins/forms/kexidataawarewidgetinfo.h2
-rw-r--r--kexi/plugins/forms/kexidataprovider.cpp96
-rw-r--r--kexi/plugins/forms/kexidataprovider.h24
-rw-r--r--kexi/plugins/forms/kexidatasourcepage.cpp160
-rw-r--r--kexi/plugins/forms/kexidatasourcepage.h43
-rw-r--r--kexi/plugins/forms/kexidbfactory.cpp132
-rw-r--r--kexi/plugins/forms/kexidbfactory.h33
-rw-r--r--kexi/plugins/forms/kexidbtextwidgetinterface.cpp18
-rw-r--r--kexi/plugins/forms/kexidbtextwidgetinterface.h12
-rw-r--r--kexi/plugins/forms/kexiformdataiteminterface.cpp8
-rw-r--r--kexi/plugins/forms/kexiformdataiteminterface.h28
-rw-r--r--kexi/plugins/forms/kexiformeventhandler.cpp44
-rw-r--r--kexi/plugins/forms/kexiformeventhandler.h18
-rw-r--r--kexi/plugins/forms/kexiformmanager.cpp70
-rw-r--r--kexi/plugins/forms/kexiformmanager.h23
-rw-r--r--kexi/plugins/forms/kexiformpart.cpp222
-rw-r--r--kexi/plugins/forms/kexiformpart.h33
-rw-r--r--kexi/plugins/forms/kexiformscrollview.cpp74
-rw-r--r--kexi/plugins/forms/kexiformscrollview.h37
-rw-r--r--kexi/plugins/forms/kexiformview.cpp360
-rw-r--r--kexi/plugins/forms/kexiformview.h41
-rw-r--r--kexi/plugins/forms/widgets/kexidbautofield.cpp298
-rw-r--r--kexi/plugins/forms/widgets/kexidbautofield.h107
-rw-r--r--kexi/plugins/forms/widgets/kexidbcheckbox.cpp40
-rw-r--r--kexi/plugins/forms/widgets/kexidbcheckbox.h33
-rw-r--r--kexi/plugins/forms/widgets/kexidbcombobox.cpp248
-rw-r--r--kexi/plugins/forms/widgets/kexidbcombobox.h67
-rw-r--r--kexi/plugins/forms/widgets/kexidbdateedit.cpp80
-rw-r--r--kexi/plugins/forms/widgets/kexidbdateedit.h69
-rw-r--r--kexi/plugins/forms/widgets/kexidbdatetimeedit.cpp96
-rw-r--r--kexi/plugins/forms/widgets/kexidbdatetimeedit.h47
-rw-r--r--kexi/plugins/forms/widgets/kexidbdoublespinbox.cpp18
-rw-r--r--kexi/plugins/forms/widgets/kexidbdoublespinbox.h27
-rw-r--r--kexi/plugins/forms/widgets/kexidbform.cpp280
-rw-r--r--kexi/plugins/forms/widgets/kexidbform.h61
-rw-r--r--kexi/plugins/forms/widgets/kexidbimagebox.cpp316
-rw-r--r--kexi/plugins/forms/widgets/kexidbimagebox.h123
-rw-r--r--kexi/plugins/forms/widgets/kexidbintspinbox.cpp18
-rw-r--r--kexi/plugins/forms/widgets/kexidbintspinbox.h27
-rw-r--r--kexi/plugins/forms/widgets/kexidblabel.cpp220
-rw-r--r--kexi/plugins/forms/widgets/kexidblabel.h75
-rw-r--r--kexi/plugins/forms/widgets/kexidblineedit.cpp94
-rw-r--r--kexi/plugins/forms/widgets/kexidblineedit.h49
-rw-r--r--kexi/plugins/forms/widgets/kexidbsubform.cpp50
-rw-r--r--kexi/plugins/forms/widgets/kexidbsubform.h19
-rw-r--r--kexi/plugins/forms/widgets/kexidbtextedit.cpp56
-rw-r--r--kexi/plugins/forms/widgets/kexidbtextedit.h33
-rw-r--r--kexi/plugins/forms/widgets/kexidbtimeedit.cpp46
-rw-r--r--kexi/plugins/forms/widgets/kexidbtimeedit.h35
-rw-r--r--kexi/plugins/forms/widgets/kexidbutils.cpp14
-rw-r--r--kexi/plugins/forms/widgets/kexidbutils.h18
-rw-r--r--kexi/plugins/forms/widgets/kexiframe.cpp24
-rw-r--r--kexi/plugins/forms/widgets/kexiframe.h47
-rw-r--r--kexi/plugins/forms/widgets/kexiframeutils_p.cpp128
-rw-r--r--kexi/plugins/forms/widgets/kexipushbutton.cpp4
-rw-r--r--kexi/plugins/forms/widgets/kexipushbutton.h15
-rw-r--r--kexi/plugins/importexport/csv/kexicsv_importexportpart.cpp20
-rw-r--r--kexi/plugins/importexport/csv/kexicsv_importexportpart.h8
-rw-r--r--kexi/plugins/importexport/csv/kexicsvexport.cpp42
-rw-r--r--kexi/plugins/importexport/csv/kexicsvexport.h12
-rw-r--r--kexi/plugins/importexport/csv/kexicsvexportwizard.cpp112
-rw-r--r--kexi/plugins/importexport/csv/kexicsvexportwizard.h29
-rw-r--r--kexi/plugins/importexport/csv/kexicsvimportdialog.cpp508
-rw-r--r--kexi/plugins/importexport/csv/kexicsvimportdialog.h105
-rw-r--r--kexi/plugins/importexport/csv/kexicsvimportoptionsdlg.cpp28
-rw-r--r--kexi/plugins/importexport/csv/kexicsvimportoptionsdlg.h11
-rw-r--r--kexi/plugins/importexport/csv/kexicsvwidgets.cpp114
-rw-r--r--kexi/plugins/importexport/csv/kexicsvwidgets.h55
-rw-r--r--kexi/plugins/macros/kexiactions/datatableaction.cpp48
-rw-r--r--kexi/plugins/macros/kexiactions/datatableaction.h3
-rw-r--r--kexi/plugins/macros/kexiactions/executeaction.cpp18
-rw-r--r--kexi/plugins/macros/kexiactions/executeaction.h3
-rw-r--r--kexi/plugins/macros/kexiactions/kexiaction.cpp2
-rw-r--r--kexi/plugins/macros/kexiactions/kexiaction.h2
-rw-r--r--kexi/plugins/macros/kexiactions/kexivariable.h4
-rw-r--r--kexi/plugins/macros/kexiactions/messageaction.cpp8
-rw-r--r--kexi/plugins/macros/kexiactions/messageaction.h1
-rw-r--r--kexi/plugins/macros/kexiactions/navigateaction.cpp12
-rw-r--r--kexi/plugins/macros/kexiactions/navigateaction.h3
-rw-r--r--kexi/plugins/macros/kexiactions/objectnamevariable.h12
-rw-r--r--kexi/plugins/macros/kexiactions/objectvariable.h10
-rw-r--r--kexi/plugins/macros/kexiactions/openaction.cpp48
-rw-r--r--kexi/plugins/macros/kexiactions/openaction.h3
-rw-r--r--kexi/plugins/macros/kexipart/keximacrodesignview.cpp90
-rw-r--r--kexi/plugins/macros/kexipart/keximacrodesignview.h11
-rw-r--r--kexi/plugins/macros/kexipart/keximacroerror.cpp22
-rw-r--r--kexi/plugins/macros/kexipart/keximacroerror.h9
-rw-r--r--kexi/plugins/macros/kexipart/keximacroerrorbase.ui32
-rw-r--r--kexi/plugins/macros/kexipart/keximacropart.cpp22
-rw-r--r--kexi/plugins/macros/kexipart/keximacropart.h17
-rw-r--r--kexi/plugins/macros/kexipart/keximacroproperty.cpp242
-rw-r--r--kexi/plugins/macros/kexipart/keximacroproperty.h44
-rw-r--r--kexi/plugins/macros/kexipart/keximacrotextview.cpp20
-rw-r--r--kexi/plugins/macros/kexipart/keximacrotextview.h5
-rw-r--r--kexi/plugins/macros/kexipart/keximacroview.cpp34
-rw-r--r--kexi/plugins/macros/kexipart/keximacroview.h7
-rw-r--r--kexi/plugins/macros/lib/action.cpp54
-rw-r--r--kexi/plugins/macros/lib/action.h45
-rw-r--r--kexi/plugins/macros/lib/context.cpp52
-rw-r--r--kexi/plugins/macros/lib/context.h17
-rw-r--r--kexi/plugins/macros/lib/exception.cpp16
-rw-r--r--kexi/plugins/macros/lib/exception.h12
-rw-r--r--kexi/plugins/macros/lib/macro.cpp26
-rw-r--r--kexi/plugins/macros/lib/macro.h29
-rw-r--r--kexi/plugins/macros/lib/macroitem.cpp64
-rw-r--r--kexi/plugins/macros/lib/macroitem.h24
-rw-r--r--kexi/plugins/macros/lib/manager.cpp54
-rw-r--r--kexi/plugins/macros/lib/manager.h50
-rw-r--r--kexi/plugins/macros/lib/metamethod.cpp130
-rw-r--r--kexi/plugins/macros/lib/metamethod.h50
-rw-r--r--kexi/plugins/macros/lib/metaobject.cpp44
-rw-r--r--kexi/plugins/macros/lib/metaobject.h26
-rw-r--r--kexi/plugins/macros/lib/metaparameter.cpp36
-rw-r--r--kexi/plugins/macros/lib/metaparameter.h36
-rw-r--r--kexi/plugins/macros/lib/variable.cpp76
-rw-r--r--kexi/plugins/macros/lib/variable.h86
-rw-r--r--kexi/plugins/macros/lib/xmlhandler.cpp52
-rw-r--r--kexi/plugins/macros/lib/xmlhandler.h16
-rw-r--r--kexi/plugins/macros/tests/actiontests.cpp32
-rw-r--r--kexi/plugins/macros/tests/actiontests.h1
-rw-r--r--kexi/plugins/macros/tests/commontests.cpp246
-rw-r--r--kexi/plugins/macros/tests/commontests.h5
-rw-r--r--kexi/plugins/macros/tests/komacrotestbase.h18
-rw-r--r--kexi/plugins/macros/tests/macroitemtests.cpp26
-rw-r--r--kexi/plugins/macros/tests/macroitemtests.h1
-rw-r--r--kexi/plugins/macros/tests/macrotests.cpp32
-rw-r--r--kexi/plugins/macros/tests/macrotests.h1
-rw-r--r--kexi/plugins/macros/tests/testaction.cpp8
-rw-r--r--kexi/plugins/macros/tests/testaction.h3
-rw-r--r--kexi/plugins/macros/tests/testobject.cpp28
-rw-r--r--kexi/plugins/macros/tests/testobject.h13
-rw-r--r--kexi/plugins/macros/tests/variabletests.cpp26
-rw-r--r--kexi/plugins/macros/tests/variabletests.h1
-rw-r--r--kexi/plugins/macros/tests/xmlhandlertests.cpp180
-rw-r--r--kexi/plugins/macros/tests/xmlhandlertests.h15
-rw-r--r--kexi/plugins/macros/tests/xmlhandlertests2.cpp232
-rw-r--r--kexi/plugins/macros/tests/xmlhandlertests2.h19
-rw-r--r--kexi/plugins/migration/keximigrationpart.cpp10
-rw-r--r--kexi/plugins/migration/keximigrationpart.h8
-rw-r--r--kexi/plugins/queries/kexiaddparamdialog.cpp8
-rw-r--r--kexi/plugins/queries/kexiaddparamdialog.h5
-rw-r--r--kexi/plugins/queries/kexiaddparamwidget.ui36
-rw-r--r--kexi/plugins/queries/kexidynamicqueryparameterdialog.cpp24
-rw-r--r--kexi/plugins/queries/kexidynamicqueryparameterdialog.h11
-rw-r--r--kexi/plugins/queries/kexiparameterlisteditor.ui10
-rw-r--r--kexi/plugins/queries/kexiquerydesignerguieditor.cpp446
-rw-r--r--kexi/plugins/queries/kexiquerydesignerguieditor.h43
-rw-r--r--kexi/plugins/queries/kexiquerydesignersql.cpp146
-rw-r--r--kexi/plugins/queries/kexiquerydesignersql.h17
-rw-r--r--kexi/plugins/queries/kexiquerydesignersqlhistory.cpp166
-rw-r--r--kexi/plugins/queries/kexiquerydesignersqlhistory.h59
-rw-r--r--kexi/plugins/queries/kexiquerypart.cpp50
-rw-r--r--kexi/plugins/queries/kexiquerypart.h21
-rw-r--r--kexi/plugins/queries/kexiqueryview.cpp18
-rw-r--r--kexi/plugins/queries/kexiqueryview.h7
-rw-r--r--kexi/plugins/relations/kexirelationmaindlg.cpp20
-rw-r--r--kexi/plugins/relations/kexirelationmaindlg.h9
-rw-r--r--kexi/plugins/relations/kexirelationpartimpl.cpp14
-rw-r--r--kexi/plugins/relations/kexirelationpartimpl.h13
-rw-r--r--kexi/plugins/reports/kexireportfactory.cpp62
-rw-r--r--kexi/plugins/reports/kexireportfactory.h29
-rw-r--r--kexi/plugins/reports/kexireportform.cpp92
-rw-r--r--kexi/plugins/reports/kexireportform.h27
-rw-r--r--kexi/plugins/reports/kexireportpart.cpp20
-rw-r--r--kexi/plugins/reports/kexireportpart.h23
-rw-r--r--kexi/plugins/reports/kexireportview.cpp112
-rw-r--r--kexi/plugins/reports/kexireportview.h16
-rw-r--r--kexi/plugins/reports/reportwidgets.cpp56
-rw-r--r--kexi/plugins/reports/reportwidgets.h58
-rw-r--r--kexi/plugins/scripting/kexiapp/kexiappmainwindow.cpp4
-rw-r--r--kexi/plugins/scripting/kexiapp/kexiappmainwindow.h8
-rw-r--r--kexi/plugins/scripting/kexiapp/kexiappmodule.cpp2
-rw-r--r--kexi/plugins/scripting/kexiapp/kexiappmodule.h6
-rw-r--r--kexi/plugins/scripting/kexiapp/kexiapppart.h6
-rw-r--r--kexi/plugins/scripting/kexidb.doxyfile4
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbconnection.cpp54
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbconnection.h34
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbconnectiondata.cpp46
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbconnectiondata.h48
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbcursor.cpp18
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbcursor.h12
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbdriver.cpp20
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbdriver.h22
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbdrivermanager.cpp46
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbdrivermanager.h16
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbfield.cpp30
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbfield.h36
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbfieldlist.cpp12
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbfieldlist.h10
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbmodule.cpp4
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbmodule.h8
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbparser.cpp12
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbparser.h14
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbschema.cpp50
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbschema.h26
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbtransaction.cpp2
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbtransaction.h4
-rw-r--r--kexi/plugins/scripting/kexiscripting/kexiscriptdesignview.cpp104
-rw-r--r--kexi/plugins/scripting/kexiscripting/kexiscriptdesignview.h3
-rw-r--r--kexi/plugins/scripting/kexiscripting/kexiscripteditor.cpp14
-rw-r--r--kexi/plugins/scripting/kexiscripting/kexiscripteditor.h3
-rw-r--r--kexi/plugins/scripting/kexiscripting/kexiscriptpart.cpp26
-rw-r--r--kexi/plugins/scripting/kexiscripting/kexiscriptpart.h19
-rw-r--r--kexi/plugins/scripting/scripts/copycenter/CopyCenter.py78
-rw-r--r--kexi/plugins/scripting/scripts/copycenter/CopyCenterPluginKexiDB.py48
-rw-r--r--kexi/plugins/scripting/scripts/copycenter/CopyCenterPluginQtSQL.py36
-rw-r--r--kexi/plugins/scripting/scripts/exportxhtml/ExportXHTML.py4
-rwxr-xr-xkexi/plugins/scripting/scripts/importxhtml/ImportXHTML.py4
-rw-r--r--kexi/plugins/tables/kexilookupcolumnpage.cpp108
-rw-r--r--kexi/plugins/tables/kexilookupcolumnpage.h21
-rw-r--r--kexi/plugins/tables/kexitabledesigner_dataview.cpp6
-rw-r--r--kexi/plugins/tables/kexitabledesigner_dataview.h3
-rw-r--r--kexi/plugins/tables/kexitabledesignercommands.cpp78
-rw-r--r--kexi/plugins/tables/kexitabledesignercommands.h52
-rw-r--r--kexi/plugins/tables/kexitabledesignerview.cpp500
-rw-r--r--kexi/plugins/tables/kexitabledesignerview.h29
-rw-r--r--kexi/plugins/tables/kexitabledesignerview_p.cpp38
-rw-r--r--kexi/plugins/tables/kexitabledesignerview_p.h25
-rw-r--r--kexi/plugins/tables/kexitablepart.cpp60
-rw-r--r--kexi/plugins/tables/kexitablepart.h17
224 files changed, 5944 insertions, 5864 deletions
diff --git a/kexi/plugins/forms/kexiactionselectiondialog.cpp b/kexi/plugins/forms/kexiactionselectiondialog.cpp
index 26b4a9a6..31ab61d0 100644
--- a/kexi/plugins/forms/kexiactionselectiondialog.cpp
+++ b/kexi/plugins/forms/kexiactionselectiondialog.cpp
@@ -34,38 +34,38 @@
#include <kstdguiitem.h>
#include <kpushbutton.h>
-#include <qbitmap.h>
-#include <qlabel.h>
-#include <qheader.h>
-#include <qvbox.h>
-#include <qtooltip.h>
-#include <qwidgetstack.h>
+#include <tqbitmap.h>
+#include <tqlabel.h>
+#include <tqheader.h>
+#include <tqvbox.h>
+#include <tqtooltip.h>
+#include <tqwidgetstack.h>
#include <widget/utils/klistviewitemtemplate.h>
#include <widget/kexibrowser.h>
#include <widget/kexibrowseritem.h>
#include <kexiutils/utils.h>
-typedef KListViewItemTemplate<QString> ActionSelectorDialogListItemBase;
+typedef KListViewItemTemplate<TQString> ActionSelectorDialogListItemBase;
class ActionSelectorDialogListItem : public ActionSelectorDialogListItemBase
{
public:
- ActionSelectorDialogListItem(const QString& data, QListView *parent, QString label1)
- : ActionSelectorDialogListItemBase(data, parent, label1)
+ ActionSelectorDialogListItem(const TQString& data, TQListView *tqparent, TQString label1)
+ : ActionSelectorDialogListItemBase(data, tqparent, label1)
, fifoSorting(true)
{
- m_sortKey.sprintf("%2.2d", parent->childCount());
+ m_sortKey.sprintf("%2.2d", tqparent->childCount());
}
- ActionSelectorDialogListItem(const QString& data, QListViewItem *parent, QString label1)
- : ActionSelectorDialogListItemBase(data, parent, label1)
+ ActionSelectorDialogListItem(const TQString& data, TQListViewItem *tqparent, TQString label1)
+ : ActionSelectorDialogListItemBase(data, tqparent, label1)
, fifoSorting(true)
{
- m_sortKey.sprintf("%2.2d", parent->childCount());
+ m_sortKey.sprintf("%2.2d", tqparent->childCount());
}
- virtual QString key( int column, bool ascending ) const
+ virtual TQString key( int column, bool ascending ) const
{
return fifoSorting ? m_sortKey : ActionSelectorDialogListItemBase::key(column, ascending);
}
@@ -73,18 +73,18 @@ public:
bool fifoSorting : 1;
protected:
- QString m_sortKey;
+ TQString m_sortKey;
};
//---------------------------------------
-ActionsListViewBase::ActionsListViewBase(QWidget* parent)
- : KListView(parent)
+ActionsListViewBase::ActionsListViewBase(TQWidget* tqparent)
+ : KListView(tqparent)
{
- setResizeMode(QListView::AllColumns);
+ setResizeMode(TQListView::AllColumns);
addColumn("");
header()->hide();
- setColumnWidthMode(0, QListView::Maximum);
+ setColumnWidthMode(0, TQListView::Maximum);
setAllColumnsShowFocus(true);
setTooltipColumn(0);
}
@@ -93,9 +93,9 @@ ActionsListViewBase::~ActionsListViewBase()
{
}
-QListViewItem *ActionsListViewBase::itemForAction(const QString& actionName)
+TQListViewItem *ActionsListViewBase::itemForAction(const TQString& actionName)
{
- for (QListViewItemIterator it(this); it.current(); ++it) {
+ for (TQListViewItemIterator it(this); it.current(); ++it) {
ActionSelectorDialogListItem* item = dynamic_cast<ActionSelectorDialogListItem*>(it.current());
if (item && item->data == actionName)
return item;
@@ -103,9 +103,9 @@ QListViewItem *ActionsListViewBase::itemForAction(const QString& actionName)
return 0;
}
-void ActionsListViewBase::selectAction(const QString& actionName)
+void ActionsListViewBase::selectAction(const TQString& actionName)
{
- QListViewItem *item = itemForAction(actionName);
+ TQListViewItem *item = itemForAction(actionName);
if (item) {
setSelected(item, true);
ensureItemVisible(firstChild());
@@ -115,8 +115,8 @@ void ActionsListViewBase::selectAction(const QString& actionName)
//---------------------------------------
-KActionsListViewBase::KActionsListViewBase(QWidget* parent, KexiMainWindow* mainWin)
- : ActionsListViewBase(parent)
+KActionsListViewBase::KActionsListViewBase(TQWidget* tqparent, KexiMainWindow* mainWin)
+ : ActionsListViewBase(tqparent)
, m_mainWin(mainWin)
{
}
@@ -126,7 +126,7 @@ KActionsListViewBase::~KActionsListViewBase() {}
void KActionsListViewBase::init()
{
setSorting(0);
- const QPixmap noIcon( KexiUtils::emptyIcon(KIcon::Small) );
+ const TQPixmap noIcon( KexiUtils::emptyIcon(KIcon::Small) );
KActionPtrList sharedActions( m_mainWin->allActions() );
const Kexi::ActionCategories *acat = Kexi::actionCategories();
foreach (KActionPtrList::ConstIterator, it, sharedActions) {
@@ -142,9 +142,9 @@ void KActionsListViewBase::init()
if (!isActionVisible((*it)->name(), actionCategories))
continue;
ActionSelectorDialogListItem *pitem = new ActionSelectorDialogListItem((*it)->name(),
- this, (*it)->toolTip().isEmpty() ? (*it)->text().replace("&", "") : (*it)->toolTip() );
+ this, (*it)->toolTip().isEmpty() ? (*it)->text().tqreplace("&", "") : (*it)->toolTip() );
pitem->fifoSorting = false; //alpha sort
- pitem->setPixmap( 0, (*it)->iconSet( KIcon::Small, 16 ).pixmap( QIconSet::Small, QIconSet::Active ) );
+ pitem->setPixmap( 0, (*it)->iconSet( KIcon::Small, 16 ).pixmap( TQIconSet::Small, TQIconSet::Active ) );
if (!pitem->pixmap(0) || pitem->pixmap(0)->isNull())
pitem->setPixmap( 0, noIcon );
}
@@ -156,8 +156,8 @@ void KActionsListViewBase::init()
class KActionsListView : public KActionsListViewBase
{
public:
- KActionsListView(QWidget* parent, KexiMainWindow* mainWin)
- : KActionsListViewBase(parent, mainWin)
+ KActionsListView(TQWidget* tqparent, KexiMainWindow* mainWin)
+ : KActionsListViewBase(tqparent, mainWin)
{
}
virtual ~KActionsListView() {}
@@ -172,8 +172,8 @@ public:
class CurrentFormActionsListView : public KActionsListViewBase
{
public:
- CurrentFormActionsListView(QWidget* parent, KexiMainWindow* mainWin)
- : KActionsListViewBase(parent, mainWin)
+ CurrentFormActionsListView(TQWidget* tqparent, KexiMainWindow* mainWin)
+ : KActionsListViewBase(tqparent, mainWin)
{
}
virtual ~CurrentFormActionsListView() {}
@@ -188,11 +188,11 @@ public:
class ActionCategoriesListView : public ActionsListViewBase
{
public:
- ActionCategoriesListView(QWidget* parent) //, KexiProject& project)
- : ActionsListViewBase(parent)
+ ActionCategoriesListView(TQWidget* tqparent) //, KexiProject& project)
+ : ActionsListViewBase(tqparent)
{
- QListViewItem *item = new ActionSelectorDialogListItem("noaction", this, i18n("No action") );
- const QPixmap noIcon( KexiUtils::emptyIcon(KIcon::Small) );
+ TQListViewItem *item = new ActionSelectorDialogListItem("noaction", this, i18n("No action") );
+ const TQPixmap noIcon( KexiUtils::emptyIcon(KIcon::Small) );
item->setPixmap(0, noIcon);
item = new ActionSelectorDialogListItem("kaction", this, i18n("Application actions") );
item->setPixmap(0, SmallIcon("form_action"));
@@ -205,7 +205,7 @@ public:
item = new KexiBrowserItem(this, info);
item->setText(0, part->instanceCaption());
}
- QListViewItem *formItem = itemForAction("form");
+ TQListViewItem *formItem = itemForAction("form");
if (formItem) {
item = new ActionSelectorDialogListItem("currentForm", formItem,
i18n("Current form's actions", "Current"));
@@ -219,9 +219,9 @@ public:
}
//! \return item for action \a actionName, reimplemented to support KexiBrowserItem items
- virtual QListViewItem *itemForAction(const QString& actionName)
+ virtual TQListViewItem *itemForAction(const TQString& actionName)
{
- for (QListViewItemIterator it(this); it.current(); ++it) {
+ for (TQListViewItemIterator it(this); it.current(); ++it) {
//simple case
ActionSelectorDialogListItem* item = dynamic_cast<ActionSelectorDialogListItem*>(it.current());
if (item) {
@@ -243,8 +243,8 @@ public:
class ActionToExecuteListView : public ActionsListViewBase
{
public:
- ActionToExecuteListView(QWidget* parent)
- : ActionsListViewBase(parent)
+ ActionToExecuteListView(TQWidget* tqparent)
+ : ActionsListViewBase(tqparent)
{
}
@@ -253,7 +253,7 @@ class ActionToExecuteListView : public ActionsListViewBase
}
//! Updates actions
- void showActionsForMimeType(const QString& mimeType) {
+ void showActionsForMimeType(const TQString& mimeType) {
if (m_currentMimeType == mimeType)
return;
m_currentMimeType = mimeType;
@@ -263,7 +263,7 @@ class ActionToExecuteListView : public ActionsListViewBase
return;
int supportedViewModes = part->supportedViewModes();
ActionSelectorDialogListItem *item;
- const QPixmap noIcon( KexiUtils::emptyIcon(KIcon::Small) );
+ const TQPixmap noIcon( KexiUtils::emptyIcon(KIcon::Small) );
if (supportedViewModes & Kexi::DataViewMode) {
item = new ActionSelectorDialogListItem("open", this, i18n("Open in Data View"));
item->setPixmap(0, SmallIcon("fileopen"));
@@ -278,7 +278,7 @@ class ActionToExecuteListView : public ActionsListViewBase
printItem->setPixmap(0, SmallIcon("fileprint"));
KAction *a = KStdAction::printPreview(0, 0, 0);
item = new ActionSelectorDialogListItem("printPreview", printItem,
- a->text().replace("&", "").replace("...", ""));
+ a->text().tqreplace("&", "").tqreplace("...", ""));
item->setPixmap(0, SmallIcon(a->icon()));
delete a;
item = new ActionSelectorDialogListItem("pageSetup", printItem, i18n("Show Page Setup"));
@@ -321,7 +321,7 @@ class ActionToExecuteListView : public ActionsListViewBase
setMinimumWidth( columnWidth(0) );
}
- QString m_currentMimeType;
+ TQString m_currentMimeType;
};
//-------------------------------------
@@ -339,25 +339,25 @@ public:
{
}
- void raiseWidget(QWidget *w)
+ void raiseWidget(TQWidget *w)
{
secondAnd3rdColumnStack->raiseWidget( w );
selectActionToBeExecutedLbl->setBuddy(w);
}
- void updateSelectActionToBeExecutedMessage(const QString& actionType)
+ void updateSelectActionToBeExecutedMessage(const TQString& actionType)
{
- QString msg;
+ TQString msg;
if (actionType=="noaction")
- msg = QString::null;
+ msg = TQString();
// hardcoded, but it's not that bad
else if (actionType=="macro")
- msg = i18n("&Select macro to be executed after clicking \"%1\" button:").arg(actionWidgetName);
+ msg = i18n("&Select macro to be executed after clicking \"%1\" button:").tqarg(actionWidgetName);
else if (actionType=="script")
- msg = i18n("&Select script to be executed after clicking \"%1\" button:").arg(actionWidgetName);
+ msg = i18n("&Select script to be executed after clicking \"%1\" button:").tqarg(actionWidgetName);
//default: table/query/form/report...
else
- msg = i18n("&Select object to be opened after clicking \"%1\" button:").arg(actionWidgetName);
+ msg = i18n("&Select object to be opened after clicking \"%1\" button:").tqarg(actionWidgetName);
selectActionToBeExecutedLbl->setText(msg);
}
@@ -374,29 +374,29 @@ public:
}
KexiMainWindow* mainWin;
- QString actionWidgetName;
+ TQString actionWidgetName;
ActionCategoriesListView* actionCategoriesListView; //!< for column #1
- QWidget *kactionPageWidget;
+ TQWidget *kactionPageWidget;
KActionsListView* kactionListView; //!< for column #2
KexiBrowser* objectsListView; //!< for column #2
- QWidget *currentFormActionsPageWidget; //!< for column #2
+ TQWidget *currentFormActionsPageWidget; //!< for column #2
CurrentFormActionsListView* currentFormActionsListView; //!< for column #2
- QWidget *emptyWidget;
- QLabel* selectActionToBeExecutedLbl;
+ TQWidget *emptyWidget;
+ TQLabel* selectActionToBeExecutedLbl;
ActionToExecuteListView* actionToExecuteListView;
- QLabel *actionToExecuteLbl;
- QWidget *secondAnd3rdColumnMainWidget;
- QGridLayout *glyr;
- QGridLayout *secondAnd3rdColumnGrLyr;
- QWidgetStack *secondAnd3rdColumnStack, *secondColumnStack;
+ TQLabel *actionToExecuteLbl;
+ TQWidget *secondAnd3rdColumnMainWidget;
+ TQGridLayout *glyr;
+ TQGridLayout *secondAnd3rdColumnGrLyr;
+ TQWidgetStack *secondAnd3rdColumnStack, *secondColumnStack;
bool hideActionToExecuteListView;
};
//-------------------------------------
-KexiActionSelectionDialog::KexiActionSelectionDialog(KexiMainWindow* mainWin, QWidget *parent,
- const KexiFormEventAction::ActionData& action, const QCString& actionWidgetName)
- : KDialogBase(parent, "actionSelectorDialog", true, i18n("Assigning Action to Command Button"),
+KexiActionSelectionDialog::KexiActionSelectionDialog(KexiMainWindow* mainWin, TQWidget *tqparent,
+ const KexiFormEventAction::ActionData& action, const TQCString& actionWidgetName)
+ : KDialogBase(tqparent, "actionSelectorDialog", true, i18n("Assigning Action to Command Button"),
KDialogBase::Ok | KDialogBase::Cancel )
, d( new KexiActionSelectionDialogPrivate() )
{
@@ -404,8 +404,8 @@ KexiActionSelectionDialog::KexiActionSelectionDialog(KexiMainWindow* mainWin, QW
d->actionWidgetName = actionWidgetName;
setButtonOK( KGuiItem(i18n("Assign action", "&Assign"), "button_ok", i18n("Assign action")) );
- QWidget *mainWidget = new QWidget( this );
- mainWidget->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
+ TQWidget *mainWidget = new TQWidget( this );
+ mainWidget->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum);
setMainWidget(mainWidget);
/* lbl 1
@@ -418,80 +418,80 @@ KexiActionSelectionDialog::KexiActionSelectionDialog(KexiMainWindow* mainWin, QW
+------------+ +-------------------------------+
\______________________________________________/
glyr
- [a]- QWidgetStack *secondAnd3rdColumnStack,
- - for displaying KActions, the stack contains d->kactionPageWidget QWidget
- - for displaying objects, the stack contains secondAnd3rdColumnMainWidget QWidget and QGridLayout *secondAnd3rdColumnGrLyr
- - kactionPageWidget contains only a QVBoxLayout and label+kactionListView
+ [a]- TQWidgetStack *secondAnd3rdColumnStack,
+ - for displaying KActions, the stack contains d->kactionPageWidget TQWidget
+ - for displaying objects, the stack contains secondAnd3rdColumnMainWidget TQWidget and TQGridLayout *secondAnd3rdColumnGrLyr
+ - kactionPageWidget contains only a TQVBoxLayout and label+kactionListView
*/
- d->glyr = new QGridLayout(mainWidget, 2, 2, KDialog::marginHint(), KDialog::spacingHint());
+ d->glyr = new TQGridLayout(mainWidget, 2, 2, KDialog::marginHint(), KDialog::spacingHint());
d->glyr->setRowStretch(1, 1);
// 1st column: action types
d->actionCategoriesListView = new ActionCategoriesListView(mainWidget);
- d->actionCategoriesListView->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Minimum);
+ d->actionCategoriesListView->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Minimum);
d->glyr->addWidget(d->actionCategoriesListView, 1, 0);
- connect( d->actionCategoriesListView, SIGNAL(selectionChanged(QListViewItem*)),
- this, SLOT(slotActionCategorySelected(QListViewItem*)));
+ connect( d->actionCategoriesListView, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ this, TQT_SLOT(slotActionCategorySelected(TQListViewItem*)));
- QLabel *lbl = new QLabel(d->actionCategoriesListView, i18n("Action category:"), mainWidget);
+ TQLabel *lbl = new TQLabel(d->actionCategoriesListView, i18n("Action category:"), mainWidget);
lbl->setMinimumHeight(lbl->fontMetrics().height()*2);
- lbl->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
- lbl->setAlignment(Qt::AlignTop|Qt::AlignLeft|Qt::WordBreak);
- d->glyr->addWidget(lbl, 0, 0, Qt::AlignTop|Qt::AlignLeft);
+ lbl->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed);
+ lbl->tqsetAlignment(TQt::AlignTop|TQt::AlignLeft|TQt::WordBreak);
+ d->glyr->addWidget(lbl, 0, 0, TQt::AlignTop|TQt::AlignLeft);
// widget stack for 2nd and 3rd column
- d->secondAnd3rdColumnStack = new QWidgetStack(mainWidget);
- d->secondAnd3rdColumnStack->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
- d->glyr->addMultiCellWidget(d->secondAnd3rdColumnStack, 0, 1, 1, 1);//, Qt::AlignTop|Qt::AlignLeft);
+ d->secondAnd3rdColumnStack = new TQWidgetStack(mainWidget);
+ d->secondAnd3rdColumnStack->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum);
+ d->glyr->addMultiCellWidget(d->secondAnd3rdColumnStack, 0, 1, 1, 1);//, TQt::AlignTop|TQt::AlignLeft);
- d->secondAnd3rdColumnMainWidget = new QWidget(d->secondAnd3rdColumnStack);
- d->secondAnd3rdColumnMainWidget->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
- d->secondAnd3rdColumnGrLyr = new QGridLayout(d->secondAnd3rdColumnMainWidget, 2, 2, 0, KDialog::spacingHint());
+ d->secondAnd3rdColumnMainWidget = new TQWidget(d->secondAnd3rdColumnStack);
+ d->secondAnd3rdColumnMainWidget->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum);
+ d->secondAnd3rdColumnGrLyr = new TQGridLayout(d->secondAnd3rdColumnMainWidget, 2, 2, 0, KDialog::spacingHint());
d->secondAnd3rdColumnGrLyr->setRowStretch(1, 2);
d->secondAnd3rdColumnStack->addWidget(d->secondAnd3rdColumnMainWidget);
// 2nd column: list of actions/objects
d->objectsListView = new KexiBrowser(d->secondAnd3rdColumnMainWidget, d->mainWin, 0/*features*/);
d->secondAnd3rdColumnGrLyr->addWidget(d->objectsListView, 1, 0);
- connect(d->objectsListView, SIGNAL(selectionChanged(KexiPart::Item*)),
- this, SLOT(slotItemForOpeningOrExecutingSelected(KexiPart::Item*)));
+ connect(d->objectsListView, TQT_SIGNAL(selectionChanged(KexiPart::Item*)),
+ this, TQT_SLOT(slotItemForOpeningOrExecutingSelected(KexiPart::Item*)));
- d->selectActionToBeExecutedLbl = new QLabel(d->secondAnd3rdColumnMainWidget);
- d->selectActionToBeExecutedLbl->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
- d->selectActionToBeExecutedLbl->setAlignment(Qt::AlignTop|Qt::AlignLeft|Qt::WordBreak);
+ d->selectActionToBeExecutedLbl = new TQLabel(d->secondAnd3rdColumnMainWidget);
+ d->selectActionToBeExecutedLbl->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed);
+ d->selectActionToBeExecutedLbl->tqsetAlignment(TQt::AlignTop|TQt::AlignLeft|TQt::WordBreak);
d->selectActionToBeExecutedLbl->setMinimumHeight(d->selectActionToBeExecutedLbl->fontMetrics().height()*2);
- d->secondAnd3rdColumnGrLyr->addWidget(d->selectActionToBeExecutedLbl, 0, 0, Qt::AlignTop|Qt::AlignLeft);
+ d->secondAnd3rdColumnGrLyr->addWidget(d->selectActionToBeExecutedLbl, 0, 0, TQt::AlignTop|TQt::AlignLeft);
- d->emptyWidget = new QWidget(d->secondAnd3rdColumnStack);
+ d->emptyWidget = new TQWidget(d->secondAnd3rdColumnStack);
d->secondAnd3rdColumnStack->addWidget(d->emptyWidget);
// 3rd column: actions to execute
d->actionToExecuteListView = new ActionToExecuteListView(d->secondAnd3rdColumnMainWidget);
d->actionToExecuteListView->installEventFilter(this); //to be able to disable painting
d->actionToExecuteListView->viewport()->installEventFilter(this); //to be able to disable painting
- d->actionToExecuteListView->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Minimum);
- connect(d->actionToExecuteListView, SIGNAL(executed(QListViewItem*)),
- this, SLOT(slotActionToExecuteItemExecuted(QListViewItem*)));
- connect(d->actionToExecuteListView, SIGNAL(selectionChanged(QListViewItem*)),
- this, SLOT(slotActionToExecuteItemSelected(QListViewItem*)));
+ d->actionToExecuteListView->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Minimum);
+ connect(d->actionToExecuteListView, TQT_SIGNAL(executed(TQListViewItem*)),
+ this, TQT_SLOT(slotActionToExecuteItemExecuted(TQListViewItem*)));
+ connect(d->actionToExecuteListView, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ this, TQT_SLOT(slotActionToExecuteItemSelected(TQListViewItem*)));
d->secondAnd3rdColumnGrLyr->addWidget(d->actionToExecuteListView, 1, 1);
- d->actionToExecuteLbl = new QLabel(d->actionToExecuteListView,
+ d->actionToExecuteLbl = new TQLabel(d->actionToExecuteListView,
i18n("Action to execute:"), d->secondAnd3rdColumnMainWidget);
d->actionToExecuteLbl->installEventFilter(this); //to be able to disable painting
- d->actionToExecuteLbl->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
- d->actionToExecuteLbl->setAlignment(Qt::AlignTop|Qt::AlignLeft|Qt::WordBreak);
- d->secondAnd3rdColumnGrLyr->addWidget(d->actionToExecuteLbl, 0, 1, Qt::AlignTop|Qt::AlignLeft);
+ d->actionToExecuteLbl->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed);
+ d->actionToExecuteLbl->tqsetAlignment(TQt::AlignTop|TQt::AlignLeft|TQt::WordBreak);
+ d->secondAnd3rdColumnGrLyr->addWidget(d->actionToExecuteLbl, 0, 1, TQt::AlignTop|TQt::AlignLeft);
// temporary show all sections to avoid resizing the dialog in the future
d->actionCategoriesListView->selectAction("table");
d->setActionToExecuteSectionVisible(true);
adjustSize();
- resize(QMAX(700, width()), QMAX(450, height()));
+ resize(TQMAX(700, width()), TQMAX(450, height()));
d->actionToExecuteListView->updateWidth();
bool ok;
- QString actionType, actionArg;
+ TQString actionType, actionArg;
KexiPart::Info* partInfo = action.decodeString(actionType, actionArg, ok);
if (ok) {
d->actionCategoriesListView->selectAction(actionType);
@@ -511,7 +511,7 @@ KexiActionSelectionDialog::KexiActionSelectionDialog(KexiMainWindow* mainWin, QW
KexiPart::Item *item = d->mainWin->project()->item(partInfo, actionArg);
if (d->objectsListView && item) {
d->objectsListView->selectItem(*item);
- QString actionOption( action.option );
+ TQString actionOption( action.option );
if (actionOption.isEmpty())
actionOption = "open"; // for backward compatibility
d->actionToExecuteListView->selectAction(actionOption);
@@ -530,26 +530,26 @@ KexiActionSelectionDialog::~KexiActionSelectionDialog()
delete d;
}
-void KexiActionSelectionDialog::slotKActionItemExecuted(QListViewItem*)
+void KexiActionSelectionDialog::slotKActionItemExecuted(TQListViewItem*)
{
accept();
}
-void KexiActionSelectionDialog::slotKActionItemSelected(QListViewItem*)
+void KexiActionSelectionDialog::slotKActionItemSelected(TQListViewItem*)
{
d->setActionToExecuteSectionVisible(false);
- updateOKButtonStatus();
+ updateOKButtontqStatus();
}
-void KexiActionSelectionDialog::slotCurrentFormActionItemExecuted(QListViewItem*)
+void KexiActionSelectionDialog::slotCurrentFormActionItemExecuted(TQListViewItem*)
{
accept();
}
-void KexiActionSelectionDialog::slotCurrentFormActionItemSelected(QListViewItem*)
+void KexiActionSelectionDialog::slotCurrentFormActionItemSelected(TQListViewItem*)
{
d->setActionToExecuteSectionVisible(false);
- updateOKButtonStatus();
+ updateOKButtontqStatus();
}
void KexiActionSelectionDialog::slotItemForOpeningOrExecutingSelected(KexiPart::Item* item)
@@ -557,7 +557,7 @@ void KexiActionSelectionDialog::slotItemForOpeningOrExecutingSelected(KexiPart::
d->setActionToExecuteSectionVisible(item);
}
-void KexiActionSelectionDialog::slotActionToExecuteItemExecuted(QListViewItem* item)
+void KexiActionSelectionDialog::slotActionToExecuteItemExecuted(TQListViewItem* item)
{
if (!item)
return;
@@ -566,38 +566,38 @@ void KexiActionSelectionDialog::slotActionToExecuteItemExecuted(QListViewItem* i
accept();
}
-void KexiActionSelectionDialog::slotActionToExecuteItemSelected(QListViewItem*)
+void KexiActionSelectionDialog::slotActionToExecuteItemSelected(TQListViewItem*)
{
- updateOKButtonStatus();
+ updateOKButtontqStatus();
}
-void KexiActionSelectionDialog::slotActionCategorySelected(QListViewItem* item)
+void KexiActionSelectionDialog::slotActionCategorySelected(TQListViewItem* item)
{
ActionSelectorDialogListItem *simpleItem = dynamic_cast<ActionSelectorDialogListItem*>(item);
// simple case: part-less item, e.g. kaction:
if (simpleItem) {
d->updateSelectActionToBeExecutedMessage(simpleItem->data);
- QString selectActionToBeExecutedMsg(
+ TQString selectActionToBeExecutedMsg(
i18n("&Select action to be executed after clicking \"%1\" button:")); // msg for a label
if (simpleItem->data == "kaction") {
if (!d->kactionPageWidget) {
- //create lbl+list view with a vlayout
- d->kactionPageWidget = new QWidget();
- d->kactionPageWidget->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
- QVBoxLayout *vlyr = new QVBoxLayout(d->kactionPageWidget, 0, KDialog::spacingHint());
+ //create lbl+list view with a vtqlayout
+ d->kactionPageWidget = new TQWidget();
+ d->kactionPageWidget->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum);
+ TQVBoxLayout *vlyr = new TQVBoxLayout(d->kactionPageWidget, 0, KDialog::spacingHint());
d->kactionListView = new KActionsListView(d->kactionPageWidget, d->mainWin);
d->kactionListView->init();
- QLabel *lbl = new QLabel(d->kactionListView, selectActionToBeExecutedMsg.arg(d->actionWidgetName),
+ TQLabel *lbl = new TQLabel(d->kactionListView, selectActionToBeExecutedMsg.tqarg(d->actionWidgetName),
d->kactionPageWidget);
- lbl->setAlignment(Qt::AlignTop|Qt::AlignLeft|Qt::WordBreak);
+ lbl->tqsetAlignment(TQt::AlignTop|TQt::AlignLeft|TQt::WordBreak);
lbl->setMinimumHeight(lbl->fontMetrics().height()*2);
vlyr->addWidget(lbl);
vlyr->addWidget(d->kactionListView);
d->secondAnd3rdColumnStack->addWidget(d->kactionPageWidget);
- connect(d->kactionListView, SIGNAL(executed(QListViewItem*)),
- this, SLOT(slotKActionItemExecuted(QListViewItem*)));
- connect( d->kactionListView, SIGNAL(selectionChanged(QListViewItem*)),
- this, SLOT(slotKActionItemSelected(QListViewItem*)));
+ connect(d->kactionListView, TQT_SIGNAL(executed(TQListViewItem*)),
+ this, TQT_SLOT(slotKActionItemExecuted(TQListViewItem*)));
+ connect( d->kactionListView, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ this, TQT_SLOT(slotKActionItemSelected(TQListViewItem*)));
}
d->setActionToExecuteSectionVisible(false);
d->raiseWidget(d->kactionPageWidget);
@@ -605,24 +605,24 @@ void KexiActionSelectionDialog::slotActionCategorySelected(QListViewItem* item)
}
else if (simpleItem->data == "currentForm") {
if (!d->currentFormActionsPageWidget) {
- //create lbl+list view with a vlayout
- d->currentFormActionsPageWidget = new QWidget();
- d->currentFormActionsPageWidget->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
- QVBoxLayout *vlyr = new QVBoxLayout(d->currentFormActionsPageWidget, 0, KDialog::spacingHint());
+ //create lbl+list view with a vtqlayout
+ d->currentFormActionsPageWidget = new TQWidget();
+ d->currentFormActionsPageWidget->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum);
+ TQVBoxLayout *vlyr = new TQVBoxLayout(d->currentFormActionsPageWidget, 0, KDialog::spacingHint());
d->currentFormActionsListView = new CurrentFormActionsListView(
d->currentFormActionsPageWidget, d->mainWin);
d->currentFormActionsListView->init();
- QLabel *lbl = new QLabel(d->currentFormActionsListView,
- selectActionToBeExecutedMsg.arg(d->actionWidgetName), d->currentFormActionsPageWidget);
- lbl->setAlignment(Qt::AlignTop|Qt::AlignLeft|Qt::WordBreak);
+ TQLabel *lbl = new TQLabel(d->currentFormActionsListView,
+ selectActionToBeExecutedMsg.tqarg(d->actionWidgetName), d->currentFormActionsPageWidget);
+ lbl->tqsetAlignment(TQt::AlignTop|TQt::AlignLeft|TQt::WordBreak);
lbl->setMinimumHeight(lbl->fontMetrics().height()*2);
vlyr->addWidget(lbl);
vlyr->addWidget(d->currentFormActionsListView);
d->secondAnd3rdColumnStack->addWidget(d->currentFormActionsPageWidget);
- connect(d->currentFormActionsListView, SIGNAL(executed(QListViewItem*)),
- this, SLOT(slotCurrentFormActionItemExecuted(QListViewItem*)));
- connect( d->currentFormActionsListView, SIGNAL(selectionChanged(QListViewItem*)),
- this, SLOT(slotCurrentFormActionItemSelected(QListViewItem*)));
+ connect(d->currentFormActionsListView, TQT_SIGNAL(executed(TQListViewItem*)),
+ this, TQT_SLOT(slotCurrentFormActionItemExecuted(TQListViewItem*)));
+ connect( d->currentFormActionsListView, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ this, TQT_SLOT(slotCurrentFormActionItemSelected(TQListViewItem*)));
}
d->setActionToExecuteSectionVisible(false);
d->raiseWidget(d->currentFormActionsPageWidget);
@@ -635,7 +635,7 @@ void KexiActionSelectionDialog::slotActionCategorySelected(QListViewItem* item)
d->setActionToExecuteSectionVisible(false);
}
d->actionCategoriesListView->update();
- updateOKButtonStatus();
+ updateOKButtontqStatus();
return;
}
// other case
@@ -656,7 +656,7 @@ void KexiActionSelectionDialog::slotActionCategorySelected(QListViewItem* item)
d->raiseWidget( d->secondAnd3rdColumnMainWidget );
}
d->actionCategoriesListView->update();
- updateOKButtonStatus();
+ updateOKButtontqStatus();
}
KexiMainWindow* KexiActionSelectionDialog::mainWin() const
@@ -673,14 +673,14 @@ KexiFormEventAction::ActionData KexiActionSelectionDialog::currentAction() const
if (simpleItem) {
if (simpleItem->data == "kaction") {
if (d->kactionListView->selectedItem()) {
- data.string = QString("kaction:")
+ data.string = TQString("kaction:")
+ dynamic_cast<ActionSelectorDialogListItem*>( d->kactionListView->selectedItem() )->data;
return data;
}
}
else if (simpleItem->data == "currentForm") {
if (d->currentFormActionsListView->selectedItem()) {
- data.string = QString("currentForm:")
+ data.string = TQString("currentForm:")
+ dynamic_cast<ActionSelectorDialogListItem*>(
d->currentFormActionsListView->selectedItem() )->data;
return data;
@@ -696,7 +696,7 @@ KexiFormEventAction::ActionData KexiActionSelectionDialog::currentAction() const
KexiPart::Info* partInfo = partItem ? Kexi::partManager().infoForMimeType( partItem->mimeType() ) : 0;
if (partInfo) {
// opening or executing: table:name, query:name, form:name, macro:name, script:name, etc.
- data.string = QString("%1:%2").arg(partInfo->objectName()).arg(partItem->name());
+ data.string = TQString("%1:%2").tqarg(partInfo->objectName()).tqarg(partItem->name());
data.option = actionToExecute->data;
return data;
}
@@ -705,15 +705,15 @@ KexiFormEventAction::ActionData KexiActionSelectionDialog::currentAction() const
return data; // No Action
}
-void KexiActionSelectionDialog::updateOKButtonStatus()
+void KexiActionSelectionDialog::updateOKButtontqStatus()
{
- QPushButton *btn = actionButton(Ok);
+ TQPushButton *btn = actionButton(Ok);
ActionSelectorDialogListItem *simpleItem = dynamic_cast<ActionSelectorDialogListItem*>(
d->actionCategoriesListView->selectedItem());
btn->setEnabled( (simpleItem && simpleItem->data == "noaction") || !currentAction().isEmpty() );
}
-bool KexiActionSelectionDialog::eventFilter(QObject *o, QEvent *e)
+bool KexiActionSelectionDialog::eventFilter(TQObject *o, TQEvent *e)
{
if (d->hideActionToExecuteListView)
return true;
diff --git a/kexi/plugins/forms/kexiactionselectiondialog.h b/kexi/plugins/forms/kexiactionselectiondialog.h
index 6b6a896b..a9c4d549 100644
--- a/kexi/plugins/forms/kexiactionselectiondialog.h
+++ b/kexi/plugins/forms/kexiactionselectiondialog.h
@@ -37,9 +37,10 @@ namespace KexiPart {
class KEXIFORMUTILS_EXPORT KexiActionSelectionDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiActionSelectionDialog(KexiMainWindow* mainWin, QWidget *parent,
- const KexiFormEventAction::ActionData& action, const QCString& actionWidgetName);
+ KexiActionSelectionDialog(KexiMainWindow* mainWin, TQWidget *tqparent,
+ const KexiFormEventAction::ActionData& action, const TQCString& actionWidgetName);
~KexiActionSelectionDialog();
/*! \return selected action data or empty action if dialog has been rejected
@@ -49,20 +50,20 @@ class KEXIFORMUTILS_EXPORT KexiActionSelectionDialog : public KDialogBase
//! \return the \a KexiMainWindow instance.
KexiMainWindow* mainWin() const;
- virtual bool eventFilter(QObject *o, QEvent *e);
+ virtual bool eventFilter(TQObject *o, TQEvent *e);
protected slots:
- void slotActionCategorySelected(QListViewItem* item);
- void slotKActionItemExecuted(QListViewItem*);
- void slotKActionItemSelected(QListViewItem*);
- void slotActionToExecuteItemExecuted(QListViewItem* item);
- void slotActionToExecuteItemSelected(QListViewItem*);
- void slotCurrentFormActionItemExecuted(QListViewItem*);
- void slotCurrentFormActionItemSelected(QListViewItem*);
+ void slotActionCategorySelected(TQListViewItem* item);
+ void slotKActionItemExecuted(TQListViewItem*);
+ void slotKActionItemSelected(TQListViewItem*);
+ void slotActionToExecuteItemExecuted(TQListViewItem* item);
+ void slotActionToExecuteItemSelected(TQListViewItem*);
+ void slotCurrentFormActionItemExecuted(TQListViewItem*);
+ void slotCurrentFormActionItemSelected(TQListViewItem*);
void slotItemForOpeningOrExecutingSelected(KexiPart::Item* item);
protected:
- void updateOKButtonStatus();
+ void updateOKButtontqStatus();
class KexiActionSelectionDialogPrivate;
KexiActionSelectionDialogPrivate* d;
diff --git a/kexi/plugins/forms/kexiactionselectiondialog_p.h b/kexi/plugins/forms/kexiactionselectiondialog_p.h
index 51f5c369..a2579074 100644
--- a/kexi/plugins/forms/kexiactionselectiondialog_p.h
+++ b/kexi/plugins/forms/kexiactionselectiondialog_p.h
@@ -26,20 +26,21 @@
class ActionsListViewBase : public KListView
{
public:
- ActionsListViewBase(QWidget* parent);
+ ActionsListViewBase(TQWidget* tqparent);
virtual ~ActionsListViewBase();
//! \return item for action \a actionName
- virtual QListViewItem *itemForAction(const QString& actionName);
- void selectAction(const QString& actionName);
+ virtual TQListViewItem *itemForAction(const TQString& actionName);
+ void selectAction(const TQString& actionName);
};
//! @internal Used by KActionsListView and CurrentFormActionsListView (in column 2)
class KActionsListViewBase : public ActionsListViewBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KActionsListViewBase(QWidget* parent, KexiMainWindow* mainWin);
+ KActionsListViewBase(TQWidget* tqparent, KexiMainWindow* mainWin);
virtual ~KActionsListViewBase();
void init();
virtual bool isActionVisible(const char* actionName, int actionCategories) const = 0;
diff --git a/kexi/plugins/forms/kexidataawarewidgetinfo.cpp b/kexi/plugins/forms/kexidataawarewidgetinfo.cpp
index a6033c70..0947c8a1 100644
--- a/kexi/plugins/forms/kexidataawarewidgetinfo.cpp
+++ b/kexi/plugins/forms/kexidataawarewidgetinfo.cpp
@@ -26,8 +26,8 @@ KexiDataAwareWidgetInfo::KexiDataAwareWidgetInfo(KFormDesigner::WidgetFactory *f
}
KexiDataAwareWidgetInfo::KexiDataAwareWidgetInfo(KFormDesigner::WidgetFactory *f,
- const char* parentFactoryName, const char* inheritedClassName)
- : KFormDesigner::WidgetInfo(f, parentFactoryName, inheritedClassName)
+ const char* tqparentFactoryName, const char* inheritedClassName)
+ : KFormDesigner::WidgetInfo(f, tqparentFactoryName, inheritedClassName)
{
init();
}
diff --git a/kexi/plugins/forms/kexidataawarewidgetinfo.h b/kexi/plugins/forms/kexidataawarewidgetinfo.h
index 41e67d85..eddcf909 100644
--- a/kexi/plugins/forms/kexidataawarewidgetinfo.h
+++ b/kexi/plugins/forms/kexidataawarewidgetinfo.h
@@ -33,7 +33,7 @@ class KEXIFORMUTILS_EXPORT KexiDataAwareWidgetInfo : public KFormDesigner::Widge
KexiDataAwareWidgetInfo(KFormDesigner::WidgetFactory *f);
KexiDataAwareWidgetInfo(KFormDesigner::WidgetFactory *f,
- const char* parentFactoryName, const char* inheritedClassName = 0);
+ const char* tqparentFactoryName, const char* inheritedClassName = 0);
virtual ~KexiDataAwareWidgetInfo();
diff --git a/kexi/plugins/forms/kexidataprovider.cpp b/kexi/plugins/forms/kexidataprovider.cpp
index 6706f838..400e6d37 100644
--- a/kexi/plugins/forms/kexidataprovider.cpp
+++ b/kexi/plugins/forms/kexidataprovider.cpp
@@ -19,8 +19,8 @@
#include "kexidataprovider.h"
-#include <qwidget.h>
-#include <qobjectlist.h>
+#include <tqwidget.h>
+#include <tqobjectlist.h>
#include <kdebug.h>
#include <klocale.h>
@@ -46,7 +46,7 @@ KexiFormDataProvider::~KexiFormDataProvider()
delete m_duplicatedItems;
}
-void KexiFormDataProvider::setMainDataSourceWidget(QWidget* mainWidget)
+void KexiFormDataProvider::setMainDataSourceWidget(TQWidget* mainWidget)
{
m_mainWidget = mainWidget;
m_dataItems.clear();
@@ -56,15 +56,15 @@ void KexiFormDataProvider::setMainDataSourceWidget(QWidget* mainWidget)
return;
//find widgets whose will work as data items
- QObjectList *l = m_mainWidget->queryList( "QWidget" );
- QObjectListIt it( *l );
- QObject *obj;
- QDict<char> tmpSources;
+ TQObjectList *l = m_mainWidget->queryList( TQWIDGET_OBJECT_NAME_STRING );
+ TQObjectListIt it( *l );
+ TQObject *obj;
+ TQDict<char> tmpSources;
for ( ; (obj = it.current()) != 0; ++it ) {
KexiFormDataItemInterface* const formDataItem = dynamic_cast<KexiFormDataItemInterface*>(obj);
if (!formDataItem)
continue;
- if (formDataItem->parentInterface()) //item with parent interface: collect parent instead...
+ if (formDataItem->tqparentInterface()) //item with tqparent interface: collect tqparent instead...
continue;
#if 0 //! @todo reenable when subform is moved to KexiDBForm
KexiDBForm *dbForm = KexiUtils::findParent<KexiDBForm>(obj, "KexiDBForm"); //form's surface...
@@ -75,18 +75,18 @@ void KexiFormDataProvider::setMainDataSourceWidget(QWidget* mainWidget)
if (KexiUtils::findParent<KexiDBForm>(obj, "KexiDBSubForm"))
continue;
#endif
- QString dataSource( formDataItem->dataSource().lower() );
+ TQString dataSource( formDataItem->dataSource().lower() );
if (dataSource.isEmpty())
continue;
kexipluginsdbg << obj->name() << endl;
m_dataItems.append( formDataItem );
formDataItem->installListener( this );
- tmpSources.replace( dataSource, (char*)1 );
+ tmpSources.tqreplace( dataSource, (char*)1 );
}
delete l;
//now we've got a set (unique list) of field names in tmpSources
//remember it in m_usedDataSources
- for (QDictIterator<char> it(tmpSources); it.current(); ++it) {
+ for (TQDictIterator<char> it(tmpSources); it.current(); ++it) {
m_usedDataSources += it.currentKey();
}
}
@@ -106,46 +106,46 @@ void KexiFormDataProvider::fillDataItems(KexiTableItem& row, bool cursorAtNewRow
int indexForVisibleLookupValue = itemIface->columnInfo()->indexForVisibleLookupValue();
if (indexForVisibleLookupValue<0 && indexForVisibleLookupValue>=(int)row.count()) //sanity
indexForVisibleLookupValue = -1; //no
- const QVariant value(row.at(it.data()));
- QVariant visibleLookupValue;
+ const TQVariant value(row.at(it.data()));
+ TQVariant visibleLookupValue;
if (indexForVisibleLookupValue!=-1 && (int)row.size()>indexForVisibleLookupValue)
visibleLookupValue = row.at(indexForVisibleLookupValue);
kexipluginsdbg << "fill data of '" << itemIface->dataSource() << "' at idx=" << it.data()
<< " data=" << value << (indexForVisibleLookupValue!=-1
- ? QString(" SPECIAL: indexForVisibleLookupValue=%1 visibleValue=%2")
- .arg(indexForVisibleLookupValue).arg(visibleLookupValue.toString())
- : QString::null)
+ ? TQString(" SPECIAL: indexForVisibleLookupValue=%1 visibleValue=%2")
+ .tqarg(indexForVisibleLookupValue).tqarg(visibleLookupValue.toString())
+ : TQString())
<< endl;
const bool displayDefaultValue = cursorAtNewRow && (value.isNull() && visibleLookupValue.isNull())
&& !itemIface->columnInfo()->field->defaultValue().isNull()
&& !itemIface->columnInfo()->field->isAutoIncrement(); //no value to set but there is default value defined
itemIface->setValue(
displayDefaultValue ? itemIface->columnInfo()->field->defaultValue() : value,
- QVariant(), /*add*/
+ TQVariant(), /*add*/
/*!remove old*/false,
indexForVisibleLookupValue==-1 ? 0 : &visibleLookupValue //pass visible value if available
);
// now disable/enable "display default value" if needed (do it after setValue(), before setValue() turns it off)
if (itemIface->hasDisplayedDefaultValue() != displayDefaultValue)
- itemIface->setDisplayDefaultValue( dynamic_cast<QWidget*>(itemIface), displayDefaultValue );
+ itemIface->setDisplayDefaultValue( dynamic_cast<TQWidget*>(itemIface), displayDefaultValue );
}
}
void KexiFormDataProvider::fillDuplicatedDataItems(
- KexiFormDataItemInterface* item, const QVariant& value)
+ KexiFormDataItemInterface* item, const TQVariant& value)
{
if (m_disableFillDuplicatedDataItems)
return;
if (!m_duplicatedItems) {
//build (once) a set of duplicated data items (having the same fields assigned)
//so we can later check if an item is duplicated with a cost of o(1)
- QMap<KexiDB::Field*,int> tmpDuplicatedItems;
- QMapIterator<KexiDB::Field*,int> it_dup;
- for (QPtrListIterator<KexiFormDataItemInterface> it(m_dataItems); it.current(); ++it) {
+ TQMap<KexiDB::Field*,int> tmpDuplicatedItems;
+ TQMapIterator<KexiDB::Field*,int> it_dup;
+ for (TQPtrListIterator<KexiFormDataItemInterface> it(m_dataItems); it.current(); ++it) {
if (!it.current()->columnInfo() || !it.current()->columnInfo()->field)
continue;
kdDebug() << " ** " << it.current()->columnInfo()->field->name() << endl;
- it_dup = tmpDuplicatedItems.find( it.current()->columnInfo()->field );
+ it_dup = tmpDuplicatedItems.tqfind( it.current()->columnInfo()->field );
uint count;
if (it_dup==tmpDuplicatedItems.end())
count = 0;
@@ -153,7 +153,7 @@ void KexiFormDataProvider::fillDuplicatedDataItems(
count = it_dup.data();
tmpDuplicatedItems.insert( it.current()->columnInfo()->field, ++count );
}
- m_duplicatedItems = new QPtrDict<char>(101);
+ m_duplicatedItems = new TQPtrDict<char>(101);
for (it_dup = tmpDuplicatedItems.begin(); it_dup!=tmpDuplicatedItems.end(); ++it_dup) {
if (it_dup.data() > 1) {
m_duplicatedItems->insert( it_dup.key(), (char*)1 );
@@ -162,11 +162,11 @@ void KexiFormDataProvider::fillDuplicatedDataItems(
}
}
}
- if (item->columnInfo() && m_duplicatedItems->find( item->columnInfo()->field )) {
- for (QPtrListIterator<KexiFormDataItemInterface> it(m_dataItems); it.current(); ++it) {
+ if (item->columnInfo() && m_duplicatedItems->tqfind( item->columnInfo()->field )) {
+ for (TQPtrListIterator<KexiFormDataItemInterface> it(m_dataItems); it.current(); ++it) {
if (it.current()!=item && item->columnInfo()->field == it.current()->columnInfo()->field) {
kexipluginsdbg << "- setting a copy of value for item '"
- << dynamic_cast<QObject*>(it.current())->name() << "' == " << value << endl;
+ << dynamic_cast<TQObject*>(it.current())->name() << "' == " << value << endl;
it.current()->setValue( value );
}
}
@@ -183,7 +183,7 @@ bool KexiFormDataProvider::cursorAtNewRow() const
return false;
}
-void KexiFormDataProvider::invalidateDataSources( const QDict<char>& invalidSources,
+void KexiFormDataProvider::tqinvalidateDataSources( const TQDict<char>& invalidSources,
KexiDB::QuerySchema* query)
{
//fill m_fieldNumbersForDataItems mapping from data item to field number
@@ -194,16 +194,16 @@ void KexiFormDataProvider::invalidateDataSources( const QDict<char>& invalidSour
if (query) {
fieldsExpanded = query->fieldsExpanded( KexiDB::QuerySchema::WithInternalFields );
// dataFieldsCount = fieldsExpanded.count();
- QMap<KexiDB::QueryColumnInfo*,int> columnsOrder( query->columnsOrder() );
- for (QMapConstIterator<KexiDB::QueryColumnInfo*,int> it = columnsOrder.constBegin(); it!=columnsOrder.constEnd(); ++it) {
+ TQMap<KexiDB::QueryColumnInfo*,int> columnsOrder( query->columnsOrder() );
+ for (TQMapConstIterator<KexiDB::QueryColumnInfo*,int> it = columnsOrder.constBegin(); it!=columnsOrder.constEnd(); ++it) {
kexipluginsdbg << "query->columnsOrder()[ " << it.key()->field->name() << " ] = " << it.data() << endl;
}
- for (QPtrListIterator<KexiFormDataItemInterface> it(m_dataItems); it.current(); ++it) {
+ for (TQPtrListIterator<KexiFormDataItemInterface> it(m_dataItems); it.current(); ++it) {
KexiFormDataItemInterface *item = it.current();
KexiDB::QueryColumnInfo* ci = query->columnInfo( it.current()->dataSource() );
int index = ci ? columnsOrder[ ci ] : -1;
kexipluginsdbg << "query->columnsOrder()[ " << (ci ? ci->field->name() : "") << " ] = " << index
- << " (dataSource: " << item->dataSource() << ", name=" << dynamic_cast<QObject*>(item)->name() << ")" << endl;
+ << " (dataSource: " << item->dataSource() << ", name=" << dynamic_cast<TQObject*>(item)->name() << ")" << endl;
if (index!=-1 && !m_fieldNumbersForDataItems[ item ])
m_fieldNumbersForDataItems.insert( item, index );
//todo
@@ -218,26 +218,26 @@ void KexiFormDataProvider::invalidateDataSources( const QDict<char>& invalidSour
#if 0 //moved down
//in 'newIndices' let's collect new indices for every data source
- foreach(QValueList<uint>::ConstIterator, it, invalidSources) {
+ foreach(TQValueList<uint>::ConstIterator, it, invalidSources) {
//all previous indices have corresponding data source
// for (; i < (*it); i++) {
// newIndices[i] = number++;
- //kexipluginsdbg << "invalidateDataSources(): " << i << " -> " << number-1 << endl;
+ //kexipluginsdbg << "tqinvalidateDataSources(): " << i << " -> " << number-1 << endl;
// }
//this index have no corresponding data source
// newIndices[i]=-1;
KexiFormDataItemInterface *item = m_dataItems.at( *it );
if (item)
- item->setInvalidState( QString::fromLatin1("#") + i18n("NAME") + QString::fromLatin1("?") );
+ item->setInvalidState( TQString::tqfromLatin1("#") + i18n("NAME") + TQString::tqfromLatin1("?") );
m_dataItems.remove(*it);
- kexipluginsdbg << "invalidateDataSources(): " << (*it) << " -> " << -1 << endl;
+ kexipluginsdbg << "tqinvalidateDataSources(): " << (*it) << " -> " << -1 << endl;
// i++;
}
#endif
//fill remaining part of the vector
// for (; i < dataFieldsCount; i++) { //m_dataItems.count(); i++) {
//newIndices[i] = number++;
- //kexipluginsdbg << "invalidateDataSources(): " << i << " -> " << number-1 << endl;
+ //kexipluginsdbg << "tqinvalidateDataSources(): " << i << " -> " << number-1 << endl;
//}
#if 0
@@ -247,35 +247,35 @@ void KexiFormDataProvider::invalidateDataSources( const QDict<char>& invalidSour
bool ok;
const int newIndex = newIndices.at( it.data(), &ok );
if (ok && newIndex!=-1) {
- kexipluginsdbg << "invalidateDataSources(): " << it.key()->dataSource() << ": " << it.data() << " -> " << newIndex << endl;
- newFieldNumbersForDataItems.replace(it.key(), newIndex);
+ kexipluginsdbg << "tqinvalidateDataSources(): " << it.key()->dataSource() << ": " << it.data() << " -> " << newIndex << endl;
+ newFieldNumbersForDataItems.tqreplace(it.key(), newIndex);
}
else {
- kexipluginsdbg << "invalidateDataSources(): removing " << it.key()->dataSource() << endl;
+ kexipluginsdbg << "tqinvalidateDataSources(): removing " << it.key()->dataSource() << endl;
m_dataItems.remove(it.key());
- it.key()->setInvalidState( QString::fromLatin1("#") + i18n("NAME") + QString::fromLatin1("?") );
+ it.key()->setInvalidState( TQString::tqfromLatin1("#") + i18n("NAME") + TQString::tqfromLatin1("?") );
}
}
#endif
// m_fieldNumbersForDataItems = newFieldNumbersForDataItems;
//update data sources set (some of them may be removed)
- QDict<char> tmpUsedDataSources(1013);
+ TQDict<char> tmpUsedDataSources(1013);
if (query)
query->debug();
//if (query && m_dataItems.count()!=query->fieldCount()) {
- // kdWarning() << "KexiFormDataProvider::invalidateDataSources(): m_dataItems.count()!=query->fieldCount() ("
+ // kdWarning() << "KexiFormDataProvider::tqinvalidateDataSources(): m_dataItems.count()!=query->fieldCount() ("
// << m_dataItems.count() << "," << query->fieldCount() << ")" << endl;
//}
//i = 0;
m_disableFillDuplicatedDataItems = true; // temporary disable fillDuplicatedDataItems()
// because setColumnInfo() can activate it
- for (QPtrListIterator<KexiFormDataItemInterface> it(m_dataItems); it.current();) {
+ for (TQPtrListIterator<KexiFormDataItemInterface> it(m_dataItems); it.current();) {
KexiFormDataItemInterface * item = it.current();
if (invalidSources[ item->dataSource().lower() ]) {
- item->setInvalidState( QString::fromLatin1("#") + i18n("NAME") + QString::fromLatin1("?") );
+ item->setInvalidState( TQString::tqfromLatin1("#") + i18n("NAME") + TQString::tqfromLatin1("?") );
m_dataItems.remove(item);
continue;
}
@@ -283,7 +283,7 @@ void KexiFormDataProvider::invalidateDataSources( const QDict<char>& invalidSour
if (query) {
KexiDB::QueryColumnInfo *ci = fieldsExpanded[fieldNumber];
item->setColumnInfo(ci);
- kexipluginsdbg << "- item=" << dynamic_cast<QObject*>(item)->name()
+ kexipluginsdbg << "- item=" << dynamic_cast<TQObject*>(item)->name()
<< " dataSource=" << item->dataSource()
<< " field=" << ci->field->name() << endl;
const int indexForVisibleLookupValue = ci->indexForVisibleLookupValue();
@@ -304,12 +304,12 @@ void KexiFormDataProvider::invalidateDataSources( const QDict<char>& invalidSour
}
}
}
- tmpUsedDataSources.replace( item->dataSource().lower(), (char*)1 );
+ tmpUsedDataSources.tqreplace( item->dataSource().lower(), (char*)1 );
++it;
}
m_disableFillDuplicatedDataItems = false;
m_usedDataSources.clear();
- foreach_list(QDictIterator<char>, it, tmpUsedDataSources) {
+ foreach_list(TQDictIterator<char>, it, tmpUsedDataSources) {
m_usedDataSources += it.currentKey();
}
}
diff --git a/kexi/plugins/forms/kexidataprovider.h b/kexi/plugins/forms/kexidataprovider.h
index 64019842..f1e9d755 100644
--- a/kexi/plugins/forms/kexidataprovider.h
+++ b/kexi/plugins/forms/kexidataprovider.h
@@ -21,8 +21,8 @@
#define KEXIFORMDATAPROVIDER_H
#include "kexiformdataiteminterface.h"
-#include <qptrdict.h>
-#include <qdict.h>
+#include <tqptrdict.h>
+#include <tqdict.h>
class KexiTableItem;
namespace KexiDB {
@@ -50,11 +50,11 @@ class KEXIFORMUTILS_EXPORT KexiFormDataProvider : public KexiDataItemChangesList
Also find widgets whose will work as data items
(all of them must implement KexiFormDataItemInterface), so these could be
filled with data on demand. */
- void setMainDataSourceWidget(QWidget* mainWidget);
+ void setMainDataSourceWidget(TQWidget* mainWidget);
- QStringList usedDataSources() const { return m_usedDataSources; }
+ TQStringList usedDataSources() const { return m_usedDataSources; }
- //unused QPtrList<KexiFormDataItemInterface>& dataItems() { return m_dataItems; }
+ //unused TQPtrList<KexiFormDataItemInterface>& dataItems() { return m_dataItems; }
/*! Fills data items with appropriate data fetched from \a cursor.
\a newRowEditing == true means that we are at new (not yet inserted) database row. */
@@ -74,20 +74,20 @@ class KEXIFORMUTILS_EXPORT KexiFormDataProvider : public KexiDataItemChangesList
\a invalidSources is the set of data sources that should
be omitted for fillDataItems().
Used by KexiFormView::initDataSource(). */
- void invalidateDataSources( const QDict<char>& invalidSources,
+ void tqinvalidateDataSources( const TQDict<char>& invalidSources,
KexiDB::QuerySchema* query = 0 );
/*! Fills the same data provided by \a value to every data item (other than \a item)
having the same data source as \a item. This method is called immediately when
\a value is changed, so duplicated data items are quickly updated. */
- void fillDuplicatedDataItems(KexiFormDataItemInterface* item, const QVariant& value);
+ void fillDuplicatedDataItems(KexiFormDataItemInterface* item, const TQVariant& value);
protected:
- QWidget *m_mainWidget;
- QPtrDict<char> *m_duplicatedItems;
- typedef QMap<KexiFormDataItemInterface*,uint> KexiFormDataItemInterfaceToIntMap;
- QPtrList<KexiFormDataItemInterface> m_dataItems;
- QStringList m_usedDataSources;
+ TQWidget *m_mainWidget;
+ TQPtrDict<char> *m_duplicatedItems;
+ typedef TQMap<KexiFormDataItemInterface*,uint> KexiFormDataItemInterfaceToIntMap;
+ TQPtrList<KexiFormDataItemInterface> m_dataItems;
+ TQStringList m_usedDataSources;
KexiFormDataItemInterfaceToIntMap m_fieldNumbersForDataItems;
bool m_disableFillDuplicatedDataItems : 1;
};
diff --git a/kexi/plugins/forms/kexidatasourcepage.cpp b/kexi/plugins/forms/kexidatasourcepage.cpp
index 6c0de830..ce11e7d9 100644
--- a/kexi/plugins/forms/kexidatasourcepage.cpp
+++ b/kexi/plugins/forms/kexidatasourcepage.cpp
@@ -19,10 +19,10 @@
#include "kexidatasourcepage.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qheader.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqheader.h>
#include <kiconloader.h>
#include <klocale.h>
@@ -43,11 +43,11 @@
#include <koproperty/property.h>
#include <koproperty/utils.h>
-KexiDataSourcePage::KexiDataSourcePage(QWidget *parent, const char *name)
- : QWidget(parent, name)
+KexiDataSourcePage::KexiDataSourcePage(TQWidget *tqparent, const char *name)
+ : TQWidget(tqparent, name)
, m_insideClearDataSourceSelection(false)
{
- QVBoxLayout *vlyr = new QVBoxLayout(this);
+ TQVBoxLayout *vlyr = new TQVBoxLayout(this);
m_objectInfoLabel = new KexiObjectInfoLabel(this, "KexiObjectInfoLabel");
vlyr->addWidget(m_objectInfoLabel);
@@ -60,67 +60,67 @@ KexiDataSourcePage::KexiDataSourcePage(QWidget *parent, const char *name)
KoProperty::GroupContainer *container = new KoProperty::GroupContainer(i18n("Data Source"), this);
vlyr->addWidget(container);
- QWidget *contents = new QWidget(container);
+ TQWidget *contents = new TQWidget(container);
container->setContents(contents);
- QVBoxLayout *contentsVlyr = new QVBoxLayout(contents);
+ TQVBoxLayout *contentsVlyr = new TQVBoxLayout(contents);
- m_noDataSourceAvailableLabel = new QLabel(m_noDataSourceAvailableSingleText, contents);
- m_noDataSourceAvailableLabel->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+ m_noDataSourceAvailableLabel = new TQLabel(m_noDataSourceAvailableSingleText, contents);
+ m_noDataSourceAvailableLabel->tqsetSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed);
m_noDataSourceAvailableLabel->setMargin(2);
- m_noDataSourceAvailableLabel->setAlignment(Qt::WordBreak | Qt::AlignBottom | Qt::AlignLeft);
+ m_noDataSourceAvailableLabel->tqsetAlignment(TQt::WordBreak | TQt::AlignBottom | TQt::AlignLeft);
contentsVlyr->addWidget(m_noDataSourceAvailableLabel);
//-Widget's Data Source
- QHBoxLayout *hlyr = new QHBoxLayout(contentsVlyr);
+ TQHBoxLayout *hlyr = new TQHBoxLayout(contentsVlyr);
#if 0
//! @todo unhide this when expression work
-// m_widgetDSLabel = new QLabel(i18n("Table Field, Query Field or Expression", "Source field or expression:"), this);
+// m_widgetDSLabel = new TQLabel(i18n("Table Field, Query Field or Expression", "Source field or expression:"), this);
#else
- m_widgetDSLabel = new QLabel(i18n("Table Field or Query Field", "Widget's data source:"), contents);
+ m_widgetDSLabel = new TQLabel(i18n("Table Field or Query Field", "Widget's data source:"), contents);
#endif
- m_widgetDSLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
+ m_widgetDSLabel->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed);
m_widgetDSLabel->setMargin(2);
m_widgetDSLabel->setMinimumHeight(IconSize(KIcon::Small)+4);
- m_widgetDSLabel->setAlignment(AlignLeft|AlignBottom);
+ m_widgetDSLabel->tqsetAlignment(AlignLeft|AlignBottom);
hlyr->addWidget(m_widgetDSLabel);
- m_clearWidgetDSButton = new KexiSmallToolButton(contents, QString::null, "clear_left", "clearWidgetDSButton");
+ m_clearWidgetDSButton = new KexiSmallToolButton(contents, TQString(), "clear_left", "clearWidgetDSButton");
m_clearWidgetDSButton->setMinimumHeight(m_widgetDSLabel->minimumHeight());
- QToolTip::add(m_clearWidgetDSButton, i18n("Clear widget's data source"));
+ TQToolTip::add(m_clearWidgetDSButton, i18n("Clear widget's data source"));
hlyr->addWidget(m_clearWidgetDSButton);
- connect(m_clearWidgetDSButton, SIGNAL(clicked()), this, SLOT(clearWidgetDataSourceSelection()));
+ connect(m_clearWidgetDSButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(clearWidgetDataSourceSelection()));
m_sourceFieldCombo = new KexiFieldComboBox(contents, "sourceFieldCombo");
m_widgetDSLabel->setBuddy(m_sourceFieldCombo);
contentsVlyr->addWidget(m_sourceFieldCombo);
-/* m_dataSourceSeparator = new QFrame(contents);
- m_dataSourceSeparator->setFrameShape(QFrame::HLine);
- m_dataSourceSeparator->setFrameShadow(QFrame::Sunken);
+/* m_dataSourceSeparator = new TQFrame(contents);
+ m_dataSourceSeparator->setFrameShape(TQFrame::HLine);
+ m_dataSourceSeparator->setFrameShadow(TQFrame::Sunken);
contentsVlyr->addWidget(m_dataSourceSeparator);*/
contentsVlyr->addSpacing(8);
//- Form's Data Source
- hlyr = new QHBoxLayout(contentsVlyr);
- m_dataSourceLabel = new QLabel(i18n("Form's data source:"), contents);
- m_dataSourceLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
+ hlyr = new TQHBoxLayout(contentsVlyr);
+ m_dataSourceLabel = new TQLabel(i18n("Form's data source:"), contents);
+ m_dataSourceLabel->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed);
m_dataSourceLabel->setMargin(2);
m_dataSourceLabel->setMinimumHeight(IconSize(KIcon::Small)+4);
- m_dataSourceLabel->setAlignment(AlignLeft|AlignBottom);
+ m_dataSourceLabel->tqsetAlignment(AlignLeft|AlignBottom);
hlyr->addWidget(m_dataSourceLabel);
- m_gotoButton = new KexiSmallToolButton(contents, QString::null, "goto", "gotoButton");
+ m_gotoButton = new KexiSmallToolButton(contents, TQString(), "goto", "gotoButton");
m_gotoButton->setMinimumHeight(m_dataSourceLabel->minimumHeight());
- QToolTip::add(m_gotoButton, i18n("Go to selected form's data source"));
+ TQToolTip::add(m_gotoButton, i18n("Go to selected form's data source"));
hlyr->addWidget(m_gotoButton);
- connect(m_gotoButton, SIGNAL(clicked()), this, SLOT(slotGotoSelected()));
+ connect(m_gotoButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotGotoSelected()));
- m_clearDSButton = new KexiSmallToolButton(contents, QString::null, "clear_left", "clearDSButton");
+ m_clearDSButton = new KexiSmallToolButton(contents, TQString(), "clear_left", "clearDSButton");
m_clearDSButton->setMinimumHeight(m_dataSourceLabel->minimumHeight());
- QToolTip::add(m_clearDSButton, i18n("Clear form's data source"));
+ TQToolTip::add(m_clearDSButton, i18n("Clear form's data source"));
hlyr->addWidget(m_clearDSButton);
- connect(m_clearDSButton, SIGNAL(clicked()), this, SLOT(clearDataSourceSelection()));
+ connect(m_clearDSButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(clearDataSourceSelection()));
m_dataSourceCombo = new KexiDataSourceComboBox(contents, "dataSourceCombo");
m_dataSourceLabel->setBuddy(m_dataSourceCombo);
@@ -133,9 +133,9 @@ KexiDataSourcePage::KexiDataSourcePage(QWidget *parent, const char *name)
vlyr->addStretch();
#else
vlyr->addSpacing(fontMetrics().height());
-/* QFrame *separator = new QFrame(this);
- separator->setFrameShape(QFrame::HLine);
- separator->setFrameShadow(QFrame::Sunken);
+/* TQFrame *separator = new TQFrame(this);
+ separator->setFrameShape(TQFrame::HLine);
+ separator->setFrameShadow(TQFrame::Sunken);
vlyr->addWidget(separator);*/
/*
KPopupTitle *title = new KPopupTitle(this);
@@ -150,24 +150,24 @@ KexiDataSourcePage::KexiDataSourcePage(QWidget *parent, const char *name)
//helper info
//! @todo allow to hide such helpers by adding global option
- contents = new QWidget(container);
+ contents = new TQWidget(container);
container->setContents(contents);
- contentsVlyr = new QVBoxLayout(contents);
- hlyr = new QHBoxLayout(contentsVlyr);
- m_mousePointerLabel = new QLabel(contents);
+ contentsVlyr = new TQVBoxLayout(contents);
+ hlyr = new TQHBoxLayout(contentsVlyr);
+ m_mousePointerLabel = new TQLabel(contents);
hlyr->addWidget(m_mousePointerLabel);
m_mousePointerLabel->setPixmap( SmallIcon("mouse_pointer") );
m_mousePointerLabel->setFixedWidth( m_mousePointerLabel->pixmap() ? m_mousePointerLabel->pixmap()->width() : 0);
- m_availableFieldsDescriptionLabel = new QLabel(
+ m_availableFieldsDescriptionLabel = new TQLabel(
i18n("Select fields from the list below and drag them onto a form or click the \"Insert\" button"), contents);
- m_availableFieldsDescriptionLabel->setAlignment( Qt::AlignAuto | Qt::WordBreak );
+ m_availableFieldsDescriptionLabel->tqsetAlignment( TQt::AlignAuto | TQt::WordBreak );
hlyr->addWidget(m_availableFieldsDescriptionLabel);
//Available Fields
contentsVlyr->addSpacing(4);
- hlyr = new QHBoxLayout(contentsVlyr);
- m_availableFieldsLabel = new QLabel(i18n("Available fields:"), contents);
- m_availableFieldsLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
+ hlyr = new TQHBoxLayout(contentsVlyr);
+ m_availableFieldsLabel = new TQLabel(i18n("Available fields:"), contents);
+ m_availableFieldsLabel->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed);
m_availableFieldsLabel->setMargin(2);
m_availableFieldsLabel->setMinimumHeight(IconSize(KIcon::Small));
hlyr->addWidget(m_availableFieldsLabel);
@@ -175,27 +175,27 @@ KexiDataSourcePage::KexiDataSourcePage(QWidget *parent, const char *name)
m_addField = new KexiSmallToolButton(contents, i18n("Insert selected field into form", "Insert"),
"add_field", "addFieldButton");
m_addField->setMinimumHeight(m_availableFieldsLabel->minimumHeight());
-// m_addField->setTextPosition(QToolButton::Right);
- m_addField->setFocusPolicy(StrongFocus);
- QToolTip::add(m_addField, i18n("Insert selected fields into form"));
+// m_addField->setTextPosition(TQToolButton::Right);
+ m_addField->setFocusPolicy(TQ_StrongFocus);
+ TQToolTip::add(m_addField, i18n("Insert selected fields into form"));
hlyr->addWidget(m_addField);
- connect(m_addField, SIGNAL(clicked()), this, SLOT(slotInsertSelectedFields()));
+ connect(m_addField, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotInsertSelectedFields()));
m_fieldListView = new KexiFieldListView(contents, "fieldListView",
KexiFieldListView::ShowDataTypes | KexiFieldListView::AllowMultiSelection );
- m_fieldListView->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding));
+ m_fieldListView->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding));
m_availableFieldsLabel->setBuddy(m_fieldListView);
contentsVlyr->addWidget(m_fieldListView, 1);
- connect(m_fieldListView, SIGNAL(selectionChanged()), this, SLOT(slotFieldListViewSelectionChanged()));
- connect(m_fieldListView, SIGNAL(fieldDoubleClicked(const QString&, const QString&, const QString&)),
- this, SLOT(slotFieldDoubleClicked(const QString&, const QString&, const QString&)));
+ connect(m_fieldListView, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotFieldListViewSelectionChanged()));
+ connect(m_fieldListView, TQT_SIGNAL(fieldDoubleClicked(const TQString&, const TQString&, const TQString&)),
+ this, TQT_SLOT(slotFieldDoubleClicked(const TQString&, const TQString&, const TQString&)));
#endif
vlyr->addStretch(1);
- connect(m_dataSourceCombo, SIGNAL(textChanged(const QString &)), this, SLOT(slotDataSourceTextChanged(const QString &)));
- connect(m_dataSourceCombo, SIGNAL(dataSourceChanged()), this, SLOT(slotDataSourceChanged()));
- connect(m_sourceFieldCombo, SIGNAL(selected()), this, SLOT(slotFieldSelected()));
+ connect(m_dataSourceCombo, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotDataSourceTextChanged(const TQString &)));
+ connect(m_dataSourceCombo, TQT_SIGNAL(dataSourceChanged()), this, TQT_SLOT(slotDataSourceChanged()));
+ connect(m_sourceFieldCombo, TQT_SIGNAL(selected()), this, TQT_SLOT(slotFieldSelected()));
clearDataSourceSelection();
slotFieldListViewSelectionChanged();
@@ -235,7 +235,7 @@ void KexiDataSourcePage::clearWidgetDataSourceSelection()
{
if (!m_sourceFieldCombo->currentText().isEmpty()) {
m_sourceFieldCombo->setCurrentText("");
- m_sourceFieldCombo->setFieldOrExpression(QString::null);
+ m_sourceFieldCombo->setFieldOrExpression(TQString());
slotFieldSelected();
}
m_clearWidgetDSButton->setEnabled(false);
@@ -243,7 +243,7 @@ void KexiDataSourcePage::clearWidgetDataSourceSelection()
void KexiDataSourcePage::slotGotoSelected()
{
- QCString mime = m_dataSourceCombo->selectedMimeType().latin1();
+ TQCString mime = m_dataSourceCombo->selectedMimeType().latin1();
if (mime=="kexi/table" || mime=="kexi/query") {
if (m_dataSourceCombo->isSelectionValid())
emit jumpToObjectRequested(mime, m_dataSourceCombo->selectedName().latin1());
@@ -253,7 +253,7 @@ void KexiDataSourcePage::slotGotoSelected()
void KexiDataSourcePage::slotInsertSelectedFields()
{
#ifndef KEXI_NO_AUTOFIELD_WIDGET
- QStringList selectedFieldNames(m_fieldListView->selectedFieldNames());
+ TQStringList selectedFieldNames(m_fieldListView->selectedFieldNames());
if (selectedFieldNames.isEmpty())
return;
@@ -262,17 +262,17 @@ void KexiDataSourcePage::slotInsertSelectedFields()
#endif
}
-void KexiDataSourcePage::slotFieldDoubleClicked(const QString& sourceMimeType, const QString& sourceName,
- const QString& fieldName)
+void KexiDataSourcePage::slotFieldDoubleClicked(const TQString& sourceMimeType, const TQString& sourceName,
+ const TQString& fieldName)
{
#ifndef KEXI_NO_AUTOFIELD_WIDGET
- QStringList selectedFields;
+ TQStringList selectedFields;
selectedFields.append(fieldName);
emit insertAutoFields(sourceMimeType, sourceName, selectedFields);
#endif
}
-void KexiDataSourcePage::slotDataSourceTextChanged(const QString & string)
+void KexiDataSourcePage::slotDataSourceTextChanged(const TQString & string)
{
Q_UNUSED(string);
const bool enable = m_dataSourceCombo->isSelectionValid(); //!string.isEmpty() && m_dataSourceCombo->selectedName() == string.latin1();
@@ -291,9 +291,9 @@ void KexiDataSourcePage::slotDataSourceChanged()
{
if (!m_dataSourceCombo->project())
return;
- QCString mime = m_dataSourceCombo->selectedMimeType().latin1();
+ TQCString mime = m_dataSourceCombo->selectedMimeType().latin1();
bool dataSourceFound = false;
- QCString name = m_dataSourceCombo->selectedName().latin1();
+ TQCString name = m_dataSourceCombo->selectedName().latin1();
if ((mime=="kexi/table" || mime=="kexi/query") && m_dataSourceCombo->isSelectionValid()) {
KexiDB::TableOrQuerySchema *tableOrQuery = new KexiDB::TableOrQuerySchema(
m_dataSourceCombo->project()->dbConnection(), name, mime=="kexi/table");
@@ -349,34 +349,34 @@ void KexiDataSourcePage::slotFieldSelected()
);
}
-void KexiDataSourcePage::setDataSource(const QCString& mimeType, const QCString& name)
+void KexiDataSourcePage::setDataSource(const TQCString& mimeType, const TQCString& name)
{
m_dataSourceCombo->setDataSource(mimeType, name);
}
void KexiDataSourcePage::assignPropertySet(KoProperty::Set* propertySet)
{
- QCString objectName;
- if (propertySet && propertySet->contains("name"))
+ TQCString objectName;
+ if (propertySet && propertySet->tqcontains("name"))
objectName = (*propertySet)["name"].value().toCString();
if (!objectName.isEmpty() && objectName == m_currentObjectName)
return; //the same object
m_currentObjectName = objectName;
- QCString objectClassName;
- if (propertySet && propertySet->contains("this:className"))
+ TQCString objectClassName;
+ if (propertySet && propertySet->tqcontains("this:className"))
objectClassName = (*propertySet)["this:className"].value().toCString();
/*moved if (propertySet) {
- QCString iconName;
- QString objectClassString;
- if (propertySet->contains("this:iconName"))
+ TQCString iconName;
+ TQString objectClassString;
+ if (propertySet->tqcontains("this:iconName"))
iconName = (*propertySet)["this:iconName"].value().toCString();
- if (propertySet->contains("this:classString"))
+ if (propertySet->tqcontains("this:classString"))
objectClassString = (*propertySet)["this:classString"].value().toString();
m_objectInfoLabel->setObjectName(objectName);
m_objectInfoLabel->setObjectClassIcon(iconName);
m_objectInfoLabel->setObjectClassName(objectClassString);
- if (propertySet->contains("this:className"))
+ if (propertySet->tqcontains("this:className"))
objectClassName = (*propertySet)["this:className"].value().toCString();
}*/
KexiPropertyEditorView::updateInfoLabelForPropertySet(
@@ -386,7 +386,7 @@ void KexiDataSourcePage::assignPropertySet(KoProperty::Set* propertySet)
// kdDebug() << "objectClassName=" << objectClassName << endl;
// {
/* //this is top level form's surface: data source means table or query
- QCString dataSourceMimeType, dataSource;
+ TQCString dataSourceMimeType, dataSource;
if (buffer->hasProperty("dataSourceMimeType"))
dataSourceMimeType = (*buffer)["dataSourceMimeType"].value().toCString();
if (buffer->hasProperty("dataSource"))
@@ -396,16 +396,16 @@ void KexiDataSourcePage::assignPropertySet(KoProperty::Set* propertySet)
// else {
const bool multipleSelection = objectClassName=="special:multiple";
- const bool hasDataSourceProperty = propertySet && propertySet->contains("dataSource") && !multipleSelection;
+ const bool hasDataSourceProperty = propertySet && propertySet->tqcontains("dataSource") && !multipleSelection;
if (!isForm) {
//this is a widget
- QCString dataSource;
+ TQCString dataSource;
if (hasDataSourceProperty) {
if (propertySet)
dataSource = (*propertySet)["dataSource"].value().toCString();
m_noDataSourceAvailableLabel->hide();
- m_sourceFieldCombo->setFieldOrExpression(dataSource);
+ m_sourceFieldCombo->setFieldOrExpression(dataSource.data());
m_sourceFieldCombo->setEnabled(true);
m_clearWidgetDSButton->setEnabled(!m_sourceFieldCombo->currentText().isEmpty());
m_widgetDSLabel->show();
@@ -445,7 +445,7 @@ void KexiDataSourcePage::slotFieldListViewSelectionChanged()
{
#ifndef KEXI_NO_AUTOFIELD_WIDGET
//update "add field" button's state
- for (QListViewItemIterator it(m_fieldListView); it.current(); ++it) {
+ for (TQListViewItemIterator it(m_fieldListView); it.current(); ++it) {
if (it.current()->isSelected()) {
m_addField->setEnabled(true);
return;
diff --git a/kexi/plugins/forms/kexidatasourcepage.h b/kexi/plugins/forms/kexidatasourcepage.h
index 0f113aa7..914a869b 100644
--- a/kexi/plugins/forms/kexidatasourcepage.h
+++ b/kexi/plugins/forms/kexidatasourcepage.h
@@ -19,7 +19,7 @@
#ifndef KEXIDATASOURCEPAGE_H
#define KEXIDATASOURCEPAGE_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kexidb/field.h>
#include <kexidb/utils.h>
#include <koproperty/set.h>
@@ -30,17 +30,18 @@ class KexiDataSourceComboBox;
class KexiFieldComboBox;
class KexiFieldListView;
class KexiProject;
-class QToolButton;
-class QLabel;
-class QFrame;
+class TQToolButton;
+class TQLabel;
+class TQFrame;
//! A page within form designer's property tabbed pane, providing data source editor
-class KEXIFORMUTILS_EXPORT KexiDataSourcePage : public QWidget
+class KEXIFORMUTILS_EXPORT KexiDataSourcePage : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiDataSourcePage(QWidget *parent, const char *name = 0);
+ KexiDataSourcePage(TQWidget *tqparent, const char *name = 0);
virtual ~KexiDataSourcePage();
KexiDataSourceComboBox* dataSourceCombo() const { return m_dataSourceCombo; }
@@ -53,37 +54,37 @@ class KEXIFORMUTILS_EXPORT KexiDataSourcePage : public QWidget
//! Sets data source of a currently selected form.
//! This is performed on form initialization and on activating.
- void setDataSource(const QCString& mimeType, const QCString& name);
+ void setDataSource(const TQCString& mimeType, const TQCString& name);
//! Receives a pointer to a new property \a set (from KexiFormView::managerPropertyChanged())
void assignPropertySet(KoProperty::Set* propertySet);
signals:
//! Signal emitted when helper button 'go to selected data source' is clicked.
- void jumpToObjectRequested(const QCString& mime, const QCString& name);
+ void jumpToObjectRequested(const TQCString& mime, const TQCString& name);
//! Signal emitted when form's data source has been changed. It's connected to the Form Manager.
- void formDataSourceChanged(const QCString& mime, const QCString& name);
+ void formDataSourceChanged(const TQCString& mime, const TQCString& name);
/*! Signal emitted when current widget's data source (field/expression)
has been changed. It's connected to the Form Manager.
\a caption for this field is also provided (e.g. AutoField form widget use it) */
- void dataSourceFieldOrExpressionChanged(const QString& string, const QString& caption,
+ void dataSourceFieldOrExpressionChanged(const TQString& string, const TQString& caption,
KexiDB::Field::Type type);
/*! Signal emitted when 'insert fields' button has been clicked */
- void insertAutoFields(const QString& sourceMimeType, const QString& sourceName,
- const QStringList& fields);
+ void insertAutoFields(const TQString& sourceMimeType, const TQString& sourceName,
+ const TQStringList& fields);
protected slots:
- void slotDataSourceTextChanged(const QString & string);
+ void slotDataSourceTextChanged(const TQString & string);
void slotDataSourceChanged();
void slotFieldSelected();
void slotGotoSelected();
void slotInsertSelectedFields();
void slotFieldListViewSelectionChanged();
- void slotFieldDoubleClicked(const QString& sourceMimeType, const QString& sourceName,
- const QString& fieldName);
+ void slotFieldDoubleClicked(const TQString& sourceMimeType, const TQString& sourceName,
+ const TQString& fieldName);
protected:
void updateSourceFieldWidgetsAvailability();
@@ -91,12 +92,12 @@ class KEXIFORMUTILS_EXPORT KexiDataSourcePage : public QWidget
KexiFieldComboBox *m_sourceFieldCombo;
KexiObjectInfoLabel *m_objectInfoLabel;
KexiDataSourceComboBox* m_dataSourceCombo;
- QLabel *m_dataSourceLabel, *m_noDataSourceAvailableLabel,
+ TQLabel *m_dataSourceLabel, *m_noDataSourceAvailableLabel,
*m_widgetDSLabel, *m_availableFieldsLabel,
*m_mousePointerLabel, *m_availableFieldsDescriptionLabel;
- QToolButton *m_clearWidgetDSButton, *m_clearDSButton, *m_gotoButton, *m_addField;
- QFrame *m_dataSourceSeparator;
- QString m_noDataSourceAvailableSingleText, m_noDataSourceAvailableMultiText;
+ TQToolButton *m_clearWidgetDSButton, *m_clearDSButton, *m_gotoButton, *m_addField;
+ TQFrame *m_dataSourceSeparator;
+ TQString m_noDataSourceAvailableSingleText, m_noDataSourceAvailableMultiText;
bool m_insideClearDataSourceSelection : 1;
#ifdef KEXI_NO_AUTOFIELD_WIDGET
KexiDB::TableOrQuerySchema *m_tableOrQuerySchema; //!< temp.
@@ -105,8 +106,8 @@ class KEXIFORMUTILS_EXPORT KexiDataSourcePage : public QWidget
#endif
//! Used only in assignPropertySet() to check whether we already have the set assigned
- QCString m_currentObjectName;
- //QGuardedPtr<KoProperty::Set> m_propertySet;
+ TQCString m_currentObjectName;
+ //TQGuardedPtr<KoProperty::Set> m_propertySet;
};
#endif
diff --git a/kexi/plugins/forms/kexidbfactory.cpp b/kexi/plugins/forms/kexidbfactory.cpp
index 4ab05d76..5f379e6e 100644
--- a/kexi/plugins/forms/kexidbfactory.cpp
+++ b/kexi/plugins/forms/kexidbfactory.cpp
@@ -18,11 +18,11 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qpopupmenu.h>
-#include <qscrollview.h>
-#include <qcursor.h>
-#include <qpainter.h>
-#include <qstyle.h>
+#include <tqpopupmenu.h>
+#include <tqscrollview.h>
+#include <tqcursor.h>
+#include <tqpainter.h>
+#include <tqstyle.h>
#include <kgenericfactory.h>
#include <klocale.h>
@@ -69,8 +69,8 @@
//////////////////////////////////////////
-KexiDBFactory::KexiDBFactory(QObject *parent, const char *name, const QStringList &)
- : KFormDesigner::WidgetFactory(parent, name)
+KexiDBFactory::KexiDBFactory(TQObject *tqparent, const char *name, const TQStringList &)
+ : KFormDesigner::WidgetFactory(tqparent, name)
{
KFormDesigner::WidgetInfo *wi;
wi = new KexiDataAwareWidgetInfo(this);
@@ -101,7 +101,7 @@ KexiDBFactory::KexiDBFactory(QObject *parent, const char *name, const QStringLis
wi = new KexiDataAwareWidgetInfo(this, "stdwidgets", "KLineEdit");
wi->setPixmap("lineedit");
wi->setClassName("KexiDBLineEdit");
- wi->addAlternateClassName("QLineEdit", true/*override*/);
+ wi->addAlternateClassName(TQLINEEDIT_OBJECT_NAME_STRING, true/*override*/);
wi->addAlternateClassName("KLineEdit", true/*override*/);
wi->setIncludeFileName("klineedit.h");
wi->setName(i18n("Text Box"));
@@ -115,7 +115,7 @@ KexiDBFactory::KexiDBFactory(QObject *parent, const char *name, const QStringLis
wi = new KexiDataAwareWidgetInfo(this, "stdwidgets", "KTextEdit");
wi->setPixmap("textedit");
wi->setClassName("KexiDBTextEdit");
- wi->addAlternateClassName("QTextEdit", true/*override*/);
+ wi->addAlternateClassName(TQTEXTEDIT_OBJECT_NAME_STRING, true/*override*/);
wi->addAlternateClassName("KTextEdit", true/*override*/);
wi->setIncludeFileName("ktextedit.h");
wi->setName(i18n("Text Editor"));
@@ -126,10 +126,10 @@ KexiDBFactory::KexiDBFactory(QObject *parent, const char *name, const QStringLis
addClass(wi);
wi = new KFormDesigner::WidgetInfo(
- this, "containers", "QFrame" /*we're inheriting to get i18n'd strings already translated there*/);
+ this, "containers", TQFRAME_OBJECT_NAME_STRING /*we're inheriting to get i18n'd strings already translated there*/);
wi->setPixmap("frame");
wi->setClassName("KexiFrame");
- wi->addAlternateClassName("QFrame", true/*override*/);
+ wi->addAlternateClassName(TQFRAME_OBJECT_NAME_STRING, true/*override*/);
wi->setName(i18n("Frame"));
wi->setNamePrefix(
i18n("Widget name. This string will be used to name widgets of this class. "
@@ -138,10 +138,10 @@ KexiDBFactory::KexiDBFactory(QObject *parent, const char *name, const QStringLis
addClass(wi);
wi = new KexiDataAwareWidgetInfo(
- this, "stdwidgets", "QLabel" /*we're inheriting to get i18n'd strings already translated there*/);
+ this, "stdwidgets", TQLABEL_OBJECT_NAME_STRING /*we're inheriting to get i18n'd strings already translated there*/);
wi->setPixmap("label");
wi->setClassName("KexiDBLabel");
- wi->addAlternateClassName("QLabel", true/*override*/);
+ wi->addAlternateClassName(TQLABEL_OBJECT_NAME_STRING, true/*override*/);
wi->addAlternateClassName("KexiLabel", true/*override*/); //older
wi->setName(i18n("Text Label", "Label"));
wi->setNamePrefix(
@@ -184,10 +184,10 @@ KexiDBFactory::KexiDBFactory(QObject *parent, const char *name, const QStringLis
addClass(wi);
#endif
- wi = new KexiDataAwareWidgetInfo(this, "stdwidgets", "QCheckBox");
+ wi = new KexiDataAwareWidgetInfo(this, "stdwidgets", TQCHECKBOX_OBJECT_NAME_STRING);
wi->setPixmap("check");
wi->setClassName("KexiDBCheckBox");
- wi->addAlternateClassName("QCheckBox", true/*override*/);
+ wi->addAlternateClassName(TQCHECKBOX_OBJECT_NAME_STRING, true/*override*/);
wi->setName(i18n("Check Box"));
wi->setNamePrefix(
i18n("Widget name. This string will be used to name widgets of this class. "
@@ -213,11 +213,11 @@ KexiDBFactory::KexiDBFactory(QObject *parent, const char *name, const QStringLis
#if KDE_VERSION >= KDE_MAKE_VERSION(3,1,9)
KexiDataAwareWidgetInfo *wDate = new KexiDataAwareWidgetInfo(this, "stdwidgets", "KDateWidget");
#else
- KexiDataAwareWidgetInfo *wDate = new KexiDataAwareWidgetInfo(this, "stdwidgets", "QDateEdit");
+ KexiDataAwareWidgetInfo *wDate = new KexiDataAwareWidgetInfo(this, "stdwidgets", TQDATEEDIT_OBJECT_NAME_STRING);
#endif
wDate->setPixmap("dateedit");
wDate->setClassName("KexiDBDateEdit");
- wDate->addAlternateClassName("QDateEdit", true);//override
+ wDate->addAlternateClassName(TQDATEEDIT_OBJECT_NAME_STRING, true);//override
wDate->addAlternateClassName("KDateWidget", true);//override
wDate->setName(i18n("Date Widget"));
wDate->setNamePrefix(
@@ -228,11 +228,11 @@ KexiDBFactory::KexiDBFactory(QObject *parent, const char *name, const QStringLis
#if KDE_VERSION >= KDE_MAKE_VERSION(3,1,9)
KexiDataAwareWidgetInfo *wTime = new KexiDataAwareWidgetInfo(this, "stdwidgets", "KTimeWidget");
#else
- KexiDataAwareWidgetInfo *wTime = new KexiDataAwareWidgetInfo(this, "stdwidgets", "QTimeEdit");
+ KexiDataAwareWidgetInfo *wTime = new KexiDataAwareWidgetInfo(this, "stdwidgets", TQTIMEEDIT_OBJECT_NAME_STRING);
#endif
wTime->setPixmap("timeedit");
wTime->setClassName("KexiDBTimeEdit");
- wTime->addAlternateClassName("QTimeEdit", true);//override
+ wTime->addAlternateClassName(TQTIMEEDIT_OBJECT_NAME_STRING, true);//override
wTime->addAlternateClassName("KTimeWidget", true);//override
wTime->setName(i18n("Time Widget"));
wTime->setNamePrefix(
@@ -247,7 +247,7 @@ KexiDBFactory::KexiDBFactory(QObject *parent, const char *name, const QStringLis
#endif
wDateTime->setPixmap("datetimeedit");
wDateTime->setClassName("KexiDBDateTimeEdit");
- wDateTime->addAlternateClassName("QDateTimeEdit", true);//override
+ wDateTime->addAlternateClassName(TQDATETIMEEDIT_OBJECT_NAME_STRING, true);//override
wDateTime->addAlternateClassName("KDateTimeWidget", true);//override
wDateTime->setName(i18n("Date/Time Widget"));
wDateTime->setNamePrefix(
@@ -259,7 +259,7 @@ KexiDBFactory::KexiDBFactory(QObject *parent, const char *name, const QStringLis
/* KexiDataAwareWidgetInfo *wIntSpinBox = new KexiDataAwareWidgetInfo(this, "stdwidgets", "KIntSpinBox");
wIntSpinBox->setPixmap("spin");
wIntSpinBox->setClassName("KexiDBIntSpinBox");
- wIntSpinBox->addAlternateClassName("QSpinBox", true);
+ wIntSpinBox->addAlternateClassName(TQSPINBOX_OBJECT_NAME_STRING, true);
wIntSpinBox->addAlternateClassName("KIntSpinBox", true);
wIntSpinBox->setName(i18n("Integer Number Spin Box"));
wIntSpinBox->setNamePrefix(
@@ -350,14 +350,14 @@ KexiDBFactory::~KexiDBFactory()
{
}
-QWidget*
-KexiDBFactory::createWidget(const QCString &c, QWidget *p, const char *n,
+TQWidget*
+KexiDBFactory::createWidget(const TQCString &c, TQWidget *p, const char *n,
KFormDesigner::Container *container, int options)
{
kexipluginsdbg << "KexiDBFactory::createWidget() " << this << endl;
- QWidget *w=0;
- QString text( container->form()->library()->textForWidgetName(n, c) );
+ TQWidget *w=0;
+ TQString text( container->form()->library()->textForWidgetName(n, c) );
const bool designMode = options & KFormDesigner::WidgetFactory::DesignViewMode;
if(c == "KexiDBSubForm")
@@ -366,15 +366,15 @@ KexiDBFactory::createWidget(const QCString &c, QWidget *p, const char *n,
{
w = new KexiDBLineEdit(p, n);
if (designMode)
- w->setCursor(QCursor(Qt::ArrowCursor));
+ w->setCursor(TQCursor(TQt::ArrowCursor));
}
else if(c == "KexiDBTextEdit")
{
w = new KexiDBTextEdit(p, n);
if (designMode)
- w->setCursor(QCursor(Qt::ArrowCursor));
+ w->setCursor(TQCursor(TQt::ArrowCursor));
}
- else if(c == "QFrame" || c == "KexiFrame")
+ else if(c == TQFRAME_OBJECT_NAME_STRING || c == "KexiFrame")
{
w = new KexiFrame(p, n);
new KFormDesigner::Container(container, w, container);
@@ -384,7 +384,7 @@ KexiDBFactory::createWidget(const QCString &c, QWidget *p, const char *n,
#ifndef KEXI_NO_IMAGEBOX_WIDGET
else if(c == "KexiDBImageBox") {
w = new KexiDBImageBox(designMode, p, n);
- connect(w, SIGNAL(idChanged(long)), this, SLOT(slotImageBoxIdChanged(long)));
+ connect(w, TQT_SIGNAL(idChanged(long)), this, TQT_SLOT(slotImageBoxIdChanged(long)));
}
#endif
#ifndef KEXI_NO_AUTOFIELD_WIDGET
@@ -396,11 +396,11 @@ KexiDBFactory::createWidget(const QCString &c, QWidget *p, const char *n,
else if(c == "KexiDBComboBox")
w = new KexiDBComboBox(p, n, designMode);
/* else if(c == "KexiDBTimeEdit")
- w = new KexiDBTimeEdit(QTime::currentTime(), p, n);
+ w = new KexiDBTimeEdit(TQTime::currentTime(), p, n);
else if(c == "KexiDBDateEdit")
- w = new KexiDBDateEdit(QDate::currentDate(), p, n);
+ w = new KexiDBDateEdit(TQDate::tqcurrentDate(), p, n);
else if(c == "KexiDBDateTimeEdit")
- w = new KexiDBDateTimeEdit(QDateTime::currentDateTime(), p, n);*/
+ w = new KexiDBDateTimeEdit(TQDateTime::tqcurrentDateTime(), p, n);*/
// else if(c == "KexiDBIntSpinBox")
// w = new KexiDBIntSpinBox(p, n);
// else if(c == "KexiDBDoubleSpinBox")
@@ -412,10 +412,10 @@ KexiDBFactory::createWidget(const QCString &c, QWidget *p, const char *n,
}
bool
-KexiDBFactory::createMenuActions(const QCString &classname, QWidget *w, QPopupMenu *menu,
+KexiDBFactory::createMenuActions(const TQCString &classname, TQWidget *w, TQPopupMenu *menu,
KFormDesigner::Container *)
{
- if(classname == "QPushButton" || classname == "KPushButton" || classname == "KexiPushButton")
+ if(classname == TQPUSHBUTTON_OBJECT_NAME_STRING || classname == "KPushButton" || classname == "KexiPushButton")
{
/*! @todo also call createMenuActions() for inherited factory! */
m_assignAction->plug( menu );
@@ -453,7 +453,7 @@ KexiDBFactory::createCustomActions(KActionCollection* col)
}
bool
-KexiDBFactory::startEditing(const QCString &classname, QWidget *w, KFormDesigner::Container *container)
+KexiDBFactory::startEditing(const TQCString &classname, TQWidget *w, KFormDesigner::Container *container)
{
m_container = container;
if(classname == "KexiDBLineEdit")
@@ -462,7 +462,7 @@ KexiDBFactory::startEditing(const QCString &classname, QWidget *w, KFormDesigner
//! just inherited StdWidgetFactory::clearWidgetContent() should be called
KLineEdit *lineedit = static_cast<KLineEdit*>(w);
createEditor(classname, lineedit->text(), lineedit, container,
- lineedit->geometry(), lineedit->alignment(), true);
+ lineedit->tqgeometry(), lineedit->tqalignment(), true);
return true;
}
if(classname == "KexiDBTextEdit")
@@ -471,7 +471,7 @@ KexiDBFactory::startEditing(const QCString &classname, QWidget *w, KFormDesigner
//! just inherited StdWidgetFactory::clearWidgetContent() should be called
KTextEdit *textedit = static_cast<KTextEdit*>(w);
createEditor(classname, textedit->text(), textedit, container,
- textedit->geometry(), textedit->alignment(), true, true);
+ textedit->tqgeometry(), textedit->tqalignment(), true, true);
//copy a few properties
KTextEdit *ed = dynamic_cast<KTextEdit *>( editor(w) );
ed->setWrapPolicy(textedit->wrapPolicy());
@@ -489,7 +489,7 @@ KexiDBFactory::startEditing(const QCString &classname, QWidget *w, KFormDesigner
m_widget = w;
if(label->textFormat() == RichText)
{
- QString text = label->text();
+ TQString text = label->text();
if ( editRichText( label, text ) )
{
changeProperty( "textFormat", "RichText", container->form() );
@@ -497,13 +497,13 @@ KexiDBFactory::startEditing(const QCString &classname, QWidget *w, KFormDesigner
}
if ( classname == "KexiDBLabel" )
- w->resize(w->sizeHint());
+ w->resize(w->tqsizeHint());
}
else
{
createEditor(classname, label->text(), label, container,
- label->geometry(), label->alignment(),
- false, label->alignment() & Qt::WordBreak /*multiline*/);
+ label->tqgeometry(), label->tqalignment(),
+ false, label->tqalignment() & TQt::WordBreak /*multiline*/);
}
return true;
}
@@ -528,15 +528,15 @@ KexiDBFactory::startEditing(const QCString &classname, QWidget *w, KFormDesigner
else if(classname == "KexiDBAutoField") {
if(static_cast<KexiDBAutoField*>(w)->hasAutoCaption())
return false; // caption is auto, abort editing
- QLabel *label = static_cast<KexiDBAutoField*>(w)->label();
- createEditor(classname, label->text(), label, container, label->geometry(), label->alignment());
+ TQLabel *label = static_cast<KexiDBAutoField*>(w)->label();
+ createEditor(classname, label->text(), label, container, label->tqgeometry(), label->tqalignment());
return true;
}
else if (classname == "KexiDBCheckBox") {
KexiDBCheckBox *cb = static_cast<KexiDBCheckBox*>(w);
- QRect r( cb->geometry() );
- r.setLeft( r.left() + 2 + cb->style().subRect( QStyle::SR_CheckBoxIndicator, cb ).width() );
- createEditor(classname, cb->text(), cb, container, r, Qt::AlignAuto);
+ TQRect r( cb->tqgeometry() );
+ r.setLeft( r.left() + 2 + cb->tqstyle().subRect( TQStyle::SR_CheckBoxIndicator, cb ).width() );
+ createEditor(classname, cb->text(), cb, container, r, TQt::AlignAuto);
return true;
}
else if(classname == "KexiDBImageBox") {
@@ -548,13 +548,13 @@ KexiDBFactory::startEditing(const QCString &classname, QWidget *w, KFormDesigner
}
bool
-KexiDBFactory::previewWidget(const QCString &, QWidget *, KFormDesigner::Container *)
+KexiDBFactory::previewWidget(const TQCString &, TQWidget *, KFormDesigner::Container *)
{
return false;
}
bool
-KexiDBFactory::clearWidgetContent(const QCString & /*classname*/, QWidget *w)
+KexiDBFactory::clearWidgetContent(const TQCString & /*classname*/, TQWidget *w)
{
//! @todo this code should not be copied here but
//! just inherited StdWidgetFactory::clearWidgetContent() should be called
@@ -564,10 +564,10 @@ KexiDBFactory::clearWidgetContent(const QCString & /*classname*/, QWidget *w)
return true;
}
-QValueList<QCString>
-KexiDBFactory::autoSaveProperties(const QCString & /*classname*/)
+TQValueList<TQCString>
+KexiDBFactory::autoSaveProperties(const TQCString & /*classname*/)
{
- QValueList<QCString> lst;
+ TQValueList<TQCString> lst;
// if(classname == "KexiDBSubForm")
//lst << "formName";
// if(classname == "KexiDBLineEdit")
@@ -578,8 +578,8 @@ KexiDBFactory::autoSaveProperties(const QCString & /*classname*/)
}
bool
-KexiDBFactory::isPropertyVisibleInternal(const QCString& classname, QWidget *w,
- const QCString& property, bool isTopLevel)
+KexiDBFactory::isPropertyVisibleInternal(const TQCString& classname, TQWidget *w,
+ const TQCString& property, bool isTopLevel)
{
//general
if (property=="dataSource" || property=="dataSourceMimeType") {
@@ -646,7 +646,7 @@ KexiDBFactory::isPropertyVisibleInternal(const QCString& classname, QWidget *w,
}
else if(classname == "KexiDBCheckBox") {
//hide text property if the widget is a child of an autofield beause there's already "caption" for this purpose
- if (property=="text" && w && dynamic_cast<KFormDesigner::WidgetWithSubpropertiesInterface*>(w->parentWidget()))
+ if (property=="text" && w && dynamic_cast<KFormDesigner::WidgetWithSubpropertiesInterface*>(w->tqparentWidget()))
return false;
ok = property!="autoRepeat";
}
@@ -655,8 +655,8 @@ KexiDBFactory::isPropertyVisibleInternal(const QCString& classname, QWidget *w,
}
bool
-KexiDBFactory::propertySetShouldBeReloadedAfterPropertyChange(const QCString& classname,
- QWidget *w, const QCString& property)
+KexiDBFactory::propertySetShouldBeReloadedAfterPropertyChange(const TQCString& classname,
+ TQWidget *w, const TQCString& property)
{
Q_UNUSED(classname);
Q_UNUSED(w);
@@ -666,41 +666,41 @@ KexiDBFactory::propertySetShouldBeReloadedAfterPropertyChange(const QCString& cl
}
bool
-KexiDBFactory::changeText(const QString &text)
+KexiDBFactory::changeText(const TQString &text)
{
KFormDesigner::Form *form = m_container ? m_container->form() : 0;
if (!form)
return false;
if (!form->selectedWidget())
return false;
- QCString n( form->selectedWidget()->className() );
-// QWidget *w = WidgetFactory::widget();
+ TQCString n( form->selectedWidget()->className() );
+// TQWidget *w = WidgetFactory::widget();
if(n == "KexiDBAutoField") {
changeProperty("caption", text, form);
return true;
}
- //! \todo check field's geometry
+ //! \todo check field's tqgeometry
return false;
}
void
-KexiDBFactory::resizeEditor(QWidget *editor, QWidget *w, const QCString &classname)
+KexiDBFactory::resizeEditor(TQWidget *editor, TQWidget *w, const TQCString &classname)
{
- //QSize s = widget->size();
- //QPoint p = widget->pos();
+ //TQSize s = widget->size();
+ //TQPoint p = widget->pos();
if(classname == "KexiDBAutoField")
- editor->setGeometry( static_cast<KexiDBAutoField*>(w)->label()->geometry() );
+ editor->setGeometry( static_cast<KexiDBAutoField*>(w)->label()->tqgeometry() );
}
void
KexiDBFactory::slotImageBoxIdChanged(KexiBLOBBuffer::Id_t id)
{
-//old KexiFormView *formView = KexiUtils::findParent<KexiFormView>((QWidget*)m_widget, "KexiFormView");
+//old KexiFormView *formView = KexiUtils::findParent<KexiFormView>((TQWidget*)m_widget, "KexiFormView");
// (js) heh, porting to KFormDesigner::FormManager::self() singleton took me entire day of work...
KFormDesigner::Form *form = KFormDesigner::FormManager::self()->activeForm();
- KexiFormView *formView = form ? KexiUtils::findParent<KexiFormView>((QWidget*)form->widget(), "KexiFormView") : 0;
+ KexiFormView *formView = form ? KexiUtils::findParent<KexiFormView>((TQWidget*)form->widget(), "KexiFormView") : 0;
if (formView) {
changeProperty("pixmapId", (uint)/*! @todo unsafe */id, form);
//old formView->setUnsavedLocalBLOB(m_widget, id);
diff --git a/kexi/plugins/forms/kexidbfactory.h b/kexi/plugins/forms/kexidbfactory.h
index 6064a001..f15f8c39 100644
--- a/kexi/plugins/forms/kexidbfactory.h
+++ b/kexi/plugins/forms/kexidbfactory.h
@@ -34,39 +34,40 @@ namespace KFormDesigner {
class KexiDBFactory : public KFormDesigner::WidgetFactory
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiDBFactory(QObject *parent, const char *name, const QStringList &args);
+ KexiDBFactory(TQObject *tqparent, const char *name, const TQStringList &args);
virtual ~KexiDBFactory();
- virtual QWidget *createWidget(const QCString &classname, QWidget *parent, const char *name,
+ virtual TQWidget *createWidget(const TQCString &classname, TQWidget *tqparent, const char *name,
KFormDesigner::Container *container, int options = DefaultOptions );
virtual void createCustomActions(KActionCollection* col);
- virtual bool createMenuActions(const QCString &classname, QWidget *w, QPopupMenu *menu,
+ virtual bool createMenuActions(const TQCString &classname, TQWidget *w, TQPopupMenu *menu,
KFormDesigner::Container *container);
- virtual bool startEditing(const QCString &classname, QWidget *w, KFormDesigner::Container *container);
- virtual bool previewWidget(const QCString &, QWidget *, KFormDesigner::Container *);
- virtual bool clearWidgetContent(const QCString &classname, QWidget *w);
+ virtual bool startEditing(const TQCString &classname, TQWidget *w, KFormDesigner::Container *container);
+ virtual bool previewWidget(const TQCString &, TQWidget *, KFormDesigner::Container *);
+ virtual bool clearWidgetContent(const TQCString &classname, TQWidget *w);
- //virtual void saveSpecialProperty(const QString &classname, const QString &name, const QVariant &value, QWidget *w,
- //QDomElement &parentNode, QDomDocument &parent) {}
- //virtual void readSpecialProperty(const QCString &classname, QDomElement &node, QWidget *w, KFormDesigner::ObjectTreeItem *item) {}
- virtual QValueList<QCString> autoSaveProperties(const QCString &classname);
+ //virtual void saveSpecialProperty(const TQString &classname, const TQString &name, const TQVariant &value, TQWidget *w,
+ //TQDomElement &tqparentNode, TQDomDocument &tqparent) {}
+ //virtual void readSpecialProperty(const TQCString &classname, TQDomElement &node, TQWidget *w, KFormDesigner::ObjectTreeItem *item) {}
+ virtual TQValueList<TQCString> autoSaveProperties(const TQCString &classname);
protected slots:
void slotImageBoxIdChanged(long id); /*KexiBLOBBuffer::Id_t*/
protected:
- virtual bool changeText(const QString &newText);
- virtual void resizeEditor(QWidget *editor, QWidget *widget, const QCString &classname);
+ virtual bool changeText(const TQString &newText);
+ virtual void resizeEditor(TQWidget *editor, TQWidget *widget, const TQCString &classname);
- virtual bool isPropertyVisibleInternal(const QCString& classname, QWidget *w,
- const QCString& property, bool isTopLevel);
+ virtual bool isPropertyVisibleInternal(const TQCString& classname, TQWidget *w,
+ const TQCString& property, bool isTopLevel);
//! Sometimes property sets should be reloaded when a given property value changed.
- virtual bool propertySetShouldBeReloadedAfterPropertyChange(const QCString& classname, QWidget *w,
- const QCString& property);
+ virtual bool propertySetShouldBeReloadedAfterPropertyChange(const TQCString& classname, TQWidget *w,
+ const TQCString& property);
KAction* m_assignAction;
};
diff --git a/kexi/plugins/forms/kexidbtextwidgetinterface.cpp b/kexi/plugins/forms/kexidbtextwidgetinterface.cpp
index 47eabe9d..3c20510e 100644
--- a/kexi/plugins/forms/kexidbtextwidgetinterface.cpp
+++ b/kexi/plugins/forms/kexidbtextwidgetinterface.cpp
@@ -21,8 +21,8 @@
#include "kexiformdataiteminterface.h"
#include <kexidb/queryschema.h>
#include <kexiutils/utils.h>
-#include <qframe.h>
-#include <qpainter.h>
+#include <tqframe.h>
+#include <tqpainter.h>
KexiDBTextWidgetInterface::KexiDBTextWidgetInterface()
: m_autonumberDisplayParameters(0)
@@ -34,7 +34,7 @@ KexiDBTextWidgetInterface::~KexiDBTextWidgetInterface()
delete m_autonumberDisplayParameters;
}
-void KexiDBTextWidgetInterface::setColumnInfo(KexiDB::QueryColumnInfo* cinfo, QWidget *w)
+void KexiDBTextWidgetInterface::setColumnInfo(KexiDB::QueryColumnInfo* cinfo, TQWidget *w)
{
if (cinfo->field->isAutoIncrement()) {
if (!m_autonumberDisplayParameters)
@@ -43,7 +43,7 @@ void KexiDBTextWidgetInterface::setColumnInfo(KexiDB::QueryColumnInfo* cinfo, QW
}
}
-void KexiDBTextWidgetInterface::paint( QFrame *w, QPainter* p, bool textIsEmpty, int alignment, bool hasFocus )
+void KexiDBTextWidgetInterface::paint( TQFrame *w, TQPainter* p, bool textIsEmpty, int tqalignment, bool hasFocus )
{
KexiFormDataItemInterface *dataItemIface = dynamic_cast<KexiFormDataItemInterface*>(w);
KexiDB::QueryColumnInfo *columnInfo = dataItemIface ? dataItemIface->columnInfo() : 0;
@@ -53,19 +53,19 @@ void KexiDBTextWidgetInterface::paint( QFrame *w, QPainter* p, bool textIsEmpty,
if (w->hasFocus()) {
p->setPen(
KexiUtils::blendedColors(
- m_autonumberDisplayParameters->textColor, w->palette().active().base(), 1, 3));
+ m_autonumberDisplayParameters->textColor, w->tqpalette().active().base(), 1, 3));
}
KexiDisplayUtils::paintAutonumberSign(*m_autonumberDisplayParameters, p,
2 + margin + w->margin(), margin, w->width() - margin*2 -2-2,
- w->height() - margin*2 -2, alignment, hasFocus);
+ w->height() - margin*2 -2, tqalignment, hasFocus);
}
}
}
-void KexiDBTextWidgetInterface::event( QEvent * e, QWidget *w, bool textIsEmpty )
+void KexiDBTextWidgetInterface::event( TQEvent * e, TQWidget *w, bool textIsEmpty )
{
- if (e->type()==QEvent::FocusIn || e->type()==QEvent::FocusOut) {
+ if (e->type()==TQEvent::FocusIn || e->type()==TQEvent::FocusOut) {
if (m_autonumberDisplayParameters && textIsEmpty)
- w->repaint();
+ w->tqrepaint();
}
}
diff --git a/kexi/plugins/forms/kexidbtextwidgetinterface.h b/kexi/plugins/forms/kexidbtextwidgetinterface.h
index ca10fc4e..6e0299c0 100644
--- a/kexi/plugins/forms/kexidbtextwidgetinterface.h
+++ b/kexi/plugins/forms/kexidbtextwidgetinterface.h
@@ -25,7 +25,7 @@
namespace KexiDB {
class QueryColumnInfo;
}
-class QFrame;
+class TQFrame;
//! @short An interface providing common text editor's functionality
/*! Widgets (e.g. KexiDBLineEdit, KexiDBTextEdit) implementing KexiFormDataItemInterface
@@ -37,13 +37,13 @@ class KEXIFORMUTILS_EXPORT KexiDBTextWidgetInterface
~KexiDBTextWidgetInterface();
//! Called from KexiFormDataItemInterface::setColumnInfo(KexiDB::QueryColumnInfo* cinfo) implementation.
- void setColumnInfo(KexiDB::QueryColumnInfo* cinfo, QWidget *w);
+ void setColumnInfo(KexiDB::QueryColumnInfo* cinfo, TQWidget *w);
- //! Called from paintEvent( QPaintEvent *pe ) method of the data aware widget.
- void paint( QFrame *w, QPainter *p, bool textIsEmpty, int alignment, bool hasFocus );
+ //! Called from paintEvent( TQPaintEvent *pe ) method of the data aware widget.
+ void paint( TQFrame *w, TQPainter *p, bool textIsEmpty, int tqalignment, bool hasFocus );
- //! Called from event( QEvent * e ) method of the data aware widget.
- void event( QEvent * e, QWidget *w, bool textIsEmpty );
+ //! Called from event( TQEvent * e ) method of the data aware widget.
+ void event( TQEvent * e, TQWidget *w, bool textIsEmpty );
protected:
//! parameters for displaying autonumber sign
diff --git a/kexi/plugins/forms/kexiformdataiteminterface.cpp b/kexi/plugins/forms/kexiformdataiteminterface.cpp
index c87a2dab..9a861917 100644
--- a/kexi/plugins/forms/kexiformdataiteminterface.cpp
+++ b/kexi/plugins/forms/kexiformdataiteminterface.cpp
@@ -40,7 +40,7 @@ KexiFormDataItemInterface::~KexiFormDataItemInterface()
void KexiFormDataItemInterface::undoChanges()
{
// m_disable_signalValueChanged = true;
- setValueInternal(QString::null, false);
+ setValueInternal(TQString(), false);
// m_disable_signalValueChanged = false;
}
@@ -49,7 +49,7 @@ KexiDB::Field* KexiFormDataItemInterface::field() const
return m_columnInfo ? m_columnInfo->field : 0;
}
-void KexiFormDataItemInterface::setDisplayDefaultValue(QWidget* widget, bool displayDefaultValue)
+void KexiFormDataItemInterface::setDisplayDefaultValue(TQWidget* widget, bool displayDefaultValue)
{
m_displayDefaultValue = displayDefaultValue;
if (!m_displayParametersForDefaultValue) {
@@ -61,8 +61,8 @@ void KexiFormDataItemInterface::setDisplayDefaultValue(QWidget* widget, bool dis
void KexiFormDataItemInterface::cancelEditor()
{
- QWidget *parentWidget = dynamic_cast<QWidget*>(this)->parentWidget();
- KexiFormScrollView* view = KexiUtils::findParent<KexiFormScrollView>(parentWidget, "KexiFormScrollView");
+ TQWidget *tqparentWidget = dynamic_cast<TQWidget*>(this)->tqparentWidget();
+ KexiFormScrollView* view = KexiUtils::findParent<KexiFormScrollView>(tqparentWidget, "KexiFormScrollView");
if (view)
view->cancelEditor();
}
diff --git a/kexi/plugins/forms/kexiformdataiteminterface.h b/kexi/plugins/forms/kexiformdataiteminterface.h
index 99d20db4..1cb7a11f 100644
--- a/kexi/plugins/forms/kexiformdataiteminterface.h
+++ b/kexi/plugins/forms/kexiformdataiteminterface.h
@@ -22,7 +22,7 @@
#include <widget/utils/kexidisplayutils.h>
#include <kexidataiteminterface.h>
-#include <qwidget.h>
+#include <tqwidget.h>
namespace KexiDB {
class Field;
@@ -37,22 +37,22 @@ class KEXIFORMUTILS_EXPORT KexiFormDataItemInterface : public KexiDataItemInterf
//! \return the name of the data source for this widget.
//! Data source usually means here a table or query, a field name or an expression.
- inline QString dataSource() const { return m_dataSource; }
+ inline TQString dataSource() const { return m_dataSource; }
//! Sets the name of the data source for this widget.
//! Data source usually means here a table or query or field name name.
- inline void setDataSource(const QString &ds) { m_dataSource = ds; }
+ inline void setDataSource(const TQString &ds) { m_dataSource = ds; }
/*! \return the mime type of the data source for this widget.
Data source mime type means here types like "kexi/table" or "kexi/query"
in.the data source is set to object (as within form or subform) or is empty
if the data source is set to table field or query column. */
- inline QCString dataSourceMimeType() const { return m_dataSourceMimeType; }
+ inline TQCString dataSourceMimeType() const { return m_dataSourceMimeType; }
/*! Sets the mime type of the data source for this widget.
Data source usually means here a "kexi/table" or "kexi/query".
@see dataSourceMimeType() */
- inline void setDataSourceMimeType(const QCString &ds) { m_dataSourceMimeType = ds; }
+ inline void setDataSourceMimeType(const TQCString &ds) { m_dataSourceMimeType = ds; }
/*! If \a displayDefaultValue is true, the value set by KexiDataItemInterface::setValue()
is displayed in a special way. Used by KexiFormDataProvider::fillDataItems().
@@ -60,14 +60,14 @@ class KEXIFORMUTILS_EXPORT KexiFormDataItemInterface : public KexiDataItemInterf
You can reimplement this in the widget. Always call the superclass' implementation.
setDisplayDefaultValue(.., false) is called in KexiFormScrollView::valueChanged()
as a response on data change performed by user. */
- virtual void setDisplayDefaultValue(QWidget* widget, bool displayDefaultValue);
+ virtual void setDisplayDefaultValue(TQWidget* widget, bool displayDefaultValue);
/*! \return true if default value is displayed for this item. */
virtual bool hasDisplayedDefaultValue() const { return m_displayDefaultValue; }
- /*! Convenience function: casts this item to a QWidget.
- Can return 0 if the item is not a QWidget-derived object. */
- virtual QWidget* widget() { return dynamic_cast<QWidget*>(this); }
+ /*! Convenience function: casts this item to a TQWidget.
+ Can return 0 if the item is not a TQWidget-derived object. */
+ virtual TQWidget* widget() { return dynamic_cast<TQWidget*>(this); }
/*! Sets 'invalid' state, e.g. a text editor widget should display
text \a displayText and become read only to prevent entering data,
@@ -76,7 +76,7 @@ class KEXIFORMUTILS_EXPORT KexiFormDataItemInterface : public KexiDataItemInterf
Note: that even widgets that usualy do not display texts (e.g. pixmaps)
should display \a displayText too.
*/
- virtual void setInvalidState( const QString& displayText ) = 0;
+ virtual void setInvalidState( const TQString& displayText ) = 0;
/*! Changes 'read only' flag, for this widget.
Typically this flag can be passed to a widget itself,
@@ -118,7 +118,7 @@ class KEXIFORMUTILS_EXPORT KexiFormDataItemInterface : public KexiDataItemInterf
virtual void undoChanges();
/* Cancels editing of the widget's data. This method just looks for
- the (grand)parent KexiFormScrollView object and calls
+ the (grand)tqparent KexiFormScrollView object and calls
KexiFormScrollView::cancelEditor(). */
void cancelEditor();
@@ -129,11 +129,11 @@ class KEXIFORMUTILS_EXPORT KexiFormDataItemInterface : public KexiDataItemInterf
\return true if \a ke should be accepted by the widget item.
This method is used e.g. in KexiDBImageBox for Key_Escape to if the popup is visible,
so the key press won't be consumed to perform "cancel editing". */
- virtual bool keyPressed(QKeyEvent *ke) { Q_UNUSED(ke); return false; };
+ virtual bool keyPressed(TQKeyEvent *ke) { Q_UNUSED(ke); return false; };
protected:
- QString m_dataSource;
- QCString m_dataSourceMimeType;
+ TQString m_dataSource;
+ TQCString m_dataSourceMimeType;
KexiDB::QueryColumnInfo* m_columnInfo;
KexiDisplayUtils::DisplayParameters *m_displayParametersForEnteredValue; //!< used in setDisplayDefaultValue()
KexiDisplayUtils::DisplayParameters *m_displayParametersForDefaultValue; //!< used in setDisplayDefaultValue()
diff --git a/kexi/plugins/forms/kexiformeventhandler.cpp b/kexi/plugins/forms/kexiformeventhandler.cpp
index 01bca201..de2d8570 100644
--- a/kexi/plugins/forms/kexiformeventhandler.cpp
+++ b/kexi/plugins/forms/kexiformeventhandler.cpp
@@ -19,8 +19,8 @@
#include "kexiformeventhandler.h"
-#include <qwidget.h>
-#include <qobjectlist.h>
+#include <tqwidget.h>
+#include <tqobjectlist.h>
#include <kdebug.h>
#include <klocale.h>
@@ -44,19 +44,19 @@ bool KexiFormEventAction::ActionData::isEmpty() const
}
KexiPart::Info* KexiFormEventAction::ActionData::decodeString(
- QString& actionType, QString& actionArg, bool& ok) const
+ TQString& actionType, TQString& actionArg, bool& ok) const
{
- const int idx = string.find(':');
+ const int idx = string.tqfind(':');
ok = false;
if (idx==-1)
return 0;
- const QString _actionType = string.left(idx);
- const QString _actionArg = string.mid(idx+1);
+ const TQString _actionType = string.left(idx);
+ const TQString _actionArg = string.mid(idx+1);
if (_actionType.isEmpty() || _actionArg.isEmpty())
return 0;
KexiPart::Info *info = 0;
if (_actionType!="kaction" && _actionType!="currentForm") {
- info = Kexi::partManager().infoForMimeType( QString("kexi/%1").arg(_actionType) );
+ info = Kexi::partManager().infoForMimeType( TQString("kexi/%1").tqarg(_actionType) );
if (!info)
return 0;
}
@@ -68,9 +68,9 @@ KexiPart::Info* KexiFormEventAction::ActionData::decodeString(
//-------------------------------------
-KexiFormEventAction::KexiFormEventAction(KexiMainWindow *mainWin, QObject* parent,
- const QString& actionName, const QString& objectName, const QString& actionOption)
- : KAction(parent), m_mainWin(mainWin), m_actionName(actionName), m_objectName(objectName)
+KexiFormEventAction::KexiFormEventAction(KexiMainWindow *mainWin, TQObject* tqparent,
+ const TQString& actionName, const TQString& objectName, const TQString& actionOption)
+ : KAction(tqparent), m_mainWin(mainWin), m_actionName(actionName), m_objectName(objectName)
, m_actionOption(actionOption)
{
}
@@ -85,7 +85,7 @@ void KexiFormEventAction::activate()
if (!project)
return;
KexiPart::Part* part = Kexi::partManager().partForMimeType(
- QString("kexi/%1").arg(m_actionName) );
+ TQString("kexi/%1").tqarg(m_actionName) );
if (!part)
return;
KexiPart::Item* item = project->item( part->info(), m_objectName );
@@ -94,7 +94,7 @@ void KexiFormEventAction::activate()
bool actionCancelled = false;
if (m_actionOption.isEmpty()) { // backward compatibility (good defaults)
if (part->info()->isExecuteSupported())
- part->execute(item, parent());
+ part->execute(item, tqparent());
else
m_mainWin->openObject(item, Kexi::DataViewMode, actionCancelled);
}
@@ -103,7 +103,7 @@ void KexiFormEventAction::activate()
if (m_actionOption == "open")
m_mainWin->openObject(item, Kexi::DataViewMode, actionCancelled);
else if (m_actionOption == "execute")
- part->execute(item, parent());
+ part->execute(item, tqparent());
else if (m_actionOption == "print") {
if (part->info()->isPrintingSupported())
m_mainWin->printItem(item);
@@ -147,7 +147,7 @@ KexiFormEventHandler::~KexiFormEventHandler()
{
}
-void KexiFormEventHandler::setMainWidgetForEventHandling(KexiMainWindow *mainWin, QWidget* mainWidget)
+void KexiFormEventHandler::setMainWidgetForEventHandling(KexiMainWindow *mainWin, TQWidget* mainWidget)
{
m_mainWidget = mainWidget;
if (!m_mainWidget)
@@ -155,9 +155,9 @@ void KexiFormEventHandler::setMainWidgetForEventHandling(KexiMainWindow *mainWin
//find widgets whose will work as data items
//! @todo look for other widgets too
- QObjectList *l = m_mainWidget->queryList( "KexiPushButton" );
- QObjectListIt it( *l );
- QObject *obj;
+ TQObjectList *l = m_mainWidget->queryList( "KexiPushButton" );
+ TQObjectListIt it( *l );
+ TQObject *obj;
for ( ; (obj = it.current()) != 0; ++it ) {
bool ok;
KexiFormEventAction::ActionData data;
@@ -166,7 +166,7 @@ void KexiFormEventHandler::setMainWidgetForEventHandling(KexiMainWindow *mainWin
if (data.isEmpty())
continue;
- QString actionType, actionArg;
+ TQString actionType, actionArg;
KexiPart::Info* partInfo = data.decodeString(actionType, actionArg, ok);
if (!ok)
continue;
@@ -174,14 +174,14 @@ void KexiFormEventHandler::setMainWidgetForEventHandling(KexiMainWindow *mainWin
KAction *action = mainWin->actionCollection()->action( actionArg.latin1() );
if (!action)
continue;
- QObject::disconnect( obj, SIGNAL(clicked()), action, SLOT(activate()) ); //safety
- QObject::connect( obj, SIGNAL(clicked()), action, SLOT(activate()) );
+ TQObject::disconnect( obj, TQT_SIGNAL(clicked()), action, TQT_SLOT(activate()) ); //safety
+ TQObject::connect( obj, TQT_SIGNAL(clicked()), action, TQT_SLOT(activate()) );
}
else if (partInfo) { //'open or execute' action
KexiFormEventAction* action = new KexiFormEventAction(mainWin, obj, actionType, actionArg,
data.option);
- QObject::disconnect( obj, SIGNAL(clicked()), action, SLOT(activate()) );
- QObject::connect( obj, SIGNAL(clicked()), action, SLOT(activate()) );
+ TQObject::disconnect( obj, TQT_SIGNAL(clicked()), action, TQT_SLOT(activate()) );
+ TQObject::connect( obj, TQT_SIGNAL(clicked()), action, TQT_SLOT(activate()) );
}
}
delete l;
diff --git a/kexi/plugins/forms/kexiformeventhandler.h b/kexi/plugins/forms/kexiformeventhandler.h
index e92e9ff9..6e020e25 100644
--- a/kexi/plugins/forms/kexiformeventhandler.h
+++ b/kexi/plugins/forms/kexiformeventhandler.h
@@ -20,7 +20,7 @@
#ifndef KEXIFORMEVENTHANDLER_H
#define KEXIFORMEVENTHANDLER_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kaction.h>
class KexiMainWindow;
@@ -47,10 +47,10 @@ class KEXIFORMUTILS_EXPORT KexiFormEventHandler
to appropriate actions.
For now, all of them must be KexiPushButton).
\a mainWin is used to get action list. */
- void setMainWidgetForEventHandling(KexiMainWindow *mainWin, QWidget* mainWidget);
+ void setMainWidgetForEventHandling(KexiMainWindow *mainWin, TQWidget* mainWidget);
protected:
- QWidget *m_mainWidget;
+ TQWidget *m_mainWidget;
};
//! @internal form-level action for handling "on click" actions
@@ -72,20 +72,20 @@ class KEXIFORMUTILS_EXPORT KexiFormEventAction : public KAction
\a ok is set to true on success and to false on failure. On failure no other
values are passed.
\return part info if action type is "table", "query", etc., or 0 for "kaction" type. */
- KexiPart::Info* decodeString(QString& actionType, QString& actionArg, bool& ok) const;
+ KexiPart::Info* decodeString(TQString& actionType, TQString& actionArg, bool& ok) const;
//! \return true if the action is empty
bool isEmpty() const;
- QString string; //!< action string with prefix, like "kaction:edit_copy" or "table:<tableName>"
+ TQString string; //!< action string with prefix, like "kaction:edit_copy" or "table:<tableName>"
- QString option; //!< option used when name is "table/query/etc.:\<objectName\>" is set;
+ TQString option; //!< option used when name is "table/query/etc.:\<objectName\>" is set;
//!< can be set to "open", "design", "editText", etc.
//!< @see ActionToExecuteListView::showActionsForMimeType()
};
- KexiFormEventAction(KexiMainWindow *mainWin, QObject* parent, const QString& actionName,
- const QString& objectName, const QString& actionOption);
+ KexiFormEventAction(KexiMainWindow *mainWin, TQObject* tqparent, const TQString& actionName,
+ const TQString& objectName, const TQString& actionOption);
virtual ~KexiFormEventAction();
public slots:
@@ -95,7 +95,7 @@ class KEXIFORMUTILS_EXPORT KexiFormEventAction : public KAction
private:
KexiMainWindow *m_mainWin;
- QString m_actionName, m_objectName, m_actionOption;
+ TQString m_actionName, m_objectName, m_actionOption;
};
#endif
diff --git a/kexi/plugins/forms/kexiformmanager.cpp b/kexi/plugins/forms/kexiformmanager.cpp
index 6134cfc8..9f288418 100644
--- a/kexi/plugins/forms/kexiformmanager.cpp
+++ b/kexi/plugins/forms/kexiformmanager.cpp
@@ -35,13 +35,13 @@
#include <koproperty/property.h>
#include <widget/kexicustompropertyfactory.h>
-KexiFormManager::KexiFormManager(KexiPart::Part *parent, const char* name)
- : KFormDesigner::FormManager(parent,
+KexiFormManager::KexiFormManager(KexiPart::Part *tqparent, const char* name)
+ : KFormDesigner::FormManager(tqparent,
KFormDesigner::FormManager::HideEventsInPopupMenu |
KFormDesigner::FormManager::SkipFileActions |
KFormDesigner::FormManager::HideSignalSlotConnections
, name)
- , m_part(parent)
+ , m_part(tqparent)
{
m_emitSelectionSignalsUpdatesPropertySet = true;
KexiCustomPropertyFactory::init();
@@ -56,8 +56,8 @@ KAction* KexiFormManager::action( const char* name )
KActionCollection *col = m_part->actionCollectionForMode(Kexi::DesignViewMode);
if (!col)
return 0;
- QCString n( translateName( name ).latin1() );
- KAction *a = col->action(n);
+ TQCString n( translateName( name ).latin1() );
+ KAction *a = col->action(n.data());
if (a)
return a;
KexiDBForm *dbform;
@@ -67,10 +67,10 @@ KAction* KexiFormManager::action( const char* name )
KexiFormScrollView *scrollViewWidget = dynamic_cast<KexiFormScrollView*>(dbform->dataAwareObject());
if (!scrollViewWidget)
return 0;
- KexiFormView* formViewWidget = dynamic_cast<KexiFormView*>(scrollViewWidget->parent());
+ KexiFormView* formViewWidget = dynamic_cast<KexiFormView*>(scrollViewWidget->tqparent());
if (!formViewWidget)
return 0;
- return formViewWidget->parentDialog()->mainWin()->actionCollection()->action(n);
+ return formViewWidget->tqparentDialog()->mainWin()->actionCollection()->action(n.data());
}
KexiFormView* KexiFormManager::activeFormViewWidget() const
@@ -82,7 +82,7 @@ KexiFormView* KexiFormManager::activeFormViewWidget() const
KexiFormScrollView *scrollViewWidget = dynamic_cast<KexiFormScrollView*>(dbform->dataAwareObject());
if (!scrollViewWidget)
return 0;
- return dynamic_cast<KexiFormView*>(scrollViewWidget->parent());
+ return dynamic_cast<KexiFormView*>(scrollViewWidget->tqparent());
}
void KexiFormManager::enableAction( const char* name, bool enable )
@@ -90,12 +90,12 @@ void KexiFormManager::enableAction( const char* name, bool enable )
KexiFormView* formViewWidget = activeFormViewWidget();
if (!formViewWidget)
return;
-// if (QString(name)=="layout_menu")
+// if (TQString(name)=="tqlayout_menu")
// kdDebug() << "!!!!!!!!!!! " << enable << endl;
formViewWidget->setAvailable(translateName( name ).latin1(), enable);
}
-void KexiFormManager::setFormDataSource(const QCString& mime, const QCString& name)
+void KexiFormManager::setFormDataSource(const TQCString& mime, const TQCString& name)
{
if (!activeForm())
return;
@@ -105,14 +105,14 @@ void KexiFormManager::setFormDataSource(const QCString& mime, const QCString& na
// setPropertyValueInDesignMode(formWidget, "dataSource", name);
- QCString oldDataSourceMimeType( formWidget->dataSourceMimeType() );
- QCString oldDataSource( formWidget->dataSource().latin1() );
+ TQCString oldDataSourceMimeType( formWidget->dataSourceMimeType() );
+ TQCString oldDataSource( formWidget->dataSource().latin1() );
if (mime!=oldDataSourceMimeType || name!=oldDataSource) {
- QMap<QCString, QVariant> propValues;
+ TQMap<TQCString, TQVariant> propValues;
propValues.insert("dataSource", name);
propValues.insert("dataSourceMimeType", mime);
KFormDesigner::CommandGroup *group
- = new KFormDesigner::CommandGroup(i18n("Set Form's Data Source to \"%1\"").arg(name), propertySet());
+ = new KFormDesigner::CommandGroup(i18n("Set Form's Data Source to \"%1\"").tqarg(name.data()), propertySet());
propertySet()->createPropertyCommandsInDesignMode(formWidget, propValues, group, true /*addToActiveForm*/);
}
@@ -120,17 +120,17 @@ void KexiFormManager::setFormDataSource(const QCString& mime, const QCString& na
if (activeForm()->selectedWidget() == formWidget) {
//active form is selected: just use properties system
KFormDesigner::WidgetPropertySet *set = propertySet();
- if (!set || !set->contains("dataSource"))
+ if (!set || !set->tqcontains("dataSource"))
return;
(*set)["dataSource"].setValue(name);
- if (set->contains("dataSourceMimeType"))
+ if (set->tqcontains("dataSourceMimeType"))
(*set)["dataSourceMimeType"].setValue(mime);
return;
}
//active form isn't selected: change it's data source and mime type by hand
- QCString oldDataSourceMimeType( formWidget->dataSourceMimeType() );
- QCString oldDataSource( formWidget->dataSource().latin1() );
+ TQCString oldDataSourceMimeType( formWidget->dataSourceMimeType() );
+ TQCString oldDataSource( formWidget->dataSource().latin1() );
if (mime!=oldDataSourceMimeType || name!=oldDataSource) {
formWidget->setDataSourceMimeType(mime);
@@ -138,7 +138,7 @@ void KexiFormManager::setFormDataSource(const QCString& mime, const QCString& na
emit dirty(activeForm(), true);
activeForm()->addCommand(
- new KFormDesigner::PropertyCommand(propertySet(), QString(formWidget->name()),
+ new KFormDesigner::PropertyCommand(propertySet(), TQString(formWidget->name()),
oldDataSource, name, "dataSource"),
false );
@@ -149,7 +149,7 @@ void KexiFormManager::setFormDataSource(const QCString& mime, const QCString& na
}*/
}
-void KexiFormManager::setDataSourceFieldOrExpression(const QString& string, const QString& caption,
+void KexiFormManager::setDataSourceFieldOrExpression(const TQString& string, const TQString& caption,
KexiDB::Field::Type type)
{
if (!activeForm())
@@ -159,23 +159,23 @@ void KexiFormManager::setDataSourceFieldOrExpression(const QString& string, cons
// return;
KFormDesigner::WidgetPropertySet *set = propertySet();
- if (!set || !set->contains("dataSource"))
+ if (!set || !set->tqcontains("dataSource"))
return;
(*set)["dataSource"].setValue(string);
- if (set->contains("autoCaption") && (*set)["autoCaption"].value().toBool()) {
- if (set->contains("fieldCaptionInternal"))
+ if (set->tqcontains("autoCaption") && (*set)["autoCaption"].value().toBool()) {
+ if (set->tqcontains("fieldCaptionInternal"))
(*set)["fieldCaptionInternal"].setValue(caption);
}
if (//type!=KexiDB::Field::InvalidType &&
- set->contains("widgetType") && (*set)["widgetType"].value().toString()=="Auto")
+ set->tqcontains("widgetType") && (*set)["widgetType"].value().toString()=="Auto")
{
- if (set->contains("fieldTypeInternal"))
+ if (set->tqcontains("fieldTypeInternal"))
(*set)["fieldTypeInternal"].setValue(type);
}
-/* QString oldDataSource( dataWidget->dataSource() );
+/* TQString oldDataSource( dataWidget->dataSource() );
if (string!=oldDataSource) {
dataWidget->setDataSource(string);
emit dirty(activeForm(), true);
@@ -184,8 +184,8 @@ void KexiFormManager::setDataSourceFieldOrExpression(const QString& string, cons
}*/
}
-void KexiFormManager::insertAutoFields(const QString& sourceMimeType, const QString& sourceName,
- const QStringList& fields)
+void KexiFormManager::insertAutoFields(const TQString& sourceMimeType, const TQString& sourceName,
+ const TQStringList& fields)
{
KexiFormView* formViewWidget = activeFormViewWidget();
if (!formViewWidget || !formViewWidget->form() || !formViewWidget->form()->activeContainer())
@@ -202,13 +202,13 @@ void KexiFormManager::slotHistoryCommandExecuted()
KexiDBForm* formWidget = dynamic_cast<KexiDBForm*>(activeForm()->widget());
if (!formWidget)
return;
- QPtrListIterator<KCommand> it(group->commands());
+ TQPtrListIterator<KCommand> it(group->commands());
const KFormDesigner::PropertyCommand* pc1 = dynamic_cast<const KFormDesigner::PropertyCommand*>(it.current());
++it;
const KFormDesigner::PropertyCommand* pc2 = dynamic_cast<const KFormDesigner::PropertyCommand*>(it.current());
if (pc1 && pc2 && pc1->property()=="dataSource" && pc2->property()=="dataSourceMimeType") {
- const QMap<QCString, QVariant>::const_iterator it1( pc1->oldValues().constBegin() );
- const QMap<QCString, QVariant>::const_iterator it2( pc2->oldValues().constBegin() );
+ const TQMap<TQCString, TQVariant>::const_iterator it1( pc1->oldValues().constBegin() );
+ const TQMap<TQCString, TQVariant>::const_iterator it2( pc2->oldValues().constBegin() );
if (it1.key()==formWidget->name() && it2.key()==formWidget->name())
static_cast<KexiFormPart*>(m_part)->dataSourcePage()->setDataSource(
formWidget->dataSourceMimeType(), formWidget->dataSource().latin1());
@@ -218,15 +218,15 @@ void KexiFormManager::slotHistoryCommandExecuted()
}
/*
-bool KexiFormManager::loadFormFromDomInternal(Form *form, QWidget *container, QDomDocument &inBuf)
+bool KexiFormManager::loadFormFromDomInternal(Form *form, TQWidget *container, TQDomDocument &inBuf)
{
- QMap<QCString,QString> customProperties;
+ TQMap<TQCString,TQString> customProperties;
FormIO::loadFormFromDom(myform, container, domDoc, &customProperties);
}
-bool KexiFormManager::saveFormToStringInternal(Form *form, QString &dest, int indent)
+bool KexiFormManager::saveFormToStringInternal(Form *form, TQString &dest, int indent)
{
- QMap<QCString,QString> customProperties;
+ TQMap<TQCString,TQString> customProperties;
return KFormDesigner::FormIO::saveFormToString(form, dest, indent, &customProperties);
}
diff --git a/kexi/plugins/forms/kexiformmanager.h b/kexi/plugins/forms/kexiformmanager.h
index 1cc5f0c6..d25cf78e 100644
--- a/kexi/plugins/forms/kexiformmanager.h
+++ b/kexi/plugins/forms/kexiformmanager.h
@@ -31,9 +31,10 @@ class KexiFormView;
class KEXIFORMUTILS_EXPORT KexiFormManager : public KFormDesigner::FormManager
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiFormManager(KexiPart::Part *parent, const char* name = 0);
+ KexiFormManager(KexiPart::Part *tqparent, const char* name = 0);
virtual ~KexiFormManager();
virtual KAction* action( const char* name );
@@ -41,7 +42,7 @@ class KEXIFORMUTILS_EXPORT KexiFormManager : public KFormDesigner::FormManager
public slots:
//! Receives signal from KexiDataSourcePage about changed form's data source
- void setFormDataSource(const QCString& mime, const QCString& name);
+ void setFormDataSource(const TQCString& mime, const TQCString& name);
/*! Receives signal from KexiDataSourcePage about changed widget's data source.
This is because we couldn't pass objects like KexiDB::QueryColumnInfo.
@@ -49,34 +50,34 @@ class KEXIFORMUTILS_EXPORT KexiFormManager : public KFormDesigner::FormManager
Also sets following things in KexiDBAutoField:
- caption related to the data source
- data type related to the data source */
- void setDataSourceFieldOrExpression(const QString& string, const QString& caption,
+ void setDataSourceFieldOrExpression(const TQString& string, const TQString& caption,
KexiDB::Field::Type type);
/*! Receives signal from KexiDataSourcePage and inserts autofields onto the current form. */
- void insertAutoFields(const QString& sourceMimeType, const QString& sourceName,
- const QStringList& fields);
+ void insertAutoFields(const TQString& sourceMimeType, const TQString& sourceName,
+ const TQStringList& fields);
protected slots:
void slotHistoryCommandExecuted();
protected:
- inline QString translateName( const char* name ) const;
+ inline TQString translateName( const char* name ) const;
private:
//! Helper: return active form's view widget or 0 if there's no active form having such widget
KexiFormView* activeFormViewWidget() const;
-// virtual bool loadFormFromDomInternal(Form *form, QWidget *container, QDomDocument &inBuf);
-// virtual bool saveFormToStringInternal(Form *form, QString &dest, int indent = 0);
+// virtual bool loadFormFromDomInternal(Form *form, TQWidget *container, TQDomDocument &inBuf);
+// virtual bool saveFormToStringInternal(Form *form, TQString &dest, int indent = 0);
KexiPart::Part* m_part;
};
-QString KexiFormManager::translateName( const char* name ) const
+TQString KexiFormManager::translateName( const char* name ) const
{
- QString n( name );
+ TQString n( name );
//translate to our name space:
- if (n.startsWith("align_") || n.startsWith("adjust_") || n.startsWith("layout_")
+ if (n.startsWith("align_") || n.startsWith("adjust_") || n.startsWith("tqlayout_")
|| n=="format_raise" || n=="format_raise" || n=="taborder" | n=="break_layout")
{
n.prepend("formpart_");
diff --git a/kexi/plugins/forms/kexiformpart.cpp b/kexi/plugins/forms/kexiformpart.cpp
index 8693cb5b..2486416e 100644
--- a/kexi/plugins/forms/kexiformpart.cpp
+++ b/kexi/plugins/forms/kexiformpart.cpp
@@ -71,14 +71,14 @@ class KexiFormPart::Private
delete static_cast<KFormDesigner::ObjectTreeView*>(objectTreeView);
delete static_cast<KexiDataSourcePage*>(dataSourcePage);
}
-// QGuardedPtr<KFormDesigner::FormManager> manager;
- QGuardedPtr<KFormDesigner::ObjectTreeView> objectTreeView;
- QGuardedPtr<KexiDataSourcePage> dataSourcePage;
+// TQGuardedPtr<KFormDesigner::FormManager> manager;
+ TQGuardedPtr<KFormDesigner::ObjectTreeView> objectTreeView;
+ TQGuardedPtr<KexiDataSourcePage> dataSourcePage;
KexiDataSourceComboBox *dataSourceCombo;
};
-KexiFormPart::KexiFormPart(QObject *parent, const char *name, const QStringList &l)
- : KexiPart::Part(parent, name, l)
+KexiFormPart::KexiFormPart(TQObject *tqparent, const char *name, const TQStringList &l)
+ : KexiPart::Part(tqparent, name, l)
, d(new Private())
{
// REGISTERED ID:
@@ -102,18 +102,18 @@ KexiFormPart::KexiFormPart(QObject *parent, const char *name, const QStringList
// Create and store a handle to forms' library. Reports will have their own library too.
/* @todo add configuration for supported factory groups */
- QStringList supportedFactoryGroups;
+ TQStringList supportedFactoryGroups;
supportedFactoryGroups += "kexi";
static_formsLibrary = KFormDesigner::FormManager::createWidgetLibrary(
formManager, supportedFactoryGroups);
static_formsLibrary->setAdvancedPropertiesVisible(false);
- connect(static_formsLibrary, SIGNAL(widgetCreated(QWidget*)),
- this, SLOT(slotWidgetCreatedByFormsLibrary(QWidget*)));
+ connect(static_formsLibrary, TQT_SIGNAL(widgetCreated(TQWidget*)),
+ this, TQT_SLOT(slotWidgetCreatedByFormsLibrary(TQWidget*)));
- connect(KFormDesigner::FormManager::self()->propertySet(), SIGNAL(widgetPropertyChanged(QWidget *, const QCString &, const QVariant&)),
- this, SLOT(slotPropertyChanged(QWidget *, const QCString &, const QVariant&)));
- connect(KFormDesigner::FormManager::self(), SIGNAL(autoTabStopsSet(KFormDesigner::Form*,bool)),
- this, SLOT(slotAutoTabStopsSet(KFormDesigner::Form*,bool)));
+ connect(KFormDesigner::FormManager::self()->propertySet(), TQT_SIGNAL(widgetPropertyChanged(TQWidget *, const TQCString &, const TQVariant&)),
+ this, TQT_SLOT(slotPropertyChanged(TQWidget *, const TQCString &, const TQVariant&)));
+ connect(KFormDesigner::FormManager::self(), TQT_SIGNAL(autoTabStopsSet(KFormDesigner::Form*,bool)),
+ this, TQT_SLOT(slotAutoTabStopsSet(KFormDesigner::Form*,bool)));
}
KexiFormPart::~KexiFormPart()
@@ -143,8 +143,8 @@ void KexiFormPart::initInstanceActions( int mode, KActionCollection *col )
{
if (mode==Kexi::DesignViewMode) {
KFormDesigner::FormManager::self()->createActions(col, 0);
- new KAction(i18n("Edit Tab Order..."), "tab_order", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(editTabOrder()), col, "taborder");
- new KAction(i18n("Adjust Size"), "viewmagfit", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(ajustWidgetSize()), col, "adjust");
+ new KAction(i18n("Edit Tab Order..."), "tab_order", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(editTabOrder()), col, "taborder");
+ new KAction(i18n("Adjust Size"), "viewmagfit", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(ajustWidgetSize()), col, "adjust");
}
//TODO
}
@@ -152,7 +152,7 @@ void KexiFormPart::initInstanceActions( int mode, KActionCollection *col )
void KexiFormPart::initPartActions()
{
-// new KAction(i18n("Show Form UI Code"), "show_form_ui", CTRL+Key_U, m_manager, SLOT(showFormUICode()),
+// new KAction(i18n("Show Form UI Code"), "show_form_ui", CTRL+Key_U, m_manager, TQT_SLOT(showFormUICode()),
// guiClient()->actionCollection(), "show_form_ui");
}
@@ -162,7 +162,7 @@ void KexiFormPart::initInstanceActions()
kapp->config()->setGroup("General");
if (kapp->config()->readBoolEntry("showInternalDebugger", false)) {
new KAction(i18n("Show Form UI Code"), "compfile",
- CTRL+Key_U, KFormDesigner::FormManager::self(), SLOT(showFormUICode()),
+ CTRL+Key_U, KFormDesigner::FormManager::self(), TQT_SLOT(showFormUICode()),
actionCollectionForMode(Kexi::DesignViewMode), "show_form_ui");
}
#endif
@@ -171,7 +171,7 @@ void KexiFormPart::initInstanceActions()
KFormDesigner::FormManager::self()->createActions( library(), col, (KXMLGUIClient*)col->parentGUIClient() ); //guiClient() );
//connect actions provided by widget factories
- connect( col->action("widget_assign_action"), SIGNAL(activated()), this, SLOT(slotAssignAction()));
+ connect( col->action("widget_assign_action"), TQT_SIGNAL(activated()), this, TQT_SLOT(slotAssignAction()));
createSharedAction(Kexi::DesignViewMode, i18n("Clear Widget Contents"), "editclear", 0, "formpart_clear_contents");
createSharedAction(Kexi::DesignViewMode, i18n("Edit Tab Order..."), "tab_order", 0, "formpart_taborder");
@@ -184,23 +184,23 @@ void KexiFormPart::initInstanceActions()
KActionMenu *menu = static_cast<KActionMenu*>(action);
menu->insert( createSharedAction(Kexi::DesignViewMode, i18n("&Horizontally"),
- QString::null, 0, "formpart_layout_hbox"));
+ TQString(), 0, "formpart_layout_hbox"));
menu->insert( createSharedAction(Kexi::DesignViewMode, i18n("&Vertically"),
- QString::null, 0, "formpart_layout_vbox"));
+ TQString(), 0, "formpart_layout_vbox"));
menu->insert( createSharedAction(Kexi::DesignViewMode, i18n("In &Grid"),
- QString::null, 0, "formpart_layout_grid"));
+ TQString(), 0, "formpart_layout_grid"));
#ifdef KEXI_SHOW_SPLITTER_WIDGET
menu->insert( createSharedAction(Kexi::DesignViewMode, i18n("Horizontally in &Splitter"),
- QString::null, 0, "formpart_layout_hsplitter"));
+ TQString(), 0, "formpart_layout_hsplitter"));
menu->insert( createSharedAction(Kexi::DesignViewMode, i18n("Verti&cally in Splitter"),
- QString::null, 0, "formpart_layout_vsplitter"));
+ TQString(), 0, "formpart_layout_vsplitter"));
#endif
- createSharedAction(Kexi::DesignViewMode, i18n("&Break Layout"), QString::null, 0, "formpart_break_layout");
+ createSharedAction(Kexi::DesignViewMode, i18n("&Break Layout"), TQString(), 0, "formpart_break_layout");
/*
- createSharedAction(Kexi::DesignViewMode, i18n("Lay Out Widgets &Horizontally"), QString::null, 0, "formpart_layout_hbox");
- createSharedAction(Kexi::DesignViewMode, i18n("Lay Out Widgets &Vertically"), QString::null, 0, "formpart_layout_vbox");
- createSharedAction(Kexi::DesignViewMode, i18n("Lay Out Widgets in &Grid"), QString::null, 0, "formpart_layout_grid");
+ createSharedAction(Kexi::DesignViewMode, i18n("Lay Out Widgets &Horizontally"), TQString(), 0, "formpart_layout_hbox");
+ createSharedAction(Kexi::DesignViewMode, i18n("Lay Out Widgets &Vertically"), TQString(), 0, "formpart_layout_vbox");
+ createSharedAction(Kexi::DesignViewMode, i18n("Lay Out Widgets in &Grid"), TQString(), 0, "formpart_layout_grid");
*/
createSharedAction(Kexi::DesignViewMode, i18n("Bring Widget to Front"), "raise", 0, "formpart_format_raise");
createSharedAction(Kexi::DesignViewMode, i18n("Send Widget to Back"), "lower", 0, "formpart_format_lower");
@@ -230,11 +230,11 @@ void KexiFormPart::initInstanceActions()
KexiDialogTempData*
KexiFormPart::createTempData(KexiDialogBase* dialog)
{
- return new KexiFormPart::TempData(dialog);
+ return new KexiFormPart::TempData(TQT_TQOBJECT(dialog));
}
-KexiViewBase* KexiFormPart::createView(QWidget *parent, KexiDialogBase* dialog,
- KexiPart::Item &item, int viewMode, QMap<QString,QString>*)
+KexiViewBase* KexiFormPart::createView(TQWidget *tqparent, KexiDialogBase* dialog,
+ KexiPart::Item &item, int viewMode, TQMap<TQString,TQString>*)
{
Q_UNUSED( viewMode );
@@ -243,60 +243,60 @@ KexiViewBase* KexiFormPart::createView(QWidget *parent, KexiDialogBase* dialog,
if (!win || !win->project() || !win->project()->dbConnection())
return 0;
- KexiFormView *view = new KexiFormView(win, parent, item.name().latin1(),
+ KexiFormView *view = new KexiFormView(win, tqparent, item.name().latin1(),
win->project()->dbConnection() );
return view;
}
void
-KexiFormPart::generateForm(KexiDB::FieldList *list, QDomDocument &domDoc)
+KexiFormPart::generateForm(KexiDB::FieldList *list, TQDomDocument &domDoc)
{
//this form generates a .ui from FieldList list
//basically that is a Label and a LineEdit for each field
- domDoc = QDomDocument("UI");
- QDomElement uiElement = domDoc.createElement("UI");
+ domDoc = TQDomDocument("UI");
+ TQDomElement uiElement = domDoc.createElement("UI");
domDoc.appendChild(uiElement);
uiElement.setAttribute("version", "3.1");
uiElement.setAttribute("stdsetdef", 1);
- QDomElement baseClass = domDoc.createElement("class");
+ TQDomElement baseClass = domDoc.createElement("class");
uiElement.appendChild(baseClass);
- QDomText baseClassV = domDoc.createTextNode("QWidget");
+ TQDomText baseClassV = domDoc.createTextNode(TQWIDGET_OBJECT_NAME_STRING);
baseClass.appendChild(baseClassV);
- QDomElement baseWidget = domDoc.createElement("widget");
- baseWidget.setAttribute("class", "QWidget");
+ TQDomElement baseWidget = domDoc.createElement("widget");
+ baseWidget.setAttribute("class", TQWIDGET_OBJECT_NAME_STRING);
int y=0;
for(unsigned int i=0; i < list->fieldCount(); i++)
{
- QDomElement lclass = domDoc.createElement("widget");
+ TQDomElement lclass = domDoc.createElement("widget");
baseWidget.appendChild(lclass);
- lclass.setAttribute("class", "QLabel");
- QDomElement lNameProperty = domDoc.createElement("property");
+ lclass.setAttribute("class", TQLABEL_OBJECT_NAME_STRING);
+ TQDomElement lNameProperty = domDoc.createElement("property");
lNameProperty.setAttribute("name", "name");
- QDomElement lType = domDoc.createElement("cstring");
- QDomText lClassN = domDoc.createTextNode(QString("l%1").arg(list->field(i)->name()));
+ TQDomElement lType = domDoc.createElement("cstring");
+ TQDomText lClassN = domDoc.createTextNode(TQString("l%1").tqarg(list->field(i)->name()));
lType.appendChild(lClassN);
lNameProperty.appendChild(lType);
lclass.appendChild(lNameProperty);
- QDomElement gNameProperty = domDoc.createElement("property");
+ TQDomElement gNameProperty = domDoc.createElement("property");
gNameProperty.setAttribute("name", "geometry");
- QDomElement lGType = domDoc.createElement("rect");
+ TQDomElement lGType = domDoc.createElement("rect");
- QDomElement lx = domDoc.createElement("x");
- QDomText lxV = domDoc.createTextNode("10");
+ TQDomElement lx = domDoc.createElement("x");
+ TQDomText lxV = domDoc.createTextNode("10");
lx.appendChild(lxV);
- QDomElement ly = domDoc.createElement("y");
- QDomText lyV = domDoc.createTextNode(QString::number(y + 10));
+ TQDomElement ly = domDoc.createElement("y");
+ TQDomText lyV = domDoc.createTextNode(TQString::number(y + 10));
ly.appendChild(lyV);
- QDomElement lWidth = domDoc.createElement("width");
- QDomText lWidthV = domDoc.createTextNode("100");
+ TQDomElement lWidth = domDoc.createElement("width");
+ TQDomText lWidthV = domDoc.createTextNode("100");
lWidth.appendChild(lWidthV);
- QDomElement lHeight = domDoc.createElement("height");
- QDomText lHeightV = domDoc.createTextNode("20");
+ TQDomElement lHeight = domDoc.createElement("height");
+ TQDomText lHeightV = domDoc.createTextNode("20");
lHeight.appendChild(lHeightV);
lGType.appendChild(lx);
@@ -307,10 +307,10 @@ KexiFormPart::generateForm(KexiDB::FieldList *list, QDomDocument &domDoc)
gNameProperty.appendChild(lGType);
lclass.appendChild(gNameProperty);
- QDomElement tNameProperty = domDoc.createElement("property");
+ TQDomElement tNameProperty = domDoc.createElement("property");
tNameProperty.setAttribute("name", "text");
- QDomElement lTType = domDoc.createElement("string");
- QDomText lTextV = domDoc.createTextNode(list->field(i)->name());
+ TQDomElement lTType = domDoc.createElement("string");
+ TQDomText lTextV = domDoc.createTextNode(list->field(i)->name());
lTType.appendChild(lTextV);
tNameProperty.appendChild(lTType);
lclass.appendChild(tNameProperty);
@@ -319,32 +319,32 @@ KexiFormPart::generateForm(KexiDB::FieldList *list, QDomDocument &domDoc)
///line edit!
- QDomElement vclass = domDoc.createElement("widget");
+ TQDomElement vclass = domDoc.createElement("widget");
baseWidget.appendChild(vclass);
vclass.setAttribute("class", "KLineEdit");
- QDomElement vNameProperty = domDoc.createElement("property");
+ TQDomElement vNameProperty = domDoc.createElement("property");
vNameProperty.setAttribute("name", "name");
- QDomElement vType = domDoc.createElement("cstring");
- QDomText vClassN = domDoc.createTextNode(list->field(i)->name());
+ TQDomElement vType = domDoc.createElement("cstring");
+ TQDomText vClassN = domDoc.createTextNode(list->field(i)->name());
vType.appendChild(vClassN);
vNameProperty.appendChild(vType);
vclass.appendChild(vNameProperty);
- QDomElement vgNameProperty = domDoc.createElement("property");
+ TQDomElement vgNameProperty = domDoc.createElement("property");
vgNameProperty.setAttribute("name", "geometry");
- QDomElement vGType = domDoc.createElement("rect");
+ TQDomElement vGType = domDoc.createElement("rect");
- QDomElement vx = domDoc.createElement("x");
- QDomText vxV = domDoc.createTextNode("110");
+ TQDomElement vx = domDoc.createElement("x");
+ TQDomText vxV = domDoc.createTextNode("110");
vx.appendChild(vxV);
- QDomElement vy = domDoc.createElement("y");
- QDomText vyV = domDoc.createTextNode(QString::number(y + 10));
+ TQDomElement vy = domDoc.createElement("y");
+ TQDomText vyV = domDoc.createTextNode(TQString::number(y + 10));
vy.appendChild(vyV);
- QDomElement vWidth = domDoc.createElement("width");
- QDomText vWidthV = domDoc.createTextNode("200");
+ TQDomElement vWidth = domDoc.createElement("width");
+ TQDomText vWidthV = domDoc.createTextNode("200");
vWidth.appendChild(vWidthV);
- QDomElement vHeight = domDoc.createElement("height");
- QDomText vHeightV = domDoc.createTextNode("20");
+ TQDomElement vHeight = domDoc.createElement("height");
+ TQDomText vHeightV = domDoc.createTextNode("20");
vHeight.appendChild(vHeightV);
vGType.appendChild(vx);
@@ -358,29 +358,29 @@ KexiFormPart::generateForm(KexiDB::FieldList *list, QDomDocument &domDoc)
y += 20;
}
- QDomElement lNameProperty = domDoc.createElement("property");
+ TQDomElement lNameProperty = domDoc.createElement("property");
lNameProperty.setAttribute("name", "name");
- QDomElement lType = domDoc.createElement("cstring");
- QDomText lClassN = domDoc.createTextNode("DBForm");
+ TQDomElement lType = domDoc.createElement("cstring");
+ TQDomText lClassN = domDoc.createTextNode("DBForm");
lType.appendChild(lClassN);
lNameProperty.appendChild(lType);
baseWidget.appendChild(lNameProperty);
- QDomElement wNameProperty = domDoc.createElement("property");
+ TQDomElement wNameProperty = domDoc.createElement("property");
wNameProperty.setAttribute("name", "geometry");
- QDomElement wGType = domDoc.createElement("rect");
+ TQDomElement wGType = domDoc.createElement("rect");
- QDomElement wx = domDoc.createElement("x");
- QDomText wxV = domDoc.createTextNode("0");
+ TQDomElement wx = domDoc.createElement("x");
+ TQDomText wxV = domDoc.createTextNode("0");
wx.appendChild(wxV);
- QDomElement wy = domDoc.createElement("y");
- QDomText wyV = domDoc.createTextNode("0");
+ TQDomElement wy = domDoc.createElement("y");
+ TQDomText wyV = domDoc.createTextNode("0");
wy.appendChild(wyV);
- QDomElement wWidth = domDoc.createElement("width");
- QDomText wWidthV = domDoc.createTextNode("340");
+ TQDomElement wWidth = domDoc.createElement("width");
+ TQDomText wWidthV = domDoc.createTextNode("340");
wWidth.appendChild(wWidthV);
- QDomElement wHeight = domDoc.createElement("height");
- QDomText wHeightV = domDoc.createTextNode(QString::number(y + 30));
+ TQDomElement wHeight = domDoc.createElement("height");
+ TQDomText wHeightV = domDoc.createTextNode(TQString::number(y + 30));
wHeight.appendChild(wHeightV);
wGType.appendChild(wx);
@@ -400,7 +400,7 @@ void KexiFormPart::slotAutoTabStopsSet(KFormDesigner::Form *form, bool set)
KoProperty::Property &p = (*KFormDesigner::FormManager::self()->propertySet())["autoTabStops"];
if (!p.isNull())
- p.setValue(QVariant(set, 4));
+ p.setValue(TQVariant(set, 4));
}
void KexiFormPart::slotAssignAction()
@@ -424,15 +424,15 @@ void KexiFormPart::slotAssignAction()
KexiFormScrollView *scrollViewWidget = dynamic_cast<KexiFormScrollView*>(dbform->dataAwareObject());
if (!scrollViewWidget)
return;
- KexiFormView* formViewWidget = dynamic_cast<KexiFormView*>(scrollViewWidget->parent());
+ KexiFormView* formViewWidget = dynamic_cast<KexiFormView*>(scrollViewWidget->tqparent());
if (!formViewWidget)
return;
- KexiMainWindow * mainWin = formViewWidget->parentDialog()->mainWin();
+ KexiMainWindow * mainWin = formViewWidget->tqparentDialog()->mainWin();
KexiActionSelectionDialog dlg(mainWin, dbform, data,
propSet->property("name").value().toCString());
- if(dlg.exec() == QDialog::Accepted) {
+ if(dlg.exec() == TQDialog::Accepted) {
data = dlg.currentAction();
//update property value
propSet->property("onClickAction").setValue(data.string);
@@ -440,8 +440,8 @@ void KexiFormPart::slotAssignAction()
}
}
-QString
-KexiFormPart::i18nMessage(const QCString& englishMessage, KexiDialogBase* dlg) const
+TQString
+KexiFormPart::i18nMessage(const TQCString& englishMessage, KexiDialogBase* dlg) const
{
Q_UNUSED(dlg);
if (englishMessage=="Design of object \"%1\" has been modified.")
@@ -453,21 +453,21 @@ KexiFormPart::i18nMessage(const QCString& englishMessage, KexiDialogBase* dlg) c
}
void
-KexiFormPart::slotPropertyChanged(QWidget *w, const QCString &name, const QVariant &value)
+KexiFormPart::slotPropertyChanged(TQWidget *w, const TQCString &name, const TQVariant &value)
{
Q_UNUSED( w );
if (!KFormDesigner::FormManager::self()->activeForm())
return;
if (name == "autoTabStops") {
- //QWidget *w = KFormDesigner::FormManager::self()->activeForm()->selectedWidget();
+ //TQWidget *w = KFormDesigner::FormManager::self()->activeForm()->selectedWidget();
//update autoTabStops setting at KFD::Form level
KFormDesigner::FormManager::self()->activeForm()->setAutoTabStops( value.toBool() );
}
if (KFormDesigner::FormManager::self()->activeForm()->widget() && name == "geometry") {
//fall back to sizeInternal property....
- if (KFormDesigner::FormManager::self()->propertySet()->contains("sizeInternal"))
- KFormDesigner::FormManager::self()->propertySet()->property("sizeInternal").setValue(value.toRect().size());
+ if (KFormDesigner::FormManager::self()->propertySet()->tqcontains("sizeInternal"))
+ KFormDesigner::FormManager::self()->propertySet()->property("sizeInternal").setValue(TQSize(value.toRect().size()));
}
}
@@ -488,14 +488,14 @@ void KexiFormPart::setupCustomPropertyPanelTabs(KTabWidget *tab, KexiMainWindow*
d->objectTreeView = new KFormDesigner::ObjectTreeView(0, "KexiFormPart:ObjectTreeView");
KFormDesigner::FormManager::self()->setObjectTreeView(d->objectTreeView); //important: assign to manager
d->dataSourcePage = new KexiDataSourcePage(0, "dataSourcePage");
- connect(d->dataSourcePage, SIGNAL(jumpToObjectRequested(const QCString&, const QCString&)),
- mainWin, SLOT(highlightObject(const QCString&, const QCString&)));
- connect(d->dataSourcePage, SIGNAL(formDataSourceChanged(const QCString&, const QCString&)),
- KFormDesigner::FormManager::self(), SLOT(setFormDataSource(const QCString&, const QCString&)));
- connect(d->dataSourcePage, SIGNAL(dataSourceFieldOrExpressionChanged(const QString&, const QString&, KexiDB::Field::Type)),
- KFormDesigner::FormManager::self(), SLOT(setDataSourceFieldOrExpression(const QString&, const QString&, KexiDB::Field::Type)));
- connect(d->dataSourcePage, SIGNAL(insertAutoFields(const QString&, const QString&, const QStringList&)),
- KFormDesigner::FormManager::self(), SLOT(insertAutoFields(const QString&, const QString&, const QStringList&)));
+ connect(d->dataSourcePage, TQT_SIGNAL(jumpToObjectRequested(const TQCString&, const TQCString&)),
+ mainWin, TQT_SLOT(highlightObject(const TQCString&, const TQCString&)));
+ connect(d->dataSourcePage, TQT_SIGNAL(formDataSourceChanged(const TQCString&, const TQCString&)),
+ KFormDesigner::FormManager::self(), TQT_SLOT(setFormDataSource(const TQCString&, const TQCString&)));
+ connect(d->dataSourcePage, TQT_SIGNAL(dataSourceFieldOrExpressionChanged(const TQString&, const TQString&, KexiDB::Field::Type)),
+ KFormDesigner::FormManager::self(), TQT_SLOT(setDataSourceFieldOrExpression(const TQString&, const TQString&, KexiDB::Field::Type)));
+ connect(d->dataSourcePage, TQT_SIGNAL(insertAutoFields(const TQString&, const TQString&, const TQStringList&)),
+ KFormDesigner::FormManager::self(), TQT_SLOT(insertAutoFields(const TQString&, const TQString&, const TQStringList&)));
}
KexiProject *prj = mainWin->project();
@@ -508,28 +508,28 @@ void KexiFormPart::setupCustomPropertyPanelTabs(KTabWidget *tab, KexiMainWindow*
tab->setTabToolTip( d->objectTreeView, i18n("Widgets"));
}
-void KexiFormPart::slotWidgetCreatedByFormsLibrary(QWidget* widget)
+void KexiFormPart::slotWidgetCreatedByFormsLibrary(TQWidget* widget)
{
- QStrList signalNames(widget->metaObject()->signalNames());
+ TQStrList signalNames(widget->tqmetaObject()->signalNames());
if (!signalNames.isEmpty()) {
- const char *handleDragMoveEventSignal = "handleDragMoveEvent(QDragMoveEvent*)";
- const char *handleDropEventSignal = "handleDropEvent(QDropEvent*)";
+ const char *handleDragMoveEventSignal = "handleDragMoveEvent(TQDragMoveEvent*)";
+ const char *handleDropEventSignal = "handleDropEvent(TQDropEvent*)";
- for (QStrListIterator it(signalNames); it.current(); ++it) {
+ for (TQStrListIterator it(signalNames); it.current(); ++it) {
if (0==qstrcmp(it.current(), handleDragMoveEventSignal)) {
kdDebug() << it.current() << endl;
KexiFormView *formView = KexiUtils::findParent<KexiFormView>(widget, "KexiFormView");
if (formView) {
- connect(widget, SIGNAL(handleDragMoveEvent(QDragMoveEvent*)),
- formView, SLOT(slotHandleDragMoveEvent(QDragMoveEvent*)));
+ connect(widget, TQT_SIGNAL(handleDragMoveEvent(TQDragMoveEvent*)),
+ formView, TQT_SLOT(slotHandleDragMoveEvent(TQDragMoveEvent*)));
}
}
else if (0==qstrcmp(it.current(), handleDropEventSignal)) {
kdDebug() << it.current() << endl;
KexiFormView *formView = KexiUtils::findParent<KexiFormView>(widget, "KexiFormView");
if (formView) {
- connect(widget, SIGNAL(handleDropEvent(QDropEvent*)),
- formView, SLOT(slotHandleDropEvent(QDropEvent*)));
+ connect(widget, TQT_SIGNAL(handleDropEvent(TQDropEvent*)),
+ formView, TQT_SLOT(slotHandleDropEvent(TQDropEvent*)));
}
}
}
@@ -538,8 +538,8 @@ void KexiFormPart::slotWidgetCreatedByFormsLibrary(QWidget* widget)
//----------------
-KexiFormPart::TempData::TempData(QObject* parent)
- : KexiDialogTempData(parent)
+KexiFormPart::TempData::TempData(TQObject* tqparent)
+ : KexiDialogTempData(tqparent)
{
}
diff --git a/kexi/plugins/forms/kexiformpart.h b/kexi/plugins/forms/kexiformpart.h
index 1ddbab53..df5c6b53 100644
--- a/kexi/plugins/forms/kexiformpart.h
+++ b/kexi/plugins/forms/kexiformpart.h
@@ -22,8 +22,8 @@
#ifndef KEXIFORMPART_H
#define KEXIFORMPART_H
-#include <qdom.h>
-#include <qcstring.h>
+#include <tqdom.h>
+#include <tqcstring.h>
#include <kexi.h>
#include <kexipart.h>
@@ -49,9 +49,10 @@ class KexiDataSourcePage;
class KEXIFORMUTILS_EXPORT KexiFormPart : public KexiPart::Part
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiFormPart(QObject *parent, const char *name, const QStringList &);
+ KexiFormPart(TQObject *tqparent, const char *name, const TQStringList &);
virtual ~KexiFormPart();
//! \return a pointer to Forms Widget Library.
@@ -59,33 +60,33 @@ class KEXIFORMUTILS_EXPORT KexiFormPart : public KexiPart::Part
KexiDataSourcePage* dataSourcePage() const;
- void generateForm(KexiDB::FieldList *list, QDomDocument &domDoc);
+ void generateForm(KexiDB::FieldList *list, TQDomDocument &domDoc);
class TempData : public KexiDialogTempData
{
public:
- TempData(QObject* parent);
+ TempData(TQObject* tqparent);
~TempData();
- QGuardedPtr<KFormDesigner::Form> form;
- QGuardedPtr<KFormDesigner::Form> previewForm;
- QString tempForm;
- QPoint scrollViewContentsPos; //!< to preserve contents pos after switching to other view
+ TQGuardedPtr<KFormDesigner::Form> form;
+ TQGuardedPtr<KFormDesigner::Form> previewForm;
+ TQString tempForm;
+ TQPoint scrollViewContentsPos; //!< to preserve contents pos after switching to other view
int resizeMode; //!< form's window's resize mode -one of KexiFormView::ResizeMode items
//! Used in KexiFormView::setUnsavedLocalBLOBs()
- QMap<QWidget*, KexiBLOBBuffer::Id_t> unsavedLocalBLOBs;
+ TQMap<TQWidget*, KexiBLOBBuffer::Id_t> unsavedLocalBLOBs;
//! Used when loading a form from (temporary) XML in Data View
//! to get unsaved blobs collected at design mode.
- QMap<QCString, KexiBLOBBuffer::Id_t> unsavedLocalBLOBsByName;
+ TQMap<TQCString, KexiBLOBBuffer::Id_t> unsavedLocalBLOBsByName;
};
- virtual QString i18nMessage(const QCString& englishMessage,
+ virtual TQString i18nMessage(const TQCString& englishMessage,
KexiDialogBase* dlg) const;
protected:
virtual KexiDialogTempData* createTempData(KexiDialogBase* dialog);
- virtual KexiViewBase* createView(QWidget *parent, KexiDialogBase* dialog,
- KexiPart::Item &item, int viewMode = Kexi::DataViewMode, QMap<QString,QString>* staticObjectArgs = 0);
+ virtual KexiViewBase* createView(TQWidget *tqparent, KexiDialogBase* dialog,
+ KexiPart::Item &item, int viewMode = Kexi::DataViewMode, TQMap<TQString,TQString>* staticObjectArgs = 0);
virtual void initPartActions();
virtual void initInstanceActions();
@@ -96,8 +97,8 @@ class KEXIFORMUTILS_EXPORT KexiFormPart : public KexiPart::Part
protected slots:
void slotAutoTabStopsSet(KFormDesigner::Form *form, bool set);
void slotAssignAction();
- void slotPropertyChanged(QWidget *widget, const QCString &name, const QVariant &value);
- void slotWidgetCreatedByFormsLibrary(QWidget* widget);
+ void slotPropertyChanged(TQWidget *widget, const TQCString &name, const TQVariant &value);
+ void slotWidgetCreatedByFormsLibrary(TQWidget* widget);
private:
class Private;
diff --git a/kexi/plugins/forms/kexiformscrollview.cpp b/kexi/plugins/forms/kexiformscrollview.cpp
index 351a1e3e..2ddcb123 100644
--- a/kexi/plugins/forms/kexiformscrollview.cpp
+++ b/kexi/plugins/forms/kexiformscrollview.cpp
@@ -30,8 +30,8 @@
#include <kpopupmenu.h>
#include <kdebug.h>
-KexiFormScrollView::KexiFormScrollView(QWidget *parent, bool preview)
- : KexiScrollView(parent, preview)
+KexiFormScrollView::KexiFormScrollView(TQWidget *tqparent, bool preview)
+ : KexiScrollView(tqparent, preview)
, KexiRecordNavigatorHandler()
, KexiSharedActionClient()
, KexiDataAwareObjectInterface()
@@ -49,7 +49,7 @@ KexiFormScrollView::KexiFormScrollView(QWidget *parent, bool preview)
// recordNavigator()->showEditingIndicator(true);
}
- connect(this, SIGNAL(resizingStarted()), this, SLOT(slotResizingStarted()));
+ connect(this, TQT_SIGNAL(resizingStarted()), this, TQT_SLOT(slotResizingStarted()));
m_popupMenu = new KPopupMenu(this, "contextMenu");
@@ -71,7 +71,7 @@ KexiFormScrollView::show()
#if 0 //moved to KexiFormView, OK?
//now get resize mode settings for entire form
if (m_preview) {
- KexiFormView* fv = dynamic_cast<KexiFormView*>(parent());
+ KexiFormView* fv = dynamic_cast<KexiFormView*>(tqparent());
int resizeMode = fv ? fv->resizeMode() : KexiFormView::ResizeAuto;
if (resizeMode == KexiFormView::ResizeAuto)
setResizePolicy(AutoOneFit);
@@ -150,14 +150,14 @@ void KexiFormScrollView::moveToFirstRecordRequested()
selectFirstRow();
}
-void KexiFormScrollView::clearColumnsInternal(bool repaint)
+void KexiFormScrollView::clearColumnsInternal(bool tqrepaint)
{
- Q_UNUSED( repaint );
+ Q_UNUSED( tqrepaint );
//! @todo
}
-void KexiFormScrollView::addHeaderColumn(const QString& caption, const QString& description,
- const QIconSet& icon, int width)
+void KexiFormScrollView::addHeaderColumn(const TQString& caption, const TQString& description,
+ const TQIconSet& icon, int width)
{
Q_UNUSED( caption );
Q_UNUSED( description );
@@ -197,7 +197,7 @@ void KexiFormScrollView::updateGUIAfterSorting()
//! @todo
}
-void KexiFormScrollView::createEditor(int row, int col, const QString& addText,
+void KexiFormScrollView::createEditor(int row, int col, const TQString& addText,
bool removeOld)
{
Q_UNUSED( row );
@@ -238,7 +238,7 @@ void KexiFormScrollView::createEditor(int row, int col, const QString& addText,
updateWidgetContentsSize();
//refr. current and next row
// updateContents(columnPos(0), rowPos(row), viewport()->width(), d->rowHeight*2);
-//js: warning this breaks behaviour (cursor is skipping, etc.): qApp->processEvents(500);
+//js: warning this breaks behaviour (cursor is skipping, etc.): tqApp->processEvents(500);
// ensureVisible(columnPos(m_curCol), rowPos(row+1)+d->rowHeight-1, columnWidth(m_curCol), d->rowHeight);
// m_verticalHeader->setOffset(contentsY());
@@ -288,9 +288,9 @@ KexiDataItemInterface *KexiFormScrollView::editor( int col, bool ignoreMissingEd
return 0;
}
editor->hide();
- connect(editor,SIGNAL(editRequested()),this,SLOT(slotEditRequested()));
- connect(editor,SIGNAL(cancelRequested()),this,SLOT(cancelEditor()));
- connect(editor,SIGNAL(acceptRequested()),this,SLOT(acceptEditor()));
+ connect(editor,TQT_SIGNAL(editRequested()),this,TQT_SLOT(slotEditRequested()));
+ connect(editor,TQT_SIGNAL(cancelRequested()),this,TQT_SLOT(cancelEditor()));
+ connect(editor,TQT_SIGNAL(acceptRequested()),this,TQT_SLOT(acceptEditor()));
editor->resize(columnWidth(col)-1, rowHeight()-1);
editor->installEventFilter(this);
@@ -349,7 +349,7 @@ void KexiFormScrollView::slotRowRepaintRequested(KexiTableItem& item)
}
/*void KexiFormScrollView::slotAboutToDeleteRow(KexiTableItem& item,
- KexiDB::ResultInfo* result, bool repaint)
+ KexiDB::ResultInfo* result, bool tqrepaint)
{
//! @todo
}*/
@@ -359,22 +359,22 @@ void KexiFormScrollView::slotRowRepaintRequested(KexiTableItem& item)
//! @todo
}*/
-void KexiFormScrollView::slotRowInserted(KexiTableItem *item, bool repaint)
+void KexiFormScrollView::slotRowInserted(KexiTableItem *item, bool tqrepaint)
{
Q_UNUSED( item );
- Q_UNUSED( repaint );
+ Q_UNUSED( tqrepaint );
//! @todo
}
-void KexiFormScrollView::slotRowInserted(KexiTableItem *item, uint row, bool repaint)
+void KexiFormScrollView::slotRowInserted(KexiTableItem *item, uint row, bool tqrepaint)
{
Q_UNUSED( item );
Q_UNUSED( row );
- Q_UNUSED( repaint );
+ Q_UNUSED( tqrepaint );
//! @todo
}
-void KexiFormScrollView::slotRowsDeleted( const QValueList<int> & )
+void KexiFormScrollView::slotRowsDeleted( const TQValueList<int> & )
{
//! @todo
}
@@ -394,23 +394,23 @@ int KexiFormScrollView::columns() const
KexiFormDataItemInterface *item = dynamic_cast<KexiFormDataItemInterface*>(dbFormWidget()->orderedDataAwareWidgets()->at( col ));
if (!item)
return -1;
- KexiFormDataItemInterfaceToIntMap::ConstIterator it(m_fieldNumbersForDataItems.find( item ));
+ KexiFormDataItemInterfaceToIntMap::ConstIterator it(m_fieldNumbersForDataItems.tqfind( item ));
return it!=m_fieldNumbersForDataItems.constEnd() ? it.data() : -1;
}*/
bool KexiFormScrollView::columnEditable(int col)
{
kexipluginsdbg << "KexiFormScrollView::columnEditable(" << col << ")" << endl;
- foreach_list (QPtrListIterator<KexiFormDataItemInterface>, it, m_dataItems) {
- kexipluginsdbg << (dynamic_cast<QWidget*>(it.current()) ? dynamic_cast<QWidget*>(it.current())->name() : "" )
+ foreach_list (TQPtrListIterator<KexiFormDataItemInterface>, it, m_dataItems) {
+ kexipluginsdbg << (dynamic_cast<TQWidget*>(it.current()) ? dynamic_cast<TQWidget*>(it.current())->name() : "" )
<< " " << it.current()->dataSource() << endl;
}
kexipluginsdbg << "-- focus widgets --" << endl;
- foreach_list (QPtrListIterator<QWidget>, it, *dbFormWidget()->orderedFocusWidgets()) {
+ foreach_list (TQPtrListIterator<TQWidget>, it, *dbFormWidget()->orderedFocusWidgets()) {
kexipluginsdbg << it.current()->name() << endl;
}
kexipluginsdbg << "-- data-aware widgets --" << endl;
- foreach_list (QPtrListIterator<QWidget>, it, *dbFormWidget()->orderedDataAwareWidgets()) {
+ foreach_list (TQPtrListIterator<TQWidget>, it, *dbFormWidget()->orderedDataAwareWidgets()) {
kexipluginsdbg << it.current()->name() << endl;
}
@@ -421,7 +421,7 @@ bool KexiFormScrollView::columnEditable(int col)
if (!item || item->isReadOnly())
return false;
-// KexiFormDataItemInterfaceToIntMap::ConstIterator it(m_fieldNumbersForDataItems.find( item ));
+// KexiFormDataItemInterfaceToIntMap::ConstIterator it(m_fieldNumbersForDataItems.tqfind( item ));
// return KexiDataAwareObjectInterface::columnEditable( it!=m_fieldNumbersForDataItems.constEnd() ? it.data() : -1 );
return KexiDataAwareObjectInterface::columnEditable( col );
}
@@ -432,9 +432,9 @@ void KexiFormScrollView::valueChanged(KexiDataItemInterface* item)
return;
//only signal start editing when no row editing was started already
kexipluginsdbg << "** KexiFormScrollView::valueChanged(): editedItem="
- << (dbFormWidget()->editedItem ? dbFormWidget()->editedItem->value().toString() : QString::null)
+ << (dbFormWidget()->editedItem ? dbFormWidget()->editedItem->value().toString() : TQString())
<< ", "
- << (item ? item->value().toString() : QString::null)
+ << (item ? item->value().toString() : TQString())
<< endl;
if (dbFormWidget()->editedItem!=item) {
kexipluginsdbg << "**>>> dbFormWidget()->editedItem = dynamic_cast<KexiFormDataItemInterface*>(item)" << endl;
@@ -444,7 +444,7 @@ void KexiFormScrollView::valueChanged(KexiDataItemInterface* item)
fillDuplicatedDataItems(dynamic_cast<KexiFormDataItemInterface*>(item), item->value());
//value changed: clear 'default value' mode (e.g. a blue italic text)
- dynamic_cast<KexiFormDataItemInterface*>(item)->setDisplayDefaultValue(dynamic_cast<QWidget*>(item), false);
+ dynamic_cast<KexiFormDataItemInterface*>(item)->setDisplayDefaultValue(dynamic_cast<TQWidget*>(item), false);
}
bool KexiFormScrollView::cursorAtNewRow() const
@@ -497,7 +497,7 @@ bool KexiFormScrollView::cancelEditor()
const bool displayDefaultValue = shouldDisplayDefaultValueForItem(itemIface);
// now disable/enable "display default value" if needed (do it after setValue(), before setValue() turns it off)
if (itemIface->hasDisplayedDefaultValue() != displayDefaultValue)
- itemIface->setDisplayDefaultValue( dynamic_cast<QWidget*>(itemIface), displayDefaultValue );
+ itemIface->setDisplayDefaultValue( dynamic_cast<TQWidget*>(itemIface), displayDefaultValue );
fillDuplicatedDataItems(itemIface, m_editor->value());
@@ -507,17 +507,17 @@ bool KexiFormScrollView::cancelEditor()
void KexiFormScrollView::updateAfterCancelRowEdit()
{
- for (QPtrListIterator<KexiFormDataItemInterface> it(m_dataItems); it.current(); ++it) {
- if (dynamic_cast<QWidget*>(it.current())) {
+ for (TQPtrListIterator<KexiFormDataItemInterface> it(m_dataItems); it.current(); ++it) {
+ if (dynamic_cast<TQWidget*>(it.current())) {
kexipluginsdbg << "KexiFormScrollView::updateAfterCancelRowEdit(): "
- << dynamic_cast<QWidget*>(it.current())->className() << " "
- << dynamic_cast<QWidget*>(it.current())->name() << endl;
+ << dynamic_cast<TQWidget*>(it.current())->className() << " "
+ << dynamic_cast<TQWidget*>(it.current())->name() << endl;
}
KexiFormDataItemInterface *itemIface = it.current();
const bool displayDefaultValue = shouldDisplayDefaultValueForItem(itemIface);
itemIface->undoChanges();
if (itemIface->hasDisplayedDefaultValue() != displayDefaultValue)
- itemIface->setDisplayDefaultValue( dynamic_cast<QWidget*>(itemIface), displayDefaultValue );
+ itemIface->setDisplayDefaultValue( dynamic_cast<TQWidget*>(itemIface), displayDefaultValue );
}
recordNavigator()->showEditingIndicator(false);
dbFormWidget()->editedItem = 0;
@@ -549,15 +549,15 @@ void KexiFormScrollView::refreshContentsSize()
}
}
-void KexiFormScrollView::handleDataWidgetAction(const QString& actionName)
+void KexiFormScrollView::handleDataWidgetAction(const TQString& actionName)
{
- QWidget *w = focusWidget();
+ TQWidget *w = tqfocusWidget();
KexiFormDataItemInterface *item = 0;
while (w) {
item = dynamic_cast<KexiFormDataItemInterface*>(w);
if (item)
break;
- w = w->parentWidget();
+ w = w->tqparentWidget();
}
if (item)
item->handleAction(actionName);
diff --git a/kexi/plugins/forms/kexiformscrollview.h b/kexi/plugins/forms/kexiformscrollview.h
index 12315761..cf2731d1 100644
--- a/kexi/plugins/forms/kexiformscrollview.h
+++ b/kexi/plugins/forms/kexiformscrollview.h
@@ -47,10 +47,11 @@ class KEXIFORMUTILS_EXPORT KexiFormScrollView :
public KexiFormEventHandler
{
Q_OBJECT
+ TQ_OBJECT
KEXI_DATAAWAREOBJECTINTERFACE
public:
- KexiFormScrollView(QWidget *parent, bool preview);
+ KexiFormScrollView(TQWidget *tqparent, bool preview);
virtual ~KexiFormScrollView();
void setForm(KFormDesigner::Form *form) { m_form = form; }
@@ -78,7 +79,7 @@ class KEXIFORMUTILS_EXPORT KexiFormScrollView :
dbFormWidget()->orderedDataAwareWidgets()->at( col ));
if (!item)
return -1;
- KexiFormDataItemInterfaceToIntMap::ConstIterator it(m_fieldNumbersForDataItems.find( item ));
+ KexiFormDataItemInterfaceToIntMap::ConstIterator it(m_fieldNumbersForDataItems.tqfind( item ));
return it!=m_fieldNumbersForDataItems.constEnd() ? (int)it.data() : -1;
}
@@ -93,7 +94,7 @@ class KEXIFORMUTILS_EXPORT KexiFormScrollView :
virtual int lastVisibleRow() const;
/*! \return vertical scrollbar. Implemented for KexiDataAwareObjectInterface. */
- virtual QScrollBar* verticalScrollBar() const { return KexiScrollView::verticalScrollBar(); }
+ virtual TQScrollBar* verticalScrollBar() const { return KexiScrollView::verticalScrollBar(); }
public slots:
/*! Reimplemented to update resize policy. */
@@ -141,7 +142,7 @@ class KEXIFORMUTILS_EXPORT KexiFormScrollView :
signals:
virtual void itemChanged(KexiTableItem *, int row, int col);
- virtual void itemChanged(KexiTableItem *, int row, int col, QVariant oldValue);
+ virtual void itemChanged(KexiTableItem *, int row, int col, TQVariant oldValue);
virtual void itemDeleteRequest(KexiTableItem *, int row, int col);
virtual void currentItemDeleteRequest();
virtual void newItemAppendedForAfterDeletingInSpreadSheetMode(); //!< does nothing
@@ -161,19 +162,19 @@ class KEXIFORMUTILS_EXPORT KexiFormScrollView :
virtual void slotRowRepaintRequested(KexiTableItem& item);
//! Handles KexiTableViewData::aboutToDeleteRow() signal. Prepares info for slotRowDeleted().
- virtual void slotAboutToDeleteRow(KexiTableItem& item, KexiDB::ResultInfo* result, bool repaint)
- { KexiDataAwareObjectInterface::slotAboutToDeleteRow(item, result, repaint); }
+ virtual void slotAboutToDeleteRow(KexiTableItem& item, KexiDB::ResultInfo* result, bool tqrepaint)
+ { KexiDataAwareObjectInterface::slotAboutToDeleteRow(item, result, tqrepaint); }
- //! Handles KexiTableViewData::rowDeleted() signal to repaint when needed.
+ //! Handles KexiTableViewData::rowDeleted() signal to tqrepaint when needed.
virtual void slotRowDeleted() { KexiDataAwareObjectInterface::slotRowDeleted(); }
- //! Handles KexiTableViewData::rowInserted() signal to repaint when needed.
- virtual void slotRowInserted(KexiTableItem *item, bool repaint);
+ //! Handles KexiTableViewData::rowInserted() signal to tqrepaint when needed.
+ virtual void slotRowInserted(KexiTableItem *item, bool tqrepaint);
//! Like above, not db-aware version
- virtual void slotRowInserted(KexiTableItem *item, uint row, bool repaint);
+ virtual void slotRowInserted(KexiTableItem *item, uint row, bool tqrepaint);
- virtual void slotRowsDeleted( const QValueList<int> & );
+ virtual void slotRowsDeleted( const TQValueList<int> & );
virtual void slotDataDestroying() { KexiDataAwareObjectInterface::slotDataDestroying(); }
@@ -192,11 +193,11 @@ class KEXIFORMUTILS_EXPORT KexiFormScrollView :
protected:
//! Implementation for KexiDataAwareObjectInterface
- virtual void clearColumnsInternal(bool repaint);
+ virtual void clearColumnsInternal(bool tqrepaint);
//! Implementation for KexiDataAwareObjectInterface
- virtual void addHeaderColumn(const QString& caption, const QString& description,
- const QIconSet& icon, int width);
+ virtual void addHeaderColumn(const TQString& caption, const TQString& description,
+ const TQIconSet& icon, int width);
//! Implementation for KexiDataAwareObjectInterface
virtual int currentLocalSortingOrder() const;
@@ -214,7 +215,7 @@ class KEXIFORMUTILS_EXPORT KexiFormScrollView :
virtual void updateGUIAfterSorting();
//! Implementation for KexiDataAwareObjectInterface
- virtual void createEditor(int row, int col, const QString& addText = QString::null,
+ virtual void createEditor(int row, int col, const TQString& addText = TQString(),
bool removeOld = false);
//! Implementation for KexiDataAwareObjectInterface
@@ -240,12 +241,12 @@ class KEXIFORMUTILS_EXPORT KexiFormScrollView :
/*! Implementation for KexiDataAwareObjectInterface
Implementation for KexiDataAwareObjectInterface
- Updates widget's contents size e.g. using QScrollView::resizeContents(). */
+ Updates widget's contents size e.g. using TQScrollView::resizeContents(). */
virtual void updateWidgetContentsSize();
/*! Implementation for KexiDataAwareObjectInterface
Updates scrollbars of the widget.
- QScrollView::updateScrollbars() will be usually called here. */
+ TQScrollView::updateScrollbars() will be usually called here. */
virtual void updateWidgetScrollBars();
KexiDBForm* dbFormWidget() const;
@@ -281,7 +282,7 @@ class KEXIFORMUTILS_EXPORT KexiFormScrollView :
/*! @internal
Used to invoke copy/paste/cut etc. actions at the focused widget's level. */
- void handleDataWidgetAction(const QString& actionName);
+ void handleDataWidgetAction(const TQString& actionName);
/*! @internal */
bool shouldDisplayDefaultValueForItem(KexiFormDataItemInterface* itemIface) const;
diff --git a/kexi/plugins/forms/kexiformview.cpp b/kexi/plugins/forms/kexiformview.cpp
index 7e52e5b6..9a14a0c9 100644
--- a/kexi/plugins/forms/kexiformview.cpp
+++ b/kexi/plugins/forms/kexiformview.cpp
@@ -20,8 +20,8 @@
#include "kexiformview.h"
-#include <qobjectlist.h>
-#include <qfileinfo.h>
+#include <tqobjectlist.h>
+#include <tqfileinfo.h>
#include <formeditor/form.h>
#include <formeditor/formIO.h>
@@ -60,9 +60,9 @@
//! @todo #define KEXI_SHOW_SPLITTER_WIDGET
-KexiFormView::KexiFormView(KexiMainWindow *mainWin, QWidget *parent,
+KexiFormView::KexiFormView(KexiMainWindow *mainWin, TQWidget *tqparent,
const char *name, bool /*dbAware*/)
- : KexiDataAwareView( mainWin, parent, name )
+ : KexiDataAwareView( mainWin, tqparent, name )
, m_propertySet(0)
, m_resizeMode(KexiFormView::ResizeDefault)
, m_query(0)
@@ -72,7 +72,7 @@ KexiFormView::KexiFormView(KexiMainWindow *mainWin, QWidget *parent,
{
m_delayedFormContentsResizeOnShow = 0;
- QHBoxLayout *l = new QHBoxLayout(this);
+ TQHBoxLayout *l = new TQHBoxLayout(this);
l->setAutoAdd(true);
m_scrollView = new KexiFormScrollView(this, viewMode()==Kexi::DataViewMode);
@@ -81,8 +81,8 @@ KexiFormView::KexiFormView(KexiMainWindow *mainWin, QWidget *parent,
// m_scrollView->show();
m_dbform = new KexiDBForm(m_scrollView->viewport(), m_scrollView, name/*, conn*/);
-// m_dbform->resize( m_scrollView->viewport()->size() - QSize(20, 20) );
-// m_dbform->resize(QSize(400, 300));
+// m_dbform->resize( m_scrollView->viewport()->size() - TQSize(20, 20) );
+// m_dbform->resize(TQSize(400, 300));
m_scrollView->setWidget(m_dbform);
m_scrollView->setResizingEnabled(viewMode()!=Kexi::DataViewMode);
@@ -90,68 +90,68 @@ KexiFormView::KexiFormView(KexiMainWindow *mainWin, QWidget *parent,
if (viewMode()==Kexi::DataViewMode) {
m_scrollView->recordNavigator()->setRecordHandler( m_scrollView );
- m_scrollView->viewport()->setPaletteBackgroundColor(m_dbform->palette().active().background());
-//moved to formmanager connect(formPart()->manager(), SIGNAL(noFormSelected()), SLOT(slotNoFormSelected()));
+ m_scrollView->viewport()->setPaletteBackgroundColor(m_dbform->tqpalette().active().background());
+//moved to formmanager connect(formPart()->manager(), TQT_SIGNAL(noFormSelected()), TQT_SLOT(slotNoFormSelected()));
}
else
{
- connect(KFormDesigner::FormManager::self(), SIGNAL(propertySetSwitched(KoProperty::Set*, bool, const QCString&)),
- this, SLOT(slotPropertySetSwitched(KoProperty::Set*, bool, const QCString&)));
- connect(KFormDesigner::FormManager::self(), SIGNAL(dirty(KFormDesigner::Form *, bool)),
- this, SLOT(slotDirty(KFormDesigner::Form *, bool)));
+ connect(KFormDesigner::FormManager::self(), TQT_SIGNAL(propertySetSwitched(KoProperty::Set*, bool, const TQCString&)),
+ this, TQT_SLOT(slotPropertySetSwitched(KoProperty::Set*, bool, const TQCString&)));
+ connect(KFormDesigner::FormManager::self(), TQT_SIGNAL(dirty(KFormDesigner::Form *, bool)),
+ this, TQT_SLOT(slotDirty(KFormDesigner::Form *, bool)));
- connect(m_dbform, SIGNAL(handleDragMoveEvent(QDragMoveEvent*)),
- this, SLOT(slotHandleDragMoveEvent(QDragMoveEvent*)));
- connect(m_dbform, SIGNAL(handleDropEvent(QDropEvent*)),
- this, SLOT(slotHandleDropEvent(QDropEvent*)));
+ connect(m_dbform, TQT_SIGNAL(handleDragMoveEvent(TQDragMoveEvent*)),
+ this, TQT_SLOT(slotHandleDragMoveEvent(TQDragMoveEvent*)));
+ connect(m_dbform, TQT_SIGNAL(handleDropEvent(TQDropEvent*)),
+ this, TQT_SLOT(slotHandleDropEvent(TQDropEvent*)));
// action stuff
- plugSharedAction("formpart_taborder", KFormDesigner::FormManager::self(), SLOT(editTabOrder()));
- plugSharedAction("formpart_adjust_size", KFormDesigner::FormManager::self(), SLOT(adjustWidgetSize()));
-//TODO plugSharedAction("formpart_pixmap_collection", formPart()->manager(), SLOT(editFormPixmapCollection()));
-//TODO plugSharedAction("formpart_connections", formPart()->manager(), SLOT(editConnections()));
-
- plugSharedAction("edit_copy", KFormDesigner::FormManager::self(), SLOT(copyWidget()));
- plugSharedAction("edit_cut", KFormDesigner::FormManager::self(), SLOT(cutWidget()));
- plugSharedAction("edit_paste", KFormDesigner::FormManager::self(), SLOT(pasteWidget()));
- plugSharedAction("edit_delete", KFormDesigner::FormManager::self(), SLOT(deleteWidget()));
- plugSharedAction("edit_select_all", KFormDesigner::FormManager::self(), SLOT(selectAll()));
- plugSharedAction("formpart_clear_contents", KFormDesigner::FormManager::self(), SLOT(clearWidgetContent()));
- plugSharedAction("edit_undo", KFormDesigner::FormManager::self(), SLOT(undo()));
- plugSharedAction("edit_redo", KFormDesigner::FormManager::self(), SLOT(redo()));
+ plugSharedAction("formpart_taborder", KFormDesigner::FormManager::self(), TQT_SLOT(editTabOrder()));
+ plugSharedAction("formpart_adjust_size", KFormDesigner::FormManager::self(), TQT_SLOT(adjustWidgetSize()));
+//TODO plugSharedAction("formpart_pixmap_collection", formPart()->manager(), TQT_SLOT(editFormPixmapCollection()));
+//TODO plugSharedAction("formpart_connections", formPart()->manager(), TQT_SLOT(editConnections()));
+
+ plugSharedAction("edit_copy", KFormDesigner::FormManager::self(), TQT_SLOT(copyWidget()));
+ plugSharedAction("edit_cut", KFormDesigner::FormManager::self(), TQT_SLOT(cutWidget()));
+ plugSharedAction("edit_paste", KFormDesigner::FormManager::self(), TQT_SLOT(pasteWidget()));
+ plugSharedAction("edit_delete", KFormDesigner::FormManager::self(), TQT_SLOT(deleteWidget()));
+ plugSharedAction("edit_select_all", KFormDesigner::FormManager::self(), TQT_SLOT(selectAll()));
+ plugSharedAction("formpart_clear_contents", KFormDesigner::FormManager::self(), TQT_SLOT(clearWidgetContent()));
+ plugSharedAction("edit_undo", KFormDesigner::FormManager::self(), TQT_SLOT(undo()));
+ plugSharedAction("edit_redo", KFormDesigner::FormManager::self(), TQT_SLOT(redo()));
plugSharedAction("formpart_layout_menu", KFormDesigner::FormManager::self(), 0 );
- plugSharedAction("formpart_layout_hbox", KFormDesigner::FormManager::self(), SLOT(layoutHBox()) );
- plugSharedAction("formpart_layout_vbox", KFormDesigner::FormManager::self(), SLOT(layoutVBox()) );
- plugSharedAction("formpart_layout_grid", KFormDesigner::FormManager::self(), SLOT(layoutGrid()) );
+ plugSharedAction("formpart_layout_hbox", KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutHBox()) );
+ plugSharedAction("formpart_layout_vbox", KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutVBox()) );
+ plugSharedAction("formpart_layout_grid", KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutGrid()) );
#ifdef KEXI_SHOW_SPLITTER_WIDGET
- plugSharedAction("formpart_layout_hsplitter", KFormDesigner::FormManager::self(), SLOT(layoutHSplitter()) );
- plugSharedAction("formpart_layout_vsplitter", KFormDesigner::FormManager::self(), SLOT(layoutVSplitter()) );
+ plugSharedAction("formpart_layout_hsplitter", KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutHSplitter()) );
+ plugSharedAction("formpart_layout_vsplitter", KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutVSplitter()) );
#endif
- plugSharedAction("formpart_break_layout", KFormDesigner::FormManager::self(), SLOT(breakLayout()) );
+ plugSharedAction("formpart_break_layout", KFormDesigner::FormManager::self(), TQT_SLOT(breakLayout()) );
- plugSharedAction("formpart_format_raise", KFormDesigner::FormManager::self(), SLOT(bringWidgetToFront()) );
- plugSharedAction("formpart_format_lower", KFormDesigner::FormManager::self(), SLOT(sendWidgetToBack()) );
+ plugSharedAction("formpart_format_raise", KFormDesigner::FormManager::self(), TQT_SLOT(bringWidgetToFront()) );
+ plugSharedAction("formpart_format_lower", KFormDesigner::FormManager::self(), TQT_SLOT(sendWidgetToBack()) );
plugSharedAction("other_widgets_menu", KFormDesigner::FormManager::self(), 0 );
setAvailable("other_widgets_menu", true);
plugSharedAction("formpart_align_menu", KFormDesigner::FormManager::self(), 0 );
- plugSharedAction("formpart_align_to_left", KFormDesigner::FormManager::self(),SLOT(alignWidgetsToLeft()) );
- plugSharedAction("formpart_align_to_right", KFormDesigner::FormManager::self(), SLOT(alignWidgetsToRight()) );
- plugSharedAction("formpart_align_to_top", KFormDesigner::FormManager::self(), SLOT(alignWidgetsToTop()) );
- plugSharedAction("formpart_align_to_bottom", KFormDesigner::FormManager::self(), SLOT(alignWidgetsToBottom()) );
- plugSharedAction("formpart_align_to_grid", KFormDesigner::FormManager::self(), SLOT(alignWidgetsToGrid()) );
+ plugSharedAction("formpart_align_to_left", KFormDesigner::FormManager::self(),TQT_SLOT(alignWidgetsToLeft()) );
+ plugSharedAction("formpart_align_to_right", KFormDesigner::FormManager::self(), TQT_SLOT(alignWidgetsToRight()) );
+ plugSharedAction("formpart_align_to_top", KFormDesigner::FormManager::self(), TQT_SLOT(alignWidgetsToTop()) );
+ plugSharedAction("formpart_align_to_bottom", KFormDesigner::FormManager::self(), TQT_SLOT(alignWidgetsToBottom()) );
+ plugSharedAction("formpart_align_to_grid", KFormDesigner::FormManager::self(), TQT_SLOT(alignWidgetsToGrid()) );
plugSharedAction("formpart_adjust_size_menu", KFormDesigner::FormManager::self(), 0 );
- plugSharedAction("formpart_adjust_to_fit", KFormDesigner::FormManager::self(), SLOT(adjustWidgetSize()) );
- plugSharedAction("formpart_adjust_size_grid", KFormDesigner::FormManager::self(), SLOT(adjustSizeToGrid()) );
- plugSharedAction("formpart_adjust_height_small", KFormDesigner::FormManager::self(), SLOT(adjustHeightToSmall()) );
- plugSharedAction("formpart_adjust_height_big", KFormDesigner::FormManager::self(), SLOT(adjustHeightToBig()) );
- plugSharedAction("formpart_adjust_width_small", KFormDesigner::FormManager::self(), SLOT(adjustWidthToSmall()) );
- plugSharedAction("formpart_adjust_width_big", KFormDesigner::FormManager::self(), SLOT(adjustWidthToBig()) );
-
- plugSharedAction("format_font", KFormDesigner::FormManager::self(), SLOT(changeFont()) );
+ plugSharedAction("formpart_adjust_to_fit", KFormDesigner::FormManager::self(), TQT_SLOT(adjustWidgetSize()) );
+ plugSharedAction("formpart_adjust_size_grid", KFormDesigner::FormManager::self(), TQT_SLOT(adjustSizeToGrid()) );
+ plugSharedAction("formpart_adjust_height_small", KFormDesigner::FormManager::self(), TQT_SLOT(adjustHeightToSmall()) );
+ plugSharedAction("formpart_adjust_height_big", KFormDesigner::FormManager::self(), TQT_SLOT(adjustHeightToBig()) );
+ plugSharedAction("formpart_adjust_width_small", KFormDesigner::FormManager::self(), TQT_SLOT(adjustWidthToSmall()) );
+ plugSharedAction("formpart_adjust_width_big", KFormDesigner::FormManager::self(), TQT_SLOT(adjustWidthToBig()) );
+
+ plugSharedAction("format_font", KFormDesigner::FormManager::self(), TQT_SLOT(changeFont()) );
}
initForm();
@@ -159,15 +159,15 @@ KexiFormView::KexiFormView(KexiMainWindow *mainWin, QWidget *parent,
KexiDataAwareView::init( m_scrollView, m_scrollView, m_scrollView,
/* skip data-awarness if design mode */ viewMode()==Kexi::DesignViewMode );
- connect(this, SIGNAL(focus(bool)), this, SLOT(slotFocus(bool)));
+ connect(this, TQT_SIGNAL(focus(bool)), this, TQT_SLOT(slotFocus(bool)));
/// @todo skip this if ther're no borders
-// m_dbform->resize( m_dbform->size()+QSize(m_scrollView->verticalScrollBar()->width(), m_scrollView->horizontalScrollBar()->height()) );
+// m_dbform->resize( m_dbform->size()+TQSize(m_scrollView->verticalScrollBar()->width(), m_scrollView->horizontalScrollBar()->height()) );
}
KexiFormView::~KexiFormView()
{
if (m_cursor) {
- KexiDB::Connection *conn = parentDialog()->mainWin()->project()->dbConnection();
+ KexiDB::Connection *conn = tqparentDialog()->mainWin()->project()->dbConnection();
conn->deleteCursor(m_cursor);
m_cursor = 0;
}
@@ -184,7 +184,7 @@ void
KexiFormView::deleteQuery()
{
if (m_cursor) {
- KexiDB::Connection *conn = parentDialog()->mainWin()->project()->dbConnection();
+ KexiDB::Connection *conn = tqparentDialog()->mainWin()->project()->dbConnection();
conn->deleteCursor(m_cursor);
m_cursor = 0;
}
@@ -225,17 +225,17 @@ KexiFormView::initForm()
if (viewMode()==Kexi::DesignViewMode) {
//we want to be informed about executed commands
- connect(form()->commandHistory(), SIGNAL(commandExecuted()),
- KFormDesigner::FormManager::self(), SLOT(slotHistoryCommandExecuted()));
+ connect(form()->commandHistory(), TQT_SIGNAL(commandExecuted()),
+ KFormDesigner::FormManager::self(), TQT_SLOT(slotHistoryCommandExecuted()));
}
- const bool newForm = parentDialog()->id() < 0;
+ const bool newForm = tqparentDialog()->id() < 0;
KexiDB::FieldList *fields = 0;
if (newForm) {
// Show the form wizard if this is a new Form
#ifndef NO_DSWIZARD
- KexiDataSourceWizard *w = new KexiDataSourceWizard(mainWin(), (QWidget*)mainWin(), "datasource_wizard");
+ KexiDataSourceWizard *w = new KexiDataSourceWizard(mainWin(), (TQWidget*)mainWin(), "datasource_wizard");
if(!w->exec())
fields = 0;
else
@@ -246,7 +246,7 @@ KexiFormView::initForm()
if(fields)
{
- QDomDocument dom;
+ TQDomDocument dom;
formPart()->generateForm(fields, dom);
KFormDesigner::FormIO::loadFormFromDom(form(), m_dbform, dom);
//! @todo handle errors
@@ -267,8 +267,8 @@ KexiFormView::initForm()
m_scrollView->setForm(form());
// m_dbform->updateTabStopsOrder(form());
-// QSize s = m_dbform->size();
-// QApplication::sendPostedEvents();
+// TQSize s = m_dbform->size();
+// TQApplication::sendPostedEvents();
// m_scrollView->resize( s );
// m_dbform->resize(s);
m_scrollView->refreshContentsSize();
@@ -294,9 +294,9 @@ void KexiFormView::updateAutoFieldsDataSource()
//-inherit captions
//-inherit data types
//(this data has not been stored in the form)
- QString dataSourceString( m_dbform->dataSource() );
- QCString dataSourceMimeTypeString( m_dbform->dataSourceMimeType() );
- KexiDB::Connection *conn = parentDialog()->mainWin()->project()->dbConnection();
+ TQString dataSourceString( m_dbform->dataSource() );
+ TQCString dataSourceMimeTypeString( m_dbform->dataSourceMimeType() );
+ KexiDB::Connection *conn = tqparentDialog()->mainWin()->project()->dbConnection();
KexiDB::TableOrQuerySchema tableOrQuery(
conn, dataSourceString.latin1(), dataSourceMimeTypeString=="kexi/table");
if (!tableOrQuery.table() && !tableOrQuery.query())
@@ -323,9 +323,9 @@ void KexiFormView::updateValuesForSubproperties()
//-inherit captions
//-inherit data types
//(this data has not been stored in the form)
- QString dataSourceString( m_dbform->dataSource() );
- QCString dataSourceMimeTypeString( m_dbform->dataSourceMimeType() );
- KexiDB::Connection *conn = parentDialog()->mainWin()->project()->dbConnection();
+ TQString dataSourceString( m_dbform->dataSource() );
+ TQCString dataSourceMimeTypeString( m_dbform->dataSourceMimeType() );
+ KexiDB::Connection *conn = tqparentDialog()->mainWin()->project()->dbConnection();
KexiDB::TableOrQuerySchema tableOrQuery(
conn, dataSourceString.latin1(), dataSourceMimeTypeString=="kexi/table");
if (!tableOrQuery.table() && !tableOrQuery.query())
@@ -339,22 +339,22 @@ void KexiFormView::updateValuesForSubproperties()
KFormDesigner::WidgetWithSubpropertiesInterface* subpropIface
= dynamic_cast<KFormDesigner::WidgetWithSubpropertiesInterface*>( it.current()->widget() );
if (subpropIface && subpropIface->subwidget() && it.current()->subproperties() ) {
- QWidget *subwidget = subpropIface->subwidget();
- QMap<QString, QVariant>* subprops = it.current()->subproperties();
- for (QMapConstIterator<QString, QVariant> subpropIt = subprops->constBegin(); subpropIt!=subprops->constEnd(); ++subpropIt) {
+ TQWidget *subwidget = subpropIface->subwidget();
+ TQMap<TQString, TQVariant>* subprops = it.current()->subproperties();
+ for (TQMapConstIterator<TQString, TQVariant> subpropIt = subprops->constBegin(); subpropIt!=subprops->constEnd(); ++subpropIt) {
kexipluginsdbg << "KexiFormView::loadForm(): delayed setting of the subproperty: widget="
<< it.current()->widget()->name() << " prop=" << subpropIt.key() << " val=" << subpropIt.data() << endl;
- const int count = subwidget->metaObject()->findProperty(subpropIt.key().latin1(), true);
- const QMetaProperty *meta = count!=-1 ? subwidget->metaObject()->property(count, true) : 0;
+ const int count = subwidget->tqmetaObject()->tqfindProperty(subpropIt.key().latin1(), true);
+ const TQMetaProperty *meta = count!=-1 ? subwidget->tqmetaObject()->property(count, true) : 0;
if (meta) {
// Special case: the property value of type enum (set) but is saved as a string list,
// not as int, so we need to translate it to int. It's been created as such
- // by FormIO::readPropertyValue(). Example: "alignment" property.
- if (meta->isSetType() && subpropIt.data().type()==QVariant::StringList) {
- QStrList keys;
- const QStringList list( subpropIt.data().toStringList() );
- for (QStringList::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it)
+ // by FormIO::readPropertyValue(). Example: "tqalignment" property.
+ if (meta->isSetType() && subpropIt.data().type()==TQVariant::StringList) {
+ TQStrList keys;
+ const TQStringList list( subpropIt.data().toStringList() );
+ for (TQStringList::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it)
keys.append((*it).latin1());
subwidget->setProperty( subpropIt.key().latin1(), meta->keysToValue(keys) );
}
@@ -369,19 +369,19 @@ void KexiFormView::updateValuesForSubproperties()
//! Used in KexiFormView::loadForm()
static void setUnsavedBLOBIdsForDataViewMode(
- QWidget* widget, const QMap<QCString, KexiBLOBBuffer::Id_t>& unsavedLocalBLOBsByName)
+ TQWidget* widget, const TQMap<TQCString, KexiBLOBBuffer::Id_t>& unsavedLocalBLOBsByName)
{
- if (-1 != widget->metaObject()->findProperty("pixmapId")) {
+ if (-1 != widget->tqmetaObject()->tqfindProperty("pixmapId")) {
const KexiBLOBBuffer::Id_t blobID = unsavedLocalBLOBsByName[ widget->name() ];
if (blobID > 0)
- widget->setProperty("pixmapId", (uint /* KexiBLOBBuffer::Id_t is unsafe and unsupported by QVariant - will be fixed in Qt4*/)blobID);
+ widget->setProperty("pixmapId", (uint /* KexiBLOBBuffer::Id_t is unsafe and unsupported by TQVariant - will be fixed in TQt4*/)blobID);
}
- const QObjectList *list = widget->children();
- if (!list)
+ const TQObjectList list = widget->childrenListObject();
+ if (list.isEmpty())
return;
- for (QObjectListIterator it(*list); it.current(); ++it) {
- if (dynamic_cast<QWidget*>(it.current()))
- setUnsavedBLOBIdsForDataViewMode(dynamic_cast<QWidget*>(it.current()), unsavedLocalBLOBsByName);
+ for (TQObjectListIterator it(list); it.current(); ++it) {
+ if (dynamic_cast<TQWidget*>(it.current()))
+ setUnsavedBLOBIdsForDataViewMode(dynamic_cast<TQWidget*>(it.current()), unsavedLocalBLOBsByName);
}
}
@@ -390,7 +390,7 @@ KexiFormView::loadForm()
{
//@todo also load m_resizeMode !
- kexipluginsdbg << "KexiFormView::loadForm() Loading the form with id : " << parentDialog()->id() << endl;
+ kexipluginsdbg << "KexiFormView::loadForm() Loading the form with id : " << tqparentDialog()->id() << endl;
// If we are previewing the Form, use the tempData instead of the form stored in the db
if(viewMode()==Kexi::DataViewMode && !tempData()->tempForm.isNull() )
{
@@ -402,7 +402,7 @@ KexiFormView::loadForm()
}
// normal load
- QString data;
+ TQString data;
loadDataBlock(data);
KFormDesigner::FormIO::loadFormFromString(form(), m_dbform, data);
@@ -414,9 +414,9 @@ KexiFormView::loadForm()
}
void
-KexiFormView::slotPropertySetSwitched(KoProperty::Set *set, bool forceReload, const QCString& propertyToSelect)
+KexiFormView::slotPropertySetSwitched(KoProperty::Set *set, bool forceReload, const TQCString& propertyToSelect)
{
-// if (set && parentDialog()!=parentDialog()->mainWin()->currentDialog())
+// if (set && tqparentDialog()!=tqparentDialog()->mainWin()->currentDialog())
if (form() != KFormDesigner::FormManager::self()->activeForm())
return; //this is not the current form view
m_propertySet = set;
@@ -441,7 +441,7 @@ KexiFormView::beforeSwitchTo(int mode, bool &dontStore)
else {
//remember our pos
tempData()->scrollViewContentsPos
- = QPoint(m_scrollView->contentsX(), m_scrollView->contentsY());
+ = TQPoint(m_scrollView->contentsX(), m_scrollView->contentsY());
}
}
@@ -454,7 +454,7 @@ KexiFormView::beforeSwitchTo(int mode, bool &dontStore)
//collect blobs from design mode by name for use in data view mode
temp->unsavedLocalBLOBsByName.clear();
- for (QMapConstIterator<QWidget*, KexiBLOBBuffer::Id_t> it = temp->unsavedLocalBLOBs.constBegin();
+ for (TQMapConstIterator<TQWidget*, KexiBLOBBuffer::Id_t> it = temp->unsavedLocalBLOBs.constBegin();
it!=temp->unsavedLocalBLOBs.constEnd(); ++it)
{
if (!it.key())
@@ -470,8 +470,8 @@ tristate
KexiFormView::afterSwitchFrom(int mode)
{
if (mode == 0 || mode == Kexi::DesignViewMode) {
- if (parentDialog()->neverSaved()) {
- m_dbform->resize(QSize(400, 300));
+ if (tqparentDialog()->neverSaved()) {
+ m_dbform->resize(TQSize(400, 300));
m_scrollView->refreshContentsSizeLater(true,true);
//m_delayedFormContentsResizeOnShow = false;
}
@@ -521,16 +521,16 @@ KexiFormView::afterSwitchFrom(int mode)
initDataSource();
//handle events for this form
- m_scrollView->setMainWidgetForEventHandling(parentDialog()->mainWin(), m_dbform);
+ m_scrollView->setMainWidgetForEventHandling(tqparentDialog()->mainWin(), m_dbform);
//set focus on 1st focusable widget which has valid dataSource property set
if (!m_dbform->orderedFocusWidgets()->isEmpty()) {
-// QWidget *www = focusWidget();
- //if (Kexi::hasParent(this, qApp->focusWidget())) {
- KexiUtils::unsetFocusWithReason(qApp->focusWidget(), QFocusEvent::Tab);
+// TQWidget *www = tqfocusWidget();
+ //if (Kexi::hasParent(this, tqApp->tqfocusWidget())) {
+ KexiUtils::unsetFocusWithReason(tqApp->tqfocusWidget(), TQFocusEvent::Tab);
//}
- QPtrListIterator<QWidget> it(*m_dbform->orderedFocusWidgets());
+ TQPtrListIterator<TQWidget> it(*m_dbform->orderedFocusWidgets());
for (;it.current(); ++it) {
KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>(it.current());
if (iface)
@@ -545,7 +545,7 @@ KexiFormView::afterSwitchFrom(int mode)
it.toFirst();
it.current()->setFocus();
- KexiUtils::setFocusWithReason(it.current(), QFocusEvent::Tab);
+ KexiUtils::setFocusWithReason(it.current(), TQFocusEvent::Tab);
m_setFocusInternalOnce = it.current();
}
@@ -555,7 +555,7 @@ KexiFormView::afterSwitchFrom(int mode)
//dirty only if it's a new object
if (mode == 0)
- setDirty( parentDialog()->partItem()->neverSaved() );
+ setDirty( tqparentDialog()->partItem()->neverSaved() );
if (mode==Kexi::DataViewMode && viewMode()==Kexi::DesignViewMode) {
// slotPropertySetSwitched
@@ -568,8 +568,8 @@ KexiFormView::afterSwitchFrom(int mode)
void KexiFormView::initDataSource()
{
deleteQuery();
- QString dataSourceString( m_dbform->dataSource() );
- QCString dataSourceMimeTypeString( m_dbform->dataSourceMimeType() );
+ TQString dataSourceString( m_dbform->dataSource() );
+ TQCString dataSourceMimeTypeString( m_dbform->dataSourceMimeType() );
//! @todo also handle anonymous (not stored) queries provided as statements here
bool ok = !dataSourceString.isEmpty();
@@ -581,7 +581,7 @@ void KexiFormView::initDataSource()
KexiDB::TableSchema *tableSchema = 0;
KexiDB::Connection *conn = 0;
- QStringList sources;
+ TQStringList sources;
bool forceReadOnlyDataSource = false;
if (ok) {
@@ -590,7 +590,7 @@ void KexiFormView::initDataSource()
//collect all data-aware widgets and create query schema
m_scrollView->setMainDataSourceWidget(m_dbform);
sources = m_scrollView->usedDataSources();
- conn = parentDialog()->mainWin()->project()->dbConnection();
+ conn = tqparentDialog()->mainWin()->project()->dbConnection();
if (dataSourceMimeTypeString.isEmpty() /*table type is the default*/
|| dataSourceMimeTypeString=="kexi/table")
{
@@ -627,7 +627,7 @@ void KexiFormView::initDataSource()
}
}
- QDict<char> invalidSources(997);
+ TQDict<char> invalidSources(997);
if (ok) {
KexiDB::IndexSchema *pkey = tableSchema ? tableSchema->primaryKey() : 0;
if (pkey) {
@@ -639,10 +639,10 @@ void KexiFormView::initDataSource()
kexipluginsdbg << "KexiFormView::initDataSource(): sources=" << sources << endl;
uint index = 0;
- for (QStringList::ConstIterator it = sources.constBegin();
+ for (TQStringList::ConstIterator it = sources.constBegin();
it!=sources.constEnd(); ++it, index++) {
/*! @todo add expression support */
- QString fieldName( (*it).lower() );
+ TQString fieldName( (*it).lower() );
//remove "tablename." if it was prepended
if (tableSchema && fieldName.startsWith( tableSchema->name().lower()+"." ))
fieldName = fieldName.mid(tableSchema->name().length()+1);
@@ -673,7 +673,7 @@ void KexiFormView::initDataSource()
else {
KexiDB::debug( m_query->parameters() );
// like in KexiQueryView::executeQuery()
- QValueList<QVariant> params;
+ TQValueList<TQVariant> params;
{
KexiUtils::WaitCursorRemover remover;
params = KexiQueryParameters::getParameters(this, *conn->driver(), *m_query, ok);
@@ -681,7 +681,7 @@ void KexiFormView::initDataSource()
if (ok) //input cancelled
m_cursor = conn->executeQuery( *m_query, params );
}
- m_scrollView->invalidateDataSources( invalidSources, m_query );
+ m_scrollView->tqinvalidateDataSources( invalidSources, m_query );
ok = m_cursor!=0;
}
@@ -730,7 +730,7 @@ KexiFormView::storeNewData(const KexiDB::SchemaData& sdata, bool &cancel)
}
if (!storeData()) {
//failure: remove object's schema data to avoid garbage
- KexiDB::Connection *conn = parentDialog()->mainWin()->project()->dbConnection();
+ KexiDB::Connection *conn = tqparentDialog()->mainWin()->project()->dbConnection();
conn->removeObject( s->id() );
delete s;
return 0;
@@ -742,19 +742,19 @@ tristate
KexiFormView::storeData(bool dontAsk)
{
Q_UNUSED(dontAsk);
- kexipluginsdbg << "KexiDBForm::storeData(): " << parentDialog()->partItem()->name()
- << " [" << parentDialog()->id() << "]" << endl;
+ kexipluginsdbg << "KexiDBForm::storeData(): " << tqparentDialog()->partItem()->name()
+ << " [" << tqparentDialog()->id() << "]" << endl;
//-- first, store local BLOBs, so identifiers can be updated
//! @todo remove unused data stored previously
- KexiDB::Connection *conn = parentDialog()->mainWin()->project()->dbConnection();
+ KexiDB::Connection *conn = tqparentDialog()->mainWin()->project()->dbConnection();
KexiDB::TableSchema *blobsTable = conn->tableSchema("kexi__blobs");
if (!blobsTable) { //compatibility check for older Kexi project versions
//! @todo show message about missing kexi__blobs?
return false;
}
// Not all engines accept passing NULL to PKEY o_id, so we're omitting it.
- QStringList blobsFieldNamesWithoutID(blobsTable->names());
+ TQStringList blobsFieldNamesWithoutID(blobsTable->names());
blobsFieldNamesWithoutID.pop_front();
KexiDB::FieldList *blobsFieldsWithoutID = blobsTable->subList(blobsFieldNamesWithoutID);
@@ -767,9 +767,9 @@ KexiFormView::storeData(bool dontAsk)
}
KexiBLOBBuffer *blobBuf = KexiBLOBBuffer::self();
KexiFormView *designFormView
- = dynamic_cast<KexiFormView*>( parentDialog()->viewForMode(Kexi::DesignViewMode) );
+ = dynamic_cast<KexiFormView*>( tqparentDialog()->viewForMode(Kexi::DesignViewMode) );
if (designFormView) {
- for (QMapConstIterator<QWidget*, KexiBLOBBuffer::Id_t> it = tempData()->unsavedLocalBLOBs.constBegin();
+ for (TQMapConstIterator<TQWidget*, KexiBLOBBuffer::Id_t> it = tempData()->unsavedLocalBLOBs.constBegin();
it!=tempData()->unsavedLocalBLOBs.constEnd(); ++it)
{
if (!it.key()) {
@@ -781,12 +781,12 @@ KexiFormView::storeData(bool dontAsk)
if (!h)
continue; //no BLOB assigned
- QString originalFileName(h.originalFileName());
- QFileInfo fi(originalFileName);
- QString caption(fi.baseName().replace('_', " ").simplifyWhiteSpace());
+ TQString originalFileName(h.originalFileName());
+ TQFileInfo fi(originalFileName);
+ TQString caption(fi.baseName().tqreplace('_', " ").simplifyWhiteSpace());
if (st) {
- *st /* << NO, (pgsql doesn't support this):QVariant()*/ /*id*/
+ *st /* << NO, (pgsql doesn't support this):TQVariant()*/ /*id*/
<< h.data() << originalFileName << caption
<< h.mimeType() << (uint)/*! @todo unsafe */h.folderId();
if (!st->execute()) {
@@ -797,17 +797,17 @@ KexiFormView::storeData(bool dontAsk)
}
delete blobsFieldsWithoutID;
blobsFieldsWithoutID=0;
- const Q_ULLONG storedBLOBID = conn->lastInsertedAutoIncValue("o_id", "kexi__blobs");
- if ((Q_ULLONG)-1 == storedBLOBID) {
+ const TQ_ULLONG storedBLOBID = conn->lastInsertedAutoIncValue("o_id", "kexi__blobs");
+ if ((TQ_ULLONG)-1 == storedBLOBID) {
//! @todo show message?
return false;
}
kexipluginsdbg << " storedDataID=" << storedBLOBID << endl;
- h.setStoredWidthID((KexiBLOBBuffer::Id_t /*unsafe - will be fixed in Qt4*/)storedBLOBID);
+ h.setStoredWidthID((KexiBLOBBuffer::Id_t /*unsafe - will be fixed in TQt4*/)storedBLOBID);
//set widget's internal property so it can be saved...
- const QVariant oldStoredPixmapId( it.key()->property("storedPixmapId") );
+ const TQVariant oldStoredPixmapId( it.key()->property("storedPixmapId") );
it.key()->setProperty("storedPixmapId",
- QVariant((uint /* KexiBLOBBuffer::Id_t is unsafe and unsupported by QVariant - will be fixed in Qt4*/)storedBLOBID));
+ TQVariant((uint /* KexiBLOBBuffer::Id_t is unsafe and unsupported by TQVariant - will be fixed in TQt4*/)storedBLOBID));
KFormDesigner::ObjectTreeItem *widgetItem = designFormView->form()->objectTree()->lookup(it.key()->name()); //form()->objectTree()->lookup(it.key()->name());
if (widgetItem)
widgetItem->addModifiedProperty( "storedPixmapId", oldStoredPixmapId );
@@ -817,7 +817,7 @@ KexiFormView::storeData(bool dontAsk)
}
//-- now, save form's XML
- QString data;
+ TQString data;
if (!KFormDesigner::FormIO::saveFormToString(tempData()->form, data))
return false;
if (!storeDataBlock(data))
@@ -826,7 +826,7 @@ KexiFormView::storeData(bool dontAsk)
//all blobs are now saved
tempData()->unsavedLocalBLOBs.clear();
- tempData()->tempForm = QString::null;
+ tempData()->tempForm = TQString();
return true;
}
@@ -860,7 +860,7 @@ KexiFormView::slotWidgetSelected(KFormDesigner::Form *f, bool multiple)
setAvailable("formpart_format_raise", true);
setAvailable("formpart_format_lower", true);
- // If the widgets selected is a container, we enable layout actions
+ // If the widgets selected is a container, we enable tqlayout actions
if(!multiple)
{
KFormDesigner::ObjectTreeItem *item = f->objectTree()->lookup( f->selectedWidgets()->first()->name() );
@@ -874,7 +874,7 @@ KexiFormView::slotWidgetSelected(KFormDesigner::Form *f, bool multiple)
KFormDesigner::Container *container = f->activeContainer();
setAvailable("formpart_break_layout", container ?
- (container->layoutType() != KFormDesigner::Container::NoLayout) : false );
+ (container->tqlayoutType() != KFormDesigner::Container::NoLayout) : false );
}
void
@@ -890,7 +890,7 @@ KexiFormView::slotFormWidgetSelected(KFormDesigner::Form *f)
setAvailable("formpart_layout_hbox", true);
setAvailable("formpart_layout_vbox", true);
setAvailable("formpart_layout_grid", true);
- setAvailable("formpart_break_layout", (f->toplevelContainer()->layoutType() != KFormDesigner::Container::NoLayout));
+ setAvailable("formpart_break_layout", (f->toplevelContainer()->tqlayoutType() != KFormDesigner::Container::NoLayout));
}
void
@@ -964,22 +964,22 @@ KexiFormView::setRedoEnabled(bool enabled)
}
#endif //0
-QSize
-KexiFormView::preferredSizeHint(const QSize& otherSize)
+TQSize
+KexiFormView::preferredSizeHint(const TQSize& otherSize)
{
- if (parentDialog()->neverSaved()) {
+ if (tqparentDialog()->neverSaved()) {
//ignore otherSize if possible
-// return KexiViewBase::preferredSizeHint( (parentDialog() && parentDialog()->mdiParent()) ? QSize(10000,10000) : otherSize);
+// return KexiViewBase::preferredSizeHint( (tqparentDialog() && tqparentDialog()->mdiParent()) ? TQSize(10000,10000) : otherSize);
}
return (m_dbform->size()
- +QSize(m_scrollView->verticalScrollBar()->isVisible() ? m_scrollView->verticalScrollBar()->width()*3/2 : 10,
+ +TQSize(m_scrollView->verticalScrollBar()->isVisible() ? m_scrollView->verticalScrollBar()->width()*3/2 : 10,
m_scrollView->horizontalScrollBar()->isVisible() ? m_scrollView->horizontalScrollBar()->height()*3/2 : 10))
.expandedTo( KexiViewBase::preferredSizeHint(otherSize) );
}
void
-KexiFormView::resizeEvent( QResizeEvent *e )
+KexiFormView::resizeEvent( TQResizeEvent *e )
{
if (viewMode()==Kexi::DataViewMode) {
m_scrollView->refreshContentsSizeLater(
@@ -991,7 +991,7 @@ KexiFormView::resizeEvent( QResizeEvent *e )
m_scrollView->updateNavPanelGeometry();
if (m_delayedFormContentsResizeOnShow>0) { // && isVisible()) {
m_delayedFormContentsResizeOnShow--;
- m_dbform->resize( e->size() - QSize(30, 30) );
+ m_dbform->resize( e->size() - TQSize(30, 30) );
}
}
@@ -999,19 +999,19 @@ void
KexiFormView::setFocusInternal()
{
if (viewMode() == Kexi::DataViewMode) {
- if (m_dbform->focusWidget()) {
+ if (m_dbform->tqfocusWidget()) {
//better-looking focus
if (m_setFocusInternalOnce) {
- KexiUtils::setFocusWithReason(m_setFocusInternalOnce, QFocusEvent::Other);//Tab);
+ KexiUtils::setFocusWithReason(m_setFocusInternalOnce, TQFocusEvent::Other);//Tab);
m_setFocusInternalOnce = 0;
}
else {
- //ok? SET_FOCUS_USING_REASON(m_dbform->focusWidget(), QFocusEvent::Other);//Tab);
+ //ok? SET_FOCUS_USING_REASON(m_dbform->tqfocusWidget(), TQFocusEvent::Other);//Tab);
}
return;
}
}
- QWidget::setFocus();
+ TQWidget::setFocus();
}
void
@@ -1025,7 +1025,7 @@ KexiFormView::show()
// if (resizeMode() == KexiFormView::ResizeAuto)
if (viewMode()==Kexi::DataViewMode) {
if (resizeMode() == KexiFormView::ResizeAuto)
- m_scrollView->setResizePolicy(QScrollView::AutoOneFit);
+ m_scrollView->setResizePolicy(TQScrollView::AutoOneFit);
}
}
@@ -1042,11 +1042,11 @@ void
KexiFormView::updateDataSourcePage()
{
if (viewMode()==Kexi::DesignViewMode) {
- QCString dataSourceMimeType, dataSource;
+ TQCString dataSourceMimeType, dataSource;
KFormDesigner::WidgetPropertySet *set = KFormDesigner::FormManager::self()->propertySet();
- if (set->contains("dataSourceMimeType"))
+ if (set->tqcontains("dataSourceMimeType"))
dataSourceMimeType = (*set)["dataSourceMimeType"].value().toCString();
- if (set->contains("dataSource"))
+ if (set->tqcontains("dataSource"))
dataSource = (*set)["dataSource"].value().toCString();
formPart()->dataSourcePage()->setDataSource(dataSourceMimeType, dataSource);
@@ -1054,25 +1054,25 @@ KexiFormView::updateDataSourcePage()
}
void
-KexiFormView::slotHandleDragMoveEvent(QDragMoveEvent* e)
+KexiFormView::slotHandleDragMoveEvent(TQDragMoveEvent* e)
{
if (KexiFieldDrag::canDecodeMultiple( e )) {
e->accept(true);
- //dirty: drawRect(QRect( e->pos(), QSize(50, 20)), 2);
+ //dirty: drawRect(TQRect( e->pos(), TQSize(50, 20)), 2);
}
}
void
-KexiFormView::slotHandleDropEvent(QDropEvent* e)
+KexiFormView::slotHandleDropEvent(TQDropEvent* e)
{
- const QWidget *targetContainerWidget = dynamic_cast<const QWidget*>(sender());
+ const TQWidget *targetContainerWidget = dynamic_cast<const TQWidget*>(sender());
KFormDesigner::ObjectTreeItem *targetContainerWidgetItem = targetContainerWidget
? form()->objectTree()->lookup( targetContainerWidget->name() ) : 0;
if (targetContainerWidgetItem && targetContainerWidgetItem->container()
&& KexiFieldDrag::canDecodeMultiple( e ))
{
- QString sourceMimeType, sourceName;
- QStringList fields;
+ TQString sourceMimeType, sourceName;
+ TQStringList fields;
if (!KexiFieldDrag::decodeMultiple( e, sourceMimeType, sourceName, fields ))
return;
insertAutoFields(sourceMimeType, sourceName, fields,
@@ -1081,13 +1081,13 @@ KexiFormView::slotHandleDropEvent(QDropEvent* e)
}
void
-KexiFormView::insertAutoFields(const QString& sourceMimeType, const QString& sourceName,
- const QStringList& fields, KFormDesigner::Container* targetContainer, const QPoint& _pos)
+KexiFormView::insertAutoFields(const TQString& sourceMimeType, const TQString& sourceName,
+ const TQStringList& fields, KFormDesigner::Container* targetContainer, const TQPoint& _pos)
{
if (fields.isEmpty())
return;
- KexiDB::Connection *conn = parentDialog()->mainWin()->project()->dbConnection();
+ KexiDB::Connection *conn = tqparentDialog()->mainWin()->project()->dbConnection();
KexiDB::TableOrQuerySchema tableOrQuery(conn, sourceName.latin1(), sourceMimeType=="kexi/table");
if (!tableOrQuery.table() && !tableOrQuery.query()) {
kexipluginswarn << "KexiFormView::insertAutoFields(): no such table/query \""
@@ -1095,15 +1095,15 @@ KexiFormView::insertAutoFields(const QString& sourceMimeType, const QString& sou
return;
}
- QPoint pos(_pos);
+ TQPoint pos(_pos);
//if pos is not specified, compute a new position:
- if (pos==QPoint(-1,-1)) {
+ if (pos==TQPoint(-1,-1)) {
if (m_widgetGeometryForRecentInsertAutoFields.isValid()) {
pos = m_widgetGeometryForRecentInsertAutoFields.bottomLeft()
- + QPoint(0,form()->gridSize());
+ + TQPoint(0,form()->gridSize());
}
else {
- pos = QPoint(40, 40); //start here
+ pos = TQPoint(40, 40); //start here
}
}
@@ -1115,11 +1115,11 @@ KexiFormView::insertAutoFields(const QString& sourceMimeType, const QString& sou
// KFormDesigner::WidgetList* prevSelection = form()->selectedWidgets();
KFormDesigner::WidgetList widgetsToSelect;
KFormDesigner::CommandGroup *group = new KFormDesigner::CommandGroup(
- fields.count()==1 ? i18n("Insert AutoField widget") : i18n("Insert %1 AutoField widgets").arg(fields.count()),
+ fields.count()==1 ? i18n("Insert AutoField widget") : i18n("Insert %1 AutoField widgets").tqarg(fields.count()),
KFormDesigner::FormManager::self()->propertySet()
);
- foreach( QStringList::ConstIterator, it, fields ) {
+ foreach( TQStringList::ConstIterator, it, fields ) {
KexiDB::QueryColumnInfo* column = tableOrQuery.columnInfo(*it);
if (!column) {
kexipluginswarn << "KexiFormView::insertAutoFields(): no such field \""
@@ -1128,11 +1128,11 @@ KexiFormView::insertAutoFields(const QString& sourceMimeType, const QString& sou
}
//! todo add autolabel using field's caption or name
//KFormDesigner::Container *targetContainer;
-/* QWidget* targetContainerWidget = QApplication::widgetAt(pos, true);
+/* TQWidget* targetContainerWidget = TQApplication::widgetAt(pos, true);
while (targetContainerWidget
&& !dynamic_cast<KFormDesigner::Container*>(targetContainerWidget))
{
- targetContainerWidget = targetContainerWidget->parentWidget();
+ targetContainerWidget = targetContainerWidget->tqparentWidget();
}
if (dynamic_cast<KFormDesigner::Container*>(targetContainerWidget))
targetContainer = dynamic_cast<KFormDesigner::Container*>(targetContainerWidget);
@@ -1149,14 +1149,14 @@ KexiFormView::insertAutoFields(const QString& sourceMimeType, const QString& sou
group->addCommand(insertCmd, false/*don't exec twice*/);
KFormDesigner::ObjectTreeItem *newWidgetItem
- = form()->objectTree()->dict()->find(insertCmd->widgetName());
+ = form()->objectTree()->dict()->tqfind(insertCmd->widgetName());
KexiDBAutoField* newWidget
= newWidgetItem ? dynamic_cast<KexiDBAutoField*>(newWidgetItem->widget()) : 0;
widgetsToSelect.append(newWidget);
//#if 0
KFormDesigner::CommandGroup *subGroup
= new KFormDesigner::CommandGroup("", KFormDesigner::FormManager::self()->propertySet());
- QMap<QCString, QVariant> propValues;
+ TQMap<TQCString, TQVariant> propValues;
propValues.insert("dataSource", column->aliasOrName());
propValues.insert("fieldTypeInternal", (int)column->field->type());
propValues.insert("fieldCaptionInternal", column->captionOrAliasOrName());
@@ -1173,8 +1173,8 @@ KexiFormView::insertAutoFields(const QString& sourceMimeType, const QString& sou
// newWidget->setDataSource(column->aliasOrName());
// newWidget->setFieldTypeInternal((int)column->field->type());
// newWidget->setFieldCaptionInternal(column->captionOrAliasOrName());
- //resize again because autofield's type changed what can lead to changed sizeHint()
-// newWidget->resize(newWidget->sizeHint());
+ //resize again because autofield's type changed what can lead to changed tqsizeHint()
+// newWidget->resize(newWidget->tqsizeHint());
KFormDesigner::WidgetList list;
list.append(newWidget);
KFormDesigner::AdjustSizeCommand *adjustCommand
@@ -1191,10 +1191,10 @@ KexiFormView::insertAutoFields(const QString& sourceMimeType, const QString& sou
}
if (widgetsToSelect.last()) {
//resize form if needed
- QRect oldFormRect( m_dbform->geometry() );
- QRect newFormRect( oldFormRect );
- newFormRect.setWidth(QMAX(m_dbform->width(), widgetsToSelect.last()->geometry().right()+1));
- newFormRect.setHeight(QMAX(m_dbform->height(), widgetsToSelect.last()->geometry().bottom()+1));
+ TQRect oldFormRect( m_dbform->tqgeometry() );
+ TQRect newFormRect( oldFormRect );
+ newFormRect.setWidth(TQMAX(m_dbform->width(), widgetsToSelect.last()->tqgeometry().right()+1));
+ newFormRect.setHeight(TQMAX(m_dbform->height(), widgetsToSelect.last()->tqgeometry().bottom()+1));
if (newFormRect != oldFormRect) {
//1. resize by hand
m_dbform->setGeometry( newFormRect );
@@ -1205,8 +1205,8 @@ KexiFormView::insertAutoFields(const QString& sourceMimeType, const QString& sou
group->addCommand(resizeFormCommand, true/*will be executed on CommandGroup::execute()*/);
}
- //remember geometry of the last inserted widget
- m_widgetGeometryForRecentInsertAutoFields = widgetsToSelect.last()->geometry();
+ //remember tqgeometry of the last inserted widget
+ m_widgetGeometryForRecentInsertAutoFields = widgetsToSelect.last()->tqgeometry();
}
//eventually, add entire command group to active form
@@ -1217,11 +1217,11 @@ KexiFormView::insertAutoFields(const QString& sourceMimeType, const QString& sou
//enable proper REDO usage
group->resetAllowExecuteFlags();
- m_scrollView->repaint();
- m_scrollView->viewport()->repaint();
- m_scrollView->repaintContents();
+ m_scrollView->tqrepaint();
+ m_scrollView->viewport()->tqrepaint();
+ m_scrollView->tqrepaintContents();
m_scrollView->updateContents();
- m_scrollView->clipper()->repaint();
+ m_scrollView->clipper()->tqrepaint();
m_scrollView->refreshContentsSize();
//select all inserted widgets, if multiple
@@ -1236,7 +1236,7 @@ KexiFormView::insertAutoFields(const QString& sourceMimeType, const QString& sou
}
void
-KexiFormView::setUnsavedLocalBLOB(QWidget *widget, KexiBLOBBuffer::Id_t id)
+KexiFormView::setUnsavedLocalBLOB(TQWidget *widget, KexiBLOBBuffer::Id_t id)
{
//! @todo if there already was data assigned, remember it should be dereferenced
if (id==0)
@@ -1264,12 +1264,12 @@ void KexiFormView::updateActions(bool activated)
}*/
/*
-void KexiFormView::parentDialogDetached()
+void KexiFormView::tqparentDialogDetached()
{
m_dbform->updateTabStopsOrder(form());
}
-void KexiFormView::parentDialogAttached(KMdiChildFrm *)
+void KexiFormView::tqparentDialogAttached(KMdiChildFrm *)
{
m_dbform->updateTabStopsOrder(form());
}*/
diff --git a/kexi/plugins/forms/kexiformview.h b/kexi/plugins/forms/kexiformview.h
index 0a774556..e699afa1 100644
--- a/kexi/plugins/forms/kexiformview.h
+++ b/kexi/plugins/forms/kexiformview.h
@@ -21,7 +21,7 @@
#ifndef KEXIFORMVIEW_H
#define KEXIFORMVIEW_H
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kexiviewbase.h>
#include <widget/kexidataawareview.h>
@@ -55,6 +55,7 @@ namespace KFormDesigner
class KEXIFORMUTILS_EXPORT KexiFormView : public KexiDataAwareView
{
Q_OBJECT
+ TQ_OBJECT
public:
enum ResizeMode {
@@ -64,14 +65,14 @@ class KEXIFORMUTILS_EXPORT KexiFormView : public KexiDataAwareView
NoResize = 2 /*! @todo */
};
-// KexiFormView(KexiMainWindow *win, QWidget *parent, const char *name, KexiDB::Connection *conn);
- KexiFormView(KexiMainWindow *mainWin, QWidget *parent, const char *name = 0,
+// KexiFormView(KexiMainWindow *win, TQWidget *tqparent, const char *name, KexiDB::Connection *conn);
+ KexiFormView(KexiMainWindow *mainWin, TQWidget *tqparent, const char *name = 0,
bool dbAware = true);
virtual ~KexiFormView();
// KexiDB::Connection* connection() { return m_conn; }
- virtual QSize preferredSizeHint(const QSize& otherSize);
+ virtual TQSize preferredSizeHint(const TQSize& otherSize);
int resizeMode() const { return m_resizeMode; }
@@ -89,7 +90,7 @@ class KEXIFORMUTILS_EXPORT KexiFormView : public KexiDataAwareView
Local BLOBs are retrieved KexiBLOBBuffer::self() and stored in "kexi__blobs" 'system' table.
Note that db-aware BLOBs (non local) are not handled this way.
*/
- void setUnsavedLocalBLOB(QWidget *widget, KexiBLOBBuffer::Id_t id);
+ void setUnsavedLocalBLOB(TQWidget *widget, KexiBLOBBuffer::Id_t id);
public slots:
/*! Reimplemented to update resize policy. */
@@ -102,27 +103,27 @@ class KEXIFORMUTILS_EXPORT KexiFormView : public KexiDataAwareView
so undo/redo is available for this operation.
If multiple fields are provided, they will be aligned vertically.
- If \a pos is QPoint(-1,-1) (the default), position is computed automatically
+ If \a pos is TQPoint(-1,-1) (the default), position is computed automatically
based on a position last inserted field using this method.
- If this method has not been called yet, position of QPoint(40, 40) will be set.
+ If this method has not been called yet, position of TQPoint(40, 40) will be set.
Called by:
- slotHandleDropEvent() when field(s) are dropped from the data source pane onto the form
- KexiFormManager is a used clicked "Insert fields" button on the data source pane. */
- void insertAutoFields(const QString& sourceMimeType, const QString& sourceName,
- const QStringList& fields, KFormDesigner::Container* targetContainerWidget,
- const QPoint& pos = QPoint(-1,-1));
+ void insertAutoFields(const TQString& sourceMimeType, const TQString& sourceName,
+ const TQStringList& fields, KFormDesigner::Container* targetContainerWidget,
+ const TQPoint& pos = TQPoint(-1,-1));
protected slots:
void slotPropertySetSwitched(KoProperty::Set *b, bool forceReload = false,
- const QCString& propertyToSelect = QCString());
+ const TQCString& propertyToSelect = TQCString());
void slotDirty(KFormDesigner::Form *f, bool isDirty);
void slotFocus(bool in);
- void slotHandleDragMoveEvent(QDragMoveEvent* e);
+ void slotHandleDragMoveEvent(TQDragMoveEvent* e);
//! Handles field(s) dropping from the data source pane onto the form
//! @see insertAutoFields()
- void slotHandleDropEvent(QDropEvent* e);
+ void slotHandleDropEvent(TQDropEvent* e);
//moved to formmanager void slotWidgetSelected(KFormDesigner::Form *form, bool multiple);
//moved to formmanager void slotFormWidgetSelected(KFormDesigner::Form *form);
@@ -140,7 +141,7 @@ class KEXIFORMUTILS_EXPORT KexiFormView : public KexiDataAwareView
virtual tristate storeData(bool dontAsk = false);
KexiFormPart::TempData* tempData() const {
- return dynamic_cast<KexiFormPart::TempData*>(parentDialog()->tempData()); }
+ return dynamic_cast<KexiFormPart::TempData*>(tqparentDialog()->tempData()); }
KexiFormPart* formPart() const { return dynamic_cast<KexiFormPart*>(part()); }
//moved to formmanager void disableWidgetActions();
@@ -158,7 +159,7 @@ class KEXIFORMUTILS_EXPORT KexiFormView : public KexiDataAwareView
//! Used in loadForm()
void updateValuesForSubproperties();
- virtual void resizeEvent ( QResizeEvent * );
+ virtual void resizeEvent ( TQResizeEvent * );
void initDataSource();
@@ -195,7 +196,7 @@ class KEXIFORMUTILS_EXPORT KexiFormView : public KexiDataAwareView
It is shared between subsequent Data view sessions (just reopened on switch),
but deleted and recreated from scratch when form's "dataSource" property changed
since last form viewing (m_previousDataSourceString is used for that). */
- QString m_previousDataSourceString;
+ TQString m_previousDataSourceString;
int m_resizeMode;
@@ -214,18 +215,18 @@ class KEXIFORMUTILS_EXPORT KexiFormView : public KexiDataAwareView
int m_delayedFormContentsResizeOnShow;
//! Used in setFocusInternal()
- QGuardedPtr<QWidget> m_setFocusInternalOnce;
+ TQGuardedPtr<TQWidget> m_setFocusInternalOnce;
- /*! Stores geometry of widget recently inserted using insertAutoFields() method.
+ /*! Stores tqgeometry of widget recently inserted using insertAutoFields() method.
having this information, we'r eable to compute position for a newly
inserted widget in insertAutoFields() is such position has not been specified.
(the position is specified when a widget is inserted with mouse drag & dropping
but not with clicking of 'Insert fields' button from Data Source pane) */
- QRect m_widgetGeometryForRecentInsertAutoFields;
+ TQRect m_widgetGeometryForRecentInsertAutoFields;
//! Used in setUnsavedLocalBLOBs()
-// QMap<QWidget*, KexiBLOBBuffer::Id_t> m_unsavedLocalBLOBs;
+// TQMap<TQWidget*, KexiBLOBBuffer::Id_t> m_unsavedLocalBLOBs;
};
#endif
diff --git a/kexi/plugins/forms/widgets/kexidbautofield.cpp b/kexi/plugins/forms/widgets/kexidbautofield.cpp
index 36fbdb1a..4926a334 100644
--- a/kexi/plugins/forms/widgets/kexidbautofield.cpp
+++ b/kexi/plugins/forms/widgets/kexidbautofield.cpp
@@ -21,11 +21,11 @@
#include "kexidbautofield.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qmetaobject.h>
-#include <qapplication.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqmetaobject.h>
+#include <tqapplication.h>
#include <kdebug.h>
#include <klocale.h>
@@ -57,13 +57,13 @@ class KexiDBAutoField::Private
//!< of widgetTypeForFieldType() if widgetTypeForFieldType is Auto
WidgetType widgetType_property; //!< provides widget type or Auto
LabelPosition lblPosition;
- QBoxLayout *layout;
- QLabel *label;
- QString caption;
+ TQBoxLayout *tqlayout;
+ TQLabel *label;
+ TQString caption;
KexiDB::Field::Type fieldTypeInternal;
- QString fieldCaptionInternal;
- QColor baseColor; //!< needed because for unbound mode editor==0
- QColor textColor; //!< needed because for unbound mode editor==0
+ TQString fieldCaptionInternal;
+ TQColor baseColor; //!< needed because for unbound mode editor==0
+ TQColor textColor; //!< needed because for unbound mode editor==0
bool autoCaption : 1;
bool focusPolicyChanged : 1;
bool designMode : 1;
@@ -71,9 +71,9 @@ class KexiDBAutoField::Private
//-------------------------------------
-KexiDBAutoField::KexiDBAutoField(const QString &text, WidgetType type, LabelPosition pos,
- QWidget *parent, const char *name, bool designMode)
- : QWidget(parent, name)
+KexiDBAutoField::KexiDBAutoField(const TQString &text, WidgetType type, LabelPosition pos,
+ TQWidget *tqparent, const char *name, bool designMode)
+ : TQWidget(tqparent, name)
, KexiFormDataItemInterface()
, KFormDesigner::DesignTimeDynamicChildWidgetHandler()
, d( new Private() )
@@ -82,14 +82,14 @@ KexiDBAutoField::KexiDBAutoField(const QString &text, WidgetType type, LabelPosi
init(text, type, pos);
}
-KexiDBAutoField::KexiDBAutoField(QWidget *parent, const char *name, bool designMode, LabelPosition pos)
- : QWidget(parent, name)
+KexiDBAutoField::KexiDBAutoField(TQWidget *tqparent, const char *name, bool designMode, LabelPosition pos)
+ : TQWidget(tqparent, name)
, KexiFormDataItemInterface()
, KFormDesigner::DesignTimeDynamicChildWidgetHandler()
, d( new Private() )
{
d->designMode = designMode;
- init(QString::null/*i18n("Auto Field")*/, Auto, pos);
+ init(TQString()/*i18n("Auto Field")*/, Auto, pos);
}
KexiDBAutoField::~KexiDBAutoField()
@@ -101,14 +101,14 @@ KexiDBAutoField::~KexiDBAutoField()
}
void
-KexiDBAutoField::init(const QString &text, WidgetType type, LabelPosition pos)
+KexiDBAutoField::init(const TQString &text, WidgetType type, LabelPosition pos)
{
d->fieldTypeInternal = KexiDB::Field::InvalidType;
- d->layout = 0;
+ d->tqlayout = 0;
m_subwidget = 0;
- d->label = new QLabel(text, this);
+ d->label = new TQLabel(text, this);
d->label->installEventFilter( this );
- //QFontMetrics fm( font() );
+ //TQFontMetrics fm( font() );
//d->label->setFixedWidth( fm.width("This is a test string length") );
d->autoCaption = true;
d->focusPolicyChanged = false;
@@ -116,8 +116,8 @@ KexiDBAutoField::init(const QString &text, WidgetType type, LabelPosition pos)
d->widgetType_property = (type==Auto ? Text : type); //to force "differ" to be true in setWidgetType()
setLabelPosition(pos);
setWidgetType(type);
- d->baseColor = palette().active().base();
- d->textColor = palette().active().text();
+ d->baseColor = tqpalette().active().base();
+ d->textColor = tqpalette().active().text();
}
void
@@ -142,10 +142,10 @@ void
KexiDBAutoField::createEditor()
{
if(m_subwidget) {
- delete (QWidget *)m_subwidget;
+ delete (TQWidget *)m_subwidget;
}
- QWidget *newSubwidget;
+ TQWidget *newSubwidget;
switch( d->widgetType ) {
case Text:
case Double: //! @todo setup validator
@@ -153,19 +153,19 @@ KexiDBAutoField::createEditor()
case Date:
case Time:
case DateTime:
- newSubwidget = new KexiDBLineEdit( this, QCString("KexiDBAutoField_KexiDBLineEdit:")+name() );
+ newSubwidget = new KexiDBLineEdit( this, TQCString("KexiDBAutoField_KexiDBLineEdit:")+name() );
break;
case MultiLineText:
- newSubwidget = new KexiDBTextEdit( this, QCString("KexiDBAutoField_KexiDBTextEdit:")+name() );
+ newSubwidget = new KexiDBTextEdit( this, TQCString("KexiDBAutoField_KexiDBTextEdit:")+name() );
break;
case Boolean:
- newSubwidget = new KexiDBCheckBox(dataSource(), this, QCString("KexiDBAutoField_KexiDBCheckBox:")+name());
+ newSubwidget = new KexiDBCheckBox(dataSource(), this, TQCString("KexiDBAutoField_KexiDBCheckBox:")+name());
break;
case Image:
- newSubwidget = new KexiDBImageBox(d->designMode, this, QCString("KexiDBAutoField_KexiDBImageBox:")+name());
+ newSubwidget = new KexiDBImageBox(d->designMode, this, TQCString("KexiDBAutoField_KexiDBImageBox:")+name());
break;
case ComboBox:
- newSubwidget = new KexiDBComboBox(this, QCString("KexiDBAutoField_KexiDBComboBox:")+name(), d->designMode);
+ newSubwidget = new KexiDBComboBox(this, TQCString("KexiDBAutoField_KexiDBComboBox:")+name(), d->designMode);
break;
default:
newSubwidget = 0;
@@ -176,7 +176,7 @@ KexiDBAutoField::createEditor()
setSubwidget( newSubwidget ); //this will also allow to declare subproperties, see KFormDesigner::WidgetWithSubpropertiesInterface
if(newSubwidget) {
- newSubwidget->setName( QCString("KexiDBAutoField_") + newSubwidget->className() );
+ newSubwidget->setName( TQCString("KexiDBAutoField_") + newSubwidget->className() );
dynamic_cast<KexiDataItemInterface*>(newSubwidget)->setParentDataItemInterface(this);
dynamic_cast<KexiFormDataItemInterface*>(newSubwidget)
->setColumnInfo(columnInfo()); //needed at least by KexiDBImageBox
@@ -190,11 +190,11 @@ KexiDBAutoField::createEditor()
newSubwidget->setFocusPolicy(focusPolicy());
}
else {//if focusPolicy is not changed at top level, inherit it from editor
- QWidget::setFocusPolicy(newSubwidget->focusPolicy());
+ TQWidget::setFocusPolicy(newSubwidget->focusPolicy());
}
setFocusProxy(newSubwidget); //ok?
- if (parentWidget())
- newSubwidget->setPalette( qApp->palette() );
+ if (tqparentWidget())
+ newSubwidget->setPalette( tqApp->palette() );
copyPropertiesToEditor();
// KFormDesigner::installRecursiveEventFilter(newSubwidget, this);
}
@@ -207,12 +207,12 @@ void KexiDBAutoField::copyPropertiesToEditor()
if (m_subwidget) {
// kdDebug() << "KexiDBAutoField::copyPropertiesToEditor(): base col: " << d->baseColor.name() <<
// "; text col: " << d->textColor.name() << endl;
- QPalette p( m_subwidget->palette() );
- p.setColor( QPalette::Active, QColorGroup::Base, d->baseColor );
+ TQPalette p( m_subwidget->palette() );
+ p.setColor( TQPalette::Active, TQColorGroup::Base, d->baseColor );
if(d->widgetType == Boolean)
- p.setColor( QPalette::Active, QColorGroup::Foreground, d->textColor );
+ p.setColor( TQPalette::Active, TQColorGroup::Foreground, d->textColor );
else
- p.setColor( QPalette::Active, QColorGroup::Text, d->textColor );
+ p.setColor( TQPalette::Active, TQColorGroup::Text, d->textColor );
m_subwidget->setPalette(p);
//m_subwidget->setPaletteBackgroundColor( d->baseColor );
}
@@ -222,30 +222,30 @@ void
KexiDBAutoField::setLabelPosition(LabelPosition position)
{
d->lblPosition = position;
- if(d->layout) {
- QBoxLayout *lyr = d->layout;
- d->layout = 0;
+ if(d->tqlayout) {
+ TQBoxLayout *lyr = d->tqlayout;
+ d->tqlayout = 0;
delete lyr;
}
if(m_subwidget)
m_subwidget->show();
- //! \todo support right-to-left layout where positions are inverted
+ //! \todo support right-to-left tqlayout where positions are inverted
if (position==Top || position==Left) {
- int align = d->label->alignment();
+ int align = d->label->tqalignment();
if(position == Top) {
- d->layout = (QBoxLayout*) new QVBoxLayout(this);
+ d->tqlayout = (TQBoxLayout*) new TQVBoxLayout(this);
align |= AlignVertical_Mask;
align ^= AlignVertical_Mask;
align |= AlignTop;
}
else {
- d->layout = (QBoxLayout*) new QHBoxLayout(this);
+ d->tqlayout = (TQBoxLayout*) new TQHBoxLayout(this);
align |= AlignVertical_Mask;
align ^= AlignVertical_Mask;
align |= AlignVCenter;
}
- d->label->setAlignment(align);
+ d->label->tqsetAlignment(align);
if(d->widgetType == Boolean
|| (d->widgetType == Auto && fieldTypeInternal() == KexiDB::Field::InvalidType && !d->designMode))
{
@@ -254,55 +254,55 @@ KexiDBAutoField::setLabelPosition(LabelPosition position)
else {
d->label->show();
}
- d->layout->addWidget(d->label, 0, position == Top ? int(Qt::AlignLeft) : 0);
+ d->tqlayout->addWidget(d->label, 0, position == Top ? int(TQt::AlignLeft) : 0);
if(position == Left && d->widgetType != Boolean)
- d->layout->addSpacing(KexiDBAutoField_SPACING);
- d->layout->addWidget(m_subwidget, 1);
- KexiSubwidgetInterface *subwidgetInterface = dynamic_cast<KexiSubwidgetInterface*>((QWidget*)m_subwidget);
+ d->tqlayout->addSpacing(KexiDBAutoField_SPACING);
+ d->tqlayout->addWidget(m_subwidget, 1);
+ KexiSubwidgetInterface *subwidgetInterface = dynamic_cast<KexiSubwidgetInterface*>((TQWidget*)m_subwidget);
if (subwidgetInterface) {
if (subwidgetInterface->appendStretchRequired(this))
- d->layout->addStretch(0);
+ d->tqlayout->addStretch(0);
if (subwidgetInterface->subwidgetStretchRequired(this)) {
- QSizePolicy sizePolicy( m_subwidget->sizePolicy() );
+ TQSizePolicy sizePolicy( m_subwidget->tqsizePolicy() );
if(position == Left) {
- sizePolicy.setHorData( QSizePolicy::Minimum );
- d->label->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
+ sizePolicy.setHorData( TQSizePolicy::Minimum );
+ d->label->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred);
}
else {
- sizePolicy.setVerData( QSizePolicy::Minimum );
- d->label->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+ sizePolicy.setVerData( TQSizePolicy::Minimum );
+ d->label->tqsetSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed);
}
- m_subwidget->setSizePolicy(sizePolicy);
+ m_subwidget->tqsetSizePolicy(sizePolicy);
}
}
// if(m_subwidget)
- // m_subwidget->setSizePolicy(...);
+ // m_subwidget->tqsetSizePolicy(...);
}
else {
- d->layout = (QBoxLayout*) new QHBoxLayout(this);
+ d->tqlayout = (TQBoxLayout*) new TQHBoxLayout(this);
d->label->hide();
- d->layout->addWidget(m_subwidget);
+ d->tqlayout->addWidget(m_subwidget);
}
- //a hack to force layout to be refreshed (any better idea for this?)
- resize(size()+QSize(1,0));
- resize(size()-QSize(1,0));
- if (dynamic_cast<KexiDBAutoField*>((QWidget*)m_subwidget)) {
+ //a hack to force tqlayout to be refreshed (any better idea for this?)
+ resize(size()+TQSize(1,0));
+ resize(size()-TQSize(1,0));
+ if (dynamic_cast<KexiDBAutoField*>((TQWidget*)m_subwidget)) {
//needed for KexiDBComboBox
- dynamic_cast<KexiDBAutoField*>((QWidget*)m_subwidget)->setLabelPosition(position);
+ dynamic_cast<KexiDBAutoField*>((TQWidget*)m_subwidget)->setLabelPosition(position);
}
}
void
-KexiDBAutoField::setInvalidState( const QString &text )
+KexiDBAutoField::setInvalidState( const TQString &text )
{
- // Widget with an invalid dataSource is just a QLabel
+ // Widget with an invalid dataSource is just a TQLabel
if (d->designMode)
return;
d->widgetType = Auto;
createEditor();
- setFocusPolicy(QWidget::NoFocus);
+ setFocusPolicy(TQ_NoFocus);
if (m_subwidget)
- m_subwidget->setFocusPolicy(QWidget::NoFocus);
+ m_subwidget->setFocusPolicy(TQ_NoFocus);
//! @todo or set this to editor's text?
d->label->setText( text );
}
@@ -310,7 +310,7 @@ KexiDBAutoField::setInvalidState( const QString &text )
bool
KexiDBAutoField::isReadOnly() const
{
- KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((QWidget*)m_subwidget);
+ KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((TQWidget*)m_subwidget);
if(iface)
return iface->isReadOnly();
else
@@ -320,33 +320,33 @@ KexiDBAutoField::isReadOnly() const
void
KexiDBAutoField::setReadOnly( bool readOnly )
{
- KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((QWidget*)m_subwidget);
+ KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((TQWidget*)m_subwidget);
if(iface)
iface->setReadOnly(readOnly);
}
void
-KexiDBAutoField::setValueInternal(const QVariant& add, bool removeOld)
+KexiDBAutoField::setValueInternal(const TQVariant& add, bool removeOld)
{
- KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((QWidget*)m_subwidget);
+ KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((TQWidget*)m_subwidget);
if(iface)
iface->setValue(m_origValue, add, removeOld);
// iface->setValueInternal(add, removeOld);
}
-QVariant
+TQVariant
KexiDBAutoField::value()
{
- KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((QWidget*)m_subwidget);
+ KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((TQWidget*)m_subwidget);
if(iface)
return iface->value();
- return QVariant();
+ return TQVariant();
}
bool
KexiDBAutoField::valueIsNull()
{
- KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((QWidget*)m_subwidget);
+ KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((TQWidget*)m_subwidget);
if(iface)
return iface->valueIsNull();
return true;
@@ -355,7 +355,7 @@ KexiDBAutoField::valueIsNull()
bool
KexiDBAutoField::valueIsEmpty()
{
- KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((QWidget*)m_subwidget);
+ KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((TQWidget*)m_subwidget);
if(iface)
return iface->valueIsEmpty();
return true;
@@ -364,7 +364,7 @@ KexiDBAutoField::valueIsEmpty()
bool
KexiDBAutoField::valueIsValid()
{
- KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((QWidget*)m_subwidget);
+ KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((TQWidget*)m_subwidget);
if(iface)
return iface->valueIsValid();
return true;
@@ -373,7 +373,7 @@ KexiDBAutoField::valueIsValid()
bool
KexiDBAutoField::valueChanged()
{
- KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((QWidget*)m_subwidget);
+ KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((TQWidget*)m_subwidget);
kexipluginsdbg << m_origValue << endl;
if(iface)
return iface->valueChanged();
@@ -384,7 +384,7 @@ void
KexiDBAutoField::installListener(KexiDataItemChangesListener* listener)
{
KexiFormDataItemInterface::installListener(listener);
- KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((QWidget*)m_subwidget);
+ KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((TQWidget*)m_subwidget);
if(iface)
iface->installListener(listener);
}
@@ -399,7 +399,7 @@ KexiDBAutoField::LabelPosition KexiDBAutoField::labelPosition() const
return d->lblPosition;
}
-QString KexiDBAutoField::caption() const
+TQString KexiDBAutoField::caption() const
{
return d->caption;
}
@@ -409,12 +409,12 @@ bool KexiDBAutoField::hasAutoCaption() const
return d->autoCaption;
}
-QWidget* KexiDBAutoField::editor() const
+TQWidget* KexiDBAutoField::editor() const
{
return m_subwidget;
}
-QLabel* KexiDBAutoField::label() const
+TQLabel* KexiDBAutoField::label() const
{
return d->label;
}
@@ -424,7 +424,7 @@ int KexiDBAutoField::fieldTypeInternal() const
return d->fieldTypeInternal;
}
-QString KexiDBAutoField::fieldCaptionInternal() const
+TQString KexiDBAutoField::fieldCaptionInternal() const
{
return d->fieldCaptionInternal;
}
@@ -432,7 +432,7 @@ QString KexiDBAutoField::fieldCaptionInternal() const
bool
KexiDBAutoField::cursorAtStart()
{
- KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((QWidget*)m_subwidget);
+ KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((TQWidget*)m_subwidget);
if(iface)
return iface->cursorAtStart();
return false;
@@ -441,7 +441,7 @@ KexiDBAutoField::cursorAtStart()
bool
KexiDBAutoField::cursorAtEnd()
{
- KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((QWidget*)m_subwidget);
+ KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((TQWidget*)m_subwidget);
if(iface)
return iface->cursorAtEnd();
return false;
@@ -450,7 +450,7 @@ KexiDBAutoField::cursorAtEnd()
void
KexiDBAutoField::clear()
{
- KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((QWidget*)m_subwidget);
+ KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((TQWidget*)m_subwidget);
if(iface)
iface->clear();
}
@@ -480,11 +480,11 @@ KexiDBAutoField::setFieldTypeInternal(int kexiDBFieldType)
}
void
-KexiDBAutoField::setFieldCaptionInternal(const QString& text)
+KexiDBAutoField::setFieldCaptionInternal(const TQString& text)
{
d->fieldCaptionInternal = text;
//change text only if autocaption is set and no columnInfo is available
- KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((QWidget*)m_subwidget);
+ KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((TQWidget*)m_subwidget);
if((!iface || !iface->columnInfo()) && d->autoCaption) {
changeText(d->fieldCaptionInternal);
}
@@ -522,7 +522,7 @@ KexiDBAutoField::setColumnInfoInternal(KexiDB::QueryColumnInfo* cinfo, KexiDB::Q
// update label's text
changeText((cinfo && d->autoCaption) ? cinfo->captionOrAliasOrName() : d->caption);
- KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((QWidget*)m_subwidget);
+ KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((TQWidget*)m_subwidget);
if(iface)
iface->setColumnInfo(visibleColumnInfo);
}
@@ -564,15 +564,15 @@ KexiDBAutoField::widgetTypeForFieldType(KexiDB::Field::Type type)
}
void
-KexiDBAutoField::changeText(const QString &text, bool beautify)
+KexiDBAutoField::changeText(const TQString &text, bool beautify)
{
- QString realText;
+ TQString realText;
bool unbound = false;
if (d->autoCaption && (d->widgetType==Auto || dataSource().isEmpty())) {
if (d->designMode)
- realText = QString::fromLatin1(name())+" "+i18n("Unbound Auto Field", "(unbound)");
+ realText = TQString::tqfromLatin1(name())+" "+i18n("Unbound Auto Field", "(unbound)");
else
- realText = QString::null;
+ realText = TQString();
unbound = true;
}
else {
@@ -584,7 +584,7 @@ KexiDBAutoField::changeText(const QString &text, bool beautify)
realText = text[0].upper() + text.mid(1);
if (d->widgetType!=Boolean) {
//! @todo ":" suffix looks weird for checkbox; remove this condition when [x] is displayed _after_ label
-//! @todo support right-to-left layout where position of ":" is inverted
+//! @todo support right-to-left tqlayout where position of ":" is inverted
realText += ": ";
}
}
@@ -594,12 +594,12 @@ KexiDBAutoField::changeText(const QString &text, bool beautify)
}
if (unbound)
- d->label->setAlignment( Qt::AlignCenter | Qt::WordBreak );
+ d->label->tqsetAlignment( TQt::AlignCenter | TQt::WordBreak );
else
- d->label->setAlignment( Qt::AlignCenter );
-// QWidget* widgetToAlterForegroundColor;
+ d->label->tqsetAlignment( TQt::AlignCenter );
+// TQWidget* widgetToAlterForegroundColor;
if(d->widgetType == Boolean) {
- static_cast<QCheckBox*>((QWidget*)m_subwidget)->setText(realText);
+ static_cast<TQCheckBox*>((TQWidget*)m_subwidget)->setText(realText);
// widgetToAlterForegroundColor = m_subwidget;
}
else {
@@ -617,7 +617,7 @@ KexiDBAutoField::changeText(const QString &text, bool beautify)
}
void
-KexiDBAutoField::setCaption(const QString &caption)
+KexiDBAutoField::setCaption(const TQString &caption)
{
d->caption = caption;
if(!d->autoCaption && !caption.isEmpty())
@@ -629,7 +629,7 @@ KexiDBAutoField::setAutoCaption(bool autoCaption)
{
d->autoCaption = autoCaption;
if(d->autoCaption) {
- //d->caption = QString::null;
+ //d->caption = TQString();
if(columnInfo()) {
changeText(columnInfo()->captionOrAliasOrName());
}
@@ -642,35 +642,35 @@ KexiDBAutoField::setAutoCaption(bool autoCaption)
}
void
-KexiDBAutoField::setDataSource( const QString &ds ) {
+KexiDBAutoField::setDataSource( const TQString &ds ) {
KexiFormDataItemInterface::setDataSource(ds);
if (ds.isEmpty()) {
setColumnInfo(0);
}
}
-QSize
-KexiDBAutoField::sizeHint() const
+TQSize
+KexiDBAutoField::tqsizeHint() const
{
if (d->lblPosition == NoLabel)
- return m_subwidget ? m_subwidget->sizeHint() : QWidget::sizeHint();
+ return m_subwidget ? m_subwidget->tqsizeHint() : TQWidget::tqsizeHint();
- QSize s1(0,0);
+ TQSize s1(0,0);
if (m_subwidget)
- s1 = m_subwidget->sizeHint();
- QSize s2(d->label->sizeHint());
+ s1 = m_subwidget->tqsizeHint();
+ TQSize s2(d->label->tqsizeHint());
if (d->lblPosition == Top)
- return QSize(QMAX(s1.width(), s2.width()), s1.height()+KexiDBAutoField_SPACING+s2.height());
+ return TQSize(TQMAX(s1.width(), s2.width()), s1.height()+KexiDBAutoField_SPACING+s2.height());
//left
- return QSize(s1.width()+KexiDBAutoField_SPACING+s2.width(), QMAX(s1.height(), s2.height()));
+ return TQSize(s1.width()+KexiDBAutoField_SPACING+s2.width(), TQMAX(s1.height(), s2.height()));
}
void
-KexiDBAutoField::setFocusPolicy( FocusPolicy policy )
+KexiDBAutoField::setFocusPolicy( TQ_FocusPolicy policy )
{
d->focusPolicyChanged = true;
- QWidget::setFocusPolicy(policy);
+ TQWidget::setFocusPolicy(policy);
d->label->setFocusPolicy(policy);
if (m_subwidget)
m_subwidget->setFocusPolicy(policy);
@@ -682,31 +682,31 @@ KexiDBAutoField::updateInformationAboutUnboundField()
if ( (d->autoCaption && (dataSource().isEmpty() || dataSourceMimeType().isEmpty()))
|| (!d->autoCaption && d->caption.isEmpty()) )
{
- d->label->setText( QString::fromLatin1(name())+" "+i18n("Unbound Auto Field", " (unbound)") );
+ d->label->setText( TQString::tqfromLatin1(name())+" "+i18n("Unbound Auto Field", " (unbound)") );
}
// else
-// d->label->setText( QString::fromLatin1(name())+" "+i18n(" (unbound)") );
+// d->label->setText( TQString::tqfromLatin1(name())+" "+i18n(" (unbound)") );
}
/*void
-KexiDBAutoField::paintEvent( QPaintEvent* pe )
+KexiDBAutoField::paintEvent( TQPaintEvent* pe )
{
- QWidget::paintEvent( pe );
+ TQWidget::paintEvent( pe );
if ( (d->autoCaption && (dataSource().isEmpty() || dataSourceMimeType().isEmpty()))
|| (!d->autoCaption && d->caption.isEmpty()) )
{
- QPainter p(this);
+ TQPainter p(this);
p.setPen( d->label->paletteForegroundColor() );
p.setClipRect(pe->rect());
p.setFont(d->label->font());
- p.drawText(rect(), Qt::AlignLeft | Qt::WordBreak,
- QString::fromLatin1(name())+" "+i18n(" (unbound)"));
+ p.drawText(rect(), TQt::AlignLeft | TQt::WordBreak,
+ TQString::tqfromLatin1(name())+" "+i18n(" (unbound)"));
}
}*/
void
-KexiDBAutoField::paletteChange( const QPalette& oldPal )
+KexiDBAutoField::paletteChange( const TQPalette& oldPal )
{
Q_UNUSED(oldPal);
d->label->setPalette( palette() );
@@ -714,35 +714,35 @@ KexiDBAutoField::paletteChange( const QPalette& oldPal )
void KexiDBAutoField::unsetPalette()
{
- QWidget::unsetPalette();
+ TQWidget::unsetPalette();
}
// ===== methods below are just proxies for the internal editor or label =====
-const QColor & KexiDBAutoField::paletteForegroundColor() const
+const TQColor & KexiDBAutoField::paletteForegroundColor() const
{
return d->textColor;
}
-void KexiDBAutoField::setPaletteForegroundColor( const QColor & color )
+void KexiDBAutoField::setPaletteForegroundColor( const TQColor & color )
{
d->textColor = color;
copyPropertiesToEditor();
}
-const QColor & KexiDBAutoField::paletteBackgroundColor() const
+const TQColor & KexiDBAutoField::paletteBackgroundColor() const
{
return d->baseColor;
}
-void KexiDBAutoField::setPaletteBackgroundColor( const QColor & color )
+void KexiDBAutoField::setPaletteBackgroundColor( const TQColor & color )
{
d->baseColor = color;
copyPropertiesToEditor();
}
-const QColor & KexiDBAutoField::foregroundLabelColor() const
+const TQColor & KexiDBAutoField::foregroundLabelColor() const
{
if(d->widgetType == Boolean)
return paletteForegroundColor();
@@ -750,17 +750,17 @@ const QColor & KexiDBAutoField::foregroundLabelColor() const
return d->label->paletteForegroundColor();
}
-void KexiDBAutoField::setForegroundLabelColor( const QColor & color )
+void KexiDBAutoField::setForegroundLabelColor( const TQColor & color )
{
if(d->widgetType == Boolean)
setPaletteForegroundColor(color);
else {
d->label->setPaletteForegroundColor(color);
- QWidget::setPaletteForegroundColor(color);
+ TQWidget::setPaletteForegroundColor(color);
}
}
-const QColor & KexiDBAutoField::backgroundLabelColor() const
+const TQColor & KexiDBAutoField::backgroundLabelColor() const
{
if(d->widgetType == Boolean)
return paletteBackgroundColor();
@@ -768,76 +768,76 @@ const QColor & KexiDBAutoField::backgroundLabelColor() const
return d->label->paletteBackgroundColor();
}
-void KexiDBAutoField::setBackgroundLabelColor( const QColor & color )
+void KexiDBAutoField::setBackgroundLabelColor( const TQColor & color )
{
if(d->widgetType == Boolean)
setPaletteBackgroundColor(color);
else {
d->label->setPaletteBackgroundColor(color);
- QWidget::setPaletteBackgroundColor(color);
+ TQWidget::setPaletteBackgroundColor(color);
}
// if (m_subwidget)
-// m_subwidget->setPalette( qApp->palette() );
+// m_subwidget->setPalette( tqApp->palette() );
}
-QVariant KexiDBAutoField::property( const char * name ) const
+TQVariant KexiDBAutoField::property( const char * name ) const
{
bool ok;
- QVariant val = KFormDesigner::WidgetWithSubpropertiesInterface::subproperty(name, ok);
+ TQVariant val = KFormDesigner::WidgetWithSubpropertiesInterface::subproperty(name, ok);
if (ok)
return val;
- return QWidget::property(name);
+ return TQWidget::property(name);
}
-bool KexiDBAutoField::setProperty( const char * name, const QVariant & value )
+bool KexiDBAutoField::setProperty( const char * name, const TQVariant & value )
{
bool ok = KFormDesigner::WidgetWithSubpropertiesInterface::setSubproperty(name, value);
if (ok)
return true;
- return QWidget::setProperty(name, value);
+ return TQWidget::setProperty(name, value);
}
-bool KexiDBAutoField::eventFilter( QObject *o, QEvent *e )
+bool KexiDBAutoField::eventFilter( TQObject *o, TQEvent *e )
{
- if (o==d->label && d->label->buddy() && e->type()==QEvent::MouseButtonRelease) {
+ if (TQT_BASE_OBJECT(o)==TQT_BASE_OBJECT(d->label) && d->label->buddy() && e->type()==TQEvent::MouseButtonRelease) {
//focus label's buddy when user clicked the label
d->label->buddy()->setFocus();
}
- return QWidget::eventFilter(o, e);
+ return TQWidget::eventFilter(o, e);
}
-void KexiDBAutoField::setDisplayDefaultValue(QWidget* widget, bool displayDefaultValue)
+void KexiDBAutoField::setDisplayDefaultValue(TQWidget* widget, bool displayDefaultValue)
{
KexiFormDataItemInterface::setDisplayDefaultValue(widget, displayDefaultValue);
- if (dynamic_cast<KexiFormDataItemInterface*>((QWidget*)m_subwidget))
- dynamic_cast<KexiFormDataItemInterface*>((QWidget*)m_subwidget)->setDisplayDefaultValue(m_subwidget, displayDefaultValue);
+ if (dynamic_cast<KexiFormDataItemInterface*>((TQWidget*)m_subwidget))
+ dynamic_cast<KexiFormDataItemInterface*>((TQWidget*)m_subwidget)->setDisplayDefaultValue(m_subwidget, displayDefaultValue);
}
void KexiDBAutoField::moveCursorToEnd()
{
- KexiDataItemInterface *iface = dynamic_cast<KexiDataItemInterface*>((QWidget*)m_subwidget);
+ KexiDataItemInterface *iface = dynamic_cast<KexiDataItemInterface*>((TQWidget*)m_subwidget);
if (iface)
iface->moveCursorToEnd();
}
void KexiDBAutoField::moveCursorToStart()
{
- KexiDataItemInterface *iface = dynamic_cast<KexiDataItemInterface*>((QWidget*)m_subwidget);
+ KexiDataItemInterface *iface = dynamic_cast<KexiDataItemInterface*>((TQWidget*)m_subwidget);
if (iface)
iface->moveCursorToStart();
}
void KexiDBAutoField::selectAll()
{
- KexiDataItemInterface *iface = dynamic_cast<KexiDataItemInterface*>((QWidget*)m_subwidget);
+ KexiDataItemInterface *iface = dynamic_cast<KexiDataItemInterface*>((TQWidget*)m_subwidget);
if (iface)
iface->selectAll();
}
-bool KexiDBAutoField::keyPressed(QKeyEvent *ke)
+bool KexiDBAutoField::keyPressed(TQKeyEvent *ke)
{
- KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((QWidget*)m_subwidget);
+ KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((TQWidget*)m_subwidget);
if (iface && iface->keyPressed(ke))
return true;
return false;
diff --git a/kexi/plugins/forms/widgets/kexidbautofield.h b/kexi/plugins/forms/widgets/kexidbautofield.h
index 981a0519..f13e701e 100644
--- a/kexi/plugins/forms/widgets/kexidbautofield.h
+++ b/kexi/plugins/forms/widgets/kexidbautofield.h
@@ -22,39 +22,40 @@
#ifndef KEXIDBAUTOFIELD_H
#define KEXIDBAUTOFIELD_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kexidb/field.h>
#include <formeditor/container.h>
#include <formeditor/widgetwithsubpropertiesinterface.h>
#include "kexiformdataiteminterface.h"
-class QBoxLayout;
-class QLabel;
+class TQBoxLayout;
+class TQLabel;
//! Universal "Auto Field" widget for Kexi forms
/*! It acts as a container for most data-aware widgets. */
class KEXIFORMUTILS_EXPORT KexiDBAutoField :
- public QWidget,
+ public TQWidget,
public KexiFormDataItemInterface,
public KFormDesigner::DesignTimeDynamicChildWidgetHandler,
public KFormDesigner::WidgetWithSubpropertiesInterface
{
Q_OBJECT
-//'caption' is uncovered now Q_PROPERTY(QString labelCaption READ caption WRITE setCaption DESIGNABLE true)
- Q_OVERRIDE(QString caption READ caption WRITE setCaption DESIGNABLE true)
- Q_OVERRIDE(QColor paletteForegroundColor READ paletteForegroundColor WRITE setPaletteForegroundColor DESIGNABLE true RESET unsetPalette)
- Q_OVERRIDE(QColor paletteBackgroundColor READ paletteBackgroundColor WRITE setPaletteBackgroundColor DESIGNABLE true RESET unsetPalette)
- Q_PROPERTY(QColor foregroundLabelColor READ foregroundLabelColor WRITE setForegroundLabelColor DESIGNABLE true RESET unsetPalette)
- Q_PROPERTY(QColor backgroundLabelColor READ backgroundLabelColor WRITE setBackgroundLabelColor DESIGNABLE true RESET unsetPalette)
- Q_PROPERTY(bool autoCaption READ hasAutoCaption WRITE setAutoCaption DESIGNABLE true)
- Q_PROPERTY(QString dataSource READ dataSource WRITE setDataSource DESIGNABLE true)
- Q_PROPERTY(QCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true)
- Q_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly )
- Q_PROPERTY(LabelPosition labelPosition READ labelPosition WRITE setLabelPosition DESIGNABLE true)
- Q_PROPERTY(WidgetType widgetType READ widgetType WRITE setWidgetType DESIGNABLE true)
+ TQ_OBJECT
+//'caption' is uncovered now TQ_PROPERTY(TQString labelCaption READ caption WRITE setCaption DESIGNABLE true)
+ TQ_OVERRIDE(TQString caption READ caption WRITE setCaption DESIGNABLE true)
+ TQ_OVERRIDE(TQColor paletteForegroundColor READ paletteForegroundColor WRITE setPaletteForegroundColor DESIGNABLE true RESET unsetPalette)
+ TQ_OVERRIDE(TQColor paletteBackgroundColor READ paletteBackgroundColor WRITE setPaletteBackgroundColor DESIGNABLE true RESET unsetPalette)
+ TQ_PROPERTY(TQColor foregroundLabelColor READ foregroundLabelColor WRITE setForegroundLabelColor DESIGNABLE true RESET unsetPalette)
+ TQ_PROPERTY(TQColor backgroundLabelColor READ backgroundLabelColor WRITE setBackgroundLabelColor DESIGNABLE true RESET unsetPalette)
+ TQ_PROPERTY(bool autoCaption READ hasAutoCaption WRITE setAutoCaption DESIGNABLE true)
+ TQ_PROPERTY(TQString dataSource READ dataSource WRITE setDataSource DESIGNABLE true)
+ TQ_PROPERTY(TQCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true)
+ TQ_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly )
+ TQ_PROPERTY(LabelPosition labelPosition READ labelPosition WRITE setLabelPosition DESIGNABLE true)
+ TQ_PROPERTY(WidgetType widgetType READ widgetType WRITE setWidgetType DESIGNABLE true)
/*internal, for design time only*/
- Q_PROPERTY(int fieldTypeInternal READ fieldTypeInternal WRITE setFieldTypeInternal DESIGNABLE true STORED false)
- Q_PROPERTY(QString fieldCaptionInternal READ fieldCaptionInternal WRITE setFieldCaptionInternal DESIGNABLE true STORED false)
+ TQ_PROPERTY(int fieldTypeInternal READ fieldTypeInternal WRITE setFieldTypeInternal DESIGNABLE true STORED false)
+ TQ_PROPERTY(TQString fieldCaptionInternal READ fieldCaptionInternal WRITE setFieldCaptionInternal DESIGNABLE true STORED false)
Q_ENUMS( WidgetType LabelPosition )
public:
@@ -62,24 +63,24 @@ class KEXIFORMUTILS_EXPORT KexiDBAutoField :
MultiLineText, ComboBox, Image };
enum LabelPosition { Left = 300, Top, NoLabel };
- KexiDBAutoField(const QString &text, WidgetType type, LabelPosition pos,
- QWidget *parent = 0, const char *name = 0, bool designMode = true);
- KexiDBAutoField(QWidget *parent = 0, const char *name = 0, bool designMode = true,
+ KexiDBAutoField(const TQString &text, WidgetType type, LabelPosition pos,
+ TQWidget *tqparent = 0, const char *name = 0, bool designMode = true);
+ KexiDBAutoField(TQWidget *tqparent = 0, const char *name = 0, bool designMode = true,
LabelPosition pos = Left);
virtual ~KexiDBAutoField();
- inline QString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
- inline QCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
- virtual void setDataSource( const QString &ds );
- virtual void setDataSourceMimeType(const QCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
+ inline TQString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
+ inline TQCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
+ virtual void setDataSource( const TQString &ds );
+ virtual void setDataSourceMimeType(const TQCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
virtual void setColumnInfo(KexiDB::QueryColumnInfo* cinfo);
- virtual void setInvalidState(const QString& text);
+ virtual void setInvalidState(const TQString& text);
virtual bool isReadOnly() const;
virtual void setReadOnly( bool readOnly );
- virtual QVariant value();
+ virtual TQVariant value();
virtual bool valueIsNull();
virtual bool valueIsEmpty();
virtual bool valueIsValid();
@@ -95,8 +96,8 @@ class KEXIFORMUTILS_EXPORT KexiDBAutoField :
LabelPosition labelPosition() const;
virtual void setLabelPosition(LabelPosition position);
- QString caption() const;
- void setCaption(const QString &caption);
+ TQString caption() const;
+ void setCaption(const TQString &caption);
bool hasAutoCaption() const;
void setAutoCaption(bool autoCaption);
@@ -105,10 +106,10 @@ class KEXIFORMUTILS_EXPORT KexiDBAutoField :
is displayed in a special way. Used by KexiFormDataProvider::fillDataItems().
\a widget is equal to 'this'.
Reimplemented after KexiFormDataItemInterface. */
- virtual void setDisplayDefaultValue(QWidget* widget, bool displayDefaultValue);
+ virtual void setDisplayDefaultValue(TQWidget* widget, bool displayDefaultValue);
- QWidget* editor() const;
- QLabel* label() const;
+ TQWidget* editor() const;
+ TQLabel* label() const;
virtual bool cursorAtStart();
virtual bool cursorAtEnd();
@@ -123,56 +124,56 @@ class KEXIFORMUTILS_EXPORT KexiDBAutoField :
/*! On design time it is not possible to pass a reference to KexiDB::Field object
so we're just providing field caption. Only used when widget type is Auto.
@internal */
- void setFieldCaptionInternal(const QString& text);
+ void setFieldCaptionInternal(const TQString& text);
/*! @internal */
int fieldTypeInternal() const;
/*! @internal */
- QString fieldCaptionInternal() const;
+ TQString fieldCaptionInternal() const;
- virtual QSize sizeHint() const;
- virtual void setFocusPolicy ( FocusPolicy policy );
+ virtual TQSize tqsizeHint() const;
+ virtual void setFocusPolicy ( TQ_FocusPolicy policy );
//! Reimplemented to return internal editor's color.
- const QColor & paletteForegroundColor() const;
+ const TQColor & paletteForegroundColor() const;
//! Reimplemented to set internal editor's color.
- void setPaletteForegroundColor( const QColor & color );
+ void setPaletteForegroundColor( const TQColor & color );
//! Reimplemented to return internal editor's color.
- const QColor & paletteBackgroundColor() const;
+ const TQColor & paletteBackgroundColor() const;
//! Reimplemented to set internal editor's color.
- virtual void setPaletteBackgroundColor( const QColor & color );
+ virtual void setPaletteBackgroundColor( const TQColor & color );
//! \return label's foreground color
- const QColor & foregroundLabelColor() const;
+ const TQColor & foregroundLabelColor() const;
//! Sets label's foreground color
- virtual void setForegroundLabelColor( const QColor & color );
+ virtual void setForegroundLabelColor( const TQColor & color );
//! \return label's background color
- const QColor & backgroundLabelColor() const;
+ const TQColor & backgroundLabelColor() const;
//! Sets label's background color
- virtual void setBackgroundLabelColor( const QColor & color );
+ virtual void setBackgroundLabelColor( const TQColor & color );
//! Reimplemented to accept subproperties. @see KFormDesigner::WidgetWithSubpropertiesInterface
- virtual QVariant property( const char * name ) const;
+ virtual TQVariant property( const char * name ) const;
//! Reimplemented to accept subproperties. @see KFormDesigner::WidgetWithSubpropertiesInterface
- virtual bool setProperty( const char * name, const QVariant & value );
+ virtual bool setProperty( const char * name, const TQVariant & value );
/*! Called by the top-level form on key press event to consume widget-specific shortcuts. */
- virtual bool keyPressed(QKeyEvent *ke);
+ virtual bool keyPressed(TQKeyEvent *ke);
public slots:
virtual void unsetPalette();
protected slots:
// void slotValueChanged();
- virtual void paletteChange( const QPalette& oldPal );
+ virtual void paletteChange( const TQPalette& oldPal );
//! Implemented for KexiDataItemInterface
virtual void moveCursorToEnd();
@@ -184,17 +185,17 @@ class KEXIFORMUTILS_EXPORT KexiDBAutoField :
virtual void selectAll();
protected:
- virtual void setValueInternal(const QVariant&add, bool removeOld);
- void init(const QString &text, WidgetType type, LabelPosition pos);
+ virtual void setValueInternal(const TQVariant&add, bool removeOld);
+ void init(const TQString &text, WidgetType type, LabelPosition pos);
virtual void createEditor();
- void changeText(const QString &text, bool beautify = true);
-// virtual void paintEvent( QPaintEvent* pe );
+ void changeText(const TQString &text, bool beautify = true);
+// virtual void paintEvent( TQPaintEvent* pe );
void updateInformationAboutUnboundField();
//! internal editor can be created too late, so certain properties should be copied
void copyPropertiesToEditor();
- virtual bool eventFilter( QObject *o, QEvent *e );
+ virtual bool eventFilter( TQObject *o, TQEvent *e );
//! Used by @ref setLabelPositionInternal(LabelPosition)
void setLabelPositionInternal(LabelPosition position, bool noLabel);
diff --git a/kexi/plugins/forms/widgets/kexidbcheckbox.cpp b/kexi/plugins/forms/widgets/kexidbcheckbox.cpp
index 6b63851a..c704a985 100644
--- a/kexi/plugins/forms/widgets/kexidbcheckbox.cpp
+++ b/kexi/plugins/forms/widgets/kexidbcheckbox.cpp
@@ -23,29 +23,29 @@
#include <kexiutils/utils.h>
#include <kexidb/queryschema.h>
-KexiDBCheckBox::KexiDBCheckBox(const QString &text, QWidget *parent, const char *name)
- : QCheckBox(text, parent, name), KexiFormDataItemInterface()
+KexiDBCheckBox::KexiDBCheckBox(const TQString &text, TQWidget *tqparent, const char *name)
+ : TQCheckBox(text, tqparent, name), KexiFormDataItemInterface()
, m_invalidState(false)
, m_tristateChanged(false)
, m_tristate(TristateDefault)
{
- setFocusPolicy(QWidget::StrongFocus);
+ setFocusPolicy(TQ_StrongFocus);
updateTristate();
- connect(this, SIGNAL(stateChanged(int)), this, SLOT(slotStateChanged(int)));
+ connect(this, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(slotStateChanged(int)));
}
KexiDBCheckBox::~KexiDBCheckBox()
{
}
-void KexiDBCheckBox::setInvalidState( const QString& displayText )
+void KexiDBCheckBox::setInvalidState( const TQString& displayText )
{
setEnabled(false);
setState(NoChange);
m_invalidState = true;
//! @todo move this to KexiDataItemInterface::setInvalidStateInternal() ?
- if (focusPolicy() & TabFocus)
- setFocusPolicy(QWidget::ClickFocus);
+ if (focusPolicy() & TQ_TabFocus)
+ setFocusPolicy(TQ_ClickFocus);
setText(displayText);
}
@@ -54,7 +54,7 @@ KexiDBCheckBox::setEnabled(bool enabled)
{
if(enabled && m_invalidState)
return;
- QCheckBox::setEnabled(enabled);
+ TQCheckBox::setEnabled(enabled);
}
void
@@ -63,7 +63,7 @@ KexiDBCheckBox::setReadOnly(bool readOnly)
setEnabled(!readOnly);
}
-void KexiDBCheckBox::setValueInternal(const QVariant &add, bool removeOld)
+void KexiDBCheckBox::setValueInternal(const TQVariant &add, bool removeOld)
{
Q_UNUSED(add);
Q_UNUSED(removeOld);
@@ -73,12 +73,12 @@ void KexiDBCheckBox::setValueInternal(const QVariant &add, bool removeOld)
setState( m_origValue.toBool() ? On : Off );
}
-QVariant
+TQVariant
KexiDBCheckBox::value()
{
if (state()==NoChange)
- return QVariant();
- return QVariant(state()==On, 1);
+ return TQVariant();
+ return TQVariant(state()==On, 1);
}
void KexiDBCheckBox::slotStateChanged(int )
@@ -101,7 +101,7 @@ bool KexiDBCheckBox::isReadOnly() const
return !isEnabled();
}
-QWidget*
+TQWidget*
KexiDBCheckBox::widget()
{
return this;
@@ -146,29 +146,29 @@ void KexiDBCheckBox::updateTristate()
{
if (m_tristate == TristateDefault) {
//! @todo the data source may be defined as NOT NULL... thus disallowing NULL state
- QCheckBox::setTristate( !dataSource().isEmpty() );
+ TQCheckBox::setTristate( !dataSource().isEmpty() );
}
else {
- QCheckBox::setTristate( m_tristate == TristateOn );
+ TQCheckBox::setTristate( m_tristate == TristateOn );
}
}
-void KexiDBCheckBox::setDataSource(const QString &ds)
+void KexiDBCheckBox::setDataSource(const TQString &ds)
{
KexiFormDataItemInterface::setDataSource(ds);
updateTristate();
}
-void KexiDBCheckBox::setDisplayDefaultValue(QWidget *widget, bool displayDefaultValue)
+void KexiDBCheckBox::setDisplayDefaultValue(TQWidget *widget, bool displayDefaultValue)
{
KexiFormDataItemInterface::setDisplayDefaultValue(widget, displayDefaultValue);
// initialize display parameters for default / entered value
KexiDisplayUtils::DisplayParameters * const params
= displayDefaultValue ? m_displayParametersForDefaultValue : m_displayParametersForEnteredValue;
// setFont(params->font);
- QPalette pal(palette());
-// pal.setColor(QPalette::Active, QColorGroup::Text, params->textColor);
- pal.setColor(QPalette::Active, QColorGroup::Foreground, params->textColor);
+ TQPalette pal(palette());
+// pal.setColor(TQPalette::Active, TQColorGroup::Text, params->textColor);
+ pal.setColor(TQPalette::Active, TQColorGroup::Foreground, params->textColor);
setPalette(pal);
}
diff --git a/kexi/plugins/forms/widgets/kexidbcheckbox.h b/kexi/plugins/forms/widgets/kexidbcheckbox.h
index d4a68bf3..8a65f33a 100644
--- a/kexi/plugins/forms/widgets/kexidbcheckbox.h
+++ b/kexi/plugins/forms/widgets/kexidbcheckbox.h
@@ -22,25 +22,26 @@
#define KexiDBCheckBox_H
#include "kexiformdataiteminterface.h"
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
//! @short A db-aware check box
-class KEXIFORMUTILS_EXPORT KexiDBCheckBox : public QCheckBox, public KexiFormDataItemInterface
+class KEXIFORMUTILS_EXPORT KexiDBCheckBox : public TQCheckBox, public KexiFormDataItemInterface
{
Q_OBJECT
- Q_PROPERTY(QString dataSource READ dataSource WRITE setDataSource DESIGNABLE true)
- Q_PROPERTY(QCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true)
- Q_OVERRIDE( Tristate tristate READ isTristate WRITE setTristate )
+ TQ_OBJECT
+ TQ_PROPERTY(TQString dataSource READ dataSource WRITE setDataSource DESIGNABLE true)
+ TQ_PROPERTY(TQCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true)
+ TQ_OVERRIDE( Tristate tristate READ isTristate WRITE setTristate )
Q_ENUMS( Tristate )
public:
- KexiDBCheckBox(const QString &text, QWidget *parent, const char *name=0);
+ KexiDBCheckBox(const TQString &text, TQWidget *tqparent, const char *name=0);
virtual ~KexiDBCheckBox();
- inline QString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
- inline QCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
- virtual QVariant value();
- virtual void setInvalidState( const QString& displayText );
+ inline TQString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
+ inline TQCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
+ virtual TQVariant value();
+ virtual void setInvalidState( const TQString& displayText );
//! \return true if editor's value is null (not empty)
//! Used for checking if a given constraint within table of form is met.
@@ -56,7 +57,7 @@ class KEXIFORMUTILS_EXPORT KexiDBCheckBox : public QCheckBox, public KexiFormDat
virtual bool isReadOnly() const;
/*! \return the view widget of this item, e.g. line edit widget. */
- virtual QWidget* widget();
+ virtual TQWidget* widget();
virtual bool cursorAtStart();
virtual bool cursorAtEnd();
@@ -70,24 +71,24 @@ class KEXIFORMUTILS_EXPORT KexiDBCheckBox : public QCheckBox, public KexiFormDat
Tristate isTristate() const;
/*! Reimplemented after KexiFormDataItemInterface. */
- virtual void setDisplayDefaultValue(QWidget* widget, bool displayDefaultValue);
+ virtual void setDisplayDefaultValue(TQWidget* widget, bool displayDefaultValue);
public slots:
- void setDataSource(const QString &ds);
- inline void setDataSourceMimeType(const QCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
+ void setDataSource(const TQString &ds);
+ inline void setDataSourceMimeType(const TQCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
void slotStateChanged(int state);
//! This implementation just disables read only widget
virtual void setReadOnly( bool readOnly );
protected:
- virtual void setValueInternal(const QVariant& add, bool removeOld);
+ virtual void setValueInternal(const TQVariant& add, bool removeOld);
//! \return true in isTristate() == TristateDefault and the widget has bound data source
//! or if isTristate() == TristateOn, else false is returned.
bool isTristateInternal() const;
- //! Updates tristate in QCheckBox itself according to m_tristate.
+ //! Updates tristate in TQCheckBox itself according to m_tristate.
void updateTristate();
private:
diff --git a/kexi/plugins/forms/widgets/kexidbcombobox.cpp b/kexi/plugins/forms/widgets/kexidbcombobox.cpp
index 19366a15..a908c2fd 100644
--- a/kexi/plugins/forms/widgets/kexidbcombobox.cpp
+++ b/kexi/plugins/forms/widgets/kexidbcombobox.cpp
@@ -25,12 +25,12 @@
#include <kdebug.h>
#include <kapplication.h>
-#include <qmetaobject.h>
-#include <qpainter.h>
-#include <qstyle.h>
-#include <qdrawutil.h>
-#include <qptrdict.h>
-#include <qcursor.h>
+#include <tqmetaobject.h>
+#include <tqpainter.h>
+#include <tqstyle.h>
+#include <tqdrawutil.h>
+#include <tqptrdict.h>
+#include <tqcursor.h>
#include <kexidb/queryschema.h>
#include <widget/tableview/kexicomboboxpopup.h>
@@ -58,11 +58,11 @@ class KexiDBComboBox::Private
}
KexiComboBoxPopup *popup;
- KComboBox *paintedCombo; //!< fake combo used only to pass it as 'this' for QStyle (because styles use <static_cast>)
- QSize sizeHint; //!< A cache for KexiDBComboBox::sizeHint(),
+ KComboBox *paintedCombo; //!< fake combo used only to pass it as 'this' for TQStyle (because styles use <static_cast>)
+ TQSize tqsizeHint; //!< A cache for KexiDBComboBox::tqsizeHint(),
//!< rebuilt by KexiDBComboBox::fontChange() and KexiDBComboBox::styleChange()
KexiDB::QueryColumnInfo* visibleColumnInfo;
- QPtrDict<char> *subWidgetsWithDisabledEvents; //! used to collect subwidget and its children (if isEditable is false)
+ TQPtrDict<char> *subWidgetsWithDisabledEvents; //! used to collect subwidget and its tqchildren (if isEditable is false)
bool isEditable : 1; //!< true is the combo box is editable
bool buttonPressed : 1;
bool mouseOver : 1;
@@ -72,13 +72,13 @@ class KexiDBComboBox::Private
//-------------------------------------
-KexiDBComboBox::KexiDBComboBox(QWidget *parent, const char *name, bool designMode)
- : KexiDBAutoField(parent, name, designMode, NoLabel)
+KexiDBComboBox::KexiDBComboBox(TQWidget *tqparent, const char *name, bool designMode)
+ : KexiDBAutoField(tqparent, name, designMode, NoLabel)
, KexiComboBoxBase()
, d(new Private())
{
setMouseTracking(true);
- setFocusPolicy(WheelFocus);
+ setFocusPolicy(TQ_WheelFocus);
installEventFilter(this);
d->designMode = designMode;
d->paintedCombo = new KComboBox(this);
@@ -121,58 +121,58 @@ bool KexiDBComboBox::isEditable() const
return d->isEditable;
}
-void KexiDBComboBox::paintEvent( QPaintEvent * )
+void KexiDBComboBox::paintEvent( TQPaintEvent * )
{
- QPainter p( this );
- QColorGroup cg( palette().active() );
+ TQPainter p( this );
+ TQColorGroup cg( tqpalette().active() );
// if ( hasFocus() )
-// cg.setColor(QColorGroup::Base, cg.highlight());
+// cg.setColor(TQColorGroup::Base, cg.highlight());
// else
- cg.setColor(QColorGroup::Base, paletteBackgroundColor()); //update base color using (reimplemented) bg color
+ cg.setColor(TQColorGroup::Base, paletteBackgroundColor()); //update base color using (reimplemented) bg color
p.setPen(cg.text());
- QStyle::SFlags flags = QStyle::Style_Default;
+ TQStyle::SFlags flags = TQStyle::Style_Default;
if (isEnabled())
- flags |= QStyle::Style_Enabled;
+ flags |= TQStyle::Style_Enabled;
if (hasFocus())
- flags |= QStyle::Style_HasFocus;
+ flags |= TQStyle::Style_HasFocus;
if (d->mouseOver)
- flags |= QStyle::Style_MouseOver;
+ flags |= TQStyle::Style_MouseOver;
if ( width() < 5 || height() < 5 ) {
- qDrawShadePanel( &p, rect(), cg, FALSE, 2, &cg.brush( QColorGroup::Button ) );
+ qDrawShadePanel( &p, rect(), cg, FALSE, 2, &cg.brush( TQColorGroup::Button ) );
return;
}
-//! @todo support reverse layout
-//bool reverse = QApplication::reverseLayout();
- style().drawComplexControl( QStyle::CC_ComboBox, &p, d->paintedCombo /*this*/, rect(), cg,
- flags, (uint)QStyle::SC_All,
- (d->buttonPressed ? QStyle::SC_ComboBoxArrow : QStyle::SC_None )
+//! @todo support reverse tqlayout
+//bool reverse = TQApplication::reverseLayout();
+ tqstyle().tqdrawComplexControl( TQStyle::CC_ComboBox, &p, d->paintedCombo /*this*/, rect(), cg,
+ flags, (uint)TQStyle::SC_All,
+ (d->buttonPressed ? TQStyle::SC_ComboBoxArrow : TQStyle::SC_None )
);
if (d->isEditable) {
//if editable, editor paints itself, nothing to do
}
else { //not editable: we need to paint the current item
- QRect editorGeometry( this->editorGeometry() );
+ TQRect editorGeometry( this->editorGeometry() );
if ( hasFocus() ) {
- if (0==qstrcmp(style().name(), "windows")) //a hack
- p.fillRect( editorGeometry, cg.brush( QColorGroup::Highlight ) );
- QRect r( QStyle::visualRect( style().subRect( QStyle::SR_ComboBoxFocusRect, d->paintedCombo ), this ) );
- r = QRect(r.left()-1, r.top()-1, r.width()+2, r.height()+2); //enlare by 1 pixel each side to avoid covering by the subwidget
- style().drawPrimitive( QStyle::PE_FocusRect, &p,
- r, cg, flags | QStyle::Style_FocusAtBorder, QStyleOption(cg.highlight()));
+ if (0==qstrcmp(tqstyle().name(), "windows")) //a hack
+ p.fillRect( editorGeometry, cg.brush( TQColorGroup::Highlight ) );
+ TQRect r( TQStyle::tqvisualRect( tqstyle().subRect( TQStyle::SR_ComboBoxFocusRect, d->paintedCombo ), this ) );
+ r = TQRect(r.left()-1, r.top()-1, r.width()+2, r.height()+2); //enlare by 1 pixel each side to avoid covering by the subwidget
+ tqstyle().tqdrawPrimitive( TQStyle::PE_FocusRect, &p,
+ r, cg, flags | TQStyle::Style_FocusAtBorder, TQStyleOption(cg.highlight()));
}
//todo
}
}
-QRect KexiDBComboBox::editorGeometry() const
+TQRect KexiDBComboBox::editorGeometry() const
{
- QRect r( QStyle::visualRect(
- style().querySubControlMetrics(QStyle::CC_ComboBox, d->paintedCombo,
- QStyle::SC_ComboBoxEditField), d->paintedCombo ) );
+ TQRect r( TQStyle::tqvisualRect(
+ tqstyle().querySubControlMetrics(TQStyle::CC_ComboBox, d->paintedCombo,
+ TQStyle::SC_ComboBoxEditField), d->paintedCombo ) );
//if ((height()-r.bottom())<6)
// r.setBottom(height()-6);
@@ -185,20 +185,20 @@ void KexiDBComboBox::createEditor()
if (m_subwidget) {
m_subwidget->setGeometry( editorGeometry() );
if (!d->isEditable) {
- m_subwidget->setCursor(QCursor(Qt::ArrowCursor)); // widgets like listedit have IbeamCursor, we don't want that
-//! @todo Qt4: set transparent background, for now we're setting button color
- QPalette subwidgetPalette( m_subwidget->palette() );
- subwidgetPalette.setColor(QPalette::Active, QColorGroup::Base,
- subwidgetPalette.color(QPalette::Active, QColorGroup::Button));
+ m_subwidget->setCursor(TQCursor(TQt::ArrowCursor)); // widgets like listedit have IbeamCursor, we don't want that
+//! @todo TQt4: set transparent background, for now we're setting button color
+ TQPalette subwidgetPalette( m_subwidget->palette() );
+ subwidgetPalette.setColor(TQPalette::Active, TQColorGroup::Base,
+ subwidgetPalette.color(TQPalette::Active, TQColorGroup::Button));
m_subwidget->setPalette( subwidgetPalette );
if (d->subWidgetsWithDisabledEvents)
d->subWidgetsWithDisabledEvents->clear();
else
- d->subWidgetsWithDisabledEvents = new QPtrDict<char>();
+ d->subWidgetsWithDisabledEvents = new TQPtrDict<char>();
d->subWidgetsWithDisabledEvents->insert(m_subwidget, (char*)1);
m_subwidget->installEventFilter(this);
- QObjectList *l = m_subwidget->queryList( "QWidget" );
- for ( QObjectListIt it( *l ); it.current(); ++it ) {
+ TQObjectList *l = m_subwidget->queryList( TQWIDGET_OBJECT_NAME_STRING );
+ for ( TQObjectListIt it( *l ); it.current(); ++it ) {
d->subWidgetsWithDisabledEvents->insert(it.current(), (char*)1);
it.current()->installEventFilter(this);
}
@@ -211,34 +211,34 @@ void KexiDBComboBox::createEditor()
void KexiDBComboBox::setLabelPosition(LabelPosition position)
{
if(m_subwidget) {
- if (-1 != m_subwidget->metaObject()->findProperty("frameShape", true))
- m_subwidget->setProperty("frameShape", QVariant((int)QFrame::NoFrame));
+ if (-1 != m_subwidget->tqmetaObject()->tqfindProperty("frameShape", true))
+ m_subwidget->setProperty("frameShape", TQVariant((int)TQFrame::NoFrame));
m_subwidget->setGeometry( editorGeometry() );
}
-// KexiSubwidgetInterface *subwidgetInterface = dynamic_cast<KexiSubwidgetInterface*>((QWidget*)m_subwidget);
+// KexiSubwidgetInterface *subwidgetInterface = dynamic_cast<KexiSubwidgetInterface*>((TQWidget*)m_subwidget);
// update size policy
// if (subwidgetInterface && subwidgetInterface->subwidgetStretchRequired(this)) {
- QSizePolicy sizePolicy( this->sizePolicy() );
+ TQSizePolicy sizePolicy( this->tqsizePolicy() );
if(position == Left)
- sizePolicy.setHorData( QSizePolicy::Minimum );
+ sizePolicy.setHorData( TQSizePolicy::Minimum );
else
- sizePolicy.setVerData( QSizePolicy::Minimum );
- //m_subwidget->setSizePolicy(sizePolicy);
- setSizePolicy(sizePolicy);
+ sizePolicy.setVerData( TQSizePolicy::Minimum );
+ //m_subwidget->tqsetSizePolicy(sizePolicy);
+ tqsetSizePolicy(sizePolicy);
//}
// }
}
-QRect KexiDBComboBox::buttonGeometry() const
+TQRect KexiDBComboBox::buttonGeometry() const
{
- QRect arrowRect(
- style().querySubControlMetrics( QStyle::CC_ComboBox, d->paintedCombo, QStyle::SC_ComboBoxArrow) );
- arrowRect = QStyle::visualRect(arrowRect, d->paintedCombo);
- arrowRect.setHeight( QMAX( height() - (2 * arrowRect.y()), arrowRect.height() ) ); // a fix for Motif style
+ TQRect arrowRect(
+ tqstyle().querySubControlMetrics( TQStyle::CC_ComboBox, d->paintedCombo, TQStyle::SC_ComboBoxArrow) );
+ arrowRect = TQStyle::tqvisualRect(arrowRect, d->paintedCombo);
+ arrowRect.setHeight( TQMAX( height() - (2 * arrowRect.y()), arrowRect.height() ) ); // a fix for Motif style
return arrowRect;
}
-bool KexiDBComboBox::handleMousePressEvent(QMouseEvent *e)
+bool KexiDBComboBox::handleMousePressEvent(TQMouseEvent *e)
{
if ( e->button() != Qt::LeftButton || d->designMode )
return true;
@@ -247,19 +247,19 @@ bool KexiDBComboBox::handleMousePressEvent(QMouseEvent *e)
return;
}*/
- if ( /*count() &&*/ ( !isEditable() || buttonGeometry().contains( e->pos() ) ) ) {
+ if ( /*count() &&*/ ( !isEditable() || buttonGeometry().tqcontains( e->pos() ) ) ) {
d->buttonPressed = false;
/* if ( d->usingListBox() ) {
listBox()->blockSignals( TRUE );
- qApp->sendEvent( listBox(), e ); // trigger the listbox's autoscroll
+ tqApp->sendEvent( listBox(), e ); // trigger the listbox's autoscroll
listBox()->setCurrentItem(d->current);
listBox()->blockSignals( FALSE );
popup();
- if ( arrowRect.contains( e->pos() ) ) {
+ if ( arrowRect.tqcontains( e->pos() ) ) {
d->arrowPressed = TRUE;
d->arrowDown = TRUE;
- repaint( FALSE );
+ tqrepaint( FALSE );
}
} else {*/
showPopup();
@@ -268,12 +268,12 @@ bool KexiDBComboBox::handleMousePressEvent(QMouseEvent *e)
return false;
}
-bool KexiDBComboBox::handleKeyPressEvent(QKeyEvent *ke)
+bool KexiDBComboBox::handleKeyPressEvent(TQKeyEvent *ke)
{
const int k = ke->key();
- const bool dropDown = (ke->state() == Qt::NoButton && ((k==Qt::Key_F2 && !d->isEditable) || k==Qt::Key_F4))
- || (ke->state() == Qt::AltButton && k==Qt::Key_Down);
- const bool escPressed = ke->state() == Qt::NoButton && k==Qt::Key_Escape;
+ const bool dropDown = (ke->state() == Qt::NoButton && ((k==TQt::Key_F2 && !d->isEditable) || k==TQt::Key_F4))
+ || (ke->state() == TQt::AltButton && k==TQt::Key_Down);
+ const bool escPressed = ke->state() == Qt::NoButton && k==TQt::Key_Escape;
const bool popupVisible = popup() && popup()->isVisible();
if ((dropDown || escPressed) && popupVisible) {
popup()->hide();
@@ -285,7 +285,7 @@ bool KexiDBComboBox::handleKeyPressEvent(QKeyEvent *ke)
return true;
}
else if (popupVisible) {
- const bool enterPressed = k==Qt::Key_Enter || k==Qt::Key_Return;
+ const bool enterPressed = k==TQt::Key_Enter || k==TQt::Key_Return;
if (enterPressed/* && m_internalEditorValueChanged*/) {
acceptPopupSelection();
return true;
@@ -296,91 +296,91 @@ bool KexiDBComboBox::handleKeyPressEvent(QKeyEvent *ke)
return false;
}
-bool KexiDBComboBox::keyPressed(QKeyEvent *ke)
+bool KexiDBComboBox::keyPressed(TQKeyEvent *ke)
{
if (KexiDBAutoField::keyPressed(ke))
return true;
const int k = ke->key();
const bool popupVisible = popup() && popup()->isVisible();
- const bool escPressed = ke->state() == Qt::NoButton && k==Qt::Key_Escape;
+ const bool escPressed = ke->state() == Qt::NoButton && k==TQt::Key_Escape;
if (escPressed && popupVisible) {
popup()->hide();
return true;
}
- if (ke->state() == Qt::NoButton && (k==Qt::Key_PageDown || k==Qt::Key_PageUp) && popupVisible)
+ if (ke->state() == Qt::NoButton && (k==TQt::Key_PageDown || k==TQt::Key_PageUp) && popupVisible)
return true;
return false;
}
-void KexiDBComboBox::mousePressEvent( QMouseEvent *e )
+void KexiDBComboBox::mousePressEvent( TQMouseEvent *e )
{
if (handleMousePressEvent(e))
return;
-// QTimer::singleShot( 200, this, SLOT(internalClickTimeout()));
+// TQTimer::singleShot( 200, this, TQT_SLOT(internalClickTimeout()));
// d->shortClick = TRUE;
// }
KexiDBAutoField::mousePressEvent( e );
}
-void KexiDBComboBox::mouseDoubleClickEvent( QMouseEvent *e )
+void KexiDBComboBox::mouseDoubleClickEvent( TQMouseEvent *e )
{
mousePressEvent( e );
}
-bool KexiDBComboBox::eventFilter( QObject *o, QEvent *e )
+bool KexiDBComboBox::eventFilter( TQObject *o, TQEvent *e )
{
- if (o==this) {
- if (e->type()==QEvent::Resize) {
+ if (TQT_BASE_OBJECT(o)==TQT_BASE_OBJECT(this)) {
+ if (e->type()==TQEvent::Resize) {
d->paintedCombo->resize(size());
if (m_subwidget)
m_subwidget->setGeometry( editorGeometry() );
}
- else if (e->type()==QEvent::Enter) {
+ else if (e->type()==TQEvent::Enter) {
if (!d->isEditable
- || /*over button if editable combo*/buttonGeometry().contains( static_cast<QMouseEvent*>(e)->pos() ))
+ || /*over button if editable combo*/buttonGeometry().tqcontains( TQT_TQMOUSEEVENT(e)->pos() ))
{
d->mouseOver = true;
update();
}
}
- else if (e->type()==QEvent::MouseMove) {
+ else if (e->type()==TQEvent::MouseMove) {
if (d->isEditable) {
- const bool overButton = buttonGeometry().contains( static_cast<QMouseEvent*>(e)->pos() );
+ const bool overButton = buttonGeometry().tqcontains( TQT_TQMOUSEEVENT(e)->pos() );
if (overButton != d->mouseOver) {
d->mouseOver = overButton;
update();
}
}
}
- else if (e->type()==QEvent::Leave) {
+ else if (e->type()==TQEvent::Leave) {
d->mouseOver = false;
update();
}
- else if (e->type()==QEvent::KeyPress) {
+ else if (e->type()==TQEvent::KeyPress) {
// handle F2/F4
- if (handleKeyPressEvent(static_cast<QKeyEvent*>(e)))
+ if (handleKeyPressEvent(TQT_TQKEYEVENT(e)))
return true;
}
- else if (e->type()==QEvent::FocusOut) {
+ else if (e->type()==TQEvent::FocusOut) {
if (popup() && popup()->isVisible()) {
popup()->hide();
undoChanges();
}
}
}
- else if (!d->isEditable && d->subWidgetsWithDisabledEvents && d->subWidgetsWithDisabledEvents->find(o)) {
- if (e->type()==QEvent::MouseButtonPress) {
+ else if (!d->isEditable && d->subWidgetsWithDisabledEvents && d->subWidgetsWithDisabledEvents->tqfind(o)) {
+ if (e->type()==TQEvent::MouseButtonPress) {
// clicking the subwidget should mean the same as clicking the combo box (i.e. show the popup)
- if (handleMousePressEvent(static_cast<QMouseEvent*>(e)))
+ if (handleMousePressEvent(TQT_TQMOUSEEVENT(e)))
return true;
}
- else if (e->type()==QEvent::KeyPress) {
- if (handleKeyPressEvent(static_cast<QKeyEvent*>(e)))
+ else if (e->type()==TQEvent::KeyPress) {
+ if (handleKeyPressEvent(TQT_TQKEYEVENT(e)))
return true;
}
- return e->type()!=QEvent::Paint;
+ return e->type()!=TQEvent::Paint;
}
return KexiDBAutoField::eventFilter( o, e );
}
@@ -391,15 +391,15 @@ bool KexiDBComboBox::subwidgetStretchRequired(KexiDBAutoField* autoField) const
return true;
}
-void KexiDBComboBox::setPaletteBackgroundColor( const QColor & color )
+void KexiDBComboBox::setPaletteBackgroundColor( const TQColor & color )
{
KexiDBAutoField::setPaletteBackgroundColor(color);
- QPalette pal(palette());
- QColorGroup cg(pal.active());
- pal.setColor(QColorGroup::Base, red);
- pal.setColor(QColorGroup::Background, red);
+ TQPalette pal(palette());
+ TQColorGroup cg(pal.active());
+ pal.setColor(TQColorGroup::Base, red);
+ pal.setColor(TQColorGroup::Background, red);
pal.setActive(cg);
- QWidget::setPalette(pal);
+ TQWidget::setPalette(pal);
update();
}
@@ -439,7 +439,7 @@ void KexiDBComboBox::selectAllInInternalEditor()
selectAll();
}
-void KexiDBComboBox::setValueInternal(const QVariant& add, bool removeOld)
+void KexiDBComboBox::setValueInternal(const TQVariant& add, bool removeOld)
{
//// use KexiDBAutoField instead of KexiComboBoxBase::setValueInternal
//// expects existing popup(), but we want to have delayed creation
@@ -448,38 +448,38 @@ void KexiDBComboBox::setValueInternal(const QVariant& add, bool removeOld)
KexiComboBoxBase::setValueInternal(add, removeOld);
}
-void KexiDBComboBox::setVisibleValueInternal(const QVariant& value)
+void KexiDBComboBox::setVisibleValueInternal(const TQVariant& value)
{
- KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((QWidget*)m_subwidget);
+ KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((TQWidget*)m_subwidget);
if(iface)
- iface->setValue(value, QVariant(), false /*!removeOld*/);
+ iface->setValue(value, TQVariant(), false /*!removeOld*/);
}
-QVariant KexiDBComboBox::visibleValue()
+TQVariant KexiDBComboBox::visibleValue()
{
return KexiComboBoxBase::visibleValue();
}
-void KexiDBComboBox::setValueInInternalEditor(const QVariant& value)
+void KexiDBComboBox::setValueInInternalEditor(const TQVariant& value)
{
if (!m_setValueInInternalEditor_enabled)
return;
- KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((QWidget*)m_subwidget);
+ KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((TQWidget*)m_subwidget);
if(iface)
- iface->setValue(value, QVariant(), false/*!removeOld*/);
+ iface->setValue(value, TQVariant(), false/*!removeOld*/);
}
-QVariant KexiDBComboBox::valueFromInternalEditor()
+TQVariant KexiDBComboBox::valueFromInternalEditor()
{
return KexiDBAutoField::value();
}
-QPoint KexiDBComboBox::mapFromParentToGlobal(const QPoint& pos) const
+TQPoint KexiDBComboBox::mapFromParentToGlobal(const TQPoint& pos) const
{
// const KexiFormScrollView* view = KexiUtils::findParentConst<const KexiFormScrollView>(this, "KexiFormScrollView");
- if (!parentWidget())
- return QPoint(-1,-1);
- return parentWidget()->mapToGlobal(pos);
+ if (!tqparentWidget())
+ return TQPoint(-1,-1);
+ return tqparentWidget()->mapToGlobal(pos);
// return view->viewport()->mapToGlobal(pos);
}
@@ -488,31 +488,31 @@ int KexiDBComboBox::popupWidthHint() const
return width(); //popup() ? popup()->width() : 0;
}
-void KexiDBComboBox::fontChange( const QFont & oldFont )
+void KexiDBComboBox::fontChange( const TQFont & oldFont )
{
- d->sizeHint = QSize(); //force rebuild the cache
+ d->tqsizeHint = TQSize(); //force rebuild the cache
KexiDBAutoField::fontChange(oldFont);
}
-void KexiDBComboBox::styleChange( QStyle& oldStyle )
+void KexiDBComboBox::styleChange( TQStyle& oldStyle )
{
KexiDBAutoField::styleChange( oldStyle );
- d->sizeHint = QSize(); //force rebuild the cache
+ d->tqsizeHint = TQSize(); //force rebuild the cache
if (m_subwidget)
m_subwidget->setGeometry( editorGeometry() );
}
-QSize KexiDBComboBox::sizeHint() const
+TQSize KexiDBComboBox::tqsizeHint() const
{
- if ( isVisible() && d->sizeHint.isValid() )
- return d->sizeHint;
+ if ( isVisible() && d->tqsizeHint.isValid() )
+ return d->tqsizeHint;
- const int maxWidth = 7 * fontMetrics().width(QChar('x')) + 18;
- const int maxHeight = QMAX( fontMetrics().lineSpacing(), 14 ) + 2;
- d->sizeHint = (style().sizeFromContents(QStyle::CT_ComboBox, d->paintedCombo,
- QSize(maxWidth, maxHeight)).expandedTo(QApplication::globalStrut()));
+ const int maxWidth = 7 * fontMetrics().width(TQChar('x')) + 18;
+ const int maxHeight = TQMAX( fontMetrics().lineSpacing(), 14 ) + 2;
+ d->tqsizeHint = (tqstyle().tqsizeFromContents(TQStyle::CT_ComboBox, d->paintedCombo,
+ TQSize(maxWidth, maxHeight)).expandedTo(TQApplication::globalStrut()));
- return d->sizeHint;
+ return d->tqsizeHint;
}
void KexiDBComboBox::editRequested()
@@ -534,7 +534,7 @@ void KexiDBComboBox::slotRowAccepted(KexiTableItem *item, int row)
void KexiDBComboBox::beforeSignalValueChanged()
{
if (d->dataEnteredByHand) {
- KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((QWidget*)m_subwidget);
+ KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((TQWidget*)m_subwidget);
if (iface) {
slotInternalEditorValueChanged( iface->value() );
}
diff --git a/kexi/plugins/forms/widgets/kexidbcombobox.h b/kexi/plugins/forms/widgets/kexidbcombobox.h
index 5208d37d..2639b1f9 100644
--- a/kexi/plugins/forms/widgets/kexidbcombobox.h
+++ b/kexi/plugins/forms/widgets/kexidbcombobox.h
@@ -35,15 +35,16 @@ class KEXIFORMUTILS_EXPORT KexiDBComboBox :
public KexiDBAutoField, public KexiComboBoxBase
{
Q_OBJECT
- Q_PROPERTY( bool editable READ isEditable WRITE setEditable )
+ TQ_OBJECT
+ TQ_PROPERTY( bool editable READ isEditable WRITE setEditable )
//properties from KexiDBAutoField that should not be visible:
- Q_OVERRIDE(QColor paletteBackgroundColor READ paletteBackgroundColor WRITE setPaletteBackgroundColor DESIGNABLE true RESET unsetPalette)
- Q_OVERRIDE(QColor foregroundLabelColor DESIGNABLE false)
- Q_OVERRIDE(QColor backgroundLabelColor DESIGNABLE false)
- Q_OVERRIDE(bool autoCaption DESIGNABLE false)
+ TQ_OVERRIDE(TQColor paletteBackgroundColor READ paletteBackgroundColor WRITE setPaletteBackgroundColor DESIGNABLE true RESET unsetPalette)
+ TQ_OVERRIDE(TQColor foregroundLabelColor DESIGNABLE false)
+ TQ_OVERRIDE(TQColor backgroundLabelColor DESIGNABLE false)
+ TQ_OVERRIDE(bool autoCaption DESIGNABLE false)
public:
- KexiDBComboBox(QWidget *parent, const char *name=0, bool designMode = true);
+ KexiDBComboBox(TQWidget *tqparent, const char *name=0, bool designMode = true);
virtual ~KexiDBComboBox();
//! Implemented for KexiComboBoxBase: form has no 'related data' model (only the full database model)
@@ -53,21 +54,21 @@ class KEXIFORMUTILS_EXPORT KexiDBComboBox :
virtual KexiDB::Field *field() const { return KexiDBAutoField::field(); }
//! Implemented for KexiComboBoxBase
- virtual QVariant origValue() const { return m_origValue; }
+ virtual TQVariant origValue() const { return m_origValue; }
void setEditable(bool set);
bool isEditable() const;
virtual void setLabelPosition(LabelPosition position);
- virtual QVariant value() { return KexiComboBoxBase::value(); }
+ virtual TQVariant value() { return KexiComboBoxBase::value(); }
- virtual QVariant visibleValue();
+ virtual TQVariant visibleValue();
//! Reimpemented because to avoid taking value from the internal editor (index is taken from the popup instead)
virtual bool valueChanged();
- virtual QSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
//! Reimplemented after KexiDBAutoField: jsut sets \a cinfo without initializing a subwidget.
//! Initialization is performed by \ref setVisibleColumnInfo().
@@ -81,10 +82,10 @@ class KEXIFORMUTILS_EXPORT KexiDBComboBox :
Reimplemented. */
virtual KexiDB::QueryColumnInfo* visibleColumnInfo() const;
- const QColor & paletteBackgroundColor() const { return KexiDBAutoField::paletteBackgroundColor(); }
+ const TQColor & paletteBackgroundColor() const { return KexiDBAutoField::paletteBackgroundColor(); }
//! Reimplemented to also set 'this' widget's background color, not only subwidget's.
- virtual void setPaletteBackgroundColor( const QColor & color );
+ virtual void setPaletteBackgroundColor( const TQColor & color );
/*! Undoes changes made to this item - just resets the widget to original value.
Reimplemented after KexiFormDataItemInterface to also revert the visible value
@@ -96,37 +97,37 @@ class KEXIFORMUTILS_EXPORT KexiDBComboBox :
void slotItemSelected(KexiTableItem* item) { KexiComboBoxBase::slotItemSelected(item); }
protected slots:
- void slotInternalEditorValueChanged(const QVariant& v)
+ void slotInternalEditorValueChanged(const TQVariant& v)
{ KexiComboBoxBase::slotInternalEditorValueChanged(v); }
protected:
- QRect buttonGeometry() const;
+ TQRect buttonGeometry() const;
- virtual void paintEvent( QPaintEvent * );
+ virtual void paintEvent( TQPaintEvent * );
- virtual void mousePressEvent( QMouseEvent *e );
+ virtual void mousePressEvent( TQMouseEvent *e );
- void mouseDoubleClickEvent( QMouseEvent *e );
+ void mouseDoubleClickEvent( TQMouseEvent *e );
- virtual bool eventFilter( QObject *o, QEvent *e );
+ virtual bool eventFilter( TQObject *o, TQEvent *e );
- //! \return internal editor's geometry
- QRect editorGeometry() const;
+ //! \return internal editor's tqgeometry
+ TQRect editorGeometry() const;
//! Creates editor. Reimplemented, because if the combo box is not editable,
//! editor should not be created.
virtual void createEditor();
/*! Reimplemented */
- virtual void styleChange( QStyle& oldStyle );
+ virtual void styleChange( TQStyle& oldStyle );
/*! Reimplemented */
- virtual void fontChange( const QFont & oldFont );
+ virtual void fontChange( const TQFont & oldFont );
virtual bool subwidgetStretchRequired(KexiDBAutoField* autoField) const;
//! Implemented for KexiComboBoxBase
- virtual QWidget *internalEditor() const { return /*WidgetWithSubpropertiesInterface*/m_subwidget; }
+ virtual TQWidget *internalEditor() const { return /*WidgetWithSubpropertiesInterface*/m_subwidget; }
//! Implemented for KexiComboBoxBase. Does nothing if the widget is not editable.
virtual void moveCursorToEndInInternalEditor();
@@ -135,10 +136,10 @@ class KEXIFORMUTILS_EXPORT KexiDBComboBox :
virtual void selectAllInInternalEditor();
//! Implemented for KexiComboBoxBase
- virtual void setValueInInternalEditor(const QVariant& value);
+ virtual void setValueInInternalEditor(const TQVariant& value);
//! Implemented for KexiComboBoxBase
- virtual QVariant valueFromInternalEditor();
+ virtual TQVariant valueFromInternalEditor();
//! Implemented for KexiComboBoxBase
virtual void editRequested();
@@ -146,21 +147,21 @@ class KEXIFORMUTILS_EXPORT KexiDBComboBox :
//! Implemented for KexiComboBoxBase
virtual void acceptRequested();
- //! Implement this to return a position \a pos mapped from parent (e.g. viewport)
- //! to global coordinates. QPoint(-1, -1) should be returned if this cannot be computed.
- virtual QPoint mapFromParentToGlobal(const QPoint& pos) const;
+ //! Implement this to return a position \a pos mapped from tqparent (e.g. viewport)
+ //! to global coordinates. TQPoint(-1, -1) should be returned if this cannot be computed.
+ virtual TQPoint mapFromParentToGlobal(const TQPoint& pos) const;
//! Implement this to return a hint for popup width.
virtual int popupWidthHint() const;
- virtual void setValueInternal(const QVariant& add, bool removeOld);
+ virtual void setValueInternal(const TQVariant& add, bool removeOld);
//! Implemented to handle visible value instead of index
- virtual void setVisibleValueInternal(const QVariant& value);
+ virtual void setVisibleValueInternal(const TQVariant& value);
- bool handleMousePressEvent(QMouseEvent *e);
+ bool handleMousePressEvent(TQMouseEvent *e);
- bool handleKeyPressEvent(QKeyEvent *ke);
+ bool handleKeyPressEvent(TQKeyEvent *ke);
//! Implemented for KexiDataItemInterface
virtual void beforeSignalValueChanged();
@@ -172,7 +173,7 @@ class KEXIFORMUTILS_EXPORT KexiDBComboBox :
Used for Key_Escape to if the popup is visible,
so the key press won't be consumed to perform "cancel editing".
Also used for grabbing page down/up keys. */
- virtual bool keyPressed(QKeyEvent *ke);
+ virtual bool keyPressed(TQKeyEvent *ke);
class Private;
Private * const d;
diff --git a/kexi/plugins/forms/widgets/kexidbdateedit.cpp b/kexi/plugins/forms/widgets/kexidbdateedit.cpp
index 32584fce..9638f93a 100644
--- a/kexi/plugins/forms/widgets/kexidbdateedit.cpp
+++ b/kexi/plugins/forms/widgets/kexidbdateedit.cpp
@@ -19,8 +19,8 @@
*/
#include "kexidbdateedit.h"
-#include <qlayout.h>
-#include <qtoolbutton.h>
+#include <tqlayout.h>
+#include <tqtoolbutton.h>
#include <kpopupmenu.h>
#include <kdatepicker.h>
#include <kdatetbl.h>
@@ -28,45 +28,45 @@
#include <kexiutils/utils.h>
#include <kexidb/queryschema.h>
-KexiDBDateEdit::KexiDBDateEdit(const QDate &date, QWidget *parent, const char *name)
- : QWidget(parent, name), KexiFormDataItemInterface()
+KexiDBDateEdit::KexiDBDateEdit(const TQDate &date, TQWidget *tqparent, const char *name)
+ : TQWidget(tqparent, name), KexiFormDataItemInterface()
{
m_invalidState = false;
m_cleared = false;
m_readOnly = false;
- m_edit = new QDateEdit(date, this);
+ m_edit = new TQDateEdit(date, this);
m_edit->setAutoAdvance(true);
- m_edit->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::MinimumExpanding);
- connect( m_edit, SIGNAL(valueChanged(const QDate&)), this, SLOT(slotValueChanged(const QDate&)) );
- connect( m_edit, SIGNAL(valueChanged(const QDate&)), this, SIGNAL(dateChanged(const QDate&)) );
+ m_edit->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding);
+ connect( m_edit, TQT_SIGNAL(valueChanged(const TQDate&)), this, TQT_SLOT(slotValueChanged(const TQDate&)) );
+ connect( m_edit, TQT_SIGNAL(valueChanged(const TQDate&)), this, TQT_SIGNAL(dateChanged(const TQDate&)) );
- QToolButton* btn = new QToolButton(this);
+ TQToolButton* btn = new TQToolButton(this);
btn->setText("...");
- btn->setFixedWidth( QFontMetrics(btn->font()).width(" ... ") );
+ btn->setFixedWidth( TQFontMetrics(btn->font()).width(" ... ") );
btn->setPopupDelay(1); //1 ms
-#ifdef QDateTimeEditor_HACK
- m_dte_date = KexiUtils::findFirstChild<QDateTimeEditor>(m_edit, "QDateTimeEditor");
+#ifdef TQDateTimeEditor_HACK
+ m_dte_date = KexiUtils::findFirstChild<TQDateTimeEditor>(m_edit, "TQDateTimeEditor");
#else
m_dte_date = 0;
#endif
m_datePickerPopupMenu = new KPopupMenu(0, "date_popup");
- connect(m_datePickerPopupMenu, SIGNAL(aboutToShow()), this, SLOT(slotShowDatePicker()));
- m_datePicker = new KDatePicker(m_datePickerPopupMenu, QDate::currentDate(), 0);
+ connect(m_datePickerPopupMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotShowDatePicker()));
+ m_datePicker = new KDatePicker(m_datePickerPopupMenu, TQDate::tqcurrentDate(), 0);
KDateTable *dt = KexiUtils::findFirstChild<KDateTable>(m_datePicker, "KDateTable");
if (dt)
- connect(dt, SIGNAL(tableClicked()), this, SLOT(acceptDate()));
+ connect(dt, TQT_SIGNAL(tableClicked()), this, TQT_SLOT(acceptDate()));
m_datePicker->setCloseButton(true);
m_datePicker->installEventFilter(this);
m_datePickerPopupMenu->insertItem(m_datePicker);
btn->setPopup(m_datePickerPopupMenu);
- QHBoxLayout* layout = new QHBoxLayout(this);
- layout->addWidget(m_edit, 1);
- layout->addWidget(btn, 0);
+ TQHBoxLayout* tqlayout = new TQHBoxLayout(this);
+ tqlayout->addWidget(m_edit, 1);
+ tqlayout->addWidget(btn, 0);
setFocusProxy(m_edit);
}
@@ -75,14 +75,14 @@ KexiDBDateEdit::~KexiDBDateEdit()
{
}
-void KexiDBDateEdit::setInvalidState( const QString& )
+void KexiDBDateEdit::setInvalidState( const TQString& )
{
setEnabled(false);
setReadOnly(true);
m_invalidState = true;
//! @todo move this to KexiDataItemInterface::setInvalidStateInternal() ?
if (focusPolicy() & TabFocus)
- setFocusPolicy(QWidget::ClickFocus);
+ setFocusPolicy(TQ_ClickFocus);
}
void
@@ -91,18 +91,18 @@ KexiDBDateEdit::setEnabled(bool enabled)
// prevent the user from reenabling the widget when it is in invalid state
if(enabled && m_invalidState)
return;
- QWidget::setEnabled(enabled);
+ TQWidget::setEnabled(enabled);
}
-void KexiDBDateEdit::setValueInternal(const QVariant &add, bool removeOld)
+void KexiDBDateEdit::setValueInternal(const TQVariant &add, bool removeOld)
{
int setNumberOnFocus = -1;
- QDate d;
- QString addString(add.toString());
+ TQDate d;
+ TQString addString(add.toString());
if (removeOld) {
if (!addString.isEmpty() && addString[0].latin1()>='0' && addString[0].latin1() <='9') {
setNumberOnFocus = addString[0].latin1()-'0';
- d = QDate(setNumberOnFocus*1000, 1, 1);
+ d = TQDate(setNumberOnFocus*1000, 1, 1);
}
}
else
@@ -111,10 +111,10 @@ void KexiDBDateEdit::setValueInternal(const QVariant &add, bool removeOld)
m_edit->setDate(d);
}
-QVariant
+TQVariant
KexiDBDateEdit::value()
{
- return QVariant(m_edit->date());
+ return TQVariant(m_edit->date());
}
bool KexiDBDateEdit::valueIsNull()
@@ -139,7 +139,7 @@ void KexiDBDateEdit::setReadOnly(bool set)
m_readOnly = set;
}
-QWidget*
+TQWidget*
KexiDBDateEdit::widget()
{
return this;
@@ -147,7 +147,7 @@ KexiDBDateEdit::widget()
bool KexiDBDateEdit::cursorAtStart()
{
-#ifdef QDateTimeEditor_HACK
+#ifdef TQDateTimeEditor_HACK
return m_dte_date && m_edit->hasFocus() && m_dte_date->focusSection()==0;
#else
return false;
@@ -156,7 +156,7 @@ bool KexiDBDateEdit::cursorAtStart()
bool KexiDBDateEdit::cursorAtEnd()
{
-#ifdef QDateTimeEditor_HACK
+#ifdef TQDateTimeEditor_HACK
return m_dte_date && m_edit->hasFocus()
&& m_dte_date->focusSection()==int(m_dte_date->sectionCount()-1);
#else
@@ -166,12 +166,12 @@ bool KexiDBDateEdit::cursorAtEnd()
void KexiDBDateEdit::clear()
{
- m_edit->setDate(QDate());
+ m_edit->setDate(TQDate());
m_cleared = true;
}
void
-KexiDBDateEdit::slotValueChanged(const QDate&)
+KexiDBDateEdit::slotValueChanged(const TQDate&)
{
m_cleared = false;
}
@@ -179,7 +179,7 @@ KexiDBDateEdit::slotValueChanged(const QDate&)
void
KexiDBDateEdit::slotShowDatePicker()
{
- QDate date = m_edit->date();
+ TQDate date = m_edit->date();
m_datePicker->setDate(date);
m_datePicker->setFocus();
@@ -195,24 +195,24 @@ KexiDBDateEdit::acceptDate()
}
bool
-KexiDBDateEdit::eventFilter(QObject *o, QEvent *e)
+KexiDBDateEdit::eventFilter(TQObject *o, TQEvent *e)
{
if (o != m_datePicker)
return false;
switch (e->type()) {
- case QEvent::Hide:
+ case TQEvent::Hide:
m_datePickerPopupMenu->hide();
break;
- case QEvent::KeyPress:
- case QEvent::KeyRelease: {
- QKeyEvent *ke = (QKeyEvent *)e;
- if (ke->key()==Qt::Key_Enter || ke->key()==Qt::Key_Return) {
+ case TQEvent::KeyPress:
+ case TQEvent::KeyRelease: {
+ TQKeyEvent *ke = (TQKeyEvent *)e;
+ if (ke->key()==TQt::Key_Enter || ke->key()==TQt::Key_Return) {
//accepting picker
acceptDate();
return true;
}
- else if (ke->key()==Qt::Key_Escape) {
+ else if (ke->key()==TQt::Key_Escape) {
//canceling picker
m_datePickerPopupMenu->hide();
return true;
diff --git a/kexi/plugins/forms/widgets/kexidbdateedit.h b/kexi/plugins/forms/widgets/kexidbdateedit.h
index 2ad693a8..b611590e 100644
--- a/kexi/plugins/forms/widgets/kexidbdateedit.h
+++ b/kexi/plugins/forms/widgets/kexidbdateedit.h
@@ -22,37 +22,38 @@
#define KexiDBDateEdit_H
#include "kexiformdataiteminterface.h"
-#include <qdatetimeedit.h>
+#include <tqdatetimeedit.h>
class KPopupMenu;
class KDatePicker;
-class QDateTimeEditor;
+class TQDateTimeEditor;
//! @short A db-aware date editor
-class KEXIFORMUTILS_EXPORT KexiDBDateEdit : public QWidget, public KexiFormDataItemInterface
+class KEXIFORMUTILS_EXPORT KexiDBDateEdit : public TQWidget, public KexiFormDataItemInterface
{
Q_OBJECT
- Q_PROPERTY(QString dataSource READ dataSource WRITE setDataSource DESIGNABLE true)
- Q_PROPERTY(QCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true)
- // properties copied from QDateEdit
+ TQ_OBJECT
+ TQ_PROPERTY(TQString dataSource READ dataSource WRITE setDataSource DESIGNABLE true)
+ TQ_PROPERTY(TQCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true)
+ // properties copied from TQDateEdit
Q_ENUMS( Order )
- Q_PROPERTY( Order order READ order WRITE setOrder DESIGNABLE true)
- Q_PROPERTY( QDate date READ date WRITE setDate DESIGNABLE true)
- Q_PROPERTY( bool autoAdvance READ autoAdvance WRITE setAutoAdvance DESIGNABLE true)
- Q_PROPERTY( QDate maxValue READ maxValue WRITE setMaxValue DESIGNABLE true)
- Q_PROPERTY( QDate minValue READ minValue WRITE setMinValue DESIGNABLE true)
- Q_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly DESIGNABLE true )
+ TQ_PROPERTY( Order order READ order WRITE setOrder DESIGNABLE true)
+ TQ_PROPERTY( TQDate date READ date WRITE setDate DESIGNABLE true)
+ TQ_PROPERTY( bool autoAdvance READ autoAdvance WRITE setAutoAdvance DESIGNABLE true)
+ TQ_PROPERTY( TQDate maxValue READ maxValue WRITE setMaxValue DESIGNABLE true)
+ TQ_PROPERTY( TQDate minValue READ minValue WRITE setMinValue DESIGNABLE true)
+ TQ_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly DESIGNABLE true )
public:
- enum Order { DMY = QDateEdit::DMY, MDY = QDateEdit::MDY, YMD = QDateEdit::YMD, YDM = QDateEdit::YDM };
+ enum Order { DMY = TQDateEdit::DMY, MDY = TQDateEdit::MDY, YMD = TQDateEdit::YMD, YDM = TQDateEdit::YDM };
- KexiDBDateEdit(const QDate &date, QWidget *parent, const char *name=0);
+ KexiDBDateEdit(const TQDate &date, TQWidget *tqparent, const char *name=0);
virtual ~KexiDBDateEdit();
- inline QString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
- inline QCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
- virtual QVariant value();
- virtual void setInvalidState( const QString& displayText );
+ inline TQString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
+ inline TQCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
+ virtual TQVariant value();
+ virtual void setInvalidState( const TQString& displayText );
//! \return true if editor's value is null (not empty)
//! Used for checking if a given constraint within table of form is met.
@@ -68,7 +69,7 @@ class KEXIFORMUTILS_EXPORT KexiDBDateEdit : public QWidget, public KexiFormDataI
virtual bool isReadOnly() const;
/*! \return the view widget of this item, e.g. line edit widget. */
- virtual QWidget* widget();
+ virtual TQWidget* widget();
virtual bool cursorAtStart();
virtual bool cursorAtEnd();
@@ -77,39 +78,39 @@ class KEXIFORMUTILS_EXPORT KexiDBDateEdit : public QWidget, public KexiFormDataI
virtual void setEnabled(bool enabled);
// property functions
- inline QDate date() const { return m_edit->date(); }
- inline void setOrder(Order order) { m_edit->setOrder( (QDateEdit::Order) order); }
+ inline TQDate date() const { return m_edit->date(); }
+ inline void setOrder(Order order) { m_edit->setOrder( (TQDateEdit::Order) order); }
inline Order order() const { return (Order)m_edit->order(); }
inline void setAutoAdvance( bool advance ) { m_edit->setAutoAdvance(advance); }
inline bool autoAdvance() const { return m_edit->autoAdvance(); }
- inline void setMinValue(const QDate& d) { m_edit->setMinValue(d); }
- inline QDate minValue() const { return m_edit->minValue(); }
- inline void setMaxValue(const QDate& d) { m_edit->setMaxValue(d); }
- inline QDate maxValue() const { return m_edit->maxValue(); }
+ inline void setMinValue(const TQDate& d) { m_edit->setMinValue(d); }
+ inline TQDate minValue() const { return m_edit->minValue(); }
+ inline void setMaxValue(const TQDate& d) { m_edit->setMaxValue(d); }
+ inline TQDate maxValue() const { return m_edit->maxValue(); }
signals:
- void dateChanged(const QDate &date);
+ void dateChanged(const TQDate &date);
public slots:
- inline void setDataSource(const QString &ds) { KexiFormDataItemInterface::setDataSource(ds); }
- inline void setDataSourceMimeType(const QCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
- inline void setDate(const QDate& date) { m_edit->setDate(date); }
+ inline void setDataSource(const TQString &ds) { KexiFormDataItemInterface::setDataSource(ds); }
+ inline void setDataSourceMimeType(const TQCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
+ inline void setDate(const TQDate& date) { m_edit->setDate(date); }
virtual void setReadOnly(bool set);
protected slots:
- void slotValueChanged(const QDate&);
+ void slotValueChanged(const TQDate&);
void slotShowDatePicker();
void acceptDate();
protected:
- virtual void setValueInternal(const QVariant& add, bool removeOld);
- virtual bool eventFilter(QObject *o, QEvent *e);
+ virtual void setValueInternal(const TQVariant& add, bool removeOld);
+ virtual bool eventFilter(TQObject *o, TQEvent *e);
private:
KDatePicker *m_datePicker;
- QDateEdit *m_edit;
+ TQDateEdit *m_edit;
KPopupMenu *m_datePickerPopupMenu;
- QDateTimeEditor *m_dte_date;
+ TQDateTimeEditor *m_dte_date;
bool m_invalidState : 1;
bool m_cleared : 1;
bool m_readOnly : 1;
diff --git a/kexi/plugins/forms/widgets/kexidbdatetimeedit.cpp b/kexi/plugins/forms/widgets/kexidbdatetimeedit.cpp
index faaeca66..e99e4651 100644
--- a/kexi/plugins/forms/widgets/kexidbdatetimeedit.cpp
+++ b/kexi/plugins/forms/widgets/kexidbdatetimeedit.cpp
@@ -20,62 +20,62 @@
#include "kexidbdatetimeedit.h"
-#include <qtoolbutton.h>
-#include <qlayout.h>
+#include <tqtoolbutton.h>
+#include <tqlayout.h>
#include <kpopupmenu.h>
#include <kdatepicker.h>
#include <kdatetbl.h>
#include <kexiutils/utils.h>
-KexiDBDateTimeEdit::KexiDBDateTimeEdit(const QDateTime &datetime, QWidget *parent, const char *name)
- : QWidget(parent, name), KexiFormDataItemInterface()
+KexiDBDateTimeEdit::KexiDBDateTimeEdit(const TQDateTime &datetime, TQWidget *tqparent, const char *name)
+ : TQWidget(tqparent, name), KexiFormDataItemInterface()
{
m_invalidState = false;
m_cleared = false;
m_readOnly = false;
- m_dateEdit = new QDateEdit(datetime.date(), this);
+ m_dateEdit = new TQDateEdit(datetime.date(), this);
m_dateEdit->setAutoAdvance(true);
- m_dateEdit->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::MinimumExpanding);
-// m_dateEdit->setFixedWidth( QFontMetrics(m_dateEdit->font()).width("8888-88-88___") );
- connect(m_dateEdit, SIGNAL(valueChanged(const QDate&)), this, SLOT(slotValueChanged()));
- connect(m_dateEdit, SIGNAL(valueChanged(const QDate&)), this, SIGNAL(dateTimeChanged()));
+ m_dateEdit->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding);
+// m_dateEdit->setFixedWidth( TQFontMetrics(m_dateEdit->font()).width("8888-88-88___") );
+ connect(m_dateEdit, TQT_SIGNAL(valueChanged(const TQDate&)), this, TQT_SLOT(slotValueChanged()));
+ connect(m_dateEdit, TQT_SIGNAL(valueChanged(const TQDate&)), this, TQT_SIGNAL(dateTimeChanged()));
- QToolButton* btn = new QToolButton(this);
+ TQToolButton* btn = new TQToolButton(this);
btn->setText("...");
- btn->setFixedWidth( QFontMetrics(btn->font()).width(" ... ") );
+ btn->setFixedWidth( TQFontMetrics(btn->font()).width(" ... ") );
btn->setPopupDelay(1); //1 ms
- m_timeEdit = new QTimeEdit(datetime.time(), this);;
+ m_timeEdit = new TQTimeEdit(datetime.time(), this);;
m_timeEdit->setAutoAdvance(true);
- m_timeEdit->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::MinimumExpanding);
- connect(m_timeEdit, SIGNAL(valueChanged(const QTime&)), this, SLOT(slotValueChanged()));
- connect(m_timeEdit, SIGNAL(valueChanged(const QTime&)), this, SIGNAL(dateTimeChanged()));
+ m_timeEdit->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding);
+ connect(m_timeEdit, TQT_SIGNAL(valueChanged(const TQTime&)), this, TQT_SLOT(slotValueChanged()));
+ connect(m_timeEdit, TQT_SIGNAL(valueChanged(const TQTime&)), this, TQT_SIGNAL(dateTimeChanged()));
-#ifdef QDateTimeEditor_HACK
- m_dte_date = KexiUtils::findFirstChild<QDateTimeEditor>(m_dateEdit, "QDateTimeEditor");
- m_dte_time = KexiUtils::findFirstChild<QDateTimeEditor>(m_timeEdit, "QDateTimeEditor");
+#ifdef TQDateTimeEditor_HACK
+ m_dte_date = KexiUtils::findFirstChild<TQDateTimeEditor>(m_dateEdit, "TQDateTimeEditor");
+ m_dte_time = KexiUtils::findFirstChild<TQDateTimeEditor>(m_timeEdit, "TQDateTimeEditor");
#else
m_dte_date = 0;
#endif
m_datePickerPopupMenu = new KPopupMenu(0, "date_popup");
- connect(m_datePickerPopupMenu, SIGNAL(aboutToShow()), this, SLOT(slotShowDatePicker()));
- m_datePicker = new KDatePicker(m_datePickerPopupMenu, QDate::currentDate(), 0);
+ connect(m_datePickerPopupMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotShowDatePicker()));
+ m_datePicker = new KDatePicker(m_datePickerPopupMenu, TQDate::tqcurrentDate(), 0);
KDateTable *dt = KexiUtils::findFirstChild<KDateTable>(m_datePicker, "KDateTable");
if (dt)
- connect(dt, SIGNAL(tableClicked()), this, SLOT(acceptDate()));
+ connect(dt, TQT_SIGNAL(tableClicked()), this, TQT_SLOT(acceptDate()));
m_datePicker->setCloseButton(true);
m_datePicker->installEventFilter(this);
m_datePickerPopupMenu->insertItem(m_datePicker);
btn->setPopup(m_datePickerPopupMenu);
- QHBoxLayout* layout = new QHBoxLayout(this);
- layout->addWidget(m_dateEdit, 0);
- layout->addWidget(btn, 0);
- layout->addWidget(m_timeEdit, 0);
- //layout->addStretch(1);
+ TQHBoxLayout* tqlayout = new TQHBoxLayout(this);
+ tqlayout->addWidget(m_dateEdit, 0);
+ tqlayout->addWidget(btn, 0);
+ tqlayout->addWidget(m_timeEdit, 0);
+ //tqlayout->addStretch(1);
setFocusProxy(m_dateEdit);
}
@@ -84,14 +84,14 @@ KexiDBDateTimeEdit::~KexiDBDateTimeEdit()
{
}
-void KexiDBDateTimeEdit::setInvalidState(const QString & /*! @todo paint this text: text*/)
+void KexiDBDateTimeEdit::setInvalidState(const TQString & /*! @todo paint this text: text*/)
{
setEnabled(false);
setReadOnly(true);
m_invalidState = true;
//! @todo move this to KexiDataItemInterface::setInvalidStateInternal() ?
if (focusPolicy() & TabFocus)
- setFocusPolicy(QWidget::ClickFocus);
+ setFocusPolicy(TQ_ClickFocus);
}
void
@@ -100,19 +100,19 @@ KexiDBDateTimeEdit::setEnabled(bool enabled)
// prevent the user from reenabling the widget when it is in invalid state
if(enabled && m_invalidState)
return;
- QWidget::setEnabled(enabled);
+ TQWidget::setEnabled(enabled);
}
-void KexiDBDateTimeEdit::setValueInternal(const QVariant &, bool )
+void KexiDBDateTimeEdit::setValueInternal(const TQVariant &, bool )
{
m_dateEdit->setDate(m_origValue.toDate());
m_timeEdit->setTime(m_origValue.toTime());
}
-QVariant
+TQVariant
KexiDBDateTimeEdit::value()
{
- return QDateTime(m_dateEdit->date(), m_timeEdit->time());
+ return TQDateTime(m_dateEdit->date(), m_timeEdit->time());
}
bool KexiDBDateTimeEdit::valueIsNull()
@@ -138,7 +138,7 @@ void KexiDBDateTimeEdit::setReadOnly(bool set)
m_readOnly = set;
}
-QWidget*
+TQWidget*
KexiDBDateTimeEdit::widget()
{
return m_dateEdit;
@@ -146,7 +146,7 @@ KexiDBDateTimeEdit::widget()
bool KexiDBDateTimeEdit::cursorAtStart()
{
-#ifdef QDateTimeEditor_HACK
+#ifdef TQDateTimeEditor_HACK
return m_dte_date && m_dateEdit->hasFocus() && m_dte_date->focusSection()==0;
#else
return false;
@@ -155,7 +155,7 @@ bool KexiDBDateTimeEdit::cursorAtStart()
bool KexiDBDateTimeEdit::cursorAtEnd()
{
-#ifdef QDateTimeEditor_HACK
+#ifdef TQDateTimeEditor_HACK
return m_dte_time && m_timeEdit->hasFocus()
&& m_dte_time->focusSection()==int(m_dte_time->sectionCount()-1);
#else
@@ -165,8 +165,8 @@ bool KexiDBDateTimeEdit::cursorAtEnd()
void KexiDBDateTimeEdit::clear()
{
- m_dateEdit->setDate(QDate());
- m_timeEdit->setTime(QTime());
+ m_dateEdit->setDate(TQDate());
+ m_timeEdit->setTime(TQTime());
m_cleared = true;
}
@@ -179,7 +179,7 @@ KexiDBDateTimeEdit::slotValueChanged()
void
KexiDBDateTimeEdit::slotShowDatePicker()
{
- QDate date = m_dateEdit->date();
+ TQDate date = m_dateEdit->date();
m_datePicker->setDate(date);
m_datePicker->setFocus();
@@ -195,24 +195,24 @@ KexiDBDateTimeEdit::acceptDate()
}
bool
-KexiDBDateTimeEdit::eventFilter(QObject *o, QEvent *e)
+KexiDBDateTimeEdit::eventFilter(TQObject *o, TQEvent *e)
{
if (o != m_datePicker)
return false;
switch (e->type()) {
- case QEvent::Hide:
+ case TQEvent::Hide:
m_datePickerPopupMenu->hide();
break;
- case QEvent::KeyPress:
- case QEvent::KeyRelease: {
- QKeyEvent *ke = (QKeyEvent *)e;
- if (ke->key()==Qt::Key_Enter || ke->key()==Qt::Key_Return) {
+ case TQEvent::KeyPress:
+ case TQEvent::KeyRelease: {
+ TQKeyEvent *ke = (TQKeyEvent *)e;
+ if (ke->key()==TQt::Key_Enter || ke->key()==TQt::Key_Return) {
//accepting picker
acceptDate();
return true;
}
- else if (ke->key()==Qt::Key_Escape) {
+ else if (ke->key()==TQt::Key_Escape) {
//canceling picker
m_datePickerPopupMenu->hide();
return true;
@@ -227,14 +227,14 @@ KexiDBDateTimeEdit::eventFilter(QObject *o, QEvent *e)
return false;
}
-QDateTime
+TQDateTime
KexiDBDateTimeEdit::dateTime() const
{
- return QDateTime(m_dateEdit->date(), m_timeEdit->time());
+ return TQDateTime(m_dateEdit->date(), m_timeEdit->time());
}
void
-KexiDBDateTimeEdit::setDateTime(const QDateTime &dt)
+KexiDBDateTimeEdit::setDateTime(const TQDateTime &dt)
{
m_dateEdit->setDate(dt.date());
m_timeEdit->setTime(dt.time());
diff --git a/kexi/plugins/forms/widgets/kexidbdatetimeedit.h b/kexi/plugins/forms/widgets/kexidbdatetimeedit.h
index 1f185b16..b5bbaec0 100644
--- a/kexi/plugins/forms/widgets/kexidbdatetimeedit.h
+++ b/kexi/plugins/forms/widgets/kexidbdatetimeedit.h
@@ -22,32 +22,33 @@
#define KexiDBDateTimeEdit_H
#include "kexiformdataiteminterface.h"
-#include <qdatetimeedit.h>
+#include <tqdatetimeedit.h>
class KDatePicker;
-class QDateTimeEditor;
+class TQDateTimeEditor;
class KPopupMenu;
//! @short A db-aware datetime editor
-class KEXIFORMUTILS_EXPORT KexiDBDateTimeEdit : public QWidget, public KexiFormDataItemInterface
+class KEXIFORMUTILS_EXPORT KexiDBDateTimeEdit : public TQWidget, public KexiFormDataItemInterface
{
Q_OBJECT
- Q_PROPERTY(QString dataSource READ dataSource WRITE setDataSource DESIGNABLE true)
- Q_PROPERTY(QCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true)
- // properties copied from QDateTimeEdit
- Q_PROPERTY( QDateTime dateTime READ dateTime WRITE setDateTime )
- Q_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly DESIGNABLE true )
+ TQ_OBJECT
+ TQ_PROPERTY(TQString dataSource READ dataSource WRITE setDataSource DESIGNABLE true)
+ TQ_PROPERTY(TQCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true)
+ // properties copied from TQDateTimeEdit
+ TQ_PROPERTY( TQDateTime dateTime READ dateTime WRITE setDateTime )
+ TQ_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly DESIGNABLE true )
public:
enum Order { DMY, MDY, YMD, YDM };
- KexiDBDateTimeEdit(const QDateTime &datetime, QWidget *parent, const char *name=0);
+ KexiDBDateTimeEdit(const TQDateTime &datetime, TQWidget *tqparent, const char *name=0);
virtual ~KexiDBDateTimeEdit();
- inline QString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
- inline QCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
- virtual QVariant value();
- virtual void setInvalidState( const QString& displayText );
+ inline TQString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
+ inline TQCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
+ virtual TQVariant value();
+ virtual void setInvalidState( const TQString& displayText );
//! \return true if editor's value is null (not empty)
//! Used for checking if a given constraint within table of form is met.
@@ -63,7 +64,7 @@ class KEXIFORMUTILS_EXPORT KexiDBDateTimeEdit : public QWidget, public KexiFormD
virtual bool isReadOnly() const;
/*! \return the view widget of this item, e.g. line edit widget. */
- virtual QWidget* widget();
+ virtual TQWidget* widget();
virtual bool cursorAtStart();
virtual bool cursorAtEnd();
@@ -72,20 +73,20 @@ class KEXIFORMUTILS_EXPORT KexiDBDateTimeEdit : public QWidget, public KexiFormD
virtual void setEnabled(bool enabled);
// property functions
- QDateTime dateTime() const;
+ TQDateTime dateTime() const;
signals:
void dateTimeChanged();
public slots:
- inline void setDataSource(const QString &ds) { KexiFormDataItemInterface::setDataSource(ds); }
- inline void setDataSourceMimeType(const QCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
- void setDateTime(const QDateTime &dt);
+ inline void setDataSource(const TQString &ds) { KexiFormDataItemInterface::setDataSource(ds); }
+ inline void setDataSourceMimeType(const TQCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
+ void setDateTime(const TQDateTime &dt);
virtual void setReadOnly(bool set);
protected:
- virtual void setValueInternal(const QVariant& add, bool removeOld);
- virtual bool eventFilter(QObject *o, QEvent *e);
+ virtual void setValueInternal(const TQVariant& add, bool removeOld);
+ virtual bool eventFilter(TQObject *o, TQEvent *e);
protected slots:
void slotValueChanged();
@@ -94,9 +95,9 @@ class KEXIFORMUTILS_EXPORT KexiDBDateTimeEdit : public QWidget, public KexiFormD
private:
KDatePicker *m_datePicker;
- QDateEdit* m_dateEdit;
- QTimeEdit* m_timeEdit;
- QDateTimeEditor *m_dte_date, *m_dte_time;
+ TQDateEdit* m_dateEdit;
+ TQTimeEdit* m_timeEdit;
+ TQDateTimeEditor *m_dte_date, *m_dte_time;
KPopupMenu *m_datePickerPopupMenu;
bool m_invalidState : 1;
bool m_cleared : 1;
diff --git a/kexi/plugins/forms/widgets/kexidbdoublespinbox.cpp b/kexi/plugins/forms/widgets/kexidbdoublespinbox.cpp
index 67a2c1a6..c0eb17d3 100644
--- a/kexi/plugins/forms/widgets/kexidbdoublespinbox.cpp
+++ b/kexi/plugins/forms/widgets/kexidbdoublespinbox.cpp
@@ -20,26 +20,26 @@
#include "kexidbdoublespinbox.h"
-#include <qlineedit.h>
+#include <tqlineedit.h>
-KexiDBDoubleSpinBox::KexiDBDoubleSpinBox(QWidget *parent, const char *name)
- : KDoubleSpinBox(parent, name) , KexiFormDataItemInterface()
+KexiDBDoubleSpinBox::KexiDBDoubleSpinBox(TQWidget *tqparent, const char *name)
+ : KDoubleSpinBox(tqparent, name) , KexiFormDataItemInterface()
{
- connect(this, SIGNAL(valueChanged(double)), this, SLOT(slotValueChanged()));
+ connect(this, TQT_SIGNAL(valueChanged(double)), this, TQT_SLOT(slotValueChanged()));
}
KexiDBDoubleSpinBox::~KexiDBDoubleSpinBox()
{
}
-void KexiDBDoubleSpinBox::setInvalidState( const QString& displayText )
+void KexiDBDoubleSpinBox::setInvalidState( const TQString& displayText )
{
m_invalidState = true;
setEnabled(false);
setReadOnly(true);
//! @todo move this to KexiDataItemInterface::setInvalidStateInternal() ?
if (focusPolicy() & TabFocus)
- setFocusPolicy(QWidget::ClickFocus);
+ setFocusPolicy(TQ_ClickFocus);
setSpecialValueText(displayText);
KDoubleSpinBox::setValue(minValue());
}
@@ -53,12 +53,12 @@ KexiDBDoubleSpinBox::setEnabled(bool enabled)
KDoubleSpinBox::setEnabled(enabled);
}
-void KexiDBDoubleSpinBox::setValueInternal(const QVariant&, bool )
+void KexiDBDoubleSpinBox::setValueInternal(const TQVariant&, bool )
{
KDoubleSpinBox::setValue(m_origValue.toDouble());
}
-QVariant
+TQVariant
KexiDBDoubleSpinBox::value()
{
return KDoubleSpinBox::value();
@@ -89,7 +89,7 @@ void KexiDBDoubleSpinBox::setReadOnly(bool set)
editor()->setReadOnly(set);
}
-QWidget*
+TQWidget*
KexiDBDoubleSpinBox::widget()
{
return this;
diff --git a/kexi/plugins/forms/widgets/kexidbdoublespinbox.h b/kexi/plugins/forms/widgets/kexidbdoublespinbox.h
index c6bc627d..1445980c 100644
--- a/kexi/plugins/forms/widgets/kexidbdoublespinbox.h
+++ b/kexi/plugins/forms/widgets/kexidbdoublespinbox.h
@@ -22,25 +22,26 @@
#define KexiDBDoubleSpinBox_H
#include "kexiformdataiteminterface.h"
-#include <qwidget.h>
+#include <tqwidget.h>
#include <knuminput.h>
//! @short A db-aware int spin box
class KEXIFORMUTILS_EXPORT KexiDBDoubleSpinBox : public KDoubleSpinBox, public KexiFormDataItemInterface
{
Q_OBJECT
- Q_PROPERTY(QString dataSource READ dataSource WRITE setDataSource DESIGNABLE true)
- Q_PROPERTY(QCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true)
- Q_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly DESIGNABLE true )
+ TQ_OBJECT
+ TQ_PROPERTY(TQString dataSource READ dataSource WRITE setDataSource DESIGNABLE true)
+ TQ_PROPERTY(TQCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true)
+ TQ_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly DESIGNABLE true )
public:
- KexiDBDoubleSpinBox(QWidget *parent, const char *name=0);
+ KexiDBDoubleSpinBox(TQWidget *tqparent, const char *name=0);
virtual ~KexiDBDoubleSpinBox();
- inline QString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
- inline QCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
- virtual QVariant value();
- virtual void setInvalidState( const QString& displayText );
+ inline TQString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
+ inline TQCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
+ virtual TQVariant value();
+ virtual void setInvalidState( const TQString& displayText );
//! \return true if editor's value is null (not empty)
//! Used for checking if a given constraint within table of form is met.
@@ -56,7 +57,7 @@ class KEXIFORMUTILS_EXPORT KexiDBDoubleSpinBox : public KDoubleSpinBox, public K
virtual bool isReadOnly() const;
/*! \return the view widget of this item, e.g. line edit widget. */
- virtual QWidget* widget();
+ virtual TQWidget* widget();
virtual bool cursorAtStart();
virtual bool cursorAtEnd();
@@ -64,13 +65,13 @@ class KEXIFORMUTILS_EXPORT KexiDBDoubleSpinBox : public KDoubleSpinBox, public K
public slots:
virtual void setEnabled(bool enabled);
- inline void setDataSource(const QString &ds) { KexiFormDataItemInterface::setDataSource(ds); }
- inline void setDataSourceMimeType(const QCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
+ inline void setDataSource(const TQString &ds) { KexiFormDataItemInterface::setDataSource(ds); }
+ inline void setDataSourceMimeType(const TQCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
void slotValueChanged();
virtual void setReadOnly(bool set);
protected:
- virtual void setValueInternal(const QVariant& add, bool removeOld);
+ virtual void setValueInternal(const TQVariant& add, bool removeOld);
private:
bool m_invalidState : 1;
diff --git a/kexi/plugins/forms/widgets/kexidbform.cpp b/kexi/plugins/forms/widgets/kexidbform.cpp
index cff12c7c..12210430 100644
--- a/kexi/plugins/forms/widgets/kexidbform.cpp
+++ b/kexi/plugins/forms/widgets/kexidbform.cpp
@@ -19,11 +19,11 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qobjectlist.h>
-#include <qpainter.h>
-#include <qcursor.h>
-#include <qapplication.h>
-#include <qfocusdata.h>
+#include <tqobjectlist.h>
+#include <tqpainter.h>
+#include <tqcursor.h>
+#include <tqapplication.h>
+#include <tqfocusdata.h>
#include <kdebug.h>
@@ -55,7 +55,7 @@ class KexiDBForm::Private
}
//! \return index of data-aware widget \a widget
- int indexOfDataAwareWidget(QWidget *widget) const
+ int indexOfDataAwareWidget(TQWidget *widget) const
{
if (!dynamic_cast<KexiDataItemInterface*>(widget))
return -1;
@@ -65,8 +65,8 @@ class KexiDBForm::Private
//! \return index of data item \a item, or -1 if not found
int indexOfDataItem( KexiDataItemInterface* item ) const
{
- QMapConstIterator<KexiDataItemInterface*, uint> indicesForDataAwareWidgetsIt(
- indicesForDataAwareWidgets.find(item));
+ TQMapConstIterator<KexiDataItemInterface*, uint> indicesForDataAwareWidgetsIt(
+ indicesForDataAwareWidgets.tqfind(item));
if (indicesForDataAwareWidgetsIt == indicesForDataAwareWidgets.constEnd())
return -1;
kexipluginsdbg << "KexiDBForm: column # for item: "
@@ -75,7 +75,7 @@ class KexiDBForm::Private
}
//! Sets orderedFocusWidgetsIterator member to a position pointing to \a widget
- void setOrderedFocusWidgetsIteratorTo( QWidget *widget )
+ void setOrderedFocusWidgetsIteratorTo( TQWidget *widget )
{
if (orderedFocusWidgetsIterator.current() == widget)
return;
@@ -86,23 +86,23 @@ class KexiDBForm::Private
KexiDataAwareObjectInterface* dataAwareObject;
//! ordered list of focusable widgets (can be both data-widgets or buttons, etc.)
- QPtrList<QWidget> orderedFocusWidgets;
+ TQPtrList<TQWidget> orderedFocusWidgets;
//! ordered list of data-aware widgets
- QPtrList<QWidget> orderedDataAwareWidgets;
- QMap<KexiDataItemInterface*, uint> indicesForDataAwareWidgets; //!< a subset of orderedFocusWidgets mapped to indices
- QPtrListIterator<QWidget> orderedFocusWidgetsIterator;
- QPixmap buffer; //!< stores grabbed entire form's area for redraw
- QRect prev_rect; //!< previously selected rectangle
-// QGuardedPtr<QWidget> widgetFocusedBeforePopup;
+ TQPtrList<TQWidget> orderedDataAwareWidgets;
+ TQMap<KexiDataItemInterface*, uint> indicesForDataAwareWidgets; //!< a subset of orderedFocusWidgets mapped to indices
+ TQPtrListIterator<TQWidget> orderedFocusWidgetsIterator;
+ TQPixmap buffer; //!< stores grabbed entire form's area for redraw
+ TQRect prev_rect; //!< previously selected rectangle
+// TQGuardedPtr<TQWidget> widgetFocusedBeforePopup;
bool autoTabStops : 1;
bool popupFocused : 1; //!< used in KexiDBForm::eventFilter()
};
//========================
-KexiDBForm::KexiDBForm(QWidget *parent, KexiDataAwareObjectInterface* dataAwareObject,
+KexiDBForm::KexiDBForm(TQWidget *tqparent, KexiDataAwareObjectInterface* dataAwareObject,
const char *name/*, KexiDB::Connection *conn*/)
- : KexiDBFormBase(parent, name)
+ : KexiDBFormBase(tqparent, name)
, KexiFormDataItemInterface()
, d(new Private())
{
@@ -113,7 +113,7 @@ KexiDBForm::KexiDBForm(QWidget *parent, KexiDataAwareObjectInterface* dataAwareO
m_hasFocusableWidget = false;
kexipluginsdbg << "KexiDBForm::KexiDBForm(): " << endl;
- setCursor(QCursor(Qt::ArrowCursor)); //to avoid keeping Size cursor when moving from form's boundaries
+ setCursor(TQCursor(TQt::ArrowCursor)); //to avoid keeping Size cursor when moving from form's boundaries
setAcceptDrops( true );
}
@@ -125,48 +125,48 @@ KexiDBForm::~KexiDBForm()
KexiDataAwareObjectInterface* KexiDBForm::dataAwareObject() const { return d->dataAwareObject; }
-//repaint all children widgets
-static void repaintAll(QWidget *w)
+//tqrepaint all tqchildren widgets
+static void tqrepaintAll(TQWidget *w)
{
- QObjectList *list = w->queryList("QWidget");
- QObjectListIt it(*list);
- for (QObject *obj; (obj=it.current()); ++it ) {
- static_cast<QWidget*>(obj)->repaint();
+ TQObjectList *list = w->queryList(TQWIDGET_OBJECT_NAME_STRING);
+ TQObjectListIt it(*list);
+ for (TQObject *obj; (obj=it.current()); ++it ) {
+ TQT_TQWIDGET(obj)->tqrepaint();
}
delete list;
}
void
-KexiDBForm::drawRect(const QRect& r, int type)
+KexiDBForm::drawRect(const TQRect& r, int type)
{
- QValueList<QRect> l;
+ TQValueList<TQRect> l;
l.append(r);
drawRects(l, type);
}
void
-KexiDBForm::drawRects(const QValueList<QRect> &list, int type)
+KexiDBForm::drawRects(const TQValueList<TQRect> &list, int type)
{
- QPainter p;
- p.begin(this, true);
+ TQPainter p;
+ p.tqbegin(TQT_TQPAINTDEVICE(this), true);
bool unclipped = testWFlags( WPaintUnclipped );
setWFlags( WPaintUnclipped );
if (d->prev_rect.isValid()) {
//redraw prev. selection's rectangle
- p.drawPixmap( QPoint(d->prev_rect.x()-2, d->prev_rect.y()-2), d->buffer,
- QRect(d->prev_rect.x()-2, d->prev_rect.y()-2, d->prev_rect.width()+4, d->prev_rect.height()+4));
+ p.drawPixmap( TQPoint(d->prev_rect.x()-2, d->prev_rect.y()-2), d->buffer,
+ TQRect(d->prev_rect.x()-2, d->prev_rect.y()-2, d->prev_rect.width()+4, d->prev_rect.height()+4));
}
- p.setBrush(QBrush::NoBrush);
+ p.setBrush(TQBrush::NoBrush);
if(type == 1) // selection rect
- p.setPen(QPen(white, 1, Qt::DotLine));
+ p.setPen(TQPen(white, 1, TQt::DotLine));
else if(type == 2) // insert rect
- p.setPen(QPen(white, 2));
+ p.setPen(TQPen(white, 2));
p.setRasterOp(XorROP);
- d->prev_rect = QRect();
- QValueList<QRect>::ConstIterator endIt = list.constEnd();
- for(QValueList<QRect>::ConstIterator it = list.constBegin(); it != endIt; ++it) {
+ d->prev_rect = TQRect();
+ TQValueList<TQRect>::ConstIterator endIt = list.constEnd();
+ for(TQValueList<TQRect>::ConstIterator it = list.constBegin(); it != endIt; ++it) {
p.drawRect(*it);
if (d->prev_rect.isValid())
d->prev_rect = d->prev_rect.unite(*it);
@@ -182,59 +182,59 @@ KexiDBForm::drawRects(const QValueList<QRect> &list, int type)
void
KexiDBForm::initBuffer()
{
- repaintAll(this);
+ tqrepaintAll(this);
d->buffer.resize( width(), height() );
- d->buffer = QPixmap::grabWindow( winId() );
- d->prev_rect = QRect();
+ d->buffer = TQPixmap::grabWindow( winId() );
+ d->prev_rect = TQRect();
}
void
KexiDBForm::clearForm()
{
- QPainter p;
- p.begin(this, true);
+ TQPainter p;
+ p.tqbegin(TQT_TQPAINTDEVICE(this), true);
bool unclipped = testWFlags( WPaintUnclipped );
setWFlags( WPaintUnclipped );
//redraw entire form surface
- p.drawPixmap( QPoint(0,0), d->buffer, QRect(0,0,d->buffer.width(), d->buffer.height()) );
+ p.drawPixmap( TQPoint(0,0), d->buffer, TQRect(0,0,d->buffer.width(), d->buffer.height()) );
if (!unclipped)
clearWFlags( WPaintUnclipped );
p.end();
- repaintAll(this);
+ tqrepaintAll(this);
}
void
-KexiDBForm::highlightWidgets(QWidget *from, QWidget *to)//, const QPoint &point)
+KexiDBForm::highlightWidgets(TQWidget *from, TQWidget *to)//, const TQPoint &point)
{
- QPoint fromPoint, toPoint;
- if(from && from->parentWidget() && (from != this))
- fromPoint = from->parentWidget()->mapTo(this, from->pos());
- if(to && to->parentWidget() && (to != this))
- toPoint = to->parentWidget()->mapTo(this, to->pos());
-
- QPainter p;
- p.begin(this, true);
+ TQPoint fromPoint, toPoint;
+ if(from && from->tqparentWidget() && (from != this))
+ fromPoint = from->tqparentWidget()->mapTo(this, from->pos());
+ if(to && to->tqparentWidget() && (to != this))
+ toPoint = to->tqparentWidget()->mapTo(this, to->pos());
+
+ TQPainter p;
+ p.tqbegin(TQT_TQPAINTDEVICE(this), true);
bool unclipped = testWFlags( WPaintUnclipped );
setWFlags( WPaintUnclipped );
if (d->prev_rect.isValid()) {
//redraw prev. selection's rectangle
- p.drawPixmap( QPoint(d->prev_rect.x(), d->prev_rect.y()), d->buffer,
- QRect(d->prev_rect.x(), d->prev_rect.y(), d->prev_rect.width(), d->prev_rect.height()));
+ p.drawPixmap( TQPoint(d->prev_rect.x(), d->prev_rect.y()), d->buffer,
+ TQRect(d->prev_rect.x(), d->prev_rect.y(), d->prev_rect.width(), d->prev_rect.height()));
}
- p.setPen( QPen(Qt::red, 2) );
+ p.setPen( TQPen(TQt::red, 2) );
if(to)
{
- QPixmap pix1 = QPixmap::grabWidget(from);
- QPixmap pix2 = QPixmap::grabWidget(to);
+ TQPixmap pix1 = TQPixmap::grabWidget(from);
+ TQPixmap pix2 = TQPixmap::grabWidget(to);
if((from != this) && (to != this))
- p.drawLine( from->parentWidget()->mapTo(this, from->geometry().center()), to->parentWidget()->mapTo(this, to->geometry().center()) );
+ p.drawLine( from->tqparentWidget()->mapTo(this, from->tqgeometry().center()), to->tqparentWidget()->mapTo(this, to->tqgeometry().center()) );
p.drawPixmap(fromPoint.x(), fromPoint.y(), pix1);
p.drawPixmap(toPoint.x(), toPoint.y(), pix2);
@@ -251,7 +251,7 @@ KexiDBForm::highlightWidgets(QWidget *from, QWidget *to)//, const QPoint &point)
p.drawRoundRect(fromPoint.x(), fromPoint.y(), from->width(), from->height(), 5, 5);
if((to == this) || (from == this))
- d->prev_rect = QRect(0, 0, d->buffer.width(), d->buffer.height());
+ d->prev_rect = TQRect(0, 0, d->buffer.width(), d->buffer.height());
else if(to)
{
d->prev_rect.setX( (fromPoint.x() < toPoint.x()) ? (fromPoint.x() - 5) : (toPoint.x() - 5) );
@@ -260,21 +260,21 @@ KexiDBForm::highlightWidgets(QWidget *from, QWidget *to)//, const QPoint &point)
d->prev_rect.setBottom( (fromPoint.y() < toPoint.y()) ? (toPoint.y() + to->height() + 10) : (fromPoint.y() + from->height() + 10) ) ;
}
else
- d->prev_rect = QRect(fromPoint.x()- 5, fromPoint.y() -5, from->width() + 10, from->height() + 10);
+ d->prev_rect = TQRect(fromPoint.x()- 5, fromPoint.y() -5, from->width() + 10, from->height() + 10);
if (!unclipped)
clearWFlags( WPaintUnclipped );
p.end();
}
-QSize
-KexiDBForm::sizeHint() const
+TQSize
+KexiDBForm::tqsizeHint() const
{
//todo: find better size (user configured?)
- return QSize(400,300);
+ return TQSize(400,300);
}
-void KexiDBForm::setInvalidState( const QString& displayText )
+void KexiDBForm::setInvalidState( const TQString& displayText )
{
Q_UNUSED( displayText );
@@ -291,40 +291,40 @@ void KexiDBForm::setAutoTabStops(bool set)
d->autoTabStops = set;
}
-QPtrList<QWidget>* KexiDBForm::orderedFocusWidgets() const
+TQPtrList<TQWidget>* KexiDBForm::orderedFocusWidgets() const
{
return &d->orderedFocusWidgets;
}
-QPtrList<QWidget>* KexiDBForm::orderedDataAwareWidgets() const
+TQPtrList<TQWidget>* KexiDBForm::orderedDataAwareWidgets() const
{
return &d->orderedDataAwareWidgets;
}
void KexiDBForm::updateTabStopsOrder(KFormDesigner::Form* form)
{
- QWidget *fromWidget = 0;
- //QWidget *topLevelWidget = form->widget()->topLevelWidget();
+ TQWidget *fromWidget = 0;
+ //TQWidget *tqtopLevelWidget = form->widget()->tqtopLevelWidget();
//js form->updateTabStopsOrder(); //certain widgets can have now updated focusPolicy properties, fix this
uint numberOfDataAwareWidgets = 0;
// if (d->orderedFocusWidgets.isEmpty()) {
//generate a new list
for (KFormDesigner::ObjectTreeListIterator it(form->tabStopsIterator()); it.current(); ++it) {
- if (it.current()->widget()->focusPolicy() & QWidget::TabFocus) {
+ if (it.current()->widget()->focusPolicy() & TQ_TabFocus) {
//this widget has tab focus:
it.current()->widget()->installEventFilter(this);
- //also filter events for data-aware children of this widget (i.e. KexiDBAutoField's editors)
- QObjectList *children = it.current()->widget()->queryList("QWidget");
- for (QObjectListIt childrenIt(*children); childrenIt.current(); ++childrenIt) {
- // if (dynamic_cast<KexiFormDataItemInterface*>(childrenIt.current())) {
+ //also filter events for data-aware tqchildren of this widget (i.e. KexiDBAutoField's editors)
+ TQObjectList *tqchildren = it.current()->widget()->queryList(TQWIDGET_OBJECT_NAME_STRING);
+ for (TQObjectListIt tqchildrenIt(*tqchildren); tqchildrenIt.current(); ++tqchildrenIt) {
+ // if (dynamic_cast<KexiFormDataItemInterface*>(tqchildrenIt.current())) {
kexipluginsdbg << "KexiDBForm::updateTabStopsOrder(): also adding '"
- << childrenIt.current()->className() << " " << childrenIt.current()->name()
+ << tqchildrenIt.current()->className() << " " << tqchildrenIt.current()->name()
<< "' child to filtered widgets" << endl;
- //it.current()->widget()->installEventFilter(static_cast<QWidget*>(childrenIt.current()));
- childrenIt.current()->installEventFilter(this);
+ //it.current()->widget()->installEventFilter(TQT_TQWIDGET(tqchildrenIt.current()));
+ tqchildrenIt.current()->installEventFilter(this);
// }
}
- delete children;
+ delete tqchildren;
if (fromWidget) {
kexipluginsdbg << "KexiDBForm::updateTabStopsOrder() tab order: " << fromWidget->name()
<< " -> " << it.current()->widget()->name() << endl;
@@ -342,7 +342,7 @@ void KexiDBForm::updateTabStopsOrder(KFormDesigner::Form* form)
// /*! @todo d->indicesForDataAwareWidgets SHOULDNT BE UPDATED HERE BECAUSE
// THERE CAN BE ALSO NON-TABSTOP DATA WIDGETS!
// */
- d->indicesForDataAwareWidgets.replace(
+ d->indicesForDataAwareWidgets.tqreplace(
dataItem,
numberOfDataAwareWidgets );
numberOfDataAwareWidgets++;
@@ -353,7 +353,7 @@ void KexiDBForm::updateTabStopsOrder(KFormDesigner::Form* form)
// }
/* else {
//restore ordering
- for (QPtrListIterator<QWidget> it(d->orderedFocusWidgets); it.current(); ++it) {
+ for (TQPtrListIterator<TQWidget> it(d->orderedFocusWidgets); it.current(); ++it) {
if (fromWidget) {
kdDebug() << "KexiDBForm::updateTabStopsOrder() tab order: " << fromWidget->name()
<< " -> " << it.current()->name() << endl;
@@ -361,14 +361,14 @@ void KexiDBForm::updateTabStopsOrder(KFormDesigner::Form* form)
}
fromWidget = it.current();
}
-// SET_FOCUS_USING_REASON(focusWidget(), QFocusEvent::Tab);
+// SET_FOCUS_USING_REASON(tqfocusWidget(), TQFocusEvent::Tab);
}*/
}
void KexiDBForm::updateTabStopsOrder()
{
- for (QPtrListIterator<QWidget> it( d->orderedFocusWidgets ); it.current();) {
- if (! (it.current()->focusPolicy() & QWidget::TabFocus))
+ for (TQPtrListIterator<TQWidget> it( d->orderedFocusWidgets ); it.current();) {
+ if (! (it.current()->focusPolicy() & TQ_TabFocus))
d->orderedFocusWidgets.remove( it.current() );
else
++it;
@@ -377,7 +377,7 @@ void KexiDBForm::updateTabStopsOrder()
void KexiDBForm::updateReadOnlyFlags()
{
- for (QPtrListIterator<QWidget> it(d->orderedDataAwareWidgets); it.current(); ++it) {
+ for (TQPtrListIterator<TQWidget> it(d->orderedDataAwareWidgets); it.current(); ++it) {
KexiFormDataItemInterface* dataItem = dynamic_cast<KexiFormDataItemInterface*>( it.current() );
if (dataItem && !dataItem->dataSource().isEmpty()) {
if (dataAwareObject()->isReadOnly()) {
@@ -387,27 +387,27 @@ void KexiDBForm::updateReadOnlyFlags()
}
}
-bool KexiDBForm::eventFilter( QObject * watched, QEvent * e )
+bool KexiDBForm::eventFilter( TQObject * watched, TQEvent * e )
{
//kexipluginsdbg << e->type() << endl;
- if (e->type()==QEvent::Resize && watched == this)
+ if (e->type()==TQEvent::Resize && TQT_BASE_OBJECT(watched) == TQT_BASE_OBJECT(this))
kexipluginsdbg << "RESIZE" << endl;
- if (e->type()==QEvent::KeyPress) {
+ if (e->type()==TQEvent::KeyPress) {
if (preview()) {
- QKeyEvent *ke = static_cast<QKeyEvent*>(e);
+ TQKeyEvent *ke = TQT_TQKEYEVENT(e);
const int key = ke->key();
- bool tab = ke->state() == Qt::NoButton && key == Qt::Key_Tab;
- bool backtab = ((ke->state() == Qt::NoButton || ke->state() == Qt::ShiftButton) && key == Qt::Key_Backtab)
- || (ke->state() == Qt::ShiftButton && key == Qt::Key_Tab);
- QObject *o = watched; //focusWidget();
- QWidget* realWidget = dynamic_cast<QWidget*>(o); //will beused below (for tab/backtab handling)
+ bool tab = ke->state() == Qt::NoButton && key == TQt::Key_Tab;
+ bool backtab = ((ke->state() == Qt::NoButton || ke->state() == TQt::ShiftButton) && key == TQt::Key_Backtab)
+ || (ke->state() == TQt::ShiftButton && key == TQt::Key_Tab);
+ TQObject *o = watched; //tqfocusWidget();
+ TQWidget* realWidget = dynamic_cast<TQWidget*>(o); //will beused below (for tab/backtab handling)
if (!tab && !backtab) {
//for buttons, left/up and right/down keys act like tab/backtab (see qbutton.cpp)
- if (realWidget->inherits("QButton")) {
- if (ke->state() == Qt::NoButton && (key == Qt::Key_Right || key == Qt::Key_Down))
+ if (realWidget->inherits(TQBUTTON_OBJECT_NAME_STRING)) {
+ if (ke->state() == Qt::NoButton && (key == TQt::Key_Right || key == TQt::Key_Down))
tab = true;
- else if (ke->state() == Qt::NoButton && (key == Qt::Key_Left || key == Qt::Key_Up))
+ else if (ke->state() == Qt::NoButton && (key == TQt::Key_Left || key == TQt::Key_Up))
backtab = true;
}
}
@@ -415,21 +415,21 @@ bool KexiDBForm::eventFilter( QObject * watched, QEvent * e )
if (!tab && !backtab) {
// allow the editor widget to grab the key press event
while (true) {
- if (!o || o == dynamic_cast<QObject*>(d->dataAwareObject))
+ if (!o || o == dynamic_cast<TQObject*>(d->dataAwareObject))
break;
if (dynamic_cast<KexiFormDataItemInterface*>(o)) {
- realWidget = dynamic_cast<QWidget*>(o); //will be used below
+ realWidget = dynamic_cast<TQWidget*>(o); //will be used below
if (realWidget == this) //we have encountered 'this' form surface, give up
return false;
KexiFormDataItemInterface* dataItemIface = dynamic_cast<KexiFormDataItemInterface*>(o);
while (dataItemIface) {
if (dataItemIface->keyPressed(ke))
return false;
- dataItemIface = dynamic_cast<KexiFormDataItemInterface*>(dataItemIface->parentInterface()); //try in parent, e.g. in combobox
+ dataItemIface = dynamic_cast<KexiFormDataItemInterface*>(dataItemIface->tqparentInterface()); //try in tqparent, e.g. in combobox
}
break;
}
- o = o->parent();
+ o = o->tqparent();
}
// try to handle global shortcuts at the KexiDataAwareObjectInterface
// level (e.g. for "next record" action)
@@ -437,15 +437,15 @@ bool KexiDBForm::eventFilter( QObject * watched, QEvent * e )
int curCol = d->dataAwareObject->currentColumn();
bool moveToFirstField; //if true, we'll move focus to the first field (in tab order)
bool moveToLastField; //if true, we'll move focus to the first field (in tab order)
- if (! (ke->state() == Qt::NoButton && (key == Qt::Key_Home
- || key == Qt::Key_End || key == Qt::Key_Down || key == Qt::Key_Up))
+ if (! (ke->state() == Qt::NoButton && (key == TQt::Key_Home
+ || key == TQt::Key_End || key == TQt::Key_Down || key == TQt::Key_Up))
/* ^^ home/end/down/up are already handled by widgets */
&& d->dataAwareObject->handleKeyPress(
ke, curRow, curCol, false/*!fullRowSelection*/, &moveToFirstField, &moveToLastField))
{
if (ke->isAccepted())
return true;
- QWidget* widgetToFocus;
+ TQWidget* widgetToFocus;
if (moveToFirstField) {
widgetToFocus = d->orderedFocusWidgets.first(); //?
curCol = d->indexOfDataAwareWidget( widgetToFocus );
@@ -467,14 +467,14 @@ bool KexiDBForm::eventFilter( QObject * watched, QEvent * e )
ke->accept();
return true;
}
- if (key == Qt::Key_Delete && ke->state()==Qt::ControlButton) {
+ if (key == TQt::Key_Delete && ke->state()==TQt::ControlButton) {
//! @todo remove hardcoded shortcuts: can be reconfigured...
d->dataAwareObject->deleteCurrentRow();
return true;
}
}
// handle Esc key
- if (ke->state() == Qt::NoButton && key == Qt::Key_Escape) {
+ if (ke->state() == Qt::NoButton && key == TQt::Key_Escape) {
//cancel field editing/row editing if possible
if (d->dataAwareObject->cancelEditor())
return true;
@@ -482,29 +482,29 @@ bool KexiDBForm::eventFilter( QObject * watched, QEvent * e )
return true;
return false; // canceling not needed - pass the event to the active widget
}
- // jstaniek: Fix for Qt bug (handling e.g. Alt+2, Ctrl+2 keys on every platform)
+ // jstaniek: Fix for TQt bug (handling e.g. Alt+2, Ctrl+2 keys on every platform)
// It's important because we're using alt+2 short cut by default
// Damn! I've reported this to Trolltech in November 2004 - still not fixed.
- if (ke->isAccepted() && (ke->state() & Qt::AltButton) && ke->text()>="0" && ke->text()<="9")
+ if (ke->isAccepted() && (ke->state() & TQt::AltButton) && ke->text()>="0" && ke->text()<="9")
return true;
if (tab || backtab) {
//the watched widget can be a subwidget of a real widget, e.g. a drop down button of image box: find it
while (!KexiFormPart::library()->widgetInfoForClassName(realWidget->className()))
- realWidget = realWidget->parentWidget();
+ realWidget = realWidget->tqparentWidget();
if (!realWidget)
return true; //ignore
//the watched widget can be a subwidget of a real widget, e.g. autofield: find it
- //QWidget* realWidget = static_cast<QWidget*>(watched);
- while (dynamic_cast<KexiDataItemInterface*>(realWidget) && dynamic_cast<KexiDataItemInterface*>(realWidget)->parentInterface())
- realWidget = dynamic_cast<QWidget*>( dynamic_cast<KexiDataItemInterface*>(realWidget)->parentInterface() );
+ //TQWidget* realWidget = TQT_TQWIDGET(watched);
+ while (dynamic_cast<KexiDataItemInterface*>(realWidget) && dynamic_cast<KexiDataItemInterface*>(realWidget)->tqparentInterface())
+ realWidget = dynamic_cast<TQWidget*>( dynamic_cast<KexiDataItemInterface*>(realWidget)->tqparentInterface() );
d->setOrderedFocusWidgetsIteratorTo( realWidget );
kexipluginsdbg << realWidget->name() << endl;
// find next/prev widget to focus
- QWidget *widgetToUnfocus = realWidget;
- QWidget *widgetToFocus = 0;
+ TQWidget *widgetToUnfocus = realWidget;
+ TQWidget *widgetToFocus = 0;
bool wasAtFirstWidget = false; //used to protect against infinite loop
while (true) {
if (tab) {
@@ -533,11 +533,11 @@ bool KexiDBForm::eventFilter( QObject * watched, QEvent * e )
widgetToFocus = d->orderedFocusWidgetsIterator.current();
- QObject *pageFor_widgetToFocus = 0;
+ TQObject *pageFor_widgetToFocus = 0;
KFormDesigner::TabWidget *tabWidgetFor_widgetToFocus
= KFormDesigner::findParent<KFormDesigner::TabWidget>(
widgetToFocus, "KFormDesigner::TabWidget", pageFor_widgetToFocus);
- if (tabWidgetFor_widgetToFocus && tabWidgetFor_widgetToFocus->currentPage()!=pageFor_widgetToFocus) {
+ if (tabWidgetFor_widgetToFocus && TQT_BASE_OBJECT(tabWidgetFor_widgetToFocus->currentPage())!=TQT_BASE_OBJECT(pageFor_widgetToFocus)) {
realWidget = widgetToFocus;
continue; //the new widget to focus is placed on invisible tab page: move to next widget
}
@@ -545,21 +545,21 @@ bool KexiDBForm::eventFilter( QObject * watched, QEvent * e )
}//while
//set focus, but don't use just setFocus() because certain widgets
- //behaves differently (e.g. QLineEdit calls selectAll()) when
- //focus event's reason is QFocusEvent::Tab
+ //behaves differently (e.g. TQLineEdit calls selectAll()) when
+ //focus event's reason is TQFocusEvent::Tab
if (widgetToFocus->focusProxy())
- widgetToFocus = widgetToFocus->focusProxy();
+ widgetToFocus = TQT_TQWIDGET(widgetToFocus->focusProxy());
if (widgetToFocus && d->dataAwareObject->acceptEditor()) {
if (tab) {
//try to accept this will validate the current input (if any)
- KexiUtils::unsetFocusWithReason(widgetToUnfocus, QFocusEvent::Tab);
- KexiUtils::setFocusWithReason(widgetToFocus, QFocusEvent::Tab);
+ KexiUtils::unsetFocusWithReason(widgetToUnfocus, TQFocusEvent::Tab);
+ KexiUtils::setFocusWithReason(widgetToFocus, TQFocusEvent::Tab);
kexipluginsdbg << "focusing " << widgetToFocus->name() << endl;
}
else {//backtab
- KexiUtils::unsetFocusWithReason(widgetToUnfocus, QFocusEvent::Backtab);
+ KexiUtils::unsetFocusWithReason(widgetToUnfocus, TQFocusEvent::Backtab);
//set focus, see above note
- KexiUtils::setFocusWithReason(d->orderedFocusWidgetsIterator.current(), QFocusEvent::Backtab);
+ KexiUtils::setFocusWithReason(d->orderedFocusWidgetsIterator.current(), TQFocusEvent::Backtab);
kexipluginsdbg << "focusing " << d->orderedFocusWidgetsIterator.current()->name() << endl;
}
}
@@ -567,9 +567,9 @@ bool KexiDBForm::eventFilter( QObject * watched, QEvent * e )
}
}
}
- else if (e->type()==QEvent::FocusIn) {
+ else if (e->type()==TQEvent::FocusIn) {
bool focusDataWidget = preview();
- if (static_cast<QFocusEvent*>(e)->reason()==QFocusEvent::Popup) {
+ if (TQT_TQFOCUSEVENT(e)->reason()==TQFocusEvent::Popup) {
kdDebug() << "->>> focus IN, popup" <<endl;
focusDataWidget = !d->popupFocused;
d->popupFocused = false;
@@ -582,10 +582,10 @@ bool KexiDBForm::eventFilter( QObject * watched, QEvent * e )
if (focusDataWidget) {
kexipluginsdbg << "KexiDBForm: FocusIn: " << watched->className() << " " << watched->name() << endl;
if (d->dataAwareObject) {
- QWidget *dataItem = dynamic_cast<QWidget*>(watched);
+ TQWidget *dataItem = dynamic_cast<TQWidget*>(watched);
while (dataItem) {
while (dataItem && !dynamic_cast<KexiDataItemInterface*>(dataItem))
- dataItem = dataItem->parentWidget();
+ dataItem = dataItem->tqparentWidget();
if (!dataItem)
break;
kexipluginsdbg << "KexiDBForm: FocusIn: FOUND " << dataItem->className() << " " << dataItem->name() << endl;
@@ -600,23 +600,23 @@ bool KexiDBForm::eventFilter( QObject * watched, QEvent * e )
break;
}
else
- dataItem = dataItem->parentWidget();
+ dataItem = dataItem->tqparentWidget();
dataItem->update();
}
}
}
}
- else if (e->type()==QEvent::FocusOut) {
- if (static_cast<QFocusEvent*>(e)->reason()==QFocusEvent::Popup) {
- //d->widgetFocusedBeforePopup = (QWidget*)watched;
+ else if (e->type()==TQEvent::FocusOut) {
+ if (TQT_TQFOCUSEVENT(e)->reason()==TQFocusEvent::Popup) {
+ //d->widgetFocusedBeforePopup = (TQWidget*)watched;
d->popupFocused = true;
}
else
d->popupFocused = false;
// d->widgetFocusedBeforePopup = 0;
-// kdDebug() << "e->type()==QEvent::FocusOut " << watched->className() << " " <<watched->name() << endl;
-// UNSET_FOCUS_USING_REASON(watched, static_cast<QFocusEvent*>(e)->reason());
+// kdDebug() << "e->type()==TQEvent::FocusOut " << watched->className() << " " <<watched->name() << endl;
+// UNSET_FOCUS_USING_REASON(watched, TQT_TQFOCUSEVENT(e)->reason());
}
return KexiDBFormBase::eventFilter(watched, e);
}
@@ -645,7 +645,7 @@ void KexiDBForm::setReadOnly( bool readOnly )
d->dataAwareObject->setReadOnly( readOnly ); //???
}
-QWidget* KexiDBForm::widget()
+TQWidget* KexiDBForm::widget()
{
return this;
}
@@ -670,19 +670,19 @@ bool KexiDBForm::preview() const {
? dynamic_cast<KexiScrollView*>(d->dataAwareObject)->preview() : false;
}
-void KexiDBForm::dragMoveEvent( QDragMoveEvent *e )
+void KexiDBForm::dragMoveEvent( TQDragMoveEvent *e )
{
KexiDBFormBase::dragMoveEvent( e );
emit handleDragMoveEvent(e);
}
-void KexiDBForm::dropEvent( QDropEvent *e )
+void KexiDBForm::dropEvent( TQDropEvent *e )
{
KexiDBFormBase::dropEvent( e );
emit handleDropEvent(e);
}
-void KexiDBForm::setCursor( const QCursor & cursor )
+void KexiDBForm::setCursor( const TQCursor & cursor )
{
//js: empty, to avoid fscking problems with random cursors!
//! @todo?
@@ -691,11 +691,11 @@ void KexiDBForm::setCursor( const QCursor & cursor )
KexiDBFormBase::setCursor(cursor);
}
-//! @todo: Qt4? XORed resize rectangles instead of black widgets
+//! @todo: TQt4? XORed resize rectangles instead of black widgets
/*
-void KexiDBForm::paintEvent( QPaintEvent *e )
+void KexiDBForm::paintEvent( TQPaintEvent *e )
{
- QPainter p;
+ TQPainter p;
p.begin(this, true);
bool unclipped = testWFlags( WPaintUnclipped );
setWFlags( WPaintUnclipped );
diff --git a/kexi/plugins/forms/widgets/kexidbform.h b/kexi/plugins/forms/widgets/kexidbform.h
index 81a71bba..cbfdc8ee 100644
--- a/kexi/plugins/forms/widgets/kexidbform.h
+++ b/kexi/plugins/forms/widgets/kexidbform.h
@@ -21,7 +21,7 @@
#ifndef KEXIDBFORM_H
#define KEXIDBFORM_H
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <formeditor/form.h>
#include "../kexiformdataiteminterface.h"
@@ -30,7 +30,7 @@
#include <kexigradientwidget.h>
# define KexiDBFormBase KexiGradientWidget
#else
-# define KexiDBFormBase QWidget
+# define KexiDBFormBase TQWidget
#endif
class KexiDataAwareObjectInterface;
@@ -43,88 +43,89 @@ class KEXIFORMUTILS_EXPORT KexiDBForm :
public KexiFormDataItemInterface
{
Q_OBJECT
- Q_PROPERTY(QString dataSource READ dataSource WRITE setDataSource DESIGNABLE true)
- Q_PROPERTY(QCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true)
- Q_PROPERTY(bool autoTabStops READ autoTabStops WRITE setAutoTabStops DESIGNABLE true)
+ TQ_OBJECT
+ TQ_PROPERTY(TQString dataSource READ dataSource WRITE setDataSource DESIGNABLE true)
+ TQ_PROPERTY(TQCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true)
+ TQ_PROPERTY(bool autoTabStops READ autoTabStops WRITE setAutoTabStops DESIGNABLE true)
//original "size" property is not designable, so here's a custom (not storable) replacement
- Q_PROPERTY( QSize sizeInternal READ sizeInternal WRITE resizeInternal DESIGNABLE true STORED false )
+ TQ_PROPERTY( TQSize sizeInternal READ sizeInternal WRITE resizeInternal DESIGNABLE true STORED false )
public:
- KexiDBForm(QWidget *parent, KexiDataAwareObjectInterface* dataAwareObject, const char *name="kexi_dbform");
+ KexiDBForm(TQWidget *tqparent, KexiDataAwareObjectInterface* dataAwareObject, const char *name="kexi_dbform");
virtual ~KexiDBForm();
KexiDataAwareObjectInterface* dataAwareObject() const;
- inline QString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
- inline QCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
+ inline TQString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
+ inline TQCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
//! no effect
- QVariant value() { return QVariant(); }
+ TQVariant value() { return TQVariant(); }
- virtual void setInvalidState( const QString& displayText );
+ virtual void setInvalidState( const TQString& displayText );
- virtual void drawRect(const QRect& r, int type);
- virtual void drawRects(const QValueList<QRect> &list, int type);
+ virtual void drawRect(const TQRect& r, int type);
+ virtual void drawRects(const TQValueList<TQRect> &list, int type);
virtual void initBuffer();
virtual void clearForm();
- virtual void highlightWidgets(QWidget *from, QWidget *to/*, const QPoint &p*/);
+ virtual void highlightWidgets(TQWidget *from, TQWidget *to/*, const TQPoint &p*/);
- virtual QSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
bool autoTabStops() const;
- QPtrList<QWidget>* orderedFocusWidgets() const;
+ TQPtrList<TQWidget>* orderedFocusWidgets() const;
- QPtrList<QWidget>* orderedDataAwareWidgets() const;
+ TQPtrList<TQWidget>* orderedDataAwareWidgets() const;
void updateTabStopsOrder(KFormDesigner::Form* form);
void updateTabStopsOrder();
- virtual bool eventFilter ( QObject * watched, QEvent * e );
+ virtual bool eventFilter ( TQObject * watched, TQEvent * e );
virtual bool valueIsNull();
virtual bool valueIsEmpty();
virtual bool isReadOnly() const;
- virtual QWidget* widget();
+ virtual TQWidget* widget();
virtual bool cursorAtStart();
virtual bool cursorAtEnd();
virtual void clear();
bool preview() const;
- virtual void setCursor( const QCursor & cursor );
+ virtual void setCursor( const TQCursor & cursor );
public slots:
void setAutoTabStops(bool set);
- inline void setDataSource(const QString &ds) { KexiFormDataItemInterface::setDataSource(ds); }
- inline void setDataSourceMimeType(const QCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
+ inline void setDataSource(const TQString &ds) { KexiFormDataItemInterface::setDataSource(ds); }
+ inline void setDataSourceMimeType(const TQCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
//! This implementation just disables read only widget
virtual void setReadOnly( bool readOnly );
//! @internal for sizeInternal property
- QSize sizeInternal() const { return KexiDBFormBase::size(); }
+ TQSize sizeInternal() const { return KexiDBFormBase::size(); }
//! @internal for sizeInternal property
- void resizeInternal(const QSize& s) { KexiDBFormBase::resize(s); }
+ void resizeInternal(const TQSize& s) { KexiDBFormBase::resize(s); }
signals:
- void handleDragMoveEvent(QDragMoveEvent *e);
- void handleDropEvent(QDropEvent *e);
+ void handleDragMoveEvent(TQDragMoveEvent *e);
+ void handleDropEvent(TQDropEvent *e);
protected:
//! no effect
- virtual void setValueInternal(const QVariant&, bool) {}
+ virtual void setValueInternal(const TQVariant&, bool) {}
//! Used to emit handleDragMoveEvent() signal needed to control dragging over the container's surface
- virtual void dragMoveEvent( QDragMoveEvent *e );
+ virtual void dragMoveEvent( TQDragMoveEvent *e );
//! Used to emit handleDropEvent() signal needed to control dropping on the container's surface
- virtual void dropEvent( QDropEvent *e );
+ virtual void dropEvent( TQDropEvent *e );
//! called from KexiFormScrollView::initDataContents()
void updateReadOnlyFlags();
-// virtual void paintEvent( QPaintEvent * );
+// virtual void paintEvent( TQPaintEvent * );
//! Points to a currently edited data item.
//! It is cleared when the focus is moved to other
diff --git a/kexi/plugins/forms/widgets/kexidbimagebox.cpp b/kexi/plugins/forms/widgets/kexidbimagebox.cpp
index 82e70086..5f2f20e3 100644
--- a/kexi/plugins/forms/widgets/kexidbimagebox.cpp
+++ b/kexi/plugins/forms/widgets/kexidbimagebox.cpp
@@ -20,15 +20,15 @@
#include "kexidbimagebox.h"
-#include <qapplication.h>
-#include <qpixmap.h>
-#include <qstyle.h>
-#include <qclipboard.h>
-#include <qtooltip.h>
-#include <qimage.h>
-#include <qbuffer.h>
-#include <qfiledialog.h>
-#include <qpainter.h>
+#include <tqapplication.h>
+#include <tqpixmap.h>
+#include <tqstyle.h>
+#include <tqclipboard.h>
+#include <tqtooltip.h>
+#include <tqimage.h>
+#include <tqbuffer.h>
+#include <tqfiledialog.h>
+#include <tqpainter.h>
#include <kdebug.h>
#include <kpopupmenu.h>
@@ -51,7 +51,7 @@
#include <kexidb/queryschema.h>
#include <formeditor/widgetlibrary.h>
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
#include <win32_utils.h>
#include <krecentdirs.h>
#endif
@@ -59,15 +59,15 @@
#include "kexidbutils.h"
#include "../kexiformpart.h"
-static KStaticDeleter<QPixmap> KexiDBImageBox_pmDeleter;
-static QPixmap* KexiDBImageBox_pm = 0;
-static KStaticDeleter<QPixmap> KexiDBImageBox_pmSmallDeleter;
-static QPixmap* KexiDBImageBox_pmSmall = 0;
+static KStaticDeleter<TQPixmap> KexiDBImageBox_pmDeleter;
+static TQPixmap* KexiDBImageBox_pm = 0;
+static KStaticDeleter<TQPixmap> KexiDBImageBox_pmSmallDeleter;
+static TQPixmap* KexiDBImageBox_pmSmall = 0;
-KexiDBImageBox::KexiDBImageBox( bool designMode, QWidget *parent, const char *name )
- : KexiFrame( parent, name, Qt::WNoAutoErase )
+KexiDBImageBox::KexiDBImageBox( bool designMode, TQWidget *tqparent, const char *name )
+ : KexiFrame( tqparent, name, TQt::WNoAutoErase )
, KexiFormDataItemInterface()
- , m_alignment(Qt::AlignAuto|Qt::AlignTop)
+ , m_tqalignment(TQt::AlignAuto|TQt::AlignTop)
, m_designMode(designMode)
, m_readOnly(false)
, m_scaledContents(false)
@@ -80,7 +80,7 @@ KexiDBImageBox::KexiDBImageBox( bool designMode, QWidget *parent, const char *na
, m_insideSetPalette(false)
{
installEventFilter(this);
- setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
+ tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Preferred);
//setup popup menu
m_popupMenu = new KexiImageContextMenu(this);
@@ -91,47 +91,47 @@ KexiDBImageBox::KexiDBImageBox( bool designMode, QWidget *parent, const char *na
}
else {
m_chooser = new KexiDropDownButton(this);
- m_chooser->setFocusPolicy(StrongFocus);
+ m_chooser->setFocusPolicy(TQ_StrongFocus);
m_chooser->setPopup(m_popupMenu);
setFocusProxy(m_chooser);
m_chooser->installEventFilter(this);
-// m_chooser->setPalette(qApp->palette());
+// m_chooser->setPalette(tqApp->palette());
// hlyr->addWidget(m_chooser);
}
- setBackgroundMode(Qt::NoBackground);
- setFrameShape(QFrame::Box);
- setFrameShadow(QFrame::Plain);
- setFrameColor(Qt::black);
+ setBackgroundMode(TQt::NoBackground);
+ setFrameShape(TQFrame::Box);
+ setFrameShadow(TQFrame::Plain);
+ setFrameColor(TQt::black);
m_paletteBackgroundColorChanged = false; //set this here, not before
- connect(m_popupMenu, SIGNAL(updateActionsAvailabilityRequested(bool&, bool&)),
- this, SLOT(slotUpdateActionsAvailabilityRequested(bool&, bool&)));
- connect(m_popupMenu, SIGNAL(insertFromFileRequested(const KURL&)),
- this, SLOT(handleInsertFromFileAction(const KURL&)));
- connect(m_popupMenu, SIGNAL(saveAsRequested(const QString&)),
- this, SLOT(handleSaveAsAction(const QString&)));
- connect(m_popupMenu, SIGNAL(cutRequested()),
- this, SLOT(handleCutAction()));
- connect(m_popupMenu, SIGNAL(copyRequested()),
- this, SLOT(handleCopyAction()));
- connect(m_popupMenu, SIGNAL(pasteRequested()),
- this, SLOT(handlePasteAction()));
- connect(m_popupMenu, SIGNAL(clearRequested()),
- this, SLOT(clear()));
- connect(m_popupMenu, SIGNAL(showPropertiesRequested()),
- this, SLOT(handleShowPropertiesAction()));
-
-// connect(m_popupMenu, SIGNAL(aboutToHide()), this, SLOT(slotAboutToHidePopupMenu()));
+ connect(m_popupMenu, TQT_SIGNAL(updateActionsAvailabilityRequested(bool&, bool&)),
+ this, TQT_SLOT(slotUpdateActionsAvailabilityRequested(bool&, bool&)));
+ connect(m_popupMenu, TQT_SIGNAL(insertFromFileRequested(const KURL&)),
+ this, TQT_SLOT(handleInsertFromFileAction(const KURL&)));
+ connect(m_popupMenu, TQT_SIGNAL(saveAsRequested(const TQString&)),
+ this, TQT_SLOT(handleSaveAsAction(const TQString&)));
+ connect(m_popupMenu, TQT_SIGNAL(cutRequested()),
+ this, TQT_SLOT(handleCutAction()));
+ connect(m_popupMenu, TQT_SIGNAL(copyRequested()),
+ this, TQT_SLOT(handleCopyAction()));
+ connect(m_popupMenu, TQT_SIGNAL(pasteRequested()),
+ this, TQT_SLOT(handlePasteAction()));
+ connect(m_popupMenu, TQT_SIGNAL(clearRequested()),
+ this, TQT_SLOT(clear()));
+ connect(m_popupMenu, TQT_SIGNAL(showPropertiesRequested()),
+ this, TQT_SLOT(handleShowPropertiesAction()));
+
+// connect(m_popupMenu, TQT_SIGNAL(aboutToHide()), this, TQT_SLOT(slotAboutToHidePopupMenu()));
// if (m_chooser) {
//we couldn't use m_chooser->setPopup() because of drawing problems
-// connect(m_chooser, SIGNAL(pressed()), this, SLOT(slotChooserPressed()));
-// connect(m_chooser, SIGNAL(released()), this, SLOT(slotChooserReleased()));
-// connect(m_chooser, SIGNAL(toggled(bool)), this, SLOT(slotToggled(bool)));
+// connect(m_chooser, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotChooserPressed()));
+// connect(m_chooser, TQT_SIGNAL(released()), this, TQT_SLOT(slotChooserReleased()));
+// connect(m_chooser, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotToggled(bool)));
// }
- setDataSource( QString::null ); //to initialize popup menu and actions availability
+ setDataSource( TQString() ); //to initialize popup menu and actions availability
}
KexiDBImageBox::~KexiDBImageBox()
@@ -143,29 +143,29 @@ KexiImageContextMenu* KexiDBImageBox::contextMenu() const
return m_popupMenu;
}
-QVariant KexiDBImageBox::value()
+TQVariant KexiDBImageBox::value()
{
if (dataSource().isEmpty()) {
//not db-aware
- return QVariant();
+ return TQVariant();
}
//db-aware mode
return m_value; //todo
- //return QVariant(); //todo
+ //return TQVariant(); //todo
}
-void KexiDBImageBox::setValueInternal( const QVariant& add, bool removeOld, bool loadPixmap )
+void KexiDBImageBox::setValueInternal( const TQVariant& add, bool removeOld, bool loadPixmap )
{
if (isReadOnly())
return;
m_popupMenu->hide();
if (removeOld)
m_value = add.toByteArray();
- else //do not add "m_origValue" to "add" as this is QByteArray
+ else //do not add "m_origValue" to "add" as this is TQByteArray
m_value = m_origValue.toByteArray();
bool ok = !m_value.isEmpty();
if (ok) {
- ///unused (m_valueMimeType is not available unless the px is inserted) QString type( KImageIO::typeForMime(m_valueMimeType) );
+ ///unused (m_valueMimeType is not available unless the px is inserted) TQString type( KImageIO::typeForMime(m_valueMimeType) );
///ok = KImageIO::canRead( type );
ok = loadPixmap ? m_pixmap.loadFromData(m_value) : true; //, type.latin1());
if (!ok) {
@@ -173,22 +173,22 @@ void KexiDBImageBox::setValueInternal( const QVariant& add, bool removeOld, bool
}
}
if (!ok) {
- m_valueMimeType = QString::null;
- m_pixmap = QPixmap();
+ m_valueMimeType = TQString();
+ m_pixmap = TQPixmap();
}
- repaint();
+ tqrepaint();
}
-void KexiDBImageBox::setInvalidState( const QString& displayText )
+void KexiDBImageBox::setInvalidState( const TQString& displayText )
{
Q_UNUSED( displayText );
-// m_pixmapLabel->setPixmap(QPixmap());
+// m_pixmapLabel->setPixmap(TQPixmap());
if (!dataSource().isEmpty()) {
- m_value = QByteArray();
+ m_value = TQByteArray();
}
-// m_pixmap = QPixmap();
-// m_originalFileName = QString::null;
+// m_pixmap = TQPixmap();
+// m_originalFileName = TQString();
//! @todo m_pixmapLabel->setText( displayText );
@@ -218,7 +218,7 @@ void KexiDBImageBox::setReadOnly(bool set)
m_readOnly = set;
}
-QPixmap KexiDBImageBox::pixmap() const
+TQPixmap KexiDBImageBox::pixmap() const
{
if (dataSource().isEmpty()) {
//not db-aware
@@ -242,7 +242,7 @@ void KexiDBImageBox::setPixmapId(uint id)
if (m_insideSetData) //avoid recursion
return;
setData(KexiBLOBBuffer::self()->objectForId( id, /*unstored*/false ));
- repaint();
+ tqrepaint();
}
uint KexiDBImageBox::storedPixmapId() const
@@ -257,7 +257,7 @@ uint KexiDBImageBox::storedPixmapId() const
void KexiDBImageBox::setStoredPixmapId(uint id)
{
setData(KexiBLOBBuffer::self()->objectForId( id, /*stored*/true ));
- repaint();
+ tqrepaint();
}
bool KexiDBImageBox::hasScaledContents() const
@@ -266,27 +266,27 @@ bool KexiDBImageBox::hasScaledContents() const
// return m_pixmapLabel->hasScaledContents();
}
-/*void KexiDBImageBox::setPixmap(const QByteArray& pixmap)
+/*void KexiDBImageBox::setPixmap(const TQByteArray& pixmap)
{
setValueInternal(pixmap, true);
-// setBackgroundMode(pixmap.isNull() ? Qt::NoBackground : Qt::PaletteBackground);
+// setBackgroundMode(pixmap.isNull() ? TQt::NoBackground : TQt::PaletteBackground);
}*/
void KexiDBImageBox::setScaledContents(bool set)
{
//todo m_pixmapLabel->setScaledContents(set);
m_scaledContents = set;
- repaint();
+ tqrepaint();
}
void KexiDBImageBox::setKeepAspectRatio(bool set)
{
m_keepAspectRatio = set;
if (m_scaledContents)
- repaint();
+ tqrepaint();
}
-QWidget* KexiDBImageBox::widget()
+TQWidget* KexiDBImageBox::widget()
{
//! @todo
// return m_pixmapLabel;
@@ -303,7 +303,7 @@ bool KexiDBImageBox::cursorAtEnd()
return true;
}
-QByteArray KexiDBImageBox::data() const
+TQByteArray KexiDBImageBox::data() const
{
if (dataSource().isEmpty()) {
//static mode
@@ -331,19 +331,19 @@ void KexiDBImageBox::handleInsertFromFileAction(const KURL& url)
if (!h)
return;
setData(h);
- repaint();
+ tqrepaint();
}
else {
//db-aware
- QString fileName( url.isLocalFile() ? url.path() : url.prettyURL() );
+ TQString fileName( url.isLocalFile() ? url.path() : url.prettyURL() );
//! @todo download the file if remote, then set fileName properly
- QFile f(fileName);
+ TQFile f(fileName);
if (!f.open(IO_ReadOnly)) {
//! @todo err msg
return;
}
- QByteArray ba = f.readAll();
+ TQByteArray ba = f.readAll();
if (f.status()!=IO_Ok) {
//! @todo err msg
f.close();
@@ -359,7 +359,7 @@ void KexiDBImageBox::handleInsertFromFileAction(const KURL& url)
}
}
-void KexiDBImageBox::handleAboutToSaveAsAction(QString& origFilename, QString& fileExtension, bool& dataIsEmpty)
+void KexiDBImageBox::handleAboutToSaveAsAction(TQString& origFilename, TQString& fileExtension, bool& dataIsEmpty)
{
if (data().isEmpty()) {
kdWarning() << "KexiDBImageBox::handleAboutToSaveAs(): no pixmap!" << endl;
@@ -369,15 +369,15 @@ void KexiDBImageBox::handleAboutToSaveAsAction(QString& origFilename, QString& f
if (dataSource().isEmpty()) { //for static images filename and mimetype can be available
origFilename = m_data.originalFileName();
if (!origFilename.isEmpty())
- origFilename = QString("/") + origFilename;
+ origFilename = TQString("/") + origFilename;
if (!m_data.mimeType().isEmpty())
fileExtension = KImageIO::typeForMime(m_data.mimeType()).lower();
}
}
-void KexiDBImageBox::handleSaveAsAction(const QString& fileName)
+void KexiDBImageBox::handleSaveAsAction(const TQString& fileName)
{
- QFile f(fileName);
+ TQFile f(fileName);
if (!f.open(IO_WriteOnly)) {
//! @todo err msg
return;
@@ -401,14 +401,14 @@ void KexiDBImageBox::handleCutAction()
void KexiDBImageBox::handleCopyAction()
{
- qApp->clipboard()->setPixmap(pixmap(), QClipboard::Clipboard);
+ tqApp->tqclipboard()->setPixmap(pixmap(), TQClipboard::Clipboard);
}
void KexiDBImageBox::handlePasteAction()
{
if (isReadOnly() || (!m_designMode && !hasFocus()))
return;
- QPixmap pm( qApp->clipboard()->pixmap(QClipboard::Clipboard) );
+ TQPixmap pm( tqApp->tqclipboard()->pixmap(TQClipboard::Clipboard) );
// if (!pm.isNull())
// setValueInternal(pm, true);
if (dataSource().isEmpty()) {
@@ -418,18 +418,18 @@ void KexiDBImageBox::handlePasteAction()
else {
//db-aware mode
m_pixmap = pm;
- QByteArray ba;
- QBuffer buffer( ba );
+ TQByteArray ba;
+ TQBuffer buffer( ba );
buffer.open( IO_WriteOnly );
if (m_pixmap.save( &buffer, "PNG" )) {// write pixmap into ba in PNG format
setValueInternal( ba, true, false/* !loadPixmap */ );
}
else {
- setValueInternal( QByteArray(), true );
+ setValueInternal( TQByteArray(), true );
}
}
- repaint();
+ tqrepaint();
if (!dataSource().isEmpty()) {
// emit pixmapChanged();
signalValueChanged();
@@ -446,16 +446,16 @@ void KexiDBImageBox::clear()
if (isReadOnly())
return;
//db-aware mode
- setValueInternal(QByteArray(), true);
- //m_pixmap = QPixmap();
+ setValueInternal(TQByteArray(), true);
+ //m_pixmap = TQPixmap();
}
-// m_originalFileName = QString::null;
+// m_originalFileName = TQString();
//! @todo emit signal for setting "dirty" flag within the design
-// m_pixmap = QPixmap(); //will be loaded on demand
- repaint();
+// m_pixmap = TQPixmap(); //will be loaded on demand
+ tqrepaint();
if (!dataSource().isEmpty()) {
// emit pixmapChanged();//valueChanged(data());
signalValueChanged();
@@ -492,7 +492,7 @@ void KexiDBImageBox::slotAboutToHidePopupMenu()
}
}*/
-void KexiDBImageBox::contextMenuEvent( QContextMenuEvent * e )
+void KexiDBImageBox::contextMenuEvent( TQContextMenuEvent * e )
{
if (popupMenuAvailable())
m_popupMenu->exec( e->globalPos(), -1 );
@@ -519,20 +519,20 @@ void KexiDBImageBox::slotToggled(bool on)
return;
}
m_chooser->disableMousePress = false;
- QRect screen = qApp->desktop()->availableGeometry( m_chooser );
- QPoint p;
- if ( QApplication::reverseLayout() ) {
- if ( (mapToGlobal( m_chooser->rect().bottomLeft() ).y() + m_popupMenu->sizeHint().height()) <= screen.height() )
+ TQRect screen = tqApp->desktop()->availableGeometry( m_chooser );
+ TQPoint p;
+ if ( TQApplication::reverseLayout() ) {
+ if ( (mapToGlobal( m_chooser->rect().bottomLeft() ).y() + m_popupMenu->tqsizeHint().height()) <= screen.height() )
p = m_chooser->mapToGlobal( m_chooser->rect().bottomRight() );
else
- p = m_chooser->mapToGlobal( m_chooser->rect().topRight() - QPoint( 0, m_popupMenu->sizeHint().height() ) );
- p.rx() -= m_popupMenu->sizeHint().width();
+ p = m_chooser->mapToGlobal( m_chooser->rect().topRight() - TQPoint( 0, m_popupMenu->tqsizeHint().height() ) );
+ p.rx() -= m_popupMenu->tqsizeHint().width();
}
else {
- if ( (m_chooser->mapToGlobal( m_chooser->rect().bottomLeft() ).y() + m_popupMenu->sizeHint().height()) <= screen.height() )
+ if ( (m_chooser->mapToGlobal( m_chooser->rect().bottomLeft() ).y() + m_popupMenu->tqsizeHint().height()) <= screen.height() )
p = m_chooser->mapToGlobal( m_chooser->rect().bottomLeft() );
else
- p = m_chooser->mapToGlobal( m_chooser->rect().topLeft() - QPoint( 0, m_popupMenu->sizeHint().height() ) );
+ p = m_chooser->mapToGlobal( m_chooser->rect().topLeft() - TQPoint( 0, m_popupMenu->tqsizeHint().height() ) );
}
if (!m_popupMenu->isVisible() && on) {
m_popupMenu->exec( p, -1 );
@@ -546,7 +546,7 @@ void KexiDBImageBox::updateActionStrings()
if (!m_popupMenu)
return;
if (m_designMode) {
-/* QString titleString( i18n("Image Box") );
+/* TQString titleString( i18n("Image Box") );
if (!dataSource().isEmpty())
titleString.prepend(dataSource() + " : ");
m_popupMenu->changeTitle(m_popupMenu->idAt(0), m_popupMenu->titlePixmap(m_popupMenu->idAt(0)), titleString);*/
@@ -561,19 +561,19 @@ void KexiDBImageBox::updateActionStrings()
if (m_chooser) {
if (popupMenuAvailable() && dataSource().isEmpty()) { //this may work in the future (see @todo below)
- QToolTip::add(m_chooser, i18n("Click to show actions for this image box"));
+ TQToolTip::add(m_chooser, i18n("Click to show actions for this image box"));
} else {
- QString beautifiedImageBoxName;
+ TQString beautifiedImageBoxName;
if (m_designMode) {
beautifiedImageBoxName = dataSource();
}
else {
- beautifiedImageBoxName = columnInfo() ? columnInfo()->captionOrAliasOrName() : QString::null;
+ beautifiedImageBoxName = columnInfo() ? columnInfo()->captionOrAliasOrName() : TQString();
/*! @todo look at makeFirstCharacterUpperCaseInCaptions setting [bool]
(see doc/dev/settings.txt) */
beautifiedImageBoxName = beautifiedImageBoxName[0].upper() + beautifiedImageBoxName.mid(1);
}
- QToolTip::add(m_chooser, i18n("Click to show actions for \"%1\" image box").arg(beautifiedImageBoxName));
+ TQToolTip::add(m_chooser, i18n("Click to show actions for \"%1\" image box").tqarg(beautifiedImageBoxName));
}
}
}
@@ -586,7 +586,7 @@ bool KexiDBImageBox::popupMenuAvailable()
return !dataSource().isEmpty();
}
-void KexiDBImageBox::setDataSource( const QString &ds )
+void KexiDBImageBox::setDataSource( const TQString &ds )
{
KexiFormDataItemInterface::setDataSource( ds );
setData(KexiBLOBBuffer::Handle());
@@ -608,96 +608,96 @@ void KexiDBImageBox::setDataSource( const QString &ds )
if (!m_lineWidthChanged) {
KexiFrame::setLineWidth( ds.isEmpty() ? 0 : 1 );
}
- if (!m_paletteBackgroundColorChanged && parentWidget()) {
+ if (!m_paletteBackgroundColorChanged && tqparentWidget()) {
KexiFrame::setPaletteBackgroundColor(
- dataSource().isEmpty() ? parentWidget()->paletteBackgroundColor() : palette().active().base() );
+ dataSource().isEmpty() ? tqparentWidget()->paletteBackgroundColor() : tqpalette().active().base() );
}
}
-QSize KexiDBImageBox::sizeHint() const
+TQSize KexiDBImageBox::tqsizeHint() const
{
if (pixmap().isNull())
- return QSize(80, 80);
+ return TQSize(80, 80);
return pixmap().size();
}
int KexiDBImageBox::realLineWidth() const
{
- if (frameShape()==QFrame::Box && (frameShadow()==QFrame::Sunken || frameShadow()==QFrame::Raised))
+ if (frameShape()==TQFrame::Box && (frameShadow()==TQFrame::Sunken || frameShadow()==TQFrame::Raised))
return 2 * lineWidth();
else
return lineWidth();
}
-void KexiDBImageBox::paintEvent( QPaintEvent *pe )
+void KexiDBImageBox::paintEvent( TQPaintEvent *pe )
{
if (!m_paintEventEnabled)
return;
- QPainter p(this);
+ TQPainter p(this);
p.setClipRect(pe->rect());
const int m = realLineWidth() + margin();
- QColor bg(eraseColor());
+ TQColor bg(eraseColor());
if (m_designMode && pixmap().isNull()) {
- QPixmap pm(size()-QSize(m, m));
- QPainter p2;
- p2.begin(&pm, this);
+ TQPixmap pm(size()-TQSize(m, m));
+ TQPainter p2;
+ p2.tqbegin(TQT_TQPAINTDEVICE(&pm), this);
p2.fillRect(0,0,width(),height(), bg);
updatePixmap();
- QPixmap *imagBoxPm;
+ TQPixmap *imagBoxPm;
const bool tooLarge = (height()-m-m) <= KexiDBImageBox_pm->height();
if (tooLarge || (width()-m-m) <= KexiDBImageBox_pm->width())
imagBoxPm = KexiDBImageBox_pmSmall;
else
imagBoxPm = KexiDBImageBox_pm;
- QImage img(imagBoxPm->convertToImage());
+ TQImage img(imagBoxPm->convertToImage());
img = KImageEffect::flatten(img, bg.dark(150),
- qGray( bg.rgb() ) <= 20 ? QColor(Qt::gray).dark(150) : bg.light(105));
+ tqGray( bg.rgb() ) <= 20 ? TQColor(TQt::gray).dark(150) : bg.light(105));
- QPixmap converted;
+ TQPixmap converted;
converted.convertFromImage(img);
// if (tooLarge)
// p2.drawPixmap(2, 2, converted);
// else
p2.drawPixmap(2, height()-m-m-imagBoxPm->height()-2, converted);
- QFont f(qApp->font());
+ TQFont f(tqApp->font());
p2.setFont(f);
p2.setPen( KexiUtils::contrastColor( bg ) );
- p2.drawText(pm.rect(), Qt::AlignCenter,
+ p2.drawText(pm.rect(), TQt::AlignCenter,
dataSource().isEmpty()
- ? QString::fromLatin1(name())+"\n"+i18n("Unbound Image Box", "(unbound)") //i18n("No Image")
+ ? TQString::tqfromLatin1(name())+"\n"+i18n("Unbound Image Box", "(unbound)") //i18n("No Image")
: dataSource());
p2.end();
bitBlt(this, m, m, &pm);
}
else {
- QSize internalSize(size());
+ TQSize internalSize(size());
if (m_chooser && m_dropDownButtonVisible && !dataSource().isEmpty())
internalSize.setWidth( internalSize.width() - m_chooser->width() );
//clearing needed here because we may need to draw a pixmap with transparency
p.fillRect(0,0,width(),height(), bg);
- KexiUtils::drawPixmap( p, m, QRect(QPoint(0,0), internalSize), pixmap(), m_alignment,
+ KexiUtils::drawPixmap( p, m, TQRect(TQPoint(0,0), internalSize), pixmap(), m_tqalignment,
m_scaledContents, m_keepAspectRatio );
}
KexiFrame::drawFrame( &p );
// if the widget is focused, draw focus indicator rect _if_ there is no chooser button
if (!m_designMode && !dataSource().isEmpty() && hasFocus() && (!m_chooser || !m_chooser->isVisible())) {
- style().drawPrimitive(
- QStyle::PE_FocusRect, &p, style().subRect(QStyle::SR_PushButtonContents, this),
- palette().active() );
+ tqstyle().tqdrawPrimitive(
+ TQStyle::PE_FocusRect, &p, tqstyle().subRect(TQStyle::SR_PushButtonContents, this),
+ tqpalette().active() );
}
}
-/* virtual void KexiDBImageBox::paletteChange ( const QPalette & oldPalette )
+/* virtual void KexiDBImageBox::paletteChange ( const TQPalette & oldPalette )
{
- QFrame::paletteChange(oldPalette);
+ TQFrame::paletteChange(oldPalette);
if (oldPalette.active().background()!=palette().active().background()) {
delete KexiDBImageBox_pm;
KexiDBImageBox_pm = 0;
- repaint();
+ tqrepaint();
}
}*/
@@ -707,19 +707,19 @@ void KexiDBImageBox::updatePixmap()
return;
if (!KexiDBImageBox_pm) {
- QString fname( locate("data", QString("kexi/pics/imagebox.png")) );
- KexiDBImageBox_pmDeleter.setObject( KexiDBImageBox_pm, new QPixmap(fname, "PNG") );
- QImage img(KexiDBImageBox_pm->convertToImage());
+ TQString fname( locate("data", TQString("kexi/pics/imagebox.png")) );
+ KexiDBImageBox_pmDeleter.setObject( KexiDBImageBox_pm, new TQPixmap(fname, "PNG") );
+ TQImage img(KexiDBImageBox_pm->convertToImage());
KexiDBImageBox_pmSmallDeleter.setObject( KexiDBImageBox_pmSmall,
- new QPixmap( img.smoothScale(img.width()/2, img.height()/2, QImage::ScaleMin) ) );
+ new TQPixmap( img.smoothScale(img.width()/2, img.height()/2, TQ_ScaleMin) ) );
}
}
-void KexiDBImageBox::setAlignment(int alignment)
+void KexiDBImageBox::tqsetAlignment(int tqalignment)
{
- m_alignment = alignment;
+ m_tqalignment = tqalignment;
if (!m_scaledContents || m_keepAspectRatio)
- repaint();
+ tqrepaint();
}
void KexiDBImageBox::setData(const KexiBLOBBuffer::Handle& handle)
@@ -733,23 +733,23 @@ void KexiDBImageBox::setData(const KexiBLOBBuffer::Handle& handle)
update();
}
-void KexiDBImageBox::resizeEvent( QResizeEvent * e )
+void KexiDBImageBox::resizeEvent( TQResizeEvent * e )
{
KexiFrame::resizeEvent(e);
if (m_chooser) {
- QSize s( m_chooser->sizeHint() );
- QSize margin( realLineWidth(), realLineWidth() );
+ TQSize s( m_chooser->tqsizeHint() );
+ TQSize margin( realLineWidth(), realLineWidth() );
s.setHeight( height() - 2*margin.height() );
s = s.boundedTo( size()-2*margin );
m_chooser->resize( s );
- m_chooser->move( QRect(QPoint(0,0), e->size() - m_chooser->size() - margin + QSize(1,1)).bottomRight() );
+ m_chooser->move( TQRect(TQPoint(0,0), e->size() - m_chooser->size() - margin + TQSize(1,1)).bottomRight() );
}
}
/*
-bool KexiDBImageBox::setProperty( const char * name, const QVariant & value )
+bool KexiDBImageBox::setProperty( const char * name, const TQVariant & value )
{
- const bool ret = QLabel::setProperty(name, value);
+ const bool ret = TQLabel::setProperty(name, value);
if (p_shadowEnabled) {
if (0==qstrcmp("indent", name) || 0==qstrcmp("font", name) || 0==qstrcmp("margin", name)
|| 0==qstrcmp("frameShadow", name) || 0==qstrcmp("frameShape", name)
@@ -770,16 +770,16 @@ void KexiDBImageBox::setColumnInfo(KexiDB::QueryColumnInfo* cinfo)
updateActionStrings();
}
-bool KexiDBImageBox::keyPressed(QKeyEvent *ke)
+bool KexiDBImageBox::keyPressed(TQKeyEvent *ke)
{
// Esc key should close the popup
- if (ke->state() == Qt::NoButton && ke->key() == Qt::Key_Escape) {
+ if (ke->state() == Qt::NoButton && ke->key() == TQt::Key_Escape) {
if (m_popupMenu->isVisible()) {
m_setFocusOnButtonAfterClosingPopup = true;
return true;
}
}
-// else if (ke->state() == Qt::ControlButton && KStdAccel::shortcut(KStdAccel::Copy).keyCodeQt() == (ke->key()|Qt::CTRL)) {
+// else if (ke->state() == TQt::ControlButton && KStdAccel::shortcut(KStdAccel::Copy).keyCodeTQt() == (ke->key()|TQt::CTRL)) {
// }
return false;
}
@@ -790,7 +790,7 @@ void KexiDBImageBox::setLineWidth( int width )
KexiFrame::setLineWidth(width);
}
-void KexiDBImageBox::setPalette( const QPalette &pal )
+void KexiDBImageBox::setPalette( const TQPalette &pal )
{
KexiFrame::setPalette(pal);
if (m_insideSetPalette)
@@ -801,13 +801,13 @@ void KexiDBImageBox::setPalette( const QPalette &pal )
m_insideSetPalette = false;
}
-void KexiDBImageBox::setPaletteBackgroundColor( const QColor & color )
+void KexiDBImageBox::setPaletteBackgroundColor( const TQColor & color )
{
- kexipluginsdbg << "KexiDBImageBox::setPaletteBackgroundColor(): " << color.name() << endl;
+ kexipluginsdbg << "KexiDBImageBox::setPaletteBackgroundColor(): " << TQString(color.name()) << endl;
m_paletteBackgroundColorChanged = true;
KexiFrame::setPaletteBackgroundColor(color);
if (m_chooser)
- m_chooser->setPalette( qApp->palette() );
+ m_chooser->setPalette( tqApp->palette() );
}
bool KexiDBImageBox::dropDownButtonVisible() const
@@ -835,33 +835,33 @@ bool KexiDBImageBox::subwidgetStretchRequired(KexiDBAutoField* autoField) const
return true;
}
-bool KexiDBImageBox::eventFilter( QObject * watched, QEvent * e )
+bool KexiDBImageBox::eventFilter( TQObject * watched, TQEvent * e )
{
- if (watched==this || watched==m_chooser) { //we're watching chooser as well because it's a focus proxy even if invisible
- if (e->type()==QEvent::FocusIn || e->type()==QEvent::FocusOut || e->type()==QEvent::MouseButtonPress) {
- update(); //to repaint focus rect
+ if (TQT_BASE_OBJECT(watched)==TQT_BASE_OBJECT(this) || TQT_BASE_OBJECT(watched)==TQT_BASE_OBJECT(m_chooser)) { //we're watching chooser as well because it's a focus proxy even if invisible
+ if (e->type()==TQEvent::FocusIn || e->type()==TQEvent::FocusOut || e->type()==TQEvent::MouseButtonPress) {
+ update(); //to tqrepaint focus rect
}
}
// hide popup menu as soon as it loses focus
- if (watched==m_popupMenu && e->type()==QEvent::FocusOut) {
+ if (TQT_BASE_OBJECT(watched)==TQT_BASE_OBJECT(m_popupMenu) && e->type()==TQEvent::FocusOut) {
m_popupMenu->hide();
}
return KexiFrame::eventFilter(watched, e);
}
-QWidget::FocusPolicy KexiDBImageBox::focusPolicy() const
+TQ_FocusPolicy KexiDBImageBox::focusPolicy() const
{
if (dataSource().isEmpty())
- return NoFocus;
+ return TQ_NoFocus;
return m_focusPolicyInternal;
}
-QWidget::FocusPolicy KexiDBImageBox::focusPolicyInternal() const
+TQ_FocusPolicy KexiDBImageBox::focusPolicyInternal() const
{
return m_focusPolicyInternal;
}
-void KexiDBImageBox::setFocusPolicy( FocusPolicy policy )
+void KexiDBImageBox::setFocusPolicy( TQ_FocusPolicy policy )
{
m_focusPolicyInternal = policy;
KexiFrame::setFocusPolicy( focusPolicy() ); //set modified policy
diff --git a/kexi/plugins/forms/widgets/kexidbimagebox.h b/kexi/plugins/forms/widgets/kexidbimagebox.h
index 3ad2f710..85b54cd5 100644
--- a/kexi/plugins/forms/widgets/kexidbimagebox.h
+++ b/kexi/plugins/forms/widgets/kexidbimagebox.h
@@ -38,46 +38,47 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox :
public KexiSubwidgetInterface
{
Q_OBJECT
- Q_PROPERTY( QString dataSource READ dataSource WRITE setDataSource )
- Q_PROPERTY( QCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType )
- Q_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly )
-// Q_PROPERTY( QPixmap pixmap READ pixmap WRITE setPixmap )
-// Q_PROPERTY( QByteArray pixmapData READ pixmapData WRITE setPixmapData )
- Q_PROPERTY( uint pixmapId READ pixmapId WRITE setPixmapId DESIGNABLE true STORED false )
- Q_PROPERTY( uint storedPixmapId READ storedPixmapId WRITE setStoredPixmapId DESIGNABLE false STORED true )
- Q_PROPERTY( bool scaledContents READ hasScaledContents WRITE setScaledContents )
- Q_PROPERTY( bool keepAspectRatio READ keepAspectRatio WRITE setKeepAspectRatio )
- Q_PROPERTY( Alignment alignment READ alignment WRITE setAlignment )
-// Q_PROPERTY( QString originalFileName READ originalFileName WRITE setOriginalFileName DESIGNABLE false )
-// Q_OVERRIDE( FocusPolicy focusPolicy READ focusPolicy WRITE setFocusPolicy )
- Q_PROPERTY( bool dropDownButtonVisible READ dropDownButtonVisible WRITE setDropDownButtonVisible )
- Q_OVERRIDE( int lineWidth READ lineWidth WRITE setLineWidth )
- Q_OVERRIDE( FocusPolicy focusPolicy READ focusPolicyInternal WRITE setFocusPolicy )
+ TQ_OBJECT
+ TQ_PROPERTY( TQString dataSource READ dataSource WRITE setDataSource )
+ TQ_PROPERTY( TQCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType )
+ TQ_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly )
+// TQ_PROPERTY( TQPixmap pixmap READ pixmap WRITE setPixmap )
+// TQ_PROPERTY( TQByteArray pixmapData READ pixmapData WRITE setPixmapData )
+ TQ_PROPERTY( uint pixmapId READ pixmapId WRITE setPixmapId DESIGNABLE true STORED false )
+ TQ_PROPERTY( uint storedPixmapId READ storedPixmapId WRITE setStoredPixmapId DESIGNABLE false STORED true )
+ TQ_PROPERTY( bool scaledContents READ hasScaledContents WRITE setScaledContents )
+ TQ_PROPERTY( bool keepAspectRatio READ keepAspectRatio WRITE setKeepAspectRatio )
+ TQ_PROPERTY( int tqalignment READ tqalignment WRITE tqsetAlignment )
+// TQ_PROPERTY( TQString originalFileName READ originalFileName WRITE setOriginalFileName DESIGNABLE false )
+// TQ_OVERRIDE( FocusPolicy focusPolicy READ focusPolicy WRITE setFocusPolicy )
+ TQ_PROPERTY( bool dropDownButtonVisible READ dropDownButtonVisible WRITE setDropDownButtonVisible )
+ TQ_OVERRIDE( int lineWidth READ lineWidth WRITE setLineWidth )
+ TQ_OVERRIDE( FocusPolicy focusPolicy READ focusPolicyInternal WRITE setFocusPolicy )
public:
- KexiDBImageBox( bool designMode, QWidget *parent, const char *name = 0 );
+ KexiDBImageBox( bool designMode, TQWidget *tqparent, const char *name = 0 );
virtual ~KexiDBImageBox();
- inline QString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
- inline QCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
+ inline TQString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
+ inline TQCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
- virtual QVariant value(); // { return m_value.data(); }
+ virtual TQVariant value(); // { return m_value.data(); }
-// QByteArray pixmapData() const { return m_value.data(); }
+// TQByteArray pixmapData() const { return m_value.data(); }
- QPixmap pixmap() const;
+ TQPixmap pixmap() const;
uint pixmapId() const;
uint storedPixmapId() const;
//
- virtual void setInvalidState( const QString& displayText );
+ virtual void setInvalidState( const TQString& displayText );
virtual bool valueIsNull();
virtual bool valueIsEmpty();
- virtual QWidget* widget();
+ virtual TQWidget* widget();
//! always true
virtual bool cursorAtStart();
@@ -86,7 +87,7 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox :
virtual bool cursorAtEnd();
// //! used to catch setIndent(), etc.
-// virtual bool setProperty ( const char * name, const QVariant & value );
+// virtual bool setProperty ( const char * name, const TQVariant & value );
virtual bool isReadOnly() const;
@@ -94,28 +95,28 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox :
// bool designMode() const { return m_designMode; }
- int alignment() const { return m_alignment; }
+ int tqalignment() const { return m_tqalignment; }
bool keepAspectRatio() const { return m_keepAspectRatio; }
- virtual QSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
KexiImageContextMenu *contextMenu() const;
/*! \return original file name of image loaded from a file.
This can be later reused for displaying the image within a collection (to be implemented)
or on saving the image data back to file. */
-//todo QString originalFileName() const { return m_value.originalFileName(); }
+//todo TQString originalFileName() const { return m_value.originalFileName(); }
//! Reimplemented to override behaviour of "lineWidth" property.
virtual void setLineWidth( int width );
//! Reimplemented to override behaviour of "paletteBackgroundColor"
//! and "paletteForegroundColor" properties.
- virtual void setPalette( const QPalette &pal );
+ virtual void setPalette( const TQPalette &pal );
//! Reimplemented to override behaviour of "paletteBackgroundColor" property.
- virtual void setPaletteBackgroundColor( const QColor & color );
+ virtual void setPaletteBackgroundColor( const TQColor & color );
//! \return true id drop down button should be visible (the default).
bool dropDownButtonVisible() const;
@@ -126,14 +127,14 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox :
/*! Overriden to change the policy behaviour a bit:
NoFocus is returned regardless the real focus flag
if the data source is empty (see dataSource()). */
- FocusPolicy focusPolicy() const;
+ TQ_FocusPolicy focusPolicy() const;
//! \return the internal focus policy value, i.e. the one unrelated to data source presence.
- FocusPolicy focusPolicyInternal() const;
+ TQ_FocusPolicy focusPolicyInternal() const;
/*! Sets the internal focus policy value.
"Internal" means that if there is no data source set, real policy becomes NoFocus. */
- virtual void setFocusPolicy( FocusPolicy policy );
+ virtual void setFocusPolicy( TQ_FocusPolicy policy );
public slots:
void setPixmapId(uint id);
@@ -141,23 +142,23 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox :
void setStoredPixmapId(uint id);
//! Sets the datasource to \a ds
- virtual void setDataSource( const QString &ds );
+ virtual void setDataSource( const TQString &ds );
- inline void setDataSourceMimeType(const QCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
+ inline void setDataSourceMimeType(const TQCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
virtual void setReadOnly(bool set);
//! Sets \a pixmapData data for this widget. If the widget has data source set,
//! the pixmap will be also placed inside of the buffer and saved later.
-//todo void setPixmapData(const QByteArray& pixmapData) { m_value.setData(pixmapData); }
+//todo void setPixmapData(const TQByteArray& pixmapData) { m_value.setData(pixmapData); }
/*! Sets original file name of image loaded from a file.
@see originalFileName() */
-//todo void setOriginalFileName(const QString& name) { m_value.setOriginalFileName(name); }
+//todo void setOriginalFileName(const TQString& name) { m_value.setOriginalFileName(name); }
void setScaledContents(bool set);
- void setAlignment(int alignment);
+ void tqsetAlignment(int tqalignment);
void setKeepAspectRatio(bool set);
@@ -176,7 +177,7 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox :
//! Used for db-aware mode. Emitted when value has been changed.
//! Actual value can be obtained using value().
// virtual void pixmapChanged();
-// virtual void valueChanged(const QByteArray& data);
+// virtual void valueChanged(const TQByteArray& data);
void idChanged(long id);
@@ -184,8 +185,8 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox :
void slotUpdateActionsAvailabilityRequested(bool& valueIsNull, bool& valueIsReadOnly);
void handleInsertFromFileAction(const KURL& url);
- void handleAboutToSaveAsAction(QString& origFilename, QString& fileExtension, bool& dataIsEmpty);
- void handleSaveAsAction(const QString& fileName);
+ void handleAboutToSaveAsAction(TQString& origFilename, TQString& fileExtension, bool& dataIsEmpty);
+ void handleSaveAsAction(const TQString& fileName);
void handleCutAction();
void handleCopyAction();
void handlePasteAction();
@@ -194,22 +195,22 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox :
protected:
//! \return data depending on the current mode (db-aware or static)
- QByteArray data() const;
+ TQByteArray data() const;
- virtual void contextMenuEvent ( QContextMenuEvent * e );
-// virtual void mousePressEvent( QMouseEvent *e );
+ virtual void contextMenuEvent ( TQContextMenuEvent * e );
+// virtual void mousePressEvent( TQMouseEvent *e );
virtual void setColumnInfo(KexiDB::QueryColumnInfo* cinfo);
- virtual void paintEvent( QPaintEvent* );
- virtual void resizeEvent( QResizeEvent* e );
- virtual bool eventFilter( QObject * watched, QEvent * e );
+ virtual void paintEvent( TQPaintEvent* );
+ virtual void resizeEvent( TQResizeEvent* e );
+ virtual bool eventFilter( TQObject * watched, TQEvent * e );
//! Sets value \a value for a widget.
- virtual void setValueInternal( const QVariant& add, bool removeOld ) {
+ virtual void setValueInternal( const TQVariant& add, bool removeOld ) {
setValueInternal( add, removeOld, true /*loadPixmap*/ );
}
//! @internal, added \a loadPixmap option used by paste().
- void setValueInternal( const QVariant& add, bool removeOld, bool loadPixmap );
+ void setValueInternal( const TQVariant& add, bool removeOld, bool loadPixmap );
//! Updates i18n'd action strings after datasource change
void updateActionStrings();
@@ -223,7 +224,7 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox :
/*! Called by top-level form on key press event.
Used for Key_Escape to if the popup is visible,
so the key press won't be consumed to perform "cancel editing". */
- virtual bool keyPressed(QKeyEvent *ke);
+ virtual bool keyPressed(TQKeyEvent *ke);
//! \return real line width, i.e. for Boxed sunken or Boxed raised
//! frames returns doubled width value.
@@ -232,33 +233,33 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox :
//! Implemented for KexiSubwidgetInterface
virtual bool subwidgetStretchRequired(KexiDBAutoField* autoField) const;
-// virtual void drawContents ( QPainter *p );
+// virtual void drawContents ( TQPainter *p );
-// virtual void fontChange( const QFont& font );
-// virtual void styleChange( QStyle& style );
+// virtual void fontChange( const TQFont& font );
+// virtual void styleChange( TQStyle& style );
// virtual void enabledChange( bool enabled );
-// virtual void paletteChange( const QPalette& pal );
+// virtual void paletteChange( const TQPalette& pal );
// virtual void frameChanged();
-// virtual void showEvent( QShowEvent* e );
+// virtual void showEvent( TQShowEvent* e );
// void updatePixmapLater();
// class ImageLabel;
// ImageLabel *m_pixmapLabel;
- QPixmap m_pixmap;
- QByteArray m_value; //!< for db-aware mode
- QString m_valueMimeType; //!< for db-aware mode
+ TQPixmap m_pixmap;
+ TQByteArray m_value; //!< for db-aware mode
+ TQString m_valueMimeType; //!< for db-aware mode
// PixmapData m_value;
KexiBLOBBuffer::Handle m_data;
-// QString m_originalFileName;
+// TQString m_originalFileName;
KexiDropDownButton *m_chooser;
KexiImageContextMenu *m_popupMenu;
//moved KActionCollection m_actionCollection;
//moved KAction *m_insertFromFileAction, *m_saveAsAction, *m_cutAction, *m_copyAction, *m_pasteAction,
// *m_deleteAction, *m_propertiesAction;
-// QTimer m_clickTimer;
- int m_alignment;
- FocusPolicy m_focusPolicyInternal; //!< Used for focusPolicyInternal()
+// TQTimer m_clickTimer;
+ int m_tqalignment;
+ TQ_FocusPolicy m_focusPolicyInternal; //!< Used for focusPolicyInternal()
bool m_designMode : 1;
bool m_readOnly : 1;
bool m_scaledContents : 1;
diff --git a/kexi/plugins/forms/widgets/kexidbintspinbox.cpp b/kexi/plugins/forms/widgets/kexidbintspinbox.cpp
index ac923347..7d5ae6ee 100644
--- a/kexi/plugins/forms/widgets/kexidbintspinbox.cpp
+++ b/kexi/plugins/forms/widgets/kexidbintspinbox.cpp
@@ -20,27 +20,27 @@
#include "kexidbintspinbox.h"
-#include <qlineedit.h>
+#include <tqlineedit.h>
#include <knumvalidator.h>
-KexiDBIntSpinBox::KexiDBIntSpinBox(QWidget *parent, const char *name)
- : KIntSpinBox(parent, name) , KexiFormDataItemInterface()
+KexiDBIntSpinBox::KexiDBIntSpinBox(TQWidget *tqparent, const char *name)
+ : KIntSpinBox(tqparent, name) , KexiFormDataItemInterface()
{
- connect(this, SIGNAL(valueChanged(int)), this, SLOT(slotValueChanged()));
+ connect(this, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotValueChanged()));
}
KexiDBIntSpinBox::~KexiDBIntSpinBox()
{
}
-void KexiDBIntSpinBox::setInvalidState( const QString& displayText )
+void KexiDBIntSpinBox::setInvalidState( const TQString& displayText )
{
m_invalidState = true;
setEnabled(false);
setReadOnly(true);
//! @todo move this to KexiDataItemInterface::setInvalidStateInternal() ?
if (focusPolicy() & TabFocus)
- setFocusPolicy(QWidget::ClickFocus);
+ setFocusPolicy(TQ_ClickFocus);
setSpecialValueText(displayText);
KIntSpinBox::setValue(minValue());
}
@@ -54,12 +54,12 @@ KexiDBIntSpinBox::setEnabled(bool enabled)
KIntSpinBox::setEnabled(enabled);
}
-void KexiDBIntSpinBox::setValueInternal(const QVariant&, bool)
+void KexiDBIntSpinBox::setValueInternal(const TQVariant&, bool)
{
KIntSpinBox::setValue(m_origValue.toInt());
}
-QVariant
+TQVariant
KexiDBIntSpinBox::value()
{
return KIntSpinBox::value();
@@ -90,7 +90,7 @@ void KexiDBIntSpinBox::setReadOnly(bool set)
editor()->setReadOnly(set);
}
-QWidget*
+TQWidget*
KexiDBIntSpinBox::widget()
{
return this;
diff --git a/kexi/plugins/forms/widgets/kexidbintspinbox.h b/kexi/plugins/forms/widgets/kexidbintspinbox.h
index cddc614e..9827cd5f 100644
--- a/kexi/plugins/forms/widgets/kexidbintspinbox.h
+++ b/kexi/plugins/forms/widgets/kexidbintspinbox.h
@@ -22,25 +22,26 @@
#define KexiDBIntSpinBox_H
#include "kexiformdataiteminterface.h"
-#include <qwidget.h>
+#include <tqwidget.h>
#include <knuminput.h>
//! @short A db-aware int spin box
class KEXIFORMUTILS_EXPORT KexiDBIntSpinBox : public KIntSpinBox, public KexiFormDataItemInterface
{
Q_OBJECT
- Q_PROPERTY(QString dataSource READ dataSource WRITE setDataSource DESIGNABLE true)
- Q_PROPERTY(QCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true)
- Q_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly DESIGNABLE true )
+ TQ_OBJECT
+ TQ_PROPERTY(TQString dataSource READ dataSource WRITE setDataSource DESIGNABLE true)
+ TQ_PROPERTY(TQCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true)
+ TQ_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly DESIGNABLE true )
public:
- KexiDBIntSpinBox(QWidget *parent, const char *name=0);
+ KexiDBIntSpinBox(TQWidget *tqparent, const char *name=0);
virtual ~KexiDBIntSpinBox();
- inline QString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
- inline QCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
- virtual QVariant value();
- virtual void setInvalidState( const QString& displayText );
+ inline TQString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
+ inline TQCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
+ virtual TQVariant value();
+ virtual void setInvalidState( const TQString& displayText );
//! \return true if editor's value is null (not empty)
//! Used for checking if a given constraint within table of form is met.
@@ -56,7 +57,7 @@ class KEXIFORMUTILS_EXPORT KexiDBIntSpinBox : public KIntSpinBox, public KexiFor
virtual bool isReadOnly() const;
/*! \return the view widget of this item, e.g. line edit widget. */
- virtual QWidget* widget();
+ virtual TQWidget* widget();
virtual bool cursorAtStart();
virtual bool cursorAtEnd();
@@ -65,13 +66,13 @@ class KEXIFORMUTILS_EXPORT KexiDBIntSpinBox : public KIntSpinBox, public KexiFor
virtual void setEnabled(bool enabled);
public slots:
- inline void setDataSource(const QString &ds) { KexiFormDataItemInterface::setDataSource(ds); }
- inline void setDataSourceMimeType(const QCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
+ inline void setDataSource(const TQString &ds) { KexiFormDataItemInterface::setDataSource(ds); }
+ inline void setDataSourceMimeType(const TQCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
void slotValueChanged();
virtual void setReadOnly(bool set);
protected:
- virtual void setValueInternal(const QVariant& add, bool removeOld);
+ virtual void setValueInternal(const TQVariant& add, bool removeOld);
private:
bool m_invalidState : 1;
diff --git a/kexi/plugins/forms/widgets/kexidblabel.cpp b/kexi/plugins/forms/widgets/kexidblabel.cpp
index e30cc19e..db946141 100644
--- a/kexi/plugins/forms/widgets/kexidblabel.cpp
+++ b/kexi/plugins/forms/widgets/kexidblabel.cpp
@@ -20,11 +20,11 @@
#include "kexidblabel.h"
-#include <qbitmap.h>
-#include <qpainter.h>
-#include <qdrawutil.h>
-#include <qapplication.h>
-#include <qtimer.h>
+#include <tqbitmap.h>
+#include <tqpainter.h>
+#include <tqdrawutil.h>
+#include <tqapplication.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include <kimageeffect.h>
@@ -41,7 +41,7 @@
#define SHADOW_THICKNESS 1
//! @internal
-class KexiDBInternalLabel : public QLabel {
+class KexiDBInternalLabel : public TQLabel {
friend class KexiDBLabel;
public:
KexiDBInternalLabel( KexiDBLabel* );
@@ -50,23 +50,23 @@ class KexiDBInternalLabel : public QLabel {
protected:
void updateFrame();
- QImage makeShadow( const QImage& textImage, const QColor &bgColor, const QRect& boundingRect );
- QRect getBounding( const QImage &image, const QRect& startRect );
-// double defaultDecay( QImage& source, int i, int j );
+ TQImage makeShadow( const TQImage& textImage, const TQColor &bgColor, const TQRect& boundingRect );
+ TQRect getBounding( const TQImage &image, const TQRect& startRect );
+// double defaultDecay( TQImage& source, int i, int j );
KPixmap getShadowPixmap();
- QRect m_shadowRect;
+ TQRect m_shadowRect;
KexiDBLabel *m_parentLabel;
};
-KexiDBInternalLabel::KexiDBInternalLabel( KexiDBLabel* parent )
- : QLabel( parent )
- , m_parentLabel(parent)
+KexiDBInternalLabel::KexiDBInternalLabel( KexiDBLabel* tqparent )
+ : TQLabel( tqparent )
+ , m_parentLabel(tqparent)
{
- int a = alignment() | Qt::WordBreak;
- a &= (0xffffff ^ Qt::AlignVertical_Mask);
- a |= Qt::AlignTop;
- setAlignment( a );
+ int a = tqalignment() | TQt::WordBreak;
+ a &= (0xffffff ^ TQt::AlignVertical_Mask);
+ a |= TQt::AlignTop;
+ tqsetAlignment( a );
updateFrame();
}
@@ -93,11 +93,11 @@ KexiDBInternalLabel::~KexiDBInternalLabel()
* --
* Christian Nitschkowski
*/
-QImage KexiDBInternalLabel::makeShadow( const QImage& textImage,
- const QColor &bgColor, const QRect& boundingRect )
+TQImage KexiDBInternalLabel::makeShadow( const TQImage& textImage,
+ const TQColor &bgColor, const TQRect& boundingRect )
{
- QImage result;
- QString origText( text() );
+ TQImage result;
+ TQString origText( text() );
// create a new image for for the shaddow
const int w = textImage.width();
@@ -119,7 +119,7 @@ QImage KexiDBInternalLabel::makeShadow( const QImage& textImage,
/*
* This is the source pixmap
*/
- QImage img = textImage.convertDepth( 32 );
+ TQImage img = textImage.convertDepth( 32 );
/*
* Resize the image if necessary
@@ -129,10 +129,10 @@ QImage KexiDBInternalLabel::makeShadow( const QImage& textImage,
}
// result.fill( 0 ); // all black
- double realOpacity = SHADOW_OPACITY + QMIN(50.0/double(256.0-qGray(bgColor.rgb())), 50.0);
+ double realOpacity = SHADOW_OPACITY + TQMIN(50.0/double(256.0-tqGray(bgColor.rgb())), 50.0);
//int _h, _s, _v;
//.getHsv( &_h, &_s, &_v );
- if (colorGroup().background()==Qt::red)//_s>=250 && _v>=250) //for colors like cyan or red, make the result more white
+ if (tqcolorGroup().background()==TQt::red)//_s>=250 && _v>=250) //for colors like cyan or red, make the result more white
realOpacity += 50.0;
result.fill( (int)realOpacity );
result.setAlphaBuffer( true );
@@ -148,26 +148,26 @@ QImage KexiDBInternalLabel::makeShadow( const QImage& textImage,
if ( ( i < 1 ) || ( j < 1 ) || ( i > img.width() - 2 ) || ( j > img.height() - 2 ) )
continue;
else
- alphaShadow = ( qGray( img.pixel( i - 1, j - 1 ) ) * SHADOW_DIAGONAL_FACTOR +
- qGray( img.pixel( i - 1, j ) ) * SHADOW_AXIS_FACTOR +
- qGray( img.pixel( i - 1, j + 1 ) ) * SHADOW_DIAGONAL_FACTOR +
- qGray( img.pixel( i , j - 1 ) ) * SHADOW_AXIS_FACTOR +
+ alphaShadow = ( tqGray( img.pixel( i - 1, j - 1 ) ) * SHADOW_DIAGONAL_FACTOR +
+ tqGray( img.pixel( i - 1, j ) ) * SHADOW_AXIS_FACTOR +
+ tqGray( img.pixel( i - 1, j + 1 ) ) * SHADOW_DIAGONAL_FACTOR +
+ tqGray( img.pixel( i , j - 1 ) ) * SHADOW_AXIS_FACTOR +
0 +
- qGray( img.pixel( i , j + 1 ) ) * SHADOW_AXIS_FACTOR +
- qGray( img.pixel( i + 1, j - 1 ) ) * SHADOW_DIAGONAL_FACTOR +
- qGray( img.pixel( i + 1, j ) ) * SHADOW_AXIS_FACTOR +
- qGray( img.pixel( i + 1, j + 1 ) ) * SHADOW_DIAGONAL_FACTOR ) / SHADOW_FACTOR;
+ tqGray( img.pixel( i , j + 1 ) ) * SHADOW_AXIS_FACTOR +
+ tqGray( img.pixel( i + 1, j - 1 ) ) * SHADOW_DIAGONAL_FACTOR +
+ tqGray( img.pixel( i + 1, j ) ) * SHADOW_AXIS_FACTOR +
+ tqGray( img.pixel( i + 1, j + 1 ) ) * SHADOW_DIAGONAL_FACTOR ) / SHADOW_FACTOR;
// update the shadow's i,j pixel.
if (alphaShadow > 0)
- result.setPixel( i, j, qRgba( bgRed, bgGreen , bgBlue,
+ result.setPixel( i, j, tqRgba( bgRed, bgGreen , bgBlue,
( int ) (( alphaShadow > realOpacity ) ? realOpacity : alphaShadow)
) );
}
/*caused too much redraw problems if (period && i % period) {
- qApp->processEvents();
+ tqApp->processEvents();
if (text() != origText) //text has been changed in the meantime: abort
- return QImage();
+ return TQImage();
}*/
}
return result;
@@ -177,25 +177,25 @@ KPixmap KexiDBInternalLabel::getShadowPixmap() {
/*!
* Backup the default color used to draw text.
*/
- const QColor textColor = colorGroup().foreground();
+ const TQColor textColor = tqcolorGroup().foreground();
/*!
* Temporary storage for the generated shadow
*/
KPixmap finalPixmap, tempPixmap;
- QImage shadowImage, tempImage;
- QPainter painter;
+ TQImage shadowImage, tempImage;
+ TQPainter painter;
- m_shadowRect = QRect();
+ m_shadowRect = TQRect();
tempPixmap.resize( size() );
- tempPixmap.fill( Qt::black );
+ tempPixmap.fill( TQt::black );
tempPixmap.setMask( tempPixmap.createHeuristicMask( true ) );
/*!
* The textcolor has to be white for creating shadows!
*/
- setPaletteForegroundColor( Qt::white );
+ setPaletteForegroundColor( TQt::white );
/*!
Draw the label "as usual" in a pixmap
@@ -211,7 +211,7 @@ KPixmap KexiDBInternalLabel::getShadowPixmap() {
* This will fit around the unmodified text.
*/
shadowImage = tempPixmap;
- tempPixmap.setMask( QBitmap() );
+ tempPixmap.setMask( TQBitmap() );
/*!
Get the first bounding rect.
@@ -225,14 +225,14 @@ KPixmap KexiDBInternalLabel::getShadowPixmap() {
* The new rect has to fit in the pixmap.
* I have to admit this isn't really nice code...
*/
- m_shadowRect.setX( QMAX( m_shadowRect.x() - ( m_shadowRect.width() / 4 ), 0 ) );
- m_shadowRect.setY( QMAX( m_shadowRect.y() - ( m_shadowRect.height() / 4 ), 0 ) );
- m_shadowRect.setBottomRight( QPoint(
- QMIN( m_shadowRect.x() + ( m_shadowRect.width() * 3 / 2 ), shadowImage.width() ),
- QMIN( m_shadowRect.y() + ( m_shadowRect.height() * 3 / 2 ), shadowImage.height() ) ) );
+ m_shadowRect.setX( TQMAX( m_shadowRect.x() - ( m_shadowRect.width() / 4 ), 0 ) );
+ m_shadowRect.setY( TQMAX( m_shadowRect.y() - ( m_shadowRect.height() / 4 ), 0 ) );
+ m_shadowRect.setBottomRight( TQPoint(
+ TQMIN( m_shadowRect.x() + ( m_shadowRect.width() * 3 / 2 ), shadowImage.width() ),
+ TQMIN( m_shadowRect.y() + ( m_shadowRect.height() * 3 / 2 ), shadowImage.height() ) ) );
shadowImage = makeShadow( shadowImage,
- qGray( colorGroup().background().rgb() ) < 127 ? Qt::white : Qt::black,
+ tqGray( tqcolorGroup().background().rgb() ) < 127 ? TQt::white : TQt::black,
m_shadowRect );
if (shadowImage.isNull())
return KPixmap();
@@ -249,8 +249,8 @@ KPixmap KexiDBInternalLabel::getShadowPixmap() {
painter.begin( &finalPixmap );
painter.fillRect( 0, 0, finalPixmap.width(), finalPixmap.height(),
palette().brush(
- isEnabled() ? QPalette::Active : QPalette::Disabled,
- QColorGroup::Background ) );
+ isEnabled() ? TQPalette::Active : TQPalette::Disabled,
+ TQColorGroup::Background ) );
painter.end();
/*!
@@ -276,7 +276,7 @@ KPixmap KexiDBInternalLabel::getShadowPixmap() {
to a new image.
I tried to copy this to a pixmap directly,
but it didn't work correctly.
- Maybe a Qt bug?
+ Maybe a TQt bug?
*/
tempImage = shadowImage.copy( m_shadowRect );
tempPixmap.convertFromImage( tempImage );
@@ -296,30 +296,30 @@ KPixmap KexiDBInternalLabel::getShadowPixmap() {
return finalPixmap;
}
-QRect KexiDBInternalLabel::getBounding( const QImage &image, const QRect& startRect ) {
- QPoint topLeft;
- QPoint bottomRight;
+TQRect KexiDBInternalLabel::getBounding( const TQImage &image, const TQRect& startRect ) {
+ TQPoint topLeft;
+ TQPoint bottomRight;
const int startX = startRect.x();
const int startY = startRect.y();
/*!
* Ugly beast to get the correct width and height
*/
- const int width = QMIN( ( startRect.bottomRight().x() > 0
- ? startRect.bottomRight().x() : QCOORD_MAX ),
+ const int width = TQMIN( ( startRect.bottomRight().x() > 0
+ ? startRect.bottomRight().x() : TQCOORD_MAX ),
image.width() );
- const int height = QMIN( ( startRect.bottomRight().y() > 0
- ? startRect.bottomRight().y() : QCOORD_MAX ),
+ const int height = TQMIN( ( startRect.bottomRight().y() > 0
+ ? startRect.bottomRight().y() : TQCOORD_MAX ),
image.height() );
/*!
Assume the first pixel has the color of the
background that has to be cut away.
- Qt uses the four corner pixels to guess the
+ TQt uses the four corner pixels to guess the
correct color, but in this case the topleft
pixel should be enough.
*/
- QRgb trans = image.pixel( 0, 0 );
+ TQRgb trans = image.pixel( 0, 0 );
for ( int y = startY; y < height; y++ ) {
for ( int x = startX; x < width; x++ ) {
@@ -361,7 +361,7 @@ QRect KexiDBInternalLabel::getBounding( const QImage &image, const QRect& startR
}
}
- return QRect(
+ return TQRect(
topLeft.x(),
topLeft.y(),
bottomRight.x() - topLeft.x(),
@@ -384,10 +384,10 @@ class KexiDBLabel::Private
}
~Private() {}
KPixmap shadowPixmap;
- QPoint shadowPosition;
+ TQPoint shadowPosition;
KexiDBInternalLabel* internalLabel;
- QTimer* timer;
- QColor frameColor;
+ TQTimer* timer;
+ TQColor frameColor;
bool pixmapDirty : 1;
bool shadowEnabled : 1;
bool resizeEvent : 1;
@@ -395,8 +395,8 @@ class KexiDBLabel::Private
//=========================================================
-KexiDBLabel::KexiDBLabel( QWidget *parent, const char *name, WFlags f )
- : QLabel( parent, name, f )
+KexiDBLabel::KexiDBLabel( TQWidget *tqparent, const char *name, WFlags f )
+ : TQLabel( tqparent, name, f )
, KexiDBTextWidgetInterface()
, KexiFormDataItemInterface()
, d( new Private() )
@@ -404,8 +404,8 @@ KexiDBLabel::KexiDBLabel( QWidget *parent, const char *name, WFlags f )
init();
}
-KexiDBLabel::KexiDBLabel( const QString& text, QWidget *parent, const char *name, WFlags f )
- : QLabel( parent, name, f )
+KexiDBLabel::KexiDBLabel( const TQString& text, TQWidget *tqparent, const char *name, WFlags f )
+ : TQLabel( tqparent, name, f )
, KexiDBTextWidgetInterface()
, KexiFormDataItemInterface()
, d( new Private() )
@@ -424,16 +424,16 @@ void KexiDBLabel::init()
m_hasFocusableWidget = false;
d->internalLabel = new KexiDBInternalLabel( this );
d->internalLabel->hide();
- d->frameColor = palette().active().foreground();
+ d->frameColor = tqpalette().active().foreground();
- setAlignment( d->internalLabel->alignment() );
+ tqsetAlignment( d->internalLabel->tqalignment() );
}
void KexiDBLabel::updatePixmapLater() {
if (d->resizeEvent) {
if (!d->timer) {
- d->timer = new QTimer(this, "KexiDBLabelTimer");
- connect(d->timer, SIGNAL(timeout()), this, SLOT(updatePixmap()));
+ d->timer = new TQTimer(this, "KexiDBLabelTimer");
+ connect(d->timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(updatePixmap()));
}
d->timer->start(100, true);
d->resizeEvent = false;
@@ -453,20 +453,20 @@ void KexiDBLabel::updatePixmap() {
d->internalLabel->setText( text() );
d->internalLabel->setFixedSize( size() );
d->internalLabel->setPalette( palette() );
- d->internalLabel->setAlignment( alignment() );
-// d->shadowPixmap = KPixmap(); //parallel repaints won't hurt us cause incomplete pixmap
+ d->internalLabel->tqsetAlignment( tqalignment() );
+// d->shadowPixmap = KPixmap(); //parallel tqrepaints won't hurt us cause incomplete pixmap
KPixmap shadowPixmap = d->internalLabel->getShadowPixmap();
if (shadowPixmap.isNull())
return;
d->shadowPixmap = shadowPixmap;
d->shadowPosition = d->internalLabel->m_shadowRect.topLeft();
d->pixmapDirty = false;
- repaint();
+ tqrepaint();
}
-void KexiDBLabel::paintEvent( QPaintEvent* e )
+void KexiDBLabel::paintEvent( TQPaintEvent* e )
{
- QPainter p( this );
+ TQPainter p( this );
if ( d->shadowEnabled ) {
/*!
If required, update the pixmap-cache.
@@ -482,31 +482,31 @@ void KexiDBLabel::paintEvent( QPaintEvent* e )
the shadow has to be drawn using an offset relative to
the widgets border.
*/
- if ( !d->pixmapDirty && e->rect().contains( d->shadowPosition ) && !d->shadowPixmap.isNull()) {
- QRect clipRect = QRect(
- QMAX( e->rect().x() - d->shadowPosition.x(), 0 ),
- QMAX( e->rect().y() - d->shadowPosition.y(), 0 ),
- QMIN( e->rect().width() + d->shadowPosition.x(), d->shadowPixmap.width() ),
- QMIN( e->rect().height() + d->shadowPosition.y(), d->shadowPixmap.height() ) );
+ if ( !d->pixmapDirty && e->rect().tqcontains( d->shadowPosition ) && !d->shadowPixmap.isNull()) {
+ TQRect clipRect = TQRect(
+ TQMAX( e->rect().x() - d->shadowPosition.x(), 0 ),
+ TQMAX( e->rect().y() - d->shadowPosition.y(), 0 ),
+ TQMIN( e->rect().width() + d->shadowPosition.x(), d->shadowPixmap.width() ),
+ TQMIN( e->rect().height() + d->shadowPosition.y(), d->shadowPixmap.height() ) );
p.drawPixmap( d->internalLabel->m_shadowRect.topLeft(), d->shadowPixmap, clipRect );
}
}
- KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), alignment(), false );
- QLabel::paintEvent( e );
+ KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), tqalignment(), false );
+ TQLabel::paintEvent( e );
}
-void KexiDBLabel::setValueInternal( const QVariant& add, bool removeOld ) {
+void KexiDBLabel::setValueInternal( const TQVariant& add, bool removeOld ) {
if (removeOld)
setText(add.toString());
else
setText( m_origValue.toString() + add.toString() );
}
-QVariant KexiDBLabel::value() {
+TQVariant KexiDBLabel::value() {
return text();
}
-void KexiDBLabel::setInvalidState( const QString& displayText )
+void KexiDBLabel::setInvalidState( const TQString& displayText )
{
setText( displayText );
}
@@ -531,7 +531,7 @@ void KexiDBLabel::setReadOnly( bool readOnly )
Q_UNUSED(readOnly);
}
-QWidget* KexiDBLabel::widget()
+TQWidget* KexiDBLabel::widget()
{
return this;
}
@@ -548,12 +548,12 @@ bool KexiDBLabel::cursorAtEnd()
void KexiDBLabel::clear()
{
- setText(QString::null);
+ setText(TQString());
}
-bool KexiDBLabel::setProperty( const char * name, const QVariant & value )
+bool KexiDBLabel::setProperty( const char * name, const TQVariant & value )
{
- const bool ret = QLabel::setProperty(name, value);
+ const bool ret = TQLabel::setProperty(name, value);
if (d->shadowEnabled) {
if (0==qstrcmp("indent", name) || 0==qstrcmp("font", name) || 0==qstrcmp("margin", name)
|| 0==qstrcmp("frameShadow", name) || 0==qstrcmp("frameShape", name)
@@ -577,45 +577,45 @@ void KexiDBLabel::setShadowEnabled( bool state ) {
d->pixmapDirty = true;
if (state)
d->internalLabel->updateFrame();
- repaint();
+ tqrepaint();
}
-void KexiDBLabel::resizeEvent( QResizeEvent* e ) {
+void KexiDBLabel::resizeEvent( TQResizeEvent* e ) {
if (isVisible())
d->resizeEvent = true;
d->pixmapDirty = true;
- QLabel::resizeEvent( e );
+ TQLabel::resizeEvent( e );
}
-void KexiDBLabel::fontChange( const QFont& font ) {
+void KexiDBLabel::fontChange( const TQFont& font ) {
d->pixmapDirty = true;
d->internalLabel->setFont( font );
- QLabel::fontChange( font );
+ TQLabel::fontChange( font );
}
-void KexiDBLabel::styleChange( QStyle& style ) {
+void KexiDBLabel::styleChange( TQStyle& style ) {
d->pixmapDirty = true;
- QLabel::styleChange( style );
+ TQLabel::styleChange( style );
}
void KexiDBLabel::enabledChange( bool enabled ) {
d->pixmapDirty = true;
d->internalLabel->setEnabled( enabled );
- QLabel::enabledChange( enabled );
+ TQLabel::enabledChange( enabled );
}
-void KexiDBLabel::paletteChange( const QPalette& oldPal ) {
+void KexiDBLabel::paletteChange( const TQPalette& oldPal ) {
Q_UNUSED(oldPal);
d->pixmapDirty = true;
d->internalLabel->setPalette( palette() );
}
-/*const QColor & KexiDBLabel::paletteForegroundColor () const
+/*const TQColor & KexiDBLabel::paletteForegroundColor () const
{
return d->foregroundColor;
}
-void KexiDBLabel::setPaletteForegroundColor ( const QColor& color )
+void KexiDBLabel::setPaletteForegroundColor ( const TQColor& color )
{
d->foregroundColor = color;
}*/
@@ -623,20 +623,20 @@ void KexiDBLabel::setPaletteForegroundColor ( const QColor& color )
void KexiDBLabel::frameChanged() {
d->pixmapDirty = true;
d->internalLabel->updateFrame();
- QFrame::frameChanged();
+ TQFrame::frameChanged();
}
-void KexiDBLabel::showEvent( QShowEvent* e ) {
+void KexiDBLabel::showEvent( TQShowEvent* e ) {
d->pixmapDirty = true;
- QLabel::showEvent( e );
+ TQLabel::showEvent( e );
}
-void KexiDBLabel::setText( const QString& text ) {
+void KexiDBLabel::setText( const TQString& text ) {
d->pixmapDirty = true;
- QLabel::setText( text );
+ TQLabel::setText( text );
//This is necessary for KexiFormDataItemInterface
valueChanged();
- repaint();
+ tqrepaint();
}
bool KexiDBLabel::shadowEnabled() const
@@ -645,6 +645,6 @@ bool KexiDBLabel::shadowEnabled() const
}
#define ClassName KexiDBLabel
-#define SuperClassName QLabel
+#define SuperClassName TQLabel
#include "kexiframeutils_p.cpp"
#include "kexidblabel.moc"
diff --git a/kexi/plugins/forms/widgets/kexidblabel.h b/kexi/plugins/forms/widgets/kexidblabel.h
index ec4e626a..af396a12 100644
--- a/kexi/plugins/forms/widgets/kexidblabel.h
+++ b/kexi/plugins/forms/widgets/kexidblabel.h
@@ -21,8 +21,8 @@
#ifndef KEXIDBLABEL_H
#define KEXIDBLABEL_H
-#include <qimage.h>
-#include <qlabel.h>
+#include <tqimage.h>
+#include <tqlabel.h>
#include <kpixmap.h>
@@ -30,8 +30,8 @@
#include "../kexidbtextwidgetinterface.h"
#include <widget/utils/kexidisplayutils.h>
-class QPainter;
-class QTimer;
+class TQPainter;
+class TQTimer;
class KexiDBInternalLabel;
//! @short An extended, data-aware, read-only text label.
@@ -39,29 +39,30 @@ class KexiDBInternalLabel;
@author Christian Nitschkowski, Jaroslaw Staniek
*/
-class KEXIFORMUTILS_EXPORT KexiDBLabel : public QLabel, protected KexiDBTextWidgetInterface, public KexiFormDataItemInterface {
+class KEXIFORMUTILS_EXPORT KexiDBLabel : public TQLabel, protected KexiDBTextWidgetInterface, public KexiFormDataItemInterface {
Q_OBJECT
- Q_PROPERTY( QString dataSource READ dataSource WRITE setDataSource DESIGNABLE true )
- Q_PROPERTY( QCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true )
- Q_PROPERTY( bool shadowEnabled READ shadowEnabled WRITE setShadowEnabled DESIGNABLE true )
- Q_OVERRIDE( QPixmap pixmap DESIGNABLE false )
- Q_OVERRIDE( bool scaledContents DESIGNABLE false )
-// Q_OVERRIDE( QColor paletteForegroundColor READ paletteForegroundColor WRITE setPaletteForegroundColor DESIGNABLE true )
- Q_PROPERTY( QColor frameColor READ frameColor WRITE setFrameColor DESIGNABLE true )
+ TQ_OBJECT
+ TQ_PROPERTY( TQString dataSource READ dataSource WRITE setDataSource DESIGNABLE true )
+ TQ_PROPERTY( TQCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true )
+ TQ_PROPERTY( bool shadowEnabled READ shadowEnabled WRITE setShadowEnabled DESIGNABLE true )
+ TQ_OVERRIDE( TQPixmap pixmap DESIGNABLE false )
+ TQ_OVERRIDE( bool scaledContents DESIGNABLE false )
+// TQ_OVERRIDE( TQColor paletteForegroundColor READ paletteForegroundColor WRITE setPaletteForegroundColor DESIGNABLE true )
+ TQ_PROPERTY( TQColor frameColor READ frameColor WRITE setFrameColor DESIGNABLE true )
public:
- KexiDBLabel( QWidget *parent, const char *name = 0, WFlags f = 0 );
- KexiDBLabel( const QString& text, QWidget *parent, const char *name = 0, WFlags f = 0 );
+ KexiDBLabel( TQWidget *tqparent, const char *name = 0, WFlags f = 0 );
+ KexiDBLabel( const TQString& text, TQWidget *tqparent, const char *name = 0, WFlags f = 0 );
virtual ~KexiDBLabel();
- inline QString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
- inline QCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
+ inline TQString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
+ inline TQCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
- virtual QVariant value();
+ virtual TQVariant value();
bool shadowEnabled() const;
- virtual void setInvalidState( const QString& displayText );
+ virtual void setInvalidState( const TQString& displayText );
virtual bool valueIsNull();
@@ -70,7 +71,7 @@ class KEXIFORMUTILS_EXPORT KexiDBLabel : public QLabel, protected KexiDBTextWidg
//! always true
virtual bool isReadOnly() const;
- virtual QWidget* widget();
+ virtual TQWidget* widget();
//! always false
virtual bool cursorAtStart();
@@ -81,29 +82,29 @@ class KEXIFORMUTILS_EXPORT KexiDBLabel : public QLabel, protected KexiDBTextWidg
virtual void clear();
//! used to catch setIndent(), etc.
- virtual bool setProperty ( const char * name, const QVariant & value );
+ virtual bool setProperty ( const char * name, const TQVariant & value );
- virtual const QColor& frameColor() const;
+ virtual const TQColor& frameColor() const;
-// const QColor & paletteForegroundColor() const;
+// const TQColor & paletteForegroundColor() const;
public slots:
//! Sets the datasource to \a ds
- inline void setDataSource( const QString &ds ) { KexiFormDataItemInterface::setDataSource( ds ); }
+ inline void setDataSource( const TQString &ds ) { KexiFormDataItemInterface::setDataSource( ds ); }
- inline void setDataSourceMimeType(const QCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
+ inline void setDataSourceMimeType(const TQCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
- virtual void setText( const QString& text );
+ virtual void setText( const TQString& text );
/*! Enable/Disable the shadow effect.
- KexiDBLabel acts just like a normal QLabel when shadow is disabled. */
+ KexiDBLabel acts just like a normal TQLabel when shadow is disabled. */
void setShadowEnabled( bool state );
- virtual void setPalette( const QPalette &pal );
+ virtual void setPalette( const TQPalette &pal );
- virtual void setFrameColor(const QColor& color);
+ virtual void setFrameColor(const TQColor& color);
-// void setPaletteForegroundColor( const QColor& color );
+// void setPaletteForegroundColor( const TQColor& color );
protected slots:
//! empty
@@ -113,23 +114,23 @@ class KEXIFORMUTILS_EXPORT KexiDBLabel : public QLabel, protected KexiDBTextWidg
protected:
void init();
virtual void setColumnInfo(KexiDB::QueryColumnInfo* cinfo);
- virtual void paintEvent( QPaintEvent* );
- virtual void resizeEvent( QResizeEvent* e );
+ virtual void paintEvent( TQPaintEvent* );
+ virtual void resizeEvent( TQResizeEvent* e );
//! Sets value \a value for a widget.
- virtual void setValueInternal( const QVariant& add, bool removeOld );
+ virtual void setValueInternal( const TQVariant& add, bool removeOld );
- virtual void fontChange( const QFont& font );
- virtual void styleChange( QStyle& style );
+ virtual void fontChange( const TQFont& font );
+ virtual void styleChange( TQStyle& style );
virtual void enabledChange( bool enabled );
- virtual void paletteChange( const QPalette& oldPal );
+ virtual void paletteChange( const TQPalette& oldPal );
virtual void frameChanged();
- virtual void showEvent( QShowEvent* e );
+ virtual void showEvent( TQShowEvent* e );
//! Reimplemented to paint using real frame color instead of froeground.
//! Also allows to paint more types of frame.
- virtual void drawFrame( QPainter * );
+ virtual void drawFrame( TQPainter * );
void updatePixmapLater();
diff --git a/kexi/plugins/forms/widgets/kexidblineedit.cpp b/kexi/plugins/forms/widgets/kexidblineedit.cpp
index 3897a8cb..0b1709e1 100644
--- a/kexi/plugins/forms/widgets/kexidblineedit.cpp
+++ b/kexi/plugins/forms/widgets/kexidblineedit.cpp
@@ -25,8 +25,8 @@
#include <knumvalidator.h>
#include <kdatetbl.h>
-#include <qpopupmenu.h>
-#include <qpainter.h>
+#include <tqpopupmenu.h>
+#include <tqpainter.h>
#include <kexiutils/utils.h>
#include <kexidb/queryschema.h>
@@ -37,37 +37,37 @@
//#define USE_KLineEdit_setReadOnly
//! @internal A validator used for read only flag to disable editing
-class KexiDBLineEdit_ReadOnlyValidator : public QValidator
+class KexiDBLineEdit_ReadOnlyValidator : public TQValidator
{
public:
- KexiDBLineEdit_ReadOnlyValidator( QObject * parent )
- : QValidator(parent)
+ KexiDBLineEdit_ReadOnlyValidator( TQObject * tqparent )
+ : TQValidator(tqparent)
{
}
~KexiDBLineEdit_ReadOnlyValidator() {}
- virtual State validate( QString &, int & ) const { return Invalid; }
+ virtual State validate( TQString &, int & ) const { return Invalid; }
};
//-----
-KexiDBLineEdit::KexiDBLineEdit(QWidget *parent, const char *name)
- : KLineEdit(parent, name)
+KexiDBLineEdit::KexiDBLineEdit(TQWidget *tqparent, const char *name)
+ : KLineEdit(tqparent, name)
, KexiDBTextWidgetInterface()
, KexiFormDataItemInterface()
//moved , m_dateFormatter(0)
//moved , m_timeFormatter(0)
- , m_menuExtender(this, this)
+ , m_menuExtender(TQT_TQOBJECT(this), this)
, m_internalReadOnly(false)
, m_slotTextChanged_enabled(true)
{
#ifdef USE_KLineEdit_setReadOnly
//! @todo reenable as an app aption
- QPalette p(widget->palette());
+ TQPalette p(widget->palette());
p.setColor( lighterGrayBackgroundColor(palette()) );
widget->setPalette(p);
#endif
- connect(this, SIGNAL(textChanged(const QString&)), this, SLOT(slotTextChanged(const QString&)));
+ connect(this, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotTextChanged(const TQString&)));
}
KexiDBLineEdit::~KexiDBLineEdit()
@@ -76,19 +76,19 @@ KexiDBLineEdit::~KexiDBLineEdit()
//moved delete m_timeFormatter;
}
-void KexiDBLineEdit::setInvalidState( const QString& displayText )
+void KexiDBLineEdit::setInvalidState( const TQString& displayText )
{
KLineEdit::setReadOnly(true);
//! @todo move this to KexiDataItemInterface::setInvalidStateInternal() ?
- if (focusPolicy() & TabFocus)
- setFocusPolicy(QWidget::ClickFocus);
+ if (focusPolicy() & TQ_TabFocus)
+ setFocusPolicy(TQ_ClickFocus);
setText(displayText);
}
-void KexiDBLineEdit::setValueInternal(const QVariant& add, bool removeOld)
+void KexiDBLineEdit::setValueInternal(const TQVariant& add, bool removeOld)
{
#if 0 //moved to KexiTextFormatter
- QVariant value;
+ TQVariant value;
if (removeOld)
value = add;
else {
@@ -106,15 +106,15 @@ void KexiDBLineEdit::setValueInternal(const QVariant& add, bool removeOld)
return;
}
else if (t == KexiDB::Field::Date) {
- setText( dateFormatter()->dateToString( value.toString().isEmpty() ? QDate() : value.toDate() ) );
+ setText( dateFormatter()->dateToString( value.toString().isEmpty() ? TQDate() : value.toDate() ) );
setCursorPosition(0); //ok?
return;
}
else if (t == KexiDB::Field::Time) {
setText(
timeFormatter()->timeToString(
- //hack to avoid converting null variant to valid QTime(0,0,0)
- value.toString().isEmpty() ? value.toTime() : QTime(99,0,0)
+ //hack to avoid converting null variant to valid TQTime(0,0,0)
+ value.toString().isEmpty() ? value.toTime() : TQTime(99,0,0)
)
);
setCursorPosition(0); //ok?
@@ -122,7 +122,7 @@ void KexiDBLineEdit::setValueInternal(const QVariant& add, bool removeOld)
}
else if (t == KexiDB::Field::DateTime) {
if (value.toString().isEmpty() ) {
- setText( QString::null );
+ setText( TQString() );
}
else {
setText(
@@ -136,18 +136,18 @@ void KexiDBLineEdit::setValueInternal(const QVariant& add, bool removeOld)
}
#endif
m_slotTextChanged_enabled = false;
- setText( m_textFormatter.valueToText(removeOld ? QVariant() : m_origValue, add.toString()) );
+ setText( m_textFormatter.valueToText(removeOld ? TQVariant() : m_origValue, add.toString()) );
// setText( value.toString() );
setCursorPosition(0); //ok?
m_slotTextChanged_enabled = true;
}
-QVariant KexiDBLineEdit::value()
+TQVariant KexiDBLineEdit::value()
{
return m_textFormatter.textToValue( text() );
#if 0 // moved to KexiTextFormatter
if (! m_columnInfo)
- return QVariant();
+ return TQVariant();
const KexiDB::Field::Type t = m_columnInfo->field->type();
switch (t) {
case KexiDB::Field::Text:
@@ -163,7 +163,7 @@ QVariant KexiDBLineEdit::value()
return text().toLongLong();
case KexiDB::Field::Boolean:
//! @todo temporary solution for booleans!
- return text() == "1" ? QVariant(true,1) : QVariant(false,0);
+ return text() == "1" ? TQVariant(true,1) : TQVariant(false,0);
case KexiDB::Field::Date:
return dateFormatter()->stringToVariant( text() );
case KexiDB::Field::Time:
@@ -175,14 +175,14 @@ QVariant KexiDBLineEdit::value()
case KexiDB::Field::Double:
return text().toDouble();
default:
- return QVariant();
+ return TQVariant();
}
//! @todo more data types!
return text();
#endif
}
-void KexiDBLineEdit::slotTextChanged(const QString&)
+void KexiDBLineEdit::slotTextChanged(const TQString&)
{
if (!m_slotTextChanged_enabled)
return;
@@ -254,7 +254,7 @@ void KexiDBLineEdit::setReadOnly( bool readOnly )
if (m_internalReadOnly) {
m_readWriteValidator = validator();
if (!m_readOnlyValidator)
- m_readOnlyValidator = new KexiDBLineEdit_ReadOnlyValidator(this);
+ m_readOnlyValidator = new KexiDBLineEdit_ReadOnlyValidator(TQT_TQOBJECT(this));
setValidator( m_readOnlyValidator );
}
else {
@@ -265,15 +265,15 @@ void KexiDBLineEdit::setReadOnly( bool readOnly )
#endif
}
-QPopupMenu * KexiDBLineEdit::createPopupMenu()
+TQPopupMenu * KexiDBLineEdit::createPopupMenu()
{
- QPopupMenu *contextMenu = KLineEdit::createPopupMenu();
+ TQPopupMenu *contextMenu = KLineEdit::createPopupMenu();
m_menuExtender.createTitle(contextMenu);
return contextMenu;
}
-QWidget* KexiDBLineEdit::widget()
+TQWidget* KexiDBLineEdit::widget()
{
return this;
}
@@ -303,7 +303,7 @@ void KexiDBLineEdit::setColumnInfo(KexiDB::QueryColumnInfo* cinfo)
if (!cinfo)
return;
-//! @todo handle input mask (via QLineEdit::setInputMask()) using a special KexiDB::FieldInputMask class
+//! @todo handle input tqmask (via TQLineEdit::setInputMask()) using a special KexiDB::FieldInputMask class
setValidator( new KexiDB::FieldValidator(*cinfo->field, this) );
#if 0 // moved to KexiTextFormatter
@@ -321,7 +321,7 @@ void KexiDBLineEdit::setColumnInfo(KexiDB::QueryColumnInfo* cinfo)
dateTimeInputMask( *dateFormatter(), *timeFormatter() ) );
}
#endif
- const QString inputMask( m_textFormatter.inputMask() );
+ const TQString inputMask( m_textFormatter.inputMask() );
if (!inputMask.isEmpty())
setInputMask( inputMask );
@@ -329,26 +329,26 @@ void KexiDBLineEdit::setColumnInfo(KexiDB::QueryColumnInfo* cinfo)
}
/*todo
-void KexiDBLineEdit::paint( QPainter *p )
+void KexiDBLineEdit::paint( TQPainter *p )
{
- KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), alignment(), hasFocus() );
+ KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), tqalignment(), hasFocus() );
}*/
-void KexiDBLineEdit::paintEvent ( QPaintEvent *pe )
+void KexiDBLineEdit::paintEvent ( TQPaintEvent *pe )
{
KLineEdit::paintEvent( pe );
- QPainter p(this);
- KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), alignment(), hasFocus() );
+ TQPainter p(this);
+ KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), tqalignment(), hasFocus() );
}
-bool KexiDBLineEdit::event( QEvent * e )
+bool KexiDBLineEdit::event( TQEvent * e )
{
const bool ret = KLineEdit::event( e );
KexiDBTextWidgetInterface::event(e, this, text().isEmpty());
- if (e->type()==QEvent::FocusOut) {
- QFocusEvent *fe = static_cast<QFocusEvent *>(e);
-// if (fe->reason()!=QFocusEvent::ActiveWindow && fe->reason()!=QFocusEvent::Popup) {
- if (fe->reason()==QFocusEvent::Tab || fe->reason()==QFocusEvent::Backtab) {
+ if (e->type()==TQEvent::FocusOut) {
+ TQFocusEvent *fe = TQT_TQFOCUSEVENT(e);
+// if (fe->reason()!=TQFocusEvent::ActiveWindow && fe->reason()!=TQFocusEvent::Popup) {
+ if (fe->reason()==TQFocusEvent::Tab || fe->reason()==TQFocusEvent::Backtab) {
//display aligned to left after loosing the focus (only if this is tab/backtab event)
//! @todo add option to set cursor at the beginning
setCursorPosition(0); //ok?
@@ -362,7 +362,7 @@ bool KexiDBLineEdit::appendStretchRequired(KexiDBAutoField* autoField) const
return KexiDBAutoField::Top == autoField->labelPosition();
}
-void KexiDBLineEdit::handleAction(const QString& actionName)
+void KexiDBLineEdit::handleAction(const TQString& actionName)
{
if (actionName=="edit_copy") {
copy();
@@ -376,15 +376,15 @@ void KexiDBLineEdit::handleAction(const QString& actionName)
//! @todo ?
}
-void KexiDBLineEdit::setDisplayDefaultValue(QWidget *widget, bool displayDefaultValue)
+void KexiDBLineEdit::setDisplayDefaultValue(TQWidget *widget, bool displayDefaultValue)
{
KexiFormDataItemInterface::setDisplayDefaultValue(widget, displayDefaultValue);
// initialize display parameters for default / entered value
KexiDisplayUtils::DisplayParameters * const params
= displayDefaultValue ? m_displayParametersForDefaultValue : m_displayParametersForEnteredValue;
setFont(params->font);
- QPalette pal(palette());
- pal.setColor(QPalette::Active, QColorGroup::Text, params->textColor);
+ TQPalette pal(palette());
+ pal.setColor(TQPalette::Active, TQColorGroup::Text, params->textColor);
setPalette(pal);
}
@@ -408,7 +408,7 @@ void KexiDBLineEdit::selectAll()
KLineEdit::selectAll();
}
-bool KexiDBLineEdit::keyPressed(QKeyEvent *ke)
+bool KexiDBLineEdit::keyPressed(TQKeyEvent *ke)
{
Q_UNUSED(ke);
return false;
diff --git a/kexi/plugins/forms/widgets/kexidblineedit.h b/kexi/plugins/forms/widgets/kexidblineedit.h
index 5f0262b2..4457a8d0 100644
--- a/kexi/plugins/forms/widgets/kexidblineedit.h
+++ b/kexi/plugins/forms/widgets/kexidblineedit.h
@@ -22,7 +22,7 @@
#define KexiDBLineEdit_H
#include <klineedit.h>
-#include <qvalidator.h>
+#include <tqvalidator.h>
#include "kexiformdataiteminterface.h"
#include "kexidbtextwidgetinterface.h"
@@ -34,11 +34,11 @@ class KexiDBWidgetContextMenuExtender;
/*! @internal Utility: alter background color to be a blended color
of the background and base (usually lighter gray). Used for read-only mode. */
-void setLighterGrayBackgroundColor(QWidget* widget);
+void setLighterGrayBackgroundColor(TQWidget* widget);
//! @short Line edit widget for Kexi forms
/*! Handles many data types. User input is validated by using validators
- and/or input masks.
+ and/or input tqmasks.
*/
class KEXIFORMUTILS_EXPORT KexiDBLineEdit :
public KLineEdit,
@@ -47,18 +47,19 @@ class KEXIFORMUTILS_EXPORT KexiDBLineEdit :
public KexiSubwidgetInterface
{
Q_OBJECT
- Q_PROPERTY(QString dataSource READ dataSource WRITE setDataSource DESIGNABLE true)
- Q_PROPERTY(QCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true)
- Q_OVERRIDE(bool readOnly READ isReadOnly WRITE setReadOnly DESIGNABLE true)
+ TQ_OBJECT
+ TQ_PROPERTY(TQString dataSource READ dataSource WRITE setDataSource DESIGNABLE true)
+ TQ_PROPERTY(TQCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true)
+ TQ_OVERRIDE(bool readOnly READ isReadOnly WRITE setReadOnly DESIGNABLE true)
public:
- KexiDBLineEdit(QWidget *parent, const char *name=0);
+ KexiDBLineEdit(TQWidget *tqparent, const char *name=0);
virtual ~KexiDBLineEdit();
- inline QString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
- inline QCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
- virtual QVariant value();
- virtual void setInvalidState( const QString& displayText );
+ inline TQString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
+ inline TQCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
+ virtual TQVariant value();
+ virtual void setInvalidState( const TQString& displayText );
//! \return true if editor's value is null (not empty)
//! Used for checking if a given constraint within table of form is met.
@@ -80,10 +81,10 @@ class KEXIFORMUTILS_EXPORT KexiDBLineEdit :
is displayed in a special way. Used by KexiFormDataProvider::fillDataItems().
\a widget is equal to 'this'.
Reimplemented after KexiFormDataItemInterface. */
- virtual void setDisplayDefaultValue(QWidget* widget, bool displayDefaultValue);
+ virtual void setDisplayDefaultValue(TQWidget* widget, bool displayDefaultValue);
/*! \return the view widget of this item, e.g. line edit widget. */
- virtual QWidget* widget();
+ virtual TQWidget* widget();
virtual bool cursorAtStart();
virtual bool cursorAtEnd();
@@ -94,14 +95,14 @@ class KEXIFORMUTILS_EXPORT KexiDBLineEdit :
/*! Handles action having standard name \a actionName.
Action could be: "edit_copy", "edit_paste", etc.
Reimplemented after KexiDataItemChangesListener. */
- virtual void handleAction(const QString& actionName);
+ virtual void handleAction(const TQString& actionName);
/*! Called by top-level form on key press event to consume widget-specific shortcuts. */
- virtual bool keyPressed(QKeyEvent *ke);
+ virtual bool keyPressed(TQKeyEvent *ke);
public slots:
- inline void setDataSource(const QString &ds) { KexiFormDataItemInterface::setDataSource(ds); }
- inline void setDataSourceMimeType(const QCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
+ inline void setDataSource(const TQString &ds) { KexiFormDataItemInterface::setDataSource(ds); }
+ inline void setDataSourceMimeType(const TQCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
virtual void setReadOnly( bool readOnly );
//! Reimplemented, so "undo" means the same as "cancelEditor" action
@@ -117,12 +118,12 @@ class KEXIFORMUTILS_EXPORT KexiDBLineEdit :
virtual void selectAll();
protected slots:
- void slotTextChanged(const QString&);
+ void slotTextChanged(const TQString&);
protected:
- virtual void paintEvent ( QPaintEvent * );
- virtual void setValueInternal(const QVariant& add, bool removeOld);
- virtual bool event ( QEvent * );
+ virtual void paintEvent ( TQPaintEvent * );
+ virtual void setValueInternal(const TQVariant& add, bool removeOld);
+ virtual bool event ( TQEvent * );
#if 0
//moved to KexiTextFormatter
@@ -135,7 +136,7 @@ class KEXIFORMUTILS_EXPORT KexiDBLineEdit :
}
#endif
- virtual QPopupMenu * createPopupMenu();
+ virtual TQPopupMenu * createPopupMenu();
//! Implemented for KexiSubwidgetInterface
virtual bool appendStretchRequired(KexiDBAutoField* autoField) const;
@@ -151,10 +152,10 @@ class KEXIFORMUTILS_EXPORT KexiDBLineEdit :
KexiTextFormatter m_textFormatter;
//! Used for read only flag to disable editing
- QGuardedPtr<const QValidator> m_readOnlyValidator;
+ TQGuardedPtr<const TQValidator> m_readOnlyValidator;
//! Used to remember the previous validator used forf r/w mode, after setting the read only flag
- QGuardedPtr<const QValidator> m_readWriteValidator;
+ TQGuardedPtr<const TQValidator> m_readWriteValidator;
//! Used for extending context menu
KexiDBWidgetContextMenuExtender m_menuExtender;
diff --git a/kexi/plugins/forms/widgets/kexidbsubform.cpp b/kexi/plugins/forms/widgets/kexidbsubform.cpp
index 8d1971a9..8cb4f795 100644
--- a/kexi/plugins/forms/widgets/kexidbsubform.cpp
+++ b/kexi/plugins/forms/widgets/kexidbsubform.cpp
@@ -29,38 +29,38 @@
#include <formeditor/container.h>
#include <formeditor/formmanager.h>
-KexiDBSubForm::KexiDBSubForm(KFormDesigner::Form *parentForm, QWidget *parent, const char *name)
-: QScrollView(parent, name), m_parentForm(parentForm), m_form(0), m_widget(0)
+KexiDBSubForm::KexiDBSubForm(KFormDesigner::Form *tqparentForm, TQWidget *tqparent, const char *name)
+: TQScrollView(tqparent, name), m_parentForm(tqparentForm), m_form(0), m_widget(0)
{
- setFrameStyle(QFrame::WinPanel | QFrame::Sunken);
- viewport()->setPaletteBackgroundColor(colorGroup().mid());
+ setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken);
+ viewport()->setPaletteBackgroundColor(tqcolorGroup().mid());
}
/*
void
-KexiDBSubForm::paintEvent(QPaintEvent *ev)
+KexiDBSubForm::paintEvent(TQPaintEvent *ev)
{
- QScrollView::paintEvent(ev);
- QPainter p;
+ TQScrollView::paintEvent(ev);
+ TQPainter p;
setWFlags(WPaintUnclipped);
- QString txt("Subform");
- QFont f = font();
+ TQString txt("Subform");
+ TQFont f = font();
f.setPointSize(f.pointSize() * 3);
- QFontMetrics fm(f);
+ TQFontMetrics fm(f);
const int txtw = fm.width(txt), txth = fm.height();
p.begin(this, true);
p.setPen(black);
p.setFont(f);
- p.drawText(width()/2, height()/2, txt, Qt::AlignCenter|Qt::AlignVCenter);
+ p.drawText(width()/2, height()/2, txt, TQt::AlignCenter|TQt::AlignVCenter);
p.end();
clearWFlags( WPaintUnclipped );
}
*/
void
-KexiDBSubForm::setFormName(const QString &name)
+KexiDBSubForm::setFormName(const TQString &name)
{
if(m_formName==name)
return;
@@ -74,12 +74,12 @@ KexiDBSubForm::setFormName(const QString &name)
return;
}
- QWidget *pw = parentWidget();
+ TQWidget *pw = tqparentWidget();
KexiFormView *view = 0;
- QStringList list;
+ TQStringList list;
while(pw) {
if(pw->isA("KexiDBSubForm")) {
- if(list.contains(pw->name())) {
+ if(list.tqcontains(pw->name())) {
//! @todo error message
return; // Be sure to don't run into a endless-loop cause of recursive subforms.
}
@@ -87,18 +87,18 @@ KexiDBSubForm::setFormName(const QString &name)
}
else if(! view && pw->isA("KexiFormView"))
view = static_cast<KexiFormView*>(pw); // we need a KexiFormView*
- pw = pw->parentWidget();
+ pw = pw->tqparentWidget();
}
- if (!view || !view->parentDialog() || !view->parentDialog()->mainWin()
- || !view->parentDialog()->mainWin()->project()->dbConnection())
+ if (!view || !view->tqparentDialog() || !view->tqparentDialog()->mainWin()
+ || !view->tqparentDialog()->mainWin()->project()->dbConnection())
return;
- KexiDB::Connection *conn = view->parentDialog()->mainWin()->project()->dbConnection();
+ KexiDB::Connection *conn = view->tqparentDialog()->mainWin()->project()->dbConnection();
// we check if there is a form with this name
int id = KexiDB::idForObjectName(*conn, name, KexiPart::FormObjectType);
- if((id == 0) || (id == view->parentDialog()->id())) // == our form
+ if((id == 0) || (id == view->tqparentDialog()->id())) // == our form
return; // because of recursion when loading
// we create the container widget
@@ -110,22 +110,22 @@ KexiDBSubForm::setFormName(const QString &name)
m_form->createToplevel(m_widget);
// and load the sub form
- QString data;
- tristate res = conn->loadDataBlock(id, data, QString::null);
+ TQString data;
+ tristate res = conn->loadDataBlock(id, data, TQString());
if (res == true)
res = KFormDesigner::FormIO::loadFormFromString(m_form, m_widget, data);
if(res != true) {
delete m_widget;
m_widget = 0;
updateScrollBars();
- m_formName = QString::null;
+ m_formName = TQString();
return;
}
m_form->setDesignMode(false);
// Install event filters on the whole newly created form
- KFormDesigner::ObjectTreeItem *tree = m_parentForm->objectTree()->lookup(QObject::name());
- KFormDesigner::installRecursiveEventFilter(this, tree->eventEater());
+ KFormDesigner::ObjectTreeItem *tree = m_parentForm->objectTree()->lookup(TQT_TQOBJECT(this)->name());
+ KFormDesigner::installRecursiveEventFilter(TQT_TQOBJECT(this), tree->eventEater());
}
#include "kexidbsubform.moc"
diff --git a/kexi/plugins/forms/widgets/kexidbsubform.h b/kexi/plugins/forms/widgets/kexidbsubform.h
index 5b73f860..ea2bdbd3 100644
--- a/kexi/plugins/forms/widgets/kexidbsubform.h
+++ b/kexi/plugins/forms/widgets/kexidbsubform.h
@@ -21,32 +21,33 @@
#ifndef KexiDBSubForm_H
#define KexiDBSubForm_H
-#include <qscrollview.h>
+#include <tqscrollview.h>
#include <formeditor/form.h>
//! @short A form embedded as a widget inside other form
-class KEXIFORMUTILS_EXPORT KexiDBSubForm : public QScrollView
+class KEXIFORMUTILS_EXPORT KexiDBSubForm : public TQScrollView
{
Q_OBJECT
- Q_PROPERTY(QString formName READ formName WRITE setFormName DESIGNABLE true)
+ TQ_OBJECT
+ TQ_PROPERTY(TQString formName READ formName WRITE setFormName DESIGNABLE true)
public:
- KexiDBSubForm(KFormDesigner::Form *parentForm, QWidget *parent, const char *name);
+ KexiDBSubForm(KFormDesigner::Form *tqparentForm, TQWidget *tqparent, const char *name);
~KexiDBSubForm() {}
//! \return the name of the subform to display inside this widget
- QString formName() const { return m_formName; }
+ TQString formName() const { return m_formName; }
//! Sets the name of the subform to display inside this widget
- void setFormName(const QString &name);
+ void setFormName(const TQString &name);
- //void paintEvent(QPaintEvent *ev);
+ //void paintEvent(TQPaintEvent *ev);
private:
KFormDesigner::Form *m_parentForm;
KFormDesigner::Form *m_form;
- QWidget *m_widget;
- QString m_formName;
+ TQWidget *m_widget;
+ TQString m_formName;
};
#endif
diff --git a/kexi/plugins/forms/widgets/kexidbtextedit.cpp b/kexi/plugins/forms/widgets/kexidbtextedit.cpp
index 8541fc01..6f6aa89d 100644
--- a/kexi/plugins/forms/widgets/kexidbtextedit.cpp
+++ b/kexi/plugins/forms/widgets/kexidbtextedit.cpp
@@ -26,16 +26,16 @@
#include <kstdaccel.h>
#include <kdebug.h>
-#include <qpainter.h>
+#include <tqpainter.h>
-KexiDBTextEdit::KexiDBTextEdit(QWidget *parent, const char *name)
- : KTextEdit(parent, name)
+KexiDBTextEdit::KexiDBTextEdit(TQWidget *tqparent, const char *name)
+ : KTextEdit(tqparent, name)
, KexiDBTextWidgetInterface()
, KexiFormDataItemInterface()
- , m_menuExtender(this, this)
+ , m_menuExtender(TQT_TQOBJECT(this), this)
, m_slotTextChanged_enabled(true)
{
- connect(this, SIGNAL(textChanged()), this, SLOT(slotTextChanged()));
+ connect(this, TQT_SIGNAL(textChanged()), this, TQT_SLOT(slotTextChanged()));
installEventFilter(this);
}
@@ -43,16 +43,16 @@ KexiDBTextEdit::~KexiDBTextEdit()
{
}
-void KexiDBTextEdit::setInvalidState( const QString& displayText )
+void KexiDBTextEdit::setInvalidState( const TQString& displayText )
{
setReadOnly(true);
//! @todo move this to KexiDataItemInterface::setInvalidStateInternal() ?
- if (focusPolicy() & TabFocus)
- setFocusPolicy(QWidget::ClickFocus);
+ if (focusPolicy() & TQ_TabFocus)
+ setFocusPolicy(TQ_ClickFocus);
KTextEdit::setText(displayText);
}
-void KexiDBTextEdit::setValueInternal(const QVariant& add, bool removeOld)
+void KexiDBTextEdit::setValueInternal(const TQVariant& add, bool removeOld)
{
if (m_columnInfo && m_columnInfo->field->type()==KexiDB::Field::Boolean) {
//! @todo temporary solution for booleans!
@@ -66,7 +66,7 @@ void KexiDBTextEdit::setValueInternal(const QVariant& add, bool removeOld)
}
}
-QVariant KexiDBTextEdit::value()
+TQVariant KexiDBTextEdit::value()
{
return text();
}
@@ -96,20 +96,20 @@ bool KexiDBTextEdit::isReadOnly() const
void KexiDBTextEdit::setReadOnly( bool readOnly )
{
KTextEdit::setReadOnly( readOnly );
- QPalette p = palette();
- QColor c(readOnly ? lighterGrayBackgroundColor(kapp->palette()) : p.color(QPalette::Normal, QColorGroup::Base));
+ TQPalette p = palette();
+ TQColor c(readOnly ? lighterGrayBackgroundColor(kapp->palette()) : p.color(TQPalette::Normal, TQColorGroup::Base));
setPaper( c );
- p.setColor(QColorGroup::Base, c);
- p.setColor(QColorGroup::Background, c);
+ p.setColor(TQColorGroup::Base, c);
+ p.setColor(TQColorGroup::Background, c);
setPalette( p );
}
-void KexiDBTextEdit::setText( const QString & text, const QString & context )
+void KexiDBTextEdit::setText( const TQString & text, const TQString & context )
{
KTextEdit::setText(text, context);
}
-QWidget* KexiDBTextEdit::widget()
+TQWidget* KexiDBTextEdit::widget()
{
return this;
}
@@ -130,7 +130,7 @@ bool KexiDBTextEdit::cursorAtEnd()
void KexiDBTextEdit::clear()
{
- setText(QString::null, QString::null);
+ setText(TQString(), TQString());
}
void KexiDBTextEdit::setColumnInfo(KexiDB::QueryColumnInfo* cinfo)
@@ -141,16 +141,16 @@ void KexiDBTextEdit::setColumnInfo(KexiDB::QueryColumnInfo* cinfo)
KexiDBTextWidgetInterface::setColumnInfo(m_columnInfo, this);
}
-void KexiDBTextEdit::paintEvent ( QPaintEvent *pe )
+void KexiDBTextEdit::paintEvent ( TQPaintEvent *pe )
{
KTextEdit::paintEvent( pe );
- QPainter p(this);
- KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), alignment(), hasFocus() );
+ TQPainter p(this);
+ KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), tqalignment(), hasFocus() );
}
-QPopupMenu * KexiDBTextEdit::createPopupMenu(const QPoint & pos)
+TQPopupMenu * KexiDBTextEdit::createPopupMenu(const TQPoint & pos)
{
- QPopupMenu *contextMenu = KTextEdit::createPopupMenu(pos);
+ TQPopupMenu *contextMenu = KTextEdit::createPopupMenu(pos);
m_menuExtender.createTitle(contextMenu);
return contextMenu;
}
@@ -160,21 +160,21 @@ void KexiDBTextEdit::undo()
cancelEditor();
}
-void KexiDBTextEdit::setDisplayDefaultValue(QWidget* widget, bool displayDefaultValue)
+void KexiDBTextEdit::setDisplayDefaultValue(TQWidget* widget, bool displayDefaultValue)
{
KexiFormDataItemInterface::setDisplayDefaultValue(widget, displayDefaultValue);
// initialize display parameters for default / entered value
KexiDisplayUtils::DisplayParameters * const params
= displayDefaultValue ? m_displayParametersForDefaultValue : m_displayParametersForEnteredValue;
- QPalette pal(palette());
- pal.setColor(QPalette::Active, QColorGroup::Text, params->textColor);
+ TQPalette pal(palette());
+ pal.setColor(TQPalette::Active, TQColorGroup::Text, params->textColor);
setPalette(pal);
setFont(params->font);
//! @todo support rich text...
/* m_slotTextChanged_enabled = false;
//for rich text...
- const QString origText( text() );
- KTextEdit::setText(QString::null);
+ const TQString origText( text() );
+ KTextEdit::setText(TQString());
setCurrentFont(params->font);
setColor(params->textColor);
KTextEdit::setText(origText);
@@ -196,7 +196,7 @@ void KexiDBTextEdit::selectAll()
KTextEdit::selectAll();
}
-void KexiDBTextEdit::keyPressEvent( QKeyEvent *ke )
+void KexiDBTextEdit::keyPressEvent( TQKeyEvent *ke )
{
// for instance, Windows uses Ctrl+Tab for moving between tabs, so do not steal this shortcut
if (KStdAccel::tabNext().contains( KKey(ke) ) || KStdAccel::tabPrev().contains( KKey(ke) )) {
diff --git a/kexi/plugins/forms/widgets/kexidbtextedit.h b/kexi/plugins/forms/widgets/kexidbtextedit.h
index a380b070..c6f64136 100644
--- a/kexi/plugins/forms/widgets/kexidbtextedit.h
+++ b/kexi/plugins/forms/widgets/kexidbtextedit.h
@@ -33,17 +33,18 @@ class KEXIFORMUTILS_EXPORT KexiDBTextEdit :
public KexiFormDataItemInterface
{
Q_OBJECT
- Q_PROPERTY(QString dataSource READ dataSource WRITE setDataSource DESIGNABLE true)
- Q_PROPERTY(QCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true)
+ TQ_OBJECT
+ TQ_PROPERTY(TQString dataSource READ dataSource WRITE setDataSource DESIGNABLE true)
+ TQ_PROPERTY(TQCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true)
public:
- KexiDBTextEdit(QWidget *parent, const char *name=0);
+ KexiDBTextEdit(TQWidget *tqparent, const char *name=0);
virtual ~KexiDBTextEdit();
- inline QString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
- inline QCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
- virtual QVariant value();
- virtual void setInvalidState( const QString& displayText );
+ inline TQString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
+ inline TQCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
+ virtual TQVariant value();
+ virtual void setInvalidState( const TQString& displayText );
//! \return true if editor's value is null (not empty)
//! Used for checking if a given constraint within table of form is met.
@@ -59,7 +60,7 @@ class KEXIFORMUTILS_EXPORT KexiDBTextEdit :
virtual bool isReadOnly() const;
/*! \return the view widget of this item, e.g. line edit widget. */
- virtual QWidget* widget();
+ virtual TQWidget* widget();
virtual bool cursorAtStart();
virtual bool cursorAtEnd();
@@ -71,16 +72,16 @@ class KEXIFORMUTILS_EXPORT KexiDBTextEdit :
is displayed in a special way. Used by KexiFormDataProvider::fillDataItems().
\a widget is equal to 'this'.
Reimplemented after KexiFormDataItemInterface. */
- virtual void setDisplayDefaultValue(QWidget* widget, bool displayDefaultValue);
+ virtual void setDisplayDefaultValue(TQWidget* widget, bool displayDefaultValue);
//! Windows uses Ctrl+Tab for moving between tabs, so do not steal this shortcut
- virtual void keyPressEvent( QKeyEvent *ke );
+ virtual void keyPressEvent( TQKeyEvent *ke );
public slots:
- inline void setDataSource(const QString &ds) { KexiFormDataItemInterface::setDataSource(ds); }
- inline void setDataSourceMimeType(const QCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
+ inline void setDataSource(const TQString &ds) { KexiFormDataItemInterface::setDataSource(ds); }
+ inline void setDataSourceMimeType(const TQCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
virtual void setReadOnly( bool readOnly );
- virtual void setText( const QString & text, const QString & context );
+ virtual void setText( const TQString & text, const TQString & context );
//! Reimplemented, so "undo" means the same as "cancelEditor" action
//! @todo enable "real" undo internally so user can use ctrl+z while editing
@@ -99,9 +100,9 @@ class KEXIFORMUTILS_EXPORT KexiDBTextEdit :
void slotTextChanged();
protected:
- virtual void paintEvent ( QPaintEvent * );
- virtual void setValueInternal(const QVariant& add, bool removeOld);
- QPopupMenu * createPopupMenu(const QPoint & pos);
+ virtual void paintEvent ( TQPaintEvent * );
+ virtual void setValueInternal(const TQVariant& add, bool removeOld);
+ TQPopupMenu * createPopupMenu(const TQPoint & pos);
//! Used for extending context menu
KexiDBWidgetContextMenuExtender m_menuExtender;
diff --git a/kexi/plugins/forms/widgets/kexidbtimeedit.cpp b/kexi/plugins/forms/widgets/kexidbtimeedit.cpp
index 82e61b83..f2546a44 100644
--- a/kexi/plugins/forms/widgets/kexidbtimeedit.cpp
+++ b/kexi/plugins/forms/widgets/kexidbtimeedit.cpp
@@ -20,43 +20,43 @@
#include "kexidbtimeedit.h"
-#include <qtoolbutton.h>
-#include <qlayout.h>
-#include <qpainter.h>
+#include <tqtoolbutton.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
#include <kpopupmenu.h>
#include <kdatepicker.h>
#include <kdatetbl.h>
#include <kexiutils/utils.h>
-KexiDBTimeEdit::KexiDBTimeEdit(const QTime &time, QWidget *parent, const char *name)
- : QTimeEdit(time, parent, name), KexiFormDataItemInterface()
+KexiDBTimeEdit::KexiDBTimeEdit(const TQTime &time, TQWidget *tqparent, const char *name)
+ : TQTimeEdit(time, tqparent, name), KexiFormDataItemInterface()
{
m_invalidState = false;
setAutoAdvance(true);
m_cleared = false;
-#ifdef QDateTimeEditor_HACK
- m_dte_time = KexiUtils::findFirstChild<QDateTimeEditor>(this, "QDateTimeEditor");
+#ifdef TQDateTimeEditor_HACK
+ m_dte_time = KexiUtils::findFirstChild<TQDateTimeEditor>(this, "TQDateTimeEditor");
#else
m_dte_time = 0;
#endif
- connect(this, SIGNAL(valueChanged(const QTime&)), this, SLOT(slotValueChanged(const QTime&)));
+ connect(this, TQT_SIGNAL(valueChanged(const TQTime&)), this, TQT_SLOT(slotValueChanged(const TQTime&)));
}
KexiDBTimeEdit::~KexiDBTimeEdit()
{
}
-void KexiDBTimeEdit::setInvalidState( const QString&)
+void KexiDBTimeEdit::setInvalidState( const TQString&)
{
setEnabled(false);
setReadOnly(true);
m_invalidState = true;
//! @todo move this to KexiDataItemInterface::setInvalidStateInternal() ?
if (focusPolicy() & TabFocus)
- setFocusPolicy(QWidget::ClickFocus);
+ setFocusPolicy(TQ_ClickFocus);
}
void
@@ -65,20 +65,20 @@ KexiDBTimeEdit::setEnabled(bool enabled)
// prevent the user from reenabling the widget when it is in invalid state
if(enabled && m_invalidState)
return;
- QTimeEdit::setEnabled(enabled);
+ TQTimeEdit::setEnabled(enabled);
}
-void KexiDBTimeEdit::setValueInternal(const QVariant &add, bool removeOld)
+void KexiDBTimeEdit::setValueInternal(const TQVariant &add, bool removeOld)
{
m_cleared = !m_origValue.isValid();
int setNumberOnFocus = -1;
- QTime t;
- QString addString(add.toString());
+ TQTime t;
+ TQString addString(add.toString());
if (removeOld) {
if (!addString.isEmpty() && addString[0].latin1()>='0' && addString[0].latin1() <='9') {
setNumberOnFocus = addString[0].latin1()-'0';
- t = QTime(setNumberOnFocus, 0, 0);
+ t = TQTime(setNumberOnFocus, 0, 0);
}
}
else
@@ -87,11 +87,11 @@ void KexiDBTimeEdit::setValueInternal(const QVariant &add, bool removeOld)
setTime(t);
}
-QVariant
+TQVariant
KexiDBTimeEdit::value()
{
- //QDateTime - a hack needed because QVariant(QTime) has broken isNull()
- return QVariant(QDateTime( m_cleared ? QDate() : QDate(0,1,2)/*nevermind*/, time()));
+ //TQDateTime - a hack needed because TQVariant(TQTime) has broken isNull()
+ return TQVariant(TQDateTime( m_cleared ? TQDate() : TQDate(0,1,2)/*nevermind*/, time()));
}
bool KexiDBTimeEdit::valueIsNull()
@@ -116,7 +116,7 @@ void KexiDBTimeEdit::setReadOnly(bool set)
m_readOnly = set;
}
-QWidget*
+TQWidget*
KexiDBTimeEdit::widget()
{
return this;
@@ -124,7 +124,7 @@ KexiDBTimeEdit::widget()
bool KexiDBTimeEdit::cursorAtStart()
{
-#ifdef QDateTimeEditor_HACK
+#ifdef TQDateTimeEditor_HACK
return m_dte_time && hasFocus() && m_dte_time->focusSection()==0;
#else
return false;
@@ -133,7 +133,7 @@ bool KexiDBTimeEdit::cursorAtStart()
bool KexiDBTimeEdit::cursorAtEnd()
{
-#ifdef QDateTimeEditor_HACK
+#ifdef TQDateTimeEditor_HACK
return m_dte_time && hasFocus()
&& m_dte_time->focusSection()==int(m_dte_time->sectionCount()-1);
#else
@@ -143,12 +143,12 @@ bool KexiDBTimeEdit::cursorAtEnd()
void KexiDBTimeEdit::clear()
{
- setTime(QTime());
+ setTime(TQTime());
m_cleared = true;
}
void
-KexiDBTimeEdit::slotValueChanged(const QTime&)
+KexiDBTimeEdit::slotValueChanged(const TQTime&)
{
m_cleared = false;
}
diff --git a/kexi/plugins/forms/widgets/kexidbtimeedit.h b/kexi/plugins/forms/widgets/kexidbtimeedit.h
index 9665b1f9..6b29a7ac 100644
--- a/kexi/plugins/forms/widgets/kexidbtimeedit.h
+++ b/kexi/plugins/forms/widgets/kexidbtimeedit.h
@@ -23,26 +23,27 @@
#include "kexiformdataiteminterface.h"
#include "kexidbtextwidgetinterface.h"
-#include <qdatetimeedit.h>
+#include <tqdatetimeedit.h>
-class QDateTimeEditor;
+class TQDateTimeEditor;
//! @short A db-aware time editor
-class KEXIFORMUTILS_EXPORT KexiDBTimeEdit : public QTimeEdit, public KexiFormDataItemInterface
+class KEXIFORMUTILS_EXPORT KexiDBTimeEdit : public TQTimeEdit, public KexiFormDataItemInterface
{
Q_OBJECT
- Q_PROPERTY(QString dataSource READ dataSource WRITE setDataSource DESIGNABLE true)
- Q_PROPERTY(QCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true)
- Q_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly DESIGNABLE true )
+ TQ_OBJECT
+ TQ_PROPERTY(TQString dataSource READ dataSource WRITE setDataSource DESIGNABLE true)
+ TQ_PROPERTY(TQCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true)
+ TQ_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly DESIGNABLE true )
public:
- KexiDBTimeEdit(const QTime &time, QWidget *parent, const char *name=0);
+ KexiDBTimeEdit(const TQTime &time, TQWidget *tqparent, const char *name=0);
virtual ~KexiDBTimeEdit();
- inline QString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
- inline QCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
- virtual QVariant value();
- virtual void setInvalidState( const QString& displayText );
+ inline TQString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
+ inline TQCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
+ virtual TQVariant value();
+ virtual void setInvalidState( const TQString& displayText );
//! \return true if editor's value is null (not empty)
//! Used for checking if a given constraint within table of form is met.
@@ -58,7 +59,7 @@ class KEXIFORMUTILS_EXPORT KexiDBTimeEdit : public QTimeEdit, public KexiFormDat
virtual bool isReadOnly() const;
/*! \return the view widget of this item, e.g. line edit widget. */
- virtual QWidget* widget();
+ virtual TQWidget* widget();
virtual bool cursorAtStart();
virtual bool cursorAtEnd();
@@ -67,18 +68,18 @@ class KEXIFORMUTILS_EXPORT KexiDBTimeEdit : public QTimeEdit, public KexiFormDat
virtual void setEnabled(bool enabled);
public slots:
- inline void setDataSource(const QString &ds) { KexiFormDataItemInterface::setDataSource(ds); }
- inline void setDataSourceMimeType(const QCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
+ inline void setDataSource(const TQString &ds) { KexiFormDataItemInterface::setDataSource(ds); }
+ inline void setDataSourceMimeType(const TQCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
virtual void setReadOnly(bool set);
protected slots:
- void slotValueChanged(const QTime&);
+ void slotValueChanged(const TQTime&);
protected:
- virtual void setValueInternal(const QVariant& add, bool removeOld);
+ virtual void setValueInternal(const TQVariant& add, bool removeOld);
private:
- QDateTimeEditor* m_dte_time;
+ TQDateTimeEditor* m_dte_time;
bool m_invalidState : 1;
bool m_cleared : 1;
bool m_readOnly : 1;
diff --git a/kexi/plugins/forms/widgets/kexidbutils.cpp b/kexi/plugins/forms/widgets/kexidbutils.cpp
index 0c08d64c..ba9f2aec 100644
--- a/kexi/plugins/forms/widgets/kexidbutils.cpp
+++ b/kexi/plugins/forms/widgets/kexidbutils.cpp
@@ -30,15 +30,15 @@
#include <widget/utils/kexicontextmenuutils.h>
-QColor lighterGrayBackgroundColor(const QPalette& palette)
+TQColor lighterGrayBackgroundColor(const TQPalette& palette)
{
return KexiUtils::blendedColors(palette.active().background(), palette.active().base(), 1, 2);
}
//-------
-KexiDBWidgetContextMenuExtender::KexiDBWidgetContextMenuExtender( QObject* parent, KexiDataItemInterface* iface )
- : QObject(parent)
+KexiDBWidgetContextMenuExtender::KexiDBWidgetContextMenuExtender( TQObject* tqparent, KexiDataItemInterface* iface )
+ : TQObject(tqparent)
, m_iface(iface)
, m_contextMenuHasTitle(false)
{
@@ -48,7 +48,7 @@ KexiDBWidgetContextMenuExtender::~KexiDBWidgetContextMenuExtender()
{
}
-void KexiDBWidgetContextMenuExtender::createTitle(QPopupMenu *menu)
+void KexiDBWidgetContextMenuExtender::createTitle(TQPopupMenu *menu)
{
if (!menu)
return;
@@ -56,9 +56,9 @@ void KexiDBWidgetContextMenuExtender::createTitle(QPopupMenu *menu)
KPopupTitle *titleItem = new KPopupTitle();
const int id = m_contextMenu->insertItem(titleItem, -1, 0);
m_contextMenu->setItemEnabled(id, false);
- QString icon;
- if (dynamic_cast<QWidget*>(m_iface))
- icon = KexiFormPart::library()->iconName(dynamic_cast<QWidget*>(m_iface)->className());
+ TQString icon;
+ if (dynamic_cast<TQWidget*>(m_iface))
+ icon = KexiFormPart::library()->iconName(dynamic_cast<TQWidget*>(m_iface)->className());
m_contextMenuHasTitle = m_iface->columnInfo() ?
KexiContextMenuUtils::updateTitle(m_contextMenu,
diff --git a/kexi/plugins/forms/widgets/kexidbutils.h b/kexi/plugins/forms/widgets/kexidbutils.h
index 386f1ee5..06f49406 100644
--- a/kexi/plugins/forms/widgets/kexidbutils.h
+++ b/kexi/plugins/forms/widgets/kexidbutils.h
@@ -20,36 +20,36 @@
#ifndef KDBWIDGETS_UTILS_H
#define KDBWIDGETS_UTILS_H
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include <kexidataiteminterface.h>
-QColor lighterGrayBackgroundColor(const QPalette& palette);
+TQColor lighterGrayBackgroundColor(const TQPalette& palette);
//! @short Used for extending editor widgets' context menu.
/*! @internal This is performed by adding a title and disabling editing
actions when "read only" flag is true. */
-class KexiDBWidgetContextMenuExtender : public QObject
+class KexiDBWidgetContextMenuExtender : public TQObject
{
public:
- KexiDBWidgetContextMenuExtender( QObject* parent, KexiDataItemInterface* iface );
+ KexiDBWidgetContextMenuExtender( TQObject* tqparent, KexiDataItemInterface* iface );
~KexiDBWidgetContextMenuExtender();
//! Creates title for context menu \a menu
- void createTitle(QPopupMenu *menu);
+ void createTitle(TQPopupMenu *menu);
//! Enables or disables context menu actions that can modify the value.
//! The menu has to be previously provided by createTitle().
void updatePopupMenuActions();
/*! Updates title for context menu based on data item \a iface caption or name
- Used in createTitle(QPopupMenu *menu) and KexiDBImageBox.
+ Used in createTitle(TQPopupMenu *menu) and KexiDBImageBox.
\return true is the title has been added. */
- static bool updateContextMenuTitleForDataItem(QPopupMenu *menu, KexiDataItemInterface* iface,
- const QString& icon = QString::null);
+ static bool updateContextMenuTitleForDataItem(TQPopupMenu *menu, KexiDataItemInterface* iface,
+ const TQString& icon = TQString());
protected:
KexiDataItemInterface* m_iface;
- QGuardedPtr<QPopupMenu> m_contextMenu;
+ TQGuardedPtr<TQPopupMenu> m_contextMenu;
bool m_contextMenuHasTitle; //!< true if KPopupTitle has been added to the context menu.
};
diff --git a/kexi/plugins/forms/widgets/kexiframe.cpp b/kexi/plugins/forms/widgets/kexiframe.cpp
index b49386da..b33581d7 100644
--- a/kexi/plugins/forms/widgets/kexiframe.cpp
+++ b/kexi/plugins/forms/widgets/kexiframe.cpp
@@ -19,8 +19,8 @@
#include "kexiframe.h"
-#include <qpainter.h>
-#include <qdrawutil.h>
+#include <tqpainter.h>
+#include <tqdrawutil.h>
#include <kexiutils/utils.h>
//! @internal
@@ -33,7 +33,7 @@ class KexiFrame::Private
~Private()
{
}
- QColor frameColor;
+ TQColor frameColor;
#if 0
//todo
KexiFrame::Shape frameShape;
@@ -43,15 +43,15 @@ class KexiFrame::Private
//=========================================================
-KexiFrame::KexiFrame( QWidget * parent, const char * name, WFlags f )
- : QFrame(parent, name, f)
+KexiFrame::KexiFrame( TQWidget * tqparent, const char * name, WFlags f )
+ : TQFrame(tqparent, name, f)
, d( new Private() )
{
//defaults
- d->frameColor = palette().active().foreground();
+ d->frameColor = tqpalette().active().foreground();
//! @todo obtain these defaults from current template's style...
setLineWidth(2);
- setFrameStyle(QFrame::StyledPanel|QFrame::Raised);
+ setFrameStyle(TQFrame::StyledPanel|TQFrame::Raised);
}
KexiFrame::~KexiFrame()
@@ -59,19 +59,19 @@ KexiFrame::~KexiFrame()
delete d;
}
-void KexiFrame::dragMoveEvent( QDragMoveEvent *e )
+void KexiFrame::dragMoveEvent( TQDragMoveEvent *e )
{
- QFrame::dragMoveEvent(e);
+ TQFrame::dragMoveEvent(e);
emit handleDragMoveEvent(e);
}
-void KexiFrame::dropEvent( QDropEvent *e )
+void KexiFrame::dropEvent( TQDropEvent *e )
{
- QFrame::dropEvent(e);
+ TQFrame::dropEvent(e);
emit handleDropEvent(e);
}
#define ClassName KexiFrame
-#define SuperClassName QFrame
+#define SuperClassName TQFrame
#include "kexiframeutils_p.cpp"
#include "kexiframe.moc"
diff --git a/kexi/plugins/forms/widgets/kexiframe.h b/kexi/plugins/forms/widgets/kexiframe.h
index 8d60d597..d960cefd 100644
--- a/kexi/plugins/forms/widgets/kexiframe.h
+++ b/kexi/plugins/forms/widgets/kexiframe.h
@@ -20,62 +20,63 @@
#ifndef KexiFrame_H
#define KexiFrame_H
-#include <qframe.h>
+#include <tqframe.h>
//! @short Frame widget for Kexi forms
-class KEXIFORMUTILS_EXPORT KexiFrame : public QFrame
+class KEXIFORMUTILS_EXPORT KexiFrame : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
//todo Q_ENUMS( Shape Shadow )
- Q_PROPERTY( QColor frameColor READ frameColor WRITE setFrameColor DESIGNABLE true )
-//todo Q_OVERRIDE( Shape frameShape READ frameShape WRITE setFrameShape )
-//todo Q_OVERRIDE( Shadow frameShadow READ frameShadow WRITE setFrameShadow )
+ TQ_PROPERTY( TQColor frameColor READ frameColor WRITE setFrameColor DESIGNABLE true )
+//todo TQ_OVERRIDE( Shape frameShape READ frameShape WRITE setFrameShape )
+//todo TQ_OVERRIDE( Shadow frameShadow READ frameShadow WRITE setFrameShadow )
public:
- KexiFrame( QWidget * parent, const char * name = 0, WFlags f = 0 );
+ KexiFrame( TQWidget * tqparent, const char * name = 0, WFlags f = 0 );
virtual ~KexiFrame();
- virtual const QColor& frameColor() const;
+ virtual const TQColor& frameColor() const;
#if 0
//! @todo more options
enum Shadow {
- NoShadow = QFrame::Plain,
- Raised = QFrame::Raised,
- Sunken = QFrame::Sunken
+ NoShadow = TQFrame::Plain,
+ Raised = TQFrame::Raised,
+ Sunken = TQFrame::Sunken
};
//! @todo more options
- enum Shape { NoFrame = QFrame::NoFrame, //!< no frame
- Box = QFrame::Box, //!< rectangular box
- Panel = QFrame::Panel, //!< rectangular panel
- StyledPanel = QFrame::StyledPanel, //!< rectangular panel depending on the GUI style
- GroupBoxPanel = QFrame::GroupBoxPanel //!< rectangular group-box-like panel depending on the GUI style
+ enum Shape { NoFrame = TQFrame::NoFrame, //!< no frame
+ Box = TQFrame::Box, //!< rectangular box
+ Panel = TQFrame::Panel, //!< rectangular panel
+ StyledPanel = TQFrame::StyledPanel, //!< rectangular panel depending on the GUI style
+ GroupBoxPanel = TQFrame::GroupBoxPanel //!< rectangular group-box-like panel depending on the GUI style
};
Shape frameShape() const;
- void setFrameShape( KexiFrame::Shape shape );
+ void setFrameShape( KexiFrame::Shape tqshape );
Shadow frameShadow() const;
void setFrameShadow( KexiFrame::Shadow shadow );
#endif
//! Used to emit handleDragMoveEvent() signal needed to control dragging over the container's surface
- virtual void dragMoveEvent( QDragMoveEvent *e );
+ virtual void dragMoveEvent( TQDragMoveEvent *e );
//! Used to emit handleDropEvent() signal needed to control dropping on the container's surface
- virtual void dropEvent( QDropEvent *e );
+ virtual void dropEvent( TQDropEvent *e );
public slots:
- virtual void setPalette( const QPalette &pal );
- virtual void setFrameColor(const QColor& color);
+ virtual void setPalette( const TQPalette &pal );
+ virtual void setFrameColor(const TQColor& color);
signals:
//! Needed to control dragging over the container's surface
- void handleDragMoveEvent(QDragMoveEvent *e);
+ void handleDragMoveEvent(TQDragMoveEvent *e);
//! Needed to control dropping on the container's surface
- void handleDropEvent(QDropEvent *e);
+ void handleDropEvent(TQDropEvent *e);
protected:
- virtual void drawFrame( QPainter * );
+ virtual void drawFrame( TQPainter * );
class Private;
Private *d;
diff --git a/kexi/plugins/forms/widgets/kexiframeutils_p.cpp b/kexi/plugins/forms/widgets/kexiframeutils_p.cpp
index 11b8650a..331909ee 100644
--- a/kexi/plugins/forms/widgets/kexiframeutils_p.cpp
+++ b/kexi/plugins/forms/widgets/kexiframeutils_p.cpp
@@ -20,13 +20,13 @@
/* This file is included by KexiDBLabel and KexiFrame */
//! @todo add more frame types
-void ClassName::drawFrame( QPainter *p )
+void ClassName::drawFrame( TQPainter *p )
{
- if (frameShape() == QFrame::Box) {
+ if (frameShape() == TQFrame::Box) {
if ( frameShadow() == Plain )
qDrawPlainRect( p, frameRect(), d->frameColor, lineWidth() );
else
- qDrawShadeRect( p, frameRect(), colorGroup(), frameShadow() == QFrame::Sunken,
+ qDrawShadeRect( p, frameRect(), tqcolorGroup(), frameShadow() == TQFrame::Sunken,
lineWidth(), midLineWidth() );
}
else {
@@ -34,28 +34,28 @@ void ClassName::drawFrame( QPainter *p )
}
}
-void ClassName::setPalette( const QPalette &pal )
+void ClassName::setPalette( const TQPalette &pal )
{
- QPalette pal2(pal);
- QColorGroup cg( pal2.active() );
- cg.setColor(QColorGroup::Light, KexiUtils::bleachedColor( d->frameColor, 150 ));
- cg.setColor(QColorGroup::Mid, d->frameColor);
- cg.setColor(QColorGroup::Dark, d->frameColor.dark(150));
+ TQPalette pal2(pal);
+ TQColorGroup cg( pal2.active() );
+ cg.setColor(TQColorGroup::Light, KexiUtils::bleachedColor( d->frameColor, 150 ));
+ cg.setColor(TQColorGroup::Mid, d->frameColor);
+ cg.setColor(TQColorGroup::Dark, d->frameColor.dark(150));
pal2.setActive(cg);
- QColorGroup cg2( pal2.inactive() );
- cg2.setColor(QColorGroup::Light, cg.light() );
- cg2.setColor(QColorGroup::Mid, cg.mid());
- cg2.setColor(QColorGroup::Dark, cg.dark());
+ TQColorGroup cg2( pal2.inactive() );
+ cg2.setColor(TQColorGroup::Light, cg.light() );
+ cg2.setColor(TQColorGroup::Mid, cg.mid());
+ cg2.setColor(TQColorGroup::Dark, cg.dark());
pal2.setInactive(cg2);
SuperClassName::setPalette(pal2);
}
-const QColor& ClassName::frameColor() const
+const TQColor& ClassName::frameColor() const
{
return d->frameColor;
}
-void ClassName::setFrameColor(const QColor& color)
+void ClassName::setFrameColor(const TQColor& color)
{
d->frameColor = color;
//update light and dark colors
@@ -69,9 +69,9 @@ ClassName::Shape ClassName::frameShape() const
return d->frameShape;
}
-void ClassName::setFrameShape( ClassName::Shape shape )
+void ClassName::setFrameShape( ClassName::Shape tqshape )
{
- d->frameShape = shape;
+ d->frameShape = tqshape;
update();
}
@@ -88,33 +88,33 @@ void ClassName::setFrameShadow( ClassName::Shadow shadow )
#endif
#if 0
-void QFrame::drawFrame( QPainter *p )
+void TQFrame::drawFrame( TQPainter *p )
{
- QPoint p1, p2;
- QRect r = frameRect();
+ TQPoint p1, p2;
+ TQRect r = frameRect();
int type = fstyle & MShape;
int cstyle = fstyle & MShadow;
-#ifdef QT_NO_DRAWUTIL
+#ifdef TQT_NO_DRAWUTIL
p->setPen( black ); // ####
p->drawRect( r ); //### a bit too simple
#else
- const QColorGroup & g = colorGroup();
+ const TQColorGroup & g = tqcolorGroup();
-#ifndef QT_NO_STYLE
- QStyleOption opt(lineWidth(),midLineWidth());
+#ifndef TQT_NO_STYLE
+ TQStyleOption opt(lineWidth(),midLineWidth());
- QStyle::SFlags flags = QStyle::Style_Default;
+ TQStyle::SFlags flags = TQStyle::Style_Default;
if (isEnabled())
- flags |= QStyle::Style_Enabled;
+ flags |= TQStyle::Style_Enabled;
if (cstyle == Sunken)
- flags |= QStyle::Style_Sunken;
+ flags |= TQStyle::Style_Sunken;
else if (cstyle == Raised)
- flags |= QStyle::Style_Raised;
+ flags |= TQStyle::Style_Raised;
if (hasFocus())
- flags |= QStyle::Style_HasFocus;
+ flags |= TQStyle::Style_HasFocus;
if (hasMouse())
- flags |= QStyle::Style_MouseOver;
-#endif // QT_NO_STYLE
+ flags |= TQStyle::Style_MouseOver;
+#endif // TQT_NO_STYLE
switch ( type ) {
@@ -127,60 +127,60 @@ void QFrame::drawFrame( QPainter *p )
break;
case LineEditPanel:
- style().drawPrimitive( QStyle::PE_PanelLineEdit, p, r, g, flags, opt );
+ style().drawPrimitive( TQStyle::PE_PanelLineEdit, p, r, g, flags, opt );
break;
case GroupBoxPanel:
- style().drawPrimitive( QStyle::PE_PanelGroupBox, p, r, g, flags, opt );
+ style().drawPrimitive( TQStyle::PE_PanelGroupBox, p, r, g, flags, opt );
break;
case TabWidgetPanel:
- style().drawPrimitive( QStyle::PE_PanelTabWidget, p, r, g, flags, opt );
+ style().drawPrimitive( TQStyle::PE_PanelTabWidget, p, r, g, flags, opt );
break;
case MenuBarPanel:
-#ifndef QT_NO_STYLE
- style().drawPrimitive(QStyle::PE_PanelMenuBar, p, r, g, flags, opt);
+#ifndef TQT_NO_STYLE
+ style().drawPrimitive(TQStyle::PE_PanelMenuBar, p, r, g, flags, opt);
break;
-#endif // fall through to Panel if QT_NO_STYLE
+#endif // fall through to Panel if TQT_NO_STYLE
case ToolBarPanel:
-#ifndef QT_NO_STYLE
- style().drawPrimitive( QStyle::PE_PanelDockWindow, p, rect(), g, flags, opt);
+#ifndef TQT_NO_STYLE
+ style().drawPrimitive( TQStyle::PE_PanelDockWindow, p, rect(), g, flags, opt);
break;
-#endif // fall through to Panel if QT_NO_STYLE
+#endif // fall through to Panel if TQT_NO_STYLE
case StyledPanel:
-#ifndef QT_NO_STYLE
+#ifndef TQT_NO_STYLE
if ( cstyle == Plain )
qDrawPlainRect( p, r, g.foreground(), lwidth );
else
- style().drawPrimitive(QStyle::PE_Panel, p, r, g, flags, opt);
+ style().drawPrimitive(TQStyle::PE_Panel, p, r, g, flags, opt);
break;
-#endif // fall through to Panel if QT_NO_STYLE
+#endif // fall through to Panel if TQT_NO_STYLE
case PopupPanel:
-#ifndef QT_NO_STYLE
+#ifndef TQT_NO_STYLE
{
- int vextra = style().pixelMetric(QStyle::PM_PopupMenuFrameVerticalExtra, this),
- hextra = style().pixelMetric(QStyle::PM_PopupMenuFrameHorizontalExtra, this);
+ int vextra = style().tqpixelMetric(TQStyle::PM_PopupMenuFrameVerticalExtra, this),
+ hextra = style().tqpixelMetric(TQStyle::PM_PopupMenuFrameHorizontalExtra, this);
if(vextra > 0 || hextra > 0) {
- QRect fr = frameRect();
+ TQRect fr = frameRect();
int fw = frameWidth();
if(vextra > 0) {
- style().drawControl(QStyle::CE_PopupMenuVerticalExtra, p, this,
- QRect(fr.x() + fw, fr.y() + fw, fr.width() - (fw*2), vextra),
+ style().tqdrawControl(TQStyle::CE_PopupMenuVerticalExtra, p, this,
+ TQRect(fr.x() + fw, fr.y() + fw, fr.width() - (fw*2), vextra),
g, flags, opt);
- style().drawControl(QStyle::CE_PopupMenuVerticalExtra, p, this,
- QRect(fr.x() + fw, fr.bottom() - fw - vextra, fr.width() - (fw*2), vextra),
+ style().tqdrawControl(TQStyle::CE_PopupMenuVerticalExtra, p, this,
+ TQRect(fr.x() + fw, fr.bottom() - fw - vextra, fr.width() - (fw*2), vextra),
g, flags, opt);
}
if(hextra > 0) {
- style().drawControl(QStyle::CE_PopupMenuHorizontalExtra, p, this,
- QRect(fr.x() + fw, fr.y() + fw + vextra, hextra, fr.height() - (fw*2) - vextra),
+ style().tqdrawControl(TQStyle::CE_PopupMenuHorizontalExtra, p, this,
+ TQRect(fr.x() + fw, fr.y() + fw + vextra, hextra, fr.height() - (fw*2) - vextra),
g, flags, opt);
- style().drawControl(QStyle::CE_PopupMenuHorizontalExtra, p, this,
- QRect(fr.right() - fw - hextra, fr.y() + fw + vextra, hextra, fr.height() - (fw*2) - vextra),
+ style().tqdrawControl(TQStyle::CE_PopupMenuHorizontalExtra, p, this,
+ TQRect(fr.right() - fw - hextra, fr.y() + fw + vextra, hextra, fr.height() - (fw*2) - vextra),
g, flags, opt);
}
}
@@ -188,10 +188,10 @@ void QFrame::drawFrame( QPainter *p )
if ( cstyle == Plain )
qDrawPlainRect( p, r, g.foreground(), lwidth );
else
- style().drawPrimitive(QStyle::PE_PanelPopup, p, r, g, flags, opt);
+ style().drawPrimitive(TQStyle::PE_PanelPopup, p, r, g, flags, opt);
break;
}
-#endif // fall through to Panel if QT_NO_STYLE
+#endif // fall through to Panel if TQT_NO_STYLE
case Panel:
if ( cstyle == Plain )
@@ -209,16 +209,16 @@ void QFrame::drawFrame( QPainter *p )
case HLine:
case VLine:
if ( type == HLine ) {
- p1 = QPoint( r.x(), r.height()/2 );
- p2 = QPoint( r.x()+r.width(), p1.y() );
+ p1 = TQPoint( r.x(), r.height()/2 );
+ p2 = TQPoint( r.x()+r.width(), p1.y() );
}
else {
- p1 = QPoint( r.x()+r.width()/2, 0 );
- p2 = QPoint( p1.x(), r.height() );
+ p1 = TQPoint( r.x()+r.width()/2, 0 );
+ p2 = TQPoint( p1.x(), r.height() );
}
if ( cstyle == Plain ) {
- QPen oldPen = p->pen();
- p->setPen( QPen(g.foreground(),lwidth) );
+ TQPen oldPen = p->pen();
+ p->setPen( TQPen(g.foreground(),lwidth) );
p->drawLine( p1, p2 );
p->setPen( oldPen );
}
@@ -227,6 +227,6 @@ void QFrame::drawFrame( QPainter *p )
lwidth, midLineWidth() );
break;
}
-#endif // QT_NO_DRAWUTIL
+#endif // TQT_NO_DRAWUTIL
#endif
diff --git a/kexi/plugins/forms/widgets/kexipushbutton.cpp b/kexi/plugins/forms/widgets/kexipushbutton.cpp
index acfda0a4..95d0b92e 100644
--- a/kexi/plugins/forms/widgets/kexipushbutton.cpp
+++ b/kexi/plugins/forms/widgets/kexipushbutton.cpp
@@ -20,8 +20,8 @@
#include "kexipushbutton.h"
-KexiPushButton::KexiPushButton( const QString & text, QWidget * parent, const char * name )
-: KPushButton(text, parent, name)
+KexiPushButton::KexiPushButton( const TQString & text, TQWidget * tqparent, const char * name )
+: KPushButton(text, tqparent, name)
{
}
diff --git a/kexi/plugins/forms/widgets/kexipushbutton.h b/kexi/plugins/forms/widgets/kexipushbutton.h
index 12c01631..3dd8f0a9 100644
--- a/kexi/plugins/forms/widgets/kexipushbutton.h
+++ b/kexi/plugins/forms/widgets/kexipushbutton.h
@@ -28,25 +28,26 @@
class KEXIFORMUTILS_EXPORT KexiPushButton : public KPushButton
{
Q_OBJECT
- Q_PROPERTY(QString onClickAction READ onClickAction WRITE setOnClickAction DESIGNABLE true)
- Q_PROPERTY(QString onClickActionOption READ onClickActionOption WRITE setOnClickActionOption DESIGNABLE true)
+ TQ_OBJECT
+ TQ_PROPERTY(TQString onClickAction READ onClickAction WRITE setOnClickAction DESIGNABLE true)
+ TQ_PROPERTY(TQString onClickActionOption READ onClickActionOption WRITE setOnClickActionOption DESIGNABLE true)
public:
- KexiPushButton( const QString & text, QWidget * parent, const char * name = 0 );
+ KexiPushButton( const TQString & text, TQWidget * tqparent, const char * name = 0 );
~KexiPushButton();
public slots:
//! action string for "on click" event
//! @see KexiFormPart::slotAssignAction()
//! @see KexiFormEventAction::ActionData
- QString onClickAction() const { return m_onClickActionData.string; }
- void setOnClickAction(const QString& actionString) { m_onClickActionData.string = actionString; }
+ TQString onClickAction() const { return m_onClickActionData.string; }
+ void setOnClickAction(const TQString& actionString) { m_onClickActionData.string = actionString; }
//! action option allowing to select whether the object should be opened in data view mode or printed, etc.
//! @see KexiFormPart::slotAssignAction()
//! @see KexiFormEventAction::ActionData
- QString onClickActionOption() const { return m_onClickActionData.option; }
- void setOnClickActionOption(const QString& option) { m_onClickActionData.option = option; }
+ TQString onClickActionOption() const { return m_onClickActionData.option; }
+ void setOnClickActionOption(const TQString& option) { m_onClickActionData.option = option; }
protected:
KexiFormEventAction::ActionData m_onClickActionData;
diff --git a/kexi/plugins/importexport/csv/kexicsv_importexportpart.cpp b/kexi/plugins/importexport/csv/kexicsv_importexportpart.cpp
index caa8640d..4112bf52 100644
--- a/kexi/plugins/importexport/csv/kexicsv_importexportpart.cpp
+++ b/kexi/plugins/importexport/csv/kexicsv_importexportpart.cpp
@@ -26,8 +26,8 @@
#include <kgenericfactory.h>
-KexiCSVImportExportPart::KexiCSVImportExportPart(QObject *parent, const char *name, const QStringList &args)
- : KexiInternalPart(parent, name, args)
+KexiCSVImportExportPart::KexiCSVImportExportPart(TQObject *tqparent, const char *name, const TQStringList &args)
+ : KexiInternalPart(tqparent, name, args)
{
}
@@ -35,13 +35,13 @@ KexiCSVImportExportPart::~KexiCSVImportExportPart()
{
}
-QWidget *KexiCSVImportExportPart::createWidget(const char* widgetClass, KexiMainWindow* mainWin,
- QWidget *parent, const char *objName, QMap<QString,QString>* args )
+TQWidget *KexiCSVImportExportPart::createWidget(const char* widgetClass, KexiMainWindow* mainWin,
+ TQWidget *tqparent, const char *objName, TQMap<TQString,TQString>* args )
{
if (0==qstrcmp(widgetClass, "KexiCSVImportDialog")) {
KexiCSVImportDialog::Mode mode = (args && (*args)["sourceType"]=="file")
? KexiCSVImportDialog::File : KexiCSVImportDialog::Clipboard;
- KexiCSVImportDialog *dlg = new KexiCSVImportDialog( mode, mainWin, parent, objName );
+ KexiCSVImportDialog *dlg = new KexiCSVImportDialog( mode, mainWin, tqparent, objName );
m_cancelled = dlg->cancelled();
if (m_cancelled) {
delete dlg;
@@ -55,7 +55,7 @@ QWidget *KexiCSVImportExportPart::createWidget(const char* widgetClass, KexiMain
KexiCSVExport::Options options;
if (!options.assign( *args ))
return 0;
- KexiCSVExportWizard *dlg = new KexiCSVExportWizard( options, mainWin, parent, objName);
+ KexiCSVExportWizard *dlg = new KexiCSVExportWizard( options, mainWin, tqparent, objName);
m_cancelled = dlg->cancelled();
if (m_cancelled) {
delete dlg;
@@ -67,7 +67,7 @@ QWidget *KexiCSVImportExportPart::createWidget(const char* widgetClass, KexiMain
}
bool KexiCSVImportExportPart::executeCommand(KexiMainWindow* mainWin, const char* commandName,
- QMap<QString,QString>* args)
+ TQMap<TQString,TQString>* args)
{
if (0==qstrcmp(commandName, "KexiCSVExport")) {
KexiCSVExport::Options options;
@@ -75,9 +75,9 @@ bool KexiCSVImportExportPart::executeCommand(KexiMainWindow* mainWin, const char
return false;
KexiDB::TableOrQuerySchema tableOrQuery(
mainWin->project()->dbConnection(), options.itemId);
- QTextStream *stream = 0;
- if (args->contains("textStream"))
- stream = KexiUtils::stringToPtr<QTextStream>( (*args)["textStream"] );
+ TQTextStream *stream = 0;
+ if (args->tqcontains("textStream"))
+ stream = KexiUtils::stringToPtr<TQTextStream>( (*args)["textStream"] );
return KexiCSVExport::exportData(tableOrQuery, options, -1, stream);
}
return false;
diff --git a/kexi/plugins/importexport/csv/kexicsv_importexportpart.h b/kexi/plugins/importexport/csv/kexicsv_importexportpart.h
index 8ee8e8cd..c4a666e3 100644
--- a/kexi/plugins/importexport/csv/kexicsv_importexportpart.h
+++ b/kexi/plugins/importexport/csv/kexicsv_importexportpart.h
@@ -27,16 +27,16 @@
class KexiCSVImportExportPart : public KexiInternalPart
{
public:
- KexiCSVImportExportPart(QObject *parent, const char *name, const QStringList &args);
+ KexiCSVImportExportPart(TQObject *tqparent, const char *name, const TQStringList &args);
virtual ~KexiCSVImportExportPart();
/*! Reimplemented to return wizard object. */
- virtual QWidget *createWidget(const char* widgetClass, KexiMainWindow* mainWin,
- QWidget *parent, const char *objName = 0, QMap<QString,QString>* args = 0);
+ virtual TQWidget *createWidget(const char* widgetClass, KexiMainWindow* mainWin,
+ TQWidget *tqparent, const char *objName = 0, TQMap<TQString,TQString>* args = 0);
/*! Reimplemented to execute a command \a commandName (nonvisual). The result are put into the \a args. */
virtual bool executeCommand(KexiMainWindow* mainWin, const char* commandName,
- QMap<QString,QString>* args = 0);
+ TQMap<TQString,TQString>* args = 0);
protected:
};
diff --git a/kexi/plugins/importexport/csv/kexicsvexport.cpp b/kexi/plugins/importexport/csv/kexicsvexport.cpp
index b83f85a7..5af3d8ed 100644
--- a/kexi/plugins/importexport/csv/kexicsvexport.cpp
+++ b/kexi/plugins/importexport/csv/kexicsvexport.cpp
@@ -30,9 +30,9 @@
#include <kexiutils/utils.h>
#include <widget/kexicharencodingcombobox.h>
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qclipboard.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqclipboard.h>
#include <kapplication.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -50,28 +50,28 @@ Options::Options()
{
}
-bool Options::assign( QMap<QString,QString>& args )
+bool Options::assign( TQMap<TQString,TQString>& args )
{
mode = (args["destinationType"]=="file")
? KexiCSVExport::File : KexiCSVExport::Clipboard;
- if (args.contains("delimiter"))
+ if (args.tqcontains("delimiter"))
delimiter = args["delimiter"];
else
delimiter = (mode==File) ? KEXICSV_DEFAULT_FILE_DELIMITER : KEXICSV_DEFAULT_CLIPBOARD_DELIMITER;
- if (args.contains("textQuote"))
+ if (args.tqcontains("textQuote"))
textQuote = args["textQuote"];
else
- textQuote = (mode==File) ? KEXICSV_DEFAULT_FILE_TEXT_QUOTE : KEXICSV_DEFAULT_CLIPBOARD_TEXT_QUOTE;
+ textQuote = (mode==File) ? KEXICSV_DEFAULT_FILE_TEXT_TQUOTE : KEXICSV_DEFAULT_CLIPBOARD_TEXT_TQUOTE;
bool ok;
itemId = args["itemId"].toInt(&ok);
if (!ok || itemId<=0)
return false;
- if (args.contains("forceDelimiter"))
+ if (args.tqcontains("forceDelimiter"))
forceDelimiter = args["forceDelimiter"];
- if (args.contains("addColumnNames"))
+ if (args.tqcontains("addColumnNames"))
addColumnNames = (args["addColumnNames"]=="1");
return true;
}
@@ -79,7 +79,7 @@ bool Options::assign( QMap<QString,QString>& args )
//------------------------------------
bool KexiCSVExport::exportData(KexiDB::TableOrQuerySchema& tableOrQuery,
- const Options& options, int rowCount, QTextStream *predefinedTextStream)
+ const Options& options, int rowCount, TQTextStream *predefinedTextStream)
{
KexiDB::Connection* conn = tableOrQuery.connection();
if (!conn)
@@ -95,7 +95,7 @@ bool KexiCSVExport::exportData(KexiDB::TableOrQuerySchema& tableOrQuery,
//! @todo look at rowCount whether the data is really large;
//! if so: avoid copying to clipboard (or ask user) because of system memory
-//! @todo OPTIMIZATION: use fieldsExpanded(true /*UNIQUE*/)
+//! @todo OPTIMIZATION: use fieldsExpanded(true /*UNITQUE*/)
//! @todo OPTIMIZATION? (avoid multiple data retrieving) look for already fetched data within KexiProject..
KexiDB::QuerySchema* query = tableOrQuery.query();
@@ -103,15 +103,15 @@ bool KexiCSVExport::exportData(KexiDB::TableOrQuerySchema& tableOrQuery,
query = tableOrQuery.table()->query();
KexiDB::QueryColumnInfo::Vector fields( query->fieldsExpanded( KexiDB::QuerySchema::WithInternalFields ) );
- QString buffer;
+ TQString buffer;
KSaveFile *kSaveFile = 0;
- QTextStream *stream = 0;
+ TQTextStream *stream = 0;
const bool copyToClipboard = options.mode==Clipboard;
if (copyToClipboard) {
//! @todo (during exporting): enlarge bufSize by factor of 2 when it became too small
- uint bufSize = QMIN((rowCount<0 ? 10 : rowCount) * fields.count() * 20, 128000);
+ uint bufSize = TQMIN((rowCount<0 ? 10 : rowCount) * fields.count() * 20, 128000);
buffer.reserve( bufSize );
if (buffer.capacity() < bufSize) {
kdWarning() << "KexiCSVExportWizard::exportData() cannot allocate memory for " << bufSize
@@ -154,10 +154,10 @@ bool KexiCSVExport::exportData(KexiDB::TableOrQuerySchema& tableOrQuery,
// 0. Cache information
const uint fieldsCount = query->fieldsExpanded().count(); //real fields count without internals
- const QCString delimiter( options.delimiter.left(1).latin1() );
+ const TQCString delimiter( options.delimiter.left(1).latin1() );
const bool hasTextQuote = !options.textQuote.isEmpty();
- const QString textQuote( options.textQuote.left(1) );
- const QCString escapedTextQuote( (textQuote + textQuote).latin1() ); //ok?
+ const TQString textQuote( options.textQuote.left(1) );
+ const TQCString escapedTextQuote( (textQuote + textQuote).latin1() ); //ok?
//cache for faster checks
bool *isText = new bool[fieldsCount];
bool *isDateTime = new bool[fieldsCount];
@@ -193,7 +193,7 @@ bool KexiCSVExport::exportData(KexiDB::TableOrQuerySchema& tableOrQuery,
if (i>0)
APPEND( delimiter );
if (hasTextQuote){
- APPEND( textQuote + fields[i]->captionOrAliasOrName().replace(textQuote, escapedTextQuote) + textQuote );
+ APPEND( textQuote + fields[i]->captionOrAliasOrName().tqreplace(textQuote, escapedTextQuote) + textQuote );
}
else {
APPEND( fields[i]->captionOrAliasOrName() );
@@ -209,7 +209,7 @@ bool KexiCSVExport::exportData(KexiDB::TableOrQuerySchema& tableOrQuery,
_ERR;
}
for (cursor->moveFirst(); !cursor->eof() && !cursor->error(); cursor->moveNext()) {
- const uint realFieldCount = QMIN(cursor->fieldCount(), fieldsCount);
+ const uint realFieldCount = TQMIN(cursor->fieldCount(), fieldsCount);
for (uint i=0; i<realFieldCount; i++) {
const uint real_i = visibleFieldIndex[i];
if (i>0)
@@ -218,7 +218,7 @@ bool KexiCSVExport::exportData(KexiDB::TableOrQuerySchema& tableOrQuery,
continue;
if (isText[real_i]) {
if (hasTextQuote)
- APPEND( textQuote + QString(cursor->value(real_i).toString()).replace(textQuote, escapedTextQuote) + textQuote );
+ APPEND( textQuote + TQString(cursor->value(real_i).toString()).tqreplace(textQuote, escapedTextQuote) + textQuote );
else
APPEND( cursor->value(real_i).toString() );
}
@@ -252,7 +252,7 @@ bool KexiCSVExport::exportData(KexiDB::TableOrQuerySchema& tableOrQuery,
}
if (copyToClipboard)
- kapp->clipboard()->setText(buffer, QClipboard::Clipboard);
+ kapp->tqclipboard()->setText(buffer, TQClipboard::Clipboard);
delete [] isText;
delete [] isDateTime;
diff --git a/kexi/plugins/importexport/csv/kexicsvexport.h b/kexi/plugins/importexport/csv/kexicsvexport.h
index 7c8138fe..393da17a 100644
--- a/kexi/plugins/importexport/csv/kexicsvexport.h
+++ b/kexi/plugins/importexport/csv/kexicsvexport.h
@@ -34,14 +34,14 @@ class Options {
Options();
//! Assigns \a args. \return false on failure.
- bool assign( QMap<QString,QString>& args );
+ bool assign( TQMap<TQString,TQString>& args );
Mode mode;
int itemId; //!< Table or query ID
- QString fileName;
- QString delimiter;
- QString forceDelimiter; //!< Used for "clipboard" mode
- QString textQuote;
+ TQString fileName;
+ TQString delimiter;
+ TQString forceDelimiter; //!< Used for "clipboard" mode
+ TQString textQuote;
bool addColumnNames : 1;
};
@@ -51,7 +51,7 @@ class Options {
@param predefinedTextStream text stream that should be used instead of writing to a file
*/
bool exportData(KexiDB::TableOrQuerySchema& tableOrQuery, const Options& options, int rowCount = -1,
- QTextStream *predefinedTextStream = 0);
+ TQTextStream *predefinedTextStream = 0);
}
diff --git a/kexi/plugins/importexport/csv/kexicsvexportwizard.cpp b/kexi/plugins/importexport/csv/kexicsvexportwizard.cpp
index 11c0cff0..931eab73 100644
--- a/kexi/plugins/importexport/csv/kexicsvexportwizard.cpp
+++ b/kexi/plugins/importexport/csv/kexicsvexportwizard.cpp
@@ -30,9 +30,9 @@
#include <kexiutils/utils.h>
#include <widget/kexicharencodingcombobox.h>
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qclipboard.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqclipboard.h>
#include <kapplication.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -44,8 +44,8 @@
KexiCSVExportWizard::KexiCSVExportWizard( const KexiCSVExport::Options& options,
- KexiMainWindow* mainWin, QWidget * parent, const char * name )
- : KWizard(parent, name)
+ KexiMainWindow* mainWin, TQWidget * tqparent, const char * name )
+ : KWizard(tqparent, name)
, m_options(options)
// , m_mode(mode)
// , m_itemId(itemId)
@@ -65,7 +65,7 @@ KexiCSVExportWizard::KexiCSVExportWizard( const KexiCSVExport::Options& options,
}
helpButton()->hide();
- QString infoLblFromText;
+ TQString infoLblFromText;
KexiGUIMessageHandler msgh(this);
m_tableOrQuery = new KexiDB::TableOrQuerySchema(
m_mainWin->project()->dbConnection(), m_options.itemId);
@@ -109,13 +109,13 @@ KexiCSVExportWizard::KexiCSVExportWizard( const KexiCSVExport::Options& options,
m_fileSavePage->setAdditionalFilters( csvMimeTypes() );
m_fileSavePage->setDefaultExtension("csv");
m_fileSavePage->setLocationText( KexiUtils::stringToFileName(m_tableOrQuery->captionOrName()) );
- connect(m_fileSavePage, SIGNAL(rejected()), this, SLOT(reject()));
+ connect(m_fileSavePage, TQT_SIGNAL(rejected()), this, TQT_SLOT(reject()));
addPage(m_fileSavePage, i18n("Enter Name of File You Want to Save Data To"));
}
// 2. Export options
- m_exportOptionsPage = new QWidget(this, "m_exportOptionsPage");
- QGridLayout *exportOptionsLyr = new QGridLayout( m_exportOptionsPage, 6, 3,
+ m_exportOptionsPage = new TQWidget(this, "m_exportOptionsPage");
+ TQGridLayout *exportOptionsLyr = new TQGridLayout( m_exportOptionsPage, 6, 3,
KDialogBase::marginHint(), KDialogBase::spacingHint(), "exportOptionsLyr");
m_infoLblFrom = new KexiCSVInfoLabel( infoLblFromText, m_exportOptionsPage );
KexiPart::Info *partInfo = Kexi::partManager().infoForMimeType(
@@ -135,18 +135,18 @@ KexiCSVExportWizard::KexiCSVExportWizard( const KexiCSVExport::Options& options,
m_showOptionsButton = new KPushButton(KGuiItem(i18n("Show Options >>"), "configure"),
m_exportOptionsPage);
- connect(m_showOptionsButton, SIGNAL(clicked()), this, SLOT(slotShowOptionsButtonClicked()));
+ connect(m_showOptionsButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotShowOptionsButtonClicked()));
exportOptionsLyr->addMultiCellWidget(m_showOptionsButton, 2, 2, 0, 0);
- m_showOptionsButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+ m_showOptionsButton->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed);
// -<options section>
- m_exportOptionsSection = new QGroupBox(1, Vertical, i18n("Options"), m_exportOptionsPage,
+ m_exportOptionsSection = new TQGroupBox(1,Qt::Vertical, i18n("Options"), m_exportOptionsPage,
"m_exportOptionsSection");
- m_exportOptionsSection->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+ m_exportOptionsSection->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed);
exportOptionsLyr->addMultiCellWidget(m_exportOptionsSection, 3, 3, 0, 1);
- QWidget *exportOptionsSectionWidget
- = new QWidget(m_exportOptionsSection, "exportOptionsSectionWidget");
- QGridLayout *exportOptionsSectionLyr = new QGridLayout( exportOptionsSectionWidget, 5, 2,
+ TQWidget *exportOptionsSectionWidget
+ = new TQWidget(m_exportOptionsSection, "exportOptionsSectionWidget");
+ TQGridLayout *exportOptionsSectionLyr = new TQGridLayout( exportOptionsSectionWidget, 5, 2,
0, KDialogBase::spacingHint(), "exportOptionsLyr");
// -delimiter
@@ -154,35 +154,35 @@ KexiCSVExportWizard::KexiCSVExportWizard( const KexiCSVExport::Options& options,
exportOptionsSectionWidget);
m_delimiterWidget->setDelimiter(defaultDelimiter());
exportOptionsSectionLyr->addWidget( m_delimiterWidget, 0, 1 );
- QLabel *delimiterLabel = new QLabel(m_delimiterWidget, i18n("Delimiter:"), exportOptionsSectionWidget);
+ TQLabel *delimiterLabel = new TQLabel(m_delimiterWidget, i18n("Delimiter:"), exportOptionsSectionWidget);
exportOptionsSectionLyr->addWidget( delimiterLabel, 0, 0 );
// -text quote
- QWidget *textQuoteWidget = new QWidget(exportOptionsSectionWidget);
- QHBoxLayout *textQuoteLyr = new QHBoxLayout(textQuoteWidget);
+ TQWidget *textQuoteWidget = new TQWidget(exportOptionsSectionWidget);
+ TQHBoxLayout *textQuoteLyr = new TQHBoxLayout(textQuoteWidget);
exportOptionsSectionLyr->addWidget(textQuoteWidget, 1, 1);
m_textQuote = new KexiCSVTextQuoteComboBox( textQuoteWidget );
m_textQuote->setTextQuote(defaultTextQuote());
textQuoteLyr->addWidget( m_textQuote );
textQuoteLyr->addStretch(0);
- QLabel *textQuoteLabel = new QLabel(m_textQuote, i18n("Text quote:"), exportOptionsSectionWidget);
+ TQLabel *textQuoteLabel = new TQLabel(m_textQuote, i18n("Text quote:"), exportOptionsSectionWidget);
exportOptionsSectionLyr->addWidget( textQuoteLabel, 1, 0 );
// - character encoding
m_characterEncodingCombo = new KexiCharacterEncodingComboBox( exportOptionsSectionWidget );
- m_characterEncodingCombo->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+ m_characterEncodingCombo->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed);
exportOptionsSectionLyr->addWidget( m_characterEncodingCombo, 2, 1 );
- QLabel *characterEncodingLabel = new QLabel(m_characterEncodingCombo, i18n("Text encoding:"),
+ TQLabel *characterEncodingLabel = new TQLabel(m_characterEncodingCombo, i18n("Text encoding:"),
exportOptionsSectionWidget);
exportOptionsSectionLyr->addWidget( characterEncodingLabel, 2, 0 );
// - checkboxes
- m_addColumnNamesCheckBox = new QCheckBox(i18n("Add column names as the first row"),
+ m_addColumnNamesCheckBox = new TQCheckBox(i18n("Add column names as the first row"),
exportOptionsSectionWidget);
m_addColumnNamesCheckBox->setChecked(true);
exportOptionsSectionLyr->addWidget( m_addColumnNamesCheckBox, 3, 1 );
//! @todo 1.1: for copying use "Always use above options for copying" string
- m_alwaysUseCheckBox = new QCheckBox(i18n("Always use above options for exporting"),
+ m_alwaysUseCheckBox = new TQCheckBox(i18n("Always use above options for exporting"),
m_exportOptionsPage);
exportOptionsLyr->addMultiCellWidget(m_alwaysUseCheckBox, 4, 4, 0, 1);
// exportOptionsSectionLyr->addWidget( m_alwaysUseCheckBox, 4, 1 );
@@ -192,7 +192,7 @@ KexiCSVExportWizard::KexiCSVExportWizard( const KexiCSVExport::Options& options,
// exportOptionsLyr->setColStretch(3, 1);
exportOptionsLyr->addMultiCell(
- new QSpacerItem( 0, 0, QSizePolicy::Preferred, QSizePolicy::MinimumExpanding), 5, 5, 0, 1 );
+ new TQSpacerItem( 0, 0, TQSizePolicy::Preferred, TQSizePolicy::MinimumExpanding), 5, 5, 0, 1 );
// addPage(m_exportOptionsPage, i18n("Set Export Options"));
addPage(m_exportOptionsPage, m_options.mode==KexiCSVExport::Clipboard ? i18n("Copying") : i18n("Exporting"));
@@ -207,7 +207,7 @@ KexiCSVExportWizard::KexiCSVExportWizard( const KexiCSVExport::Options& options,
if (readBoolEntry("StoreOptionsForCSVExportDialog", false)) {
// load defaults:
m_alwaysUseCheckBox->setChecked(true);
- QString s = readEntry("DefaultDelimiterForExportingCSVFiles", defaultDelimiter());
+ TQString s = readEntry("DefaultDelimiterForExportingCSVFiles", defaultDelimiter());
if (!s.isEmpty())
m_delimiterWidget->setDelimiter(s);
s = readEntry("DefaultTextQuoteForExportingCSVFiles", defaultTextQuote());
@@ -222,8 +222,8 @@ KexiCSVExportWizard::KexiCSVExportWizard( const KexiCSVExport::Options& options,
updateGeometry();
// -keep widths equal on page #2:
- int width = QMAX( m_infoLblFrom->leftLabel()->sizeHint().width(),
- m_infoLblTo->leftLabel()->sizeHint().width());
+ int width = TQMAX( m_infoLblFrom->leftLabel()->tqsizeHint().width(),
+ m_infoLblTo->leftLabel()->tqsizeHint().width());
m_infoLblFrom->leftLabel()->setFixedWidth(width);
m_infoLblTo->leftLabel()->setFixedWidth(width);
}
@@ -238,7 +238,7 @@ bool KexiCSVExportWizard::cancelled() const
return m_cancelled;
}
-void KexiCSVExportWizard::showPage ( QWidget * page )
+void KexiCSVExportWizard::showPage ( TQWidget * page )
{
if (page == m_fileSavePage) {
m_fileSavePage->setFocus();
@@ -246,7 +246,7 @@ void KexiCSVExportWizard::showPage ( QWidget * page )
else if (page==m_exportOptionsPage) {
if (m_options.mode==KexiCSVExport::File)
m_infoLblTo->setFileName( m_fileSavePage->currentFileName() );
- QString text = m_tableOrQuery->captionOrName();
+ TQString text = m_tableOrQuery->captionOrName();
if (!m_rowCountDetermined) {
//do this costly operation only once
m_rowCount = KexiDB::rowCount(*m_tableOrQuery);
@@ -255,11 +255,11 @@ void KexiCSVExportWizard::showPage ( QWidget * page )
int columns = KexiDB::fieldCount(*m_tableOrQuery);
text += "\n";
if (m_rowCount>0)
- text += i18n("(rows: %1, columns: %2)").arg(m_rowCount).arg(columns);
+ text += i18n("(rows: %1, columns: %2)").tqarg(m_rowCount).tqarg(columns);
else
- text += i18n("(columns: %1)").arg(columns);
+ text += i18n("(columns: %1)").tqarg(columns);
m_infoLblFrom->setLabelText(text);
- QFontMetrics fm(m_infoLblFrom->fileNameLabel()->font());
+ TQFontMetrics fm(m_infoLblFrom->fileNameLabel()->font());
m_infoLblFrom->fileNameLabel()->setFixedHeight( fm.height() * 2 + fm.lineSpacing() );
if (m_defaultsBtn)
m_defaultsBtn->show();
@@ -287,7 +287,7 @@ void KexiCSVExportWizard::next()
void KexiCSVExportWizard::done(int result)
{
- if (QDialog::Accepted == result) {
+ if (TQDialog::Accepted == result) {
if (m_fileSavePage)
m_options.fileName = m_fileSavePage->currentFileName();
m_options.delimiter = m_delimiterWidget->delimiter();
@@ -296,7 +296,7 @@ void KexiCSVExportWizard::done(int result)
if (!KexiCSVExport::exportData(*m_tableOrQuery, m_options))
return;
}
- else if (QDialog::Rejected == result) {
+ else if (TQDialog::Rejected == result) {
//nothing to do
}
@@ -346,23 +346,23 @@ void KexiCSVExportWizard::slotShowOptionsButtonClicked()
}
}
-void KexiCSVExportWizard::layOutButtonRow( QHBoxLayout * layout )
+void KexiCSVExportWizard::layOutButtonRow( TQHBoxLayout * tqlayout )
{
- QWizard::layOutButtonRow( layout );
+ TQWizard::layOutButtonRow( tqlayout );
- //find the last sublayout
- QLayout *l = 0;
- for (QLayoutIterator lit( layout->iterator() ); lit.current(); ++lit)
- l = lit.current()->layout();
- if (dynamic_cast<QBoxLayout*>(l)) {
+ //find the last subtqlayout
+ TQLayout *l = 0;
+ for (TQLayoutIterator lit( tqlayout->iterator() ); lit.current(); ++lit)
+ l = lit.current()->tqlayout();
+ if (dynamic_cast<TQBoxLayout*>(l)) {
if (!m_defaultsBtn) {
m_defaultsBtn = new KPushButton(i18n("Defaults"), this);
- QWidget::setTabOrder(backButton(), m_defaultsBtn);
- connect(m_defaultsBtn, SIGNAL(clicked()), this, SLOT(slotDefaultsButtonClicked()));
+ TQWidget::setTabOrder(backButton(), m_defaultsBtn);
+ connect(m_defaultsBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDefaultsButtonClicked()));
}
if (!m_exportOptionsSection->isVisible())
m_defaultsBtn->hide();
- dynamic_cast<QBoxLayout*>(l)->insertWidget(0, m_defaultsBtn);
+ dynamic_cast<TQBoxLayout*>(l)->insertWidget(0, m_defaultsBtn);
}
}
@@ -374,13 +374,13 @@ void KexiCSVExportWizard::slotDefaultsButtonClicked()
m_characterEncodingCombo->selectDefaultEncoding();
}
-static QString convertKey(const char *key, KexiCSVExport::Mode mode)
+static TQString convertKey(const char *key, KexiCSVExport::Mode mode)
{
- QString _key(QString::fromLatin1(key));
+ TQString _key(TQString::tqfromLatin1(key));
if (mode == KexiCSVExport::Clipboard) {
- _key.replace("Exporting", "Copying");
- _key.replace("Export", "Copy");
- _key.replace("CSVFiles", "CSVToClipboard");
+ _key.tqreplace("Exporting", "Copying");
+ _key.tqreplace("Export", "Copy");
+ _key.tqreplace("CSVFiles", "CSVToClipboard");
}
return _key;
}
@@ -390,12 +390,12 @@ bool KexiCSVExportWizard::readBoolEntry(const char *key, bool defaultValue)
return kapp->config()->readBoolEntry(convertKey(key, m_options.mode), defaultValue);
}
-QString KexiCSVExportWizard::readEntry(const char *key, const QString& defaultValue)
+TQString KexiCSVExportWizard::readEntry(const char *key, const TQString& defaultValue)
{
return kapp->config()->readEntry(convertKey(key, m_options.mode), defaultValue);
}
-void KexiCSVExportWizard::writeEntry(const char *key, const QString& value)
+void KexiCSVExportWizard::writeEntry(const char *key, const TQString& value)
{
kapp->config()->writeEntry(convertKey(key, m_options.mode), value);
}
@@ -410,7 +410,7 @@ void KexiCSVExportWizard::deleteEntry(const char *key)
kapp->config()->deleteEntry(convertKey(key, m_options.mode));
}
-QString KexiCSVExportWizard::defaultDelimiter() const
+TQString KexiCSVExportWizard::defaultDelimiter() const
{
if (m_options.mode==KexiCSVExport::Clipboard) {
if (!m_options.forceDelimiter.isEmpty())
@@ -421,11 +421,11 @@ QString KexiCSVExportWizard::defaultDelimiter() const
return KEXICSV_DEFAULT_FILE_DELIMITER;
}
-QString KexiCSVExportWizard::defaultTextQuote() const
+TQString KexiCSVExportWizard::defaultTextQuote() const
{
if (m_options.mode==KexiCSVExport::Clipboard)
- return KEXICSV_DEFAULT_CLIPBOARD_TEXT_QUOTE;
- return KEXICSV_DEFAULT_FILE_TEXT_QUOTE;
+ return KEXICSV_DEFAULT_CLIPBOARD_TEXT_TQUOTE;
+ return KEXICSV_DEFAULT_FILE_TEXT_TQUOTE;
}
#include "kexicsvexportwizard.moc"
diff --git a/kexi/plugins/importexport/csv/kexicsvexportwizard.h b/kexi/plugins/importexport/csv/kexicsvexportwizard.h
index 8fdaecd0..ef2bd17b 100644
--- a/kexi/plugins/importexport/csv/kexicsvexportwizard.h
+++ b/kexi/plugins/importexport/csv/kexicsvexportwizard.h
@@ -24,8 +24,8 @@
#include "kexicsvexport.h"
-class QCheckBox;
-class QGroupBox;
+class TQCheckBox;
+class TQGroupBox;
class KPushButton;
class KexiMainWindow;
class KexiStartupFileDialog;
@@ -42,16 +42,17 @@ namespace KexiDB {
class KexiCSVExportWizard : public KWizard
{
Q_OBJECT
+ TQ_OBJECT
public:
KexiCSVExportWizard( const KexiCSVExport::Options& options, KexiMainWindow* mainWin,
- QWidget * parent = 0, const char * name = 0 );
+ TQWidget * tqparent = 0, const char * name = 0 );
virtual ~KexiCSVExportWizard();
bool cancelled() const;
- virtual void showPage ( QWidget * page );
+ virtual void showPage ( TQWidget * page );
protected slots:
virtual void next();
@@ -61,13 +62,13 @@ class KexiCSVExportWizard : public KWizard
protected:
//! reimplemented to add "Defaults" button on the left hand
- virtual void layOutButtonRow( QHBoxLayout * layout );
+ virtual void layOutButtonRow( TQHBoxLayout * tqlayout );
//! \return default delimiter depending on mode.
- QString defaultDelimiter() const;
+ TQString defaultDelimiter() const;
//! \return default text quote depending on mode.
- QString defaultTextQuote() const;
+ TQString defaultTextQuote() const;
//! Helper, works like kapp->config()->readBoolEntry(const char*, bool) but if mode is Clipboard,
//! "Exporting" is replaced with "Copying" and "Export" is replaced with "Copy"
@@ -75,8 +76,8 @@ class KexiCSVExportWizard : public KWizard
//! in \a key, to keep the setting separate.
bool readBoolEntry(const char *key, bool defaultValue);
- //! Helper like \ref readBoolEntry(const char *, bool), but for QString values.
- QString readEntry(const char *key, const QString& defaultValue = QString::null);
+ //! Helper like \ref readBoolEntry(const char *, bool), but for TQString values.
+ TQString readEntry(const char *key, const TQString& defaultValue = TQString());
//! Helper, works like kapp->config()->writeEntry(const char*,bool) but if mode is Clipboard,
//! "Exporting" is replaced with "Copying" and "Export" is replaced with "Copy"
@@ -84,8 +85,8 @@ class KexiCSVExportWizard : public KWizard
//! in \a key, to keep the setting separate.
void writeEntry(const char *key, bool value);
- //! Helper like \ref writeEntry(const char *, bool), but for QString values.
- void writeEntry(const char *key, const QString& value);
+ //! Helper like \ref writeEntry(const char *, bool), but for TQString values.
+ void writeEntry(const char *key, const TQString& value);
//! Helper like \ref writeEntry(const char *, bool), but for deleting config entry.
void deleteEntry(const char *key);
@@ -95,15 +96,15 @@ class KexiCSVExportWizard : public KWizard
// int m_itemId;
KexiMainWindow* m_mainWin;
KexiStartupFileDialog* m_fileSavePage;
- QWidget* m_exportOptionsPage;
+ TQWidget* m_exportOptionsPage;
KPushButton *m_showOptionsButton;
KPushButton *m_defaultsBtn;
- QGroupBox* m_exportOptionsSection;
+ TQGroupBox* m_exportOptionsSection;
KexiCSVInfoLabel *m_infoLblFrom, *m_infoLblTo;
KexiCSVDelimiterWidget* m_delimiterWidget;
KexiCSVTextQuoteComboBox* m_textQuote;
KexiCharacterEncodingComboBox *m_characterEncodingCombo;
- QCheckBox* m_addColumnNamesCheckBox, *m_alwaysUseCheckBox;
+ TQCheckBox* m_addColumnNamesCheckBox, *m_alwaysUseCheckBox;
KexiDB::TableOrQuerySchema* m_tableOrQuery;
int m_rowCount; //!< Cached row count for a table/query.
bool m_rowCountDetermined : 1;
diff --git a/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp b/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp
index 16a9d416..b7bcb80e 100644
--- a/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp
+++ b/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp
@@ -25,22 +25,22 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qclipboard.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qmime.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qtable.h>
-#include <qlayout.h>
-#include <qfiledialog.h>
-#include <qpainter.h>
-#include <qtextcodec.h>
-#include <qtimer.h>
-#include <qfontmetrics.h>
-#include <qtooltip.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqclipboard.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqmime.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqtable.h>
+#include <tqlayout.h>
+#include <tqfiledialog.h>
+#include <tqpainter.h>
+#include <tqtextcodec.h>
+#include <tqtimer.h>
+#include <tqfontmetrics.h>
+#include <tqtooltip.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -71,7 +71,7 @@
#include "kexicsvimportdialog.h"
#include "kexicsvwidgets.h"
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
#include <krecentdirs.h>
#include <windows.h>
#endif
@@ -99,43 +99,45 @@
#define MAX_BYTES_TO_PREVIEW 10240 //max 10KB is reasonable
#define MAX_CHARS_TO_SCAN_WHILE_DETECTING_DELIMITER 4096
-class KexiCSVImportDialogTable : public QTable
+class KexiCSVImportDialogTable : public TQTable
{
public:
- KexiCSVImportDialogTable( QWidget * parent = 0, const char * name = 0 )
- : QTable(parent, name) {
+ KexiCSVImportDialogTable( TQWidget * tqparent = 0, const char * name = 0 )
+ : TQTable(tqparent, name) {
f = font();
f.setBold(true);
}
- virtual void paintCell( QPainter * p, int row, int col, const QRect & cr, bool selected, const QColorGroup & cg ) {
+ virtual void paintCell( TQPainter * p, int row, int col, const TQRect & cr, bool selected, const TQColorGroup & cg ) {
if (row==0)
p->setFont(f);
else
p->setFont(font());
- QTable::paintCell(p, row, col, cr, selected, cg);
+ TQTable::paintCell(p, row, col, cr, selected, cg);
}
virtual void setColumnWidth( int col, int w ) {
//make columns a bit wider
- QTable::setColumnWidth( col, w + 16 );
+ TQTable::setColumnWidth( col, w + 16 );
}
- QFont f;
+ TQFont f;
};
//! Helper used to temporary disable keyboard and mouse events
-void installRecursiveEventFilter(QObject *filter, QObject *object)
+void installRecursiveEventFilter(TQObject *filter, TQObject *object)
{
object->installEventFilter(filter);
- if (!object->children())
+ TQObjectList clo = object->childrenListObject();
+
+ if (clo.isEmpty())
return;
- QObjectList list = *object->children();
- for(QObject *obj = list.first(); obj; obj = list.next())
+ TQObjectList list = clo;
+ for(TQObject *obj = list.first(); obj; obj = list.next())
installRecursiveEventFilter(filter, obj);
}
KexiCSVImportDialog::KexiCSVImportDialog( Mode mode, KexiMainWindow* mainWin,
- QWidget * parent, const char * name
+ TQWidget * tqparent, const char * name
)
: KDialogBase(
KDialogBase::Plain,
@@ -144,7 +146,7 @@ KexiCSVImportDialog::KexiCSVImportDialog( Mode mode, KexiMainWindow* mainWin,
,
(mode==File ? User1 : (ButtonCode)0) |Ok|Cancel,
Ok,
- parent,
+ tqparent,
name ? name : "KexiCSVImportDialog",
true,
false,
@@ -154,7 +156,7 @@ KexiCSVImportDialog::KexiCSVImportDialog( Mode mode, KexiMainWindow* mainWin,
m_cancelled( false ),
m_adjustRows( true ),
m_startline( 0 ),
- m_textquote( QString(KEXICSV_DEFAULT_FILE_TEXT_QUOTE)[0] ),
+ m_textquote( TQString(KEXICSV_DEFAULT_FILE_TEXT_TQUOTE)[0] ),
m_mode(mode),
m_prevSelectedCol(-1),
m_columnsAdjusted(false),
@@ -168,7 +170,7 @@ KexiCSVImportDialog::KexiCSVImportDialog( Mode mode, KexiMainWindow* mainWin,
m_allRowsLoadedInPreview(false),
m_stoppedAt_MAX_BYTES_TO_PREVIEW(false)
{
- setWFlags(getWFlags() | Qt::WStyle_Maximize | Qt::WStyle_SysMenu);
+ setWFlags(getWFlags() | TQt::WStyle_Maximize | TQt::WStyle_SysMenu);
hide();
setButtonOK(KGuiItem( i18n("&Import..."), _IMPORT_ICON));
@@ -190,12 +192,12 @@ KexiCSVImportDialog::KexiCSVImportDialog( Mode mode, KexiMainWindow* mainWin,
setIcon(DesktopIcon(_IMPORT_ICON));
setSizeGripEnabled( TRUE );
-// m_encoding = QString::fromLatin1(KGlobal::locale()->encoding());
+// m_encoding = TQString::tqfromLatin1(KGlobal::locale()->encoding());
// m_stripWhiteSpaceInTextValuesChecked = true;
m_file = 0;
m_inputStream = 0;
- QVBoxLayout *lyr = new QVBoxLayout(plainPage(), 0, KDialogBase::spacingHint(), "lyr");
+ TQVBoxLayout *lyr = new TQVBoxLayout(plainPage(), 0, KDialogBase::spacingHint(), "lyr");
m_infoLbl = new KexiCSVInfoLabel(
m_mode==File ? i18n("Preview of data from file:")
@@ -204,8 +206,8 @@ KexiCSVImportDialog::KexiCSVImportDialog( Mode mode, KexiMainWindow* mainWin,
);
lyr->addWidget( m_infoLbl );
- QWidget* page = new QFrame( plainPage(), "page" );
- QGridLayout *glyr= new QGridLayout( page, 4, 5, 0, KDialogBase::spacingHint(), "glyr");
+ TQWidget* page = new TQFrame( plainPage(), "page" );
+ TQGridLayout *glyr= new TQGridLayout( page, 4, 5, 0, KDialogBase::spacingHint(), "glyr");
lyr->addWidget( page );
// Delimiter: comma, semicolon, tab, space, other
@@ -213,8 +215,8 @@ KexiCSVImportDialog::KexiCSVImportDialog( Mode mode, KexiMainWindow* mainWin,
m_detectDelimiter = true;
glyr->addMultiCellWidget( m_delimiterWidget, 1, 2, 0, 0 );
- QLabel *delimiterLabel = new QLabel(m_delimiterWidget, i18n("Delimiter:"), page);
- delimiterLabel->setAlignment(Qt::AlignAuto | Qt::AlignBottom);
+ TQLabel *delimiterLabel = new TQLabel(m_delimiterWidget, i18n("Delimiter:"), page);
+ delimiterLabel->tqsetAlignment(TQt::AlignAuto | TQt::AlignBottom);
glyr->addMultiCellWidget( delimiterLabel, 0, 0, 0, 0 );
// Format: number, text, currency,
@@ -227,49 +229,49 @@ KexiCSVImportDialog::KexiCSVImportDialog( Mode mode, KexiMainWindow* mainWin,
m_formatCombo->insertItem(i18n("Date/Time"));
glyr->addMultiCellWidget( m_formatCombo, 1, 1, 1, 1 );
- m_formatLabel = new QLabel(m_formatCombo, "", page);
- m_formatLabel->setAlignment(Qt::AlignAuto | Qt::AlignBottom);
+ m_formatLabel = new TQLabel(m_formatCombo, "", page);
+ m_formatLabel->tqsetAlignment(TQt::AlignAuto | TQt::AlignBottom);
glyr->addWidget( m_formatLabel, 0, 1 );
- m_primaryKeyField = new QCheckBox( i18n( "Primary key" ), page, "m_primaryKeyField" );
+ m_primaryKeyField = new TQCheckBox( i18n( "Primary key" ), page, "m_primaryKeyField" );
glyr->addWidget( m_primaryKeyField, 2, 1 );
- connect(m_primaryKeyField, SIGNAL(toggled(bool)), this, SLOT(slotPrimaryKeyFieldToggled(bool)));
+ connect(m_primaryKeyField, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotPrimaryKeyFieldToggled(bool)));
m_comboQuote = new KexiCSVTextQuoteComboBox( page );
glyr->addWidget( m_comboQuote, 1, 2 );
- TextLabel2 = new QLabel( m_comboQuote, i18n( "Text quote:" ), page, "TextLabel2" );
- TextLabel2->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Preferred );
- TextLabel2->setAlignment(Qt::AlignAuto | Qt::AlignBottom);
+ TextLabel2 = new TQLabel( m_comboQuote, i18n( "Text quote:" ), page, "TextLabel2" );
+ TextLabel2->tqsetSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Preferred );
+ TextLabel2->tqsetAlignment(TQt::AlignAuto | TQt::AlignBottom);
glyr->addWidget( TextLabel2, 0, 2 );
m_startAtLineSpinBox = new KIntSpinBox( page, "m_startAtLineSpinBox" );
m_startAtLineSpinBox->setMinValue(1);
- m_startAtLineSpinBox->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
- m_startAtLineSpinBox->setMinimumWidth(QFontMetrics(m_startAtLineSpinBox->font()).width("8888888"));
+ m_startAtLineSpinBox->tqsetSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
+ m_startAtLineSpinBox->setMinimumWidth(TQFontMetrics(m_startAtLineSpinBox->font()).width("8888888"));
glyr->addWidget( m_startAtLineSpinBox, 1, 3 );
- m_startAtLineLabel = new QLabel( m_startAtLineSpinBox, "",
+ m_startAtLineLabel = new TQLabel( m_startAtLineSpinBox, "",
page, "TextLabel3" );
- m_startAtLineLabel->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Preferred );
- m_startAtLineLabel->setAlignment(Qt::AlignAuto | Qt::AlignBottom);
+ m_startAtLineLabel->tqsetSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Preferred );
+ m_startAtLineLabel->tqsetAlignment(TQt::AlignAuto | TQt::AlignBottom);
glyr->addWidget( m_startAtLineLabel, 0, 3 );
- QSpacerItem* spacer_2 = new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Preferred );
+ TQSpacerItem* spacer_2 = new TQSpacerItem( 0, 0, TQSizePolicy::Minimum, TQSizePolicy::Preferred );
glyr->addItem( spacer_2, 0, 4 );
- m_ignoreDuplicates = new QCheckBox( page, "m_ignoreDuplicates" );
+ m_ignoreDuplicates = new TQCheckBox( page, "m_ignoreDuplicates" );
m_ignoreDuplicates->setText( i18n( "Ignore duplicated delimiters" ) );
glyr->addMultiCellWidget( m_ignoreDuplicates, 2, 2, 2, 4 );
- m_1stRowForFieldNames = new QCheckBox( page, "m_1stRowForFieldNames" );
+ m_1stRowForFieldNames = new TQCheckBox( page, "m_1stRowForFieldNames" );
m_1stRowForFieldNames->setText( i18n( "First row contains column names" ) );
glyr->addMultiCellWidget( m_1stRowForFieldNames, 3, 3, 2, 4 );
m_table = new KexiCSVImportDialogTable( plainPage(), "m_table" );
lyr->addWidget( m_table );
- m_table->setSizePolicy( QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding, 1, 1) );
+ m_table->tqsetSizePolicy( TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding, 1, 1) );
m_table->setNumRows( 0 );
m_table->setNumCols( 0 );
@@ -278,7 +280,7 @@ KexiCSVImportDialog::KexiCSVImportDialog( Mode mode, KexiMainWindow* mainWin,
if ( m_mode == Clipboard )
{
setCaption( i18n( "Inserting From Clipboard" ) );
- QMimeSource * mime = QApplication::clipboard()->data();
+ TQMimeSource * mime = TQApplication::tqclipboard()->data();
if ( !mime )
{
KMessageBox::information( this, i18n("There is no data in the clipboard.") );
@@ -292,22 +294,22 @@ if ( m_mode == Clipboard )
m_cancelled = true;
return;
}
- m_fileArray = QByteArray(mime->encodedData( "text/plain" ) );
+ m_fileArray = TQByteArray(mime->tqencodedData( "text/plain" ) );
}
else if ( mode == File )
{*/
- m_dateRegExp = QRegExp("(\\d{1,4})([/\\-\\.])(\\d{1,2})([/\\-\\.])(\\d{1,4})");
- m_timeRegExp1 = QRegExp("(\\d{1,2}):(\\d{1,2}):(\\d{1,2})");
- m_timeRegExp2 = QRegExp("(\\d{1,2}):(\\d{1,2})");
- m_fpNumberRegExp = QRegExp("[\\-]{0,1}\\d*[,\\.]\\d+");
- QString caption( i18n("Open CSV Data File") );
+ m_dateRegExp = TQRegExp("(\\d{1,4})([/\\-\\.])(\\d{1,2})([/\\-\\.])(\\d{1,4})");
+ m_timeRegExp1 = TQRegExp("(\\d{1,2}):(\\d{1,2}):(\\d{1,2})");
+ m_timeRegExp2 = TQRegExp("(\\d{1,2}):(\\d{1,2})");
+ m_fpNumberRegExp = TQRegExp("[\\-]{0,1}\\d*[,\\.]\\d+");
+ TQString caption( i18n("Open CSV Data File") );
if (m_mode == File) {
- QStringList mimetypes( csvMimeTypes() );
-#ifdef Q_WS_WIN
+ TQStringList mimetypes( csvMimeTypes() );
+#ifdef TQ_WS_WIN
//! @todo remove
- QString recentDir = KGlobalSettings::documentPath();
- m_fname = QFileDialog::getOpenFileName(
+ TQString recentDir = KGlobalSettings::documentPath();
+ m_fname = TQFileDialog::getOpenFileName(
KFileDialog::getStartURL(":CSVImportExport", recentDir).path(),
KexiUtils::fileDialogFilterStrings(mimetypes, false),
page, "KexiCSVImportDialog", caption);
@@ -327,18 +329,18 @@ if ( m_mode == Clipboard )
{
actionButton( Ok )->setEnabled( false );
m_cancelled = true;
- if (parentWidget())
- parentWidget()->raise();
+ if (tqparentWidget())
+ tqparentWidget()->raise();
return;
}
}
else if (m_mode == Clipboard) {
- QCString subtype("plain");
- m_clipboardData = QApplication::clipboard()->text(subtype, QClipboard::Clipboard);
+ TQCString subtype("plain");
+ m_clipboardData = TQApplication::tqclipboard()->text(subtype, TQClipboard::Clipboard);
/* debug
- for (int i=0;QApplication::clipboard()->data(QClipboard::Clipboard)->format(i);i++)
+ for (int i=0;TQApplication::tqclipboard()->data(TQClipboard::Clipboard)->format(i);i++)
kdDebug() << i << ": "
- << QApplication::clipboard()->data(QClipboard::Clipboard)->format(i) << endl;
+ << TQApplication::tqclipboard()->data(TQClipboard::Clipboard)->format(i) << endl;
*/
}
else {
@@ -350,7 +352,7 @@ if ( m_mode == Clipboard )
if (m_mode == File) {
m_loadingProgressDlg = new KProgressDialog(
this, "m_loadingProgressDlg", i18n("Loading CSV Data"), i18n("Loading CSV Data from \"%1\"...")
- .arg(QDir::convertSeparators(m_fname)), true);
+ .tqarg(TQDir::convertSeparators(m_fname)), true);
m_loadingProgressDlg->progressBar()->setTotalSteps( m_maximumRowsForPreview+1 );
m_loadingProgressDlg->show();
}
@@ -360,28 +362,28 @@ if ( m_mode == Clipboard )
}
//updateRowCountInfo();
- m_table->setSelectionMode(QTable::NoSelection);
-
- connect(m_formatCombo, SIGNAL(activated(int)),
- this, SLOT(formatChanged(int)));
- connect(m_delimiterWidget, SIGNAL(delimiterChanged(const QString&)),
- this, SLOT(delimiterChanged(const QString&)));
- connect(m_startAtLineSpinBox, SIGNAL(valueChanged ( int )),
- this, SLOT(startlineSelected(int)));
- connect(m_comboQuote, SIGNAL(activated(int)),
- this, SLOT(textquoteSelected(int)));
- connect(m_table, SIGNAL(currentChanged(int, int)),
- this, SLOT(currentCellChanged(int, int)));
- connect(m_table, SIGNAL(valueChanged(int,int)),
- this, SLOT(cellValueChanged(int,int)));
- connect(m_ignoreDuplicates, SIGNAL(stateChanged(int)),
- this, SLOT(ignoreDuplicatesChanged(int)));
- connect(m_1stRowForFieldNames, SIGNAL(stateChanged(int)),
- this, SLOT(slot1stRowForFieldNamesChanged(int)));
-
- connect(this, SIGNAL(user1Clicked()), this, SLOT(optionsButtonClicked()));
-
- installRecursiveEventFilter(this, this);
+ m_table->setSelectionMode(TQTable::NoSelection);
+
+ connect(m_formatCombo, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(formatChanged(int)));
+ connect(m_delimiterWidget, TQT_SIGNAL(delimiterChanged(const TQString&)),
+ this, TQT_SLOT(delimiterChanged(const TQString&)));
+ connect(m_startAtLineSpinBox, TQT_SIGNAL(valueChanged ( int )),
+ this, TQT_SLOT(startlineSelected(int)));
+ connect(m_comboQuote, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(textquoteSelected(int)));
+ connect(m_table, TQT_SIGNAL(currentChanged(int, int)),
+ this, TQT_SLOT(currentCellChanged(int, int)));
+ connect(m_table, TQT_SIGNAL(valueChanged(int,int)),
+ this, TQT_SLOT(cellValueChanged(int,int)));
+ connect(m_ignoreDuplicates, TQT_SIGNAL(stateChanged(int)),
+ this, TQT_SLOT(ignoreDuplicatesChanged(int)));
+ connect(m_1stRowForFieldNames, TQT_SIGNAL(stateChanged(int)),
+ this, TQT_SLOT(slot1stRowForFieldNamesChanged(int)));
+
+ connect(this, TQT_SIGNAL(user1Clicked()), this, TQT_SLOT(optionsButtonClicked()));
+
+ installRecursiveEventFilter(TQT_TQOBJECT(this), TQT_TQOBJECT(this));
initLater();
}
@@ -404,7 +406,7 @@ void KexiCSVImportDialog::initLater()
if (m_dialogCancelled) {
// m_loadingProgressDlg->hide();
// m_loadingProgressDlg->close();
- QTimer::singleShot(0, this, SLOT(reject()));
+ TQTimer::singleShot(0, this, TQT_SLOT(reject()));
return;
}
@@ -431,18 +433,18 @@ bool KexiCSVImportDialog::openData()
m_file->close();
delete m_file;
}
- m_file = new QFile(m_fname);
+ m_file = new TQFile(m_fname);
if (!m_file->open(IO_ReadOnly))
{
m_file->close();
delete m_file;
m_file = 0;
KMessageBox::sorry( this, i18n("Cannot open input file <nobr>\"%1\"</nobr>.")
- .arg(QDir::convertSeparators(m_fname)) );
+ .tqarg(TQDir::convertSeparators(m_fname)) );
actionButton( Ok )->setEnabled( false );
m_cancelled = true;
- if (parentWidget())
- parentWidget()->raise();
+ if (tqparentWidget())
+ tqparentWidget()->raise();
return false;
}
return true;
@@ -456,9 +458,9 @@ bool KexiCSVImportDialog::cancelled() const
void KexiCSVImportDialog::fillTable()
{
KexiUtils::WaitCursor wc(true);
- repaint();
+ tqrepaint();
m_blockUserEvents = true;
- QPushButton *pb = actionButton(KDialogBase::Cancel);
+ TQPushButton *pb = actionButton(KDialogBase::Cancel);
if (pb)
pb->setEnabled(true); //allow to cancel
KexiUtils::WaitCursor wait;
@@ -467,7 +469,7 @@ void KexiCSVImportDialog::fillTable()
m_table->setCurrentCell(0,0);
int row, column, maxColumn;
- QString field = QString::null;
+ TQString field = TQString();
for (row = 0; row < m_table->numRows(); ++row)
for (column = 0; column < m_table->numCols(); ++column)
@@ -489,17 +491,17 @@ void KexiCSVImportDialog::fillTable()
{
setText(row - m_startline, column, field, true);
++row;
- field = QString::null;
+ field = TQString();
}
adjustRows( row - m_startline - (m_1stRowForFieldNames->isChecked()?1:0) );
- maxColumn = QMAX( maxColumn, column );
+ maxColumn = TQMAX( maxColumn, column );
m_table->setNumCols(maxColumn);
for (column = 0; column < m_table->numCols(); ++column)
{
-// QString header = m_table->horizontalHeader()->label(column);
+// TQString header = m_table->horizontalHeader()->label(column);
// if (header != i18n("Text") && header != i18n("Number") &&
// header != i18n("Date") && header != i18n("Currency"))
// const int detectedType = m_detectedTypes[column+1];
@@ -522,44 +524,44 @@ void KexiCSVImportDialog::fillTable()
if (m_primaryKeyColumn != -1)
m_table->setPixmap(0, m_primaryKeyColumn, m_pkIcon);
- const int count = QMAX(0, m_table->numRows()-1+m_startline);
+ const int count = TQMAX(0, m_table->numRows()-1+m_startline);
m_allRowsLoadedInPreview = count < m_maximumRowsForPreview && !m_stoppedAt_MAX_BYTES_TO_PREVIEW;
if (m_allRowsLoadedInPreview) {
m_startAtLineSpinBox->setMaxValue(count);
m_startAtLineSpinBox->setValue(m_startline+1);
}
- m_startAtLineLabel->setText(i18n( "Start at line%1:").arg(
- m_allRowsLoadedInPreview ? QString(" (1-%1)").arg(count)
- : QString::null //we do not know what's real count
+ m_startAtLineLabel->setText(i18n( "Start at line%1:").tqarg(
+ m_allRowsLoadedInPreview ? TQString(" (1-%1)").tqarg(count)
+ : TQString() //we do not know what's real count
));
updateRowCountInfo();
m_blockUserEvents = false;
- repaint();
- m_table->verticalScrollBar()->repaint();//avoid missing repaint
- m_table->horizontalScrollBar()->repaint();//avoid missing repaint
+ tqrepaint();
+ m_table->verticalScrollBar()->tqrepaint();//avoid missing tqrepaint
+ m_table->horizontalScrollBar()->tqrepaint();//avoid missing tqrepaint
}
-QString KexiCSVImportDialog::detectDelimiterByLookingAtFirstBytesOfFile(QTextStream& inputStream)
+TQString KexiCSVImportDialog::detectDelimiterByLookingAtFirstBytesOfFile(TQTextStream& inputStream)
{
m_file->at(0);
// try to detect delimiter
// \t has priority, then ; then ,
- const QIODevice::Offset origOffset = inputStream.device()->at();
- QChar c, prevChar=0;
+ const TQIODevice::Offset origOffset = inputStream.tqdevice()->at();
+ TQChar c, prevChar=0;
int detectedDelimiter = 0;
bool insideQuote = false;
//characters by priority
- const int CH_TAB_AFTER_QUOTE = 500;
- const int CH_SEMICOLON_AFTER_QUOTE = 499;
- const int CH_COMMA_AFTER_QUOTE = 498;
+ const int CH_TAB_AFTER_TQUOTE = 500;
+ const int CH_SEMICOLON_AFTER_TQUOTE = 499;
+ const int CH_COMMA_AFTER_TQUOTE = 498;
const int CH_TAB = 200; // \t
const int CH_SEMICOLON = 199; // ;
const int CH_COMMA = 198; // ,
- QValueList<int> tabsPerLine, semicolonsPerLine, commasPerLine;
+ TQValueList<int> tabsPerLine, semicolonsPerLine, commasPerLine;
int tabs = 0, semicolons = 0, commas = 0;
int line = 0;
for (uint i=0; !inputStream.atEnd() && i < MAX_CHARS_TO_SCAN_WHILE_DETECTING_DELIMITER; i++) {
@@ -586,24 +588,24 @@ QString KexiCSVImportDialog::detectDelimiterByLookingAtFirstBytesOfFile(QTextStr
}
else if (c=='\t') {
tabs++;
- detectedDelimiter = QMAX( prevChar=='"' ? CH_TAB_AFTER_QUOTE : CH_TAB, detectedDelimiter );
+ detectedDelimiter = TQMAX( prevChar=='"' ? CH_TAB_AFTER_TQUOTE : CH_TAB, detectedDelimiter );
}
else if (c==';') {
semicolons++;
- detectedDelimiter = QMAX( prevChar=='"' ? CH_SEMICOLON_AFTER_QUOTE : CH_SEMICOLON, detectedDelimiter );
+ detectedDelimiter = TQMAX( prevChar=='"' ? CH_SEMICOLON_AFTER_TQUOTE : CH_SEMICOLON, detectedDelimiter );
}
else if (c==',') {
commas++;
- detectedDelimiter = QMAX( prevChar=='"' ? CH_COMMA_AFTER_QUOTE : CH_COMMA, detectedDelimiter );
+ detectedDelimiter = TQMAX( prevChar=='"' ? CH_COMMA_AFTER_TQUOTE : CH_COMMA, detectedDelimiter );
}
prevChar = c;
}
- inputStream.device()->at(origOffset); //restore orig. offset
+ inputStream.tqdevice()->at(origOffset); //restore orig. offset
//now, try to find a delimiter character that exists the same number of times in all the checked lines
//this detection method has priority over others
- QValueList<int>::ConstIterator it;
+ TQValueList<int>::ConstIterator it;
if (tabsPerLine.count()>1) {
tabs = tabsPerLine.isEmpty() ? 0 : tabsPerLine.first();
for (it=tabsPerLine.constBegin(); it!=tabsPerLine.constEnd(); ++it) {
@@ -632,54 +634,54 @@ QString KexiCSVImportDialog::detectDelimiterByLookingAtFirstBytesOfFile(QTextStr
return ",";
}
//now return the winning character by looking at CH_* symbol
- if (detectedDelimiter == CH_TAB_AFTER_QUOTE || detectedDelimiter == CH_TAB)
+ if (detectedDelimiter == CH_TAB_AFTER_TQUOTE || detectedDelimiter == CH_TAB)
return "\t";
- if (detectedDelimiter == CH_SEMICOLON_AFTER_QUOTE || detectedDelimiter == CH_SEMICOLON)
+ if (detectedDelimiter == CH_SEMICOLON_AFTER_TQUOTE || detectedDelimiter == CH_SEMICOLON)
return ";";
- if (detectedDelimiter == CH_COMMA_AFTER_QUOTE || detectedDelimiter == CH_COMMA)
+ if (detectedDelimiter == CH_COMMA_AFTER_TQUOTE || detectedDelimiter == CH_COMMA)
return ",";
return KEXICSV_DEFAULT_FILE_DELIMITER; //<-- default
}
-tristate KexiCSVImportDialog::loadRows(QString &field, int &row, int &column, int &maxColumn,
+tristate KexiCSVImportDialog::loadRows(TQString &field, int &row, int &column, int &maxColumn,
bool inGUI)
{
- enum { S_START, S_QUOTED_FIELD, S_MAYBE_END_OF_QUOTED_FIELD, S_END_OF_QUOTED_FIELD,
+ enum { S_START, S_TQUOTED_FIELD, S_MAYBE_END_OF_TQUOTED_FIELD, S_END_OF_TQUOTED_FIELD,
S_MAYBE_NORMAL_FIELD, S_NORMAL_FIELD } state = S_START;
- field = QString::null;
+ field = TQString();
const bool ignoreDups = m_ignoreDuplicates->isChecked();
bool lastCharDelimiter = false;
bool nextRow = false;
row = column = 1;
maxColumn = 0;
- QChar x;
+ TQChar x;
const bool hadInputStream = m_inputStream!=0;
delete m_inputStream;
if ( m_mode == Clipboard ) {
- m_inputStream = new QTextStream(m_clipboardData, IO_ReadOnly);
+ m_inputStream = new TQTextStream(m_clipboardData, IO_ReadOnly);
if (!hadInputStream)
m_delimiterWidget->setDelimiter(KEXICSV_DEFAULT_CLIPBOARD_DELIMITER);
}
else {
m_file->at(0); //always seek at 0 because loadRows() is called many times
- m_inputStream = new QTextStream(m_file);
+ m_inputStream = new TQTextStream(m_file);
if (m_options.defaultEncodingExplicitySet) {
- QTextCodec *codec = KGlobal::charsets()->codecForName(m_options.encoding);
+ TQTextCodec *codec = KGlobal::charsets()->codecForName(m_options.encoding);
if (codec)
- m_inputStream->setCodec(codec); //QTextCodec::codecForName("CP1250"));
+ m_inputStream->setCodec(codec); //TQTextCodec::codecForName("CP1250"));
}
if (m_detectDelimiter) {
- const QString delimiter( detectDelimiterByLookingAtFirstBytesOfFile(*m_inputStream) );
+ const TQString delimiter( detectDelimiterByLookingAtFirstBytesOfFile(*m_inputStream) );
if (m_delimiterWidget->delimiter() != delimiter)
m_delimiterWidget->setDelimiter( delimiter );
}
}
- const QChar delimiter(m_delimiterWidget->delimiter()[0]);
+ const TQChar delimiter(m_delimiterWidget->delimiter()[0]);
m_stoppedAt_MAX_BYTES_TO_PREVIEW = false;
int progressStep = 0;
if (m_importingProgressDlg)
- progressStep = QMAX( 1, m_importingProgressDlg->progressBar()->totalSteps()/200 );
+ progressStep = TQMAX( 1, m_importingProgressDlg->progressBar()->totalSteps()/200 );
int offset = 0;
for (;!m_inputStream->atEnd(); offset++)
{
@@ -690,7 +692,7 @@ tristate KexiCSVImportDialog::loadRows(QString &field, int &row, int &column, in
if (m_importingProgressDlg && ((offset % progressStep) < 5)) {
//update progr. bar dlg on final exporting
m_importingProgressDlg->progressBar()->setValue(offset);
- qApp->processEvents();
+ tqApp->processEvents();
if (m_importingProgressDlg->wasCancelled()) {
delete m_importingProgressDlg;
m_importingProgressDlg = 0;
@@ -703,10 +705,10 @@ tristate KexiCSVImportDialog::loadRows(QString &field, int &row, int &column, in
if (x == '\r') {
continue; // eat '\r', to handle RFC-compliant files
}
- if (offset==0 && x.unicode()==0xfeff) {
+ if (offset==0 && x.tqunicode()==0xfeff) {
// Ignore BOM, the "Byte Order Mark"
- // (http://en.wikipedia.org/wiki/Byte_Order_Mark, // http://www.unicode.org/charts/PDF/UFFF0.pdf)
- // Probably fixed in Qt4.
+ // (http://en.wikipedia.org/wiki/Byte_Order_Mark, // http://www.tqunicode.org/charts/PDF/UFFF0.pdf)
+ // Probably fixed in TQt4.
continue;
}
@@ -715,12 +717,12 @@ tristate KexiCSVImportDialog::loadRows(QString &field, int &row, int &column, in
case S_START :
if (x == m_textquote)
{
- state = S_QUOTED_FIELD;
+ state = S_TQUOTED_FIELD;
}
else if (x == delimiter)
{
setText(row - m_startline, column, field, inGUI);
- field = QString::null;
+ field = TQString();
if ((ignoreDups == false) || (lastCharDelimiter == false))
++column;
lastCharDelimiter = true;
@@ -730,11 +732,11 @@ tristate KexiCSVImportDialog::loadRows(QString &field, int &row, int &column, in
if (!inGUI) {
//fill remaining empty fields (database wants them explicitly)
for (int additionalColumn = column; additionalColumn <= maxColumn; additionalColumn++) {
- setText(row - m_startline, additionalColumn, QString::null, inGUI);
+ setText(row - m_startline, additionalColumn, TQString(), inGUI);
}
}
nextRow = true;
- maxColumn = QMAX( maxColumn, column );
+ maxColumn = TQMAX( maxColumn, column );
column = 1;
}
else
@@ -743,10 +745,10 @@ tristate KexiCSVImportDialog::loadRows(QString &field, int &row, int &column, in
state = S_MAYBE_NORMAL_FIELD;
}
break;
- case S_QUOTED_FIELD :
+ case S_TQUOTED_FIELD :
if (x == m_textquote)
{
- state = S_MAYBE_END_OF_QUOTED_FIELD;
+ state = S_MAYBE_END_OF_TQUOTED_FIELD;
}
/*allow \n inside quoted fields
else if (x == '\n')
@@ -756,7 +758,7 @@ tristate KexiCSVImportDialog::loadRows(QString &field, int &row, int &column, in
if (x == '\n')
{
nextRow = true;
- maxColumn = QMAX( maxColumn, column );
+ maxColumn = TQMAX( maxColumn, column );
column = 1;
}
else
@@ -772,20 +774,20 @@ tristate KexiCSVImportDialog::loadRows(QString &field, int &row, int &column, in
field += x;
}
break;
- case S_MAYBE_END_OF_QUOTED_FIELD :
+ case S_MAYBE_END_OF_TQUOTED_FIELD :
if (x == m_textquote)
{
field += x; //no, this was just escaped quote character
- state = S_QUOTED_FIELD;
+ state = S_TQUOTED_FIELD;
}
else if (x == delimiter || x == '\n')
{
setText(row - m_startline, column, field, inGUI);
- field = QString::null;
+ field = TQString();
if (x == '\n')
{
nextRow = true;
- maxColumn = QMAX( maxColumn, column );
+ maxColumn = TQMAX( maxColumn, column );
column = 1;
}
else
@@ -798,18 +800,18 @@ tristate KexiCSVImportDialog::loadRows(QString &field, int &row, int &column, in
}
else
{
- state = S_END_OF_QUOTED_FIELD;
+ state = S_END_OF_TQUOTED_FIELD;
}
break;
- case S_END_OF_QUOTED_FIELD :
+ case S_END_OF_TQUOTED_FIELD :
if (x == delimiter || x == '\n')
{
setText(row - m_startline, column, field, inGUI);
- field = QString::null;
+ field = TQString();
if (x == '\n')
{
nextRow = true;
- maxColumn = QMAX( maxColumn, column );
+ maxColumn = TQMAX( maxColumn, column );
column = 1;
}
else
@@ -822,25 +824,25 @@ tristate KexiCSVImportDialog::loadRows(QString &field, int &row, int &column, in
}
else
{
- state = S_END_OF_QUOTED_FIELD;
+ state = S_END_OF_TQUOTED_FIELD;
}
break;
case S_MAYBE_NORMAL_FIELD :
if (x == m_textquote)
{
- field = QString::null;
- state = S_QUOTED_FIELD;
+ field = TQString();
+ state = S_TQUOTED_FIELD;
break;
}
case S_NORMAL_FIELD :
if (x == delimiter || x == '\n')
{
setText(row - m_startline, column, field, inGUI);
- field = QString::null;
+ field = TQString();
if (x == '\n')
{
nextRow = true;
- maxColumn = QMAX( maxColumn, column );
+ maxColumn = TQMAX( maxColumn, column );
column = 1;
}
else
@@ -880,12 +882,12 @@ tristate KexiCSVImportDialog::loadRows(QString &field, int &row, int &column, in
m_1stRowForFieldNames->setChecked(true); //this will reload table
//slot1stRowForFieldNamesChanged(1);
m_blockUserEvents = false;
- repaint();
+ tqrepaint();
return false;
}
if (!m_importingProgressDlg && row % 20 == 0) {
- qApp->processEvents();
+ tqApp->processEvents();
//only for GUI mode:
if (!m_firstFillTableCall && m_loadingProgressDlg && m_loadingProgressDlg->wasCancelled()) {
delete m_loadingProgressDlg;
@@ -897,7 +899,7 @@ tristate KexiCSVImportDialog::loadRows(QString &field, int &row, int &column, in
}
if (!m_firstFillTableCall && m_loadingProgressDlg) {
- m_loadingProgressDlg->progressBar()->setValue(QMIN(m_maximumRowsForPreview, row));
+ m_loadingProgressDlg->progressBar()->setValue(TQMIN(m_maximumRowsForPreview, row));
}
if ( inGUI && row > (m_maximumRowsForPreview + (m_1stRowForFieldNamesDetected?1:0)) ) {
@@ -920,11 +922,11 @@ tristate KexiCSVImportDialog::loadRows(QString &field, int &row, int &column, in
void KexiCSVImportDialog::updateColumnText(int col)
{
- QString colName;
+ TQString colName;
if (col<(int)m_columnNames.count() && (m_1stRowForFieldNames->isChecked() || m_changedColumnNames[col]))
colName = m_columnNames[ col ];
if (colName.isEmpty()) {
- colName = i18n("Column %1").arg(col+1); //will be changed to a valid identifier on import
+ colName = i18n("Column %1").tqarg(col+1); //will be changed to a valid identifier on import
m_changedColumnNames[ col ] = false;
}
int detectedType = m_detectedTypes[col];
@@ -935,15 +937,15 @@ void KexiCSVImportDialog::updateColumnText(int col)
detectedType=_TEXT_TYPE;
}
m_table->horizontalHeader()->setLabel(col,
- i18n("Column %1").arg(col+1) + " \n(" + m_typeNames[ detectedType ] + ") ");
+ i18n("Column %1").tqarg(col+1) + " \n(" + m_typeNames[ detectedType ] + ") ");
m_table->setText(0, col, colName);
m_table->horizontalHeader()->adjustHeaderSize();
//check uniqueness
- QValueList<int> *list = m_uniquenessTest[col];
+ TQValueList<int> *list = m_uniquenessTest[col];
if (m_primaryKeyColumn==-1 && list && !list->isEmpty()) {
qHeapSort(*list);
- QValueList<int>::ConstIterator it=list->constBegin();
+ TQValueList<int>::ConstIterator it=list->constBegin();
int prevValue = *it;
++it;
for(; it!=list->constEnd() && prevValue!=(*it); ++it)
@@ -963,7 +965,7 @@ void KexiCSVImportDialog::updateColumnText(int col)
list->clear();
}
-void KexiCSVImportDialog::detectTypeAndUniqueness(int row, int col, const QString& text)
+void KexiCSVImportDialog::detectTypeAndUniqueness(int row, int col, const TQString& text)
{
int intValue;
const int type = m_detectedTypes[col];
@@ -1015,14 +1017,14 @@ void KexiCSVImportDialog::detectTypeAndUniqueness(int row, int col, const QStrin
if (row==1 || type==_NO_TYPE_YET) {
bool detected = text.isEmpty();
if (!detected) {
- const QStringList dateTimeList( QStringList::split(" ", text) );
+ const TQStringList dateTimeList( TQStringList::split(" ", text) );
bool ok = dateTimeList.count()>=2;
//! @todo also support ISODateTime's "T" separator?
//! @todo also support timezones?
if (ok) {
//try all combinations
- QString datePart( dateTimeList[0].stripWhiteSpace() );
- QString timePart( dateTimeList[1].stripWhiteSpace() );
+ TQString datePart( dateTimeList[0].stripWhiteSpace() );
+ TQString timePart( dateTimeList[1].stripWhiteSpace() );
ok = m_dateRegExp.exactMatch(datePart)
&& (m_timeRegExp1.exactMatch(timePart) || m_timeRegExp2.exactMatch(timePart));
}
@@ -1042,10 +1044,10 @@ void KexiCSVImportDialog::detectTypeAndUniqueness(int row, int col, const QStrin
//default: text type (already set)
}
//check uniqueness for this value
- QValueList<int> *list = m_uniquenessTest[col];
+ TQValueList<int> *list = m_uniquenessTest[col];
if (row==1 && (!list || !list->isEmpty()) && !text.isEmpty() && _NUMBER_TYPE == m_detectedTypes[col]) {
if (!list) {
- list = new QValueList<int>();
+ list = new TQValueList<int>();
m_uniquenessTest.insert(col, list);
}
list->append( intValue );
@@ -1057,7 +1059,7 @@ void KexiCSVImportDialog::detectTypeAndUniqueness(int row, int col, const QStrin
}
}
-bool KexiCSVImportDialog::parseDate(const QString& text, QDate& date)
+bool KexiCSVImportDialog::parseDate(const TQString& text, TQDate& date)
{
if (!m_dateRegExp.exactMatch(text))
return false;
@@ -1065,77 +1067,77 @@ bool KexiCSVImportDialog::parseDate(const QString& text, QDate& date)
//1 2 3 4 5 <- pos
const int d1 = m_dateRegExp.cap(1).toInt(), d3 = m_dateRegExp.cap(3).toInt(), d5 = m_dateRegExp.cap(5).toInt();
if (m_dateRegExp.cap(2)=="/") //probably separator for american format mm/dd/yyyy
- date = QDate(d5, d1, d3);
+ date = TQDate(d5, d1, d3);
else {
if (d5 > 31) //d5 == year
- date = QDate(d5, d3, d1);
+ date = TQDate(d5, d3, d1);
else //d1 == year
- date = QDate(d1, d3, d5);
+ date = TQDate(d1, d3, d5);
}
return date.isValid();
}
-bool KexiCSVImportDialog::parseTime(const QString& text, QTime& time)
+bool KexiCSVImportDialog::parseTime(const TQString& text, TQTime& time)
{
- time = QTime::fromString(text, Qt::ISODate); //same as m_timeRegExp1
+ time = TQTime::fromString(text, Qt::ISODate); //same as m_timeRegExp1
if (time.isValid())
return true;
if (m_timeRegExp2.exactMatch(text)) { //hh:mm:ss
- time = QTime(m_timeRegExp2.cap(1).toInt(), m_timeRegExp2.cap(3).toInt(), m_timeRegExp2.cap(5).toInt());
+ time = TQTime(m_timeRegExp2.cap(1).toInt(), m_timeRegExp2.cap(3).toInt(), m_timeRegExp2.cap(5).toInt());
return true;
}
return false;
}
-void KexiCSVImportDialog::setText(int row, int col, const QString& text, bool inGUI)
+void KexiCSVImportDialog::setText(int row, int col, const TQString& text, bool inGUI)
{
if (!inGUI) {
//save text directly to database buffer
if (col==1) { //1st col
m_importingStatement->clearArguments();
if (m_implicitPrimaryKeyAdded)
- *m_importingStatement << QVariant(); //id will be autogenerated here
+ *m_importingStatement << TQVariant(); //id will be autogenerated here
}
const int detectedType = m_detectedTypes[col-1];
if (detectedType==_NUMBER_TYPE) {
- *m_importingStatement << ( text.isEmpty() ? QVariant() : text.toInt() );
+ *m_importingStatement << ( text.isEmpty() ? TQVariant() : text.toInt() );
//! @todo what about time and float/double types and different integer subtypes?
}
else if (detectedType==_FP_NUMBER_TYPE) {
- //replace ',' with '.'
- QCString t(text.latin1());
+ //tqreplace ',' with '.'
+ TQCString t(text.latin1());
const int textLen = t.length();
for (int i=0; i<textLen; i++) {
- if (t.at(i)==',') {
- t.at(i) = '.';
+ if (t.tqat(i)==',') {
+ t.tqat(i) = '.';
break;
}
}
- *m_importingStatement << ( t.isEmpty() ? QVariant() : t.toDouble() );
+ *m_importingStatement << ( t.isEmpty() ? TQVariant() : t.toDouble() );
}
else if (detectedType==_DATE_TYPE) {
- QDate date;
+ TQDate date;
if (parseDate(text, date))
*m_importingStatement << date;
}
else if (detectedType==_TIME_TYPE) {
- QTime time;
+ TQTime time;
if (parseTime(text, time))
*m_importingStatement << time;
}
else if (detectedType==_DATETIME_TYPE) {
- QStringList dateTimeList( QStringList::split(" ", text) );
+ TQStringList dateTimeList( TQStringList::split(" ", text) );
if (dateTimeList.count()<2)
- dateTimeList = QStringList::split("T", text); //also support ISODateTime's "T" separator
+ dateTimeList = TQStringList::split("T", text); //also support ISODateTime's "T" separator
//! @todo also support timezones?
if (dateTimeList.count()>=2) {
- QString datePart( dateTimeList[0].stripWhiteSpace() );
- QDate date;
+ TQString datePart( dateTimeList[0].stripWhiteSpace() );
+ TQDate date;
if (parseDate(datePart, date)) {
- QString timePart( dateTimeList[1].stripWhiteSpace() );
- QTime time;
+ TQString timePart( dateTimeList[1].stripWhiteSpace() );
+ TQTime time;
if (parseTime(timePart, time))
- *m_importingStatement << QDateTime(date, time);
+ *m_importingStatement << TQDateTime(date, time);
}
}
}
@@ -1154,10 +1156,10 @@ void KexiCSVImportDialog::setText(int row, int col, const QString& text, bool in
if (m_1stRowForFieldNames->isChecked()) {
if ((row+m_startline)==1) {//this is for column name
- if ((col-1) < (int)m_changedColumnNames.size() && false==m_changedColumnNames[col-1]) {
+ if ((col-1) < (int)m_changedColumnNames.size() && (int)false==(int)m_changedColumnNames[col-1]) {
//this column has no custom name entered by a user
//-get the name from the data cell
- QString colName(text.simplifyWhiteSpace());
+ TQString colName(text.simplifyWhiteSpace());
if (!colName.isEmpty()) {
if (colName.left(1)>="0" && colName.left(1)<="9")
colName.prepend(i18n("Column")+" ");
@@ -1170,7 +1172,7 @@ void KexiCSVImportDialog::setText(int row, int col, const QString& text, bool in
else {
if ((row+m_startline)==1) {//this row is for column name
if (m_1stRowForFieldNamesDetected && !m_1stRowForFieldNames->isChecked()) {
- QString f( text.simplifyWhiteSpace() );
+ TQString f( text.simplifyWhiteSpace() );
if (f.isEmpty() || !f[0].isLetter())
m_1stRowForFieldNamesDetected = false; //this couldn't be a column name
}
@@ -1191,7 +1193,7 @@ void KexiCSVImportDialog::setText(int row, int col, const QString& text, bool in
}
m_table->setText(row - 1, col - 1, (m_options.stripWhiteSpaceInTextValuesChecked ? text.stripWhiteSpace() : text));
- m_table->verticalHeader()->setLabel(row-1, QString::number(row-1));
+ m_table->verticalHeader()->setLabel(row-1, TQString::number(row-1));
detectTypeAndUniqueness(row-1, col-1, text);
}
@@ -1225,7 +1227,7 @@ void KexiCSVImportDialog::formatChanged(int id)
{
if (id==_PK_FLAG) {
if (m_primaryKeyColumn>=0 && m_primaryKeyColumn<m_table->numCols()) {
- m_table->setPixmap(0, m_primaryKeyColumn, QPixmap());
+ m_table->setPixmap(0, m_primaryKeyColumn, TQPixmap());
}
if (m_primaryKeyField->isChecked()) {
m_primaryKeyColumn = m_table->currentColumn();
@@ -1243,18 +1245,18 @@ void KexiCSVImportDialog::formatChanged(int id)
updateColumnText(m_table->currentColumn());
}
-void KexiCSVImportDialog::delimiterChanged(const QString& delimiter)
+void KexiCSVImportDialog::delimiterChanged(const TQString& delimiter)
{
Q_UNUSED(delimiter);
m_columnsAdjusted = false;
m_detectDelimiter = false; //selected by hand: do not detect in the future
- //delayed, otherwise combobox won't be repainted
+ //delayed, otherwise combobox won't be tqrepainted
fillTableLater();
}
void KexiCSVImportDialog::textquoteSelected(int)
{
- const QString tq(m_comboQuote->textQuote());
+ const TQString tq(m_comboQuote->textQuote());
if (tq.isEmpty())
m_textquote = 0;
else
@@ -1262,14 +1264,14 @@ void KexiCSVImportDialog::textquoteSelected(int)
kexipluginsdbg << "KexiCSVImportDialog::textquoteSelected(): " << m_textquote << endl;
- //delayed, otherwise combobox won't be repainted
+ //delayed, otherwise combobox won't be tqrepainted
fillTableLater();
}
void KexiCSVImportDialog::fillTableLater()
{
m_table->setNumRows( 0 );
- QTimer::singleShot(10, this, SLOT(fillTable()));
+ TQTimer::singleShot(10, this, TQT_SLOT(fillTable()));
}
void KexiCSVImportDialog::startlineSelected(int startline)
@@ -1293,7 +1295,7 @@ void KexiCSVImportDialog::currentCellChanged(int, int col)
type=_NUMBER_TYPE; //we're simplifying that for now
m_formatCombo->setCurrentItem( type );
- m_formatLabel->setText( m_formatComboText.arg(col+1) );
+ m_formatLabel->setText( m_formatComboText.tqarg(col+1) );
m_primaryKeyField->setEnabled( _NUMBER_TYPE == m_detectedTypes[col]);
m_primaryKeyField->blockSignals(true); //block to disable executing slotPrimaryKeyFieldToggled()
m_primaryKeyField->setChecked( m_primaryKeyColumn == col );
@@ -1341,12 +1343,12 @@ void KexiCSVImportDialog::accept()
}
//get suggested name based on the file name
- QString suggestedName;
+ TQString suggestedName;
if (m_mode==File) {
suggestedName = KURL::fromPathOrURL(m_fname).fileName();
//remove extension
if (!suggestedName.isEmpty()) {
- const int idx = suggestedName.findRev(".");
+ const int idx = suggestedName.tqfindRev(".");
if (idx!=-1)
suggestedName = suggestedName.mid(0, idx ).simplifyWhiteSpace();
}
@@ -1395,7 +1397,7 @@ void KexiCSVImportDialog::accept()
i18n("No Primary Key (autonumber) has been defined.\n"
"Should it be automatically defined on import (recommended)?\n\n"
"Note: An imported table without a Primary Key may not be editable (depending on database type)."),
- QString::null, KGuiItem(i18n("Add Database Primary Key to a Table", "Add Primary Key"), "key"),
+ TQString(), KGuiItem(i18n("Add Database Primary Key to a Table", "Add Primary Key"), "key"),
KGuiItem(i18n("Do Not Add Database Primary Key to a Table", "Do Not Add")))))
{
if (msgboxResult == KMessageBox::Cancel)
@@ -1405,19 +1407,19 @@ void KexiCSVImportDialog::accept()
//! @todo make this field hidden (what about e.g. pgsql?)
m_implicitPrimaryKeyAdded = true;
- QString fieldName("id");
- QString fieldCaption("Id");
+ TQString fieldName("id");
+ TQString fieldCaption("Id");
- QStringList colnames;
+ TQStringList colnames;
for (uint col = 0; col < numCols; col++)
colnames.append( m_table->text(0, col).lower().simplifyWhiteSpace() );
- if (colnames.find(fieldName)!=colnames.end()) {
+ if (colnames.tqfind(fieldName)!=colnames.end()) {
int num = 1;
- while (colnames.find(fieldName+QString::number(num))!=colnames.end())
+ while (colnames.tqfind(fieldName+TQString::number(num))!=colnames.end())
num++;
- fieldName += QString::number(num);
- fieldCaption += QString::number(num);
+ fieldName += TQString::number(num);
+ fieldCaption += TQString::number(num);
}
KexiDB::Field *field = new KexiDB::Field(
fieldName,
@@ -1425,7 +1427,7 @@ void KexiCSVImportDialog::accept()
KexiDB::Field::NoConstraints,
KexiDB::Field::NoOptions,
0,0, //uint length=0, uint precision=0,
- QVariant(), //QVariant defaultValue=QVariant(),
+ TQVariant(), //TQVariant defaultValue=TQVariant(),
fieldCaption
); //no description and width for now
field->setPrimaryKey(true);
@@ -1434,19 +1436,19 @@ void KexiCSVImportDialog::accept()
}
for (uint col = 0; col < numCols; col++) {
- QString fieldCaption( m_table->text(0, col).simplifyWhiteSpace() );
- QString fieldName( KexiUtils::string2Identifier( fieldCaption ) );
+ TQString fieldCaption( m_table->text(0, col).simplifyWhiteSpace() );
+ TQString fieldName( KexiUtils::string2Identifier( fieldCaption ) );
if (m_destinationTableSchema->field(fieldName)) {
- QString fixedFieldName;
+ TQString fixedFieldName;
uint i = 2; //"apple 2, apple 3, etc. if there're many "apple" names
do {
- fixedFieldName = fieldName + "_" + QString::number(i);
+ fixedFieldName = fieldName + "_" + TQString::number(i);
if (!m_destinationTableSchema->field(fixedFieldName))
break;
i++;
} while (true);
fieldName = fixedFieldName;
- fieldCaption += (" " + QString::number(i));
+ fieldCaption += (" " + TQString::number(i));
}
const int detectedType = m_detectedTypes[col];
KexiDB::Field::Type fieldType;
@@ -1471,7 +1473,7 @@ void KexiCSVImportDialog::accept()
KexiDB::Field::NoConstraints,
KexiDB::Field::NoOptions,
0,0, //uint length=0, uint precision=0,
- QVariant(), //QVariant defaultValue=QVariant(),
+ TQVariant(), //TQVariant defaultValue=TQVariant(),
fieldCaption
); //no description and width for now
@@ -1516,17 +1518,17 @@ void KexiCSVImportDialog::accept()
if (m_file) {
if (!m_importingProgressDlg) {
m_importingProgressDlg = new KProgressDialog( this, "m_importingProgressDlg",
- i18n("Importing CSV Data"), QString::null, true );
+ i18n("Importing CSV Data"), TQString(), true );
}
m_importingProgressDlg->setLabel(
i18n("Importing CSV Data from <nobr>\"%1\"</nobr> into \"%2\" table...")
- .arg(QDir::convertSeparators(m_fname)).arg(m_destinationTableSchema->name()) );
- m_importingProgressDlg->progressBar()->setTotalSteps( QFileInfo(*m_file).size() );
+ .tqarg(TQDir::convertSeparators(m_fname)).tqarg(m_destinationTableSchema->name()) );
+ m_importingProgressDlg->progressBar()->setTotalSteps( TQFileInfo(*m_file).size() );
m_importingProgressDlg->show();
}
int row, column, maxColumn;
- QString field = QString::null;
+ TQString field = TQString();
// main job
res = loadRows(field, row, column, maxColumn, false /*!gui*/ );
@@ -1546,14 +1548,14 @@ void KexiCSVImportDialog::accept()
setText(row - m_startline, column, field, false /*!gui*/);
//fill remaining empty fields (database wants them explicitly)
for (int additionalColumn = column; additionalColumn <= maxColumn; additionalColumn++) {
- setText(row - m_startline, additionalColumn, QString::null, false /*!gui*/);
+ setText(row - m_startline, additionalColumn, TQString(), false /*!gui*/);
}
if (!saveRow(false /*!gui*/)) {
msg.showErrorMessage(m_conn);
_DROP_DEST_TABLE_AND_RETURN;
}
++row;
- field = QString::null;
+ field = TQString();
}
if (!tg.commit()) {
@@ -1565,16 +1567,16 @@ void KexiCSVImportDialog::accept()
partItemForSavedTable->setIdentifier( m_destinationTableSchema->id() );
project->addStoredItem( part->info(), partItemForSavedTable );
- QDialog::accept();
+ TQDialog::accept();
KMessageBox::information(this, i18n("Data has been successfully imported to table \"%1\".")
- .arg(m_destinationTableSchema->name()));
- parentWidget()->raise();
+ .tqarg(m_destinationTableSchema->name()));
+ tqparentWidget()->raise();
m_conn = 0;
}
int KexiCSVImportDialog::getHeader(int col)
{
- QString header = m_table->horizontalHeader()->label(col);
+ TQString header = m_table->horizontalHeader()->label(col);
if (header == i18n("Text type for column", "Text"))
return TEXT;
@@ -1586,7 +1588,7 @@ int KexiCSVImportDialog::getHeader(int col)
return DATE;
}
-QString KexiCSVImportDialog::getText(int row, int col)
+TQString KexiCSVImportDialog::getText(int row, int col)
{
return m_table->text(row, col);
}
@@ -1607,7 +1609,7 @@ void KexiCSVImportDialog::slot1stRowForFieldNamesChanged(int)
void KexiCSVImportDialog::optionsButtonClicked()
{
KexiCSVImportOptionsDialog dlg(m_options, this);
- if (QDialog::Accepted != dlg.exec())
+ if (TQDialog::Accepted != dlg.exec())
return;
KexiCSVImportOptions newOptions( dlg.options() );
@@ -1619,23 +1621,23 @@ void KexiCSVImportDialog::optionsButtonClicked()
}
}
-bool KexiCSVImportDialog::eventFilter ( QObject * watched, QEvent * e )
+bool KexiCSVImportDialog::eventFilter ( TQObject * watched, TQEvent * e )
{
- QEvent::Type t = e->type();
+ TQEvent::Type t = e->type();
// temporary disable keyboard and mouse events for time-consuming tasks
- if (m_blockUserEvents && (t==QEvent::KeyPress || t==QEvent::KeyRelease
- || t==QEvent::MouseButtonPress || t==QEvent::MouseButtonDblClick
- || t==QEvent::Paint ))
+ if (m_blockUserEvents && (t==TQEvent::KeyPress || t==TQEvent::KeyRelease
+ || t==TQEvent::MouseButtonPress || t==TQEvent::MouseButtonDblClick
+ || t==TQEvent::Paint ))
return true;
- if (watched == m_startAtLineSpinBox && t==QEvent::KeyPress) {
- QKeyEvent *ke = static_cast<QKeyEvent*>(e);
- if (ke->key()==Qt::Key_Enter || ke->key()==Qt::Key_Return) {
+ if (TQT_BASE_OBJECT(watched) == TQT_BASE_OBJECT(m_startAtLineSpinBox) && t==TQEvent::KeyPress) {
+ TQKeyEvent *ke = TQT_TQKEYEVENT(e);
+ if (ke->key()==TQt::Key_Enter || ke->key()==TQt::Key_Return) {
m_table->setFocus();
return true;
}
}
- return QDialog::eventFilter( watched, e );
+ return TQDialog::eventFilter( watched, e );
}
void KexiCSVImportDialog::slotPrimaryKeyFieldToggled(bool on)
@@ -1649,13 +1651,13 @@ void KexiCSVImportDialog::updateRowCountInfo()
m_infoLbl->setFileName( m_fname );
if (m_allRowsLoadedInPreview) {
m_infoLbl->setCommentText(
- i18n("row count", "(rows: %1)").arg( m_table->numRows()-1+m_startline ) );
- QToolTip::remove( m_infoLbl );
+ i18n("row count", "(rows: %1)").tqarg( m_table->numRows()-1+m_startline ) );
+ TQToolTip::remove( m_infoLbl );
}
else {
m_infoLbl->setCommentText(
- i18n("row count", "(rows: more than %1)").arg( m_table->numRows()-1+m_startline ) );
- QToolTip::add( m_infoLbl->commentLabel(), i18n("Not all rows are visible on this preview") );
+ i18n("row count", "(rows: more than %1)").tqarg( m_table->numRows()-1+m_startline ) );
+ TQToolTip::add( m_infoLbl->commentLabel(), i18n("Not all rows are visible on this preview") );
}
}
diff --git a/kexi/plugins/importexport/csv/kexicsvimportdialog.h b/kexi/plugins/importexport/csv/kexicsvimportdialog.h
index 1f7b159e..dd8a51df 100644
--- a/kexi/plugins/importexport/csv/kexicsvimportdialog.h
+++ b/kexi/plugins/importexport/csv/kexicsvimportdialog.h
@@ -28,11 +28,11 @@
#ifndef KEXI_CSVDIALOG_H
#define KEXI_CSVDIALOG_H
-#include <qvaluevector.h>
-#include <qvaluelist.h>
-#include <qptrvector.h>
-#include <qregexp.h>
-#include <qbitarray.h>
+#include <tqvaluevector.h>
+#include <tqvaluelist.h>
+#include <tqptrvector.h>
+#include <tqregexp.h>
+#include <tqbitarray.h>
#include <kdialogbase.h>
@@ -41,17 +41,17 @@
#include "kexicsvimportoptionsdlg.h"
-class QVBoxLayout;
-class QHBoxLayout;
-class QGridLayout;
-class QButtonGroup;
-class QCheckBox;
-class QLabel;
-class QLineEdit;
-class QPushButton;
-class QRadioButton;
-class QTable;
-class QFile;
+class TQVBoxLayout;
+class TQHBoxLayout;
+class TQGridLayout;
+class TQButtonGroup;
+class TQCheckBox;
+class TQLabel;
+class TQLineEdit;
+class TQPushButton;
+class TQRadioButton;
+class TQTable;
+class TQFile;
class KComboBox;
class KIntSpinBox;
class KProgressDialog;
@@ -78,69 +78,70 @@ class KexiCSVInfoLabel;
class KexiCSVImportDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
enum Mode { Clipboard, File /*, Column*/ };
enum Header { TEXT, NUMBER, DATE, CURRENCY };
//! @todo what about making it kexidb-independent?
- KexiCSVImportDialog( Mode mode, KexiMainWindow* mainWin, QWidget * parent,
- const char * name = 0/*, QRect const & rect*/);
+ KexiCSVImportDialog( Mode mode, KexiMainWindow* mainWin, TQWidget * tqparent,
+ const char * name = 0/*, TQRect const & rect*/);
virtual ~KexiCSVImportDialog();
bool cancelled() const;
- virtual bool eventFilter ( QObject * watched, QEvent * e );
+ virtual bool eventFilter ( TQObject * watched, TQEvent * e );
protected:
bool openData();
virtual void accept();
private:
- QGridLayout* MyDialogLayout;
- QHBoxLayout* Layout1;
- QTable* m_table;
+ TQGridLayout* MyDialogLayout;
+ TQHBoxLayout* Layout1;
+ TQTable* m_table;
KexiCSVDelimiterWidget* m_delimiterWidget;
bool m_detectDelimiter; //!< true if delimiter should be detected
//!< (true by default, set to false if user sets delimiter)
- QString m_formatComboText;
- QLabel* m_formatLabel;
+ TQString m_formatComboText;
+ TQLabel* m_formatLabel;
KComboBox* m_formatCombo;
KIntSpinBox *m_startAtLineSpinBox;
KexiCSVTextQuoteComboBox* m_comboQuote;
- QLabel* m_startAtLineLabel;
- QLabel* TextLabel2;
- QCheckBox* m_ignoreDuplicates;
- QCheckBox* m_1stRowForFieldNames;
- QCheckBox* m_primaryKeyField;
+ TQLabel* m_startAtLineLabel;
+ TQLabel* TextLabel2;
+ TQCheckBox* m_ignoreDuplicates;
+ TQCheckBox* m_1stRowForFieldNames;
+ TQCheckBox* m_primaryKeyField;
KexiMainWindow* m_mainWin;
- void detectTypeAndUniqueness(int row, int col, const QString& text);
- void setText(int row, int col, const QString& text, bool inGUI);
+ void detectTypeAndUniqueness(int row, int col, const TQString& text);
+ void setText(int row, int col, const TQString& text, bool inGUI);
/*! Parses date from \a text and stores into \a date.
m_dateRegExp is used for clever detection;
if '/' separated is found, it's assumed the format is american mm/dd/yyyy.
This function supports omitted zeros, so 1/2/2006 is parsed properly too.
\return true on success. */
- bool parseDate(const QString& text, QDate& date);
+ bool parseDate(const TQString& text, TQDate& date);
/*! Parses time from \a text and stores into \a date.
m_timeRegExp1 and m_timeRegExp2 are used for clever detection;
both hh:mm:ss and hh:mm are supported.
This function supports omitted zeros, so 1:2:3 is parsed properly too.
\return true on success. */
- bool parseTime(const QString& text, QTime& time);
+ bool parseTime(const TQString& text, TQTime& time);
/*! Called after the first fillTable() when number of rows is unknown. */
void adjustRows(int iRows);
int getHeader(int col);
- QString getText(int row, int col);
+ TQString getText(int row, int col);
void updateColumnText(int col);
void updateRowCountInfo();
- tristate loadRows(QString &field, int &row, int &columnm, int &maxColumn, bool inGUI);
+ tristate loadRows(TQString &field, int &row, int &columnm, int &maxColumn, bool inGUI);
/*! Detects delimiter by looking at first 4K bytes of the data. Used by loadRows().
The used algorithm:
@@ -154,8 +155,8 @@ class KexiCSVImportDialog : public KDialogBase
(escaped) quotes.
2. While scanning the data, for every row following number of tabs, semicolons and commas
(only these outside of the quotes) are computed. On every line the values are appended
- to a separate list (QValueList<int>).
- 3. After scanning, all the values are checked on the QValueList<int> of tabs.
+ to a separate list (TQValueList<int>).
+ 3. After scanning, all the values are checked on the TQValueList<int> of tabs.
If the list has more one element (so there was more than one row) and all the values
(numbers of tabs) are equal, it's very probable the tab is a delimiter.
So, this character is returned as a delimiter.
@@ -163,7 +164,7 @@ class KexiCSVImportDialog : public KDialogBase
3b. The same algorithm as in 3. is performed for comma character.
4. If the step 3. did not return a delimiter, a character found in step 1. with
the highest priority is retured as delimiter. */
- QString detectDelimiterByLookingAtFirstBytesOfFile(QTextStream& inputStream);
+ TQString detectDelimiterByLookingAtFirstBytesOfFile(TQTextStream& inputStream);
/*! Callback, called whenever row is loaded in loadRows(). When inGUI is true,
nothing is performed, else database buffer is written back to the database. */
@@ -172,23 +173,23 @@ class KexiCSVImportDialog : public KDialogBase
bool m_cancelled;
bool m_adjustRows;
int m_startline;
- QChar m_textquote;
- QString m_clipboardData;
- QByteArray m_fileArray;
+ TQChar m_textquote;
+ TQString m_clipboardData;
+ TQByteArray m_fileArray;
Mode m_mode;
int m_prevSelectedCol;
//! vector of detected types, 0==text (the default), 1==number, 2==date
//! @todo more types
- QValueVector<int> m_detectedTypes;
+ TQValueVector<int> m_detectedTypes;
//! m_detectedUniqueColumns[i]==true means that i-th column has unique values
//! (only for numeric type)
- QPtrVector< QValueList<int> > m_uniquenessTest;
+ TQPtrVector< TQValueList<int> > m_uniquenessTest;
- QRegExp m_dateRegExp, m_timeRegExp1, m_timeRegExp2, m_fpNumberRegExp;
- QValueVector<QString> m_typeNames, m_columnNames;
- QBitArray m_changedColumnNames;
+ TQRegExp m_dateRegExp, m_timeRegExp1, m_timeRegExp2, m_fpNumberRegExp;
+ TQValueVector<TQString> m_typeNames, m_columnNames;
+ TQBitArray m_changedColumnNames;
bool m_columnsAdjusted : 1; //!< to call adjustColumn() only once
bool m_1stRowForFieldNamesDetected : 1; //!< used to force rerun fillTable() after 1st row
bool m_firstFillTableCall : 1; //!< used to know whether it's 1st fillTable() call
@@ -196,10 +197,10 @@ class KexiCSVImportDialog : public KDialogBase
int m_primaryKeyColumn; //!< index of column with PK assigned (-1 if none)
int m_maximumRowsForPreview;
int m_maximumBytesForPreview;
- QPixmap m_pkIcon;
- QString m_fname;
- QFile* m_file;
- QTextStream *m_inputStream; //!< used in loadData()
+ TQPixmap m_pkIcon;
+ TQString m_fname;
+ TQFile* m_file;
+ TQTextStream *m_inputStream; //!< used in loadData()
KexiCSVImportOptions m_options;
KProgressDialog *m_loadingProgressDlg, *m_importingProgressDlg;
bool m_dialogCancelled;
@@ -207,7 +208,7 @@ class KexiCSVImportDialog : public KDialogBase
KexiDB::Connection *m_conn; //!< (temp) database connection used for importing
KexiDB::TableSchema *m_destinationTableSchema; //!< (temp) dest. table schema used for importing
KexiDB::PreparedStatement::Ptr m_importingStatement;
- QValueList<QVariant> m_dbRowBuffer; //!< (temp) used for importing
+ TQValueList<TQVariant> m_dbRowBuffer; //!< (temp) used for importing
bool m_implicitPrimaryKeyAdded; //!< (temp) used for importing
bool m_allRowsLoadedInPreview; //!< we need to know whether all rows were loaded or it's just a partial data preview
bool m_stoppedAt_MAX_BYTES_TO_PREVIEW; //!< used to compute m_allRowsLoadedInPreview
@@ -217,7 +218,7 @@ class KexiCSVImportDialog : public KDialogBase
void fillTableLater();
void initLater();
void formatChanged(int id);
- void delimiterChanged(const QString& delimiter);
+ void delimiterChanged(const TQString& delimiter);
void startlineSelected(int line);
void textquoteSelected(int);
void currentCellChanged(int, int col);
diff --git a/kexi/plugins/importexport/csv/kexicsvimportoptionsdlg.cpp b/kexi/plugins/importexport/csv/kexicsvimportoptionsdlg.cpp
index b381dde3..23fee674 100644
--- a/kexi/plugins/importexport/csv/kexicsvimportoptionsdlg.cpp
+++ b/kexi/plugins/importexport/csv/kexicsvimportoptionsdlg.cpp
@@ -20,10 +20,10 @@
#include "kexicsvimportoptionsdlg.h"
#include <widget/kexicharencodingcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtextcodec.h>
-#include <qcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtextcodec.h>
+#include <tqcheckbox.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -37,7 +37,7 @@ KexiCSVImportOptions::KexiCSVImportOptions()
kapp->config()->setGroup("ImportExport");
encoding = kapp->config()->readEntry("DefaultEncodingForImportingCSVFiles");
if (encoding.isEmpty()) {
- encoding = QString::fromLatin1(KGlobal::locale()->encoding());
+ encoding = TQString::tqfromLatin1(KGlobal::locale()->encoding());
defaultEncodingExplicitySet = false;
}
else
@@ -66,38 +66,38 @@ bool KexiCSVImportOptions::operator!= ( const KexiCSVImportOptions & opt ) const
//----------------------------------
KexiCSVImportOptionsDialog::KexiCSVImportOptionsDialog(
- const KexiCSVImportOptions& options, QWidget* parent )
+ const KexiCSVImportOptions& options, TQWidget* tqparent )
: KDialogBase(
KDialogBase::Plain,
i18n( "CSV Import Options" ),
Ok|Cancel,
Ok,
- parent,
+ tqparent,
"KexiCSVImportOptionsDialog",
true,
false
)
{
- QGridLayout *lyr = new QGridLayout( plainPage(), 5, 3,
+ TQGridLayout *lyr = new TQGridLayout( plainPage(), 5, 3,
KDialogBase::marginHint(), KDialogBase::spacingHint());
m_encodingComboBox = new KexiCharacterEncodingComboBox(plainPage(), options.encoding);
lyr->addWidget( m_encodingComboBox, 0, 1 );
- QLabel* lbl = new QLabel( m_encodingComboBox, i18n("Text encoding:"), plainPage());
+ TQLabel* lbl = new TQLabel( m_encodingComboBox, i18n("Text encoding:"), plainPage());
lyr->addWidget( lbl, 0, 0 );
- lyr->addItem( new QSpacerItem( 20, KDialogBase::spacingHint(), QSizePolicy::Fixed, QSizePolicy::Fixed ), 2, 1 );
- lyr->addItem( new QSpacerItem( 121, KDialogBase::spacingHint(), QSizePolicy::Expanding, QSizePolicy::Minimum ), 0, 2 );
+ lyr->addItem( new TQSpacerItem( 20, KDialogBase::spacingHint(), TQSizePolicy::Fixed, TQSizePolicy::Fixed ), 2, 1 );
+ lyr->addItem( new TQSpacerItem( 121, KDialogBase::spacingHint(), TQSizePolicy::Expanding, TQSizePolicy::Minimum ), 0, 2 );
- m_chkAlwaysUseThisEncoding = new QCheckBox(
+ m_chkAlwaysUseThisEncoding = new TQCheckBox(
i18n("Always use this encoding when importing CSV data files"), plainPage());
lyr->addWidget( m_chkAlwaysUseThisEncoding, 1, 1 );
- m_chkStripWhiteSpaceInTextValues = new QCheckBox(
+ m_chkStripWhiteSpaceInTextValues = new TQCheckBox(
i18n("Strip leading and trailing blanks off of text values"), plainPage());
lyr->addWidget( m_chkStripWhiteSpaceInTextValues, 3, 1 );
- lyr->addItem( new QSpacerItem( 20, KDialogBase::spacingHint(), QSizePolicy::Minimum, QSizePolicy::Expanding ), 4, 1 );
+ lyr->addItem( new TQSpacerItem( 20, KDialogBase::spacingHint(), TQSizePolicy::Minimum, TQSizePolicy::Expanding ), 4, 1 );
//update widgets
if (options.defaultEncodingExplicitySet) {
diff --git a/kexi/plugins/importexport/csv/kexicsvimportoptionsdlg.h b/kexi/plugins/importexport/csv/kexicsvimportoptionsdlg.h
index e0567c9c..51319bbf 100644
--- a/kexi/plugins/importexport/csv/kexicsvimportoptionsdlg.h
+++ b/kexi/plugins/importexport/csv/kexicsvimportoptionsdlg.h
@@ -21,7 +21,7 @@
#define KEXICSVOPTIONSDIALOG_H
#include <kdialogbase.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
class KexiCharacterEncodingComboBox;
@@ -35,7 +35,7 @@ class KexiCSVImportOptions
bool operator== ( const KexiCSVImportOptions & opt ) const;
bool operator!= ( const KexiCSVImportOptions & opt ) const;
- QString encoding;
+ TQString encoding;
bool defaultEncodingExplicitySet;
bool stripWhiteSpaceInTextValuesChecked;
};
@@ -44,8 +44,9 @@ class KexiCSVImportOptions
class KexiCSVImportOptionsDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiCSVImportOptionsDialog( const KexiCSVImportOptions& options, QWidget* parent = 0 );
+ KexiCSVImportOptionsDialog( const KexiCSVImportOptions& options, TQWidget* tqparent = 0 );
virtual ~KexiCSVImportOptionsDialog();
KexiCSVImportOptions options() const;
@@ -55,8 +56,8 @@ class KexiCSVImportOptionsDialog : public KDialogBase
protected:
KexiCharacterEncodingComboBox *m_encodingComboBox;
- QCheckBox *m_chkAlwaysUseThisEncoding;
- QCheckBox *m_chkStripWhiteSpaceInTextValues;
+ TQCheckBox *m_chkAlwaysUseThisEncoding;
+ TQCheckBox *m_chkStripWhiteSpaceInTextValues;
};
#endif
diff --git a/kexi/plugins/importexport/csv/kexicsvwidgets.cpp b/kexi/plugins/importexport/csv/kexicsvwidgets.cpp
index 8e3cf4c2..f490795b 100644
--- a/kexi/plugins/importexport/csv/kexicsvwidgets.cpp
+++ b/kexi/plugins/importexport/csv/kexicsvwidgets.cpp
@@ -19,9 +19,9 @@
#include "kexicsvwidgets.h"
-#include <qdir.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqdir.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <klineedit.h>
@@ -32,15 +32,15 @@
#define KEXICSV_OTHER_DELIMITER_INDEX 4
-KexiCSVDelimiterWidget::KexiCSVDelimiterWidget( bool lineEditOnBottom, QWidget * parent )
- : QWidget(parent, "KexiCSVDelimiterWidget")
+KexiCSVDelimiterWidget::KexiCSVDelimiterWidget( bool lineEditOnBottom, TQWidget * tqparent )
+ : TQWidget(tqparent, "KexiCSVDelimiterWidget")
, m_availableDelimiters(KEXICSV_OTHER_DELIMITER_INDEX)
{
- QBoxLayout *lyr =
+ TQBoxLayout *lyr =
lineEditOnBottom ?
- (QBoxLayout *)new QVBoxLayout( this, 0, KDialogBase::spacingHint() )
- : (QBoxLayout *)new QHBoxLayout( this, 0, KDialogBase::spacingHint() );
+ (TQBoxLayout *)new TQVBoxLayout( this, 0, KDialogBase::spacingHint() )
+ : (TQBoxLayout *)new TQHBoxLayout( this, 0, KDialogBase::spacingHint() );
m_availableDelimiters[0]=KEXICSV_DEFAULT_FILE_DELIMITER;
m_availableDelimiters[1]=";";
@@ -57,20 +57,20 @@ KexiCSVDelimiterWidget::KexiCSVDelimiterWidget( bool lineEditOnBottom, QWidget *
setFocusProxy(m_combo);
m_delimiterEdit = new KLineEdit( this, "m_delimiterEdit" );
-// m_delimiterEdit->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, m_delimiterEdit->sizePolicy().hasHeightForWidth() ) );
- m_delimiterEdit->setMaximumSize( QSize( 30, 32767 ) );
+// m_delimiterEdit->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, m_delimiterEdit->sizePolicy().hasHeightForWidth() ) );
+ m_delimiterEdit->setMaximumSize( TQSize( 30, 32767 ) );
m_delimiterEdit->setMaxLength(1);
lyr->addWidget( m_delimiterEdit );
if (!lineEditOnBottom)
lyr->addStretch(2);
slotDelimiterChangedInternal(KEXICSV_DEFAULT_FILE_DELIMITER_INDEX); //this will init m_delimiter
- connect(m_combo, SIGNAL(activated(int)),
- this, SLOT(slotDelimiterChanged(int)));
- connect(m_delimiterEdit, SIGNAL(returnPressed()),
- this, SLOT(slotDelimiterLineEditReturnPressed()));
- connect(m_delimiterEdit, SIGNAL(textChanged( const QString & )),
- this, SLOT(slotDelimiterLineEditTextChanged( const QString & ) ));
+ connect(m_combo, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotDelimiterChanged(int)));
+ connect(m_delimiterEdit, TQT_SIGNAL(returnPressed()),
+ this, TQT_SLOT(slotDelimiterLineEditReturnPressed()));
+ connect(m_delimiterEdit, TQT_SIGNAL(textChanged( const TQString & )),
+ this, TQT_SLOT(slotDelimiterLineEditTextChanged( const TQString & ) ));
}
void KexiCSVDelimiterWidget::slotDelimiterChanged(int index)
@@ -105,14 +105,14 @@ void KexiCSVDelimiterWidget::slotDelimiterLineEditReturnPressed()
slotDelimiterChangedInternal(KEXICSV_OTHER_DELIMITER_INDEX);
}
-void KexiCSVDelimiterWidget::slotDelimiterLineEditTextChanged( const QString & )
+void KexiCSVDelimiterWidget::slotDelimiterLineEditTextChanged( const TQString & )
{
slotDelimiterChangedInternal(KEXICSV_OTHER_DELIMITER_INDEX);
}
-void KexiCSVDelimiterWidget::setDelimiter(const QString& delimiter)
+void KexiCSVDelimiterWidget::setDelimiter(const TQString& delimiter)
{
- QValueVector<QString>::ConstIterator it = m_availableDelimiters.constBegin();
+ TQValueVector<TQString>::ConstIterator it = m_availableDelimiters.constBegin();
int index = 0;
for (; it != m_availableDelimiters.constEnd(); ++it, index++) {
if (*it == delimiter) {
@@ -129,22 +129,22 @@ void KexiCSVDelimiterWidget::setDelimiter(const QString& delimiter)
//----------------------------------------------------
-KexiCSVTextQuoteComboBox::KexiCSVTextQuoteComboBox( QWidget * parent )
- : KComboBox(parent, "KexiCSVTextQuoteComboBox")
+KexiCSVTextQuoteComboBox::KexiCSVTextQuoteComboBox( TQWidget * tqparent )
+ : KComboBox(tqparent, "KexiCSVTextQuoteComboBox")
{
insertItem( "\"" );
insertItem( "'" );
insertItem( i18n( "None" ) );
}
-QString KexiCSVTextQuoteComboBox::textQuote() const
+TQString KexiCSVTextQuoteComboBox::textQuote() const
{
if (currentItem()==2)
- return QString::null;
+ return TQString();
return currentText();
}
-void KexiCSVTextQuoteComboBox::setTextQuote(const QString& textQuote)
+void KexiCSVTextQuoteComboBox::setTextQuote(const TQString& textQuote)
{
if (textQuote=="\"" || textQuote=="'")
setCurrentText(textQuote);
@@ -154,78 +154,78 @@ void KexiCSVTextQuoteComboBox::setTextQuote(const QString& textQuote)
//----------------------------------------------------
-KexiCSVInfoLabel::KexiCSVInfoLabel( const QString& labelText, QWidget* parent )
- : QWidget(parent, "KexiCSVInfoLabel")
+KexiCSVInfoLabel::KexiCSVInfoLabel( const TQString& labelText, TQWidget* tqparent )
+ : TQWidget(tqparent, "KexiCSVInfoLabel")
{
- QVBoxLayout *vbox = new QVBoxLayout( this, 0, KDialogBase::spacingHint() );
- QHBoxLayout *hbox = new QHBoxLayout( this );
+ TQVBoxLayout *vbox = new TQVBoxLayout( this, 0, KDialogBase::spacingHint() );
+ TQHBoxLayout *hbox = new TQHBoxLayout( this );
vbox->addLayout(hbox);
- m_leftLabel = new QLabel(labelText, this);
+ m_leftLabel = new TQLabel(labelText, this);
m_leftLabel->setMinimumWidth(130);
- m_leftLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
- m_leftLabel->setAlignment(Qt::AlignVCenter | Qt::AlignLeft | Qt::WordBreak);
+ m_leftLabel->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred);
+ m_leftLabel->tqsetAlignment(TQt::AlignVCenter | TQt::AlignLeft | TQt::WordBreak);
hbox->addWidget(m_leftLabel);
- m_iconLbl = new QLabel(this);
- m_iconLbl->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
- m_iconLbl->setAlignment(Qt::AlignVCenter | Qt::AlignLeft);
+ m_iconLbl = new TQLabel(this);
+ m_iconLbl->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred);
+ m_iconLbl->tqsetAlignment(TQt::AlignVCenter | TQt::AlignLeft);
m_fnameLbl = new KActiveLabel(this);
- m_fnameLbl->setFocusPolicy(NoFocus);
- m_fnameLbl->setTextFormat(Qt::PlainText);
- m_fnameLbl->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding,1,0));
+ m_fnameLbl->setFocusPolicy(TQ_NoFocus);
+ m_fnameLbl->setTextFormat(TQt::PlainText);
+ m_fnameLbl->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding,1,0));
m_fnameLbl->setLineWidth(1);
- m_fnameLbl->setFrameStyle(QFrame::Box);
- m_fnameLbl->setAlignment(Qt::AlignVCenter | Qt::AlignLeft | Qt::WordBreak);
+ m_fnameLbl->setFrameStyle(TQFrame::Box);
+ m_fnameLbl->tqsetAlignment(TQt::AlignVCenter | TQt::AlignLeft | TQt::WordBreak);
hbox->addSpacing(5);
hbox->addWidget(m_iconLbl);
- hbox->addWidget(m_fnameLbl, 1, Qt::AlignVCenter | Qt::AlignLeft | Qt::WordBreak);
+ hbox->addWidget(m_fnameLbl, 1, TQt::AlignVCenter | TQt::AlignLeft | TQt::WordBreak);
hbox->addSpacing(10);
m_commentLbl = new KActiveLabel(this);
- m_commentLbl->setFocusPolicy(NoFocus);
- m_commentLbl->setTextFormat(Qt::PlainText);
- m_commentLbl->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
+ m_commentLbl->setFocusPolicy(TQ_NoFocus);
+ m_commentLbl->setTextFormat(TQt::PlainText);
+ m_commentLbl->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
m_commentLbl->setLineWidth(1);
- m_commentLbl->setFrameStyle(QFrame::Box);
- m_commentLbl->setAlignment(Qt::AlignVCenter | Qt::AlignLeft | Qt::WordBreak);
- hbox->addWidget(m_commentLbl, 0, Qt::AlignVCenter | Qt::AlignRight | Qt::WordBreak);
+ m_commentLbl->setFrameStyle(TQFrame::Box);
+ m_commentLbl->tqsetAlignment(TQt::AlignVCenter | TQt::AlignLeft | TQt::WordBreak);
+ hbox->addWidget(m_commentLbl, 0, TQt::AlignVCenter | TQt::AlignRight | TQt::WordBreak);
- m_separator = new QFrame(this);
- m_separator->setFrameShape(QFrame::HLine);
- m_separator->setFrameShadow(QFrame::Sunken);
+ m_separator = new TQFrame(this);
+ m_separator->setFrameShape(TQFrame::HLine);
+ m_separator->setFrameShadow(TQFrame::Sunken);
vbox->addWidget(m_separator);
}
-void KexiCSVInfoLabel::setFileName( const QString& fileName )
+void KexiCSVInfoLabel::setFileName( const TQString& fileName )
{
- m_fnameLbl->setText( QDir::convertSeparators(fileName) );
+ m_fnameLbl->setText( TQDir::convertSeparators(fileName) );
if (!fileName.isEmpty()) {
m_iconLbl->setPixmap(
KMimeType::pixmapForURL(KURL::fromPathOrURL(fileName), 0, KIcon::Desktop) );
}
}
-void KexiCSVInfoLabel::setLabelText( const QString& text )
+void KexiCSVInfoLabel::setLabelText( const TQString& text )
{
m_fnameLbl->setText( text );
// int lines = m_fnameLbl->lines();
// m_fnameLbl->setFixedHeight(
-// QFontMetrics(m_fnameLbl->currentFont()).height() * lines );
+// TQFontMetrics(m_fnameLbl->currentFont()).height() * lines );
}
-void KexiCSVInfoLabel::setIcon(const QString& iconName)
+void KexiCSVInfoLabel::setIcon(const TQString& iconName)
{
m_iconLbl->setPixmap( DesktopIcon(iconName) );
}
-void KexiCSVInfoLabel::setCommentText( const QString& text )
+void KexiCSVInfoLabel::setCommentText( const TQString& text )
{
m_commentLbl->setText(text);
}
//----------------------------------------------------
-QStringList csvMimeTypes()
+TQStringList csvMimeTypes()
{
- QStringList mimetypes;
+ TQStringList mimetypes;
mimetypes << "text/x-csv" << "text/plain" << "all/allfiles";
return mimetypes;
}
diff --git a/kexi/plugins/importexport/csv/kexicsvwidgets.h b/kexi/plugins/importexport/csv/kexicsvwidgets.h
index f128b658..7a163ee0 100644
--- a/kexi/plugins/importexport/csv/kexicsvwidgets.h
+++ b/kexi/plugins/importexport/csv/kexicsvwidgets.h
@@ -20,82 +20,83 @@
#ifndef KEXI_CSVWIDGETS_H
#define KEXI_CSVWIDGETS_H
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
#include <kcombobox.h>
class KLineEdit;
class KActiveLabel;
-class QLabel;
+class TQLabel;
-#define KEXICSV_DEFAULT_FILE_TEXT_QUOTE "\""
-#define KEXICSV_DEFAULT_CLIPBOARD_TEXT_QUOTE ""
+#define KEXICSV_DEFAULT_FILE_TEXT_TQUOTE "\""
+#define KEXICSV_DEFAULT_CLIPBOARD_TEXT_TQUOTE ""
#define KEXICSV_DEFAULT_FILE_DELIMITER ","
#define KEXICSV_DEFAULT_CLIPBOARD_DELIMITER "\t"
#define KEXICSV_DEFAULT_FILE_DELIMITER_INDEX 0
//! \return a list of mimetypes usable for handling CSV format handling
-QStringList csvMimeTypes();
+TQStringList csvMimeTypes();
/*! @short A helper widget showing a short text information with an icon.
See ctor for details.
Used by CSV import and export dialogs. */
-class KexiCSVInfoLabel : public QWidget
+class KexiCSVInfoLabel : public TQWidget
{
public:
/* Sets up a new info label \a labelText label with text like "Preview of data from file:".
setFileName() can be used to display filename and setCommentAfterFileName() to display
additional comment.
- The widget's layout can look like this:
+ The widget's tqlayout can look like this:
\pre [icon] [labeltext] [filename] [comment]
*/
- KexiCSVInfoLabel( const QString& labelText, QWidget* parent );
+ KexiCSVInfoLabel( const TQString& labelText, TQWidget* tqparent );
- void setFileName( const QString& fileName );
- void setLabelText( const QString& text );
- void setCommentText( const QString& text );
+ void setFileName( const TQString& fileName );
+ void setLabelText( const TQString& text );
+ void setCommentText( const TQString& text );
// void setIconForFileName();
//! sets icon pixmap to \a iconName. Used wher setIconForFilename was false in ctor.
- void setIcon(const QString& iconName);
+ void setIcon(const TQString& iconName);
- QLabel* leftLabel() const { return m_leftLabel; }
+ TQLabel* leftLabel() const { return m_leftLabel; }
KActiveLabel* fileNameLabel() const { return m_fnameLbl; }
KActiveLabel* commentLabel() const { return m_commentLbl; }
- QFrame* separator() const { return m_separator; }
+ TQFrame* separator() const { return m_separator; }
protected:
- QLabel *m_leftLabel, *m_iconLbl;
+ TQLabel *m_leftLabel, *m_iconLbl;
KActiveLabel *m_fnameLbl, *m_commentLbl;
- QFrame* m_separator;
+ TQFrame* m_separator;
};
//! @short A combo box widget providing a list of possible delimiters
//! Used by CSV import and export dialogs
-class KexiCSVDelimiterWidget : public QWidget
+class KexiCSVDelimiterWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiCSVDelimiterWidget( bool lineEditOnBottom, QWidget * parent = 0 );
+ KexiCSVDelimiterWidget( bool lineEditOnBottom, TQWidget * tqparent = 0 );
- QString delimiter() const { return m_delimiter; }
- void setDelimiter(const QString& delimiter);
+ TQString delimiter() const { return m_delimiter; }
+ void setDelimiter(const TQString& delimiter);
signals:
- void delimiterChanged(const QString& delimiter);
+ void delimiterChanged(const TQString& delimiter);
protected slots:
//! only called when a delimiter was set by user directly
void slotDelimiterChanged(int idx);
void slotDelimiterChangedInternal(int idx);
- void slotDelimiterLineEditTextChanged( const QString & );
+ void slotDelimiterLineEditTextChanged( const TQString & );
void slotDelimiterLineEditReturnPressed();
protected:
- QString m_delimiter;
- QValueVector<QString> m_availableDelimiters;
+ TQString m_delimiter;
+ TQValueVector<TQString> m_availableDelimiters;
KComboBox* m_combo;
KLineEdit* m_delimiterEdit;
};
@@ -105,12 +106,12 @@ class KexiCSVDelimiterWidget : public QWidget
class KexiCSVTextQuoteComboBox : public KComboBox
{
public:
- KexiCSVTextQuoteComboBox( QWidget * parent = 0 );
+ KexiCSVTextQuoteComboBox( TQWidget * tqparent = 0 );
- QString textQuote() const;
+ TQString textQuote() const;
//! Sets text quote. Only available are: ", ', and empty string.
- void setTextQuote(const QString& textQuote);
+ void setTextQuote(const TQString& textQuote);
};
#endif
diff --git a/kexi/plugins/macros/kexiactions/datatableaction.cpp b/kexi/plugins/macros/kexiactions/datatableaction.cpp
index 90b13e4f..fff0eaf5 100644
--- a/kexi/plugins/macros/kexiactions/datatableaction.cpp
+++ b/kexi/plugins/macros/kexiactions/datatableaction.cpp
@@ -33,9 +33,9 @@ using namespace KexiMacro;
namespace KexiMacro {
- //static const QString OBJECT = "method";
- //static const QString OBJECT = "type";
- //static const QString OBJECT = "partitem";
+ //static const TQString OBJECT = "method";
+ //static const TQString OBJECT = "type";
+ //static const TQString OBJECT = "partitem";
template<class ACTIONIMPL>
class MethodVariable : public KexiVariable<ACTIONIMPL>
@@ -44,7 +44,7 @@ namespace KexiMacro {
MethodVariable(ACTIONIMPL* actionimpl)
: KexiVariable<ACTIONIMPL>(actionimpl, "method", i18n("Method"))
{
- QStringList list;
+ TQStringList list;
list << "import" << "export";
this->appendChild( KSharedPtr<KoMacro::Variable>( new KoMacro::Variable(list, "@list") ) );
@@ -59,7 +59,7 @@ namespace KexiMacro {
TypeVariable(ACTIONIMPL* actionimpl)
: KexiVariable<ACTIONIMPL>(actionimpl, "type", i18n("Type"))
{
- QStringList list;
+ TQStringList list;
list << "file" << "clipboard";
this->appendChild( KSharedPtr<KoMacro::Variable>( new KoMacro::Variable(list, "@list") ) );
@@ -71,10 +71,10 @@ namespace KexiMacro {
class PartItemVariable : public KexiVariable<ACTIONIMPL>
{
public:
- PartItemVariable(ACTIONIMPL* actionimpl, const QString& partitem = QString::null)
+ PartItemVariable(ACTIONIMPL* actionimpl, const TQString& partitem = TQString())
: KexiVariable<ACTIONIMPL>(actionimpl, "partitem", i18n("Item"))
{
- QStringList namelist;
+ TQStringList namelist;
if(actionimpl->mainWin()->project()) {
KexiPart::PartInfoList* parts = Kexi::partManager().partInfoList();
for(KexiPart::PartInfoListIterator it(*parts); it.current(); ++it) {
@@ -86,14 +86,14 @@ namespace KexiMacro {
for(KexiPart::ItemDictIterator item_it = *items; item_it.current(); ++item_it)
namelist << info->objectName() + "." + item_it.current()->name();
}
- for(QStringList::Iterator it = namelist.begin(); it != namelist.end(); ++it)
+ for(TQStringList::Iterator it = namelist.begin(); it != namelist.end(); ++it)
this->appendChild( KSharedPtr<KoMacro::Variable>(new KoMacro::Variable(*it)) );
- //const QString name = info->objectName(); //info->groupName();
+ //const TQString name = info->objectName(); //info->groupName();
//this->appendChild( KSharedPtr<KoMacro::Variable>(new KoMacro::Variable(name)) );
}
- const QString n =
- namelist.contains(partitem)
+ const TQString n =
+ namelist.tqcontains(partitem)
? partitem
: namelist.count() > 0 ? namelist[0] : "";
this->setVariant(n);
@@ -115,7 +115,7 @@ DataTableAction::~DataTableAction()
{
}
-bool DataTableAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name)
+bool DataTableAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name)
{
kdDebug()<<"DataTableAction::notifyUpdated() name="<<name<<" macroitem.action="<<(macroitem->action() ? macroitem->action()->name() : "NOACTION")<<endl;
/*
@@ -141,27 +141,27 @@ void DataTableAction::activate(KSharedPtr<KoMacro::Context> context)
return;
}
- const QString method = context->variable("method")->variant().toString();
- const QString type = context->variable("type")->variant().toString();
+ const TQString method = context->variable("method")->variant().toString();
+ const TQString type = context->variable("type")->variant().toString();
- const QString partitem = context->variable("partitem")->variant().toString();
- QString identifier;
+ const TQString partitem = context->variable("partitem")->variant().toString();
+ TQString identifier;
if(! partitem.isEmpty()) {
- QStringList parts = QStringList::split(".", partitem);
- KexiPart::Part* part = Kexi::partManager().partForMimeType( QString("kexi/%1").arg(parts[0]) );
+ TQStringList parts = TQStringList::split(".", partitem);
+ KexiPart::Part* part = Kexi::partManager().partForMimeType( TQString("kexi/%1").tqarg(parts[0]) );
KexiPart::Item* item = part ? mainWin()->project()->item(part->info(), parts[1]) : 0;
if(! item)
- throw KoMacro::Exception(i18n("No such item \"%1\"").arg(partitem));
- identifier = QString::number(item->identifier());
+ throw KoMacro::Exception(i18n("No such item \"%1\"").tqarg(partitem));
+ identifier = TQString::number(item->identifier());
}
- QMap<QString,QString> args;
+ TQMap<TQString,TQString> args;
if(! identifier.isNull())
args.insert("itemId", identifier);
if(method == "import") {
args.insert("sourceType", type);
- QDialog *dlg = KexiInternalPart::createModalDialogInstance(
+ TQDialog *dlg = KexiInternalPart::createModalDialogInstance(
"csv_importexport", "KexiCSVImportDialog", 0, mainWin(), 0, &args);
if (!dlg)
return; //error msg has been shown by KexiInternalPart
@@ -170,7 +170,7 @@ void DataTableAction::activate(KSharedPtr<KoMacro::Context> context)
}
else if(method == "export") {
args.insert("destinationType", type);
- QDialog *dlg = KexiInternalPart::createModalDialogInstance(
+ TQDialog *dlg = KexiInternalPart::createModalDialogInstance(
"csv_importexport", "KexiCSVExportWizard", 0, mainWin(), 0, &args);
if (!dlg)
return; //error msg has been shown by KexiInternalPart
@@ -178,7 +178,7 @@ void DataTableAction::activate(KSharedPtr<KoMacro::Context> context)
delete dlg;
}
else {
- throw KoMacro::Exception(i18n("No such method \"%1\"").arg(method));
+ throw KoMacro::Exception(i18n("No such method \"%1\"").tqarg(method));
}
}
diff --git a/kexi/plugins/macros/kexiactions/datatableaction.h b/kexi/plugins/macros/kexiactions/datatableaction.h
index 3b5b32c0..b713b2c7 100644
--- a/kexi/plugins/macros/kexiactions/datatableaction.h
+++ b/kexi/plugins/macros/kexiactions/datatableaction.h
@@ -37,6 +37,7 @@ namespace KexiMacro {
class DataTableAction : public KexiAction
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -60,7 +61,7 @@ namespace KexiMacro {
* @return true if the update was successfully else false
* is returned.
*/
- virtual bool notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name);
+ virtual bool notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name);
public slots:
diff --git a/kexi/plugins/macros/kexiactions/executeaction.cpp b/kexi/plugins/macros/kexiactions/executeaction.cpp
index 1e7f24a2..ccad645c 100644
--- a/kexi/plugins/macros/kexiactions/executeaction.cpp
+++ b/kexi/plugins/macros/kexiactions/executeaction.cpp
@@ -32,8 +32,8 @@
using namespace KexiMacro;
namespace KexiMacro {
- static const QString OBJECT = "object";
- static const QString NAME = "name";
+ static const TQString OBJECT = "object";
+ static const TQString NAME = "name";
}
ExecuteAction::ExecuteAction()
@@ -50,7 +50,7 @@ ExecuteAction::~ExecuteAction()
{
}
-bool ExecuteAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name)
+bool ExecuteAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name)
{
kdDebug()<<"ExecuteAction::notifyUpdated() name="<<name<<" macroitem.action="<<(macroitem->action() ? macroitem->action()->name() : "NOACTION")<<endl;
KSharedPtr<KoMacro::Variable> variable = macroitem->variable(name, false);
@@ -61,8 +61,8 @@ bool ExecuteAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, cons
variable->clearChildren();
if(name == OBJECT) {
- const QString objectvalue = macroitem->variant(OBJECT, true).toString(); // e.g. "macro" or "script"
- const QString objectname = macroitem->variant(NAME, true).toString(); // e.g. "macro1" or "macro2" if objectvalue above is "macro"
+ const TQString objectvalue = macroitem->variant(OBJECT, true).toString(); // e.g. "macro" or "script"
+ const TQString objectname = macroitem->variant(NAME, true).toString(); // e.g. "macro1" or "macro2" if objectvalue above is "macro"
macroitem->variable(NAME, true)->setChildren(
KoMacro::Variable::List() << KSharedPtr<KoMacro::Variable>(new ObjectNameVariable<ExecuteAction>(this, objectvalue, objectname)) );
}
@@ -77,17 +77,17 @@ void ExecuteAction::activate(KSharedPtr<KoMacro::Context> context)
return;
}
- const QString mimetype = QString("kexi/%1").arg( context->variable("object")->variant().toString() );
- const QString name = context->variable("name")->variant().toString();
+ const TQString mimetype = TQString("kexi/%1").tqarg( context->variable("object")->variant().toString() );
+ const TQString name = context->variable("name")->variant().toString();
KexiPart::Part* part = Kexi::partManager().partForMimeType(mimetype);
if(! part) {
- throw KoMacro::Exception(i18n("No such mimetype \"%1\"").arg(mimetype));
+ throw KoMacro::Exception(i18n("No such mimetype \"%1\"").tqarg(mimetype));
}
KexiPart::Item* item = mainWin()->project()->item(part->info(), name);
if(! item) {
- throw KoMacro::Exception(i18n("Failed to open part \"%1\" for mimetype \"%2\"").arg(name).arg(mimetype));
+ throw KoMacro::Exception(i18n("Failed to open part \"%1\" for mimetype \"%2\"").tqarg(name).tqarg(mimetype));
}
part->execute(item);
diff --git a/kexi/plugins/macros/kexiactions/executeaction.h b/kexi/plugins/macros/kexiactions/executeaction.h
index 17a8ca88..b2cfaaea 100644
--- a/kexi/plugins/macros/kexiactions/executeaction.h
+++ b/kexi/plugins/macros/kexiactions/executeaction.h
@@ -39,6 +39,7 @@ namespace KexiMacro {
class ExecuteAction : public KexiAction
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -62,7 +63,7 @@ namespace KexiMacro {
* @return true if the update was successfully else false
* is returned.
*/
- virtual bool notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name);
+ virtual bool notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name);
public slots:
diff --git a/kexi/plugins/macros/kexiactions/kexiaction.cpp b/kexi/plugins/macros/kexiactions/kexiaction.cpp
index 521f8cfc..aeb3b764 100644
--- a/kexi/plugins/macros/kexiactions/kexiaction.cpp
+++ b/kexi/plugins/macros/kexiactions/kexiaction.cpp
@@ -25,7 +25,7 @@
using namespace KexiMacro;
-KexiAction::KexiAction(const QString& name, const QString& text)
+KexiAction::KexiAction(const TQString& name, const TQString& text)
: KoMacro::Action(name)
{
m_mainwin = dynamic_cast< KexiMainWindow* >( KoMacro::Manager::self()->guiClient() );
diff --git a/kexi/plugins/macros/kexiactions/kexiaction.h b/kexi/plugins/macros/kexiactions/kexiaction.h
index a61e2bc1..7474a269 100644
--- a/kexi/plugins/macros/kexiactions/kexiaction.h
+++ b/kexi/plugins/macros/kexiactions/kexiaction.h
@@ -51,7 +51,7 @@ namespace KexiMacro {
* name will be used to identify the action.
* @param text The i18n-caption text used for display purposes.
*/
- KexiAction(const QString& name, const QString& text);
+ KexiAction(const TQString& name, const TQString& text);
/**
* Destructor.
diff --git a/kexi/plugins/macros/kexiactions/kexivariable.h b/kexi/plugins/macros/kexiactions/kexivariable.h
index 27dcc0ef..da3f47e2 100644
--- a/kexi/plugins/macros/kexiactions/kexivariable.h
+++ b/kexi/plugins/macros/kexiactions/kexivariable.h
@@ -48,7 +48,7 @@ namespace KexiMacro {
/**
* Constructor.
*/
- KexiVariable(ACTIONIMPL* actionimpl, const QString& name, const QString& caption)
+ KexiVariable(ACTIONIMPL* actionimpl, const TQString& name, const TQString& caption)
: KoMacro::Variable()
, m_actionimpl(actionimpl)
{
@@ -68,7 +68,7 @@ namespace KexiMacro {
}
private:
- /// The parent @a KexiAction implementation.
+ /// The tqparent @a KexiAction implementation.
ACTIONIMPL* m_actionimpl;
};
}
diff --git a/kexi/plugins/macros/kexiactions/messageaction.cpp b/kexi/plugins/macros/kexiactions/messageaction.cpp
index 1a4605cb..a36d0526 100644
--- a/kexi/plugins/macros/kexiactions/messageaction.cpp
+++ b/kexi/plugins/macros/kexiactions/messageaction.cpp
@@ -31,8 +31,8 @@ using namespace KexiMacro;
MessageAction::MessageAction()
: KexiAction("message", i18n("Message"))
{
- setVariable("caption", i18n("Caption"), QString(""));
- setVariable("message", i18n("Message"), QString(""));
+ setVariable("caption", i18n("Caption"), TQString(""));
+ setVariable("message", i18n("Message"), TQString(""));
}
MessageAction::~MessageAction()
@@ -42,8 +42,8 @@ MessageAction::~MessageAction()
void MessageAction::activate(KSharedPtr<KoMacro::Context> context)
{
kdDebug() << "MessageAction::activate(KSharedPtr<Context>)" << endl;
- const QString caption = context->variable("caption")->variant().toString();
- const QString message = context->variable("message")->variant().toString();
+ const TQString caption = context->variable("caption")->variant().toString();
+ const TQString message = context->variable("message")->variant().toString();
KMessageBox::information(mainWin(), message, caption);
}
diff --git a/kexi/plugins/macros/kexiactions/messageaction.h b/kexi/plugins/macros/kexiactions/messageaction.h
index 543674bd..5ccac9b7 100644
--- a/kexi/plugins/macros/kexiactions/messageaction.h
+++ b/kexi/plugins/macros/kexiactions/messageaction.h
@@ -40,6 +40,7 @@ namespace KexiMacro {
class MessageAction : public KexiAction
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
diff --git a/kexi/plugins/macros/kexiactions/navigateaction.cpp b/kexi/plugins/macros/kexiactions/navigateaction.cpp
index d3fe551c..bc573d10 100644
--- a/kexi/plugins/macros/kexiactions/navigateaction.cpp
+++ b/kexi/plugins/macros/kexiactions/navigateaction.cpp
@@ -45,7 +45,7 @@ namespace KexiMacro {
NavigateVariable(ACTIONIMPL* actionimpl)
: KexiVariable<ACTIONIMPL>(actionimpl, "record", i18n("Record"))
{
- QStringList list;
+ TQStringList list;
list << "first" << "previous" << "next" << "last" << "goto";
this->appendChild( KSharedPtr<KoMacro::Variable>( new KoMacro::Variable(list, "@list") ) );
@@ -79,7 +79,7 @@ NavigateAction::~NavigateAction()
{
}
-bool NavigateAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name)
+bool NavigateAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name)
{
kdDebug()<<"NavigateAction::notifyUpdated() name="<<name<<" macroitem.action="<<(macroitem->action() ? macroitem->action()->name() : "NOACTION")<<endl;
KSharedPtr<KoMacro::Variable> variable = macroitem->variable(name, false);
@@ -111,16 +111,16 @@ void NavigateAction::activate(KSharedPtr<KoMacro::Context> context)
KexiViewBase* view = dialog->selectedView();
if(! view) {
- throw KoMacro::Exception(i18n("No view selected for \"%1\".").arg(dialog->caption()));
+ throw KoMacro::Exception(i18n("No view selected for \"%1\".").tqarg(dialog->caption()));
}
KexiDataAwareView* dbview = dynamic_cast<KexiDataAwareView*>( view );
KexiDataAwareObjectInterface* dbobj = dbview ? dbview->dataAwareObject() : 0;
if(! dbview) {
- throw KoMacro::Exception(i18n("The view for \"%1\" could not handle data.").arg(dialog->caption()));
+ throw KoMacro::Exception(i18n("The view for \"%1\" could not handle data.").tqarg(dialog->caption()));
}
- const QString record = context->variable("record")->variant().toString();
+ const TQString record = context->variable("record")->variant().toString();
if(record == "previous") {
dbobj->selectPrevRow();
}
@@ -151,7 +151,7 @@ void NavigateAction::activate(KSharedPtr<KoMacro::Context> context)
void sortAscending();
void sortDescending();
*/
- throw KoMacro::Exception(i18n("Unknown record \"%1\" in view for \"%2\".").arg(record).arg(dialog->caption()));
+ throw KoMacro::Exception(i18n("Unknown record \"%1\" in view for \"%2\".").tqarg(record).tqarg(dialog->caption()));
}
}
diff --git a/kexi/plugins/macros/kexiactions/navigateaction.h b/kexi/plugins/macros/kexiactions/navigateaction.h
index f7f74f86..c5dc61ef 100644
--- a/kexi/plugins/macros/kexiactions/navigateaction.h
+++ b/kexi/plugins/macros/kexiactions/navigateaction.h
@@ -39,6 +39,7 @@ namespace KexiMacro {
class NavigateAction : public KexiAction
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -62,7 +63,7 @@ namespace KexiMacro {
* @return true if the update was successfully else false
* is returned.
*/
- virtual bool notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name);
+ virtual bool notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name);
public slots:
diff --git a/kexi/plugins/macros/kexiactions/objectnamevariable.h b/kexi/plugins/macros/kexiactions/objectnamevariable.h
index eeaabe04..e9ffa949 100644
--- a/kexi/plugins/macros/kexiactions/objectnamevariable.h
+++ b/kexi/plugins/macros/kexiactions/objectnamevariable.h
@@ -42,14 +42,14 @@ namespace KexiMacro {
class ObjectNameVariable : public KexiVariable<ACTIONIMPL>
{
public:
- ObjectNameVariable(ACTIONIMPL* actionimpl, const QString& objectname = QString::null, const QString& name = QString::null)
+ ObjectNameVariable(ACTIONIMPL* actionimpl, const TQString& objectname = TQString(), const TQString& name = TQString())
: KexiVariable<ACTIONIMPL>(actionimpl, "name", i18n("Name"))
{
if(! actionimpl->mainWin()->project())
return;
- QStringList namelist;
- KexiPart::Info* info = Kexi::partManager().infoForMimeType( QString("kexi/%1").arg(objectname) );
+ TQStringList namelist;
+ KexiPart::Info* info = Kexi::partManager().infoForMimeType( TQString("kexi/%1").tqarg(objectname) );
if(info) {
KexiPart::ItemDict* items = actionimpl->mainWin()->project()->items(info);
if(items)
@@ -60,12 +60,12 @@ namespace KexiMacro {
if(namelist.count() <= 0)
namelist << "";
- for(QStringList::Iterator it = namelist.begin(); it != namelist.end(); ++it)
+ for(TQStringList::Iterator it = namelist.begin(); it != namelist.end(); ++it)
this->appendChild( KSharedPtr<KoMacro::Variable>(new KoMacro::Variable(*it)) );
- this->setVariant( (name.isNull() || ! namelist.contains(name)) ? namelist[0] : name );
+ this->setVariant( (name.isNull() || ! namelist.tqcontains(name)) ? namelist[0] : name );
- kdDebug()<<"##################### KexiActions::ObjectNameVariable() objectname="<<objectname<<" name="<<name<<" value="<<this->variant()<<" children="<<namelist<<endl;
+ kdDebug()<<"##################### KexiActions::ObjectNameVariable() objectname="<<objectname<<" name="<<name<<" value="<<this->variant()<<" tqchildren="<<namelist<<endl;
}
virtual ~ObjectNameVariable() {}
diff --git a/kexi/plugins/macros/kexiactions/objectvariable.h b/kexi/plugins/macros/kexiactions/objectvariable.h
index b61f24e3..83a7a471 100644
--- a/kexi/plugins/macros/kexiactions/objectvariable.h
+++ b/kexi/plugins/macros/kexiactions/objectvariable.h
@@ -52,7 +52,7 @@ namespace KexiMacro {
DataExport = 4
};
- ObjectVariable(ACTIONIMPL* actionimpl, int conditions = VisibleInNav, const QString& objectname = QString::null)
+ ObjectVariable(ACTIONIMPL* actionimpl, int conditions = VisibleInNav, const TQString& objectname = TQString())
: KexiVariable<ACTIONIMPL>(actionimpl, "object", i18n("Object"))
{
KexiPart::PartInfoList* parts = Kexi::partManager().partInfoList();
@@ -66,16 +66,16 @@ namespace KexiMacro {
if(conditions & DataExport && ! info->isDataExportSupported())
continue;
- const QString name = info->objectName(); //info->groupName();
+ const TQString name = info->objectName(); //info->groupName();
this->appendChild( KSharedPtr<KoMacro::Variable>(new KoMacro::Variable(name)) );
}
if(! objectname.isNull())
this->setVariant( objectname );
- else if(this->children().count() > 0)
- this->setVariant( this->children()[0]->variant() );
+ else if(this->tqchildren().count() > 0)
+ this->setVariant( this->tqchildren()[0]->variant() );
else
- this->setVariant( QString::null );
+ this->setVariant( TQString() );
kdDebug()<<"##################### KexiActions::ObjectVariable() variant="<<this->variant()<<endl;
}
diff --git a/kexi/plugins/macros/kexiactions/openaction.cpp b/kexi/plugins/macros/kexiactions/openaction.cpp
index b67041bb..2e43116f 100644
--- a/kexi/plugins/macros/kexiactions/openaction.cpp
+++ b/kexi/plugins/macros/kexiactions/openaction.cpp
@@ -33,13 +33,13 @@ using namespace KexiMacro;
namespace KexiMacro {
- static const QString DATAVIEW = "data";
- static const QString DESIGNVIEW = "design";
- static const QString TEXTVIEW = "text";
+ static const TQString DATAVIEW = "data";
+ static const TQString DESIGNVIEW = "design";
+ static const TQString TEXTVIEW = "text";
- static const QString OBJECT = "object";
- static const QString NAME = "name";
- static const QString VIEW = "view";
+ static const TQString OBJECT = "object";
+ static const TQString NAME = "name";
+ static const TQString VIEW = "view";
/**
* The ViewVariable class provide a list of viewmodes supported
@@ -49,11 +49,11 @@ namespace KexiMacro {
class ViewVariable : public KexiVariable<ACTIONIMPL>
{
public:
- ViewVariable(ACTIONIMPL* actionimpl, const QString& objectname = QString::null, const QString& viewname = QString::null)
+ ViewVariable(ACTIONIMPL* actionimpl, const TQString& objectname = TQString(), const TQString& viewname = TQString())
: KexiVariable<ACTIONIMPL>(actionimpl, VIEW, i18n("View"))
{
- QStringList namelist;
- KexiPart::Part* part = Kexi::partManager().partForMimeType( QString("kexi/%1").arg(objectname) );
+ TQStringList namelist;
+ KexiPart::Part* part = Kexi::partManager().partForMimeType( TQString("kexi/%1").tqarg(objectname) );
if(part) {
int viewmodes = part->supportedViewModes();
if(viewmodes & Kexi::DataViewMode)
@@ -62,11 +62,11 @@ namespace KexiMacro {
namelist << DESIGNVIEW;
if(viewmodes & Kexi::TextViewMode)
namelist << TEXTVIEW;
- for(QStringList::Iterator it = namelist.begin(); it != namelist.end(); ++it)
- this->children().append( KSharedPtr<KoMacro::Variable>(new KoMacro::Variable(*it)) );
+ for(TQStringList::Iterator it = namelist.begin(); it != namelist.end(); ++it)
+ this->tqchildren().append( KSharedPtr<KoMacro::Variable>(new KoMacro::Variable(*it)) );
}
- const QString n =
- namelist.contains(viewname)
+ const TQString n =
+ namelist.tqcontains(viewname)
? viewname
: namelist.count() > 0 ? namelist[0] : "";
@@ -92,7 +92,7 @@ OpenAction::~OpenAction()
{
}
-bool OpenAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name)
+bool OpenAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name)
{
kdDebug()<<"OpenAction::notifyUpdated() name="<<name<<" macroitem.action="<<(macroitem->action() ? macroitem->action()->name() : "NOACTION")<<endl;
KSharedPtr<KoMacro::Variable> variable = macroitem->variable(name, false);
@@ -103,9 +103,9 @@ bool OpenAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const Q
variable->clearChildren();
if(name == OBJECT) {
- const QString objectvalue = macroitem->variant(OBJECT, true).toString(); // e.g. "table" or "query"
- const QString objectname = macroitem->variant(NAME, true).toString(); // e.g. "table1" or "table2" if objectvalue above is "table"
- const QString viewname = macroitem->variant(VIEW, true).toString(); // "data", "design" or "text"
+ const TQString objectvalue = macroitem->variant(OBJECT, true).toString(); // e.g. "table" or "query"
+ const TQString objectname = macroitem->variant(NAME, true).toString(); // e.g. "table1" or "table2" if objectvalue above is "table"
+ const TQString viewname = macroitem->variant(VIEW, true).toString(); // "data", "design" or "text"
macroitem->variable(NAME, true)->setChildren(
KoMacro::Variable::List() << KSharedPtr<KoMacro::Variable>(new ObjectNameVariable<OpenAction>(this, objectvalue, objectname)) );
@@ -122,15 +122,15 @@ void OpenAction::activate(KSharedPtr<KoMacro::Context> context)
throw KoMacro::Exception(i18n("No project loaded."));
}
- const QString objectname = context->variable(OBJECT)->variant().toString();
- const QString name = context->variable(NAME)->variant().toString();
- KexiPart::Item* item = mainWin()->project()->itemForMimeType( QString("kexi/%1").arg(objectname).latin1(), name );
+ const TQString objectname = context->variable(OBJECT)->variant().toString();
+ const TQString name = context->variable(NAME)->variant().toString();
+ KexiPart::Item* item = mainWin()->project()->itemForMimeType( TQString("kexi/%1").tqarg(objectname).latin1(), name );
if(! item) {
- throw KoMacro::Exception(i18n("No such object \"%1.%2\".").arg(objectname).arg(name));
+ throw KoMacro::Exception(i18n("No such object \"%1.%2\".").tqarg(objectname).tqarg(name));
}
// Determinate the viewmode.
- const QString view = context->variable(VIEW)->variant().toString();
+ const TQString view = context->variable(VIEW)->variant().toString();
int viewmode;
if(view == DATAVIEW)
viewmode = Kexi::DataViewMode;
@@ -139,14 +139,14 @@ void OpenAction::activate(KSharedPtr<KoMacro::Context> context)
else if(view == TEXTVIEW)
viewmode = Kexi::TextViewMode;
else {
- throw KoMacro::Exception(i18n("No such viewmode \"%1\" in object \"%2.%3\".").arg(view).arg(objectname).arg(name));
+ throw KoMacro::Exception(i18n("No such viewmode \"%1\" in object \"%2.%3\".").tqarg(view).tqarg(objectname).tqarg(name));
}
// Try to open the object now.
bool openingCancelled;
if(! mainWin()->openObject(item, viewmode, openingCancelled)) {
if(! openingCancelled) {
- throw KoMacro::Exception(i18n("Failed to open object \"%1.%2\".").arg(objectname).arg(name));
+ throw KoMacro::Exception(i18n("Failed to open object \"%1.%2\".").tqarg(objectname).tqarg(name));
}
}
}
diff --git a/kexi/plugins/macros/kexiactions/openaction.h b/kexi/plugins/macros/kexiactions/openaction.h
index b49f1238..a30903fb 100644
--- a/kexi/plugins/macros/kexiactions/openaction.h
+++ b/kexi/plugins/macros/kexiactions/openaction.h
@@ -39,6 +39,7 @@ namespace KexiMacro {
class OpenAction : public KexiAction
{
Q_OBJECT
+ TQ_OBJECT
public:
@@ -63,7 +64,7 @@ namespace KexiMacro {
* @return true if the update was successfully else false
* is returned.
*/
- virtual bool notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name);
+ virtual bool notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name);
public slots:
diff --git a/kexi/plugins/macros/kexipart/keximacrodesignview.cpp b/kexi/plugins/macros/kexipart/keximacrodesignview.cpp
index 030be0cb..4d480365 100644
--- a/kexi/plugins/macros/kexipart/keximacrodesignview.cpp
+++ b/kexi/plugins/macros/kexipart/keximacrodesignview.cpp
@@ -18,8 +18,8 @@
#include "keximacrodesignview.h"
#include "keximacroproperty.h"
-#include <qtimer.h>
-#include <qdom.h>
+#include <tqtimer.h>
+#include <tqdom.h>
#include <kdebug.h>
#include <kexidialogbase.h>
@@ -107,8 +107,8 @@ class KexiMacroDesignView::Private
};
-KexiMacroDesignView::KexiMacroDesignView(KexiMainWindow *mainwin, QWidget *parent, ::KoMacro::Macro* const macro)
- : KexiMacroView(mainwin, parent, macro, "KexiMacroDesignView")
+KexiMacroDesignView::KexiMacroDesignView(KexiMainWindow *mainwin, TQWidget *tqparent, ::KoMacro::Macro* const macro)
+ : KexiMacroView(mainwin, tqparent, macro, "KexiMacroDesignView")
, d( new Private() )
{
// The table's data-model.
@@ -123,19 +123,19 @@ KexiMacroDesignView::KexiMacroDesignView(KexiMainWindow *mainwin, QWidget *paren
KexiDB::Field::NoOptions, // options
0, // length
0, // precision
- QVariant(), // default value
+ TQVariant(), // default value
i18n("Action"), // caption
- QString::null, // description
+ TQString(), // description
0 // width
);
d->tabledata->addColumn(actioncol);
- QValueVector<QString> items;
+ TQValueVector<TQString> items;
items.append(""); // empty means no action
// Append the list of actions provided by Kexi.
- QStringList actionnames = KoMacro::Manager::self()->actionNames();
- QStringList::ConstIterator it, end( actionnames.constEnd() );
+ TQStringList actionnames = KoMacro::Manager::self()->actionNames();
+ TQStringList::ConstIterator it, end( actionnames.constEnd() );
for( it = actionnames.constBegin(); it != end; ++it) {
KSharedPtr<KoMacro::Action> action = KoMacro::Manager::self()->action(*it);
items.append( action->text() );
@@ -151,16 +151,16 @@ KexiMacroDesignView::KexiMacroDesignView(KexiMainWindow *mainwin, QWidget *paren
KexiDB::Field::NoOptions, // options
0, // length
0, // precision
- QVariant(), // default value
+ TQVariant(), // default value
i18n("Comment"), // caption
- QString::null, // description
+ TQString(), // description
0 // width
) );
// Create the tableview.
- QHBoxLayout* layout = new QHBoxLayout(this);
+ TQHBoxLayout* tqlayout = new TQHBoxLayout(this);
d->datatable = new KexiDataTable(mainWin(), this, "Macro KexiDataTable", false /*not db aware*/);
- layout->addWidget(d->datatable);
+ tqlayout->addWidget(d->datatable);
d->tableview = d->datatable->tableView();
d->tableview->setSpreadSheetMode();
d->tableview->setColumnStretchEnabled( true, COLUMN_ID_COMMENT ); //last column occupies the rest of the area
@@ -173,14 +173,14 @@ KexiMacroDesignView::KexiMacroDesignView(KexiMainWindow *mainwin, QWidget *paren
d->propertyset = new KexiDataAwarePropertySet(this, d->tableview);
// Connect signals the KexiDataTable provides to local slots.
- connect(d->tabledata, SIGNAL(aboutToChangeCell(KexiTableItem*,int,QVariant&,KexiDB::ResultInfo*)),
- this, SLOT(beforeCellChanged(KexiTableItem*,int,QVariant&,KexiDB::ResultInfo*)));
- connect(d->tabledata, SIGNAL(rowUpdated(KexiTableItem*)),
- this, SLOT(rowUpdated(KexiTableItem*)));
- connect(d->tabledata, SIGNAL(rowInserted(KexiTableItem*,uint,bool)),
- this, SLOT(rowInserted(KexiTableItem*,uint,bool)));
- connect(d->tabledata, SIGNAL(rowDeleted()),
- this, SLOT(rowDeleted()));
+ connect(d->tabledata, TQT_SIGNAL(aboutToChangeCell(KexiTableItem*,int,TQVariant&,KexiDB::ResultInfo*)),
+ this, TQT_SLOT(beforeCellChanged(KexiTableItem*,int,TQVariant&,KexiDB::ResultInfo*)));
+ connect(d->tabledata, TQT_SIGNAL(rowUpdated(KexiTableItem*)),
+ this, TQT_SLOT(rowUpdated(KexiTableItem*)));
+ connect(d->tabledata, TQT_SIGNAL(rowInserted(KexiTableItem*,uint,bool)),
+ this, TQT_SLOT(rowInserted(KexiTableItem*,uint,bool)));
+ connect(d->tabledata, TQT_SIGNAL(rowDeleted()),
+ this, TQT_SLOT(rowDeleted()));
// Everything is ready. So, update the data now.
updateData();
@@ -207,7 +207,7 @@ void KexiMacroDesignView::updateData()
}
// Set the MacroItem's
- QStringList actionnames = KoMacro::Manager::self()->actionNames();
+ TQStringList actionnames = KoMacro::Manager::self()->actionNames();
KoMacro::MacroItem::List macroitems = macro()->items();
KoMacro::MacroItem::List::ConstIterator it(macroitems.constBegin()), end(macroitems.constEnd());
for(uint idx = 0; it != end; ++it, idx++) {
@@ -259,12 +259,12 @@ KoProperty::Set* KexiMacroDesignView::propertySet()
return d->propertyset->currentPropertySet();
}
-void KexiMacroDesignView::beforeCellChanged(KexiTableItem* item, int colnum, QVariant& newvalue, KexiDB::ResultInfo* result)
+void KexiMacroDesignView::beforeCellChanged(KexiTableItem* item, int colnum, TQVariant& newvalue, KexiDB::ResultInfo* result)
{
Q_UNUSED(result);
kdDebug() << "KexiMacroDesignView::beforeCellChanged() colnum=" << colnum << " newvalue=" << newvalue.toString() << endl;
- int rowindex = d->tabledata->findRef(item);
+ int rowindex = d->tabledata->tqfindRef(item);
if(rowindex < 0) {
kdWarning() << "KexiMacroDesignView::beforeCellChanged() No such item" << endl;
return;
@@ -286,11 +286,11 @@ void KexiMacroDesignView::beforeCellChanged(KexiTableItem* item, int colnum, QVa
// Handle the column that should be changed
switch(colnum) {
case COLUMN_ID_ACTION: { // The "Action" column
- QString actionname;
+ TQString actionname;
bool ok;
int selectedindex = newvalue.toInt(&ok);
if(ok && selectedindex > 0) {
- QStringList actionnames = KoMacro::Manager::self()->actionNames();
+ TQStringList actionnames = KoMacro::Manager::self()->actionNames();
actionname = actionnames[ selectedindex - 1 ]; // first item is empty
}
KSharedPtr<KoMacro::Action> action = KoMacro::Manager::self()->action(actionname);
@@ -311,7 +311,7 @@ void KexiMacroDesignView::beforeCellChanged(KexiTableItem* item, int colnum, QVa
void KexiMacroDesignView::rowUpdated(KexiTableItem* item)
{
- int rowindex = d->tabledata->findRef(item);
+ int rowindex = d->tabledata->tqfindRef(item);
kdDebug() << "KexiMacroDesignView::rowUpdated() rowindex=" << rowindex << endl;
//propertySetSwitched();
//propertySetReloaded(true);
@@ -347,7 +347,7 @@ void KexiMacroDesignView::rowDeleted()
macroitems.remove( macroitems.at(rowindex) );
}
-bool KexiMacroDesignView::updateSet(KoProperty::Set* set, KSharedPtr<KoMacro::MacroItem> macroitem, const QString& variablename)
+bool KexiMacroDesignView::updateSet(KoProperty::Set* set, KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& variablename)
{
kdDebug() << "KexiMacroDesignView::updateSet() variablename=" << variablename << endl;
KoProperty::Property* property = KexiMacroProperty::createProperty(macroitem, variablename);
@@ -382,8 +382,8 @@ void KexiMacroDesignView::updateProperties(int row, KoProperty::Set* set, KShare
// if there exists no such propertyset yet, create one.
set = new KoProperty::Set(d->propertyset, action->name());
d->propertyset->insert(row, set, true);
- connect(set, SIGNAL(propertyChanged(KoProperty::Set&, KoProperty::Property&)),
- this, SLOT(propertyChanged(KoProperty::Set&, KoProperty::Property&)));
+ connect(set, TQT_SIGNAL(propertyChanged(KoProperty::Set&, KoProperty::Property&)),
+ this, TQT_SLOT(propertyChanged(KoProperty::Set&, KoProperty::Property&)));
}
// The caption.
@@ -392,8 +392,8 @@ void KexiMacroDesignView::updateProperties(int row, KoProperty::Set* set, KShare
set->addProperty(prop);
// Display the list of variables.
- QStringList varnames = action->variableNames();
- for(QStringList::Iterator it = varnames.begin(); it != varnames.end(); ++it) {
+ TQStringList varnames = action->variableNames();
+ for(TQStringList::Iterator it = varnames.begin(); it != varnames.end(); ++it) {
if(updateSet(set, macroitem, *it)) {
KSharedPtr<KoMacro::Variable> variable = macroitem->variable(*it, true);
kdDebug()<<"KexiMacroDesignView::updateProperties() name=" << *it << " variable=" << variable->variant().toString() << endl;
@@ -418,7 +418,7 @@ void KexiMacroDesignView::propertyChanged(KoProperty::Set& set, KoProperty::Prop
d->reloadsProperties = true;
const int row = d->propertyset->currentRow();
- const QCString name = property.name();
+ const TQCString name = property.name();
kdDebug() << "KexiMacroDesignView::propertyChanged() name=" << name << " row=" << row << endl;
//TODO reload is only needed if something changed!
@@ -433,26 +433,26 @@ void KexiMacroDesignView::propertyChanged(KoProperty::Set& set, KoProperty::Prop
updateProperties(row, &set, macroitem);
}
// It's needed to call the reload delayed cause in KoProperty::Editor
- // QTimer::singleShot(10, this, SLOT(selectItemLater())); may lead
+ // TQTimer::singleShot(10, this, TQT_SLOT(selectItemLater())); may lead
// to crashes if we are to fast.
- QTimer::singleShot(50, this, SLOT(reloadPropertyLater()));
+ TQTimer::singleShot(50, this, TQT_SLOT(reloadPropertyLater()));
}
d->reloadsProperties = false;
*/
/*
- QStringList dirtyvarnames = macroitem->setVariable(name, KSharedPtr<KoMacro::Variable>(pv));
+ TQStringList dirtyvarnames = macroitem->setVariable(name, KSharedPtr<KoMacro::Variable>(pv));
bool dirty = false;
bool reload = false;
- for(QStringList::Iterator it = dirtyvarnames.begin(); it != dirtyvarnames.end(); ++it) {
+ for(TQStringList::Iterator it = dirtyvarnames.begin(); it != dirtyvarnames.end(); ++it) {
KSharedPtr<KoMacro::Variable> variable = macroitem->variable(*it);
if(! variable.data()) {
kdDebug() << "KexiMacroDesignView::propertyChanged() name=" << name << " it=" << *it << " skipped cause such a variable is not known." << endl;
continue;
}
- if(! set.contains( (*it).latin1() )) {
+ if(! set.tqcontains( (*it).latin1() )) {
// If there exist no such property yet, we need to add it.
if(updateSet(&set, macroitem, *it))
reload = true; // we like to reload the whole set
@@ -461,12 +461,12 @@ void KexiMacroDesignView::propertyChanged(KoProperty::Set& set, KoProperty::Prop
kdDebug() << "KexiMacroDesignView::propertyChanged() set existing property=" << *it << endl;
KoProperty::Property& p = set.property((*it).latin1());
- KoMacro::Variable::List children = variable->children();
- if(children.count() > 0) {
- QStringList keys, names;
- KoMacro::Variable::List::Iterator childit(children.begin()), childend(children.end());
+ KoMacro::Variable::List tqchildren = variable->tqchildren();
+ if(tqchildren.count() > 0) {
+ TQStringList keys, names;
+ KoMacro::Variable::List::Iterator childit(tqchildren.begin()), childend(tqchildren.end());
for(; childit != childend; ++childit) {
- const QString s = (*childit)->variant().toString();
+ const TQString s = (*childit)->variant().toString();
keys << s;
names << s;
}
@@ -480,8 +480,8 @@ void KexiMacroDesignView::propertyChanged(KoProperty::Set& set, KoProperty::Prop
// need to reload the whole set.
for(KoProperty::Set::Iterator setit = set; setit.current(); ++setit) {
if(setit.currentKey() == name) continue; // don't remove ourself
- if(setit.currentKey().left(5) == QCString("this:")) continue; // don't remove internal properties
- if(setit.currentKey() == QCString("newrow")) continue; // also an internal used property
+ if(setit.currentKey().left(5) == TQCString("this:")) continue; // don't remove internal properties
+ if(setit.currentKey() == TQCString("newrow")) continue; // also an internal used property
if(action.data() && action->hasVariable(setit.currentKey())) continue; // the property is still valid
reload = true; // we like to reload the whole set
}
diff --git a/kexi/plugins/macros/kexipart/keximacrodesignview.h b/kexi/plugins/macros/kexipart/keximacrodesignview.h
index c3eca2d2..e982f1bd 100644
--- a/kexi/plugins/macros/kexipart/keximacrodesignview.h
+++ b/kexi/plugins/macros/kexipart/keximacrodesignview.h
@@ -41,6 +41,7 @@ class KexiTableItem;
class KexiMacroDesignView : public KexiMacroView
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -48,10 +49,10 @@ class KexiMacroDesignView : public KexiMacroView
*
* \param mainwin The \a KexiMainWindow instance this \a KexiViewBase
* belongs to.
- * \param parent The parent widget this widget should be displayed in.
+ * \param tqparent The tqparent widget this widget should be displayed in.
* \param macro The \a KoMacro::Macro instance this view is for.
*/
- KexiMacroDesignView(KexiMainWindow *mainwin, QWidget *parent, ::KoMacro::Macro* const macro);
+ KexiMacroDesignView(KexiMainWindow *mainwin, TQWidget *tqparent, ::KoMacro::Macro* const macro);
/**
* Destructor.
@@ -75,7 +76,7 @@ class KexiMacroDesignView : public KexiMacroView
* Called before a cell changed in the internaly used
* \a KexiTableView .
*/
- void beforeCellChanged(KexiTableItem*, int, QVariant&, KexiDB::ResultInfo*);
+ void beforeCellChanged(KexiTableItem*, int, TQVariant&, KexiDB::ResultInfo*);
/**
* Called if the passed \p item got updated.
@@ -90,7 +91,7 @@ class KexiMacroDesignView : public KexiMacroView
/**
* Called if a row got inserted.
*/
- void rowInserted(KexiTableItem* item, uint row, bool repaint);
+ void rowInserted(KexiTableItem* item, uint row, bool tqrepaint);
/**
* Called if a property in the \a KoProperty got changed.
@@ -117,7 +118,7 @@ class KexiMacroDesignView : public KexiMacroView
* Update the \a KoProperty::Set set with the passed \a KoMacro::MacroItem
* \p item and the variablename \p variablename .
*/
- bool updateSet(KoProperty::Set* set, KSharedPtr<KoMacro::MacroItem> item, const QString& variablename);
+ bool updateSet(KoProperty::Set* set, KSharedPtr<KoMacro::MacroItem> item, const TQString& variablename);
/**
* Update the properties of the \a KoProperty::Set \p set at
diff --git a/kexi/plugins/macros/kexipart/keximacroerror.cpp b/kexi/plugins/macros/kexipart/keximacroerror.cpp
index 15f4df3f..f6422be9 100644
--- a/kexi/plugins/macros/kexipart/keximacroerror.cpp
+++ b/kexi/plugins/macros/kexipart/keximacroerror.cpp
@@ -24,7 +24,7 @@
#include <core/kexiproject.h>
#include <core/keximainwindow.h>
-#include <qtimer.h>
+#include <tqtimer.h>
/**
* \internal d-pointer class to be more flexible on future extension of the
@@ -44,7 +44,7 @@ class KexiMacroError::Private
};
KexiMacroError::KexiMacroError(KexiMainWindow* mainwin, KSharedPtr<KoMacro::Context> context)
- : KexiMacroErrorBase(mainwin, "KexiMacroError" , /*WFlags*/ Qt::WDestructiveClose)
+ : KexiMacroErrorBase(mainwin, "KexiMacroError" , /*WFlags*/ TQt::WDestructiveClose)
, d(new Private(mainwin, context))
{
//setText(i18n("Execution failed")); //caption
@@ -53,14 +53,14 @@ KexiMacroError::KexiMacroError(KexiMainWindow* mainwin, KSharedPtr<KoMacro::Cont
KoMacro::Exception* exception = context->exception();
iconlbl->setPixmap(KGlobal::instance()->iconLoader()->loadIcon("messagebox_critical", KIcon::Small, 32));
- errorlbl->setText(i18n("<qt>Failed to execute the macro \"%1\".<br>%2</qt>").arg( context->macro()->name() ).arg( exception->errorMessage() ));
+ errorlbl->setText(i18n("<qt>Failed to execute the macro \"%1\".<br>%2</qt>").tqarg( context->macro()->name() ).tqarg( exception->errorMessage() ));
int i = 1;
KoMacro::MacroItem::List items = context->macro()->items();
for (KoMacro::MacroItem::List::ConstIterator mit = items.begin(); mit != items.end(); mit++)
{
KListViewItem* listviewitem = new KListViewItem(errorlist);
- listviewitem->setText(0,QString("%1").arg(i++));
+ listviewitem->setText(0,TQString("%1").tqarg(i++));
listviewitem->setText(1,i18n("Action"));
KSharedPtr<KoMacro::MacroItem> macroitem = *mit;
@@ -86,8 +86,8 @@ KexiMacroError::KexiMacroError(KexiMainWindow* mainwin, KSharedPtr<KoMacro::Cont
}
}
- connect(designerbtn, SIGNAL(clicked()), this, SLOT(designbtnClicked()));
- connect(continuebtn, SIGNAL(clicked()), this, SLOT(continuebtnClicked()));
+ connect(designerbtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(designbtnClicked()));
+ connect(continuebtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(continuebtnClicked()));
}
KexiMacroError::~KexiMacroError()
@@ -98,16 +98,16 @@ KexiMacroError::~KexiMacroError()
void KexiMacroError::designbtnClicked()
{
if(! d->mainwin->project()) {
- kdWarning() << QString("KexiMacroError::designbtnClicked(): No project open.") << endl;
+ kdWarning() << TQString("KexiMacroError::designbtnClicked(): No project open.") << endl;
return;
}
// We need to determinate the KexiPart::Item which should be opened.
KSharedPtr<KoMacro::Macro> macro = d->context->macro();
- const QString name = macro->name();
+ const TQString name = macro->name();
KexiPart::Item* item = d->mainwin->project()->itemForMimeType("kexi/macro", name);
if(! item) {
- kdWarning() << QString("KexiMacroError::designbtnClicked(): No such macro \"%1\"").arg(name) << endl;
+ kdWarning() << TQString("KexiMacroError::designbtnClicked(): No such macro \"%1\"").tqarg(name) << endl;
return;
}
@@ -115,7 +115,7 @@ void KexiMacroError::designbtnClicked()
bool openingCancelled;
if(! d->mainwin->openObject(item, Kexi::DesignViewMode, openingCancelled)) {
if(! openingCancelled) {
- kdWarning() << QString("KexiMacroError::designbtnClicked(): Open macro \"%1\" in designview failed.").arg(name) << endl;
+ kdWarning() << TQString("KexiMacroError::designbtnClicked(): Open macro \"%1\" in designview failed.").tqarg(name) << endl;
return;
}
}
@@ -125,6 +125,6 @@ void KexiMacroError::designbtnClicked()
void KexiMacroError::continuebtnClicked()
{
- QTimer::singleShot(200, d->context, SLOT(activateNext()));
+ TQTimer::singleShot(200, d->context, TQT_SLOT(activateNext()));
close();
}
diff --git a/kexi/plugins/macros/kexipart/keximacroerror.h b/kexi/plugins/macros/kexipart/keximacroerror.h
index 641859b7..d902d6a4 100644
--- a/kexi/plugins/macros/kexipart/keximacroerror.h
+++ b/kexi/plugins/macros/kexipart/keximacroerror.h
@@ -22,9 +22,9 @@
#ifndef KEXIMACROERROR_H
#define KEXIMACROERROR_H
-#include <qwidget.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
+#include <tqwidget.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
#include <klistview.h>
#include <klocale.h>
@@ -50,13 +50,14 @@ class KexiMainWindow;
class KexiMacroError : public KexiMacroErrorBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor.
*
- * @param mainwin The parent @a KexiMainWindow instance.
+ * @param mainwin The tqparent @a KexiMainWindow instance.
* @param context The @a KoMacro::Context where the error happened.
*/
KexiMacroError(KexiMainWindow* mainwin, KSharedPtr<KoMacro::Context> context);
diff --git a/kexi/plugins/macros/kexipart/keximacroerrorbase.ui b/kexi/plugins/macros/kexipart/keximacroerrorbase.ui
index 74e47cfc..cc3b6754 100644
--- a/kexi/plugins/macros/kexipart/keximacroerrorbase.ui
+++ b/kexi/plugins/macros/kexipart/keximacroerrorbase.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KexiMacroErrorBase</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>KexiMacroErrorBase</cstring>
</property>
@@ -25,23 +25,23 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout4</cstring>
+ <cstring>tqlayout4</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout8</cstring>
+ <cstring>tqlayout8</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>iconlbl</cstring>
</property>
@@ -53,7 +53,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>48</width>
<height>48</height>
@@ -65,11 +65,11 @@
<property name="text">
<string></string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignLeft</set>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>errorlbl</cstring>
</property>
@@ -87,7 +87,7 @@
<property name="text">
<string></string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>WordBreak|AlignVCenter</set>
</property>
</widget>
@@ -152,15 +152,15 @@
<number>1</number>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout1</cstring>
+ <cstring>tqlayout1</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>designerbtn</cstring>
</property>
@@ -174,7 +174,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>continuebtn</cstring>
</property>
@@ -182,7 +182,7 @@
<string>Continue</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>cancelbtn</cstring>
</property>
@@ -206,7 +206,7 @@
<slot>close()</slot>
</connection>
</connections>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>klistview.h</includehint>
</includehints>
diff --git a/kexi/plugins/macros/kexipart/keximacropart.cpp b/kexi/plugins/macros/kexipart/keximacropart.cpp
index c4f020e4..1fddbd78 100644
--- a/kexi/plugins/macros/kexipart/keximacropart.cpp
+++ b/kexi/plugins/macros/kexipart/keximacropart.cpp
@@ -25,8 +25,8 @@
//#include "keximainwindow.h"
//#include "kexiproject.h"
-#include <qdom.h>
-#include <qstringlist.h>
+#include <tqdom.h>
+#include <tqstringlist.h>
#include <kgenericfactory.h>
#include <kexipartitem.h>
//#include <kxmlguiclient.h>
@@ -54,8 +54,8 @@ class KexiMacroPart::Private
public:
};
-KexiMacroPart::KexiMacroPart(QObject *parent, const char *name, const QStringList &l)
- : KexiPart::Part(parent, name, l)
+KexiMacroPart::KexiMacroPart(TQObject *tqparent, const char *name, const TQStringList &l)
+ : KexiPart::Part(tqparent, name, l)
, d( new Private() )
{
//kdDebug() << "KexiMacroPart::KexiMacroPart() Ctor" << endl;
@@ -83,7 +83,7 @@ KexiMacroPart::~KexiMacroPart()
delete d;
}
-bool KexiMacroPart::execute(KexiPart::Item* item, QObject* sender)
+bool KexiMacroPart::execute(KexiPart::Item* item, TQObject* sender)
{
KexiDialogBase* dialog = new KexiDialogBase(m_mainWin);
dialog->setId( item->identifier() );
@@ -123,9 +123,9 @@ void KexiMacroPart::initInstanceActions()
//createSharedAction(Kexi::DesignViewMode, i18n("Execute Macro"), "exec", 0, "data_execute");
}
-KexiViewBase* KexiMacroPart::createView(QWidget* parent, KexiDialogBase* dialog, KexiPart::Item& item, int viewMode, QMap<QString,QString>*)
+KexiViewBase* KexiMacroPart::createView(TQWidget* tqparent, KexiDialogBase* dialog, KexiPart::Item& item, int viewMode, TQMap<TQString,TQString>*)
{
- const QString itemname = item.name();
+ const TQString itemname = item.name();
//kdDebug() << "KexiMacroPart::createView() itemname=" << itemname << endl;
if(! itemname.isNull()) {
@@ -140,14 +140,14 @@ KexiViewBase* KexiMacroPart::createView(QWidget* parent, KexiDialogBase* dialog,
KexiMainWindow *win = dialog->mainWin();
if(win && win->project() && win->project()->dbConnection()) {
if(viewMode == Kexi::DesignViewMode) {
- return new KexiMacroDesignView(win, parent, macro);
+ return new KexiMacroDesignView(win, tqparent, macro);
}
if(viewMode == Kexi::TextViewMode) {
- return new KexiMacroTextView(win, parent, macro);
+ return new KexiMacroTextView(win, tqparent, macro);
}
if(viewMode == Kexi::DataViewMode) {
// Called if the macro should be executed.
- return new KexiMacroView(win, parent, macro);
+ return new KexiMacroView(win, tqparent, macro);
}
}
}
@@ -156,7 +156,7 @@ KexiViewBase* KexiMacroPart::createView(QWidget* parent, KexiDialogBase* dialog,
return 0;
}
-QString KexiMacroPart::i18nMessage(const QCString& englishMessage) const
+TQString KexiMacroPart::i18nMessage(const TQCString& englishMessage) const
{
if(englishMessage=="Design of object \"%1\" has been modified.") {
return i18n("Design of macro \"%1\" has been modified.");
diff --git a/kexi/plugins/macros/kexipart/keximacropart.h b/kexi/plugins/macros/kexipart/keximacropart.h
index 8d2d7af2..0ea70c06 100644
--- a/kexi/plugins/macros/kexipart/keximacropart.h
+++ b/kexi/plugins/macros/kexipart/keximacropart.h
@@ -18,7 +18,7 @@
#ifndef KEXIMACROPART_H
#define KEXIMACROPART_H
-//#include <qcstring.h>
+//#include <tqcstring.h>
#include <kexi.h>
#include <kexipart.h>
@@ -30,17 +30,18 @@
class KexiMacroPart : public KexiPart::Part
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor.
*
- * \param parent The parent QObject this part is child of.
+ * \param tqparent The tqparent TQObject this part is child of.
* \param name The name this part has.
* \param args Optional list of arguments passed to this part.
*/
- KexiMacroPart(QObject *parent, const char *name, const QStringList& args);
+ KexiMacroPart(TQObject *tqparent, const char *name, const TQStringList& args);
/**
* Destructor.
@@ -51,28 +52,28 @@ class KexiMacroPart : public KexiPart::Part
* Implementation of the KexiPart::Part::action method used to
* provide scripts as KAction's to the outside world.
*/
- virtual bool execute(KexiPart::Item* item, QObject* sender = 0);
+ virtual bool execute(KexiPart::Item* item, TQObject* sender = 0);
/**
* \return the i18n message for the passed \p englishMessage string.
*/
- virtual QString i18nMessage(const QCString& englishMessage) const;
+ virtual TQString i18nMessage(const TQCString& englishMessage) const;
protected:
/**
* Create a new view.
*
- * \param parent The parent QWidget the new view is displayed in.
+ * \param tqparent The tqparent TQWidget the new view is displayed in.
* \param dialog The \a KexiDialogBase the view is child of.
* \param item The \a KexiPart::Item this view is for.
* \param viewMode The viewmode we like to have a view for.
*/
- virtual KexiViewBase* createView(QWidget *parent,
+ virtual KexiViewBase* createView(TQWidget *tqparent,
KexiDialogBase* dialog,
KexiPart::Item& item,
int viewMode = Kexi::DesignViewMode,
- QMap<QString,QString>* staticObjectArgs = 0);
+ TQMap<TQString,TQString>* staticObjectArgs = 0);
/**
* Initialize the part's actions.
diff --git a/kexi/plugins/macros/kexipart/keximacroproperty.cpp b/kexi/plugins/macros/kexipart/keximacroproperty.cpp
index 2fdafd28..578ba69b 100644
--- a/kexi/plugins/macros/kexipart/keximacroproperty.cpp
+++ b/kexi/plugins/macros/kexipart/keximacroproperty.cpp
@@ -17,10 +17,10 @@
#include "keximacroproperty.h"
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qlistbox.h>
-#include <qpainter.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqlistbox.h>
+#include <tqpainter.h>
#include <kcombobox.h>
#include <kpushbutton.h>
@@ -50,11 +50,11 @@ class KexiMacroProperty::Private
KSharedPtr<KoMacro::MacroItem> macroitem;
/** The name the variable @a KoMacro::Variable is known
as in the @a KoMacro::MacroItem defined above. */
- QString name;
+ TQString name;
};
-KexiMacroProperty::KexiMacroProperty(KoProperty::Property* parent, KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name)
- : KoProperty::CustomProperty(parent)
+KexiMacroProperty::KexiMacroProperty(KoProperty::Property* tqparent, KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name)
+ : KoProperty::CustomProperty(tqparent)
, d( new Private() )
{
d->macroitem = macroitem;
@@ -86,7 +86,7 @@ void KexiMacroProperty::init()
}
//TESTCASE!!!!!!!!!!!!!!!!!!!!!!
- //if(! variable->isEnabled()) qFatal( QString("############## VARIABLE=%1").arg(variable->name()).latin1() );
+ //if(! variable->isEnabled()) qFatal( TQString("############## VARIABLE=%1").tqarg(variable->name()).latin1() );
Q_ASSERT(! d->name.isNull());
m_property->setName( d->name.latin1() );
@@ -96,12 +96,12 @@ void KexiMacroProperty::init()
m_property->setType( KEXIMACRO_PROPERTYEDITORTYPE ); // use our own propertytype
}
-KoProperty::Property* KexiMacroProperty::parentProperty() const
+KoProperty::Property* KexiMacroProperty::tqparentProperty() const
{
return m_property;
}
-void KexiMacroProperty::setValue(const QVariant &value, bool rememberOldValue)
+void KexiMacroProperty::setValue(const TQVariant &value, bool rememberOldValue)
{
Q_UNUSED(rememberOldValue);
kdDebug()<<"KexiMacroProperty::setValue name="<<d->name<<" value="<<value<<" rememberOldValue="<<rememberOldValue<<endl;
@@ -119,11 +119,11 @@ void KexiMacroProperty::setValue(const QVariant &value, bool rememberOldValue)
emit valueChanged();
}
-QVariant KexiMacroProperty::value() const
+TQVariant KexiMacroProperty::value() const
{
KSharedPtr<KoMacro::Variable> variable = d->macroitem->variable(d->name, true);
Q_ASSERT( variable.data() != 0 );
- return variable.data() ? variable->variant() : QVariant();
+ return variable.data() ? variable->variant() : TQVariant();
}
bool KexiMacroProperty::handleValue() const
@@ -136,7 +136,7 @@ KSharedPtr<KoMacro::MacroItem> KexiMacroProperty::macroItem() const
return d->macroitem;
}
-QString KexiMacroProperty::name() const
+TQString KexiMacroProperty::name() const
{
return d->name;
}
@@ -146,7 +146,7 @@ KSharedPtr<KoMacro::Variable> KexiMacroProperty::variable() const
return d->macroitem->variable(d->name, true/*checkaction*/);
}
-KoProperty::Property* KexiMacroProperty::createProperty(KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name)
+KoProperty::Property* KexiMacroProperty::createProperty(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name)
{
KoProperty::Property* property = new KoProperty::Property();
KexiMacroProperty* customproperty = new KexiMacroProperty(property, macroitem, name);
@@ -164,8 +164,8 @@ KoProperty::Property* KexiMacroProperty::createProperty(KSharedPtr<KoMacro::Macr
* KexiMacroPropertyFactory
*/
-KexiMacroPropertyFactory::KexiMacroPropertyFactory(QObject* parent)
- : KoProperty::CustomPropertyFactory(parent)
+KexiMacroPropertyFactory::KexiMacroPropertyFactory(TQObject* tqparent)
+ : KoProperty::CustomPropertyFactory(tqparent)
{
}
@@ -173,23 +173,23 @@ KexiMacroPropertyFactory::~KexiMacroPropertyFactory()
{
}
-KoProperty::CustomProperty* KexiMacroPropertyFactory::createCustomProperty(KoProperty::Property* parent)
+KoProperty::CustomProperty* KexiMacroPropertyFactory::createCustomProperty(KoProperty::Property* tqparent)
{
- kdDebug()<<"KexiMacroPropertyFactory::createCustomProperty parent="<<parent->name()<<endl;
+ kdDebug()<<"KexiMacroPropertyFactory::createCustomProperty tqparent="<<tqparent->name()<<endl;
- KoProperty::CustomProperty* customproperty = parent->customProperty();
- KexiMacroProperty* parentcustomproperty = dynamic_cast<KexiMacroProperty*>(customproperty);
- if(! parentcustomproperty) {
- kdWarning() << "KexiMacroPropertyFactory::createCustomProperty() parent=" << parent->name() << " has an invalid customproperty." << endl;
+ KoProperty::CustomProperty* customproperty = tqparent->customProperty();
+ KexiMacroProperty* tqparentcustomproperty = dynamic_cast<KexiMacroProperty*>(customproperty);
+ if(! tqparentcustomproperty) {
+ kdWarning() << "KexiMacroPropertyFactory::createCustomProperty() tqparent=" << tqparent->name() << " has an invalid customproperty." << endl;
return 0;
}
- KSharedPtr<KoMacro::MacroItem> macroitem = parentcustomproperty->macroItem();
+ KSharedPtr<KoMacro::MacroItem> macroitem = tqparentcustomproperty->macroItem();
Q_ASSERT( macroitem.data() != 0 );
- const QString name = parentcustomproperty->name();
+ const TQString name = tqparentcustomproperty->name();
Q_ASSERT(! name.isEmpty());
- KexiMacroProperty* macroproperty = new KexiMacroProperty(parent, macroitem, name);
+ KexiMacroProperty* macroproperty = new KexiMacroProperty(tqparent, macroitem, name);
if(! macroproperty->variable().data()) {
delete macroproperty; macroproperty = 0;
return 0;
@@ -218,26 +218,26 @@ void KexiMacroPropertyFactory::initFactory()
*/
/**
-* @internal implementation of a QListBoxItem to display the items of the
+* @internal implementation of a TQListBoxItem to display the items of the
* combobox used within @a KexiMacroPropertyWidget to handle variables
* within a @a ListBox instance.
*/
-class ListBoxItem : public QListBoxText
+class ListBoxItem : public TQListBoxText
{
public:
- ListBoxItem(QListBox* listbox)
- : QListBoxText(listbox), m_enabled(true) {}
- ListBoxItem(QListBox* listbox, const QString& text, QListBoxItem* after)
- : QListBoxText(listbox, text, after), m_enabled(true) {}
+ ListBoxItem(TQListBox* listbox)
+ : TQListBoxText(listbox), m_enabled(true) {}
+ ListBoxItem(TQListBox* listbox, const TQString& text, TQListBoxItem* after)
+ : TQListBoxText(listbox, text, after), m_enabled(true) {}
virtual ~ListBoxItem() {}
void setEnabled(bool enabled) { m_enabled = enabled; }
- virtual int width(const QListBox* lb) const {
- Q_ASSERT( dynamic_cast<KComboBox*>( lb->parent() ) );
- return static_cast<KComboBox*>( lb->parent() )->lineEdit()->width() + 2;
+ virtual int width(const TQListBox* lb) const {
+ Q_ASSERT( dynamic_cast<KComboBox*>( lb->tqparent() ) );
+ return static_cast<KComboBox*>( lb->tqparent() )->lineEdit()->width() + 2;
}
- virtual int height(const QListBox* lb) const {
- Q_ASSERT( dynamic_cast<KComboBox*>( lb->parent() ) );
- return m_enabled ? static_cast<KComboBox*>( lb->parent() )->height() + 2 : 0;
+ virtual int height(const TQListBox* lb) const {
+ Q_ASSERT( dynamic_cast<KComboBox*>( lb->tqparent() ) );
+ return m_enabled ? static_cast<KComboBox*>( lb->tqparent() )->height() + 2 : 0;
}
private:
bool m_enabled;
@@ -245,13 +245,13 @@ class ListBoxItem : public QListBoxText
/**
* @internal implementation of a @a ListBoxItem to provide an editable
-* @a KoProperty::Widget as QListBoxItem in a @a ListBox instance.
+* @a KoProperty::Widget as TQListBoxItem in a @a ListBox instance.
*/
class EditListBoxItem : public ListBoxItem
{
public:
- EditListBoxItem(QListBox* listbox, KexiMacroProperty* macroproperty)
+ EditListBoxItem(TQListBox* listbox, KexiMacroProperty* macroproperty)
: ListBoxItem(listbox)
, m_macroproperty(macroproperty)
, m_prop(0)
@@ -265,11 +265,11 @@ class EditListBoxItem : public ListBoxItem
delete m_prop;
}
- virtual QString text() const {
+ virtual TQString text() const {
KSharedPtr<KoMacro::Variable> variable = m_macroproperty->variable();
Q_ASSERT( variable.data() );
//kdDebug()<<"EditListBoxItem::text() text="<<variable->toString()<<endl;
- Q_ASSERT( variable->toString() != QString::null );
+ Q_ASSERT( variable->toString() != TQString() );
return variable->toString();
}
@@ -279,13 +279,13 @@ class EditListBoxItem : public ListBoxItem
KSharedPtr<KoMacro::Action> action() const { return m_macroproperty->macroItem()->action(); }
protected:
- virtual void paint(QPainter* p) {
+ virtual void paint(TQPainter* p) {
if(! m_widget) return;
- Q_ASSERT( dynamic_cast<KComboBox*>( listBox()->parent() ) );
+ Q_ASSERT( dynamic_cast<KComboBox*>( listBox()->tqparent() ) );
const int w = width(listBox());
const int h = height(listBox());
m_widget->setFixedSize(w - 2, h - 2);
- p->drawPixmap(0, 0, QPixmap::grabWidget(m_widget), 1, 1, w - 1, h - 1);
+ p->drawPixmap(0, 0, TQPixmap::grabWidget(m_widget), 1, 1, w - 1, h - 1);
}
private:
@@ -297,22 +297,22 @@ class EditListBoxItem : public ListBoxItem
kdWarning() << "EditListBoxItem::EditListBoxItem() Skipped cause there exists no action for macroproperty=" << m_macroproperty->name() << endl;
return;
}
- KoProperty::Property* parentproperty = m_macroproperty->parentProperty();
- if(! parentproperty) {
- kdWarning() << "EditListBoxItem::EditListBoxItem() No parentproperty defined" << endl;
+ KoProperty::Property* tqparentproperty = m_macroproperty->tqparentProperty();
+ if(! tqparentproperty) {
+ kdWarning() << "EditListBoxItem::EditListBoxItem() No tqparentproperty defined" << endl;
return;
}
KSharedPtr<KoMacro::Variable> variable = m_macroproperty->variable();
if(! variable.data()) {
- kdWarning() << "EditListBoxItem::EditListBoxItem() No variable defined for property=" << parentproperty->name() << endl;
+ kdWarning() << "EditListBoxItem::EditListBoxItem() No variable defined for property=" << tqparentproperty->name() << endl;
return;
}
- QVariant variant = variable->variant();
+ TQVariant variant = variable->variant();
KSharedPtr<KoMacro::Variable> actionvariable = action->variable(m_macroproperty->name());
if(actionvariable.data()) {
- QVariant actionvariant = actionvariable->variant();
+ TQVariant actionvariant = actionvariable->variant();
Q_ASSERT( ! actionvariant.isNull() );
Q_ASSERT( variant.canCast(actionvariant.type()) );
variant.cast( actionvariant.type() ); //preserve type.
@@ -320,38 +320,38 @@ class EditListBoxItem : public ListBoxItem
int type = KoProperty::Auto;
switch(variant.type()) {
- case QVariant::UInt:
- case QVariant::Int: {
+ case TQVariant::UInt:
+ case TQVariant::Int: {
type = KoProperty::Integer;
} break;
- case QVariant::CString:
- case QVariant::String: {
+ case TQVariant::CString:
+ case TQVariant::String: {
type = KoProperty::String;
} break;
default: {
- kdWarning() << "EditListBoxItem::EditListBoxItem() name=" << variable->name() << " type=" << QVariant::typeToName(variant.type()) << endl;
+ kdWarning() << "EditListBoxItem::EditListBoxItem() name=" << variable->name() << " type=" << TQVariant::typeToName(variant.type()) << endl;
} break;
}
- QString name = variable->name();
+ TQString name = variable->name();
Q_ASSERT(! name.isNull());
//if(name.isNull()) name = "aaaaaaaaaaaaaaaaa";//TESTCASE
m_prop = new KoProperty::Property(
name.latin1(), // name
variant, // value
variable->text(), // caption
- QString::null, // description
+ TQString(), // description
type, // type
- 0 //parentproperty // parent
+ 0 //tqparentproperty // tqparent
);
m_widget = KoProperty::FactoryManager::self()->createWidgetForProperty(m_prop);
Q_ASSERT( m_widget != 0 );
- //m_widget->reparent(listBox()->viewport(), 0, QPoint(0,0));
- m_widget->reparent(listBox(), 0, QPoint(1,1));
- //layout->addWidget(m_widget, 1);
+ //m_widget->reparent(listBox()->viewport(), 0, TQPoint(0,0));
+ m_widget->reparent(listBox(), 0, TQPoint(1,1));
+ //tqlayout->addWidget(m_widget, 1);
m_widget->setMinimumHeight(5);
- m_widget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ m_widget->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
}
private:
@@ -361,14 +361,14 @@ class EditListBoxItem : public ListBoxItem
};
/**
-* @internal implementation of a @a QListBox for the combobox used within
+* @internal implementation of a @a TQListBox for the combobox used within
* @a KexiMacroPropertyWidget to handle different variable-states.
*/
-class ListBox : public QListBox
+class ListBox : public TQListBox
{
public:
- ListBox(KComboBox* parent, KexiMacroProperty* macroproperty)
- : QListBox(parent)
+ ListBox(KComboBox* tqparent, KexiMacroProperty* macroproperty)
+ : TQListBox(tqparent)
, m_macroproperty(macroproperty)
, m_edititem(0)
{
@@ -388,74 +388,74 @@ class ListBox : public QListBox
m_edititem = new EditListBoxItem(this, m_macroproperty);
Q_ASSERT( m_edititem->widget() != 0 );
- const QString name = m_macroproperty->name();
- KoMacro::Variable::List children;
+ const TQString name = m_macroproperty->name();
+ KoMacro::Variable::List tqchildren;
{
- KoMacro::Variable::List actionchildren;
+ KoMacro::Variable::List actiontqchildren;
KSharedPtr<KoMacro::Variable> itemvar = m_macroproperty->macroItem()->variable(name,false);
//kdDebug() << "KexiMacroProperty::ListBox::update() itemvar="<<(itemvar.data() ? "name:"+itemvar->name()+" value:"+itemvar->toString() : "NULL")<<endl;
if(itemvar.data())
- actionchildren = itemvar->children();
+ actiontqchildren = itemvar->tqchildren();
KSharedPtr<KoMacro::Action> action = m_edititem->action();
KSharedPtr<KoMacro::Variable> actionvar = action.data() ? action->variable(name) : KSharedPtr<KoMacro::Variable>();
//kdDebug() << "KexiMacroProperty::ListBox::update() actionvar="<<(actionvar.data() ? "name:"+actionvar->name()+" value:"+actionvar->toString() : "NULL")<<endl;
if(actionvar.data())
- actionchildren += actionvar->children();
+ actiontqchildren += actionvar->tqchildren();
- KoMacro::Variable::List::ConstIterator it(actionchildren.constBegin()), end(actionchildren.constEnd());
+ KoMacro::Variable::List::ConstIterator it(actiontqchildren.constBegin()), end(actiontqchildren.constEnd());
for(; it != end; ++it) {
if(name == (*it)->name()) {
- KoMacro::Variable::List list = (*it)->children();
+ KoMacro::Variable::List list = (*it)->tqchildren();
KoMacro::Variable::List::ConstIterator listit(list.constBegin()), listend(list.constEnd());
for(; listit != listend; ++listit)
- children.append( *listit );
+ tqchildren.append( *listit );
}
}
- if(children.count() <= 0)
- children = actionchildren;
+ if(tqchildren.count() <= 0)
+ tqchildren = actiontqchildren;
}
/*
- kdDebug() << "KexiMacroProperty::ListBox::update() name="<<name<<" childcount="<<children.count()<<endl;
- KoMacro::Variable::List::ConstIterator listit(children.constBegin()), listend(children.constEnd());
+ kdDebug() << "KexiMacroProperty::ListBox::update() name="<<name<<" childcount="<<tqchildren.count()<<endl;
+ KoMacro::Variable::List::ConstIterator listit(tqchildren.constBegin()), listend(tqchildren.constEnd());
for(; listit != listend; ++listit) {
- kdDebug()<<" child name="<<(*listit)->name()<<" value="<<(*listit)->toString()<<" childcount="<<(*listit)->children().count()<<endl;
+ kdDebug()<<" child name="<<(*listit)->name()<<" value="<<(*listit)->toString()<<" childcount="<<(*listit)->tqchildren().count()<<endl;
}
*/
- if(children.count() > 0) {
- KoMacro::Variable::List::Iterator childit(children.begin()), childend(children.end());
+ if(tqchildren.count() > 0) {
+ KoMacro::Variable::List::Iterator childit(tqchildren.begin()), childend(tqchildren.end());
for(; childit != childend; ++childit) {
- const QString n = (*childit)->name();
+ const TQString n = (*childit)->name();
//if(! n.startsWith("@")) continue;
- const QVariant v = (*childit)->variant();
+ const TQVariant v = (*childit)->variant();
//kdDebug() << " child name=" << n << " value=" << v << endl;
switch( v.type() ) {
- /* case QVariant::Map: {
- const QMap<QString,QVariant> map = v.toMap();
- for(QMap<QString,QVariant>::ConstIterator it = map.constBegin(); it != map.constEnd(); ++it)
+ /* case TQVariant::Map: {
+ const TQMap<TQString,TQVariant> map = v.toMap();
+ for(TQMap<TQString,TQVariant>::ConstIterator it = map.constBegin(); it != map.constEnd(); ++it)
m_items.append(it.key());
} break; */
- case QVariant::List: {
- const QValueList<QVariant> list = v.toList();
- for(QValueList<QVariant>::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it) {
- const QString s = (*it).toString().stripWhiteSpace();
+ case TQVariant::List: {
+ const TQValueList<TQVariant> list = v.toList();
+ for(TQValueList<TQVariant>::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it) {
+ const TQString s = (*it).toString().stripWhiteSpace();
if(! s.isEmpty())
m_items.append(s);
}
} break;
- case QVariant::StringList: {
- const QStringList list = v.toStringList();
- for(QStringList::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it)
+ case TQVariant::StringList: {
+ const TQStringList list = v.toStringList();
+ for(TQStringList::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it)
if(! (*it).isEmpty())
m_items.append(*it);
} break;
default: {
- const QString s = v.toString().stripWhiteSpace();
+ const TQString s = v.toString().stripWhiteSpace();
if(! s.isEmpty())
m_items.append(s);
} break;
@@ -463,30 +463,30 @@ class ListBox : public QListBox
}
}
- QListBoxItem* item = m_edititem;
+ TQListBoxItem* item = m_edititem;
const uint count = m_items.count();
for(uint i = 0; i < count; i++)
item = new ListBoxItem(this, m_items[i], item);
}
EditListBoxItem* editItem() const { return m_edititem; }
- QStringList items() const { return m_items; }
+ TQStringList items() const { return m_items; }
virtual void hide () {
- QListBox::hide();
+ TQListBox::hide();
for(uint i = 0; i < count(); i++)
static_cast<ListBoxItem*>( item(i) )->setEnabled(false);
}
virtual void show() {
update();
adjustSize();
- QListBox::show();
+ TQListBox::show();
}
private:
KexiMacroProperty* m_macroproperty;
EditListBoxItem* m_edititem;
- QStringList m_items;
+ TQStringList m_items;
};
/**
@@ -501,13 +501,13 @@ class KexiMacroPropertyWidget::Private
ListBox* listbox;
};
-KexiMacroPropertyWidget::KexiMacroPropertyWidget(KoProperty::Property* property, QWidget* parent)
- : KoProperty::Widget(property, parent)
+KexiMacroPropertyWidget::KexiMacroPropertyWidget(KoProperty::Property* property, TQWidget* tqparent)
+ : KoProperty::Widget(property, tqparent)
, d( new Private() )
{
kdDebug() << "KexiMacroPropertyWidget::KexiMacroPropertyWidget() Ctor" << endl;
- QHBoxLayout* layout = new QHBoxLayout(this, 0, 0);
+ TQHBoxLayout* tqlayout = new TQHBoxLayout(this, 0, 0);
d->macroproperty = dynamic_cast<KexiMacroProperty*>( property->customProperty() );
if(! d->macroproperty) {
@@ -516,18 +516,18 @@ KexiMacroPropertyWidget::KexiMacroPropertyWidget(KoProperty::Property* property,
}
d->combobox = new KComboBox(this);
- layout->addWidget(d->combobox);
+ tqlayout->addWidget(d->combobox);
d->listbox = new ListBox(d->combobox, d->macroproperty);
d->combobox->setEditable(true);
d->combobox->setListBox(d->listbox);
- d->combobox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ d->combobox->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
d->combobox->setMinimumHeight(5);
- d->combobox->setInsertionPolicy(QComboBox::NoInsertion);
+ d->combobox->setInsertionPolicy(TQComboBox::NoInsertion);
d->combobox->setMinimumSize(10, 0); // to allow the combo to be resized to a small size
d->combobox->setAutoCompletion(false);
d->combobox->setContextMenuEnabled(false);
- QVariant value = d->macroproperty->value();
+ TQVariant value = d->macroproperty->value();
int index = d->listbox->items().findIndex( value.toString() );
if(index >= 0) {
d->combobox->setCurrentItem(index + 1);
@@ -543,14 +543,14 @@ KexiMacroPropertyWidget::KexiMacroPropertyWidget(KoProperty::Property* property,
d->combobox->setFocusProxy( d->listbox->editItem()->widget() );
setFocusWidget( d->combobox->lineEdit() );
- connect(d->combobox, SIGNAL(textChanged(const QString&)),
- this, SLOT(slotComboBoxChanged()));
- connect(d->combobox, SIGNAL(activated(int)),
- this, SLOT(slotComboBoxActivated()));
- connect(d->listbox->editItem()->widget(), SIGNAL(valueChanged(Widget*)),
- this, SLOT(slotWidgetValueChanged()));
- connect(d->macroproperty, SIGNAL(valueChanged()),
- this, SLOT(slotPropertyValueChanged()));
+ connect(d->combobox, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(slotComboBoxChanged()));
+ connect(d->combobox, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotComboBoxActivated()));
+ connect(d->listbox->editItem()->widget(), TQT_SIGNAL(valueChanged(Widget*)),
+ this, TQT_SLOT(slotWidgetValueChanged()));
+ connect(d->macroproperty, TQT_SIGNAL(valueChanged()),
+ this, TQT_SLOT(slotPropertyValueChanged()));
}
KexiMacroPropertyWidget::~KexiMacroPropertyWidget()
@@ -559,23 +559,23 @@ KexiMacroPropertyWidget::~KexiMacroPropertyWidget()
delete d;
}
-QVariant KexiMacroPropertyWidget::value() const
+TQVariant KexiMacroPropertyWidget::value() const
{
kdDebug()<<"KexiMacroPropertyWidget::value() value="<<d->macroproperty->value()<<endl;
return d->macroproperty->value();
- /* QVariant value = d->combobox->currentText();
+ /* TQVariant value = d->combobox->currentText();
value.cast( d->macroproperty->value().type() );
return value; */
}
-void KexiMacroPropertyWidget::setValue(const QVariant& value, bool emitChange)
+void KexiMacroPropertyWidget::setValue(const TQVariant& value, bool emitChange)
{
kdDebug()<<"KexiMacroPropertyWidget::setValue() value="<<value<<" emitChange="<<emitChange<<endl;
if(! emitChange)
d->combobox->blockSignals(true);
- const QString s = value.toString();
+ const TQString s = value.toString();
d->combobox->setCurrentText( s.isNull() ? "" : s );
if(emitChange)
@@ -593,7 +593,7 @@ void KexiMacroPropertyWidget::setReadOnlyInternal(bool readOnly)
void KexiMacroPropertyWidget::slotComboBoxChanged()
{
kdDebug()<<"KexiMacroPropertyWidget::slotComboBoxChanged()"<<endl;
- const QVariant v = d->combobox->currentText();
+ const TQVariant v = d->combobox->currentText();
d->macroproperty->setValue(v, true);
//emit valueChanged(this);
}
@@ -602,7 +602,7 @@ void KexiMacroPropertyWidget::slotComboBoxActivated()
{
Q_ASSERT( d->listbox->editItem()->widget() );
const int index = d->combobox->currentItem();
- QString text = (index == 0)
+ TQString text = (index == 0)
? d->listbox->editItem()->widget()->value().toString()
: d->combobox->text(index);
kdDebug()<<"KexiMacroPropertyWidget::slotComboBoxActivated() index="<<index<<" text="<<text<<endl;
@@ -618,7 +618,7 @@ void KexiMacroPropertyWidget::slotWidgetValueChanged()
void KexiMacroPropertyWidget::slotPropertyValueChanged()
{
Q_ASSERT( d->listbox->editItem()->widget() );
- const QVariant v = d->macroproperty->value();
+ const TQVariant v = d->macroproperty->value();
kdDebug()<<"KexiMacroPropertyWidget::slotPropertyValueChanged() value="<<v<<endl;
d->listbox->editItem()->widget()->setValue(v, true);
}
diff --git a/kexi/plugins/macros/kexipart/keximacroproperty.h b/kexi/plugins/macros/kexipart/keximacroproperty.h
index 19f7b7ac..b1c256e9 100644
--- a/kexi/plugins/macros/kexipart/keximacroproperty.h
+++ b/kexi/plugins/macros/kexipart/keximacroproperty.h
@@ -36,35 +36,36 @@ class KexiMacroPropertyWidget;
* more control about the handling of our macro-properties.
*/
class KexiMacroProperty
- : public QObject
+ : public TQObject
, public KoProperty::CustomProperty
{
Q_OBJECT
+ TQ_OBJECT
friend class KexiMacroPropertyWidget;
public:
/** Constructor. */
- explicit KexiMacroProperty(KoProperty::Property* parent, KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name);
+ explicit KexiMacroProperty(KoProperty::Property* tqparent, KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name);
/** Destructor. */
virtual ~KexiMacroProperty();
- /** @return the parent @a KoProperty::Property instance. */
- KoProperty::Property* parentProperty() const;
+ /** @return the tqparent @a KoProperty::Property instance. */
+ KoProperty::Property* tqparentProperty() const;
/** This function is called by @ref KoProperty::Property::setValue()
when a custom property is set.
You don't have to modify the property value, it is done by Property class.
- You just have to update child or parent properties value (m_property->parent()->setValue()).
+ You just have to update child or tqparent properties value (m_property->tqparent()->setValue()).
Note that, when calling Property::setValue, you <b>need</b> to set
useCustomProperty (3rd parameter) to false, or there will be infinite recursion. */
- virtual void setValue(const QVariant &value, bool rememberOldValue);
+ virtual void setValue(const TQVariant &value, bool rememberOldValue);
/** This function is called by @ref KoProperty::Property::value()
when a custom property is set and @ref handleValue() is true.
- You should return property's value, taken from parent's value.*/
- virtual QVariant value() const;
+ You should return property's value, taken from tqparent's value.*/
+ virtual TQVariant value() const;
/** Tells whether CustomProperty should be used to get the property's value.
You should return true for child properties, and false for others. */
@@ -75,8 +76,8 @@ class KexiMacroProperty
KSharedPtr<KoMacro::MacroItem> macroItem() const;
/** \return the name the property has in the \a KoMacro::MacroItem
- above. Is QString::null if there was no item provided. */
- QString name() const;
+ above. Is TQString() if there was no item provided. */
+ TQString name() const;
/** \return the \a KoMacro::Variable which has the name @a name()
in the item @a macroItem() . If such a variable doesn't exists NULL
@@ -85,7 +86,7 @@ class KexiMacroProperty
/** Factory function to create a new @a KoProperty::Property instance
that will use a @a KexiMacroProperty as container. */
- static KoProperty::Property* createProperty(KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name);
+ static KoProperty::Property* createProperty(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name);
signals:
@@ -110,18 +111,18 @@ class KexiMacroPropertyFactory : public KoProperty::CustomPropertyFactory
{
public:
/** Constructor. */
- explicit KexiMacroPropertyFactory(QObject* parent);
+ explicit KexiMacroPropertyFactory(TQObject* tqparent);
/** Destructor. */
virtual ~KexiMacroPropertyFactory();
- /** @return a new instance of custom property for @p parent.
+ /** @return a new instance of custom property for @p tqparent.
Implement this for property types you want to support.
- Use parent->type() to get type of the property. */
- virtual KoProperty::CustomProperty* createCustomProperty(KoProperty::Property* parent);
+ Use tqparent->type() to get type of the property. */
+ virtual KoProperty::CustomProperty* createCustomProperty(KoProperty::Property* tqparent);
/** @return a new instance of custom property for @p property.
Implement this for property editor types you want to support.
- Use parent->type() to get type of the property. */
+ Use tqparent->type() to get type of the property. */
virtual KoProperty::Widget* createCustomWidget(KoProperty::Property* property);
/** Initializes this factory. The factory may register itself at
@@ -139,21 +140,22 @@ class KexiMacroPropertyFactory : public KoProperty::CustomPropertyFactory
class KexiMacroPropertyWidget : public KoProperty::Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
/** Constructor. */
- explicit KexiMacroPropertyWidget(KoProperty::Property* property, QWidget* parent = 0);
+ explicit KexiMacroPropertyWidget(KoProperty::Property* property, TQWidget* tqparent = 0);
/** Destructor. */
virtual ~KexiMacroPropertyWidget();
/** @return the value this widget has. */
- virtual QVariant value() const;
+ virtual TQVariant value() const;
/** Set the value @p value this widget has. If @p emitChange is true,
the @p KoProperty::Widget::valueChanged signal will be emitted. */
- virtual void setValue(const QVariant& value, bool emitChange=true);
+ virtual void setValue(const TQVariant& value, bool emitChange=true);
- //virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value);
+ //virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value);
protected:
@@ -165,7 +167,7 @@ class KexiMacroPropertyWidget : public KoProperty::Widget
/** Called if the text in the KComboBox changed. */
void slotComboBoxChanged();
- /** Called if an item in the QListBox of the KComboBox got activated. */
+ /** Called if an item in the TQListBox of the KComboBox got activated. */
void slotComboBoxActivated();
/** Called if the @a KoProperty::Widget of the EditListBoxItem got changed. */
diff --git a/kexi/plugins/macros/kexipart/keximacrotextview.cpp b/kexi/plugins/macros/kexipart/keximacrotextview.cpp
index 95c94a47..deec9633 100644
--- a/kexi/plugins/macros/kexipart/keximacrotextview.cpp
+++ b/kexi/plugins/macros/kexipart/keximacrotextview.cpp
@@ -41,17 +41,17 @@ class KexiMacroTextView::Private
};
-KexiMacroTextView::KexiMacroTextView(KexiMainWindow *mainwin, QWidget *parent, ::KoMacro::Macro* const macro)
- : KexiMacroView(mainwin, parent, macro, "KexiMacroTextView")
+KexiMacroTextView::KexiMacroTextView(KexiMainWindow *mainwin, TQWidget *tqparent, ::KoMacro::Macro* const macro)
+ : KexiMacroView(mainwin, tqparent, macro, "KexiMacroTextView")
, d( new Private() )
{
- QHBoxLayout* layout = new QHBoxLayout(this);
+ TQHBoxLayout* tqlayout = new TQHBoxLayout(this);
d->editor = new KTextEdit(this);
- d->editor->setTextFormat(Qt::PlainText);
- d->editor->setWordWrap(QTextEdit::NoWrap);
- layout->addWidget(d->editor);
+ d->editor->setTextFormat(TQt::PlainText);
+ d->editor->setWordWrap(TQTextEdit::NoWrap);
+ tqlayout->addWidget(d->editor);
- connect(d->editor, SIGNAL(textChanged()), this, SLOT(editorChanged()));
+ connect(d->editor, TQT_SIGNAL(textChanged()), this, TQT_SLOT(editorChanged()));
}
KexiMacroTextView::~KexiMacroTextView()
@@ -66,13 +66,13 @@ void KexiMacroTextView::editorChanged()
bool KexiMacroTextView::loadData()
{
- QString data;
+ TQString data;
if(! loadDataBlock(data)) {
kexipluginsdbg << "KexiMacroTextView::loadData(): no DataBlock" << endl;
return false;
}
- kdDebug() << QString("KexiMacroTextView::loadData()\n%1").arg(data) << endl;
+ kdDebug() << TQString("KexiMacroTextView::loadData()\n%1").tqarg(data) << endl;
//d->editor->blockSignals(true);
d->editor->setText(data);
//d->editor->blockSignals(false);
@@ -82,7 +82,7 @@ bool KexiMacroTextView::loadData()
tristate KexiMacroTextView::storeData(bool /*dontAsk*/)
{
- kexipluginsdbg << QString("KexiMacroTextView::storeData() %1 [%2]\n%3").arg(parentDialog()->partItem()->name()).arg(parentDialog()->id()).arg(d->editor->text()) << endl;
+ kexipluginsdbg << TQString("KexiMacroTextView::storeData() %1 [%2]\n%3").tqarg(tqparentDialog()->partItem()->name()).tqarg(tqparentDialog()->id()).tqarg(d->editor->text()) << endl;
return storeDataBlock( d->editor->text() );
}
diff --git a/kexi/plugins/macros/kexipart/keximacrotextview.h b/kexi/plugins/macros/kexipart/keximacrotextview.h
index 66a2229c..5101c30b 100644
--- a/kexi/plugins/macros/kexipart/keximacrotextview.h
+++ b/kexi/plugins/macros/kexipart/keximacrotextview.h
@@ -32,6 +32,7 @@ namespace KoMacro {
class KexiMacroTextView : public KexiMacroView
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -39,10 +40,10 @@ class KexiMacroTextView : public KexiMacroView
*
* \param mainwin The \a KexiMainWindow instance this \a KexiViewBase
* belongs to.
- * \param parent The parent widget this widget should be displayed in.
+ * \param tqparent The tqparent widget this widget should be displayed in.
* \param macro The \a KoMacro::Macro instance this view is for.
*/
- KexiMacroTextView(KexiMainWindow *mainwin, QWidget *parent, ::KoMacro::Macro* const macro);
+ KexiMacroTextView(KexiMainWindow *mainwin, TQWidget *tqparent, ::KoMacro::Macro* const macro);
/**
* Destructor.
diff --git a/kexi/plugins/macros/kexipart/keximacroview.cpp b/kexi/plugins/macros/kexipart/keximacroview.cpp
index 35200829..507764a7 100644
--- a/kexi/plugins/macros/kexipart/keximacroview.cpp
+++ b/kexi/plugins/macros/kexipart/keximacroview.cpp
@@ -17,7 +17,7 @@
#include "keximacroview.h"
-#include <qdom.h>
+#include <tqdom.h>
#include <kdebug.h>
#include <kexidialogbase.h>
@@ -62,12 +62,12 @@ class KexiMacroView::Private
};
-KexiMacroView::KexiMacroView(KexiMainWindow *mainwin, QWidget *parent, KoMacro::Macro* const macro, const char* name)
- : KexiViewBase(mainwin, parent, (name ? name : "KexiMacroView"))
+KexiMacroView::KexiMacroView(KexiMainWindow *mainwin, TQWidget *tqparent, KoMacro::Macro* const macro, const char* name)
+ : KexiViewBase(mainwin, tqparent, (name ? name : "KexiMacroView"))
, d( new Private(macro) )
{
//kdDebug() << "KexiMacroView::KexiMacroView() Ctor" << endl;
- plugSharedAction( "data_execute", this, SLOT(execute()) );
+ plugSharedAction( "data_execute", this, TQT_SLOT(execute()) );
}
KexiMacroView::~KexiMacroView()
@@ -98,16 +98,16 @@ bool KexiMacroView::loadData()
{
d->macro->clearItems();
- QString data;
+ TQString data;
if(! loadDataBlock(data)) {
kexipluginsdbg << "KexiMacroView::loadData(): no DataBlock" << endl;
return false;
}
- QString errmsg;
+ TQString errmsg;
int errline, errcol;
- QDomDocument domdoc;
+ TQDomDocument domdoc;
bool parsed = domdoc.setContent(data, false, &errmsg, &errline, &errcol);
if(! parsed) {
@@ -115,8 +115,8 @@ bool KexiMacroView::loadData()
return false;
}
- kexipluginsdbg << QString("KexiMacroView::loadData()\n%1").arg(domdoc.toString()) << endl;
- QDomElement macroelem = domdoc.namedItem("macro").toElement();
+ kexipluginsdbg << TQString("KexiMacroView::loadData()\n%1").tqarg(domdoc.toString()) << endl;
+ TQDomElement macroelem = domdoc.namedItem("macro").toElement();
if(macroelem.isNull()) {
kexipluginsdbg << "KexiMacroView::loadData() Macro domelement is null" << endl;
return false;
@@ -139,7 +139,7 @@ KexiDB::SchemaData* KexiMacroView::storeNewData(const KexiDB::SchemaData& sdata,
if(! storeData()) {
kexipluginsdbg << "KexiMacroView::storeNewData() Failed to store the data." << endl;
//failure: remove object's schema data to avoid garbage
- KexiDB::Connection *conn = parentDialog()->mainWin()->project()->dbConnection();
+ KexiDB::Connection *conn = tqparentDialog()->mainWin()->project()->dbConnection();
conn->removeObject( schema->id() );
delete schema;
return 0;
@@ -150,21 +150,21 @@ KexiDB::SchemaData* KexiMacroView::storeNewData(const KexiDB::SchemaData& sdata,
tristate KexiMacroView::storeData(bool /*dontAsk*/)
{
- QDomDocument domdoc("macros");
- QDomElement macroelem = d->macro->toXML();
+ TQDomDocument domdoc("macros");
+ TQDomElement macroelem = d->macro->toXML();
domdoc.appendChild(macroelem);
- const QString xml = domdoc.toString(2);
- const QString name = QString("%1 [%2]").arg(parentDialog()->partItem()->name()).arg(parentDialog()->id());
- kexipluginsdbg << QString("KexiMacroView::storeData %1\n%2").arg(name).arg(xml) << endl;
+ const TQString xml = domdoc.toString(2);
+ const TQString name = TQString("%1 [%2]").tqarg(tqparentDialog()->partItem()->name()).tqarg(tqparentDialog()->id());
+ kexipluginsdbg << TQString("KexiMacroView::storeData %1\n%2").tqarg(name).tqarg(xml) << endl;
return storeDataBlock(xml);
}
-void KexiMacroView::execute(QObject* sender)
+void KexiMacroView::execute(TQObject* sender)
{
KSharedPtr<KoMacro::Context> context = d->macro->execute(sender);
if(context->hadException()) {
KexiMacroError* error = new KexiMacroError(
- mainWin(), // The parent KexiMainWindow
+ mainWin(), // The tqparent KexiMainWindow
context // The KoMacro::Context where the error occured.
);
error->exec();
diff --git a/kexi/plugins/macros/kexipart/keximacroview.h b/kexi/plugins/macros/kexipart/keximacroview.h
index beed842e..0c44419b 100644
--- a/kexi/plugins/macros/kexipart/keximacroview.h
+++ b/kexi/plugins/macros/kexipart/keximacroview.h
@@ -42,6 +42,7 @@ class KexiTableItem;
class KexiMacroView : public KexiViewBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -49,10 +50,10 @@ class KexiMacroView : public KexiViewBase
*
* \param mainwin The \a KexiMainWindow instance this \a KexiViewBase
* belongs to.
- * \param parent The parent widget this widget should be displayed in.
+ * \param tqparent The tqparent widget this widget should be displayed in.
* \param macro The \a KoMacro::Macro instance this view is for.
*/
- KexiMacroView(KexiMainWindow *mainwin, QWidget *parent, ::KoMacro::Macro* const macro, const char* name = 0);
+ KexiMacroView(KexiMainWindow *mainwin, TQWidget *tqparent, ::KoMacro::Macro* const macro, const char* name = 0);
/**
* Destructor.
@@ -94,7 +95,7 @@ class KexiMacroView : public KexiViewBase
* This slot will be invoked if Kexi's menuitem Data=>Execute
* got activated and will execute the Macro.
*/
- void execute(QObject* sender = 0);
+ void execute(TQObject* sender = 0);
protected:
diff --git a/kexi/plugins/macros/lib/action.cpp b/kexi/plugins/macros/lib/action.cpp
index e2dc0b64..db5596b4 100644
--- a/kexi/plugins/macros/lib/action.cpp
+++ b/kexi/plugins/macros/lib/action.cpp
@@ -37,21 +37,21 @@ namespace KoMacro {
/**
* The name this @a Action has.
*/
- QString name;
+ TQString name;
/**
* The i18n-caption text this @a Action has.
*/
- QString text;
+ TQString text;
/**
* The comment the user is able to define for each action.
*/
- QString comment;
+ TQString comment;
/**
* A map of @a Variable instances this @a Action
- * provides accessible by there QString name.
+ * provides accessible by there TQString name.
*/
Variable::Map varmap;
@@ -60,14 +60,14 @@ namespace KoMacro {
* sorted order for the @a Variable instances
* defined in the map above.
*/
- QStringList varnames;
+ TQStringList varnames;
};
}
-Action::Action(const QString& name, const QString& text)
- : QObject()
+Action::Action(const TQString& name, const TQString& text)
+ : TQObject()
, KShared()
, d( new Private() ) // create the private d-pointer instance.
{
@@ -81,55 +81,55 @@ Action::Action(const QString& name, const QString& text)
Action::~Action()
{
- //kdDebug() << QString("Action::~Action() name=\"%1\"").arg(name()) << endl;
+ //kdDebug() << TQString("Action::~Action() name=\"%1\"").tqarg(name()) << endl;
// destroy the private d-pointer instance.
delete d;
}
-const QString Action::toString() const
+const TQString Action::toString() const
{
- return QString("Action:%1").arg(name());
+ return TQString("Action:%1").tqarg(name());
}
-const QString Action::name() const
+const TQString Action::name() const
{
return d->name;
}
-void Action::setName(const QString& name)
+void Action::setName(const TQString& name)
{
d->name = name;
}
-const QString Action::text() const
+const TQString Action::text() const
{
return d->text;
}
-void Action::setText(const QString& text)
+void Action::setText(const TQString& text)
{
d->text = text;
}
-const QString Action::comment() const
+const TQString Action::comment() const
{
return d->comment;
}
-void Action::setComment(const QString& comment)
+void Action::setComment(const TQString& comment)
{
d->comment = comment;
}
-bool Action::hasVariable(const QString& name) const
+bool Action::hasVariable(const TQString& name) const
{
- return d->varmap.contains(name);
+ return d->varmap.tqcontains(name);
}
-KSharedPtr<Variable> Action::variable(const QString& name) const
+KSharedPtr<Variable> Action::variable(const TQString& name) const
{
- return d->varmap.contains(name) ? d->varmap[name] : KSharedPtr<Variable>(0);
+ return d->varmap.tqcontains(name) ? d->varmap[name] : KSharedPtr<Variable>(0);
}
Variable::Map Action::variables() const
@@ -137,21 +137,21 @@ Variable::Map Action::variables() const
return d->varmap;
}
-QStringList Action::variableNames() const
+TQStringList Action::variableNames() const
{
return d->varnames;
}
void Action::setVariable(KSharedPtr<Variable> variable)
{
- const QString name = variable->name();
- if(! d->varmap.contains(name)) {
+ const TQString name = variable->name();
+ if(! d->varmap.tqcontains(name)) {
d->varnames.append(name);
}
- d->varmap.replace(name, variable);
+ d->varmap.tqreplace(name, variable);
}
-void Action::setVariable(const QString& name, const QString& text, const QVariant& variant)
+void Action::setVariable(const TQString& name, const TQString& text, const TQVariant& variant)
{
Variable* variable = new Variable(variant);
variable->setName(name);
@@ -159,9 +159,9 @@ void Action::setVariable(const QString& name, const QString& text, const QVarian
setVariable( KSharedPtr<Variable>(variable) );
}
-void Action::removeVariable(const QString& name)
+void Action::removeVariable(const TQString& name)
{
- if(d->varmap.contains(name)) {
+ if(d->varmap.tqcontains(name)) {
d->varmap.remove(name);
d->varnames.remove(name);
}
diff --git a/kexi/plugins/macros/lib/action.h b/kexi/plugins/macros/lib/action.h
index 5200c1a4..51e97869 100644
--- a/kexi/plugins/macros/lib/action.h
+++ b/kexi/plugins/macros/lib/action.h
@@ -25,9 +25,9 @@
#include "context.h"
#include "variable.h"
-#include <qobject.h>
+#include <tqobject.h>
#include <ksharedptr.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
namespace KoMacro {
@@ -36,26 +36,27 @@ namespace KoMacro {
* functionality KAction doesn't provide.
*/
class KOMACRO_EXPORT Action
- : public QObject // Qt functionality like signals and slots
+ : public TQObject // TQt functionality like signals and slots
, public KShared // shared reference-counting
{
Q_OBJECT
+ TQ_OBJECT
/// Property to get/set the name.
- Q_PROPERTY(QString name READ name WRITE setName)
+ TQ_PROPERTY(TQString name READ name WRITE setName)
/// Property to get/set the text.
- Q_PROPERTY(QString text READ text WRITE setText)
+ TQ_PROPERTY(TQString text READ text WRITE setText)
/// Property to get/set the comment.
- Q_PROPERTY(QString comment READ comment WRITE setComment)
+ TQ_PROPERTY(TQString comment READ comment WRITE setComment)
public:
/**
* Shared pointer to implement reference-counting.
*/
- typedef QMap<QString, KSharedPtr<Action> > Map;
+ typedef TQMap<TQString, KSharedPtr<Action> > Map;
/**
* Constructor.
@@ -63,7 +64,7 @@ namespace KoMacro {
* @param name The unique name this @a Action has.
* @param text The i18n-caption text this @a Action has.
*/
- explicit Action(const QString& name, const QString& text = QString::null);
+ explicit Action(const TQString& name, const TQString& text = TQString());
/**
* Destructor.
@@ -74,50 +75,50 @@ namespace KoMacro {
* @return a string representation of the functionality
* this action provides.
*/
- virtual const QString toString() const;
+ virtual const TQString toString() const;
/**
* The name this @a Action has.
*/
- const QString name() const;
+ const TQString name() const;
/**
* Set the name of the @a Action to @p name .
*/
- void setName(const QString& name);
+ void setName(const TQString& name);
/**
* @return the i18n-caption text this @a Action has.
*/
- const QString text() const;
+ const TQString text() const;
/**
* Set the i18n-caption text this @a Action has.
*/
- void setText(const QString& text);
+ void setText(const TQString& text);
/**
* @return the comment associated with this action.
*/
- const QString comment() const;
+ const TQString comment() const;
/**
* Set the @p comment associated with this action.
*/
- void setComment(const QString& comment);
+ void setComment(const TQString& comment);
/**
* @return true if there exists a variable with the
* name @p name else false is returned.
*/
- bool hasVariable(const QString& name) const;
+ bool hasVariable(const TQString& name) const;
/**
* @return the variable @a Variable defined for the
* name @p name . If there exists no @a Variable with
* such a name, NULL is returned.
*/
- KSharedPtr<Variable> variable(const QString& name) const;
+ KSharedPtr<Variable> variable(const TQString& name) const;
/**
* @return the map of variables this @a Action provides.
@@ -127,7 +128,7 @@ namespace KoMacro {
/**
* @return a list of variablenames this @a Action provides.s
*/
- QStringList variableNames() const;
+ TQStringList variableNames() const;
/**
* Append the @a Variable @p variable to list of variables
@@ -140,15 +141,15 @@ namespace KoMacro {
*
* @param name The name the variable should have.
* @param text The i18n-caption used for display.
- * @param variant The QVariant value.
+ * @param variant The TQVariant value.
*/
- void setVariable(const QString& name, const QString& text, const QVariant& variant);
+ void setVariable(const TQString& name, const TQString& text, const TQVariant& variant);
/**
* Remove the variable defined with @p name . If there exists
* no such variable, nothing is done.
*/
- void removeVariable(const QString& name);
+ void removeVariable(const TQString& name);
/**
* This function is called, when the @a KoMacro::Variable
@@ -161,7 +162,7 @@ namespace KoMacro {
* @return true if the update was successfully else false
* is returned.
*/
- virtual bool notifyUpdated(const KSharedPtr<MacroItem> &macroitem, const QString& name) {
+ virtual bool notifyUpdated(const KSharedPtr<MacroItem> &macroitem, const TQString& name) {
Q_UNUSED(macroitem);
Q_UNUSED(name);
return true; // The default implementation does nothing.
diff --git a/kexi/plugins/macros/lib/context.cpp b/kexi/plugins/macros/lib/context.cpp
index 135c10c9..6e2fb2e4 100644
--- a/kexi/plugins/macros/lib/context.cpp
+++ b/kexi/plugins/macros/lib/context.cpp
@@ -23,7 +23,7 @@
#include "macroitem.h"
#include "exception.h"
-//#include <qtimer.h>
+//#include <tqtimer.h>
#include <kdebug.h>
using namespace KoMacro;
@@ -44,10 +44,10 @@ namespace KoMacro {
KSharedPtr<Macro> macro;
/**
- * List of @a Action instances that are children of the
+ * List of @a Action instances that are tqchildren of the
* macro.
*/
- QValueList<KSharedPtr<MacroItem > > items;
+ TQValueList<KSharedPtr<MacroItem > > items;
/**
* The currently selected @a MacroItem or NULL if there
@@ -59,7 +59,7 @@ namespace KoMacro {
* Map of all @a Variable instance that are defined within
* this context.
*/
- QMap<QString, KSharedPtr<Variable > > variables;
+ TQMap<TQString, KSharedPtr<Variable > > variables;
/**
* The @a Exception instance thrown at the last @a activate()
@@ -70,7 +70,7 @@ namespace KoMacro {
/// Constructor.
explicit Private(KSharedPtr<Macro> m)
: macro(m) // remember the macro
- , items(m->items()) // set d-pointer children to macro children
+ , items(m->items()) // set d-pointer tqchildren to macro tqchildren
, exception(0) // no exception yet.
{
}
@@ -85,7 +85,7 @@ namespace KoMacro {
}
//Constructor with initialization of our Private.object (d-pointer)
Context::Context(KSharedPtr<Macro> macro)
- : QObject()
+ : TQObject()
, d( new Private(macro) ) // create the private d-pointer instance.
{
}
@@ -97,17 +97,17 @@ Context::~Context()
}
//return if we have (d-pointer) variables
-bool Context::hasVariable(const QString& name) const
+bool Context::hasVariable(const TQString& name) const
{
- //Use QMap?s contains to check if a variable with name exists
- return d->variables.contains(name);
+ //Use TQMap?s contains to check if a variable with name exists
+ return d->variables.tqcontains(name);
}
//return variable with name or throw an exception if none is found in variables
-KSharedPtr<Variable> Context::variable(const QString& name) const
+KSharedPtr<Variable> Context::variable(const TQString& name) const
{
- //Use QMap?s contains to check if a variable with name exists in context
- if (d->variables.contains(name)) {
+ //Use TQMap?s contains to check if a variable with name exists in context
+ if (d->variables.tqcontains(name)) {
//return it
return d->variables[name];
}
@@ -119,7 +119,7 @@ KSharedPtr<Variable> Context::variable(const QString& name) const
}
}
//none found throw exception
- throw Exception(QString("Variable name='%1' does not exist.").arg(name));
+ throw Exception(TQString("Variable name='%1' does not exist.").tqarg(name));
}
//return a map of our (d-pointer) variables
@@ -129,12 +129,12 @@ Variable::Map Context::variables() const
}
//set a variable
-void Context::setVariable(const QString& name, KSharedPtr<Variable> variable)
+void Context::setVariable(const TQString& name, KSharedPtr<Variable> variable)
{
//debuging infos
- kdDebug() << QString("KoMacro::Context::setVariable name='%1' variable='%2'").arg(name).arg(variable->toString()) << endl;
- //Use QMap?s replace to set/replace the variable named name
- d->variables.replace(name, variable);
+ kdDebug() << TQString("KoMacro::Context::setVariable name='%1' variable='%2'").tqarg(name).tqarg(variable->toString()) << endl;
+ //Use TQMap?s replace to set/replace the variable named name
+ d->variables.tqreplace(name, variable);
}
//return the associated Macro
@@ -162,14 +162,14 @@ Exception* Context::exception() const
}
//try to activate all action?s in this context
-void Context::activate(QValueList<KSharedPtr<MacroItem > >::ConstIterator it)
+void Context::activate(TQValueList<KSharedPtr<MacroItem > >::ConstIterator it)
{
//debuging infos
kdDebug() << "Context::activate()" << endl;
- //Q_ASSIGN(d->macro);
+ //TQ_ASSIGN(d->macro);
//set end to constEnd
- QValueList<KSharedPtr<MacroItem > >::ConstIterator end(d->items.constEnd());
+ TQValueList<KSharedPtr<MacroItem > >::ConstIterator end(d->items.constEnd());
//loop through actions
for(;it != end; ++it) {
// fetch the MacroItem we are currently pointing to.
@@ -198,14 +198,14 @@ void Context::activate(QValueList<KSharedPtr<MacroItem > >::ConstIterator it)
d->exception = new Exception(e);
//add new tracemessages
//the macro name
- d->exception->addTraceMessage( QString("macro=%1").arg(d->macro->name()) );
+ d->exception->addTraceMessage( TQString("macro=%1").tqarg(d->macro->name()) );
//the action name
- d->exception->addTraceMessage( QString("action=%1").arg(action->name()) );
+ d->exception->addTraceMessage( TQString("action=%1").tqarg(action->name()) );
//and all variables wich belong to the action/macro
- QStringList variables = action->variableNames();
- for(QStringList::Iterator vit = variables.begin(); vit != variables.end(); ++vit) {
+ TQStringList variables = action->variableNames();
+ for(TQStringList::Iterator vit = variables.begin(); vit != variables.end(); ++vit) {
KSharedPtr<Variable> v = d->macroitem->variable(*vit, true);
- d->exception->addTraceMessage( QString("%1=%2").arg(*vit).arg(v->toString()) );
+ d->exception->addTraceMessage( TQString("%1=%2").tqarg(*vit).tqarg(v->toString()) );
}
return; // abort execution
}
@@ -252,7 +252,7 @@ void Context::activateNext()
}
//find the macroitem from which to continue
- QValueList<KSharedPtr<MacroItem > >::ConstIterator it = d->items.find(d->macroitem);
+ TQValueList<KSharedPtr<MacroItem > >::ConstIterator it = d->items.tqfind(d->macroitem);
if (it != d->items.constEnd()) {
activate(++it); // try to continue the execution.
}
diff --git a/kexi/plugins/macros/lib/context.h b/kexi/plugins/macros/lib/context.h
index dd467dad..558ff0aa 100644
--- a/kexi/plugins/macros/lib/context.h
+++ b/kexi/plugins/macros/lib/context.h
@@ -20,7 +20,7 @@
#ifndef KOMACRO_CONTEXT_H
#define KOMACRO_CONTEXT_H
-#include <qobject.h>
+#include <tqobject.h>
#include <ksharedptr.h>
#include "variable.h"
@@ -35,14 +35,15 @@ namespace KoMacro {
/**
* The context of an execution. If a @a Macro got executed it creates
- * an instance of this class and passes it around all it's children
+ * an instance of this class and passes it around all it's tqchildren
* as local execution context.
*/
class KOMACRO_EXPORT Context
- : public QObject
+ : public TQObject
, public KShared
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -61,13 +62,13 @@ namespace KoMacro {
* @return true if there exists a variable with name @p name
* else false got returned.
*/
- bool hasVariable(const QString& name) const;
+ bool hasVariable(const TQString& name) const;
/**
* @return the @a Variable defined with name @p name or
* NULL if there exists no such variable.
*/
- KSharedPtr<Variable> variable(const QString& name) const;
+ KSharedPtr<Variable> variable(const TQString& name) const;
/**
* @return a map of all @a Variable instance that are defined
@@ -79,7 +80,7 @@ namespace KoMacro {
* Set the variable @p variable defined with name @p name . If
* there exists already a variable with that name replace it.
*/
- void setVariable(const QString& name, KSharedPtr<Variable> variable);
+ void setVariable(const TQString& name, KSharedPtr<Variable> variable);
/**
* @return the associated macro
@@ -113,14 +114,14 @@ namespace KoMacro {
* remembers what @a Action should be executed next and
* calling this slot just activates those @a Action .
*/
- virtual void activate(QValueList<KSharedPtr <MacroItem> >::ConstIterator it);
+ virtual void activate(TQValueList<KSharedPtr <MacroItem> >::ConstIterator it);
public slots:
/**
* This slot extends the slot above with the passed
* @a Context @p context which will be used as
- * parent context for this context.
+ * tqparent context for this context.
*/
virtual void activate(KSharedPtr<Context> context);
diff --git a/kexi/plugins/macros/lib/exception.cpp b/kexi/plugins/macros/lib/exception.cpp
index 7cfc7d71..91cfa03c 100644
--- a/kexi/plugins/macros/lib/exception.cpp
+++ b/kexi/plugins/macros/lib/exception.cpp
@@ -34,15 +34,15 @@ namespace KoMacro {
public:
/// A describing errormessage.
- const QString errormessage;
+ const TQString errormessage;
/// A more detailed list of tracemessages.
- QString tracemessages;
+ TQString tracemessages;
/**
* Constructor.
*/
- Private(const QString& errormessage)
+ Private(const TQString& errormessage)
: errormessage(errormessage)
{
}
@@ -52,11 +52,11 @@ namespace KoMacro {
}
//constructor
-Exception::Exception(const QString& errormessage)
+Exception::Exception(const TQString& errormessage)
: d( new Private(errormessage) ) // create the private d-pointer instance.
{
//debuging infos
- kdDebug() << QString("Exception errormessage=\"%1\"").arg(errormessage) << endl;
+ kdDebug() << TQString("Exception errormessage=\"%1\"").tqarg(errormessage) << endl;
}
//copy constructor
@@ -73,19 +73,19 @@ Exception::~Exception()
}
//get d-pointer errormessage
-const QString Exception::errorMessage() const
+const TQString Exception::errorMessage() const
{
return d->errormessage;
}
//get d-pointer tracemessages
-const QString Exception::traceMessages() const
+const TQString Exception::traceMessages() const
{
return d->tracemessages;
}
//add a Qstring to d-pointer tracemessages
-void Exception::addTraceMessage(const QString& tracemessage)
+void Exception::addTraceMessage(const TQString& tracemessage)
{
//no tracemessages till now
if(d->tracemessages.isEmpty())
diff --git a/kexi/plugins/macros/lib/exception.h b/kexi/plugins/macros/lib/exception.h
index 73504de0..bcf4abff 100644
--- a/kexi/plugins/macros/lib/exception.h
+++ b/kexi/plugins/macros/lib/exception.h
@@ -20,8 +20,8 @@
#ifndef KOMACRO_EXCEPTION_H
#define KOMACRO_EXCEPTION_H
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include "komacro_export.h"
@@ -41,7 +41,7 @@ namespace KoMacro {
* @param errormessage A describing errormessage why the
* exception got thrown.
*/
- explicit Exception(const QString& errormessage);
+ explicit Exception(const TQString& errormessage);
/**
* Copy-constructor.
@@ -56,7 +56,7 @@ namespace KoMacro {
/**
* @return a describing errormessage.
*/
- const QString errorMessage() const;
+ const TQString errorMessage() const;
/**
* @return a stringlist of traces. This are normaly just
@@ -65,12 +65,12 @@ namespace KoMacro {
* we finally catched the error to display it to the
* user.
*/
- const QString traceMessages() const;
+ const TQString traceMessages() const;
/**
* Add the message @p tracemessage to the list of traces.
*/
- void addTraceMessage(const QString& tracemessage);
+ void addTraceMessage(const TQString& tracemessage);
private:
/// @internal d-pointer class.
diff --git a/kexi/plugins/macros/lib/macro.cpp b/kexi/plugins/macros/lib/macro.cpp
index 688cc7b0..6bcdc21d 100644
--- a/kexi/plugins/macros/lib/macro.cpp
+++ b/kexi/plugins/macros/lib/macro.cpp
@@ -23,7 +23,7 @@
#include "context.h"
#include "variable.h"
-#include <qdom.h>
+#include <tqdom.h>
#include <kdebug.h>
using namespace KoMacro;
@@ -41,20 +41,20 @@ namespace KoMacro {
/**
* A list of @a MacroItem instances.
*/
- QValueList<KSharedPtr<MacroItem > > itemlist;
+ TQValueList<KSharedPtr<MacroItem > > itemlist;
/**
* The name the @a Macro has.
*/
- QString name;
+ TQString name;
};
}
//constructor, initalize internal (d-pointer) name
-Macro::Macro(const QString& name)
- : QObject()
+Macro::Macro(const TQString& name)
+ : TQObject()
, KShared()
, XMLHandler(this)
, d( new Private() ) // create the private d-pointer instance.
@@ -70,25 +70,25 @@ Macro::~Macro()
}
//get internal (d-pointer) name
-const QString Macro::name() const
+const TQString Macro::name() const
{
return d->name;
}
//set internal (d-pointer) name
-void Macro::setName(const QString& name)
+void Macro::setName(const TQString& name)
{
d->name = name;
}
//get an "extended" name
-const QString Macro::toString() const
+const TQString Macro::toString() const
{
- return QString("Macro:%1").arg(name());
+ return TQString("Macro:%1").tqarg(name());
}
//get (d-pointer) itemlist
-QValueList<KSharedPtr<MacroItem > >& Macro::items() const
+TQValueList<KSharedPtr<MacroItem > >& Macro::items() const
{
return d->itemlist;
}
@@ -105,17 +105,17 @@ void Macro::clearItems()
}
//run our macro
-KSharedPtr<Context> Macro::execute(QObject* sender)
+KSharedPtr<Context> Macro::execute(TQObject* sender)
{
kdDebug() << "Macro::execute(KSharedPtr<Context>)" << endl;
//create context in which macro can/should run
KSharedPtr<Context> c = KSharedPtr<Context>( new Context(this) );
if(sender) {
- // set the sender-variable if we got a sender QObject.
+ // set the sender-variable if we got a sender TQObject.
c->setVariable("[sender]", KSharedPtr<Variable>( new Variable(sender) ));
}
- //connect(context, SIGNAL(activated()), this, SIGNAL(activated()));
+ //connect(context, TQT_SIGNAL(activated()), this, TQT_SIGNAL(activated()));
//call activate in the context of the macro
c->activate( c );
diff --git a/kexi/plugins/macros/lib/macro.h b/kexi/plugins/macros/lib/macro.h
index da38e05b..86e0122a 100644
--- a/kexi/plugins/macros/lib/macro.h
+++ b/kexi/plugins/macros/lib/macro.h
@@ -20,7 +20,7 @@
#ifndef KOMACRO_MACRO_H
#define KOMACRO_MACRO_H
-#include <qobject.h>
+#include <tqobject.h>
#include <ksharedptr.h>
#include "action.h"
@@ -39,20 +39,21 @@ namespace KoMacro {
* of them points to an @a Action instance.
*/
class KOMACRO_EXPORT Macro
- : public QObject // Qt functionality like signals and slots
+ : public TQObject // TQt functionality like signals and slots
, public KShared // shared reference-counting
, public XMLHandler // to (un-)serialize from/to XML
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
- * A QMap of @a Macro instances accessible by there unique name. Each
- * class should use this typemap rather then the QMap direct. That
+ * A TQMap of @a Macro instances accessible by there unique name. Each
+ * class should use this typemap rather then the TQMap direct. That
* way we are more flexible on future changes.
*/
- typedef QMap<QString, KSharedPtr<Macro > > Map;
+ typedef TQMap<TQString, KSharedPtr<Macro > > Map;
/**
* Constructor.
@@ -60,7 +61,7 @@ namespace KoMacro {
* @param name The internal name this @a Macro has. This
* name will be used as unique identifier.
*/
- explicit Macro(const QString& name);
+ explicit Macro(const TQString& name);
/**
* Destructor.
@@ -70,23 +71,23 @@ namespace KoMacro {
/**
* @return the name this @a Macro instance has.
*/
- const QString name() const;
+ const TQString name() const;
/**
* Set the @p name this @a Macro instance has.
*/
- void setName(const QString& name);
+ void setName(const TQString& name);
/**
* @return a string-representation of the macro.
*/
- virtual const QString toString() const;
+ virtual const TQString toString() const;
/**
* @return a list of @a MacroItem instances which
- * are children of this @a Macro .
+ * are tqchildren of this @a Macro .
*/
- QValueList< KSharedPtr<MacroItem> >& items() const;
+ TQValueList< KSharedPtr<MacroItem> >& items() const;
/**
* Add the @a MacroItem @p item to the list of items
@@ -100,13 +101,13 @@ namespace KoMacro {
void clearItems();
/**
- * Connect the Qt signal @p signal of the QObject @p sender
+ * Connect the TQt signal @p signal of the TQObject @p sender
* with this @a Macro . If the signal got emitted this
* @a Macro instance will be activated and the in the
* signal passed arguments are transfered into the
* activation @a Context .
*/
- //void connectSignal(const QObject* sender, const char* signal);
+ //void connectSignal(const TQObject* sender, const char* signal);
public slots:
@@ -116,7 +117,7 @@ namespace KoMacro {
* @param context The @a Context this @a Macro should
* be executed in.
*/
- virtual KSharedPtr<Context> execute(QObject* sender);
+ virtual KSharedPtr<Context> execute(TQObject* sender);
private:
/// @internal d-pointer class.
diff --git a/kexi/plugins/macros/lib/macroitem.cpp b/kexi/plugins/macros/lib/macroitem.cpp
index 4027f2cc..471f9660 100644
--- a/kexi/plugins/macros/lib/macroitem.cpp
+++ b/kexi/plugins/macros/lib/macroitem.cpp
@@ -40,62 +40,62 @@ namespace KoMacro {
/**
* The comment this @a MacroItem has.
*/
- QString comment;
+ TQString comment;
/**
- * The @a QMap of @a Variable this @a MacroItem has.
+ * The @a TQMap of @a Variable this @a MacroItem has.
*/
Variable::Map variables;
/**
- * define a @a QVariant -cast as inline for better performance
- * @return the casted @a QVariant by passing a @param variant and its
- * expected QVariant::Type @param type.
+ * define a @a TQVariant -cast as inline for better performance
+ * @return the casted @a TQVariant by passing a @param variant and its
+ * expected TQVariant::Type @param type.
*/
- inline const QVariant cast(const QVariant& variant, QVariant::Type type) const
+ inline const TQVariant cast(const TQVariant& variant, TQVariant::Type type) const
{
- // If ok is true the QVariant v holds our new and to the correct type
+ // If ok is true the TQVariant v holds our new and to the correct type
// casted variant value. If ok is false the as argument passed variant
- // QVariant contains the (maybe uncasted string to prevent data-loosing
+ // TQVariant contains the (maybe uncasted string to prevent data-loosing
// what would happen if we e.g. would expect an integer and cast it to
// an incompatible non-int string) value.
bool ok = false;
- QVariant v;
+ TQVariant v;
// Try to cast the passed variant to the expected variant-type.
switch(type) {
- case QVariant::Bool: {
- const QString s = variant.toString();
+ case TQVariant::Bool: {
+ const TQString s = variant.toString();
ok = (s == "true" || s == "false" || s == "0" || s == "1" || s == "-1");
- v = QVariant( variant.toBool(), 0 );
+ v = TQVariant( variant.toBool(), 0 );
} break;
- case QVariant::Int: {
+ case TQVariant::Int: {
v = variant.toInt(&ok);
// Check if the cast is correct.
Q_ASSERT(!ok || v.toString() == variant.toString());
} break;
- case QVariant::UInt: {
+ case TQVariant::UInt: {
v = variant.toUInt(&ok);
Q_ASSERT(!ok || v.toString() == variant.toString());
} break;
- case QVariant::LongLong: {
+ case TQVariant::LongLong: {
v = variant.toLongLong(&ok);
Q_ASSERT(!ok || v.toString() == variant.toString());
} break;
- case QVariant::ULongLong: {
+ case TQVariant::ULongLong: {
v = variant.toULongLong(&ok);
Q_ASSERT(!ok || v.toString() == variant.toString());
} break;
- case QVariant::Double: {
+ case TQVariant::Double: {
v = variant.toDouble(&ok);
Q_ASSERT(!ok || v.toString() == variant.toString());
} break;
- case QVariant::String: {
+ case TQVariant::String: {
ok = true; // cast will always be successfully
v = variant.toString();
} break;
default: {
- // If we got another type we try to let Qt handle it...
+ // If we got another type we try to let TQt handle it...
ok = v.cast(type);
kdWarning()<<"MacroItem::Private::cast() Unhandled ok="<<ok<<" type="<<type<<" value="<<v<<endl;
} break;
@@ -119,12 +119,12 @@ MacroItem::~MacroItem()
delete d;
}
-QString MacroItem::comment() const
+TQString MacroItem::comment() const
{
return d->comment;
}
-void MacroItem::setComment(const QString& comment)
+void MacroItem::setComment(const TQString& comment)
{
d->comment = comment;
}
@@ -139,15 +139,15 @@ void MacroItem::setAction(KSharedPtr<Action> action)
d->action = action;
}
-QVariant MacroItem::variant(const QString& name, bool checkaction) const
+TQVariant MacroItem::variant(const TQString& name, bool checkaction) const
{
KSharedPtr<Variable> v = variable(name, checkaction);
- return v.data() ? v->variant() : QVariant();
+ return v.data() ? v->variant() : TQVariant();
}
-KSharedPtr<Variable> MacroItem::variable(const QString& name, bool checkaction) const
+KSharedPtr<Variable> MacroItem::variable(const TQString& name, bool checkaction) const
{
- if(d->variables.contains(name))
+ if(d->variables.tqcontains(name))
return d->variables[name];
if(checkaction && d->action.data())
return d->action->variable(name);
@@ -159,7 +159,7 @@ Variable::Map MacroItem::variables() const
return d->variables;
}
-bool MacroItem::setVariant(const QString& name, const QVariant& variant)
+bool MacroItem::setVariant(const TQString& name, const TQVariant& variant)
{
// Let's look if there is an action defined for the variable. If that's
// the case, we try to use that action to preserve the type of the variant.
@@ -167,7 +167,7 @@ bool MacroItem::setVariant(const QString& name, const QVariant& variant)
// If we know the expected type, we try to cast the variant to the expected
// type else the variant stays untouched (so, it will stay a string).
- const QVariant v = actionvariable.data()
+ const TQVariant v = actionvariable.data()
? d->cast(variant, actionvariable->variant().type()) // try to cast the variant
: variant; // don't cast anything, just leave the string-type...
@@ -179,11 +179,11 @@ bool MacroItem::setVariant(const QString& name, const QVariant& variant)
variable = KSharedPtr<Variable>( new Variable() );
variable->setName(name);
- d->variables.replace(name, variable);
+ d->variables.tqreplace(name, variable);
}
// Remember the previous value for the case we like to restore it.
- const QVariant oldvar = variable->variant();
+ const TQVariant oldvar = variable->variant();
// Set the variable.
variable->setVariant(v);
@@ -201,15 +201,15 @@ bool MacroItem::setVariant(const QString& name, const QVariant& variant)
return true;
}
-KSharedPtr<Variable> MacroItem::addVariable(const QString& name, const QVariant& variant)
+KSharedPtr<Variable> MacroItem::addVariable(const TQString& name, const TQVariant& variant)
{
- Q_ASSERT(! d->variables.contains(name) );
+ Q_ASSERT(! d->variables.tqcontains(name) );
// Create a new Variable.
KSharedPtr<Variable> variable = KSharedPtr<Variable>( new Variable() );
variable->setName(name);
// Put it into the Variable-map.
- d->variables.replace(name, variable);
+ d->variables.tqreplace(name, variable);
// Set the variant of the Variable.
this->setVariant(name, variant);
diff --git a/kexi/plugins/macros/lib/macroitem.h b/kexi/plugins/macros/lib/macroitem.h
index 8f3e1502..6b996e70 100644
--- a/kexi/plugins/macros/lib/macroitem.h
+++ b/kexi/plugins/macros/lib/macroitem.h
@@ -20,12 +20,12 @@
#ifndef KOMACRO_MACROITEM_H
#define KOMACRO_MACROITEM_H
-#include <qobject.h>
+#include <tqobject.h>
#include <ksharedptr.h>
// Forward declarations.
-class QDomElement;
+class TQDomElement;
#include "action.h"
#include "context.h"
@@ -51,7 +51,7 @@ namespace KoMacro {
/**
* A list of \a MacroItem instances.
*/
- typedef QValueList<KSharedPtr<MacroItem > > List;
+ typedef TQValueList<KSharedPtr<MacroItem > > List;
/**
* Constructor.
@@ -67,13 +67,13 @@ namespace KoMacro {
* @return the comment defined by the user for
* this @a MacroItem .
*/
- QString comment() const;
+ TQString comment() const;
/**
* Set the comment @param comment defined by the user for this
* @a MacroItem .
*/
- void setComment(const QString& comment);
+ void setComment(const TQString& comment);
/**
* @return the @a Action this @a MacroItem points
@@ -98,7 +98,7 @@ namespace KoMacro {
* such a @param name in the case this @a MacroItem
* doesn't have such a name.
*/
- QVariant variant(const QString& name, bool checkaction = false) const;
+ TQVariant variant(const TQString& name, bool checkaction = false) const;
/**
* @return the @a Variable instance identified with
@@ -110,25 +110,25 @@ namespace KoMacro {
* such a @param name in the case this @a MacroItem
* doesn't have such a name.
*/
- KSharedPtr<Variable> variable(const QString& name, bool checkaction = false) const;
+ KSharedPtr<Variable> variable(const TQString& name, bool checkaction = false) const;
/**
* @return a map of @a Variable instances.
*/
- QMap<QString, KSharedPtr<Variable> > variables() const;
+ TQMap<TQString, KSharedPtr<Variable> > variables() const;
/**
- * Set the @a QVariant @param variant as variable with the variablename
+ * Set the @a TQVariant @param variant as variable with the variablename
* @param name .
* @return a bool for successfull setting.
*/
- bool setVariant(const QString& name, const QVariant& variant);
+ bool setVariant(const TQString& name, const TQVariant& variant);
/**
* Add a new variable with the vaiablename @param name and the given
- * @a QVariant @param variant to our @a MacroItem instance.
+ * @a TQVariant @param variant to our @a MacroItem instance.
*/
- KSharedPtr<Variable> addVariable(const QString& name, const QVariant& variant);
+ KSharedPtr<Variable> addVariable(const TQString& name, const TQVariant& variant);
private:
/// @internal d-pointer class.
diff --git a/kexi/plugins/macros/lib/manager.cpp b/kexi/plugins/macros/lib/manager.cpp
index 77ad98b1..0a0d59e0 100644
--- a/kexi/plugins/macros/lib/manager.cpp
+++ b/kexi/plugins/macros/lib/manager.cpp
@@ -23,9 +23,9 @@
#include "macro.h"
#include "exception.h"
-#include <qobject.h>
-#include <qwidget.h>
-#include <qdom.h>
+#include <tqobject.h>
+#include <tqwidget.h>
+#include <tqdom.h>
#include <kxmlguibuilder.h>
#include <kdebug.h>
@@ -41,12 +41,12 @@ namespace KoMacro {
{
public:
KXMLGUIClient* const xmlguiclient;
- QMap<QString, KSharedPtr<Macro > > macros;
+ TQMap<TQString, KSharedPtr<Macro > > macros;
- QStringList actionnames;
- QMap<QString, KSharedPtr<Action> > actions;
+ TQStringList actionnames;
+ TQMap<TQString, KSharedPtr<Action> > actions;
- QMap<QString, QGuardedPtr<QObject> > objects;
+ TQMap<TQString, TQGuardedPtr<TQObject> > objects;
Private(KXMLGUIClient* const xmlguiclient)
: xmlguiclient(xmlguiclient)
@@ -83,13 +83,13 @@ Manager::Manager(KXMLGUIClient* const xmlguiclient)
: d( new Private(xmlguiclient) ) // create the private d-pointer instance.
{
kdDebug() << "Manager::Manager() Ctor" << endl;
- QObject* obj = dynamic_cast<QObject*>(xmlguiclient);
+ TQObject* obj = dynamic_cast<TQObject*>(xmlguiclient);
if(obj) {
- d->objects.replace(obj->name(), obj);
+ d->objects.tqreplace(obj->name(), obj);
}
//TESTCASE
- d->objects.replace("TestCase", new QWidget());
+ d->objects.tqreplace("TestCase", new TQWidget());
}
Manager::~Manager()
@@ -103,33 +103,33 @@ KXMLGUIClient* Manager::guiClient() const
return d->xmlguiclient;
}
-bool Manager::hasMacro(const QString& macroname)
+bool Manager::hasMacro(const TQString& macroname)
{
- return d->macros.contains(macroname);
+ return d->macros.tqcontains(macroname);
}
-KSharedPtr<Macro> Manager::getMacro(const QString& macroname)
+KSharedPtr<Macro> Manager::getMacro(const TQString& macroname)
{
return d->macros[macroname];
}
-void Manager::addMacro(const QString& macroname, KSharedPtr<Macro> macro)
+void Manager::addMacro(const TQString& macroname, KSharedPtr<Macro> macro)
{
- d->macros.replace(macroname, macro);
+ d->macros.tqreplace(macroname, macro);
}
-void Manager::removeMacro(const QString& macroname)
+void Manager::removeMacro(const TQString& macroname)
{
d->macros.remove(macroname);
}
-KSharedPtr<Macro> Manager::createMacro(const QString& macroname)
+KSharedPtr<Macro> Manager::createMacro(const TQString& macroname)
{
KSharedPtr<Macro> macro = KSharedPtr<Macro>( new Macro(macroname) );
return macro;
}
-KSharedPtr<Action> Manager::action(const QString& name) const
+KSharedPtr<Action> Manager::action(const TQString& name) const
{
return d->actions[name];
}
@@ -139,32 +139,32 @@ Action::Map Manager::actions() const
return d->actions;
}
-QStringList Manager::actionNames() const
+TQStringList Manager::actionNames() const
{
return d->actionnames;
}
void Manager::publishAction(KSharedPtr<Action> action)
{
- const QString name = action->name();
- if(! d->actions.contains(name)) {
+ const TQString name = action->name();
+ if(! d->actions.tqcontains(name)) {
d->actionnames.append(name);
}
- d->actions.replace(name, action);
+ d->actions.tqreplace(name, action);
}
-void Manager::publishObject(const QString& name, QObject* object)
+void Manager::publishObject(const TQString& name, TQObject* object)
{
- Q_ASSERT(! d->objects.contains(name));
- d->objects.replace(name, object);
+ Q_ASSERT(! d->objects.tqcontains(name));
+ d->objects.tqreplace(name, object);
}
-QGuardedPtr<QObject> Manager::object(const QString& name) const
+TQGuardedPtr<TQObject> Manager::object(const TQString& name) const
{
return d->objects[name];
}
-QMap<QString, QGuardedPtr<QObject> > Manager::objects() const
+TQMap<TQString, TQGuardedPtr<TQObject> > Manager::objects() const
{
return d->objects;
}
diff --git a/kexi/plugins/macros/lib/manager.h b/kexi/plugins/macros/lib/manager.h
index 964f9d7c..fb332f66 100644
--- a/kexi/plugins/macros/lib/manager.h
+++ b/kexi/plugins/macros/lib/manager.h
@@ -20,16 +20,16 @@
#ifndef KOMACRO_MANAGER_H
#define KOMACRO_MANAGER_H
-#include <qmap.h>
-#include <qguardedptr.h>
+#include <tqmap.h>
+#include <tqguardedptr.h>
#include <ksharedptr.h>
#include <kxmlguiclient.h>
#include <kstaticdeleter.h>
#include "komacro_export.h"
-class QObject;
-class QDomElement;
+class TQObject;
+class TQDomElement;
namespace KoMacro {
@@ -42,11 +42,11 @@ namespace KoMacro {
*
* Example how KoMacro could be used.
* @code
- * // We have a class that inheritates from QObject and
+ * // We have a class that inheritates from TQObject and
* // implements some public signals and slots that will
* // be accessible by Macros once a class-instance
* // got published.
- * class PublishedObject : public QObject {};
+ * class PublishedObject : public TQObject {};
*
* // Somewhere we have our KMainWindow.
* KMainWindow* mainwindow = new KMainWindow();
@@ -55,7 +55,7 @@ namespace KoMacro {
* // Macro-framework.
* KoMacro::Manager* manager = new KoMacro::Manager( mainwindow );
*
- * // Now we like to publish a QObject
+ * // Now we like to publish a TQObject
* PublishedObject* publishedobject = new PublishedObject();
* manager->publishObject(publishedobject);
*
@@ -64,7 +64,7 @@ namespace KoMacro {
*
* // Finally free the publishedobject instance we created. We
* // need to free it manualy cause PublishedObject doesn't
- * // got a QObject parent as argument.
+ * // got a TQObject tqparent as argument.
* delete publishedobject;
*
* // Finally free the manager-instance. It's always needed
@@ -116,32 +116,32 @@ namespace KoMacro {
* \return true if we carry a \a Macro with the
* defined \p macroname .
*/
- bool hasMacro(const QString& macroname);
+ bool hasMacro(const TQString& macroname);
/**
* \return the \a Macro defined with \p macroname
* or NULL if we don't have such a \a Macro.
*/
- KSharedPtr<Macro> getMacro(const QString& macroname);
+ KSharedPtr<Macro> getMacro(const TQString& macroname);
/**
* Add a new \a Macro to the list of known macros. If
* there exists already a \a Macro instance with the
* defined \p macroname then the already existing one
- * will be replace.
+ * will be tqreplace.
*
* \param macroname The name the \a Macro will be
* accessible as.
* \param macro The \a Macro instance.
*/
- void addMacro(const QString& macroname, KSharedPtr<Macro> macro);
+ void addMacro(const TQString& macroname, KSharedPtr<Macro> macro);
/**
* Remove the \a Macro defined with \p macroname . If
* we don't know about a \a Macro with that \p macroname
* nothing happens.
*/
- void removeMacro(const QString& macroname);
+ void removeMacro(const TQString& macroname);
/**
* Factory function to create a new \a Macro instances.
@@ -150,21 +150,21 @@ namespace KoMacro {
* like to attach the returned new \a Macro to this
* \a Manager instance.
*/
- KSharedPtr<Macro> createMacro(const QString& macroname);
+ KSharedPtr<Macro> createMacro(const TQString& macroname);
#if 0
/**
* Factory method to create @a Action instances from the
* defined @p element .
*
- * @param element The serialized QDomElement that should
+ * @param element The serialized TQDomElement that should
* be used to create the @a Action instance.
* @return A new @a Action instance or NULL if the
* defined @p element is not valid.
*
* @deprecated Moved to common XMLReader/XMLWriter classes. Use Macro::xmlHandler() !
*/
- KSharedPtr<Action> createAction(const QDomElement& element);
+ KSharedPtr<Action> createAction(const TQDomElement& element);
#endif
/**
@@ -172,17 +172,17 @@ namespace KoMacro {
* name @p name or returns an empty @a KSharedPtr<Action> object
* if there was no such @a Action published.
*/
- KSharedPtr<Action> action(const QString& name) const;
+ KSharedPtr<Action> action(const TQString& name) const;
/**
* @return a map of all published actions.
*/
- QMap<QString, KSharedPtr<Action> > actions() const;
+ TQMap<TQString, KSharedPtr<Action> > actions() const;
/**
* @return a list of all published actions.
*/
- QStringList actionNames() const;
+ TQStringList actionNames() const;
/**
* Publish the @a Action @p action . The published @a Action
@@ -191,21 +191,21 @@ namespace KoMacro {
void publishAction(KSharedPtr<Action> action);
/**
- * Publish the passed QObject @p object. Those object will
+ * Publish the passed TQObject @p object. Those object will
* provide it's slots as callable functions.
*/
- void publishObject(const QString& name, QObject* object);
+ void publishObject(const TQString& name, TQObject* object);
/**
- * @return the publish QObject defined with name @p name
+ * @return the publish TQObject defined with name @p name
* or NULL if there exists no such object.
*/
- QGuardedPtr<QObject> object(const QString& name) const;
+ TQGuardedPtr<TQObject> object(const TQString& name) const;
/**
- * @return a map of the published QObject instances.
+ * @return a map of the published TQObject instances.
*/
- QMap<QString, QGuardedPtr<QObject> > objects() const;
+ TQMap<TQString, TQGuardedPtr<TQObject> > objects() const;
private:
/// @internal d-pointer class.
diff --git a/kexi/plugins/macros/lib/metamethod.cpp b/kexi/plugins/macros/lib/metamethod.cpp
index 8aa4dc54..979202e8 100644
--- a/kexi/plugins/macros/lib/metamethod.cpp
+++ b/kexi/plugins/macros/lib/metamethod.cpp
@@ -23,12 +23,12 @@
#include "variable.h"
#include "exception.h"
-#include <qobject.h>
-#include <qmetaobject.h>
+#include <tqobject.h>
+#include <tqmetaobject.h>
-// to access the Qt3 QUObject API.
-#include <private/qucom_p.h>
-#include <private/qucomextra_p.h>
+// to access the TQt3 TQUObject API.
+#include <private/tqucom_p.h>
+#include <private/tqucomextra_p.h>
#include <kdebug.h>
@@ -47,17 +47,17 @@ namespace KoMacro {
/**
* The signature this @a MetaMethod has.
*/
- QString signature;
+ TQString signature;
/**
* The signature tagname this @a MetaMethod has.
*/
- QString signaturetag;
+ TQString signaturetag;
/**
* The signature arguments this @a MetaMethod has.
*/
- QString signaturearguments;
+ TQString signaturearguments;
/**
* Cached signature arguments parsed into a list
@@ -81,7 +81,7 @@ namespace KoMacro {
}
-MetaMethod::MetaMethod(const QString& signature, Type type, KSharedPtr<MetaObject> object)
+MetaMethod::MetaMethod(const TQString& signature, Type type, KSharedPtr<MetaObject> object)
: KShared()
, d( new Private() ) // create the private d-pointer instance.
{
@@ -89,39 +89,39 @@ MetaMethod::MetaMethod(const QString& signature, Type type, KSharedPtr<MetaObjec
d->object = object;
d->type = type;
- int startpos = d->signature.find("(");
- int endpos = d->signature.findRev(")");
+ int startpos = d->signature.tqfind("(");
+ int endpos = d->signature.tqfindRev(")");
if(startpos < 0 || startpos > endpos) {
- throw Exception(QString("Invalid signature \"%1\"").arg(d->signature));
+ throw Exception(TQString("Invalid signature \"%1\"").tqarg(d->signature));
}
d->signaturetag = d->signature.left(startpos).stripWhiteSpace();
if(d->signaturetag.isEmpty()) {
- throw Exception(QString("Invalid tagname in signature \"%1\"").arg(d->signature));
+ throw Exception(TQString("Invalid tagname in signature \"%1\"").tqarg(d->signature));
}
d->signaturearguments = d->signature.mid(startpos + 1, endpos - startpos - 1).stripWhiteSpace();
do {
- int commapos = d->signaturearguments.find(",");
- int starttemplatepos = d->signaturearguments.find("<");
+ int commapos = d->signaturearguments.tqfind(",");
+ int starttemplatepos = d->signaturearguments.tqfind("<");
if(starttemplatepos >= 0 && (commapos < 0 || starttemplatepos < commapos)) {
- int endtemplatepos = d->signaturearguments.find(">", starttemplatepos);
+ int endtemplatepos = d->signaturearguments.tqfind(">", starttemplatepos);
if(endtemplatepos <= 0) {
- throw Exception(QString("No closing template-definiton in signature \"%1\"").arg(d->signature));
+ throw Exception(TQString("No closing template-definiton in signature \"%1\"").tqarg(d->signature));
}
- commapos = d->signaturearguments.find(",", endtemplatepos);
+ commapos = d->signaturearguments.tqfind(",", endtemplatepos);
}
if(commapos > 0) {
- QString s = d->signaturearguments.left(commapos).stripWhiteSpace();
+ TQString s = d->signaturearguments.left(commapos).stripWhiteSpace();
if(! s.isEmpty()) {
d->arguments.append( new MetaParameter(s) );
}
d->signaturearguments = d->signaturearguments.right(d->signaturearguments.length() - commapos - 1);
}
else {
- QString s = d->signaturearguments.stripWhiteSpace();
+ TQString s = d->signaturearguments.stripWhiteSpace();
if(! s.isEmpty()) {
d->arguments.append( new MetaParameter(s) );
}
@@ -140,17 +140,17 @@ KSharedPtr<MetaObject> const MetaMethod::object() const
return d->object;
}
-const QString MetaMethod::signature() const
+const TQString MetaMethod::signature() const
{
return d->signature;
}
-const QString MetaMethod::signatureTag() const
+const TQString MetaMethod::signatureTag() const
{
return d->signaturetag;
}
-const QString MetaMethod::signatureArguments() const
+const TQString MetaMethod::signatureArguments() const
{
return d->signaturearguments;
}
@@ -165,71 +165,71 @@ MetaParameter::List MetaMethod::arguments() const
return d->arguments;
}
-QUObject* MetaMethod::toQUObject(Variable::List arguments)
+TQUObject* MetaMethod::toTQUObject(Variable::List arguments)
{
uint argsize = d->arguments.size();
if(arguments.size() <= argsize) {
- throw Exception(QString("To less arguments for slot with siganture \"%1\"").arg(d->signature));
+ throw Exception(TQString("To less arguments for slot with siganture \"%1\"").tqarg(d->signature));
}
- // The first item in the QUObject-array is for the returnvalue
+ // The first item in the TQUObject-array is for the returnvalue
// while everything >=1 are the passed parameters.
- QUObject* uo = new QUObject[ argsize + 1 ];
+ TQUObject* uo = new TQUObject[ argsize + 1 ];
- uo[0] = QUObject(); // empty placeholder for the returnvalue.
+ uo[0] = TQUObject(); // empty placeholder for the returnvalue.
for(uint i = 0; i < argsize; i++) {
KSharedPtr<MetaParameter> metaargument = d->arguments[i];
KSharedPtr<Variable> variable = arguments[i + 1];
if ( !variable ) {
- throw Exception(QString("Variable is undefined !"));
+ throw Exception(TQString("Variable is undefined !"));
}
if(metaargument->type() != variable->type()) {
- throw Exception(QString("Wrong variable type in method \"%1\". Expected \"%2\" but got \"%3\"").arg(d->signature).arg(metaargument->type()).arg(variable->type()));
+ throw Exception(TQString("Wrong variable type in method \"%1\". Expected \"%2\" but got \"%3\"").tqarg(d->signature).tqarg(metaargument->type()).tqarg(variable->type()));
}
switch(metaargument->type()) {
case Variable::TypeNone: {
kdDebug() << "Variable::TypeNone" << endl;
- uo[i + 1] = QUObject();
+ uo[i + 1] = TQUObject();
} break;
case Variable::TypeVariant: {
kdDebug() << "Variable::TypeVariant" << endl;
- const QVariant variant = variable->variant();
+ const TQVariant variant = variable->variant();
switch(metaargument->variantType()) {
- case QVariant::String: {
- const QString s = variant.toString();
- static_QUType_QString.set( &(uo[i + 1]), s );
+ case TQVariant::String: {
+ const TQString s = variant.toString();
+ static_TQUType_TQString.set( &(uo[i + 1]), s );
} break;
- case QVariant::Int: {
+ case TQVariant::Int: {
const int j = variant.toInt();
- static_QUType_int.set( &(uo[i + 1]), j );
+ static_TQUType_int.set( &(uo[i + 1]), j );
} break;
- case QVariant::Bool: {
+ case TQVariant::Bool: {
const bool b = variant.toBool();
- static_QUType_bool.set( &(uo[i + 1]), b );
+ static_TQUType_bool.set( &(uo[i + 1]), b );
} break;
- case QVariant::Double: {
+ case TQVariant::Double: {
const double d = variant.toDouble();
- static_QUType_double.set( &(uo[i + 1]), d );
+ static_TQUType_double.set( &(uo[i + 1]), d );
} break;
- case QVariant::Invalid: {
- static_QUType_QVariant.set( &(uo[i + 1]), variant );
+ case TQVariant::Invalid: {
+ static_TQUType_TQVariant.set( &(uo[i + 1]), variant );
}
/*FIXME
- static_QUType_charstar
- static_QUType_ptr.get(uo); QObject *qobj = (QObject *)(ptr);
+ static_TQUType_charstar
+ static_TQUType_ptr.get(uo); TQObject *qobj = (TQObject *)(ptr);
*/
default: {
- throw Exception(QString("Invalid parameter !!!!!!!!!!!!!!!!!!!!!!!"));
+ throw Exception(TQString("Invalid parameter !!!!!!!!!!!!!!!!!!!!!!!"));
} break;
}
} break;
@@ -237,15 +237,15 @@ QUObject* MetaMethod::toQUObject(Variable::List arguments)
case Variable::TypeObject: {
kdDebug() << "Variable::TypeObject" << endl;
- const QObject* obj = arguments[i + 1]->object();
+ const TQObject* obj = arguments[i + 1]->object();
if(! obj) { //FIXME: move check to MetaParameter?!
- throw Exception(QString("No QObject !"));
+ throw Exception(TQString("No TQObject !"));
}
- static_QUType_ptr.set( &(uo[i + 1]), obj );
+ static_TQUType_ptr.set( &(uo[i + 1]), obj );
} break;
default: {
- throw Exception(QString("Invalid variable type"));
+ throw Exception(TQString("Invalid variable type"));
} break;
}
@@ -254,43 +254,43 @@ QUObject* MetaMethod::toQUObject(Variable::List arguments)
return uo;
}
-KSharedPtr<Variable> MetaMethod::toVariable(QUObject* uo)
+KSharedPtr<Variable> MetaMethod::toVariable(TQUObject* uo)
{
- const QString desc( uo->type->desc() );
+ const TQString desc( uo->type->desc() );
if(desc == "null") {
return new Variable();
}
- if(desc == "QString") {
- const QString s = static_QUType_QString.get(uo);
+ if(desc == TQSTRING_OBJECT_NAME_STRING) {
+ const TQString s = static_TQUType_TQString.get(uo);
return new Variable(s);
}
if(desc == "int") {
- const int j = static_QUType_int.get(uo);
+ const int j = static_TQUType_int.get(uo);
return new Variable(j);
}
if(desc == "bool") {
- const bool b = static_QUType_bool.get(uo);
+ const bool b = static_TQUType_bool.get(uo);
return new Variable(b);
}
if(desc == "double") {
- const double d = static_QUType_double.get(uo);
+ const double d = static_TQUType_double.get(uo);
return new Variable(d);
}
- if(desc == "QVariant") {
- QVariant v = static_QUType_QVariant.get(uo);
+ if(desc == "TQVariant") {
+ TQVariant v = static_TQUType_TQVariant.get(uo);
return new Variable(v);
}
- throw Exception(QString("Invalid parameter '%1'").arg(desc));
+ throw Exception(TQString("Invalid parameter '%1'").tqarg(desc));
}
-Variable::List MetaMethod::toVariableList(QUObject* uo)
+Variable::List MetaMethod::toVariableList(TQUObject* uo)
{
Variable::List list;
@@ -311,12 +311,12 @@ KSharedPtr<Variable> MetaMethod::invoke(Variable::List arguments)
throw Exception("MetaObject is undefined.");
}
- QObject* obj = d->object->object();
+ TQObject* obj = d->object->object();
KSharedPtr<Variable> returnvalue;
- QUObject* qu = 0;
+ TQUObject* qu = 0;
try {
- qu = toQUObject(arguments);
+ qu = toTQUObject(arguments);
switch( d->type ) {
case Signal: {
@@ -334,7 +334,7 @@ KSharedPtr<Variable> MetaMethod::invoke(Variable::List arguments)
returnvalue = toVariable( &qu[0] );
}
catch(Exception& e) {
- delete [] qu; // free the QUObject array and
+ delete [] qu; // free the TQUObject array and
kdDebug() << "EXCEPTION in KoMacro::MetaMethod::invoke(Variable::List)" << endl;
throw Exception(e); // re-throw exception
}
diff --git a/kexi/plugins/macros/lib/metamethod.h b/kexi/plugins/macros/lib/metamethod.h
index df53ac60..daf7dfcb 100644
--- a/kexi/plugins/macros/lib/metamethod.h
+++ b/kexi/plugins/macros/lib/metamethod.h
@@ -20,13 +20,13 @@
#ifndef KOMACRO_METAMETHOD_H
#define KOMACRO_METAMETHOD_H
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include <ksharedptr.h>
#include "komacro_export.h"
-struct QUObject;
+struct TQUObject;
namespace KoMacro {
@@ -38,10 +38,10 @@ namespace KoMacro {
/**
* Class to provide abstract methods for the undocumented
- * Qt3 QUObject-API functionality.
+ * TQt3 TQUObject-API functionality.
*
- * The design tried to limit future porting to Qt4 by providing a
- * somewhat similar API to the Qt4 QMeta* stuff.
+ * The design tried to limit future porting to TQt4 by providing a
+ * somewhat similar API to the TQt4 TQMeta* stuff.
*/
class KOMACRO_EXPORT MetaMethod : public KShared
{
@@ -52,8 +52,8 @@ namespace KoMacro {
* access to.
*/
enum Type {
- Signal, /// The @a MetaMethod points to a Qt signal.
- Slot, /// The @a MetaMethod points to a Qt slot.
+ Signal, /// The @a MetaMethod points to a TQt signal.
+ Slot, /// The @a MetaMethod points to a TQt slot.
Unknown /// The @a MetaMethod is not known.
};
@@ -62,14 +62,14 @@ namespace KoMacro {
*
* @param signature The signature this @a MetaMethod has. This
* includes the tagname and the arguments and could look like
- * "myslot(const QString&, int)".
+ * "myslot(const TQString&, int)".
* @param type The @a MetaMethod::Type the @a MethodMethod
* has.
* @param object The @a MetaObject this @a MethodMethod
* belongs to. Each @a MethodMethod is associated with
* exactly one @a MetaObject .
*/
- explicit MetaMethod(const QString& signature, Type type = Unknown, KSharedPtr<MetaObject> object = 0);
+ explicit MetaMethod(const TQString& signature, Type type = Unknown, KSharedPtr<MetaObject> object = 0);
/**
* Destructor.
@@ -84,23 +84,23 @@ namespace KoMacro {
/**
* @return the signature this @a MetaMethod has. It could
- * be something like "mySlot(const QString&,int)".
+ * be something like "mySlot(const TQString&,int)".
*/
- const QString signature() const;
+ const TQString signature() const;
/**
* @return the signatures tagname this @a MetaMethod has.
- * At the signature "mySlot(const QString&,int)" the
+ * At the signature "mySlot(const TQString&,int)" the
* tagname would be "mySlot".
*/
- const QString signatureTag() const;
+ const TQString signatureTag() const;
/**
* @return the signatures arguments this @a MetaMethod has.
- * At the signature "mySlot(const QString&,int)" the
- * arguments are "const QString&,int".
+ * At the signature "mySlot(const TQString&,int)" the
+ * arguments are "const TQString&,int".
*/
- const QString signatureArguments() const;
+ const TQString signatureArguments() const;
/**
* @return the @a Type of method this @a MetaMethod provides
@@ -112,31 +112,31 @@ namespace KoMacro {
* @return the signature arguments as parsed list of
* @a MetaParameter instances.
*/
- QValueList< KSharedPtr<MetaParameter> > arguments() const;
+ TQValueList< KSharedPtr<MetaParameter> > arguments() const;
/**
* Translate the passed @p arguments list of @a Variable instances
- * into a Qt3 QUObject* array.
+ * into a TQt3 TQUObject* array.
*/
- QUObject* toQUObject(QValueList< KSharedPtr<Variable> > arguments);
+ TQUObject* toTQUObject(TQValueList< KSharedPtr<Variable> > arguments);
/**
- * Translate the passed @p uo QUObject reference into an internal used
+ * Translate the passed @p uo TQUObject reference into an internal used
* @a Variable instances.
*/
- KSharedPtr<Variable> toVariable(QUObject* uo);
+ KSharedPtr<Variable> toVariable(TQUObject* uo);
/**
- * Translate the passed @p uo QUObject array into an internal used
+ * Translate the passed @p uo TQUObject array into an internal used
* list of @a Variable instances.
*/
- QValueList< KSharedPtr<Variable> > toVariableList(QUObject* uo);
+ TQValueList< KSharedPtr<Variable> > toVariableList(TQUObject* uo);
/**
* Invoke the @a MetaMethod with the optional arguments
* @p arguments and return a variable.
*/
- KSharedPtr<Variable> invoke(QValueList< KSharedPtr<Variable> > arguments);
+ KSharedPtr<Variable> invoke(TQValueList< KSharedPtr<Variable> > arguments);
private:
/// @internal d-pointer class.
diff --git a/kexi/plugins/macros/lib/metaobject.cpp b/kexi/plugins/macros/lib/metaobject.cpp
index 000f4181..e9e56b44 100644
--- a/kexi/plugins/macros/lib/metaobject.cpp
+++ b/kexi/plugins/macros/lib/metaobject.cpp
@@ -22,8 +22,8 @@
#include "variable.h"
#include "exception.h"
-#include <qguardedptr.h>
-#include <qmetaobject.h>
+#include <tqguardedptr.h>
+#include <tqmetaobject.h>
#include <kdebug.h>
@@ -40,14 +40,14 @@ namespace KoMacro {
public:
/**
- * The QObject instance this @a MetaObject belongs to.
+ * The TQObject instance this @a MetaObject belongs to.
*/
- QGuardedPtr<QObject> const object;
+ TQGuardedPtr<TQObject> const object;
/**
* Constructor.
*/
- Private(QObject* const object)
+ Private(TQObject* const object)
: object(object)
{
}
@@ -55,7 +55,7 @@ namespace KoMacro {
}
-MetaObject::MetaObject(QObject* const object)
+MetaObject::MetaObject(TQObject* const object)
: KShared()
, d( new Private(object) ) // create the private d-pointer instance.
{
@@ -66,66 +66,66 @@ MetaObject::~MetaObject()
delete d;
}
-QObject* const MetaObject::object() const
+TQObject* const MetaObject::object() const
{
if(! d->object) {
- throw Exception(QString("Object is undefined."));
+ throw Exception(TQString("Object is undefined."));
}
return d->object;
}
/*
-QStrList MetaObject::signalNames() const
+TQStrList MetaObject::signalNames() const
{
- return object()->metaObject()->signalNames();
+ return object()->tqmetaObject()->signalNames();
}
-QStrList MetaObject::slotNames() const
+TQStrList MetaObject::slotNames() const
{
- return object()->metaObject()->slotNames();
+ return object()->tqmetaObject()->slotNames();
}
*/
int MetaObject::indexOfSignal(const char* signal) const
{
- QMetaObject* metaobject = object()->metaObject();
+ TQMetaObject* metaobject = object()->tqmetaObject();
int signalid = metaobject->findSignal(signal, false);
if(signalid < 0) {
- throw Exception(QString("Invalid signal \"%1\"").arg(signal));
+ throw Exception(TQString("Invalid signal \"%1\"").tqarg(signal));
}
return signalid;
}
int MetaObject::indexOfSlot(const char* slot) const
{
- QMetaObject* metaobject = object()->metaObject();
+ TQMetaObject* metaobject = object()->tqmetaObject();
int slotid = metaobject->findSlot(slot, false);
if(slotid < 0) {
- throw Exception(QString("Invalid slot \"%1\"").arg(slot));
+ throw Exception(TQString("Invalid slot \"%1\"").tqarg(slot));
}
return slotid;
}
KSharedPtr<MetaMethod> MetaObject::method(int index)
{
- QObject* obj = object();
+ TQObject* obj = object();
MetaMethod::Type type = MetaMethod::Slot;
- QMetaObject* metaobject = obj->metaObject();
+ TQMetaObject* metaobject = obj->tqmetaObject();
- const QMetaData* metadata = metaobject->slot(index, true);
+ const TQMetaData* metadata = metaobject->slot(index, true);
if(! metadata) {
// Try to get a signal with that index iff we failed to determinate
// a matching slot.
metadata = metaobject->signal(index, true);
if(! metadata) {
- throw Exception(QString("Invalid method index \"%1\" in object \"%2\"").arg(index).arg(obj->name()));
+ throw Exception(TQString("Invalid method index \"%1\" in object \"%2\"").tqarg(index).tqarg(obj->name()));
}
type = MetaMethod::Signal;
}
- if(metadata->access != QMetaData::Public) {
- throw Exception(QString("Not allowed to access method \"%1\" in object \"%2\"").arg(metadata->name).arg(obj->name()));
+ if(metadata->access != TQMetaData::Public) {
+ throw Exception(TQString("Not allowed to access method \"%1\" in object \"%2\"").tqarg(metadata->name).tqarg(obj->name()));
}
return new MetaMethod(metadata->name, type, this);
diff --git a/kexi/plugins/macros/lib/metaobject.h b/kexi/plugins/macros/lib/metaobject.h
index 8b611574..a1a52562 100644
--- a/kexi/plugins/macros/lib/metaobject.h
+++ b/kexi/plugins/macros/lib/metaobject.h
@@ -20,7 +20,7 @@
#ifndef KOMACRO_METAOBJECT_H
#define KOMACRO_METAOBJECT_H
-#include <qobject.h>
+#include <tqobject.h>
#include <ksharedptr.h>
#include "komacro_export.h"
@@ -32,11 +32,11 @@ namespace KoMacro {
class MetaMethod;
/**
- * Class to provide abstract access to extended QObject functionality
- * like the undocumented QUObject-API in Qt3.
+ * Class to provide abstract access to extended TQObject functionality
+ * like the undocumented TQUObject-API in TQt3.
*
- * The design tried to limit future porting to Qt4 by providing a
- * somewhat similar API to the Qt4 QMeta* stuff.
+ * The design tried to limit future porting to TQt4 by providing a
+ * somewhat similar API to the TQt4 TQMeta* stuff.
*/
class KOMACRO_EXPORT MetaObject : public KShared
{
@@ -45,10 +45,10 @@ namespace KoMacro {
/**
* Constructor.
*
- * @param object The QObject instance this @a MetaObject provides
+ * @param object The TQObject instance this @a MetaObject provides
* abstract access to.
*/
- explicit MetaObject(QObject* const object);
+ explicit MetaObject(TQObject* const object);
/**
* Destructor.
@@ -56,13 +56,13 @@ namespace KoMacro {
~MetaObject();
/**
- * @return the QObject this @a MetaObject provides abstract
+ * @return the TQObject this @a MetaObject provides abstract
* access to.
*/
- QObject* const object() const;
+ TQObject* const object() const;
- //QStrList signalNames() const;
- //QStrList slotNames() const;
+ //TQStrList signalNames() const;
+ //TQStrList slotNames() const;
/**
* @return the index of the signal @p signal .
@@ -91,7 +91,7 @@ namespace KoMacro {
KSharedPtr<MetaMethod> slot(const char* slot);
//KSharedPtr<MetaMethod> addSlot(const char* slot);
-//void connectSignal(QObject* obj, const char* signal);
+//void connectSignal(TQObject* obj, const char* signal);
/**
* Invoke the @a MetaMethod that has the index @p index .
@@ -104,7 +104,7 @@ namespace KoMacro {
* @return The returnvalue the method provides and that got
* returned if the execution is done.
*/
- KSharedPtr<Variable> invokeMethod(int index, QValueList< KSharedPtr<Variable> > arguments);
+ KSharedPtr<Variable> invokeMethod(int index, TQValueList< KSharedPtr<Variable> > arguments);
private:
/// @internal d-pointer class.
diff --git a/kexi/plugins/macros/lib/metaparameter.cpp b/kexi/plugins/macros/lib/metaparameter.cpp
index 7f072b2b..ed921cfe 100644
--- a/kexi/plugins/macros/lib/metaparameter.cpp
+++ b/kexi/plugins/macros/lib/metaparameter.cpp
@@ -37,10 +37,10 @@ namespace KoMacro {
/**
* The signatures argument that represents this MetaParameter.
- * This could be something like "const QString&", "int" or
- * "QMap &lt; QString, QVariant &gt; ".
+ * This could be something like "const TQString&", "int" or
+ * "TQMap &lt; TQString, TQVariant &gt; ".
*/
- QString signatureargument;
+ TQString signatureargument;
/**
* The type of the @a Variable .
@@ -48,16 +48,16 @@ namespace KoMacro {
MetaParameter::Type type;
/**
- * If the @a MetaParameter::Type is a Variant this QVariant::Type
+ * If the @a MetaParameter::Type is a Variant this TQVariant::Type
* is used to defined what kind of Variant it is.
*/
- QVariant::Type varianttype;
+ TQVariant::Type varianttype;
};
}
-MetaParameter::MetaParameter(const QString& signatureargument)
+MetaParameter::MetaParameter(const TQString& signatureargument)
: KShared()
, d( new Private() ) // create the private d-pointer instance.
{
@@ -78,7 +78,7 @@ MetaParameter::Type MetaParameter::type() const
return d->type;
}
-const QString MetaParameter::typeName() const
+const TQString MetaParameter::typeName() const
{
switch( d->type ) {
case TypeNone:
@@ -88,31 +88,31 @@ const QString MetaParameter::typeName() const
case TypeObject:
return "Object";
}
- return QString::null;
+ return TQString();
}
void MetaParameter::setType(MetaParameter::Type type)
{
d->type = type;
- d->varianttype = QVariant::Invalid;
+ d->varianttype = TQVariant::Invalid;
}
-QVariant::Type MetaParameter::variantType() const
+TQVariant::Type MetaParameter::variantType() const
{
return d->varianttype;
}
-void MetaParameter::setVariantType(QVariant::Type varianttype)
+void MetaParameter::setVariantType(TQVariant::Type varianttype)
{
d->type = TypeVariant;
d->varianttype = varianttype;
}
-void MetaParameter::setSignatureArgument(const QString& signatureargument)
+void MetaParameter::setSignatureArgument(const TQString& signatureargument)
{
d->signatureargument = signatureargument;
- QString argument = signatureargument;
+ TQString argument = signatureargument;
if(argument.startsWith("const")) {
argument = argument.mid(5).stripWhiteSpace();
}
@@ -122,14 +122,14 @@ void MetaParameter::setSignatureArgument(const QString& signatureargument)
}
if(argument.isEmpty()) {
- throw Exception(QString("Empty signature argument passed."));
+ throw Exception(TQString("Empty signature argument passed."));
}
- if(argument == "QVariant") {
- setVariantType( QVariant::Invalid );
+ if(argument == "TQVariant") {
+ setVariantType( TQVariant::Invalid );
}
- QVariant::Type type = argument.isNull() ? QVariant::Invalid : QVariant::nameToType(argument.latin1());
- if (type != QVariant::Invalid) {
+ TQVariant::Type type = argument.isNull() ? TQVariant::Invalid : TQVariant::nameToType(argument.latin1());
+ if (type != TQVariant::Invalid) {
setVariantType( type );
}
else {
diff --git a/kexi/plugins/macros/lib/metaparameter.h b/kexi/plugins/macros/lib/metaparameter.h
index ab2a4004..fa9df552 100644
--- a/kexi/plugins/macros/lib/metaparameter.h
+++ b/kexi/plugins/macros/lib/metaparameter.h
@@ -20,9 +20,9 @@
#ifndef KOMACRO_METAPARAMETER_H
#define KOMACRO_METAPARAMETER_H
-#include <qstring.h>
-#include <qvariant.h>
-#include <qobject.h>
+#include <tqstring.h>
+#include <tqvariant.h>
+#include <tqobject.h>
#include <ksharedptr.h>
#include "komacro_export.h"
@@ -34,10 +34,10 @@ namespace KoMacro {
/**
* Class to provide abstract methods for the undocumented
- * Qt3 QUObject-API functionality.
+ * TQt3 TQUObject-API functionality.
*
- * The design tried to limit future porting to Qt4 by providing a
- * somewhat similar API to the Qt4 QMeta* stuff.
+ * The design tried to limit future porting to TQt4 by providing a
+ * somewhat similar API to the TQt4 TQMeta* stuff.
*/
class KOMACRO_EXPORT MetaParameter : public KShared
{
@@ -45,29 +45,29 @@ namespace KoMacro {
/**
* Property to get the type of the variable.
*/
- Q_PROPERTY(Type type READ type)
+ TQ_PROPERTY(Type type READ type)
/**
* Property to get the type of the variable as string.
*/
- Q_PROPERTY(QString typeName READ typeName)
+ TQ_PROPERTY(TQString typeName READ typeName)
public:
/**
* List of @a MetaParameter instances.
*/
- typedef QValueList<KSharedPtr <MetaParameter > > List;
+ typedef TQValueList<KSharedPtr <MetaParameter > > List;
/**
* Constructor.
*
* @param signatureargument The signatures argument
* that will be used to determinate the arguments
- * type. This could be something like "const QString&",
- * "int" or "QMap &lt; QString, QVariant &gt; ".
+ * type. This could be something like "const TQString&",
+ * "int" or "TQMap &lt; TQString, TQVariant &gt; ".
*/
- explicit MetaParameter(const QString& signatureargument = QString::null);
+ explicit MetaParameter(const TQString& signatureargument = TQString());
/**
* Destructor.
@@ -79,8 +79,8 @@ namespace KoMacro {
*/
enum Type {
TypeNone = 0, /// None type, the @a MetaParameter is empty.
- TypeVariant, /// The @a MetaParameter is a QVariant.
- TypeObject /// The @a MetaParameter is a QObject.
+ TypeVariant, /// The @a MetaParameter is a TQVariant.
+ TypeObject /// The @a MetaParameter is a TQObject.
};
/**
@@ -92,7 +92,7 @@ namespace KoMacro {
* @return the @a MetaParameter::Type as string. The typename
* could be "None", "Variant" or "Object".
*/
- const QString typeName() const;
+ const TQString typeName() const;
/**
* Set the @a MetaParameter::Type this variable is.
@@ -102,12 +102,12 @@ namespace KoMacro {
/**
* @return the @a MetaParameter::Type this variable is.
*/
- QVariant::Type variantType() const;
+ TQVariant::Type variantType() const;
/**
* Set the @a MetaParameter::Type this variable is.
*/
- void setVariantType(QVariant::Type varianttype);
+ void setVariantType(TQVariant::Type varianttype);
/**
* @return true if the passed @a Variable @p variable is
@@ -122,7 +122,7 @@ namespace KoMacro {
* @internal used method to set the signature argument. Those
* argument will be used to determinate the arguments type.
*/
- void setSignatureArgument(const QString& signatureargument);
+ void setSignatureArgument(const TQString& signatureargument);
private:
/// @internal d-pointer class.
diff --git a/kexi/plugins/macros/lib/variable.cpp b/kexi/plugins/macros/lib/variable.cpp
index 598b8b46..f64613b0 100644
--- a/kexi/plugins/macros/lib/variable.cpp
+++ b/kexi/plugins/macros/lib/variable.cpp
@@ -37,31 +37,31 @@ namespace KoMacro {
/**
* The name this @a Variable has.
*/
- QString name;
+ TQString name;
/**
* The i18n-caption used for display purposes only
* this @a Variable has.
*/
- QString text;
+ TQString text;
/**
- * If @a Variable::Type is @a Variable::TypeVariant this QVariant
+ * If @a Variable::Type is @a Variable::TypeVariant this TQVariant
* holds the value else it's invalid.
*/
- QVariant variant;
+ TQVariant variant;
/**
- * If @a Variable::Type is @a Variable::TypeObject this QObject is
+ * If @a Variable::Type is @a Variable::TypeObject this TQObject is
* the value else it's NULL.
*/
- const QObject* object;
+ const TQObject* object;
/**
- * Optional list of children this @a Variable has.
+ * Optional list of tqchildren this @a Variable has.
*/
// TODO Dow we use this or is it for the future??
- Variable::List children;
+ Variable::List tqchildren;
/**
* Defines if the variable is enabled or disabled.
@@ -84,7 +84,7 @@ Variable::Variable()
d->object = 0;
}
-Variable::Variable(const QVariant& variant, const QString& name, const QString& text)
+Variable::Variable(const TQVariant& variant, const TQString& name, const TQString& text)
: MetaParameter()
, d( new Private() ) // create the private d-pointer instance.
{
@@ -95,7 +95,7 @@ Variable::Variable(const QVariant& variant, const QString& name, const QString&
d->text = text;
}
-Variable::Variable(const QObject* object)
+Variable::Variable(const TQObject* object)
: MetaParameter()
, d( new Private() ) // create the private d-pointer instance.
{
@@ -103,28 +103,28 @@ Variable::Variable(const QObject* object)
d->object = object;
}
-Variable::Variable(const QDomElement& element)
+Variable::Variable(const TQDomElement& element)
: MetaParameter()
, d( new Private() ) // create the private d-pointer instance.
{
- QString typesignature = element.attribute("type", "const QString&");
- QString value = element.text();
+ TQString typesignature = element.attribute("type", "const TQString&");
+ TQString value = element.text();
setSignatureArgument( typesignature );
switch( type() ) {
case KoMacro::MetaParameter::TypeVariant: {
- //kdDebug() << QString("KoMacro::Variable(QDomElement) KoMacro::MetaParameter::TypeVariant") << endl;
+ //kdDebug() << TQString("KoMacro::Variable(TQDomElement) KoMacro::MetaParameter::TypeVariant") << endl;
// Set the variant without overwritting the previously detected varianttype.
- setVariant( QVariant(value), false );
+ setVariant( TQVariant(value), false );
} break;
case KoMacro::MetaParameter::TypeObject: {
- //kdDebug() << QString("KoMacro::Variable(QDomElement) KoMacro::MetaParameter::TypeObject") << endl;
+ //kdDebug() << TQString("KoMacro::Variable(TQDomElement) KoMacro::MetaParameter::TypeObject") << endl;
//TODO setObject();
} break;
default: {
- kdWarning() << QString("KoMacro::Variable(QDomElement) KoMacro::MetaParameter::TypeNone") << endl;
+ kdWarning() << TQString("KoMacro::Variable(TQDomElement) KoMacro::MetaParameter::TypeNone") << endl;
} break;
}
}
@@ -134,35 +134,35 @@ Variable::~Variable()
delete d;
}
-QString Variable::name() const
+TQString Variable::name() const
{
return d->name;
}
-void Variable::setName(const QString& name)
+void Variable::setName(const TQString& name)
{
d->name = name;
}
-QString Variable::text() const
+TQString Variable::text() const
{
return d->text;
}
-void Variable::setText(const QString& text)
+void Variable::setText(const TQString& text)
{
d->text = text;
}
-const QVariant Variable::variant() const
+const TQVariant Variable::variant() const
{
//Q_ASSERT( type() == MetaParameter::TypeVariant );
- //Q_ASSERT( variantType() != QVariant::Invalid );
- //if(variantType() == QVariant::Invalid) return QVariant();
+ //Q_ASSERT( variantType() != TQVariant::Invalid );
+ //if(variantType() == TQVariant::Invalid) return TQVariant();
return d->variant;
}
-void Variable::setVariant(const QVariant& variant, bool detecttype)
+void Variable::setVariant(const TQVariant& variant, bool detecttype)
{
if(detecttype) {
setVariantType( variant.type() );
@@ -170,42 +170,42 @@ void Variable::setVariant(const QVariant& variant, bool detecttype)
d->variant = variant;
}
-const QObject* Variable::object() const
+const TQObject* Variable::object() const
{
Q_ASSERT( ! d->object );
return d->object;
}
-void Variable::setObject(const QObject* object)
+void Variable::setObject(const TQObject* object)
{
setType(TypeObject);
d->object = object;
}
-Variable::operator QVariant () const
+Variable::operator TQVariant () const
{
return variant();
}
-Variable::operator const QObject* () const
+Variable::operator const TQObject* () const
{
return object();
}
-const QString Variable::toString() const
+const TQString Variable::toString() const
{
switch( type() ) {
case KoMacro::MetaParameter::TypeVariant: {
return variant().toString();
} break;
case KoMacro::MetaParameter::TypeObject: {
- return QString("[%1]").arg( object()->name() );
+ return TQString("[%1]").tqarg( object()->name() );
} break;
default: {
throw Exception("Type is undefined.");
} break;
}
- return QString::null;
+ return TQString();
}
int Variable::toInt() const
@@ -213,24 +213,24 @@ int Variable::toInt() const
return variant().toInt();
}
-Variable::List Variable::children() const
+Variable::List Variable::tqchildren() const
{
- return d->children;
+ return d->tqchildren;
}
void Variable::appendChild(KSharedPtr<Variable> variable)
{
- d->children.append(variable);
+ d->tqchildren.append(variable);
}
void Variable::clearChildren()
{
- d->children.clear();
+ d->tqchildren.clear();
}
-void Variable::setChildren(const Variable::List& children)
+void Variable::setChildren(const Variable::List& tqchildren)
{
- d->children = children;
+ d->tqchildren = tqchildren;
}
/*
diff --git a/kexi/plugins/macros/lib/variable.h b/kexi/plugins/macros/lib/variable.h
index 26e9619e..108a6005 100644
--- a/kexi/plugins/macros/lib/variable.h
+++ b/kexi/plugins/macros/lib/variable.h
@@ -20,9 +20,9 @@
#ifndef KOMACRO_VARIABLE_H
#define KOMACRO_VARIABLE_H
-#include <qobject.h>
-#include <qdom.h>
-#include <qvariant.h>
+#include <tqobject.h>
+#include <tqdom.h>
+#include <tqvariant.h>
#include <ksharedptr.h>
#include "metaparameter.h"
@@ -31,7 +31,7 @@ namespace KoMacro {
/**
* A variable value used to provide abstract access to variables. The
- * class handles QVariant and QObject and provides access to them.
+ * class handles TQVariant and TQObject and provides access to them.
* Variable inherits KShared and implements reference couting. So, it's
* not needed to take care of memory-managment.
*/
@@ -39,31 +39,31 @@ namespace KoMacro {
{
/**
- * Property to get and set a QVariant as variable.
+ * Property to get and set a TQVariant as variable.
*/
- Q_PROPERTY(QVariant variant READ variant WRITE setVariant)
+ TQ_PROPERTY(TQVariant variant READ variant WRITE setVariant)
/**
- * Property to get and set a QObject as variable.
+ * Property to get and set a TQObject as variable.
*/
- Q_PROPERTY(QObject* object READ object WRITE setObject)
+ TQ_PROPERTY(TQObject* object READ object WRITE setObject)
/**
* Property to get a string-representation of the variable.
*/
- Q_PROPERTY(QString string READ toString)
+ TQ_PROPERTY(TQString string READ toString)
public:
/**
* A list of variables.
*/
- typedef QValueList<KSharedPtr<Variable > > List;
+ typedef TQValueList<KSharedPtr<Variable > > List;
/**
* A map of variables.
*/
- typedef QMap<QString, KSharedPtr<Variable > > Map;
+ typedef TQMap<TQString, KSharedPtr<Variable > > Map;
/**
* Default constructor.
@@ -71,28 +71,28 @@ namespace KoMacro {
explicit Variable();
/**
- * Constructor from the QVariant @p variant .
+ * Constructor from the TQVariant @p variant .
*
* @param variant The value this variable has.
* @param name The unique @a name() this variable has.
* @param text The describing @a text() this variable has.
*/
- Variable(const QVariant& variant, const QString& name = QString::null, const QString& text = QString::null);
+ Variable(const TQVariant& variant, const TQString& name = TQString(), const TQString& text = TQString());
/**
- * Constructor from the QObject @p object .
+ * Constructor from the TQObject @p object .
*
* @param object The value this variable has.
*/
- Variable(const QObject* object);
+ Variable(const TQObject* object);
/**
- * Constructor from the QDomElement @p element .
+ * Constructor from the TQDomElement @p element .
* @deprecated replaced with methods of @a XMLHandler.
- * @param element The QDomElement that may optional contains the
+ * @param element The TQDomElement that may optional contains the
* variable content or other additional informations.
*/
- Variable(const QDomElement& element);
+ Variable(const TQDomElement& element);
/**
* Destructor.
@@ -102,69 +102,69 @@ namespace KoMacro {
/**
* @return the name this @a Variable has.
*/
- QString name() const;
+ TQString name() const;
/**
* Set the name @param name this @a Variable has.
*/
- void setName(const QString& name);
+ void setName(const TQString& name);
/**
* @return the caption this @a Variable has.
*/
- QString text() const;
+ TQString text() const;
/**
* Set the caption @param text this @a Variable has.
*/
- void setText(const QString& text);
+ void setText(const TQString& text);
/**
- * Set the QObject @param object this variable has. A
+ * Set the TQObject @param object this variable has. A
* previously remembered value will be overwritten and
* the new type is a @a TypeObject .
*/
- void setObject(const QObject* object);
+ void setObject(const TQObject* object);
/**
- * @return the QVariant this variable has. If this
- * variable isn't a @a TypeVariant an invalid QVariant
+ * @return the TQVariant this variable has. If this
+ * variable isn't a @a TypeVariant an invalid TQVariant
* got returned.
*/
- const QVariant variant() const;
+ const TQVariant variant() const;
/**
- * Set the QVariant @param variant this variable has. A
+ * Set the TQVariant @param variant this variable has. A
* previously remembered value will be overwritten and
* the new type is a @a TypeVariant . If @param detecttype is
* true the method tries to set the @a variantType according
- * to the passed QVariant. If false the variantType won't
+ * to the passed TQVariant. If false the variantType won't
* be changed.
*/
- void setVariant(const QVariant& variant, bool detecttype = true);
+ void setVariant(const TQVariant& variant, bool detecttype = true);
/**
- * @return the QObject this variable has. If this
+ * @return the TQObject this variable has. If this
* variable isn't a @a TypeObject NULL got returned.
*/
- const QObject* object() const;
+ const TQObject* object() const;
/**
- * Implicit conversion to QVariant operator. This method
+ * Implicit conversion to TQVariant operator. This method
* calls @a variant() internaly.
*/
- operator QVariant () const;
+ operator TQVariant () const;
/**
- * Implicit conversion to QObject operator. This method
+ * Implicit conversion to TQObject operator. This method
* calls @a object() internaly.
*/
- operator const QObject* () const;
+ operator const TQObject* () const;
/**
* @return a string-represenation of the variable.
*/
- const QString toString() const;
+ const TQString toString() const;
/**
* @return a integer-represenation of the variable.
@@ -173,29 +173,29 @@ namespace KoMacro {
/**
* @return the optional list of @a Variable instances
- * that are children of this @a Variable .
+ * that are tqchildren of this @a Variable .
*
* @note that the list is returned call-by-reference. The
* list is accessed as getter/setter (read/write). So,
* don't set this method to const!
*/
- List children() const;
+ List tqchildren() const;
/**
- * Append a @a Variable to the list of children this
+ * Append a @a Variable to the list of tqchildren this
* @a Variable has.
*/
void appendChild(KSharedPtr<Variable> variable);
/**
- * Clear the list of children this @a Variable has.
+ * Clear the list of tqchildren this @a Variable has.
*/
void clearChildren();
/**
- * Set the children this @a Variable has.
+ * Set the tqchildren this @a Variable has.
*/
- void setChildren(const List& children);
+ void setChildren(const List& tqchildren);
#if 0
/**
diff --git a/kexi/plugins/macros/lib/xmlhandler.cpp b/kexi/plugins/macros/lib/xmlhandler.cpp
index b35759e1..4894c619 100644
--- a/kexi/plugins/macros/lib/xmlhandler.cpp
+++ b/kexi/plugins/macros/lib/xmlhandler.cpp
@@ -22,7 +22,7 @@
#include "macroitem.h"
#include "action.h"
-#include <qdom.h>
+#include <tqdom.h>
#include <kdebug.h>
using namespace KoMacro;
@@ -67,7 +67,7 @@ XMLHandler::~XMLHandler()
delete d;
}
-bool XMLHandler::parseXML(const QDomElement& element)
+bool XMLHandler::parseXML(const TQDomElement& element)
{
// Remove old items. We should clear first.
d->macro->clearItems();
@@ -75,7 +75,7 @@ bool XMLHandler::parseXML(const QDomElement& element)
// We expect a <macro> element. Do we really need to be such strict or
// would it be more wise to trust the application in that case?
if(element.tagName() != "macro") {
- kdDebug() << QString("XMLHandler::parseXML() Invalid tagname \"%1\"").arg(element.tagName()) << endl;
+ kdDebug() << TQString("XMLHandler::parseXML() Invalid tagname \"%1\"").tqarg(element.tagName()) << endl;
return false;
}
@@ -83,20 +83,20 @@ bool XMLHandler::parseXML(const QDomElement& element)
// If there is more than one version, parsing should update old macro-data, so that it
// could write out in the newer version in toXML().
if( element.attribute("xmlversion") != "1"){
- kdDebug() << QString("XMLHandler::parseXML() Invalid xml-version \"%1\"").arg(element.attribute("xmlversion")) << endl;
+ kdDebug() << TQString("XMLHandler::parseXML() Invalid xml-version \"%1\"").tqarg(element.attribute("xmlversion")) << endl;
return false;
}
// Do we need to load the macro's name?
// d->macro->setName(element.attribute("name"));
- // Iterate through the child nodes the passed QDomElement has and
+ // Iterate through the child nodes the passed TQDomElement has and
// build the MacroItem elements.
- for(QDomNode itemnode = element.firstChild(); ! itemnode.isNull(); itemnode = itemnode.nextSibling()) {
+ for(TQDomNode itemnode = element.firstChild(); ! itemnode.isNull(); itemnode = itemnode.nextSibling()) {
// The tagname should be "item"
if(itemnode.nodeName() == "item") {
// The node is an element.
- const QDomElement itemelem = itemnode.toElement();
+ const TQDomElement itemelem = itemnode.toElement();
// Create a new MacroItem
KSharedPtr<MacroItem> item = new MacroItem();
@@ -115,18 +115,18 @@ bool XMLHandler::parseXML(const QDomElement& element)
// Set the comment
item->setComment( itemelem.attribute("comment") );
- // Iterate through the children this item has and try
+ // Iterate through the tqchildren this item has and try
// to fill the list of variables our new MacroItem has.
- for(QDomNode childnode = itemnode.firstChild(); ! childnode.isNull(); childnode = childnode.nextSibling()) {
+ for(TQDomNode childnode = itemnode.firstChild(); ! childnode.isNull(); childnode = childnode.nextSibling()) {
// The tagname should be "variable"
if(childnode.nodeName() == "variable") {
// The node is an element.
- const QDomElement childelem = childnode.toElement();
+ const TQDomElement childelem = childnode.toElement();
// The name the variable has.
- const QString name = childelem.attribute("name");
+ const TQString name = childelem.attribute("name");
// The value the variable has.
- const QString value = childelem.text();
+ const TQString value = childelem.text();
// Store the new variable in our macroitem.
item->addVariable(name, value);
@@ -139,13 +139,13 @@ bool XMLHandler::parseXML(const QDomElement& element)
return true;
}
-QDomElement XMLHandler::toXML()
+TQDomElement XMLHandler::toXML()
{
- // The QDomDocument provides us the functionality to create new QDomElement instances.
- QDomDocument document;
+ // The TQDomDocument provides us the functionality to create new TQDomElement instances.
+ TQDomDocument document;
- // Create the Macro-QDomElement. This element will be returned.
- QDomElement macroelem = document.createElement("macro");
+ // Create the Macro-TQDomElement. This element will be returned.
+ TQDomElement macroelem = document.createElement("macro");
// Set the Macro-XML-Version, it should be the newest Version.
macroelem.setAttribute("xmlversion","1");
@@ -156,12 +156,12 @@ QDomElement XMLHandler::toXML()
// redundancy at this point.
//macroelem.setAttribute("name",d->macro->name());
- // The list of MacroItem-children a Macro provides.
- QValueList<KSharedPtr<MacroItem > > items = d->macro->items();
+ // The list of MacroItem-tqchildren a Macro provides.
+ TQValueList<KSharedPtr<MacroItem > > items = d->macro->items();
// Create an iterator...
- QValueList<KSharedPtr<MacroItem > >::ConstIterator it(items.constBegin()), end(items.constEnd());
- // ...and iterate over the list of children the Macro provides.
+ TQValueList<KSharedPtr<MacroItem > >::ConstIterator it(items.constBegin()), end(items.constEnd());
+ // ...and iterate over the list of tqchildren the Macro provides.
for(;it != end; ++it) {
// We are iterating over MacroItem instances.
KSharedPtr<MacroItem> item = *it;
@@ -171,7 +171,7 @@ QDomElement XMLHandler::toXML()
bool append = false;
// Each MacroItem will have an own node.
- QDomElement itemelem = document.createElement("item");
+ TQDomElement itemelem = document.createElement("item");
// Each MacroItem could point to an Action provided by the Manager.
const KSharedPtr<Action> action = item->action();
@@ -184,9 +184,9 @@ QDomElement XMLHandler::toXML()
// Each MacroItem could have a list of variables. We
// iterate through that list and build a element
// for each single variable.
- QMap<QString, KSharedPtr<Variable > > varmap = item->variables();
+ TQMap<TQString, KSharedPtr<Variable > > varmap = item->variables();
- for(QMap<QString, KSharedPtr<Variable > >::ConstIterator vit = varmap.constBegin(); vit != varmap.constEnd(); ++vit) {
+ for(TQMap<TQString, KSharedPtr<Variable > >::ConstIterator vit = varmap.constBegin(); vit != varmap.constEnd(); ++vit) {
const KSharedPtr<Variable> v = vit.data();
if(! v.data()) {
// skip if the variable is NULL.
@@ -194,7 +194,7 @@ QDomElement XMLHandler::toXML()
}
// Create an own element for the variable. The tagname will be
// the name of the variable.
- QDomElement varelement = document.createElement("variable");
+ TQDomElement varelement = document.createElement("variable");
// Remember the name the value has.
varelement.setAttribute("name", vit.key());
@@ -208,7 +208,7 @@ QDomElement XMLHandler::toXML()
}
// Each MacroItem could have an optional comment.
- const QString comment = item->comment();
+ const TQString comment = item->comment();
if(! comment.isEmpty()) {
append = true;
itemelem.setAttribute("comment", item->comment());
diff --git a/kexi/plugins/macros/lib/xmlhandler.h b/kexi/plugins/macros/lib/xmlhandler.h
index b6978d0f..c6ee0c26 100644
--- a/kexi/plugins/macros/lib/xmlhandler.h
+++ b/kexi/plugins/macros/lib/xmlhandler.h
@@ -22,8 +22,8 @@
#include "komacro_export.h"
-class QObject;
-class QDomElement;
+class TQObject;
+class TQDomElement;
namespace KoMacro {
@@ -51,20 +51,20 @@ namespace KoMacro {
~XMLHandler();
/**
- * Reads a given @a QDomElement, extracts given
+ * Reads a given @a TQDomElement, extracts given
* Actions into the managed Macro-Instance.
- * @param element The @a QDomElement within
+ * @param element The @a TQDomElement within
* the @a Macro.
* @return Return true when parsing is successfull.
*/
- bool parseXML(const QDomElement& element);
+ bool parseXML(const TQDomElement& element);
/**
- * Converts the macro to a @a QDomElement.
- * @return The resulten @a QDomElement from
+ * Converts the macro to a @a TQDomElement.
+ * @return The resulten @a TQDomElement from
* the @a Macro.
*/
- QDomElement toXML();
+ TQDomElement toXML();
private:
/// @internal d-pointer class.
diff --git a/kexi/plugins/macros/tests/actiontests.cpp b/kexi/plugins/macros/tests/actiontests.cpp
index 0150ecfd..65bebe66 100644
--- a/kexi/plugins/macros/tests/actiontests.cpp
+++ b/kexi/plugins/macros/tests/actiontests.cpp
@@ -34,8 +34,8 @@
#include <ostream>
-#include <qstringlist.h>
-#include <qdom.h>
+#include <tqstringlist.h>
+#include <tqdom.h>
#include <kdebug.h>
#include <kunittest/runner.h>
@@ -66,16 +66,16 @@ namespace KoMacroTest {
/**
* An @a TestObject instance used internaly to test
- * handling and communication with from QObject
+ * handling and communication with from TQObject
* inheritated instances.
*/
TestAction* testaction;
- QDomDocument* doomdocument;
+ TQDomDocument* doomdocument;
KSharedPtr<KoMacro::Macro> macro;
- QValueList< KSharedPtr<KoMacro::MacroItem> > items;
+ TQValueList< KSharedPtr<KoMacro::MacroItem> > items;
KSharedPtr<KoMacro::Action> actionptr;
@@ -90,7 +90,7 @@ namespace KoMacroTest {
};
}
-typedef QValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype;
+typedef TQValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype;
ActionTests::ActionTests()
@@ -117,9 +117,9 @@ void ActionTests::setUp()
d->testaction = new TestAction();
::KoMacro::Manager::self()->publishAction(d->testaction);
- d->doomdocument = new QDomDocument();
+ d->doomdocument = new TQDomDocument();
- QString const xml = QString("<!DOCTYPE macros>"
+ TQString const xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\" >"
"<item action=\"testaction\" >"
"</item>"
@@ -147,7 +147,7 @@ void ActionTests::testMacro()
kdDebug()<<"===================== testMacro() ======================" << endl;
//fetch Items and ..
- //QValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
+ //TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
//... check that there is one
KOMACROTEST_XASSERT( d->items.count(), sizetype(0) );
@@ -169,14 +169,14 @@ void ActionTests::testText()
//KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
- const QString leetSpeech = "']['3 $']['";
+ const TQString leetSpeech = "']['3 $']['";
//check i18n text
- KOMACROTEST_ASSERT(d->actionptr->text(),QString("Test"));
+ KOMACROTEST_ASSERT(d->actionptr->text(),TQString("Test"));
//change it
d->actionptr->setText(leetSpeech);
//retest it
- KOMACROTEST_ASSERT(d->actionptr->text(),QString(leetSpeech));
+ KOMACROTEST_ASSERT(d->actionptr->text(),TQString(leetSpeech));
}
@@ -187,11 +187,11 @@ void ActionTests::testName()
//KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
//check name
- KOMACROTEST_ASSERT(d->actionptr->name(),QString("testaction"));
+ KOMACROTEST_ASSERT(d->actionptr->name(),TQString("testaction"));
//change it
d->actionptr->setName("ActionJackson");
//retest it
- KOMACROTEST_ASSERT(d->actionptr->name(),QString("ActionJackson"));
+ KOMACROTEST_ASSERT(d->actionptr->name(),TQString("ActionJackson"));
}
void ActionTests::testComment()
@@ -201,11 +201,11 @@ void ActionTests::testComment()
//KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
//check comment
- KOMACROTEST_XASSERT(d->actionptr->comment(),QString("No Comment!"));
+ KOMACROTEST_XASSERT(d->actionptr->comment(),TQString("No Comment!"));
//set comment
d->actionptr->setComment("Stringtest");
//check comment again
- KOMACROTEST_ASSERT(d->actionptr->comment(),QString("Stringtest"));
+ KOMACROTEST_ASSERT(d->actionptr->comment(),TQString("Stringtest"));
}
#include "actiontests.moc"
diff --git a/kexi/plugins/macros/tests/actiontests.h b/kexi/plugins/macros/tests/actiontests.h
index 48b5a252..07cf8958 100644
--- a/kexi/plugins/macros/tests/actiontests.h
+++ b/kexi/plugins/macros/tests/actiontests.h
@@ -31,6 +31,7 @@ namespace KoMacroTest {
class ActionTests : public KUnitTest::SlotTester
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
diff --git a/kexi/plugins/macros/tests/commontests.cpp b/kexi/plugins/macros/tests/commontests.cpp
index 84c596aa..1086a340 100644
--- a/kexi/plugins/macros/tests/commontests.cpp
+++ b/kexi/plugins/macros/tests/commontests.cpp
@@ -36,8 +36,8 @@
#include <ostream>
#include <climits>
-#include <qstringlist.h>
-#include <qdom.h>
+#include <tqstringlist.h>
+#include <tqdom.h>
#include <kdebug.h>
#include <kunittest/runner.h>
@@ -71,14 +71,14 @@ namespace KoMacroTest {
/**
* An @a TestObject instance used internaly to test
- * handling and communication with from QObject
+ * handling and communication with from TQObject
* inheritated instances.
*/
TestObject* testobject;
TestAction* testaction;
- QDomDocument* doomdocument;
+ TQDomDocument* doomdocument;
/**
* Constructor.
@@ -94,7 +94,7 @@ namespace KoMacroTest {
}
-typedef QValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype;
+typedef TQValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype;
CommonTests::CommonTests()
: KUnitTest::SlotTester()
@@ -119,9 +119,9 @@ void CommonTests::setUp()
d->testaction = new TestAction();
::KoMacro::Manager::self()->publishAction(d->testaction);
- d->doomdocument = new QDomDocument();
+ d->doomdocument = new TQDomDocument();
- QString const xml = QString("<!DOCTYPE macros>"
+ TQString const xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
@@ -146,14 +146,14 @@ void CommonTests::testManager()
//check if manager-guiClient equals xmlguiclient
KOMACROTEST_ASSERT( ::KoMacro::Manager::self()->guiClient(), d->xmlguiclient );
//check if manger-object equals testobject
- KOMACROTEST_ASSERT( dynamic_cast<TestObject*>( (QObject*)::KoMacro::Manager::self()->object("TestObject") ), d->testobject );
+ KOMACROTEST_ASSERT( dynamic_cast<TestObject*>( (TQObject*)::KoMacro::Manager::self()->object("TestObject") ), d->testobject );
}
/*
void CommonTests::testAction()
{
- const QString testString = "teststring";
- const QString testInt = "testint";
- const QString testBool = "testbool";
+ const TQString testString = "teststring";
+ const TQString testInt = "testint";
+ const TQString testBool = "testbool";
//TODO: CLEANUP!!!!!!
//TODO: test manipulation of action and macroitem and context.
@@ -162,7 +162,7 @@ void CommonTests::testAction()
//Publish TestAction for the first time.
- QDomElement const domelement = d->doomdocument->documentElement();
+ TQDomElement const domelement = d->doomdocument->documentElement();
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
@@ -173,7 +173,7 @@ void CommonTests::testAction()
macro->execute(this);
//create list of KSharedPtr from the childs of the macro
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items = macro->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = macro->items();
//check that there is one
@@ -188,7 +188,7 @@ void CommonTests::testAction()
//check that it is not null
KOMACROTEST_XASSERT(sizetype(variableptr.data()), sizetype(0));
//check that it is " "
- KOMACROTEST_ASSERT(variableptr->variant().toString(),QString("testString"));
+ KOMACROTEST_ASSERT(variableptr->variant().toString(),TQString("testString"));
//fetch the "testint"-variable
variableptr = actionptr->variable("testint");
@@ -209,7 +209,7 @@ void CommonTests::testAction()
//check that it is not null
KOMACROTEST_XASSERT(sizetype(variableptr.data()), sizetype(0));
//check that it is " "
- KOMACROTEST_ASSERT(variableptr->variant().toString(),QString("TestString"));
+ KOMACROTEST_ASSERT(variableptr->variant().toString(),TQString("TestString"));
actionptr->setVariable("testint","INTTEST",INT_MAX);
variableptr = actionptr->variable("testint");
@@ -234,7 +234,7 @@ void CommonTests::testAction()
macroitem->setVariable("teststring", "TeStString");
variableptr = macroitem->variable("teststring");
KOMACROTEST_XASSERT(sizetype(variableptr.data()), sizetype(0));
- KOMACROTEST_ASSERT(variableptr->variant().toString(),QString("TeStString"));
+ KOMACROTEST_ASSERT(variableptr->variant().toString(),TQString("TeStString"));
macroitem->setVariable("testint",INT_MIN);
variableptr = macroitem->variable("testint");
@@ -249,8 +249,8 @@ void CommonTests::testAction()
//commontests.cpp: In member function 'void KoMacroTest::CommonTests::testAction()':
//commontests.cpp:249: error: call of overloaded 'setVariable(const char [8], int)' is ambiguous
- //../lib/macroitem.h:131: note: candidates are: QStringList KoMacro::MacroItem::setVariable(const QString&, KSharedPtr<KoMacro::Variable>)
- //../lib/macroitem.h:137: note: QStringList KoMacro::MacroItem::setVariable(const QString&, const QVariant&)
+ //../lib/macroitem.h:131: note: candidates are: TQStringList KoMacro::MacroItem::setVariable(const TQString&, KSharedPtr<KoMacro::Variable>)
+ //../lib/macroitem.h:137: note: TQStringList KoMacro::MacroItem::setVariable(const TQString&, const TQVariant&)
macroitem->setVariable("testint",(int) 0);
variableptr = macroitem->variable("testint");
@@ -286,14 +286,14 @@ void CommonTests::testXmlhandler()
// Local Init
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomElement domelement;
+ TQDomElement domelement;
// Save old doomdocument
- QString xmlOld = d->doomdocument->toString();
+ TQString xmlOld = d->doomdocument->toString();
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- QString xml = QString("<!DOCTYPE macros>"
+ TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >testString</variable>"
@@ -310,7 +310,7 @@ void CommonTests::testXmlhandler()
KOMACROTEST_ASSERT(macro->parseXML(domelement),true);
// Test-XML-document with bad root element.
- xml = QString("<!DOCTYPE macros>"
+ xml = TQString("<!DOCTYPE macros>"
"<maro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >testString</variable>"
@@ -324,7 +324,7 @@ void CommonTests::testXmlhandler()
KOMACROTEST_ASSERT(macro->parseXML(domelement),false);
// Test-XML-document with wrong macro-xmlversion.
- xml = QString("<!DOCTYPE macros>"
+ xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"2\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >testString</variable>"
@@ -339,7 +339,7 @@ void CommonTests::testXmlhandler()
// TODO Test-XML-document if it has a wrong structure like wrong parathesis
// or missing end tag (is this critical??).
- /*xml = QString("<!DOCTYPE macros>"
+ /*xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >testString</variable>"
@@ -353,7 +353,7 @@ void CommonTests::testXmlhandler()
// Test-XML-document with wrong item- and variable-tags.
// TODO Could this happen??
- xml = QString("<!DOCTYPE macros>"
+ xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<iem action=\"testaction\" >"
"<vle name=\"teststring\" >testString</variable>"
@@ -367,7 +367,7 @@ void CommonTests::testXmlhandler()
KOMACROTEST_ASSERT(macro->parseXML(domelement),true); //should be false?
// TODO Test-XML-document with maximum field-size.
- xml = QString("<!DOCTYPE macros>"
+ xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >testString</variable>"
@@ -381,7 +381,7 @@ void CommonTests::testXmlhandler()
KOMACROTEST_ASSERT(macro->parseXML(domelement),true);
// TODO Test-XML-document with minimum field-size.
- xml = QString("<!DOCTYPE macros>"
+ xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >testString</variable>"
@@ -410,21 +410,21 @@ void CommonTests::testFunction()
/*
kdDebug()<<"===================== testFunction() ======================" << endl;
- //create a QDomDocument
- QDomDocument domdocument = QDomDocument();
+ //create a TQDomDocument
+ TQDomDocument domdocument = TQDomDocument();
//create some data
- QString const comment = "Describe what the function does";
- QString const name = "myfunc";
- QString const text = "My Function";
- QString const receiver = "TestObject";
- QString const argument1 = "Some string";
+ TQString const comment = "Describe what the function does";
+ TQString const name = "myfunc";
+ TQString const text = "My Function";
+ TQString const receiver = "TestObject";
+ TQString const argument1 = "Some string";
int const argument2 = 12345;
- //set "Function"-content in QDocument
- domdocument.setContent(QString(
- "<function name=\"" + name + "\" text=\"" + text + "\" comment=\"" + comment + "\" receiver=\"" + receiver + "\" slot=\"myslot(const QString &amp; , int)\">"
+ //set "Function"-content in TQDocument
+ domdocument.setContent(TQString(
+ "<function name=\"" + name + "\" text=\"" + text + "\" comment=\"" + comment + "\" receiver=\"" + receiver + "\" slot=\"myslot(const TQString &amp; , int)\">"
"<argument>" + argument1 + "</argument>"
- "<argument>" + QString("%1").arg(argument2) + "</argument>"
+ "<argument>" + TQString("%1").tqarg(argument2) + "</argument>"
"</function>"
));
@@ -438,7 +438,7 @@ void CommonTests::testFunction()
//check domElement
KOMACROTEST_ASSERT( func->domElement(), domdocument.documentElement() );
//check name
- KOMACROTEST_ASSERT( QString(func->name()), name );
+ KOMACROTEST_ASSERT( TQString(func->name()), name );
//check text
KOMACROTEST_ASSERT( func->text(), text );
//check comment
@@ -446,7 +446,7 @@ void CommonTests::testFunction()
//check receiver
KOMACROTEST_ASSERT( func->receiver(), receiver );
//check slot (arguments)
- KOMACROTEST_ASSERT( QString(func->slot()), QString("myslot(const QString&,int)") );
+ KOMACROTEST_ASSERT( TQString(func->slot()), TQString("myslot(const TQString&,int)") );
//create KoMacro-MetaObject from receiverObject
KSharedPtr<KoMacro::MetaObject> receivermetaobject = func->receiverObject();
@@ -466,14 +466,14 @@ void CommonTests::testFunction()
for( it = funcvariables.constBegin(); it != end; ++it) {
kdDebug() << "VARIABLE => " << (*it ? (*it)->toString() : "<NULL>") << endl;
//hardcoded test:
- // firstrun we have a QString, secondrun we have an int
+ // firstrun we have a TQString, secondrun we have an int
switch(i) {
case 0: { // returnvalue
KOMACROTEST_ASSERT(*it, KSharedPtr<KoMacro::Variable>(NULL));
} break;
case 1: { // first parameter
//check first variable of func is the same as argument1
- //QString const argument1 = "Some string";
+ //TQString const argument1 = "Some string";
KOMACROTEST_ASSERT((*it)->toString(), argument1);
} break;
case 2: { // second parameter
@@ -497,10 +497,10 @@ void CommonTests::testFunction()
KSharedPtr<KoMacro::Variable> stringvar = funcvariables[1];
//check that it is not null
KOMACROTEST_XASSERT((int) stringvar.data(),0);
- //check via QVariant type that stringvar is from Type Variant
+ //check via TQVariant type that stringvar is from Type Variant
KOMACROTEST_ASSERT( stringvar->type(), KoMacro::MetaParameter::TypeVariant );
//check via metaparameter that variant is from type string
- KOMACROTEST_ASSERT( stringvar->variantType(), QVariant::String );
+ KOMACROTEST_ASSERT( stringvar->variantType(), TQVariant::String );
//chech that stringvar equals argument1
KOMACROTEST_ASSERT( stringvar->toString(), argument1 );
@@ -508,10 +508,10 @@ void CommonTests::testFunction()
KSharedPtr<KoMacro::Variable> intvar = funcvariables[2];
//check that it is not null
KOMACROTEST_XASSERT((int) intvar.data(), 0);
- //check via QVariant type that stringvar is from Type Variant
+ //check via TQVariant type that stringvar is from Type Variant
KOMACROTEST_ASSERT( intvar->type(), KoMacro::MetaParameter::TypeVariant );
//check that intvar is An String -> we create an string from int because of xml
- KOMACROTEST_ASSERT( intvar->variantType(), QVariant::String );
+ KOMACROTEST_ASSERT( intvar->variantType(), TQVariant::String );
//check that intvar equals argument2
KOMACROTEST_ASSERT( intvar->toInt(), argument2 );
@@ -522,7 +522,7 @@ void CommonTests::testFunction()
//check returnvalue
//func->setReturnValue(new KoMacro::Variable("54321"));
- //KOMACROTEST_ASSERT( func->returnValue()->toString(), QString("54321") );
+ //KOMACROTEST_ASSERT( func->returnValue()->toString(), TQString("54321") );
*/
}
@@ -532,12 +532,12 @@ void CommonTests::testIntFunction()
/*
kdDebug()<<"===================== testIntFunction() ======================" << endl;
- //create a QDomDocument
- QDomDocument domdocument = QDomDocument();
+ //create a TQDomDocument
+ TQDomDocument domdocument = TQDomDocument();
- //set "Function"-content in QDocument
- domdocument.setContent(QString(
- "<function name=\"myfunc\" text=\"My Function\" comment=\"comment\" receiver=\"TestObject\" slot=\"myslot(const QString &amp; , int)\">"
+ //set "Function"-content in TQDocument
+ domdocument.setContent(TQString(
+ "<function name=\"myfunc\" text=\"My Function\" comment=\"comment\" receiver=\"TestObject\" slot=\"myslot(const TQString &amp; , int)\">"
"<argument>Some string</argument>"
"<argument>12345</argument>"
"</function>"
@@ -552,7 +552,7 @@ void CommonTests::testIntFunction()
//execute the function
func->activate();
//Check returnvalue is same value we entered
- //KOMACROTEST_ASSERT(func->returnValue()->toString(),QString("12345"));
+ //KOMACROTEST_ASSERT(func->returnValue()->toString(),TQString("12345"));
*/
}
@@ -562,12 +562,12 @@ void CommonTests::testDoubleFunction()
/*
kdDebug()<<"===================== testDoubleFunction() ======================" << endl;
- //create a QDomDocument
- QDomDocument domdocument = QDomDocument();
+ //create a TQDomDocument
+ TQDomDocument domdocument = TQDomDocument();
- //set "Function"-content in QDocument
- domdocument.setContent(QString(
- "<function name=\"myfunc\" text=\"My Function\" comment=\"comment\" receiver=\"TestObject\" slot=\"myslot(const QString &amp; , double)\">"
+ //set "Function"-content in TQDocument
+ domdocument.setContent(TQString(
+ "<function name=\"myfunc\" text=\"My Function\" comment=\"comment\" receiver=\"TestObject\" slot=\"myslot(const TQString &amp; , double)\">"
"<argument>Some string</argument>"
"<argument>12.56</argument>"
"</function>"
@@ -582,22 +582,22 @@ void CommonTests::testDoubleFunction()
//execute the function
func->activate();
//Check returnvalue is same value we entered
- //KOMACROTEST_ASSERT(func->returnValue()->toString(),QString("12.56"));
+ //KOMACROTEST_ASSERT(func->returnValue()->toString(),TQString("12.56"));
*/
}
-void CommonTests::testQStringFunction()
+void CommonTests::testTQStringFunction()
{
//TODO: CLEANUP!!!!!!
/*
- kdDebug()<<"===================== testQStringFunction() ======================" << endl;
+ kdDebug()<<"===================== testTQStringFunction() ======================" << endl;
- //create a QDomDocument
- QDomDocument domdocument = QDomDocument();
+ //create a TQDomDocument
+ TQDomDocument domdocument = TQDomDocument();
- //set "Function"-content in QDocument
- domdocument.setContent(QString(
- "<function name=\"myfunc\" text=\"My Function\" comment=\"comment\" receiver=\"TestObject\" slot=\"myslot(const QString &amp;)\">"
+ //set "Function"-content in TQDocument
+ domdocument.setContent(TQString(
+ "<function name=\"myfunc\" text=\"My Function\" comment=\"comment\" receiver=\"TestObject\" slot=\"myslot(const TQString &amp;)\">"
"<argument>Some string</argument>"
"</function>"
));
@@ -610,7 +610,7 @@ void CommonTests::testQStringFunction()
KOMACROTEST_XASSERT((int) func, 0);
//execute the function func->activate();
//Check returnvalue is same value we entered
- //KOMACROTEST_ASSERT(func->returnValue()->toString(),QString("Some string"));
+ //KOMACROTEST_ASSERT(func->returnValue()->toString(),TQString("Some string"));
*/
}
@@ -619,20 +619,20 @@ void CommonTests::testMacro()
//TODO: CLEANUP!!!!!!
kdDebug()<<"===================== testMacro() ======================" << endl;
- QDomElement const domelement = d->doomdocument->documentElement();
+ TQDomElement const domelement = d->doomdocument->documentElement();
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
//Is our XML parseable ?
KOMACROTEST_ASSERT(macro->parseXML(domelement),true);
-// //create a QDomDocument
-// QDomDocument domdocument = QDomDocument();
+// //create a TQDomDocument
+// TQDomDocument domdocument = TQDomDocument();
//
// //Fully fleged content this time with macro,function and action
-// domdocument.setContent(QString(
+// domdocument.setContent(TQString(
// "<macro name=\"mymacro\" icon=\"myicon\" text=\"My Macro\" comment=\"Some comment to describe the Macro.\">"
// "<action name=\"myaction\" text=\"My Action\" comment=\"Just some comment\" />"
-// "<function name=\"myfunc\" text=\"My Function\" comment=\"Describe what the function does\" receiver=\"TestObject\" slot=\"myslot(const QString &amp;)\">"
+// "<function name=\"myfunc\" text=\"My Function\" comment=\"Describe what the function does\" receiver=\"TestObject\" slot=\"myslot(const TQString &amp;)\">"
// "<argument>The myfunc argument string</argument>"
// "</function>"
// "</macro>"
@@ -647,21 +647,21 @@ void CommonTests::testMacro()
//check that domeElement given to manager is the sam as in the macro
// KOMACROTEST_ASSERT( macro->toXML(), d->doomdocument->documentElement() );
//check the name
- KOMACROTEST_ASSERT( QString(macro->name()), QString("testMacro") );
+ KOMACROTEST_ASSERT( TQString(macro->name()), TQString("testMacro") );
/**
@deprecated values no longer exist
//check the text
- KOMACROTEST_ASSERT( macro->text(), QString("My Macro") );
+ KOMACROTEST_ASSERT( macro->text(), TQString("My Macro") );
//check iconname
- KOMACROTEST_ASSERT( QString(macro->icon()), QString("myicon") );
+ KOMACROTEST_ASSERT( TQString(macro->icon()), TQString("myicon") );
//check comment
- KOMACROTEST_ASSERT( macro->comment(), QString("Some comment to describe the Macro.") );
+ KOMACROTEST_ASSERT( macro->comment(), TQString("Some comment to describe the Macro.") );
*/
//create list of KsharedPtr from the childs of the macro
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items = macro->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = macro->items();
//check that there is one
KOMACROTEST_ASSERT( items.count(), sizetype(1) );
//fetch the first one
@@ -670,14 +670,14 @@ void CommonTests::testMacro()
//-> check that it is not null
KOMACROTEST_XASSERT(sizetype(actionptr.data()), sizetype(0));
//check that it has the right name
- KOMACROTEST_ASSERT( QString(actionptr->name()), QString("testaction") );
+ KOMACROTEST_ASSERT( TQString(actionptr->name()), TQString("testaction") );
//check that it has the right text
- KOMACROTEST_ASSERT( actionptr->text(), QString("Test") );
+ KOMACROTEST_ASSERT( actionptr->text(), TQString("Test") );
//check that it has the right comment
-// KOMACROTEST_ASSERT( actionptr->comment(), QString("") );
+// KOMACROTEST_ASSERT( actionptr->comment(), TQString("") );
/*
//fetch the second one
- KSharedPtr<KoMacro::Action> myfuncptr = children[1];
+ KSharedPtr<KoMacro::Action> myfuncptr = tqchildren[1];
//cast it to function
KoMacro::Function* myfunc = dynamic_cast<KoMacro::Function*>( myfuncptr.data() );
@@ -685,16 +685,16 @@ void CommonTests::testMacro()
KOMACROTEST_XASSERT((int) myfunc, 0);
//check it?s name
- KOMACROTEST_ASSERT( QString(myfunc->name()), QString("myfunc"));
+ KOMACROTEST_ASSERT( TQString(myfunc->name()), TQString("myfunc"));
//check it?s text
- KOMACROTEST_ASSERT( myfunc->text(), QString("My Function") );
+ KOMACROTEST_ASSERT( myfunc->text(), TQString("My Function") );
//check it?s comment
- KOMACROTEST_ASSERT( myfunc->comment(), QString("Describe what the function does") );
+ KOMACROTEST_ASSERT( myfunc->comment(), TQString("Describe what the function does") );
//check it?s receiver object
- KOMACROTEST_ASSERT( myfunc->receiver(), QString("TestObject") );
+ KOMACROTEST_ASSERT( myfunc->receiver(), TQString("TestObject") );
//check it?s slot
- KOMACROTEST_ASSERT( myfunc->slot(), QString("myslot(const QString&)") );
+ KOMACROTEST_ASSERT( myfunc->slot(), TQString("myslot(const TQString&)") );
//exceute it
myfunc->activate();
@@ -712,8 +712,8 @@ void CommonTests::testMacro()
//KOMACROTEST_XASSERT((int) yanActionptr2.data(), 0);
//KOMACROTEST_XASSERT((int) yanActionptr3.data(), 0);
- //create a list of the children from yanMacro
- //QValueList< KSharedPtr<KoMacro::Action> > yanChildren = yanMacro->children();
+ //create a list of the tqchildren from yanMacro
+ //TQValueList< KSharedPtr<KoMacro::Action> > yanChildren = yanMacro->tqchildren();
//check that there are two
//KOMACROTEST_ASSERT(yanChildren.count(), uint(2));
/*
@@ -722,9 +722,9 @@ void CommonTests::testMacro()
const int oldsize = yanChildren.count();
//add a new child to the macro
yanMacro->addChild(yanActionptr2);
- //get the children
- yanChildren = yanMacro->children();
- //get count of children
+ //get the tqchildren
+ yanChildren = yanMacro->tqchildren();
+ //get count of tqchildren
const int size = yanChildren.count();
//check count has changed
KOMACROTEST_XASSERT(size, oldsize);
@@ -735,9 +735,9 @@ void CommonTests::testMacro()
const int oldsize = yanChildren.count();
//add a new child to the macro
yanMacro->addChild(yanActionptr3);
- //get the children
- yanChildren = yanMacro->children();
- //get count of children
+ //get the tqchildren
+ yanChildren = yanMacro->tqchildren();
+ //get count of tqchildren
const int size = yanChildren.count();
//check count has changed
KOMACROTEST_XASSERT(size, oldsize);
@@ -752,18 +752,18 @@ void CommonTests::testDom() {
//TODO: CLEANUP!!!!!!
kdDebug()<<"===================== testDom() ======================" << endl;
/*
- //create a QDomDocument
- QDomDocument domdocument = QDomDocument();
+ //create a TQDomDocument
+ TQDomDocument domdocument = TQDomDocument();
//create data for various documents
- QString const comment = "Describe what the function does";
- QString const name = "myfunc";
- QString const text = "My Function";
- QString const receiver1 = "TestObject";
- QString const receiver2 = "GibtsNich";
+ TQString const comment = "Describe what the function does";
+ TQString const name = "myfunc";
+ TQString const text = "My Function";
+ TQString const receiver1 = "TestObject";
+ TQString const receiver2 = "GibtsNich";
//create wrong Argument tag
- domdocument.setContent(QString(
- "<function name=\"" + name + "\" text=\"" + text + "\" comment=\"" + comment + "\" receiver=\"" + receiver1 + "\" slot=\"myslot(const QString &amp; , int)\">"
+ domdocument.setContent(TQString(
+ "<function name=\"" + name + "\" text=\"" + text + "\" comment=\"" + comment + "\" receiver=\"" + receiver1 + "\" slot=\"myslot(const TQString &amp; , int)\">"
"<Arg0ment>Some string</Arg0ment>"
"<Arg0ment>12345</Arg0ment>"
"</function>"
@@ -774,8 +774,8 @@ void CommonTests::testDom() {
KOMACROTEST_ASSERTEXCEPTION(KoMacro::Exception&, macroptr->activate());
//create wrong receiver
- domdocument.setContent(QString(
- "<function name=\"" + name + "\" text=\"" + text + "\" comment=\"" + comment + "\" receiver=\"" + receiver2 + "\" slot=\"myslot(const QString &amp; , int)\">"
+ domdocument.setContent(TQString(
+ "<function name=\"" + name + "\" text=\"" + text + "\" comment=\"" + comment + "\" receiver=\"" + receiver2 + "\" slot=\"myslot(const TQString &amp; , int)\">"
"<argument>Some string</argument>"
"<argument>12345</argument>"
"</function>"
@@ -786,8 +786,8 @@ void CommonTests::testDom() {
KOMACROTEST_ASSERTEXCEPTION(KoMacro::Exception&, macroptr->activate());
//create "wrong" number of parameters
- domdocument.setContent(QString(
- "<function name=\"" + name + "\" text=\"" + text + "\" comment=\"" + comment + "\" receiver=\"" + receiver1 + "\" slot=\"myslot(const QString &amp; , int, double)\">"
+ domdocument.setContent(TQString(
+ "<function name=\"" + name + "\" text=\"" + text + "\" comment=\"" + comment + "\" receiver=\"" + receiver1 + "\" slot=\"myslot(const TQString &amp; , int, double)\">"
"<argument>Some string</argument>"
"<argument>12345</argument>"
"<argument>12345.25</argument>"
@@ -799,8 +799,8 @@ void CommonTests::testDom() {
KOMACROTEST_ASSERTEXCEPTION(KoMacro::Exception&, macroptr->activate());
//create wrong function tag
- domdocument.setContent(QString(
- "<NoFunction name=\"" + name + "\" text=\"" + text + "\" comment=\"" + comment + "\" receiver=\"" + receiver1 + "\" slot=\"myslot(const QString &amp; , int, double)\">"
+ domdocument.setContent(TQString(
+ "<NoFunction name=\"" + name + "\" text=\"" + text + "\" comment=\"" + comment + "\" receiver=\"" + receiver1 + "\" slot=\"myslot(const TQString &amp; , int, double)\">"
"<argument>Some string</argument>"
"<argument>12345</argument>"
"<argument>12345.25</argument>"
@@ -810,7 +810,7 @@ void CommonTests::testDom() {
KOMACROTEST_ASSERTEXCEPTION(KoMacro::Exception&, macroptr = ::KoMacro::Manager::self()->createAction( domdocument.documentElement() ));
//create empty function
- domdocument.setContent(QString(
+ domdocument.setContent(TQString(
"<function name=\"\" text=\"\" comment=\"\" receiver=\"\" slot=\"\">"
"<argument> </argument>"
"<argument> </argument>"
@@ -824,7 +824,7 @@ void CommonTests::testDom() {
//create empty function
- domdocument.setContent(QString(
+ domdocument.setContent(TQString(
"<function>"
"</function>"
));
@@ -840,12 +840,12 @@ void CommonTests::testVariables()
//TODO: CLEANUP!!!!!!
kdDebug()<<"===================== testVariables() ======================" << endl;
/*
- //create a QDomDocument
- QDomDocument domdocument = QDomDocument();
+ //create a TQDomDocument
+ TQDomDocument domdocument = TQDomDocument();
//create data
- domdocument.setContent(QString(
+ domdocument.setContent(TQString(
"<macro name=\"mymacro123\" text=\"My Macro 123\">"
- "<function name=\"func1\" text=\"Function1\" receiver=\"TestObject\" slot=\"myslot(const QString &amp;)\" >"
+ "<function name=\"func1\" text=\"Function1\" receiver=\"TestObject\" slot=\"myslot(const TQString &amp;)\" >"
"<argument>$MyArgumentVariable</argument>"
"<return>$MyReturnVariable</return>"
"</function>"
@@ -859,12 +859,12 @@ void CommonTests::testVariables()
//check that it is not null
KOMACROTEST_XASSERT((int) macro, 0);
- //create a list of its children
- QValueList< KSharedPtr<KoMacro::Action> > children = macro->children();
- //Check that there are two children. The first child is always the returnvalue.
- KOMACROTEST_ASSERT( children.count(), uint(2) );
- //fetch the children
- KSharedPtr<KoMacro::Action> func1ptr = children[1];
+ //create a list of its tqchildren
+ TQValueList< KSharedPtr<KoMacro::Action> > tqchildren = macro->tqchildren();
+ //Check that there are two tqchildren. The first child is always the returnvalue.
+ KOMACROTEST_ASSERT( tqchildren.count(), uint(2) );
+ //fetch the tqchildren
+ KSharedPtr<KoMacro::Action> func1ptr = tqchildren[1];
//create new context
KSharedPtr<KoMacro::Context> context = new KoMacro::Context(macroptr);
@@ -877,7 +877,7 @@ void CommonTests::testVariables()
}
{
- //set variable to be a QString
+ //set variable to be a TQString
context->setVariable("$MyArgumentVariable", new KoMacro::Variable("Some string"));
//execute function
func1ptr->activate(context);
@@ -886,7 +886,7 @@ void CommonTests::testVariables()
//check that it is not null
KOMACROTEST_XASSERT( (int) returnvariable.data(), 0);
//check that it is "Some String"
- KOMACROTEST_ASSERT(returnvariable->toString(),QString("Some string"));
+ KOMACROTEST_ASSERT(returnvariable->toString(),TQString("Some string"));
}
{
diff --git a/kexi/plugins/macros/tests/commontests.h b/kexi/plugins/macros/tests/commontests.h
index a3199ce2..0480c022 100644
--- a/kexi/plugins/macros/tests/commontests.h
+++ b/kexi/plugins/macros/tests/commontests.h
@@ -31,6 +31,7 @@ namespace KoMacroTest {
class CommonTests : public KUnitTest::SlotTester
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -88,9 +89,9 @@ namespace KoMacroTest {
void testDoubleFunction();
/**
- * Test the @a KoMacro::Function functionality with a QString.
+ * Test the @a KoMacro::Function functionality with a TQString.
*/
- void testQStringFunction();
+ void testTQStringFunction();
/**
* Test the @a KoMacro::Macro functionality.
diff --git a/kexi/plugins/macros/tests/komacrotestbase.h b/kexi/plugins/macros/tests/komacrotestbase.h
index d423e086..e301730d 100644
--- a/kexi/plugins/macros/tests/komacrotestbase.h
+++ b/kexi/plugins/macros/tests/komacrotestbase.h
@@ -27,11 +27,11 @@
*/
#define KOMACROTEST_ASSERT(actual, expected) \
{ \
- std::cout << QString("Testing: %1 == %2").arg(#actual).arg(#expected).latin1() << std::endl; \
+ std::cout << TQString("Testing: %1 == %2").tqarg(#actual).tqarg(#expected).latin1() << std::endl; \
check( __FILE__, __LINE__, #actual, actual, expected, false ); \
if(actual != expected) \
{ \
- kdWarning() << QString("==============> FAILED") << endl; \
+ kdWarning() << TQString("==============> FAILED") << endl; \
return; \
} \
}
@@ -44,11 +44,11 @@
*/
#define KOMACROTEST_XASSERT(actual, notexpected) \
{ \
- std::cout << QString("Testing: %1 != %2").arg(#actual).arg(#notexpected).latin1() << std::endl; \
+ std::cout << TQString("Testing: %1 != %2").tqarg(#actual).tqarg(#notexpected).latin1() << std::endl; \
check( __FILE__, __LINE__, #actual, actual, notexpected, true ); \
if(actual == notexpected) \
{ \
- kdWarning() << QString("==============> FAILED") << endl; \
+ kdWarning() << TQString("==============> FAILED") << endl; \
return; \
} \
}
@@ -70,11 +70,11 @@
setExceptionRaised(true); \
} \
if(exceptionRaised()) { \
- success(QString(__FILE__) + "[" + QString::number(__LINE__) + "]: passed " + #expression); \
+ success(TQString(__FILE__) + "[" + TQString::number(__LINE__) + "]: passed " + #expression); \
setExceptionRaised(false); \
} \
else { \
- failure(QString(__FILE__) + "[" + QString::number(__LINE__) + QString("]: failed to throw an exception on: ") + #expression); \
+ failure(TQString(__FILE__) + "[" + TQString::number(__LINE__) + TQString("]: failed to throw an exception on: ") + #expression); \
return; \
} \
}
@@ -84,7 +84,7 @@
//Used more tha once at various places
//names of variables from testaction
namespace KoMacroTest {
- static const QString TESTSTRING = "teststring";
- static const QString TESTINT = "testint";
- static const QString TESTBOOL = "testbool";
+ static const TQString TESTSTRING = "teststring";
+ static const TQString TESTINT = "testint";
+ static const TQString TESTBOOL = "testbool";
}
diff --git a/kexi/plugins/macros/tests/macroitemtests.cpp b/kexi/plugins/macros/tests/macroitemtests.cpp
index 366318e1..47b93b0f 100644
--- a/kexi/plugins/macros/tests/macroitemtests.cpp
+++ b/kexi/plugins/macros/tests/macroitemtests.cpp
@@ -32,8 +32,8 @@
#include <ostream>
-#include <qstringlist.h>
-#include <qdom.h>
+#include <tqstringlist.h>
+#include <tqdom.h>
#include <kdebug.h>
#include <kunittest/runner.h>
@@ -64,12 +64,12 @@ namespace KoMacroTest {
/**
* An @a TestObject instance used internaly to test
- * handling and communication with from QObject
+ * handling and communication with from TQObject
* inheritated instances.
*/
TestAction* testaction;
- QDomDocument* doomdocument;
+ TQDomDocument* doomdocument;
KSharedPtr<KoMacro::Macro> macro;
@@ -83,7 +83,7 @@ namespace KoMacroTest {
};
}
-typedef QValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype;
+typedef TQValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype;
MacroitemTests::MacroitemTests()
: KUnitTest::SlotTester()
@@ -108,9 +108,9 @@ void MacroitemTests::setUp()
d->testaction = new TestAction();
::KoMacro::Manager::self()->publishAction(d->testaction);
- d->doomdocument = new QDomDocument();
+ d->doomdocument = new TQDomDocument();
- QString const xml = QString("<!DOCTYPE macros>"
+ TQString const xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\" >"
"<item action=\"testaction\" >"
"</item>"
@@ -136,7 +136,7 @@ void MacroitemTests::testMacro()
kdDebug()<<"===================== testMacro() ======================" << endl;
//fetch Items and ..
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
//... check that there is one
KOMACROTEST_XASSERT( items.count(), sizetype(0) );
@@ -148,7 +148,7 @@ void MacroitemTests::testMacroItemString()
kdDebug()<<"===================== testMacroItemString() ======================" << endl;
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
KSharedPtr<KoMacro::Variable> variableptr = actionptr->variable(TESTSTRING);
@@ -167,7 +167,7 @@ void MacroitemTests::testMacroItemString()
macroitem->setVariable(TESTSTRING, "TeStString");
variableptr = macroitem->variable(TESTSTRING);
KOMACROTEST_XASSERT(sizetype(variableptr.data()), sizetype(0));
- KOMACROTEST_ASSERT(variableptr->variant().toString(),QString("TeStString"));
+ KOMACROTEST_ASSERT(variableptr->variant().toString(),TQString("TeStString"));
//secondway for appending an macroitem
@@ -185,7 +185,7 @@ void MacroitemTests::testMacroItemInt()
kdDebug()<<"===================== testMacroItemInt() ======================" << endl;
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
//create new macroitem for testing
@@ -204,7 +204,7 @@ void MacroitemTests::testMacroItemInt()
KOMACROTEST_XASSERT(sizetype(variableptr.data()), sizetype(0));
KOMACROTEST_ASSERT(sizetype(variableptr->variant().toInt()),sizetype(-1));
- macroitem->setVariable(TESTINT,QVariant(0));
+ macroitem->setVariable(TESTINT,TQVariant(0));
variableptr = macroitem->variable(TESTINT);
KOMACROTEST_XASSERT(sizetype(variableptr.data()), sizetype(0));
KOMACROTEST_ASSERT(sizetype(variableptr->variant().toInt()),sizetype(0));
@@ -226,7 +226,7 @@ void MacroitemTests::testMacroItemBool()
kdDebug()<<"===================== testMacroItemBool() ======================" << endl;
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
//create new macroitem for testing
diff --git a/kexi/plugins/macros/tests/macroitemtests.h b/kexi/plugins/macros/tests/macroitemtests.h
index 3e44eebd..7ec3625c 100644
--- a/kexi/plugins/macros/tests/macroitemtests.h
+++ b/kexi/plugins/macros/tests/macroitemtests.h
@@ -31,6 +31,7 @@ namespace KoMacroTest {
class MacroitemTests : public KUnitTest::SlotTester
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
diff --git a/kexi/plugins/macros/tests/macrotests.cpp b/kexi/plugins/macros/tests/macrotests.cpp
index ed222df2..45f77efd 100644
--- a/kexi/plugins/macros/tests/macrotests.cpp
+++ b/kexi/plugins/macros/tests/macrotests.cpp
@@ -34,8 +34,8 @@
#include <ostream>
-#include <qstringlist.h>
-#include <qdom.h>
+#include <tqstringlist.h>
+#include <tqdom.h>
#include <kdebug.h>
#include <kunittest/runner.h>
@@ -64,14 +64,14 @@ namespace KoMacroTest {
/**
* An @a TestObject instance used internaly to test
- * handling and communication with from QObject
+ * handling and communication with from TQObject
* inheritated instances.
*/
TestObject* testobject;
TestAction* testaction;
- QDomDocument* doomdocument;
+ TQDomDocument* doomdocument;
Private()
: xmlguiclient(0)
@@ -83,7 +83,7 @@ namespace KoMacroTest {
};
}
-typedef QValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype;
+typedef TQValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype;
MacroTests::MacroTests()
@@ -112,9 +112,9 @@ void MacroTests::setUp()
d->testaction = new TestAction();
::KoMacro::Manager::self()->publishAction(d->testaction);
- d->doomdocument = new QDomDocument();
+ d->doomdocument = new TQDomDocument();
- QString const xml = QString("<!DOCTYPE macros>"
+ TQString const xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\" >"
"<item action=\"testaction\" >"
"</item>"
@@ -134,7 +134,7 @@ void MacroTests::testMacro()
{
kdDebug()<<"===================== testMacro() ======================" << endl;
- QDomElement const domelement = d->doomdocument->documentElement();
+ TQDomElement const domelement = d->doomdocument->documentElement();
KSharedPtr<KoMacro::Macro> macro1 = KoMacro::Manager::self()->createMacro("testMacro");
KSharedPtr<KoMacro::Macro> macro2 = KoMacro::Manager::self()->createMacro("testMacro");
@@ -150,8 +150,8 @@ void MacroTests::testMacro()
KOMACROTEST_ASSERT(macro1->name(), macro2->name() );
//create list of KsharedPtr from the childs of the macro
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items1 = macro1->items();
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items2 = macro2->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items1 = macro1->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items2 = macro2->items();
//check that there is one
KOMACROTEST_XASSERT( items1.count(), sizetype(0) );
@@ -161,16 +161,16 @@ void MacroTests::testMacro()
KOMACROTEST_ASSERT( items1.count(), items2.count() );
//check the name
- KOMACROTEST_ASSERT( QString(macro1->name()), QString("testMacro") );
+ KOMACROTEST_ASSERT( TQString(macro1->name()), TQString("testMacro") );
{
- const QString tmp1 = QString("test");
+ const TQString tmp1 = TQString("test");
macro1->setName(tmp1);
//check the name changed
- KOMACROTEST_XASSERT( QString(macro1->name()), QString("testMacro") );
+ KOMACROTEST_XASSERT( TQString(macro1->name()), TQString("testMacro") );
//check the name
- KOMACROTEST_ASSERT( QString(macro1->name()), QString("test") );
+ KOMACROTEST_ASSERT( TQString(macro1->name()), TQString("test") );
}
//fetch the first one
@@ -178,9 +178,9 @@ void MacroTests::testMacro()
//check that it is not null
KOMACROTEST_XASSERT(sizetype(actionptr.data()), sizetype(0));
//check that it has the right name
- KOMACROTEST_ASSERT( QString(actionptr->name()), QString("testaction") );
+ KOMACROTEST_ASSERT( TQString(actionptr->name()), TQString("testaction") );
//check that it has the right text
- KOMACROTEST_ASSERT( actionptr->text(), QString("Test") );
+ KOMACROTEST_ASSERT( actionptr->text(), TQString("Test") );
//try to clear items
macro1->clearItems();
diff --git a/kexi/plugins/macros/tests/macrotests.h b/kexi/plugins/macros/tests/macrotests.h
index ed8d0f21..4a7c2043 100644
--- a/kexi/plugins/macros/tests/macrotests.h
+++ b/kexi/plugins/macros/tests/macrotests.h
@@ -31,6 +31,7 @@ namespace KoMacroTest {
class MacroTests : public KUnitTest::SlotTester
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
diff --git a/kexi/plugins/macros/tests/testaction.cpp b/kexi/plugins/macros/tests/testaction.cpp
index 4063aa1b..845acd5f 100644
--- a/kexi/plugins/macros/tests/testaction.cpp
+++ b/kexi/plugins/macros/tests/testaction.cpp
@@ -33,17 +33,17 @@ using namespace KoMacroTest;
TestAction::TestAction()
: KoMacro::Action("testaction", "Test")
{
- setVariable("teststring", "Stringtest", QString("testString"));
+ setVariable("teststring", "Stringtest", TQString("testString"));
setVariable("testint", "Inttest", int(0));
setVariable("testdouble", "Doubletest", double(0.5));
- setVariable("testbool", "Booltest", QVariant(true,0));
+ setVariable("testbool", "Booltest", TQVariant(true,0));
}
TestAction::~TestAction()
{
}
-bool TestAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name)
+bool TestAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name)
{
Q_UNUSED(macroitem);
Q_UNUSED(name);
@@ -53,7 +53,7 @@ bool TestAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const Q
void TestAction::activate(KSharedPtr<KoMacro::Context> context)
{
kdDebug() << "TestAction::activate(KSharedPtr<Context>)" << endl;
- const QString teststring = context->variable("teststring")->variant().toString();
+ const TQString teststring = context->variable("teststring")->variant().toString();
const int testint = context->variable("testint")->variant().toInt();
const bool testbool = context->variable("testbool")->variant().toBool();
}
diff --git a/kexi/plugins/macros/tests/testaction.h b/kexi/plugins/macros/tests/testaction.h
index 9eebff3c..9c045e3d 100644
--- a/kexi/plugins/macros/tests/testaction.h
+++ b/kexi/plugins/macros/tests/testaction.h
@@ -39,6 +39,7 @@ namespace KoMacroTest {
class TestAction : public KoMacro::Action
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -62,7 +63,7 @@ namespace KoMacroTest {
* @return true if the update was successfully else false
* is returned.
*/
- virtual bool notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name);
+ virtual bool notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name);
public slots:
diff --git a/kexi/plugins/macros/tests/testobject.cpp b/kexi/plugins/macros/tests/testobject.cpp
index 39cadb7a..e0db481e 100644
--- a/kexi/plugins/macros/tests/testobject.cpp
+++ b/kexi/plugins/macros/tests/testobject.cpp
@@ -25,8 +25,8 @@
//#include "../lib/macro.h"
//#include "../lib/metaobject.h"
-//#include <qstringlist.h>
-//#include <qdom.h>
+//#include <tqstringlist.h>
+//#include <tqdom.h>
#include <kdebug.h>
//#include <kxmlguiclient.h>
@@ -57,7 +57,7 @@ namespace KoMacroTest {
}
TestObject::TestObject(KUnitTest::Tester* const tester)
- : QObject()
+ : TQObject()
, d( new Private(tester) ) // create the private d-pointer instance.
{
setName("TestObject");
@@ -71,18 +71,18 @@ TestObject::~TestObject()
//testObject without arguments
void TestObject::myslot()
{
- QString s = "CALLED => TestObject::myslot()";
+ TQString s = "CALLED => TestObject::myslot()";
//be loud
kdDebug() << s << endl;
//add some extra Debuginfos to TestResults see tester.h
d->tester->results()->addDebugInfo(s);
}
-//testobject with QString and int argument
+//testobject with TQString and int argument
//int is returnvalue
-int TestObject::myslot(const QString&, int i)
+int TestObject::myslot(const TQString&, int i)
{
- QString s = "CALLED => TestObject::myslot(const QString&, int)";
+ TQString s = "CALLED => TestObject::myslot(const TQString&, int)";
//be loud
kdDebug() << s << endl;
//add some extra debuginfos to TestResults
@@ -90,11 +90,11 @@ int TestObject::myslot(const QString&, int i)
return i;
}
-//testobject with QString argument
-//QString is returnvalue
-QString TestObject::myslot(const QString& s)
+//testobject with TQString argument
+//TQString is returnvalue
+TQString TestObject::myslot(const TQString& s)
{
- QString t = QString("CALLED => TestObject::myslot(const QString& s) s=%1").arg(s);
+ TQString t = TQString("CALLED => TestObject::myslot(const TQString& s) s=%1").tqarg(s);
//be loud
kdDebug() << t << endl;
//add some extra Debuginfos to TestResults
@@ -102,11 +102,11 @@ QString TestObject::myslot(const QString& s)
return s;
}
-//testobject with QString and double argument
+//testobject with TQString and double argument
//double is returnvalue
-double TestObject::myslot(const QString&, double d)
+double TestObject::myslot(const TQString&, double d)
{
- QString s = "CALLED => TestObject::myslot(const QString&, double)";
+ TQString s = "CALLED => TestObject::myslot(const TQString&, double)";
//be loud
kdDebug() << s << endl;
//add some extra Debuginfos to TestResults
diff --git a/kexi/plugins/macros/tests/testobject.h b/kexi/plugins/macros/tests/testobject.h
index da5e8ae2..87bed837 100644
--- a/kexi/plugins/macros/tests/testobject.h
+++ b/kexi/plugins/macros/tests/testobject.h
@@ -20,18 +20,19 @@
#ifndef KOMACROTEST_TESTOBJECT_H
#define KOMACROTEST_TESTOBJECT_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kunittest/tester.h>
namespace KoMacroTest {
/**
* The TestObject class is used to test handling and communication
- * of external from QObject inheritated classes.
+ * of external from TQObject inheritated classes.
*/
- class TestObject : public QObject
+ class TestObject : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -59,20 +60,20 @@ namespace KoMacroTest {
* This slot got published to the KoMacro-framework
* and will be called to test the functionality.
*/
- int myslot(const QString&, int);
+ int myslot(const TQString&, int);
/**
* This slot got published to the KoMacro-framework
* and will be called to test the functionality.
*/
- QString myslot(const QString&);
+ TQString myslot(const TQString&);
/**
* This slot got published to the KoMacro-framework
* and will be called to test the functionality.
* @return is @param d
*/
- double myslot(const QString&, double d);
+ double myslot(const TQString&, double d);
private:
/// @internal d-pointer class.
diff --git a/kexi/plugins/macros/tests/variabletests.cpp b/kexi/plugins/macros/tests/variabletests.cpp
index 8bc8d9c7..5035f929 100644
--- a/kexi/plugins/macros/tests/variabletests.cpp
+++ b/kexi/plugins/macros/tests/variabletests.cpp
@@ -34,8 +34,8 @@
#include <ostream>
-#include <qstringlist.h>
-#include <qdom.h>
+#include <tqstringlist.h>
+#include <tqdom.h>
#include <kdebug.h>
#include <kunittest/runner.h>
@@ -66,12 +66,12 @@ namespace KoMacroTest {
/**
* An @a TestObject instance used internaly to test
- * handling and communication with from QObject
+ * handling and communication with from TQObject
* inheritated instances.
*/
TestAction* testaction;
- QDomDocument* doomdocument;
+ TQDomDocument* doomdocument;
KSharedPtr<KoMacro::Macro> macro;
@@ -85,7 +85,7 @@ namespace KoMacroTest {
};
}
-typedef QValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype;
+typedef TQValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype;
/******************************************************************************
* This is an xtra big TODO:
@@ -117,9 +117,9 @@ void VariableTests::setUp()
d->testaction = new TestAction();
::KoMacro::Manager::self()->publishAction(d->testaction);
- d->doomdocument = new QDomDocument();
+ d->doomdocument = new TQDomDocument();
- QString const xml = QString("<!DOCTYPE macros>"
+ TQString const xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\" >"
"<item action=\"testaction\" >"
"</item>"
@@ -144,7 +144,7 @@ void VariableTests::testMacro()
kdDebug()<<"===================== testMacro() ======================" << endl;
//fetch Items and ..
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
//... check that there is one
KOMACROTEST_XASSERT( items.count(), sizetype(0) );
@@ -152,7 +152,7 @@ void VariableTests::testMacro()
void VariableTests::testVariableString() {
kdDebug()<<"===================== testVariableString() ======================" << endl;
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
//fetch the "teststring"-variable
@@ -173,19 +173,19 @@ void VariableTests::testVariableString() {
//check that it is not null
KOMACROTEST_XASSERT(sizetype(variableptr.data()), sizetype(0));
//check that it is "testString"
- KOMACROTEST_ASSERT(variableptr->variant().toString(),QString("testString"));
+ KOMACROTEST_ASSERT(variableptr->variant().toString(),TQString("testString"));
actionptr->setVariable("teststring", "STRINGTEST", "TestString");
variableptr = actionptr->variable("teststring");
//check that it is not null
KOMACROTEST_XASSERT(sizetype(variableptr.data()), sizetype(0));
//check that it is " "
- KOMACROTEST_ASSERT(variableptr->variant().toString(),QString("TestString"));
+ KOMACROTEST_ASSERT(variableptr->variant().toString(),TQString("TestString"));
}
void VariableTests::testVariableInt() {
kdDebug()<<"===================== testVariableInt() ======================" << endl;
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
//fetch the "testint"-variable
@@ -218,7 +218,7 @@ void VariableTests::testVariableInt() {
void VariableTests::testVariableBool() {
kdDebug()<<"===================== testVariableBool() ======================" << endl;
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
//fetch the "testbool"-variable
diff --git a/kexi/plugins/macros/tests/variabletests.h b/kexi/plugins/macros/tests/variabletests.h
index 5bc7f144..a3cd7f60 100644
--- a/kexi/plugins/macros/tests/variabletests.h
+++ b/kexi/plugins/macros/tests/variabletests.h
@@ -31,6 +31,7 @@ namespace KoMacroTest {
class VariableTests : public KUnitTest::SlotTester
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
diff --git a/kexi/plugins/macros/tests/xmlhandlertests.cpp b/kexi/plugins/macros/tests/xmlhandlertests.cpp
index 9a0ebcb1..a08ff33d 100644
--- a/kexi/plugins/macros/tests/xmlhandlertests.cpp
+++ b/kexi/plugins/macros/tests/xmlhandlertests.cpp
@@ -29,7 +29,7 @@
#include <ostream>
#include <cfloat>
-#include <qdom.h>
+#include <tqdom.h>
#include <kdebug.h>
#include <kunittest/runner.h>
@@ -58,7 +58,7 @@ namespace KoMacroTest {
/**
* An @a TestObject instance used internaly to test
- * handling and communication with from QObject
+ * handling and communication with from TQObject
* inheritated instances.
*/
KSharedPtr<KoMacro::Action> testaction;
@@ -144,11 +144,11 @@ void XMLHandlerTests::testCorrectDomElement()
{
// Local Init
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -159,12 +159,12 @@ void XMLHandlerTests::testCorrectDomElement()
"</macro>");
// Set the XML-document with the above string.
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Is our XML parseable by calling parseXML()?
KOMACROTEST_ASSERT(macro->parseXML(elem),true);
// Is the parsen content in the Macro correct ?
- QMap<QString,bool> isvariableok;
+ TQMap<TQString,bool> isvariableok;
isvariableok["teststring"] = true;
isvariableok["testint"] = true;
isvariableok["testbool"] = true;
@@ -172,12 +172,12 @@ void XMLHandlerTests::testCorrectDomElement()
assertMacroContentEqToXML(macro,elem,false,true,isvariableok);
// Transform back by calling toXML().
- const QDomElement elem2 = macro->toXML();
+ const TQDomElement elem2 = macro->toXML();
assertMacroContentEqToXML(macro,elem2,false,true,isvariableok);
// Test the Compare-method when a Variable will change, it must fail.
macro->items().first()->variable("teststring")->setVariant("bla");
- isvariableok.replace("teststring",false);
+ isvariableok.tqreplace("teststring",false);
assertMacroContentEqToXML(macro,elem,false,true,isvariableok);
}
@@ -185,9 +185,9 @@ void XMLHandlerTests::testCorrectDomElement()
void XMLHandlerTests::testBadRoot()
{
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<maro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -197,23 +197,23 @@ void XMLHandlerTests::testBadRoot()
"</item>"
"</maro>");
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_XASSERT(macro->parseXML(elem),true);
//no assertMacroContentEqToXML(), because parsing failed.
- assertMacroContentEqToXML(macro,elem,true,false,QMap<QString,bool>());
+ assertMacroContentEqToXML(macro,elem,true,false,TQMap<TQString,bool>());
- const QDomElement elem2 = macro->toXML();
- assertMacroContentEqToXML(macro,elem2,true,false,QMap<QString,bool>());
+ const TQDomElement elem2 = macro->toXML();
+ assertMacroContentEqToXML(macro,elem2,true,false,TQMap<TQString,bool>());
}
// 3.Test - XML-document with a missing Variable.
void XMLHandlerTests::testMissingVariable()
{
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -222,16 +222,16 @@ void XMLHandlerTests::testMissingVariable()
"</item>"
"</macro>");
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_ASSERT(macro->parseXML(elem),true);
- QMap<QString,bool> isvariableok;
+ TQMap<TQString,bool> isvariableok;
isvariableok["teststring"] = true;
isvariableok["testint"] = true;
isvariableok["testdouble"] = true;
assertMacroContentEqToXML(macro,elem,false,true,isvariableok);
- const QDomElement elem2 = macro->toXML();
+ const TQDomElement elem2 = macro->toXML();
assertMacroContentEqToXML(macro,elem2,false,true,isvariableok);
}
@@ -239,9 +239,9 @@ void XMLHandlerTests::testMissingVariable()
void XMLHandlerTests::testMoreVariables()
{
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -252,10 +252,10 @@ void XMLHandlerTests::testMoreVariables()
"</item>"
"</macro>");
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_ASSERT(macro->parseXML(elem),true);
- QMap<QString,bool> isvariableok;
+ TQMap<TQString,bool> isvariableok;
isvariableok["teststring"] = true;
isvariableok["testint"] = true;
isvariableok["testbool"] = true;
@@ -263,7 +263,7 @@ void XMLHandlerTests::testMoreVariables()
isvariableok["testbla"] = true;
assertMacroContentEqToXML(macro,elem,false,true,isvariableok);
- const QDomElement elem2 = macro->toXML();
+ const TQDomElement elem2 = macro->toXML();
assertMacroContentEqToXML(macro,elem2,false,true,isvariableok);
}
@@ -271,9 +271,9 @@ void XMLHandlerTests::testMoreVariables()
void XMLHandlerTests::testWrongVersion()
{
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"2\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -283,14 +283,14 @@ void XMLHandlerTests::testWrongVersion()
"</item>"
"</macro>");
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_XASSERT(macro->parseXML(elem),true);
//no assertMacroContentEqToXML(), because parsing failed.
- assertMacroContentEqToXML(macro,elem,true,false,QMap<QString,bool>());
+ assertMacroContentEqToXML(macro,elem,true,false,TQMap<TQString,bool>());
- const QDomElement elem2 = macro->toXML();
- assertMacroContentEqToXML(macro,elem2,true,false,QMap<QString,bool>());
+ const TQDomElement elem2 = macro->toXML();
+ assertMacroContentEqToXML(macro,elem2,true,false,TQMap<TQString,bool>());
}
// 6.Test - XML-document if it has a wrong structure like wrong parathesis
@@ -298,9 +298,9 @@ void XMLHandlerTests::testWrongVersion()
void XMLHandlerTests::testWrongXMLStruct()
{
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"macro xmlversion=\"1\">>"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -308,23 +308,23 @@ void XMLHandlerTests::testWrongXMLStruct()
"</item>"
"</macro>");
KOMACROTEST_XASSERT(doomdocument.setContent(xml),true);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_XASSERT(macro->parseXML(elem),true);
//no assertMacroContentEqToXML(), because parsing failed.
- assertMacroContentEqToXML(macro,elem,true,false,QMap<QString,bool>());
+ assertMacroContentEqToXML(macro,elem,true,false,TQMap<TQString,bool>());
- const QDomElement elem2 = macro->toXML();
- assertMacroContentEqToXML(macro,elem2,true,false,QMap<QString,bool>());
+ const TQDomElement elem2 = macro->toXML();
+ assertMacroContentEqToXML(macro,elem2,true,false,TQMap<TQString,bool>());
}
// 7.Test-XML-document with maximum field-size.
void XMLHandlerTests::testMaxNum()
{
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -332,19 +332,19 @@ void XMLHandlerTests::testMaxNum()
"<variable name=\"testbool\" >true</variable>"
"<variable name=\"testdouble\" > %2 </variable>"
"</item>"
- "</macro>").arg(INT_MAX).arg(DBL_MAX);
+ "</macro>").tqarg(INT_MAX).tqarg(DBL_MAX);
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_ASSERT(macro->parseXML(elem),true);
- QMap<QString,bool> isvariableok;
+ TQMap<TQString,bool> isvariableok;
isvariableok["teststring"] = true;
isvariableok["testint"] = true;
isvariableok["testbool"] = true;
isvariableok["testdouble"] = true;
assertMacroContentEqToXML(macro,elem,false,true,isvariableok);
- QDomElement elem2 = macro->toXML();
+ TQDomElement elem2 = macro->toXML();
assertMacroContentEqToXML(macro,elem2,false,true,isvariableok);
}
@@ -352,9 +352,9 @@ void XMLHandlerTests::testMaxNum()
void XMLHandlerTests::testMaxNum2()
{
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -362,19 +362,19 @@ void XMLHandlerTests::testMaxNum2()
"<variable name=\"testbool\" >true</variable>"
"<variable name=\"testdouble\" > %2 </variable>"
"</item>"
- "</macro>").arg(INT_MAX+1).arg(DBL_MAX+1);
+ "</macro>").tqarg(INT_MAX+1).tqarg(DBL_MAX+1);
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_ASSERT(macro->parseXML(elem),true);
- QMap<QString,bool> isvariableok;
+ TQMap<TQString,bool> isvariableok;
isvariableok["teststring"] = true;
isvariableok["testint"] = true;
isvariableok["testbool"] = true;
isvariableok["testdouble"] = true;
assertMacroContentEqToXML(macro,elem,false,true,isvariableok);
- const QDomElement elem2 = macro->toXML();
+ const TQDomElement elem2 = macro->toXML();
assertMacroContentEqToXML(macro,elem2,false,true,isvariableok);
}
@@ -382,9 +382,9 @@ void XMLHandlerTests::testMaxNum2()
void XMLHandlerTests::testMinNum()
{
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -392,19 +392,19 @@ void XMLHandlerTests::testMinNum()
"<variable name=\"testbool\" >true</variable>"
"<variable name=\"testdouble\" > %2 </variable>"
"</item>"
- "</macro>").arg(INT_MIN).arg(DBL_MIN);
+ "</macro>").tqarg(INT_MIN).tqarg(DBL_MIN);
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_ASSERT(macro->parseXML(elem),true);
- QMap<QString,bool> isvariableok;
+ TQMap<TQString,bool> isvariableok;
isvariableok["teststring"] = true;
isvariableok["testint"] = true;
isvariableok["testbool"] = true;
isvariableok["testdouble"] = true;
assertMacroContentEqToXML(macro,elem,false,true,isvariableok);
- const QDomElement elem2 = macro->toXML();
+ const TQDomElement elem2 = macro->toXML();
assertMacroContentEqToXML(macro,elem2,false,true,isvariableok);
}
@@ -412,9 +412,9 @@ void XMLHandlerTests::testMinNum()
void XMLHandlerTests::testMinNum2()
{
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -422,19 +422,19 @@ void XMLHandlerTests::testMinNum2()
"<variable name=\"testbool\" >true</variable>"
"<variable name=\"testdouble\" > %2 </variable>"
"</item>"
- "</macro>").arg(INT_MIN-1).arg(DBL_MIN-1);
+ "</macro>").tqarg(INT_MIN-1).tqarg(DBL_MIN-1);
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_ASSERT(macro->parseXML(elem),true);
- QMap<QString,bool> isvariableok;
+ TQMap<TQString,bool> isvariableok;
isvariableok["teststring"] = true;
isvariableok["testint"] = true;
isvariableok["testbool"] = true;
isvariableok["testdouble"] = true;
assertMacroContentEqToXML(macro,elem,false,true,isvariableok);
- const QDomElement elem2 = macro->toXML();
+ const TQDomElement elem2 = macro->toXML();
assertMacroContentEqToXML(macro,elem2,false,true,isvariableok);
}
@@ -442,9 +442,9 @@ void XMLHandlerTests::testMinNum2()
void XMLHandlerTests::testBigNumber()
{
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -452,19 +452,19 @@ void XMLHandlerTests::testBigNumber()
"<variable name=\"testbool\" >true</variable>"
"<variable name=\"testdouble\" > %1 </variable>"
"</item>"
- "</macro>").arg(DBL_MAX+1);
+ "</macro>").tqarg(DBL_MAX+1);
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_ASSERT(macro->parseXML(elem),true);
- QMap<QString,bool> isvariableok;
+ TQMap<TQString,bool> isvariableok;
isvariableok["teststring"] = true;
isvariableok["testint"] = true;
isvariableok["testbool"] = true;
isvariableok["testdouble"] = true;
assertMacroContentEqToXML(macro,elem,false,true,isvariableok);
- const QDomElement elem2 = macro->toXML();
+ const TQDomElement elem2 = macro->toXML();
assertMacroContentEqToXML(macro,elem2,false,true,isvariableok);
}
@@ -472,9 +472,9 @@ void XMLHandlerTests::testBigNumber()
void XMLHandlerTests::testTwoMacroItems()
{
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -492,17 +492,17 @@ void XMLHandlerTests::testTwoMacroItems()
"</item>"
"</macro>");
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_ASSERT(macro->parseXML(elem),true);
- QMap<QString,bool> isvariableok;
+ TQMap<TQString,bool> isvariableok;
isvariableok["teststring"] = true;
isvariableok["testint"] = true;
isvariableok["testbool"] = true;
isvariableok["testdouble"] = true;
assertMacroContentEqToXML(macro,elem,false,true,isvariableok);
- const QDomElement elem2 = macro->toXML();
+ const TQDomElement elem2 = macro->toXML();
assertMacroContentEqToXML(macro,elem2,false,true,isvariableok);
}
/***************************************************************************
@@ -512,20 +512,20 @@ void XMLHandlerTests::testTwoMacroItems()
/**
* Compares a XML-Element with a Macro. Call sub-asserts.
* @p macro The parsen @a Macro.
-* @p elem The given @a QDomElement which is parsen.
+* @p elem The given @a TQDomElement which is parsen.
* @p isitemsempty Bool for expectation of an empty @a MacroItem -List.
* @p isactionset Bool for expectation that the @a Action -names are equal.
-* @p isvariableok QMap of Bools for comparing each @a Variable .
+* @p isvariableok TQMap of Bools for comparing each @a Variable .
*/
void XMLHandlerTests::assertMacroContentEqToXML(const KSharedPtr<KoMacro::Macro> macro,
- const QDomElement& elem,
+ const TQDomElement& elem,
const bool isitemsempty,
const bool isactionset,
- const QMap<QString, bool> isvariableok)
+ const TQMap<TQString, bool> isvariableok)
{
// Make an Iterator over the MacroItems of the Macro.
- const QValueList<KSharedPtr<KoMacro::MacroItem > > macroitems = macro->items();
- QValueList<KSharedPtr<KoMacro::MacroItem > >::ConstIterator
+ const TQValueList<KSharedPtr<KoMacro::MacroItem > > macroitems = macro->items();
+ TQValueList<KSharedPtr<KoMacro::MacroItem > >::ConstIterator
mit(macroitems.constBegin()), end(macroitems.constEnd());
//1.comparison - Is the MacroItem-list empty?
@@ -541,12 +541,12 @@ void XMLHandlerTests::assertMacroContentEqToXML(const KSharedPtr<KoMacro::Macro>
}
// Got to the first item-elements of the elem (there is only one in the tests).
- QDomNode itemnode = elem.firstChild();
+ TQDomNode itemnode = elem.firstChild();
// Iterate over the MacroItems and item-elements.
while(mit != end && ! itemnode.isNull()) {
const KSharedPtr<KoMacro::MacroItem> macroitem = *mit;
- const QDomElement itemelem = itemnode.toElement();
+ const TQDomElement itemelem = itemnode.toElement();
//2.comparison - Is the Action-name equal?
{
@@ -563,25 +563,25 @@ void XMLHandlerTests::assertMacroContentEqToXML(const KSharedPtr<KoMacro::Macro>
}
// Go down to MacroItem->Variable and item->variable and compare them.
- QMap<QString, KSharedPtr<KoMacro::Variable > > mvariables = macroitem->variables();
- QDomNode varnode = itemelem.firstChild();
+ TQMap<TQString, KSharedPtr<KoMacro::Variable > > mvariables = macroitem->variables();
+ TQDomNode varnode = itemelem.firstChild();
while ( ! varnode.isNull()) {
- const QDomElement varelem = varnode.toElement();
- const KSharedPtr<KoMacro::Variable> varitem = mvariables.find(varelem.attribute("name")).data();
+ const TQDomElement varelem = varnode.toElement();
+ const KSharedPtr<KoMacro::Variable> varitem = mvariables.tqfind(varelem.attribute("name")).data();
//3.comparison - Is the content of the Variable
// in the MacroItem and and item equal?
{
- const bool var = *isvariableok.find(varelem.attribute("name"));
+ const bool var = *isvariableok.tqfind(varelem.attribute("name"));
if( ! var ) {
- KOMACROTEST_XASSERT(varitem->variant() == QVariant(varelem.text()), !var);
+ KOMACROTEST_XASSERT(varitem->variant() == TQVariant(varelem.text()), !var);
kdDebug() << "The content of the Variable: " << varitem->name()
<< " is not equal." << varitem->variant()
<< "!=" << varelem.text() << endl;
}
else {
- KOMACROTEST_ASSERT(varitem->variant() == QVariant(varelem.text()), var);
+ KOMACROTEST_ASSERT(varitem->variant() == TQVariant(varelem.text()), var);
}
}
@@ -604,11 +604,11 @@ void XMLHandlerTests::assertMacroContentEqToXML(const KSharedPtr<KoMacro::Macro>
}
}
-// Prints a QMap of Variables to kdDebug().
-void XMLHandlerTests::printMvariables(const QMap<QString, KSharedPtr<KoMacro::Variable > > mvariables, const QString s)
+// Prints a TQMap of Variables to kdDebug().
+void XMLHandlerTests::printMvariables(const TQMap<TQString, KSharedPtr<KoMacro::Variable > > mvariables, const TQString s)
{
- //QValueList<QString>::ConstIterator kit (keys.constBegin()), end(keys.constEnd());
- QMap<QString, KSharedPtr<KoMacro::Variable > >::ConstIterator mvit (mvariables.constBegin()), end(mvariables.constEnd());
+ //TQValueList<TQString>::ConstIterator kit (keys.constBegin()), end(keys.constEnd());
+ TQMap<TQString, KSharedPtr<KoMacro::Variable > >::ConstIterator mvit (mvariables.constBegin()), end(mvariables.constEnd());
while(mvit != end){
const KoMacro::Variable * v = *mvit;
kdDebug() << s << ": " << v->name() << endl;
diff --git a/kexi/plugins/macros/tests/xmlhandlertests.h b/kexi/plugins/macros/tests/xmlhandlertests.h
index c78a8c79..3e67742f 100644
--- a/kexi/plugins/macros/tests/xmlhandlertests.h
+++ b/kexi/plugins/macros/tests/xmlhandlertests.h
@@ -31,6 +31,7 @@ namespace KoMacroTest {
class XMLHandlerTests : public KUnitTest::SlotTester
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -71,23 +72,23 @@ namespace KoMacroTest {
/**
* Compares a XML-Element with a Macro. Call sub-asserts.
* @p macro The parsen @a Macro.
- * @p domelement The given @a QDomElement which is parsen.
+ * @p domelement The given @a TQDomElement which is parsen.
* @p isitemsempty Bool for expectation of an empty @a MacroItem -List.
* @p isactionset Bool for expectation that the @a Action -names are equal.
- * @p isvariableok QMap of Bools for comparing each @a Variable .
+ * @p isvariableok TQMap of Bools for comparing each @a Variable .
*/
void assertMacroContentEqToXML(const KSharedPtr<KoMacro::Macro> macro,
- const QDomElement& elem,
+ const TQDomElement& elem,
const bool isitemsempty,
const bool isactionset,
- const QMap<QString, bool> isvariableok);
+ const TQMap<TQString, bool> isvariableok);
- // Prints a QMap of Variables to kdDebug().
- void printMvariables(const QMap<QString, KSharedPtr<KoMacro::Variable > > mvariables, const QString s);
+ // Prints a TQMap of Variables to kdDebug().
+ void printMvariables(const TQMap<TQString, KSharedPtr<KoMacro::Variable > > mvariables, const TQString s);
/**
* Sub-methods of testParseXML() and testToXML().
- * Test the correct parsing of a @a QDomElement into a @a Macro
+ * Test the correct parsing of a @a TQDomElement into a @a Macro
* respectively expected failure of parsing. Then transform it
* back and compare it.
*/
diff --git a/kexi/plugins/macros/tests/xmlhandlertests2.cpp b/kexi/plugins/macros/tests/xmlhandlertests2.cpp
index 2234eaae..ac176f89 100644
--- a/kexi/plugins/macros/tests/xmlhandlertests2.cpp
+++ b/kexi/plugins/macros/tests/xmlhandlertests2.cpp
@@ -29,7 +29,7 @@
#include <ostream>
#include <cfloat>
-#include <qdom.h>
+#include <tqdom.h>
#include <kdebug.h>
#include <kunittest/runner.h>
@@ -65,7 +65,7 @@ namespace KoMacroTest {
/**
* An @a TestObject instance used internaly to test
- * handling and communication with from QObject
+ * handling and communication with from TQObject
* inheritated instances.
*/
KSharedPtr<KoMacro::Action> testaction;
@@ -76,11 +76,11 @@ namespace KoMacroTest {
KSharedPtr<KoMacro::Action> action3_2; // action of the parsen macro3, for test12
/**
- * Represents a @a QValuList of @a MacroItem which are parsen in the
+ * Represents a @a TQValuList of @a MacroItem which are parsen in the
* correspondig @a Macro .
*/
- QValueList<KSharedPtr<KoMacro::MacroItem > > macroitems2; // items of macro2
- QValueList<KSharedPtr<KoMacro::MacroItem > > macroitems3; // items of macro3
+ TQValueList<KSharedPtr<KoMacro::MacroItem > > macroitems2; // items of macro2
+ TQValueList<KSharedPtr<KoMacro::MacroItem > > macroitems3; // items of macro3
/**
* @a MacroItem instances which ist fillen manually from the given XML
@@ -186,7 +186,7 @@ void XMLHandlerTests2::testCorrectDomElement()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -196,9 +196,9 @@ void XMLHandlerTests2::testCorrectDomElement()
"</item>"
"</macro>");
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -207,10 +207,10 @@ void XMLHandlerTests2::testCorrectDomElement()
d->macroitem->setAction(d->testaction);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(0));
- KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",QVariant(true));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(0.6));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0));
+ KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6));
// Is our XML parseable into a 2. Macro by calling parseXML()?
KOMACROTEST_ASSERT(d->macro2->parseXML(elem),true);
@@ -241,8 +241,8 @@ void XMLHandlerTests2::testCorrectDomElement()
varint->setVariant(117);
d->macroitem2->variable("testint")->setVariant(117);
- // Now convert the parsen macro2 back to a QDomElement and again into macro3 for a better comparison.
- const QDomElement elem2 = d->macro2->toXML();
+ // Now convert the parsen macro2 back to a TQDomElement and again into macro3 for a better comparison.
+ const TQDomElement elem2 = d->macro2->toXML();
KOMACROTEST_ASSERT(d->macro3->parseXML(elem2),true);
// Go down to the MacroItem of macro2.
@@ -279,7 +279,7 @@ void XMLHandlerTests2::testBadRoot()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<maro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -289,9 +289,9 @@ void XMLHandlerTests2::testBadRoot()
"</item>"
"</maro>");
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -300,10 +300,10 @@ void XMLHandlerTests2::testBadRoot()
d->macroitem->setAction(d->testaction);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(0));
- KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",QVariant(true));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(0.6));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0));
+ KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6));
// Is our XML parseable into a 2. Macro by calling parseXML()?
KOMACROTEST_XASSERT(d->macro2->parseXML(elem),true);
@@ -319,7 +319,7 @@ void XMLHandlerTests2::testMissingVariable()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -328,9 +328,9 @@ void XMLHandlerTests2::testMissingVariable()
"</item>"
"</macro>");
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -339,9 +339,9 @@ void XMLHandlerTests2::testMissingVariable()
d->macroitem->setAction(d->testaction);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(0));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(0.6));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6));
// Is our XML parseable into a 2. Macro by calling parseXML()?
KOMACROTEST_ASSERT(d->macro2->parseXML(elem),true);
@@ -367,8 +367,8 @@ void XMLHandlerTests2::testMissingVariable()
}
}
- // Now convert the parsen macro2 back to a QDomElement and again into macro3 for a better comparison.
- const QDomElement elem2 = d->macro2->toXML();
+ // Now convert the parsen macro2 back to a TQDomElement and again into macro3 for a better comparison.
+ const TQDomElement elem2 = d->macro2->toXML();
KOMACROTEST_ASSERT(d->macro3->parseXML(elem2),true);
// Go down to the MacroItem of macro2.
@@ -403,7 +403,7 @@ void XMLHandlerTests2::testMoreVariables()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -414,9 +414,9 @@ void XMLHandlerTests2::testMoreVariables()
"</item>"
"</macro>");
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -425,10 +425,10 @@ void XMLHandlerTests2::testMoreVariables()
d->macroitem->setAction(d->testaction);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(0));
- KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",QVariant(true));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(0.6));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0));
+ KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6));
KSharedPtr<KoMacro::Variable> varbla = d->macroitem->addVariable("testbla","somethingwrong");
// Is our XML parseable into a 2. Macro by calling parseXML()?
@@ -457,8 +457,8 @@ void XMLHandlerTests2::testMoreVariables()
}
}
- // Now convert the parsen macro2 back to a QDomElement and again into macro3 for a better comparison.
- const QDomElement elem2 = d->macro2->toXML();
+ // Now convert the parsen macro2 back to a TQDomElement and again into macro3 for a better comparison.
+ const TQDomElement elem2 = d->macro2->toXML();
KOMACROTEST_ASSERT(d->macro3->parseXML(elem2),true);
// Go down to the MacroItem of macro2.
@@ -496,7 +496,7 @@ void XMLHandlerTests2::testWrongVersion()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<maro xmlversion=\"2\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -506,9 +506,9 @@ void XMLHandlerTests2::testWrongVersion()
"</item>"
"</maro>");
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -517,10 +517,10 @@ void XMLHandlerTests2::testWrongVersion()
d->macroitem->setAction(d->testaction);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(0));
- KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",QVariant(true));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(0.6));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0));
+ KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6));
// Is our XML parseable into a 2. Macro by calling parseXML()?
KOMACROTEST_XASSERT(d->macro2->parseXML(elem),true);
@@ -538,7 +538,7 @@ void XMLHandlerTests2::testWrongXMLStruct()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"maro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -548,9 +548,9 @@ void XMLHandlerTests2::testWrongXMLStruct()
"</item>"
"</maro>");
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -559,10 +559,10 @@ void XMLHandlerTests2::testWrongXMLStruct()
d->macroitem->setAction(d->testaction);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(0));
- KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",QVariant(true));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(0.6));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0));
+ KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6));
// Is our XML parseable into a 2. Macro by calling parseXML()?
KOMACROTEST_XASSERT(d->macro2->parseXML(elem),true);
@@ -578,7 +578,7 @@ void XMLHandlerTests2::testMaxNum()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -586,11 +586,11 @@ void XMLHandlerTests2::testMaxNum()
"<variable name=\"testbool\" >true</variable>"
"<variable name=\"testdouble\" > %2 </variable>"
"</item>"
- "</macro>").arg(INT_MAX).arg(DBL_MAX);
+ "</macro>").tqarg(INT_MAX).tqarg(DBL_MAX);
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -599,10 +599,10 @@ void XMLHandlerTests2::testMaxNum()
d->macroitem->setAction(d->testaction);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(INT_MAX));
- KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",QVariant(true));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(DBL_MAX));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(INT_MAX));
+ KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(DBL_MAX));
// Is our XML parseable into a 2. Macro by calling parseXML()?
KOMACROTEST_ASSERT(d->macro2->parseXML(elem),true);
@@ -629,8 +629,8 @@ void XMLHandlerTests2::testMaxNum()
}
}
- // Now convert the parsen macro2 back to a QDomElement and again into macro3 for a better comparison.
- const QDomElement elem2 = d->macro2->toXML();
+ // Now convert the parsen macro2 back to a TQDomElement and again into macro3 for a better comparison.
+ const TQDomElement elem2 = d->macro2->toXML();
KOMACROTEST_ASSERT(d->macro3->parseXML(elem2),true);
// Go down to the MacroItem of macro2.
@@ -666,7 +666,7 @@ void XMLHandlerTests2::testMaxNum2()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -674,11 +674,11 @@ void XMLHandlerTests2::testMaxNum2()
"<variable name=\"testbool\" >true</variable>"
"<variable name=\"testdouble\" > %2 </variable>"
"</item>"
- "</macro>").arg(INT_MAX+1).arg(DBL_MAX+1);
+ "</macro>").tqarg(INT_MAX+1).tqarg(DBL_MAX+1);
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -687,10 +687,10 @@ void XMLHandlerTests2::testMaxNum2()
d->macroitem->setAction(d->testaction);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(INT_MAX+1));
- KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",QVariant(true));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(DBL_MAX+1));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(INT_MAX+1));
+ KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(DBL_MAX+1));
// Is our XML parseable into a 2. Macro by calling parseXML()?
KOMACROTEST_ASSERT(d->macro2->parseXML(elem),true);
@@ -717,8 +717,8 @@ void XMLHandlerTests2::testMaxNum2()
}
}
- // Now convert the parsen macro2 back to a QDomElement and again into macro3 for a better comparison.
- const QDomElement elem2 = d->macro2->toXML();
+ // Now convert the parsen macro2 back to a TQDomElement and again into macro3 for a better comparison.
+ const TQDomElement elem2 = d->macro2->toXML();
KOMACROTEST_ASSERT(d->macro3->parseXML(elem2),true);
// Go down to the MacroItem of macro2.
@@ -754,7 +754,7 @@ void XMLHandlerTests2::testMinNum()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -762,11 +762,11 @@ void XMLHandlerTests2::testMinNum()
"<variable name=\"testbool\" >true</variable>"
"<variable name=\"testdouble\" > %2 </variable>"
"</item>"
- "</macro>").arg(INT_MIN).arg(DBL_MIN);
+ "</macro>").tqarg(INT_MIN).tqarg(DBL_MIN);
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -775,10 +775,10 @@ void XMLHandlerTests2::testMinNum()
d->macroitem->setAction(d->testaction);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(INT_MIN));
- KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",QVariant(true));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(DBL_MIN));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(INT_MIN));
+ KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(DBL_MIN));
// Is our XML parseable into a 2. Macro by calling parseXML()?
KOMACROTEST_ASSERT(d->macro2->parseXML(elem),true);
@@ -805,8 +805,8 @@ void XMLHandlerTests2::testMinNum()
}
}
- // Now convert the parsen macro2 back to a QDomElement and again into macro3 for a better comparison.
- const QDomElement elem2 = d->macro2->toXML();
+ // Now convert the parsen macro2 back to a TQDomElement and again into macro3 for a better comparison.
+ const TQDomElement elem2 = d->macro2->toXML();
KOMACROTEST_ASSERT(d->macro3->parseXML(elem2),true);
// Go down to the MacroItem of macro2.
@@ -842,7 +842,7 @@ void XMLHandlerTests2::testMinNum2()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -850,11 +850,11 @@ void XMLHandlerTests2::testMinNum2()
"<variable name=\"testbool\" >true</variable>"
"<variable name=\"testdouble\" > %2 </variable>"
"</item>"
- "</macro>").arg(INT_MIN-1).arg(DBL_MIN-1);
+ "</macro>").tqarg(INT_MIN-1).tqarg(DBL_MIN-1);
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -863,10 +863,10 @@ void XMLHandlerTests2::testMinNum2()
d->macroitem->setAction(d->testaction);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(INT_MIN-1));
- KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",QVariant(true));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(DBL_MIN-1));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(INT_MIN-1));
+ KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(DBL_MIN-1));
// Is our XML parseable into a 2. Macro by calling parseXML()?
KOMACROTEST_ASSERT(d->macro2->parseXML(elem),true);
@@ -893,8 +893,8 @@ void XMLHandlerTests2::testMinNum2()
}
}
- // Now convert the parsen macro2 back to a QDomElement and again into macro3 for a better comparison.
- const QDomElement elem2 = d->macro2->toXML();
+ // Now convert the parsen macro2 back to a TQDomElement and again into macro3 for a better comparison.
+ const TQDomElement elem2 = d->macro2->toXML();
KOMACROTEST_ASSERT(d->macro3->parseXML(elem2),true);
// Go down to the MacroItem of macro2.
@@ -930,7 +930,7 @@ void XMLHandlerTests2::testBigNumber()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -940,9 +940,9 @@ void XMLHandlerTests2::testBigNumber()
"</item>"
"</macro>");
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -951,10 +951,10 @@ void XMLHandlerTests2::testBigNumber()
d->macroitem->setAction(d->testaction);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- //TODO //KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(0123456789012345678901234567890123456789));
- KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",QVariant(true));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(0.6));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ //TODO //KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0123456789012345678901234567890123456789));
+ KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6));
// Is our XML parseable into a 2. Macro by calling parseXML()?
KOMACROTEST_ASSERT(d->macro2->parseXML(elem),true);
@@ -981,8 +981,8 @@ void XMLHandlerTests2::testBigNumber()
}
}
- // Now convert the parsen macro2 back to a QDomElement and again into macro3 for a better comparison.
- const QDomElement elem2 = d->macro2->toXML();
+ // Now convert the parsen macro2 back to a TQDomElement and again into macro3 for a better comparison.
+ const TQDomElement elem2 = d->macro2->toXML();
KOMACROTEST_ASSERT(d->macro3->parseXML(elem2),true);
// Go down to the MacroItem of macro2.
@@ -1018,7 +1018,7 @@ void XMLHandlerTests2::testTwoMacroItems()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -1036,9 +1036,9 @@ void XMLHandlerTests2::testTwoMacroItems()
"</item>"
"</macro>");
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -1050,17 +1050,17 @@ void XMLHandlerTests2::testTwoMacroItems()
d->macroitem_2->setAction(d->testaction_2);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(0));
- KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",QVariant(true));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(0.6));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0));
+ KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6));
KSharedPtr<KoMacro::Variable> varbla = d->macroitem->addVariable("testbla","somethingwrong");
// Push the Variables into the macroitem4.
- KSharedPtr<KoMacro::Variable> varstring_2 = d->macroitem_2->addVariable("teststring",QVariant("testString2"));
- KSharedPtr<KoMacro::Variable> varint_2 = d->macroitem_2->addVariable("testint",QVariant(4));
- KSharedPtr<KoMacro::Variable> varbool_2 = d->macroitem_2->addVariable("testbool",QVariant(false));
- KSharedPtr<KoMacro::Variable> vardouble_2 = d->macroitem_2->addVariable("testdouble",QVariant(0.7));
+ KSharedPtr<KoMacro::Variable> varstring_2 = d->macroitem_2->addVariable("teststring",TQVariant("testString2"));
+ KSharedPtr<KoMacro::Variable> varint_2 = d->macroitem_2->addVariable("testint",TQVariant(4));
+ KSharedPtr<KoMacro::Variable> varbool_2 = d->macroitem_2->addVariable("testbool",TQVariant(false));
+ KSharedPtr<KoMacro::Variable> vardouble_2 = d->macroitem_2->addVariable("testdouble",TQVariant(0.7));
KSharedPtr<KoMacro::Variable> varbla_2 = d->macroitem_2->addVariable("testbla","somethingwrong2");
// Is our XML parseable into a 2. Macro by calling parseXML()?
@@ -1072,7 +1072,7 @@ void XMLHandlerTests2::testTwoMacroItems()
KOMACROTEST_ASSERT(d->macroitems2.size(),(sizetypelist)2);
{
- QValueList<KSharedPtr<KoMacro::MacroItem > >::ConstIterator mit2(d->macroitems2.constBegin());
+ TQValueList<KSharedPtr<KoMacro::MacroItem > >::ConstIterator mit2(d->macroitems2.constBegin());
// 2a.comparison - Test if the Action is correct?
d->macroitem2 = *mit2;
mit2++;
@@ -1101,8 +1101,8 @@ void XMLHandlerTests2::testTwoMacroItems()
}
}
- // Now convert the parsen macro2 back to a QDomElement and again into macro3 for a better comparison.
- const QDomElement elem2 = d->macro2->toXML();
+ // Now convert the parsen macro2 back to a TQDomElement and again into macro3 for a better comparison.
+ const TQDomElement elem2 = d->macro2->toXML();
KOMACROTEST_ASSERT(d->macro3->parseXML(elem2),true);
// Go down to the MacroItem of macro2.
@@ -1111,7 +1111,7 @@ void XMLHandlerTests2::testTwoMacroItems()
KOMACROTEST_ASSERT(d->macroitems3.size(),(sizetypelist)2);
{
- QValueList<KSharedPtr<KoMacro::MacroItem > >::ConstIterator mit3(d->macroitems3.constBegin());
+ TQValueList<KSharedPtr<KoMacro::MacroItem > >::ConstIterator mit3(d->macroitems3.constBegin());
// 2b.comparison - Test if the Action is correct?
d->macroitem3 = *mit3;
mit3++;
diff --git a/kexi/plugins/macros/tests/xmlhandlertests2.h b/kexi/plugins/macros/tests/xmlhandlertests2.h
index 0a3fee3a..d8f92aaf 100644
--- a/kexi/plugins/macros/tests/xmlhandlertests2.h
+++ b/kexi/plugins/macros/tests/xmlhandlertests2.h
@@ -31,6 +31,7 @@ namespace KoMacroTest {
class XMLHandlerTests2 : public KUnitTest::SlotTester
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -68,29 +69,29 @@ namespace KoMacroTest {
/// @internal d-pointer instance.
Private* const d;
- typedef QMap<QString,KoMacro::Variable>::size_type sizetypemap;
- typedef QValueList<KSharedPtr<KoMacro::MacroItem > >::size_type sizetypelist;
+ typedef TQMap<TQString,KoMacro::Variable>::size_type sizetypemap;
+ typedef TQValueList<KSharedPtr<KoMacro::MacroItem > >::size_type sizetypelist;
/**
* Compares a XML-Element with a Macro. Call sub-asserts.
* @p macro The parsen @a Macro.
- * @p domelement The given @a QDomElement which is parsen.
+ * @p domelement The given @a TQDomElement which is parsen.
* @p isitemsempty Bool for expectation of an empty @a MacroItem -List.
* @p isactionset Bool for expectation that the @a Action -names are equal.
- * @p isvariableok QMap of Bools for comparing each @a Variable .
+ * @p isvariableok TQMap of Bools for comparing each @a Variable .
*/
/* void assertMacroContentEqToXML(const KSharedPtr<KoMacro::Macro> macro,
- const QDomElement& elem,
+ const TQDomElement& elem,
const bool isitemsempty,
const bool isactionset,
- const QMap<QString, bool> isvariableok);
+ const TQMap<TQString, bool> isvariableok);
- // Prints a QMap of Variables to kdDebug().
- void printMvariables(const QMap<QString, KSharedPtr<KoMacro::Variable > > mvariables, const QString s);
+ // Prints a TQMap of Variables to kdDebug().
+ void printMvariables(const TQMap<TQString, KSharedPtr<KoMacro::Variable > > mvariables, const TQString s);
*/
/**
* Sub-methods of testParseXML() and testToXML().
- * Test the correct parsing of a @a QDomElement into a @a Macro
+ * Test the correct parsing of a @a TQDomElement into a @a Macro
* respectively expected failure of parsing. Then transform it
* back and compare it.
*/
diff --git a/kexi/plugins/migration/keximigrationpart.cpp b/kexi/plugins/migration/keximigrationpart.cpp
index 0f6c408b..5d4830ef 100644
--- a/kexi/plugins/migration/keximigrationpart.cpp
+++ b/kexi/plugins/migration/keximigrationpart.cpp
@@ -23,8 +23,8 @@
#include <kgenericfactory.h>
-KexiMigrationPart::KexiMigrationPart(QObject *parent, const char *name, const QStringList &args)
- : KexiInternalPart(parent, name, args)
+KexiMigrationPart::KexiMigrationPart(TQObject *tqparent, const char *name, const TQStringList &args)
+ : KexiInternalPart(tqparent, name, args)
{
}
@@ -32,12 +32,12 @@ KexiMigrationPart::~KexiMigrationPart()
{
}
-QWidget *KexiMigrationPart::createWidget(const char* /*widgetClass*/, KexiMainWindow* mainWin,
- QWidget *parent, const char *objName, QMap<QString,QString>* args )
+TQWidget *KexiMigrationPart::createWidget(const char* /*widgetClass*/, KexiMainWindow* mainWin,
+ TQWidget *tqparent, const char *objName, TQMap<TQString,TQString>* args )
{
Q_UNUSED( mainWin );
- KexiMigration::ImportWizard *w = new KexiMigration::ImportWizard(parent, args);
+ KexiMigration::ImportWizard *w = new KexiMigration::ImportWizard(tqparent, args);
w->setName(objName);
return w;
}
diff --git a/kexi/plugins/migration/keximigrationpart.h b/kexi/plugins/migration/keximigrationpart.h
index 528aac82..b41656a6 100644
--- a/kexi/plugins/migration/keximigrationpart.h
+++ b/kexi/plugins/migration/keximigrationpart.h
@@ -26,13 +26,13 @@
class KexiMigrationPart : public KexiInternalPart
{
public:
- KexiMigrationPart(QObject *parent, const char *name, const QStringList &args);
+ KexiMigrationPart(TQObject *tqparent, const char *name, const TQStringList &args);
virtual ~KexiMigrationPart();
/*! Reimplement this if your internal part has to return widgets
- or QDialog objects. */
- virtual QWidget *createWidget(const char* /*widgetClass*/, KexiMainWindow* mainWin,
- QWidget *parent, const char *objName = 0, QMap<QString,QString>* args = 0);
+ or TQDialog objects. */
+ virtual TQWidget *createWidget(const char* /*widgetClass*/, KexiMainWindow* mainWin,
+ TQWidget *tqparent, const char *objName = 0, TQMap<TQString,TQString>* args = 0);
};
#endif
diff --git a/kexi/plugins/queries/kexiaddparamdialog.cpp b/kexi/plugins/queries/kexiaddparamdialog.cpp
index fb40f9a2..4b1141be 100644
--- a/kexi/plugins/queries/kexiaddparamdialog.cpp
+++ b/kexi/plugins/queries/kexiaddparamdialog.cpp
@@ -20,14 +20,14 @@
#include <klocale.h>
#include <kcombobox.h>
#include <klineedit.h>
-#include <qvbox.h>
+#include <tqvbox.h>
#include <kexidataprovider.h>
#include "kexiaddparamdialog.h"
#include "kexiaddparamdialog.moc"
#include "kexiaddparamwidget.h"
-KexiAddParamDialog::KexiAddParamDialog(QWidget *parent)
- : KDialogBase(parent, "kexiaddparamdialog", true, i18n("Add Parameter"), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true)
+KexiAddParamDialog::KexiAddParamDialog(TQWidget *tqparent)
+ : KDialogBase(tqparent, "kexiaddparamdialog", true, i18n("Add Parameter"), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true)
{
m_wid=new KexiAddParamWidget(makeVBoxMainWidget());
for (int i=1;i<=KexiDataProvider::Parameter::maxType;i++)
@@ -38,7 +38,7 @@ KexiAddParamDialog::~KexiAddParamDialog()
{
}
-QString KexiAddParamDialog::parameterName() {
+TQString KexiAddParamDialog::parameterName() {
return m_wid->paramname->text();
}
diff --git a/kexi/plugins/queries/kexiaddparamdialog.h b/kexi/plugins/queries/kexiaddparamdialog.h
index 79558a7c..2aa27bf7 100644
--- a/kexi/plugins/queries/kexiaddparamdialog.h
+++ b/kexi/plugins/queries/kexiaddparamdialog.h
@@ -27,11 +27,12 @@ class KexiAddParamWidget;
class KexiAddParamDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiAddParamDialog(QWidget *parent);
+ KexiAddParamDialog(TQWidget *tqparent);
virtual ~KexiAddParamDialog();
- QString parameterName();
+ TQString parameterName();
int parameterType();
private:
KexiAddParamWidget *m_wid;
diff --git a/kexi/plugins/queries/kexiaddparamwidget.ui b/kexi/plugins/queries/kexiaddparamwidget.ui
index 43ec25f1..cddfa20e 100644
--- a/kexi/plugins/queries/kexiaddparamwidget.ui
+++ b/kexi/plugins/queries/kexiaddparamwidget.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
<class>KexiAddParamWidget</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KexiAddParamWidget</cstring>
</property>
@@ -19,15 +19,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>layout3</cstring>
+ <cstring>tqlayout3</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -35,22 +35,22 @@
<string>Name:</string>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout1</cstring>
+ <cstring>tqlayout1</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1_2</cstring>
</property>
<property name="text">
<string>kexi_</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
@@ -73,22 +73,22 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QLayoutWidget" row="2" column="0">
+ <widget class="TQLayoutWidget" row="2" column="0">
<property name="name">
- <cstring>layout4</cstring>
+ <cstring>tqlayout4</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1_4</cstring>
</property>
@@ -96,22 +96,22 @@
<string>Message:</string>
</property>
</widget>
- <widget class="QLineEdit">
+ <widget class="TQLineEdit">
<property name="name">
<cstring>message</cstring>
</property>
</widget>
</vbox>
</widget>
- <widget class="QLayoutWidget" row="1" column="0">
+ <widget class="TQLayoutWidget" row="1" column="0">
<property name="name">
- <cstring>layout5</cstring>
+ <cstring>tqlayout5</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1_3</cstring>
</property>
@@ -119,7 +119,7 @@
<string>Type:</string>
</property>
</widget>
- <widget class="QComboBox">
+ <widget class="TQComboBox">
<property name="name">
<cstring>typecombo</cstring>
</property>
@@ -128,7 +128,7 @@
</widget>
</grid>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>klineedit.h</includehint>
</includehints>
diff --git a/kexi/plugins/queries/kexidynamicqueryparameterdialog.cpp b/kexi/plugins/queries/kexidynamicqueryparameterdialog.cpp
index 4a77f37c..938d407f 100644
--- a/kexi/plugins/queries/kexidynamicqueryparameterdialog.cpp
+++ b/kexi/plugins/queries/kexidynamicqueryparameterdialog.cpp
@@ -21,24 +21,24 @@
#include "kexidynamicqueryparameterdialog.h"
#include "kexidynamicqueryparameterdialog.moc"
-#include <qvbox.h>
+#include <tqvbox.h>
#include <klocale.h>
#include <kdebug.h>
-#include <qlineedit.h>
-#include <qobjectlist.h>
+#include <tqlineedit.h>
+#include <tqobjectlist.h>
-KexiDynamicQueryParameterDialog::KexiDynamicQueryParameterDialog(QWidget *parent,
+KexiDynamicQueryParameterDialog::KexiDynamicQueryParameterDialog(TQWidget *tqparent,
KexiDataProvider::Parameters *values, const KexiDataProvider::ParameterList &list):
- KDialogBase(parent, "paramddialog", true, i18n("Query Parameters"),
+ KDialogBase(tqparent, "paramddialog", true, i18n("Query Parameters"),
KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true )
{
m_values=values;
int y;
- m_mainView=new QVBox(this);
+ m_mainView=new TQVBox(this);
for (KexiDataProvider::ParameterList::const_iterator it=list.begin();
it!=list.end();++it) {
- QLineEdit *le=new QLineEdit(m_mainView,(*it).name.utf8());
+ TQLineEdit *le=new TQLineEdit(m_mainView,(*it).name.utf8());
le->setText((*values)[(*it).name]);
}
@@ -48,14 +48,14 @@ KexiDynamicQueryParameterDialog::KexiDynamicQueryParameterDialog(QWidget *parent
KexiDynamicQueryParameterDialog::~KexiDynamicQueryParameterDialog() {}
void KexiDynamicQueryParameterDialog::slotOk() {
- QObjectList *l=queryList(0,"kexi_.*",true,true);
- QObjectListIt it(*l);
- QObject *obj;
+ TQObjectList *l=queryList(0,"kexi_.*",true,true);
+ TQObjectListIt it(*l);
+ TQObject *obj;
kdDebug()<<"KexiDynamicQueryParameterDialog::slotOk()"<<endl;
while ((obj=it.current())!=0) {
kdDebug()<<"KexiDynamicQueryParameterDialog::slotOk()::loop"<<endl;
- (*m_values)[QString().fromUtf8(obj->name())]=
- (dynamic_cast<QLineEdit*>(obj))->text();
+ (*m_values)[TQString().fromUtf8(obj->name())]=
+ (dynamic_cast<TQLineEdit*>(obj))->text();
++it;
}
delete l;
diff --git a/kexi/plugins/queries/kexidynamicqueryparameterdialog.h b/kexi/plugins/queries/kexidynamicqueryparameterdialog.h
index b315e4f9..60137c1f 100644
--- a/kexi/plugins/queries/kexidynamicqueryparameterdialog.h
+++ b/kexi/plugins/queries/kexidynamicqueryparameterdialog.h
@@ -17,27 +17,28 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef _KEXI_DYNAMIC_QUERY_PARAMETER_DIALOG_H_
-#define _KEXI_DYNAMIC_QUERY_PARAMETER_DIALOG_H_
+#ifndef _KEXI_DYNAMIC_TQUERY_PARAMETER_DIALOG_H_
+#define _KEXI_DYNAMIC_TQUERY_PARAMETER_DIALOG_H_
#include <kdialogbase.h>
#include <kexidataprovider.h>
-class QVBox;
+class TQVBox;
class KexiDynamicQueryParameterDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiDynamicQueryParameterDialog(QWidget *parent,KexiDataProvider::Parameters *, const KexiDataProvider::ParameterList &);
+ KexiDynamicQueryParameterDialog(TQWidget *tqparent,KexiDataProvider::Parameters *, const KexiDataProvider::ParameterList &);
virtual ~KexiDynamicQueryParameterDialog();
protected:
virtual void slotOk();
private:
//temporary only. Later a different widget will be used
- QVBox *m_mainView;
+ TQVBox *m_mainView;
KexiDataProvider::Parameters *m_values;
};
diff --git a/kexi/plugins/queries/kexiparameterlisteditor.ui b/kexi/plugins/queries/kexiparameterlisteditor.ui
index ac4a3230..dd5a00d8 100644
--- a/kexi/plugins/queries/kexiparameterlisteditor.ui
+++ b/kexi/plugins/queries/kexiparameterlisteditor.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
<class>KexiParameterListEditor</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KexiParameterListEditor</cstring>
</property>
@@ -16,7 +16,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -51,9 +51,9 @@
<cstring>list</cstring>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout1</cstring>
+ <cstring>tqlayout1</cstring>
</property>
<hbox>
<property name="name">
@@ -79,7 +79,7 @@
</widget>
</vbox>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>klistview.h</includehint>
<includehint>kpushbutton.h</includehint>
diff --git a/kexi/plugins/queries/kexiquerydesignerguieditor.cpp b/kexi/plugins/queries/kexiquerydesignerguieditor.cpp
index d67573e8..a6205222 100644
--- a/kexi/plugins/queries/kexiquerydesignerguieditor.cpp
+++ b/kexi/plugins/queries/kexiquerydesignerguieditor.cpp
@@ -20,10 +20,10 @@
#include "kexiquerydesignerguieditor.h"
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qdom.h>
-#include <qregexp.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqdom.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <klocale.h>
@@ -56,14 +56,14 @@
#include "kexiquerypart.h"
-//! @todo remove KEXI_NO_QUERY_TOTALS later
-#define KEXI_NO_QUERY_TOTALS
+//! @todo remove KEXI_NO_TQUERY_TOTALS later
+#define KEXI_NO_TQUERY_TOTALS
//! indices for table columns
#define COLUMN_ID_COLUMN 0
#define COLUMN_ID_TABLE 1
#define COLUMN_ID_VISIBLE 2
-#ifdef KEXI_NO_QUERY_TOTALS
+#ifdef KEXI_NO_TQUERY_TOTALS
# define COLUMN_ID_SORTING 3
# define COLUMN_ID_CRITERIA 4
#else
@@ -84,7 +84,7 @@ public:
}
bool changeSingleCellValue(KexiTableItem &item, int columnNumber,
- const QVariant& value, KexiDB::ResultInfo* result)
+ const TQVariant& value, KexiDB::ResultInfo* result)
{
data->clearRowEditBuffer();
if (!data->updateRowEditBuffer(&item, columnNumber, value)
@@ -99,11 +99,11 @@ public:
KexiTableViewData *data;
KexiDataTable *dataTable;
- QGuardedPtr<KexiDB::Connection> conn;
+ TQGuardedPtr<KexiDB::Connection> conn;
KexiRelationWidget *relations;
KexiSectionHeader *head;
- QSplitter *spl;
+ TQSplitter *spl;
/*! Used to remember in slotDroppedAtRow() what data was dropped,
so we can create appropriate prop. set in slotRowInserted()
@@ -116,46 +116,46 @@ public:
This information is cached and entirely refreshed on updateColumnsData().
The dict is filled with (char*)1 values (doesn't matter what it is);
*/
- QDict<char> fieldColumnIdentifiers;
+ TQDict<char> fieldColumnIdentifiers;
KexiDataAwarePropertySet* sets;
KexiTableItem *droppedNewItem;
- QString droppedNewTable, droppedNewField;
+ TQString droppedNewTable, droppedNewField;
bool slotTableAdded_enabled : 1;
};
-static bool isAsterisk(const QString& tableName, const QString& fieldName)
+static bool isAsterisk(const TQString& tableName, const TQString& fieldName)
{
return tableName=="*" || fieldName.endsWith("*");
}
//! @internal \return true if sorting is allowed for \a fieldName and \a tableName
-static bool sortingAllowed(const QString& fieldName, const QString& tableName) {
+static bool sortingAllowed(const TQString& fieldName, const TQString& tableName) {
return ! (fieldName=="*" || (fieldName.isEmpty() && tableName=="*"));
}
//=========================================================
KexiQueryDesignerGuiEditor::KexiQueryDesignerGuiEditor(
- KexiMainWindow *mainWin, QWidget *parent, const char *name)
- : KexiViewBase(mainWin, parent, name)
+ KexiMainWindow *mainWin, TQWidget *tqparent, const char *name)
+ : KexiViewBase(mainWin, tqparent, name)
, d( new Private() )
{
d->conn = mainWin->project()->dbConnection();
- d->spl = new QSplitter(Vertical, this);
+ d->spl = new TQSplitter(Qt::Vertical, this);
d->spl->setChildrenCollapsible(false);
d->relations = new KexiRelationWidget(mainWin, d->spl, "relations");
- connect(d->relations, SIGNAL(tableAdded(KexiDB::TableSchema&)),
- this, SLOT(slotTableAdded(KexiDB::TableSchema&)));
- connect(d->relations, SIGNAL(tableHidden(KexiDB::TableSchema&)),
- this, SLOT(slotTableHidden(KexiDB::TableSchema&)));
- connect(d->relations, SIGNAL(tableFieldDoubleClicked(KexiDB::TableSchema*,const QString&)),
- this, SLOT(slotTableFieldDoubleClicked(KexiDB::TableSchema*,const QString&)));
-
- d->head = new KexiSectionHeader(i18n("Query Columns"), Vertical, d->spl);
+ connect(d->relations, TQT_SIGNAL(tableAdded(KexiDB::TableSchema&)),
+ this, TQT_SLOT(slotTableAdded(KexiDB::TableSchema&)));
+ connect(d->relations, TQT_SIGNAL(tableHidden(KexiDB::TableSchema&)),
+ this, TQT_SLOT(slotTableHidden(KexiDB::TableSchema&)));
+ connect(d->relations, TQT_SIGNAL(tableFieldDoubleClicked(KexiDB::TableSchema*,const TQString&)),
+ this, TQT_SLOT(slotTableFieldDoubleClicked(KexiDB::TableSchema*,const TQString&)));
+
+ d->head = new KexiSectionHeader(i18n("Query Columns"),Qt::Vertical, d->spl);
d->dataTable = new KexiDataTable(mainWin, d->head, "guieditor_dataTable", false);
d->dataTable->dataAwareObject()->setSpreadSheetMode();
@@ -164,39 +164,39 @@ KexiQueryDesignerGuiEditor::KexiQueryDesignerGuiEditor(
initTableColumns();
initTableRows();
- QValueList<int> c;
+ TQValueList<int> c;
c << COLUMN_ID_COLUMN << COLUMN_ID_TABLE << COLUMN_ID_CRITERIA;
if (d->dataTable->tableView()/*sanity*/) {
d->dataTable->tableView()->adjustColumnWidthToContents(COLUMN_ID_VISIBLE);
d->dataTable->tableView()->adjustColumnWidthToContents(COLUMN_ID_SORTING);
d->dataTable->tableView()->maximizeColumnsWidth( c );
d->dataTable->tableView()->setDropsAtRowEnabled(true);
- connect(d->dataTable->tableView(), SIGNAL(dragOverRow(KexiTableItem*,int,QDragMoveEvent*)),
- this, SLOT(slotDragOverTableRow(KexiTableItem*,int,QDragMoveEvent*)));
- connect(d->dataTable->tableView(), SIGNAL(droppedAtRow(KexiTableItem*,int,QDropEvent*,KexiTableItem*&)),
- this, SLOT(slotDroppedAtRow(KexiTableItem*,int,QDropEvent*,KexiTableItem*&)));
- connect(d->dataTable->tableView(), SIGNAL(newItemAppendedForAfterDeletingInSpreadSheetMode()),
- this, SLOT(slotNewItemAppendedForAfterDeletingInSpreadSheetMode()));
+ connect(d->dataTable->tableView(), TQT_SIGNAL(dragOverRow(KexiTableItem*,int,TQDragMoveEvent*)),
+ this, TQT_SLOT(slotDragOverTableRow(KexiTableItem*,int,TQDragMoveEvent*)));
+ connect(d->dataTable->tableView(), TQT_SIGNAL(droppedAtRow(KexiTableItem*,int,TQDropEvent*,KexiTableItem*&)),
+ this, TQT_SLOT(slotDroppedAtRow(KexiTableItem*,int,TQDropEvent*,KexiTableItem*&)));
+ connect(d->dataTable->tableView(), TQT_SIGNAL(newItemAppendedForAfterDeletingInSpreadSheetMode()),
+ this, TQT_SLOT(slotNewItemAppendedForAfterDeletingInSpreadSheetMode()));
}
- connect(d->data, SIGNAL(aboutToChangeCell(KexiTableItem*,int,QVariant&,KexiDB::ResultInfo*)),
- this, SLOT(slotBeforeCellChanged(KexiTableItem*,int,QVariant&,KexiDB::ResultInfo*)));
- connect(d->data, SIGNAL(rowInserted(KexiTableItem*,uint,bool)),
- this, SLOT(slotRowInserted(KexiTableItem*,uint,bool)));
- connect(d->relations, SIGNAL(tablePositionChanged(KexiRelationViewTableContainer*)),
- this, SLOT(slotTablePositionChanged(KexiRelationViewTableContainer*)));
- connect(d->relations, SIGNAL(aboutConnectionRemove(KexiRelationViewConnection*)),
- this, SLOT(slotAboutConnectionRemove(KexiRelationViewConnection*)));
-
- QVBoxLayout *l = new QVBoxLayout(this);
+ connect(d->data, TQT_SIGNAL(aboutToChangeCell(KexiTableItem*,int,TQVariant&,KexiDB::ResultInfo*)),
+ this, TQT_SLOT(slotBeforeCellChanged(KexiTableItem*,int,TQVariant&,KexiDB::ResultInfo*)));
+ connect(d->data, TQT_SIGNAL(rowInserted(KexiTableItem*,uint,bool)),
+ this, TQT_SLOT(slotRowInserted(KexiTableItem*,uint,bool)));
+ connect(d->relations, TQT_SIGNAL(tablePositionChanged(KexiRelationViewTableContainer*)),
+ this, TQT_SLOT(slotTablePositionChanged(KexiRelationViewTableContainer*)));
+ connect(d->relations, TQT_SIGNAL(aboutConnectionRemove(KexiRelationViewConnection*)),
+ this, TQT_SLOT(slotAboutConnectionRemove(KexiRelationViewConnection*)));
+
+ TQVBoxLayout *l = new TQVBoxLayout(this);
l->addWidget(d->spl);
addChildView(d->relations);
addChildView(d->dataTable);
setViewWidget(d->dataTable, true);
- d->relations->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding);
- d->head->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding);
+ d->relations->tqsetSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Expanding);
+ d->head->tqsetSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Expanding);
updateGeometry();
- d->spl->setSizes(QValueList<int>()<< 800<<400);
+ d->spl->setSizes(TQValueList<int>()<< 800<<400);
}
KexiQueryDesignerGuiEditor::~KexiQueryDesignerGuiEditor()
@@ -222,14 +222,14 @@ KexiQueryDesignerGuiEditor::initTableColumns()
KexiTableViewColumn *col3 = new KexiTableViewColumn("visible", KexiDB::Field::Boolean, i18n("Visible"),
i18n("Describes visibility for a given field or expression."));
- col3->field()->setDefaultValue( QVariant(false, 0) );
+ col3->field()->setDefaultValue( TQVariant(false, 0) );
col3->field()->setNotNull( true );
d->data->addColumn(col3);
-#ifndef KEXI_NO_QUERY_TOTALS
+#ifndef KEXI_NO_TQUERY_TOTALS
KexiTableViewColumn *col4 = new KexiTableViewColumn("totals", KexiDB::Field::Enum, i18n("Totals"),
i18n("Describes a way of computing totals for a given field or expression."));
- QValueVector<QString> totalsTypes;
+ TQValueVector<TQString> totalsTypes;
totalsTypes.append( i18n("Group by") );
totalsTypes.append( i18n("Sum") );
totalsTypes.append( i18n("Average") );
@@ -242,7 +242,7 @@ KexiQueryDesignerGuiEditor::initTableColumns()
KexiTableViewColumn *col5 = new KexiTableViewColumn("sort", KexiDB::Field::Enum, i18n("Sorting"),
i18n("Describes a way of sorting for a given field."));
- QValueVector<QString> sortTypes;
+ TQValueVector<TQString> sortTypes;
sortTypes.append( "" );
sortTypes.append( i18n("Ascending") );
sortTypes.append( i18n("Descending") );
@@ -264,7 +264,7 @@ void KexiQueryDesignerGuiEditor::initTableRows()
for (int i=0; i<(int)d->sets->size(); i++) {
KexiTableItem* item;
d->data->append(item = d->data->createItem());
- item->at(COLUMN_ID_VISIBLE) = QVariant(false, 0);
+ item->at(COLUMN_ID_VISIBLE) = TQVariant(false, 0);
}
d->dataTable->dataAwareObject()->setData(d->data);
@@ -275,22 +275,22 @@ void KexiQueryDesignerGuiEditor::updateColumnsData()
{
d->dataTable->dataAwareObject()->acceptRowEdit();
- QStringList sortedTableNames;
+ TQStringList sortedTableNames;
for (TablesDictIterator it(*d->relations->tables());it.current();++it)
sortedTableNames += it.current()->schema()->name();
qHeapSort( sortedTableNames );
//several tables can be hidden now, so remove rows for these tables
- QValueList<int> rowsToDelete;
+ TQValueList<int> rowsToDelete;
for (int r = 0; r<(int)d->sets->size(); r++) {
KoProperty::Set *set = d->sets->at(r);
if (set) {
- QString tableName = (*set)["table"].value().toString();
- QString fieldName = (*set)["field"].value().toString();
+ TQString tableName = (*set)["table"].value().toString();
+ TQString fieldName = (*set)["field"].value().toString();
const bool allTablesAsterisk = tableName=="*" && d->relations->tables()->isEmpty();
const bool fieldNotFound = tableName!="*"
&& !(*set)["isExpression"].value().toBool()
- && sortedTableNames.end() == qFind( sortedTableNames.begin(), sortedTableNames.end(), tableName );
+ && sortedTableNames.end() == tqFind( sortedTableNames.begin(), sortedTableNames.end(), tableName );
if (allTablesAsterisk || fieldNotFound) {
//table not found: mark this line for later removal
@@ -313,12 +313,12 @@ void KexiQueryDesignerGuiEditor::updateColumnsData()
// tempData()->clearQuery();
tempData()->unregisterForTablesSchemaChanges();
- for (QStringList::const_iterator it = sortedTableNames.constBegin();
+ for (TQStringList::const_iterator it = sortedTableNames.constBegin();
it!=sortedTableNames.constEnd(); ++it)
{
//table
/*! @todo what about query? */
- KexiDB::TableSchema *table = d->relations->tables()->find(*it)->schema()->table();
+ KexiDB::TableSchema *table = d->relations->tables()->tqfind(*it)->schema()->table();
d->conn->registerForTableSchemaChanges(*tempData(), *table); //this table will be used
item = d->tablesColumnData->createItem(); //new KexiTableItem(2);
(*item)[COLUMN_ID_COLUMN]=table->name();
@@ -333,7 +333,7 @@ void KexiQueryDesignerGuiEditor::updateColumnsData()
for (KexiDB::Field::ListIterator t_it = table->fieldsIterator();t_it.current();++t_it) {
item = d->fieldColumnData->createItem(); // new KexiTableItem(2);
(*item)[COLUMN_ID_COLUMN]=table->name()+"."+t_it.current()->name();
- (*item)[COLUMN_ID_TABLE]=QString(" ") + t_it.current()->name();
+ (*item)[COLUMN_ID_TABLE]=TQString(" ") + t_it.current()->name();
d->fieldColumnData->append( item );
d->fieldColumnIdentifiers.insert((*item)[COLUMN_ID_COLUMN].toString(), (char*)1); //cache
}
@@ -349,16 +349,16 @@ KexiRelationWidget *KexiQueryDesignerGuiEditor::relationView() const
KexiQueryPart::TempData *
KexiQueryDesignerGuiEditor::tempData() const
{
- return static_cast<KexiQueryPart::TempData*>(parentDialog()->tempData());
+ return static_cast<KexiQueryPart::TempData*>(tqparentDialog()->tempData());
}
-static QString msgCannotSwitch_EmptyDesign() {
+static TQString msgCannotSwitch_EmptyDesign() {
return i18n("Cannot switch to data view, because query design is empty.\n"
"First, please create your design.");
}
bool
-KexiQueryDesignerGuiEditor::buildSchema(QString *errMsg)
+KexiQueryDesignerGuiEditor::buildSchema(TQString *errMsg)
{
//build query schema
KexiQueryPart::TempData * temp = tempData();
@@ -378,7 +378,7 @@ KexiQueryDesignerGuiEditor::buildSchema(QString *errMsg)
// -WHERE expression
// -ORDER BY list
KexiDB::BaseExpr *whereExpr = 0;
- const uint count = QMIN(d->data->count(), d->sets->size());
+ const uint count = TQMIN(d->data->count(), d->sets->size());
bool fieldsFound = false;
KexiTableViewData::Iterator it(d->data->iterator());
for (uint i=0; i<count && it.current(); ++it, i++) {
@@ -388,29 +388,29 @@ KexiQueryDesignerGuiEditor::buildSchema(QString *errMsg)
d->dataTable->dataAwareObject()->setCursorPosition(i,0);
if (errMsg)
*errMsg = i18n("Select column for table \"%1\"")
- .arg(it.current()->at(COLUMN_ID_TABLE).toString());
+ .tqarg(it.current()->at(COLUMN_ID_TABLE).toString());
return false;
}
KoProperty::Set *set = d->sets->at(i);
if (set) {
- QString tableName = (*set)["table"].value().toString().stripWhiteSpace();
- QString fieldName = (*set)["field"].value().toString();
- QString fieldAndTableName = fieldName;
+ TQString tableName = (*set)["table"].value().toString().stripWhiteSpace();
+ TQString fieldName = (*set)["field"].value().toString();
+ TQString fieldAndTableName = fieldName;
KexiDB::Field *currentField = 0; // will be set if this column is a single field
KexiDB::QueryColumnInfo* currentColumn = 0;
if (!tableName.isEmpty())
fieldAndTableName.prepend(tableName+".");
const bool fieldVisible = (*set)["visible"].value().toBool();
- QString criteriaStr = (*set)["criteria"].value().toString();
- QCString alias = (*set)["alias"].value().toCString();
+ TQString criteriaStr = (*set)["criteria"].value().toString();
+ TQCString alias = (*set)["alias"].value().toCString();
if (!criteriaStr.isEmpty()) {
int token;
KexiDB::BaseExpr *criteriaExpr = parseExpressionString(criteriaStr, token,
true/*allowRelationalOperator*/);
if (!criteriaExpr) {//for sanity
if (errMsg)
- *errMsg = i18n("Invalid criteria \"%1\"").arg(criteriaStr);
+ *errMsg = i18n("Invalid criteria \"%1\"").tqarg(criteriaStr);
delete whereExpr;
return false;
}
@@ -431,7 +431,7 @@ KexiQueryDesignerGuiEditor::buildSchema(QString *errMsg)
false/*!allowRelationalOperator*/);
if (!columnExpr) {
if (errMsg)
- *errMsg = i18n("Invalid expression \"%1\"").arg(fieldName);
+ *errMsg = i18n("Invalid expression \"%1\"").tqarg(fieldName);
return false;
}
temp->query()->addExpression(columnExpr, fieldVisible);
@@ -523,7 +523,7 @@ KexiQueryDesignerGuiEditor::buildSchema(QString *errMsg)
fieldNumber++;
KexiDB::Field *currentField = 0;
KexiDB::QueryColumnInfo *currentColumn = 0;
- QString sortingString( (*set)["sorting"].value().toString() );
+ TQString sortingString( (*set)["sorting"].value().toString() );
if (sortingString!="ascending" && sortingString!="descending")
continue;
if (!(*set)["visible"].value().toBool()) {
@@ -547,7 +547,7 @@ KexiQueryDesignerGuiEditor::buildSchema(QString *errMsg)
//! @todo support expressions here
continue;
//! @todo ok, but not for expressions
- QString aliasString( (*set)["alias"].value().toString() );
+ TQString aliasString( (*set)["alias"].value().toString() );
currentColumn = temp->query()->columnInfo(
(*set)["table"].value().toString() + "."
+ (aliasString.isEmpty() ? currentField->name() : aliasString) );
@@ -581,14 +581,14 @@ KexiQueryDesignerGuiEditor::beforeSwitchTo(int mode, bool &dontStore)
// if (!d->dataTable->dataAwareObject()->acceptRowEdit())
// return cancelled;
- if (!dirty() && parentDialog()->neverSaved()) {
+ if (!dirty() && tqparentDialog()->neverSaved()) {
KMessageBox::information(this, msgCannotSwitch_EmptyDesign());
return cancelled;
}
if (dirty() || !tempData()->query()) {
//remember current design in a temporary structure
dontStore=true;
- QString errMsg;
+ TQString errMsg;
//build schema; problems are not allowed
if (!buildSchema(&errMsg)) {
KMessageBox::sorry(this, errMsg);
@@ -618,13 +618,13 @@ tristate
KexiQueryDesignerGuiEditor::afterSwitchFrom(int mode)
{
const bool was_dirty = dirty();
- KexiDB::Connection *conn = parentDialog()->mainWin()->project()->dbConnection();
+ KexiDB::Connection *conn = tqparentDialog()->mainWin()->project()->dbConnection();
if (mode==Kexi::NoViewMode || (mode==Kexi::DataViewMode && !tempData()->query())) {
//this is not a SWITCH but a fresh opening in this view mode
if (!m_dialog->neverSaved()) {
if (!loadLayout()) {
//err msg
- parentDialog()->setStatus(conn,
+ tqparentDialog()->settqStatus(conn,
i18n("Query definition loading failed."),
i18n("Query design may be corrupted so it could not be opened even in text view.\n"
"You can delete the query and create it again."));
@@ -633,13 +633,13 @@ KexiQueryDesignerGuiEditor::afterSwitchFrom(int mode)
// Invalid queries case:
// KexiDialogBase::switchToViewMode() first opens DesignViewMode,
// and then KexiQueryPart::loadSchemaData() doesn't allocate QuerySchema object
- // do we're carefully looking at parentDialog()->schemaData()
- KexiDB::QuerySchema * q = dynamic_cast<KexiDB::QuerySchema *>(parentDialog()->schemaData());
+ // do we're carefully looking at tqparentDialog()->schemaData()
+ KexiDB::QuerySchema * q = dynamic_cast<KexiDB::QuerySchema *>(tqparentDialog()->schemaData());
if (q) {
KexiDB::ResultInfo result;
showFieldsForQuery( q, result );
if (!result.success) {
- parentDialog()->setStatus(&result, i18n("Query definition loading failed."));
+ tqparentDialog()->settqStatus(&result, i18n("Query definition loading failed."));
tempData()->proposeOpeningInTextViewModeBecauseOfProblems = true;
return false;
}
@@ -662,7 +662,7 @@ KexiQueryDesignerGuiEditor::afterSwitchFrom(int mode)
KexiDB::ResultInfo result;
showFieldsAndRelationsForQuery( tempData()->query(), result );
if (!result.success) {
- parentDialog()->setStatus(&result, i18n("Query definition loading failed."));
+ tqparentDialog()->settqStatus(&result, i18n("Query definition loading failed."));
return false;
}
}
@@ -698,7 +698,7 @@ KexiQueryDesignerGuiEditor::storeNewData(const KexiDB::SchemaData& sdata, bool &
cancel = true;
return 0;
}
- QString errMsg;
+ TQString errMsg;
KexiQueryPart::TempData * temp = tempData();
if (!temp->query() || !(viewMode()==Kexi::DesignViewMode && !temp->queryChangedInPreviousView)) {
//only rebuild schema if it has not been rebuilt previously
@@ -809,11 +809,11 @@ void KexiQueryDesignerGuiEditor::showFieldsOrRelationsForQueryInternal(
//2. Collect information about criterias
// --this must be top level chain of AND's
// --this will also show joins as: [table1.]field1 = [table2.]field2
- QDict<KexiDB::BaseExpr> criterias(101, false);
+ TQDict<KexiDB::BaseExpr> criterias(101, false);
KexiDB::BaseExpr* e = query->whereExpression();
KexiDB::BaseExpr* eItem = 0;
while (e) {
- //eat parentheses because the expression can be (....) AND (... AND ... )
+ //eat tqparentheses because the expression can be (....) AND (... AND ... )
while (e && e->toUnary() && e->token()=='(')
e = e->toUnary()->arg();
@@ -826,7 +826,7 @@ void KexiQueryDesignerGuiEditor::showFieldsOrRelationsForQueryInternal(
e = 0;
}
- //eat parentheses
+ //eat tqparentheses
while (eItem && eItem->toUnary() && eItem->token()=='(')
eItem = eItem->toUnary()->arg();
@@ -877,14 +877,14 @@ void KexiQueryDesignerGuiEditor::showFieldsOrRelationsForQueryInternal(
//3. show fields (including * and table.*)
uint row_num = 0;
KexiDB::Field *field;
- QPtrDict<char> usedCriterias(101); // <-- used criterias will be saved here
+ TQPtrDict<char> usedCriterias(101); // <-- used criterias will be saved here
// so in step 4. we will be able to add
// remaining invisible columns with criterias
for (KexiDB::Field::ListIterator it(*query->fields());
(field = it.current()); ++it, row_num++)
{
//append a new row
- QString tableName, fieldName, columnAlias, criteriaString;
+ TQString tableName, fieldName, columnAlias, criteriaString;
KexiDB::BinaryExpr *criteriaExpr = 0;
KexiDB::BaseExpr *criteriaArgument = 0;
if (field->isQueryAsterisk()) {
@@ -901,7 +901,7 @@ void KexiQueryDesignerGuiEditor::showFieldsOrRelationsForQueryInternal(
columnAlias = query->columnAlias(row_num);
if (field->isExpression()) {
// if (columnAlias.isEmpty()) {
-// columnAlias = i18n("expression", "expr%1").arg(row_num); //TODO
+// columnAlias = i18n("expression", "expr%1").tqarg(row_num); //TODO
// }
// if (columnAlias.isEmpty())
//TODO: ok? perhaps do not allow to omit aliases?
@@ -916,8 +916,8 @@ void KexiQueryDesignerGuiEditor::showFieldsOrRelationsForQueryInternal(
if (!criteriaArgument) {//try table.field
criteriaArgument = criterias[tableName+"."+fieldName];
}
- if (criteriaArgument) {//criteria expression is just a parent of argument
- criteriaExpr = criteriaArgument->parent()->toBinary();
+ if (criteriaArgument) {//criteria expression is just a tqparent of argument
+ criteriaExpr = criteriaArgument->tqparent()->toBinary();
usedCriterias.insert(criteriaArgument, (char*)1); //save info. about used criteria
}
}
@@ -942,7 +942,7 @@ void KexiQueryDesignerGuiEditor::showFieldsOrRelationsForQueryInternal(
if (field->isExpression()) {
// (*newItem)[COLUMN_ID_COLUMN] = ;
if (!d->changeSingleCellValue(*newItem, COLUMN_ID_COLUMN,
- QVariant(columnAlias + ": " + field->expression()->toString()), &result))
+ TQVariant(columnAlias + ": " + field->expression()->toString()), &result))
return; //problems with setting column expression
}
}
@@ -950,7 +950,7 @@ void KexiQueryDesignerGuiEditor::showFieldsOrRelationsForQueryInternal(
//4. show ORDER BY information
d->data->clearRowEditBuffer();
KexiDB::OrderByColumnList &orderByColumns = query->orderByColumnList();
- QMap<KexiDB::QueryColumnInfo*,int> columnsOrder(
+ TQMap<KexiDB::QueryColumnInfo*,int> columnsOrder(
query->columnsOrder(KexiDB::QuerySchema::UnexpandedListWithoutAsterisks) );
for (KexiDB::OrderByColumn::ListConstIterator orderByColumnsIt( orderByColumns.constBegin() );
orderByColumnsIt!=orderByColumns.constEnd(); ++orderByColumnsIt)
@@ -961,7 +961,7 @@ void KexiQueryDesignerGuiEditor::showFieldsOrRelationsForQueryInternal(
if (column) {
//sorting for visible column
if (column->visible) {
- if (columnsOrder.contains(column)) {
+ if (columnsOrder.tqcontains(column)) {
const int columnPosition = columnsOrder[ column ];
rowItem = d->data->at( columnPosition );
rowPropertySet = d->sets->at( columnPosition );
@@ -974,7 +974,7 @@ void KexiQueryDesignerGuiEditor::showFieldsOrRelationsForQueryInternal(
else if ((*orderByColumnsIt).field()) {
//this will be presented as invisible field: create new row
field = (*orderByColumnsIt).field();
- QString tableName( field->table() ? field->table()->name() : QString::null );
+ TQString tableName( field->table() ? field->table()->name() : TQString() );
rowItem = createNewRow( tableName, field->name(), false /* !visible*/);
d->dataTable->dataAwareObject()->insertItem(rowItem, row_num);
rowPropertySet = createPropertySet( row_num, tableName, field->name(), true /*newOne*/ );
@@ -992,17 +992,17 @@ void KexiQueryDesignerGuiEditor::showFieldsOrRelationsForQueryInternal(
d->data->saveRowChanges(*rowItem, true);
(*rowPropertySet)["sorting"].clearModifiedFlag(); // this property should look "fresh"
if (!rowItem->at(COLUMN_ID_VISIBLE).toBool()) //update
- (*rowPropertySet)["visible"].setValue(QVariant(false,0), false/*rememberOldValue*/);
+ (*rowPropertySet)["visible"].setValue(TQVariant(false,0), false/*rememberOldValue*/);
}
}
//5. Show fields for unused criterias (with "Visible" column set to false)
KexiDB::BaseExpr *criteriaArgument; // <-- contains field or table.field
- for (QDictIterator<KexiDB::BaseExpr> it(criterias); (criteriaArgument = it.current()); ++it) {
+ for (TQDictIterator<KexiDB::BaseExpr> it(criterias); (criteriaArgument = it.current()); ++it) {
if (usedCriterias[it.current()])
continue;
//unused: append a new row
- KexiDB::BinaryExpr *criteriaExpr = criteriaArgument->parent()->toBinary();
+ KexiDB::BinaryExpr *criteriaExpr = criteriaArgument->tqparent()->toBinary();
if (!criteriaExpr) {
kexipluginswarn << "KexiQueryDesignerGuiEditor::showFieldsOrRelationsForQueryInternal(): "
"criteriaExpr is not a binary expr" << endl;
@@ -1018,7 +1018,7 @@ void KexiQueryDesignerGuiEditor::showFieldsOrRelationsForQueryInternal(
}
}
KexiDB::Field* field = 0;
- if (-1 == columnNameArgument->name.find('.') && query->tables()->count()==1) {
+ if (-1 == columnNameArgument->name.tqfind('.') && query->tables()->count()==1) {
//extreme case: only field name provided for one-table query:
field = query->tables()->first()->field(columnNameArgument->name);
}
@@ -1031,7 +1031,7 @@ void KexiQueryDesignerGuiEditor::showFieldsOrRelationsForQueryInternal(
"no columnInfo found in the query for name \"" << columnNameArgument->name << endl;
continue;
}
- QString tableName, fieldName, columnAlias, criteriaString;
+ TQString tableName, fieldName, columnAlias, criteriaString;
//! @todo what about ALIAS?
tableName = field->table()->name();
fieldName = field->name();
@@ -1052,7 +1052,7 @@ void KexiQueryDesignerGuiEditor::showFieldsOrRelationsForQueryInternal(
//! @todo set["alias"].setValue(columnAlias, false);
//// if (!criteriaString.isEmpty())
set["criteria"].setValue( criteriaString, false );
- set["visible"].setValue( QVariant(false,1), false );
+ set["visible"].setValue( TQVariant(false,1), false );
}
//current property set has most probably changed
@@ -1067,32 +1067,32 @@ void KexiQueryDesignerGuiEditor::showFieldsOrRelationsForQueryInternal(
bool KexiQueryDesignerGuiEditor::loadLayout()
{
- QString xml;
+ TQString xml;
// if (!loadDataBlock( xml, "query_layout" )) {
loadDataBlock( xml, "query_layout" );
//TODO errmsg
// return false;
// }
if (xml.isEmpty()) {
- //in a case when query layout was not saved, build layout by hand
+ //in a case when query tqlayout was not saved, build tqlayout by hand
// -- dynamic cast because of a need for handling invalid queries
// (as in KexiQueryDesignerGuiEditor::afterSwitchFrom()):
- KexiDB::QuerySchema * q = dynamic_cast<KexiDB::QuerySchema *>(parentDialog()->schemaData());
+ KexiDB::QuerySchema * q = dynamic_cast<KexiDB::QuerySchema *>(tqparentDialog()->schemaData());
if (q) {
showTablesForQuery( q );
KexiDB::ResultInfo result;
showRelationsForQuery( q, result );
if (!result.success) {
- parentDialog()->setStatus(&result, i18n("Query definition loading failed."));
+ tqparentDialog()->settqStatus(&result, i18n("Query definition loading failed."));
return false;
}
}
return true;
}
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent(xml);
- QDomElement doc_el = doc.documentElement(), el;
+ TQDomElement doc_el = doc.documentElement(), el;
if (doc_el.tagName()!="query_layout") {
//TODO errmsg
return false;
@@ -1108,9 +1108,9 @@ bool KexiQueryDesignerGuiEditor::loadLayout()
int y = el.attribute("y","-1").toInt();
int width = el.attribute("width","-1").toInt();
int height = el.attribute("height","-1").toInt();
- QRect rect;
+ TQRect rect;
if (x!=-1 || y!=-1 || width!=-1 || height!=-1)
- rect = QRect(x,y,width,height);
+ rect = TQRect(x,y,width,height);
d->relations->addTable( t, rect );
}
else if (el.tagName()=="conn") {
@@ -1140,30 +1140,30 @@ bool KexiQueryDesignerGuiEditor::storeLayout()
KexiDB::Connection::SelectStatementOptions options;
options.identifierEscaping = KexiDB::Driver::EscapeKexi|KexiDB::Driver::EscapeAsNecessary;
options.addVisibleLookupColumns = false;
- QString sqlText = dbConn->selectStatement( *temp->query(), options );
+ TQString sqlText = dbConn->selectStatement( *temp->query(), options );
if (!storeDataBlock( sqlText, "sql" )) {
return false;
}
//serialize detailed XML query definition
- QString xml = "<query_layout>", tmp;
+ TQString xml = "<query_layout>", tmp;
for (TablesDictIterator it(*d->relations->tables()); it.current(); ++it) {
KexiRelationViewTableContainer *table_cont = it.current();
/*! @todo what about query? */
- tmp = QString("<table name=\"")+QString(table_cont->schema()->name())+"\" x=\""
- +QString::number(table_cont->x())
- +"\" y=\""+QString::number(table_cont->y())
- +"\" width=\""+QString::number(table_cont->width())
- +"\" height=\""+QString::number(table_cont->height())
+ tmp = TQString("<table name=\"")+TQString(table_cont->schema()->name())+"\" x=\""
+ +TQString::number(table_cont->x())
+ +"\" y=\""+TQString::number(table_cont->y())
+ +"\" width=\""+TQString::number(table_cont->width())
+ +"\" height=\""+TQString::number(table_cont->height())
+"\"/>";
xml += tmp;
}
KexiRelationViewConnection *con;
for (ConnectionListIterator it(*d->relations->connections()); (con = it.current()); ++it) {
- tmp = QString("<conn mtable=\"") + QString(con->masterTable()->schema()->name())
+ tmp = TQString("<conn mtable=\"") + TQString(con->masterTable()->schema()->name())
+ "\" mfield=\"" + con->masterField() + "\" dtable=\""
- + QString(con->detailsTable()->schema()->name())
+ + TQString(con->detailsTable()->schema()->name())
+ "\" dfield=\"" + con->detailsField() + "\"/>";
xml += tmp;
}
@@ -1177,19 +1177,19 @@ bool KexiQueryDesignerGuiEditor::storeLayout()
return true;
}
-QSize KexiQueryDesignerGuiEditor::sizeHint() const
+TQSize KexiQueryDesignerGuiEditor::tqsizeHint() const
{
- QSize s1 = d->relations->sizeHint();
- QSize s2 = d->head->sizeHint();
- return QSize(QMAX(s1.width(),s2.width()), s1.height()+s2.height());
+ TQSize s1 = d->relations->tqsizeHint();
+ TQSize s2 = d->head->tqsizeHint();
+ return TQSize(TQMAX(s1.width(),s2.width()), s1.height()+s2.height());
}
KexiTableItem*
-KexiQueryDesignerGuiEditor::createNewRow(const QString& tableName, const QString& fieldName,
+KexiQueryDesignerGuiEditor::createNewRow(const TQString& tableName, const TQString& fieldName,
bool visible) const
{
KexiTableItem *newItem = d->data->createItem();
- QString key;
+ TQString key;
if (tableName=="*")
key="*";
else {
@@ -1199,15 +1199,15 @@ KexiQueryDesignerGuiEditor::createNewRow(const QString& tableName, const QString
}
(*newItem)[COLUMN_ID_COLUMN]=key;
(*newItem)[COLUMN_ID_TABLE]=tableName;
- (*newItem)[COLUMN_ID_VISIBLE]=QVariant(visible, 1);
-#ifndef KEXI_NO_QUERY_TOTALS
- (*newItem)[COLUMN_ID_TOTALS]=QVariant(0);
+ (*newItem)[COLUMN_ID_VISIBLE]=TQVariant(visible, 1);
+#ifndef KEXI_NO_TQUERY_TOTALS
+ (*newItem)[COLUMN_ID_TOTALS]=TQVariant(0);
#endif
return newItem;
}
void KexiQueryDesignerGuiEditor::slotDragOverTableRow(
- KexiTableItem * /*item*/, int /*row*/, QDragMoveEvent* e)
+ KexiTableItem * /*item*/, int /*row*/, TQDragMoveEvent* e)
{
if (e->provides("kexi/field")) {
e->acceptAction(true);
@@ -1216,11 +1216,11 @@ void KexiQueryDesignerGuiEditor::slotDragOverTableRow(
void
KexiQueryDesignerGuiEditor::slotDroppedAtRow(KexiTableItem * /*item*/, int /*row*/,
- QDropEvent *ev, KexiTableItem*& newItem)
+ TQDropEvent *ev, KexiTableItem*& newItem)
{
- QString sourceMimeType;
- QString srcTable;
- QString srcField;
+ TQString sourceMimeType;
+ TQString srcTable;
+ TQString srcField;
if (!KexiFieldDrag::decodeSingle(ev,sourceMimeType,srcTable,srcField))
return;
@@ -1236,10 +1236,10 @@ void KexiQueryDesignerGuiEditor::slotNewItemAppendedForAfterDeletingInSpreadShee
{
KexiTableItem *item = d->data->last();
if (item)
- item->at(COLUMN_ID_VISIBLE) = QVariant(false, 0); //the same init as in initTableRows()
+ item->at(COLUMN_ID_VISIBLE) = TQVariant(false, 0); //the same init as in initTableRows()
}
-void KexiQueryDesignerGuiEditor::slotRowInserted(KexiTableItem* item, uint row, bool /*repaint*/)
+void KexiQueryDesignerGuiEditor::slotRowInserted(KexiTableItem* item, uint row, bool /*tqrepaint*/)
{
if (d->droppedNewItem && d->droppedNewItem==item) {
createPropertySet( row, d->droppedNewTable, d->droppedNewField, true );
@@ -1264,35 +1264,35 @@ void KexiQueryDesignerGuiEditor::slotTableHidden(KexiDB::TableSchema & /*t*/)
}
/*! @internal generates smallest unique alias */
-QCString KexiQueryDesignerGuiEditor::generateUniqueAlias() const
+TQCString KexiQueryDesignerGuiEditor::generateUniqueAlias() const
{
//TODO: add option for using non-i18n'd "expr" prefix?
- const QCString expStr
+ const TQCString expStr
= i18n("short for 'expression' word (only latin letters, please)", "expr").latin1();
//TODO: optimization: cache it?
- QAsciiDict<char> aliases(101);
+ TQAsciiDict<char> aliases(101);
for (int r = 0; r<(int)d->sets->size(); r++) {
KoProperty::Set *set = d->sets->at(r);
if (set) {
- const QCString a = (*set)["alias"].value().toCString().lower();
+ const TQCString a = (*set)["alias"].value().toCString().lower();
if (!a.isEmpty())
aliases.insert(a,(char*)1);
}
}
int aliasNr=1;
for (;;aliasNr++) {
- if (!aliases[expStr+QString::number(aliasNr).latin1()])
+ if (!aliases[expStr+TQString::number(aliasNr).latin1()])
break;
}
- return expStr+QString::number(aliasNr).latin1();
+ return expStr+TQString::number(aliasNr).latin1();
}
//! @todo this is primitive, temporary: reuse SQL parser
KexiDB::BaseExpr*
-KexiQueryDesignerGuiEditor::parseExpressionString(const QString& fullString, int& token,
+KexiQueryDesignerGuiEditor::parseExpressionString(const TQString& fullString, int& token,
bool allowRelationalOperator)
{
- QString str = fullString.stripWhiteSpace();
+ TQString str = fullString.stripWhiteSpace();
int len = 0;
//KexiDB::BaseExpr *expr = 0;
//1. get token
@@ -1333,7 +1333,7 @@ KexiQueryDesignerGuiEditor::parseExpressionString(const QString& fullString, int
return 0;
KexiDB::BaseExpr *valueExpr = 0;
- QRegExp re;
+ TQRegExp re;
if (str.length()>=2 &&
(
(str.startsWith("\"") && str.endsWith("\""))
@@ -1345,38 +1345,38 @@ KexiQueryDesignerGuiEditor::parseExpressionString(const QString& fullString, int
else if (str.startsWith("[") && str.endsWith("]")) {
valueExpr = new KexiDB::QueryParameterExpr(str.mid(1,str.length()-2));
}
- else if ((re = QRegExp("(\\d{1,4})-(\\d{1,2})-(\\d{1,2})")).exactMatch( str ))
+ else if ((re = TQRegExp("(\\d{1,4})-(\\d{1,2})-(\\d{1,2})")).exactMatch( str ))
{
- valueExpr = new KexiDB::ConstExpr(DATE_CONST, QDate::fromString(
+ valueExpr = new KexiDB::ConstExpr(DATE_CONST, TQDate::fromString(
re.cap(1).rightJustify(4, '0')+"-"+re.cap(2).rightJustify(2, '0')
+"-"+re.cap(3).rightJustify(2, '0'), Qt::ISODate));
}
- else if ((re = QRegExp("(\\d{1,2}):(\\d{1,2})")).exactMatch( str )
- || (re = QRegExp("(\\d{1,2}):(\\d{1,2}):(\\d{1,2})")).exactMatch( str ))
+ else if ((re = TQRegExp("(\\d{1,2}):(\\d{1,2})")).exactMatch( str )
+ || (re = TQRegExp("(\\d{1,2}):(\\d{1,2}):(\\d{1,2})")).exactMatch( str ))
{
- QString res = re.cap(1).rightJustify(2, '0')+":"+re.cap(2).rightJustify(2, '0')
+ TQString res = re.cap(1).rightJustify(2, '0')+":"+re.cap(2).rightJustify(2, '0')
+":"+re.cap(3).rightJustify(2, '0');
// kexipluginsdbg << res << endl;
- valueExpr = new KexiDB::ConstExpr(TIME_CONST, QTime::fromString(res, Qt::ISODate));
+ valueExpr = new KexiDB::ConstExpr(TIME_CONST, TQTime::fromString(res, Qt::ISODate));
}
- else if ((re = QRegExp("(\\d{1,4})-(\\d{1,2})-(\\d{1,2})\\s+(\\d{1,2}):(\\d{1,2})")).exactMatch( str )
- || (re = QRegExp("(\\d{1,4})-(\\d{1,2})-(\\d{1,2})\\s+(\\d{1,2}):(\\d{1,2}):(\\d{1,2})")).exactMatch( str ))
+ else if ((re = TQRegExp("(\\d{1,4})-(\\d{1,2})-(\\d{1,2})\\s+(\\d{1,2}):(\\d{1,2})")).exactMatch( str )
+ || (re = TQRegExp("(\\d{1,4})-(\\d{1,2})-(\\d{1,2})\\s+(\\d{1,2}):(\\d{1,2}):(\\d{1,2})")).exactMatch( str ))
{
- QString res = re.cap(1).rightJustify(4, '0')+"-"+re.cap(2).rightJustify(2, '0')
+ TQString res = re.cap(1).rightJustify(4, '0')+"-"+re.cap(2).rightJustify(2, '0')
+"-"+re.cap(3).rightJustify(2, '0')
+"T"+re.cap(4).rightJustify(2, '0')+":"+re.cap(5).rightJustify(2, '0')
+":"+re.cap(6).rightJustify(2, '0');
// kexipluginsdbg << res << endl;
valueExpr = new KexiDB::ConstExpr(DATETIME_CONST,
- QDateTime::fromString(res, Qt::ISODate));
+ TQDateTime::fromString(res, Qt::ISODate));
}
else if (str[0]>='0' && str[0]<='9' || str[0]=='-' || str[0]=='+') {
//number
- QString decimalSym = KGlobal::locale()->decimalSymbol();
+ TQString decimalSym = KGlobal::locale()->decimalSymbol();
bool ok;
- int pos = str.find('.');
+ int pos = str.tqfind('.');
if (pos==-1) {//second chance: local decimal symbol
- pos = str.find(decimalSym);
+ pos = str.tqfind(decimalSym);
}
if (pos>=0) {//real const number
const int left = str.left(pos).toInt(&ok);
@@ -1385,18 +1385,18 @@ KexiQueryDesignerGuiEditor::parseExpressionString(const QString& fullString, int
const int right = str.mid(pos+1).toInt(&ok);
if (!ok)
return 0;
- valueExpr = new KexiDB::ConstExpr(REAL_CONST, QPoint(left,right)); //decoded to QPoint
+ valueExpr = new KexiDB::ConstExpr(REAL_CONST, TQPoint(left,right)); //decoded to TQPoint
}
else {
//integer const
- const Q_LLONG val = str.toLongLong(&ok);
+ const TQ_LLONG val = str.toLongLong(&ok);
if (!ok)
return 0;
valueExpr = new KexiDB::ConstExpr(INTEGER_CONST, val);
}
}
else if (str.lower()=="null") {
- valueExpr = new KexiDB::ConstExpr(SQL_NULL, QVariant());
+ valueExpr = new KexiDB::ConstExpr(SQL_NULL, TQVariant());
}
else {//identfier
if (!KexiUtils::isIdentifier(str))
@@ -1415,33 +1415,33 @@ KexiQueryDesignerGuiEditor::parseExpressionString(const QString& fullString, int
}
void KexiQueryDesignerGuiEditor::slotBeforeCellChanged(KexiTableItem *item, int colnum,
- QVariant& newValue, KexiDB::ResultInfo* result)
+ TQVariant& newValue, KexiDB::ResultInfo* result)
{
if (colnum == COLUMN_ID_COLUMN) {
if (newValue.isNull()) {
- d->data->updateRowEditBuffer(item, COLUMN_ID_TABLE, QVariant(), false/*!allowSignals*/);
- d->data->updateRowEditBuffer(item, COLUMN_ID_VISIBLE, QVariant(false,1));//invisible
- d->data->updateRowEditBuffer(item, COLUMN_ID_SORTING, QVariant());
-#ifndef KEXI_NO_QUERY_TOTALS
- d->data->updateRowEditBuffer(item, COLUMN_ID_TOTALS, QVariant());//remove totals
+ d->data->updateRowEditBuffer(item, COLUMN_ID_TABLE, TQVariant(), false/*!allowSignals*/);
+ d->data->updateRowEditBuffer(item, COLUMN_ID_VISIBLE, TQVariant(false,1));//invisible
+ d->data->updateRowEditBuffer(item, COLUMN_ID_SORTING, TQVariant());
+#ifndef KEXI_NO_TQUERY_TOTALS
+ d->data->updateRowEditBuffer(item, COLUMN_ID_TOTALS, TQVariant());//remove totals
#endif
- d->data->updateRowEditBuffer(item, COLUMN_ID_CRITERIA, QVariant());//remove crit.
+ d->data->updateRowEditBuffer(item, COLUMN_ID_CRITERIA, TQVariant());//remove crit.
d->sets->removeCurrentPropertySet();
}
else {
//auto fill 'table' column
- QString fieldId( newValue.toString().stripWhiteSpace() ); //tmp, can look like "table.field"
- QString fieldName; //"field" part of "table.field" or expression string
- QString tableName; //empty for expressions
- QCString alias;
- QString columnValueForExpr; //for setting pretty printed "alias: expr" in 1st column
+ TQString fieldId( newValue.toString().stripWhiteSpace() ); //tmp, can look like "table.field"
+ TQString fieldName; //"field" part of "table.field" or expression string
+ TQString tableName; //empty for expressions
+ TQCString alias;
+ TQString columnValueForExpr; //for setting pretty printed "alias: expr" in 1st column
const bool isExpression = !d->fieldColumnIdentifiers[fieldId];
if (isExpression) {
//this value is entered by hand and doesn't match
//any value in the combo box -- we're assuming this is an expression
//-table remains null
- //-find "alias" in something like "alias : expr"
- const int id = fieldId.find(':');
+ //-tqfind "alias" in something like "alias : expr"
+ const int id = fieldId.tqfind(':');
if (id>0) {
alias = fieldId.left(id).stripWhiteSpace().latin1();
if (!KexiUtils::isIdentifier(alias)) {
@@ -1449,7 +1449,7 @@ void KexiQueryDesignerGuiEditor::slotBeforeCellChanged(KexiTableItem *item, int
result->allowToDiscardChanges = true;
result->column = colnum;
result->msg = i18n("Entered column alias \"%1\" is not a valid identifier.")
- .arg(alias);
+ .tqarg(alias.data());
result->desc = i18n("Identifiers should start with a letter or '_' character");
return;
}
@@ -1468,7 +1468,7 @@ void KexiQueryDesignerGuiEditor::slotBeforeCellChanged(KexiTableItem *item, int
result->success = false;
result->allowToDiscardChanges = true;
result->column = colnum;
- result->msg = i18n("Invalid expression \"%1\"").arg(fieldName);
+ result->msg = i18n("Invalid expression \"%1\"").tqarg(fieldName);
return;
}
}
@@ -1490,7 +1490,7 @@ void KexiQueryDesignerGuiEditor::slotBeforeCellChanged(KexiTableItem *item, int
KoProperty::Set *set = d->sets->findPropertySetForItem(*item); //*propertyBuffer();
if (!set) {
saveOldValue = false; // no old val.
- const int row = d->data->findRef(item);
+ const int row = d->data->tqfindRef(item);
if (row<0) {
result->success = false;
return;
@@ -1498,15 +1498,15 @@ void KexiQueryDesignerGuiEditor::slotBeforeCellChanged(KexiTableItem *item, int
set = createPropertySet( row, tableName, fieldName, true );
propertySetSwitched();
}
- d->data->updateRowEditBuffer(item, COLUMN_ID_TABLE, QVariant(tableName), false/*!allowSignals*/);
- d->data->updateRowEditBuffer(item, COLUMN_ID_VISIBLE, QVariant(true,1));
-#ifndef KEXI_NO_QUERY_TOTALS
- d->data->updateRowEditBuffer(item, COLUMN_ID_TOTALS, QVariant(0));
+ d->data->updateRowEditBuffer(item, COLUMN_ID_TABLE, TQVariant(tableName), false/*!allowSignals*/);
+ d->data->updateRowEditBuffer(item, COLUMN_ID_VISIBLE, TQVariant(true,1));
+#ifndef KEXI_NO_TQUERY_TOTALS
+ d->data->updateRowEditBuffer(item, COLUMN_ID_TOTALS, TQVariant(0));
#endif
if (!sortingAllowed(fieldName, tableName)) {
// sorting is not available for "*" or "table.*" rows
//! @todo what about expressions?
- d->data->updateRowEditBuffer(item, COLUMN_ID_SORTING, QVariant());
+ d->data->updateRowEditBuffer(item, COLUMN_ID_SORTING, TQVariant());
}
//update properties
(*set)["field"].setValue(fieldName, saveOldValue);
@@ -1517,13 +1517,13 @@ void KexiQueryDesignerGuiEditor::slotBeforeCellChanged(KexiTableItem *item, int
if (alias.isEmpty()) //-generate smallest unique alias
alias = generateUniqueAlias();
}
- (*set)["isExpression"].setValue(QVariant(isExpression,1), saveOldValue);
+ (*set)["isExpression"].setValue(TQVariant(isExpression,1), saveOldValue);
if (!alias.isEmpty()) {
(*set)["alias"].setValue(alias, saveOldValue);
//pretty printed "alias: expr"
- newValue = QString(alias) + ": " + fieldName;
+ newValue = TQString(alias) + ": " + fieldName;
}
- (*set)["caption"].setValue(QString::null, saveOldValue);
+ (*set)["caption"].setValue(TQString(), saveOldValue);
(*set)["table"].setValue(tableName, saveOldValue);
updatePropertiesVisibility(*set);
}
@@ -1531,12 +1531,12 @@ void KexiQueryDesignerGuiEditor::slotBeforeCellChanged(KexiTableItem *item, int
else if (colnum==COLUMN_ID_TABLE) {
if (newValue.isNull()) {
if (!item->at(COLUMN_ID_COLUMN).toString().isEmpty())
- d->data->updateRowEditBuffer(item, COLUMN_ID_COLUMN, QVariant(), false/*!allowSignals*/);
- d->data->updateRowEditBuffer(item, COLUMN_ID_VISIBLE, QVariant(false,1));//invisible
-#ifndef KEXI_NO_QUERY_TOTALS
- d->data->updateRowEditBuffer(item, COLUMN_ID_TOTALS, QVariant());//remove totals
+ d->data->updateRowEditBuffer(item, COLUMN_ID_COLUMN, TQVariant(), false/*!allowSignals*/);
+ d->data->updateRowEditBuffer(item, COLUMN_ID_VISIBLE, TQVariant(false,1));//invisible
+#ifndef KEXI_NO_TQUERY_TOTALS
+ d->data->updateRowEditBuffer(item, COLUMN_ID_TOTALS, TQVariant());//remove totals
#endif
- d->data->updateRowEditBuffer(item, COLUMN_ID_CRITERIA, QVariant());//remove crit.
+ d->data->updateRowEditBuffer(item, COLUMN_ID_CRITERIA, TQVariant());//remove crit.
d->sets->removeCurrentPropertySet();
}
//update property
@@ -1544,11 +1544,11 @@ void KexiQueryDesignerGuiEditor::slotBeforeCellChanged(KexiTableItem *item, int
if (set) {
if ((*set)["isExpression"].value().toBool()==false) {
(*set)["table"] = newValue;
- (*set)["caption"] = QString::null;
+ (*set)["caption"] = TQString();
}
else {
//do not set table for expr. columns
- newValue = QVariant();
+ newValue = TQVariant();
}
// KoProperty::Set &set = *propertyBuffer();
updatePropertiesVisibility(*set);
@@ -1560,15 +1560,15 @@ void KexiQueryDesignerGuiEditor::slotBeforeCellChanged(KexiTableItem *item, int
saveOldValue = false;
createPropertySet( d->dataTable->dataAwareObject()->currentRow(),
item->at(COLUMN_ID_TABLE).toString(), item->at(COLUMN_ID_COLUMN).toString(), true );
-#ifndef KEXI_NO_QUERY_TOTALS
- d->data->updateRowEditBuffer(item, COLUMN_ID_TOTALS, QVariant(0));//totals
+#ifndef KEXI_NO_TQUERY_TOTALS
+ d->data->updateRowEditBuffer(item, COLUMN_ID_TOTALS, TQVariant(0));//totals
#endif
propertySetSwitched();
}
KoProperty::Set &set = *propertySet();
set["visible"].setValue(newValue, saveOldValue);
}
-#ifndef KEXI_NO_QUERY_TOTALS
+#ifndef KEXI_NO_TQUERY_TOTALS
else if (colnum==COLUMN_ID_TOTALS) {
//TODO:
//unused yet
@@ -1577,11 +1577,11 @@ void KexiQueryDesignerGuiEditor::slotBeforeCellChanged(KexiTableItem *item, int
#endif
else if (colnum==COLUMN_ID_SORTING) {
KoProperty::Set *set = d->sets->findPropertySetForItem(*item);
- QString table( set->property("table").value().toString() );
- QString field( set->property("field").value().toString() );
+ TQString table( set->property("table").value().toString() );
+ TQString field( set->property("field").value().toString() );
if (newValue.toInt()==0 || sortingAllowed(field, table)) {
KoProperty::Property &property = set->property("sorting");
- QString key( property.listData()->keysAsStringList()[ newValue.toInt() ] );
+ TQString key( property.listData()->keysAsStringList()[ newValue.toInt() ] );
kexipluginsdbg << "new key=" << key << endl;
property.setValue(key, true);
}
@@ -1590,29 +1590,29 @@ void KexiQueryDesignerGuiEditor::slotBeforeCellChanged(KexiTableItem *item, int
result->allowToDiscardChanges = true;
result->column = colnum;
result->msg = i18n("Could not set sorting for multiple columns (%1)")
- .arg(table=="*" ? table : (table+".*"));
+ .tqarg(table=="*" ? table : (table+".*"));
}
}
else if (colnum==COLUMN_ID_CRITERIA) {
//! @todo this is primitive, temporary: reuse SQL parser
- QString operatorStr, argStr;
+ TQString operatorStr, argStr;
KexiDB::BaseExpr* e = 0;
- const QString str = newValue.toString().stripWhiteSpace();
+ const TQString str = newValue.toString().stripWhiteSpace();
int token;
- QString field, table;
+ TQString field, table;
KoProperty::Set *set = d->sets->findPropertySetForItem(*item);
if (set) {
field = (*set)["field"].value().toString();
table = (*set)["table"].value().toString();
}
- if (!str.isEmpty() && (!set || table=="*" || field.find("*")!=-1)) {
+ if (!str.isEmpty() && (!set || table=="*" || field.tqfind("*")!=-1)) {
//asterisk found! criteria not allowed
result->success = false;
result->allowToDiscardChanges = true;
result->column = colnum;
if (propertySet())
result->msg = i18n("Could not set criteria for \"%1\"")
- .arg(table=="*" ? table : field);
+ .tqarg(table=="*" ? table : field);
else
result->msg = i18n("Could not set criteria for empty row");
//moved to result->allowToDiscardChanges handler //d->dataTable->dataAwareObject()->cancelEditor(); //prevents further editing of this cell
@@ -1620,7 +1620,7 @@ void KexiQueryDesignerGuiEditor::slotBeforeCellChanged(KexiTableItem *item, int
else if (str.isEmpty() || (e = parseExpressionString(str, token, true/*allowRelationalOperator*/)))
{
if (e) {
- QString tokenStr;
+ TQString tokenStr;
if (token!='=') {
KexiDB::BinaryExpr be(KexiDBExpr_Relational, 0, token, 0);
tokenStr = be.tokenToString() + " ";
@@ -1630,7 +1630,7 @@ void KexiQueryDesignerGuiEditor::slotBeforeCellChanged(KexiTableItem *item, int
delete e;
}
else if (str.isEmpty()) {
- (*set)["criteria"] = QVariant(); //clear it
+ (*set)["criteria"] = TQVariant(); //clear it
}
setDirty(true);
}
@@ -1638,7 +1638,7 @@ void KexiQueryDesignerGuiEditor::slotBeforeCellChanged(KexiTableItem *item, int
result->success = false;
result->allowToDiscardChanges = true;
result->column = colnum;
- result->msg = i18n("Invalid criteria \"%1\"").arg(newValue.toString());
+ result->msg = i18n("Invalid criteria \"%1\"").tqarg(newValue.toString());
}
}
}
@@ -1654,7 +1654,7 @@ void KexiQueryDesignerGuiEditor::slotAboutConnectionRemove(KexiRelationViewConne
}
void KexiQueryDesignerGuiEditor::slotTableFieldDoubleClicked(
- KexiDB::TableSchema* table, const QString& fieldName )
+ KexiDB::TableSchema* table, const TQString& fieldName )
{
if (!table || (!table->field(fieldName) && fieldName!="*"))
return;
@@ -1695,10 +1695,10 @@ void KexiQueryDesignerGuiEditor::updatePropertiesVisibility(KoProperty::Set& set
KoProperty::Set*
KexiQueryDesignerGuiEditor::createPropertySet( int row,
- const QString& tableName, const QString& fieldName, bool newOne )
+ const TQString& tableName, const TQString& fieldName, bool newOne )
{
//const bool asterisk = isAsterisk(tableName, fieldName);
- QString typeName = "KexiQueryDesignerGuiEditor::Column";
+ TQString typeName = "KexiQueryDesignerGuiEditor::Column";
KoProperty::Set *set = new KoProperty::Set(d->sets, typeName);
KoProperty::Property *prop;
@@ -1708,42 +1708,42 @@ KexiQueryDesignerGuiEditor::createPropertySet( int row,
//! \todo add table_field icon (add buff->addProperty(prop = new KexiProperty("this:iconName", "table_field") );
// prop->setVisible(false);
- set->addProperty(prop = new KoProperty::Property("table", QVariant(tableName)) );
+ set->addProperty(prop = new KoProperty::Property("table", TQVariant(tableName)) );
prop->setVisible(false);//always hidden
- set->addProperty(prop = new KoProperty::Property("field", QVariant(fieldName)) );
+ set->addProperty(prop = new KoProperty::Property("field", TQVariant(fieldName)) );
prop->setVisible(false);//always hidden
- set->addProperty(prop = new KoProperty::Property("caption", QVariant(QString::null), i18n("Caption") ) );
+ set->addProperty(prop = new KoProperty::Property("caption", TQVariant(TQString()), i18n("Caption") ) );
#ifdef KEXI_NO_UNFINISHED
prop->setVisible(false);
#endif
- set->addProperty(prop = new KoProperty::Property("alias", QVariant(QString::null), i18n("Alias")) );
+ set->addProperty(prop = new KoProperty::Property("alias", TQVariant(TQString()), i18n("Alias")) );
- set->addProperty(prop = new KoProperty::Property("visible", QVariant(true, 4)) );
+ set->addProperty(prop = new KoProperty::Property("visible", TQVariant(true, 4)) );
prop->setVisible(false);
/*TODO:
- set->addProperty(prop = new KexiProperty("totals", QVariant(QString::null)) );
+ set->addProperty(prop = new KexiProperty("totals", TQVariant(TQString())) );
prop->setVisible(false);*/
//sorting
- QStringList slist, nlist;
+ TQStringList slist, nlist;
slist << "nosorting" << "ascending" << "descending";
nlist << i18n("None") << i18n("Ascending") << i18n("Descending");
set->addProperty(prop = new KoProperty::Property("sorting",
slist, nlist, *slist.at(0), i18n("Sorting")));
prop->setVisible(false);
- set->addProperty(prop = new KoProperty::Property("criteria", QVariant(QString::null)) );
+ set->addProperty(prop = new KoProperty::Property("criteria", TQVariant(TQString())) );
prop->setVisible(false);
- set->addProperty(prop = new KoProperty::Property("isExpression", QVariant(false, 1)) );
+ set->addProperty(prop = new KoProperty::Property("isExpression", TQVariant(false, 1)) );
prop->setVisible(false);
- connect(set, SIGNAL(propertyChanged(KoProperty::Set&, KoProperty::Property&)),
- this, SLOT(slotPropertyChanged(KoProperty::Set&, KoProperty::Property&)));
+ connect(set, TQT_SIGNAL(propertyChanged(KoProperty::Set&, KoProperty::Property&)),
+ this, TQT_SLOT(slotPropertyChanged(KoProperty::Set&, KoProperty::Property&)));
d->sets->insert(row, set, newOne);
@@ -1758,12 +1758,12 @@ void KexiQueryDesignerGuiEditor::setFocus()
void KexiQueryDesignerGuiEditor::slotPropertyChanged(KoProperty::Set& set, KoProperty::Property& property)
{
- const QCString& pname = property.name();
+ const TQCString& pname = property.name();
/*
- * TODO (js) use KexiProperty::setValidator(QString) when implemented as described in TODO #60
+ * TODO (js) use KexiProperty::setValidator(TQString) when implemented as described in TODO #60
*/
if (pname=="alias" || pname=="name") {
- const QVariant& v = property.value();
+ const TQVariant& v = property.value();
if (!v.toString().stripWhiteSpace().isEmpty() && !KexiUtils::isIdentifier( v.toString() )) {
KMessageBox::sorry(this,
KexiUtils::identifierExpectedMessage(property.caption(), v.toString()));
@@ -1776,7 +1776,7 @@ void KexiQueryDesignerGuiEditor::slotPropertyChanged(KoProperty::Set& set, KoPro
// d->dataTable->dataAwareObject()->setCursorPosition(d->dataTable->dataAwareObject()->currentRow(),0);
//d->dataTable->dataAwareObject()->startEditCurrentCell();
d->data->updateRowEditBuffer(d->dataTable->dataAwareObject()->selectedItem(),
- 0, QVariant(set["alias"].value().toString() + ": " + set["field"].value().toString()));
+ 0, TQVariant(set["alias"].value().toString() + ": " + set["field"].value().toString()));
d->data->saveRowChanges(*d->dataTable->dataAwareObject()->selectedItem(), true);
// d->dataTable->dataAwareObject()->acceptRowEdit();
}
@@ -1794,7 +1794,7 @@ void KexiQueryDesignerGuiEditor::slotItemRemoved(const KexiPart::Item& item)
d->relations->objectDeleted(item.mimeType(), item.name().latin1());
}
-void KexiQueryDesignerGuiEditor::slotItemRenamed(const KexiPart::Item& item, const QCString& oldName)
+void KexiQueryDesignerGuiEditor::slotItemRenamed(const KexiPart::Item& item, const TQCString& oldName)
{
d->relations->objectRenamed(item.mimeType(), oldName, item.name().latin1());
}
diff --git a/kexi/plugins/queries/kexiquerydesignerguieditor.h b/kexi/plugins/queries/kexiquerydesignerguieditor.h
index 03acb7f6..587e60a6 100644
--- a/kexi/plugins/queries/kexiquerydesignerguieditor.h
+++ b/kexi/plugins/queries/kexiquerydesignerguieditor.h
@@ -18,11 +18,11 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef KEXIQUERYDESIGNERGUIEDITOR_H
-#define KEXIQUERYDESIGNERGUIEDITOR_H
+#ifndef KEXITQUERYDESIGNERGUIEDITOR_H
+#define KEXITQUERYDESIGNERGUIEDITOR_H
-#include <qguardedptr.h>
-#include <qsplitter.h>
+#include <tqguardedptr.h>
+#include <tqsplitter.h>
#include <kexiviewbase.h>
#include "kexiquerypart.h"
@@ -59,16 +59,17 @@ namespace KexiDB
class KexiQueryDesignerGuiEditor : public KexiViewBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiQueryDesignerGuiEditor(KexiMainWindow *mainWin, QWidget *parent, const char *name = 0);
+ KexiQueryDesignerGuiEditor(KexiMainWindow *mainWin, TQWidget *tqparent, const char *name = 0);
virtual ~KexiQueryDesignerGuiEditor();
// KexiDB::QuerySchema *schema();
KexiRelationWidget *relationView() const;
- virtual QSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
public slots:
virtual void setFocus();
@@ -76,7 +77,7 @@ class KexiQueryDesignerGuiEditor : public KexiViewBase
protected:
void initTableColumns(); //!< Called just once.
void initTableRows(); //!< Called to have all rows empty.
-//unused void addRow(const QString &tbl, const QString &field);
+//unused void addRow(const TQString &tbl, const TQString &field);
// void restore();
virtual tristate beforeSwitchTo(int mode, bool &dontStore);
virtual tristate afterSwitchFrom(int mode);
@@ -93,32 +94,32 @@ class KexiQueryDesignerGuiEditor : public KexiViewBase
virtual KoProperty::Set *propertySet();
KoProperty::Set* createPropertySet( int row,
- const QString& tableName, const QString& fieldName, bool newOne = false );
+ const TQString& tableName, const TQString& fieldName, bool newOne = false );
/*! Builds query schema out of information provided by gui.
The schema is stored in temp->query member.
\a errMsg is optional error message returned.
\return true on proper schema creation. */
- bool buildSchema(QString *errMsg = 0);
+ bool buildSchema(TQString *errMsg = 0);
KexiQueryPart::TempData * tempData() const;
/*! Helper: allocates and initializes new table view's row. Doesn't insert it, just returns.
\a tableName and \a fieldName shoudl be provided.
\a visible flag sets value for "Visible" column. */
- KexiTableItem* createNewRow(const QString& tableName, const QString& fieldName,
+ KexiTableItem* createNewRow(const TQString& tableName, const TQString& fieldName,
bool visible) const;
- KexiDB::BaseExpr* parseExpressionString(const QString& fullString, int& token,
+ KexiDB::BaseExpr* parseExpressionString(const TQString& fullString, int& token,
bool allowRelationalOperator);
- QCString generateUniqueAlias() const;
+ TQCString generateUniqueAlias() const;
void updatePropertiesVisibility(KoProperty::Set& buf);
protected slots:
- void slotDragOverTableRow(KexiTableItem *item, int row, QDragMoveEvent* e);
+ void slotDragOverTableRow(KexiTableItem *item, int row, TQDragMoveEvent* e);
void slotDroppedAtRow(KexiTableItem *item, int row,
- QDropEvent *ev, KexiTableItem*& newItem);
+ TQDropEvent *ev, KexiTableItem*& newItem);
//! Reaction on appending a new item after deleting one
void slotNewItemAppendedForAfterDeletingInSpreadSheetMode();
void slotTableAdded(KexiDB::TableSchema &t);
@@ -126,17 +127,17 @@ class KexiQueryDesignerGuiEditor : public KexiViewBase
//! Called before cell change in tableview.
void slotBeforeCellChanged(KexiTableItem *item, int colnum,
- QVariant& newValue, KexiDB::ResultInfo* result);
+ TQVariant& newValue, KexiDB::ResultInfo* result);
- void slotRowInserted(KexiTableItem* item, uint row, bool repaint);
+ void slotRowInserted(KexiTableItem* item, uint row, bool tqrepaint);
void slotTablePositionChanged(KexiRelationViewTableContainer*);
void slotAboutConnectionRemove(KexiRelationViewConnection*);
- void slotTableFieldDoubleClicked( KexiDB::TableSchema* table, const QString& fieldName );
+ void slotTableFieldDoubleClicked( KexiDB::TableSchema* table, const TQString& fieldName );
- /*! Loads layout of relation GUI diagram. */
+ /*! Loads tqlayout of relation GUI diagram. */
bool loadLayout();
- /*! Stores layout of relation GUI diagram. */
+ /*! Stores tqlayout of relation GUI diagram. */
bool storeLayout();
void showTablesForQuery(KexiDB::QuerySchema *query);
@@ -154,10 +155,10 @@ class KexiQueryDesignerGuiEditor : public KexiViewBase
void slotPropertyChanged(KoProperty::Set& list, KoProperty::Property& property);
-// void slotObjectCreated(const QCString &mime, const QCString& name);
+// void slotObjectCreated(const TQCString &mime, const TQCString& name);
void slotNewItemStored(KexiPart::Item&);
void slotItemRemoved(const KexiPart::Item& item);
- void slotItemRenamed(const KexiPart::Item& item, const QCString& oldName);
+ void slotItemRenamed(const KexiPart::Item& item, const TQCString& oldName);
private:
class Private;
diff --git a/kexi/plugins/queries/kexiquerydesignersql.cpp b/kexi/plugins/queries/kexiquerydesignersql.cpp
index 469d551c..36455837 100644
--- a/kexi/plugins/queries/kexiquerydesignersql.cpp
+++ b/kexi/plugins/queries/kexiquerydesignersql.cpp
@@ -18,11 +18,11 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qsplitter.h>
-#include <qlayout.h>
-#include <qhbox.h>
-#include <qvbox.h>
-#include <qtimer.h>
+#include <tqsplitter.h>
+#include <tqlayout.h>
+#include <tqhbox.h>
+#include <tqvbox.h>
+#include <tqtimer.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -45,7 +45,7 @@
#include "kexisectionheader.h"
-static bool compareSQL(const QString& sql1, const QString& sql2)
+static bool compareSQL(const TQString& sql1, const TQString& sql2)
{
//TODO: use reformatting functions here
return sql1.stripWhiteSpace()==sql2.stripWhiteSpace();
@@ -73,18 +73,18 @@ class KexiQueryDesignerSQLView::Private
}
KexiQueryDesignerSQLEditor *editor;
KexiQueryDesignerSQLHistory *history;
- QLabel *pixmapStatus, *lblStatus;
- QHBox *status_hbox;
- QVBox *history_section;
+ TQLabel *pixmaptqStatus, *lbltqStatus;
+ TQHBox *status_hbox;
+ TQVBox *history_section;
KexiSectionHeader *head, *historyHead;
- QPixmap statusPixmapOk, statusPixmapErr, statusPixmapInfo;
- QSplitter *splitter;
+ TQPixmap statusPixmapOk, statusPixmapErr, statusPixmapInfo;
+ TQSplitter *splitter;
KToggleAction *action_toggle_history;
//! For internal use, this pointer is usually copied to TempData structure,
//! when switching out of this view (then it's cleared).
KexiDB::QuerySchema *parsedQuery;
//! For internal use, statement passed in switching to this view
- QString origStatement;
+ TQString origStatement;
//! needed to remember height for both modes, between switching
int heightForStatusMode, heightForHistoryMode;
//! helper for slotUpdateMode()
@@ -99,58 +99,58 @@ class KexiQueryDesignerSQLView::Private
//===================
-KexiQueryDesignerSQLView::KexiQueryDesignerSQLView(KexiMainWindow *mainWin, QWidget *parent, const char *name)
- : KexiViewBase(mainWin, parent, name)
+KexiQueryDesignerSQLView::KexiQueryDesignerSQLView(KexiMainWindow *mainWin, TQWidget *tqparent, const char *name)
+ : KexiViewBase(mainWin, tqparent, name)
, d( new Private() )
{
- d->splitter = new QSplitter(this);
- d->splitter->setOrientation(Vertical);
- d->head = new KexiSectionHeader(i18n("SQL Query Text"), Vertical, d->splitter);
+ d->splitter = new TQSplitter(this);
+ d->splitter->setOrientation(Qt::Vertical);
+ d->head = new KexiSectionHeader(i18n("SQL Query Text"),Qt::Vertical, d->splitter);
d->editor = new KexiQueryDesignerSQLEditor(mainWin, d->head, "sqle");
// d->editor->installEventFilter(this);//for keys
- connect(d->editor, SIGNAL(textChanged()), this, SLOT(slotTextChanged()));
+ connect(d->editor, TQT_SIGNAL(textChanged()), TQT_TQOBJECT(this), TQT_SLOT(slotTextChanged()));
addChildView(d->editor);
setViewWidget(d->editor);
d->splitter->setFocusProxy(d->editor);
setFocusProxy(d->editor);
- d->history_section = new QVBox(d->splitter);
+ d->history_section = new TQVBox(d->splitter);
- d->status_hbox = new QHBox(d->history_section);
+ d->status_hbox = new TQHBox(d->history_section);
d->status_hbox->installEventFilter(this);
- d->splitter->setResizeMode(d->history_section, QSplitter::KeepSize);
+ d->splitter->setResizeMode(d->history_section, TQSplitter::KeepSize);
d->status_hbox->setSpacing(0);
- d->pixmapStatus = new QLabel(d->status_hbox);
- d->pixmapStatus->setFixedWidth(d->statusPixmapOk.width()*3/2);
- d->pixmapStatus->setAlignment(AlignHCenter | AlignTop);
- d->pixmapStatus->setMargin(d->statusPixmapOk.width()/4);
- d->pixmapStatus->setPaletteBackgroundColor( palette().active().color(QColorGroup::Base) );
-
- d->lblStatus = new QLabel(d->status_hbox);
- d->lblStatus->setAlignment(AlignLeft | AlignTop | WordBreak);
- d->lblStatus->setMargin(d->statusPixmapOk.width()/4);
- d->lblStatus->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Expanding );
- d->lblStatus->resize(d->lblStatus->width(),d->statusPixmapOk.width()*3);
- d->lblStatus->setPaletteBackgroundColor( palette().active().color(QColorGroup::Base) );
-
- QHBoxLayout *b = new QHBoxLayout(this);
+ d->pixmaptqStatus = new TQLabel(d->status_hbox);
+ d->pixmaptqStatus->setFixedWidth(d->statusPixmapOk.width()*3/2);
+ d->pixmaptqStatus->tqsetAlignment(AlignHCenter | AlignTop);
+ d->pixmaptqStatus->setMargin(d->statusPixmapOk.width()/4);
+ d->pixmaptqStatus->setPaletteBackgroundColor( tqpalette().active().color(TQColorGroup::Base) );
+
+ d->lbltqStatus = new TQLabel(d->status_hbox);
+ d->lbltqStatus->tqsetAlignment(AlignLeft | AlignTop | WordBreak);
+ d->lbltqStatus->setMargin(d->statusPixmapOk.width()/4);
+ d->lbltqStatus->tqsetSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Expanding );
+ d->lbltqStatus->resize(d->lbltqStatus->width(),d->statusPixmapOk.width()*3);
+ d->lbltqStatus->setPaletteBackgroundColor( tqpalette().active().color(TQColorGroup::Base) );
+
+ TQHBoxLayout *b = new TQHBoxLayout(this);
b->addWidget(d->splitter);
- plugSharedAction("querypart_check_query", this, SLOT(slotCheckQuery()));
- plugSharedAction("querypart_view_toggle_history", this, SLOT(slotUpdateMode()));
+ plugSharedAction("querypart_check_query", TQT_TQOBJECT(this), TQT_SLOT(slotCheckQuery()));
+ plugSharedAction("querypart_view_toggle_history", TQT_TQOBJECT(this), TQT_SLOT(slotUpdateMode()));
d->action_toggle_history = static_cast<KToggleAction*>( sharedAction( "querypart_view_toggle_history" ) );
- d->historyHead = new KexiSectionHeader(i18n("SQL Query History"), Vertical, d->history_section);
+ d->historyHead = new KexiSectionHeader(i18n("SQL Query History"),Qt::Vertical, d->history_section);
d->historyHead->installEventFilter(this);
d->history = new KexiQueryDesignerSQLHistory(d->historyHead, "sql_history");
- static const QString msg_back = i18n("Back to Selected Query");
- static const QString msg_clear = i18n("Clear History");
- d->historyHead->addButton("select_item", msg_back, this, SLOT(slotSelectQuery()));
- d->historyHead->addButton("editclear", msg_clear, d->history, SLOT(clear()));
- d->history->popupMenu()->insertItem(SmallIcon("select_item"), msg_back, this, SLOT(slotSelectQuery()));
- d->history->popupMenu()->insertItem(SmallIcon("editclear"), msg_clear, d->history, SLOT(clear()));
- connect(d->history, SIGNAL(currentItemDoubleClicked()), this, SLOT(slotSelectQuery()));
+ static const TQString msg_back = i18n("Back to Selected Query");
+ static const TQString msg_clear = i18n("Clear History");
+ d->historyHead->addButton("select_item", msg_back, TQT_TQOBJECT(this), TQT_SLOT(slotSelectQuery()));
+ d->historyHead->addButton("editclear", msg_clear, TQT_TQOBJECT(d->history), TQT_SLOT(clear()));
+ d->history->popupMenu()->insertItem(SmallIcon("select_item"), msg_back, TQT_TQOBJECT(this), TQT_SLOT(slotSelectQuery()));
+ d->history->popupMenu()->insertItem(SmallIcon("editclear"), msg_clear, d->history, TQT_SLOT(clear()));
+ connect(d->history, TQT_SIGNAL(currentItemDoubleClicked()), TQT_TQOBJECT(this), TQT_SLOT(slotSelectQuery()));
d->heightForHistoryMode = -1; //height() / 2;
//d->historyHead->hide();
@@ -171,36 +171,36 @@ KexiQueryDesignerSQLEditor *KexiQueryDesignerSQLView::editor() const
void KexiQueryDesignerSQLView::setStatusOk()
{
- d->pixmapStatus->setPixmap(d->statusPixmapOk);
+ d->pixmaptqStatus->setPixmap(d->statusPixmapOk);
setStatusText("<h2>"+i18n("The query is correct")+"</h2>");
- d->history->addEvent(d->editor->text().stripWhiteSpace(), true, QString::null);
+ d->history->addEvent(d->editor->text().stripWhiteSpace(), true, TQString());
}
-void KexiQueryDesignerSQLView::setStatusError(const QString& msg)
+void KexiQueryDesignerSQLView::setStatusError(const TQString& msg)
{
- d->pixmapStatus->setPixmap(d->statusPixmapErr);
+ d->pixmaptqStatus->setPixmap(d->statusPixmapErr);
setStatusText("<h2>"+i18n("The query is incorrect")+"</h2><p>"+msg+"</p>");
d->history->addEvent(d->editor->text().stripWhiteSpace(), false, msg);
}
void KexiQueryDesignerSQLView::setStatusEmpty()
{
- d->pixmapStatus->setPixmap(d->statusPixmapInfo);
+ d->pixmaptqStatus->setPixmap(d->statusPixmapInfo);
setStatusText(i18n("Please enter your query and execute \"Check query\" function to verify it."));
}
-void KexiQueryDesignerSQLView::setStatusText(const QString& text)
+void KexiQueryDesignerSQLView::setStatusText(const TQString& text)
{
if (!d->action_toggle_history->isChecked()) {
- QSimpleRichText rt(text, d->lblStatus->font());
- rt.setWidth(d->lblStatus->width());
- QValueList<int> sz = d->splitter->sizes();
- const int newHeight = rt.height()+d->lblStatus->margin()*2;
+ TQSimpleRichText rt(text, d->lbltqStatus->font());
+ rt.setWidth(d->lbltqStatus->width());
+ TQValueList<int> sz = d->splitter->sizes();
+ const int newHeight = rt.height()+d->lbltqStatus->margin()*2;
if (sz[1]<newHeight) {
sz[1] = newHeight;
d->splitter->setSizes(sz);
}
- d->lblStatus->setText(text);
+ d->lbltqStatus->setText(text);
}
}
@@ -210,7 +210,7 @@ KexiQueryDesignerSQLView::beforeSwitchTo(int mode, bool &dontStore)
//TODO
dontStore = true;
if (mode==Kexi::DesignViewMode || mode==Kexi::DataViewMode) {
- QString sqlText = d->editor->text().stripWhiteSpace();
+ TQString sqlText = d->editor->text().stripWhiteSpace();
KexiQueryPart::TempData * temp = tempData();
if (sqlText.isEmpty()) {
//special case: empty SQL text
@@ -222,7 +222,7 @@ KexiQueryDesignerSQLView::beforeSwitchTo(int mode, bool &dontStore)
}
}
else {
- const bool designViewWasVisible = parentDialog()->viewForMode(mode)!=0;
+ const bool designViewWasVisible = tqparentDialog()->viewForMode(mode)!=0;
//should we check SQL text?
if (designViewWasVisible
&& !d->justSwitchedFromNoViewMode //unchanged, but we should check SQL text
@@ -274,7 +274,7 @@ KexiQueryDesignerSQLView::beforeSwitchTo(int mode, bool &dontStore)
}
setDirty(true);*/
-// if (parentDialog()->hasFocus())
+// if (tqparentDialog()->hasFocus())
d->editor->setFocus();
return true;
}
@@ -287,13 +287,13 @@ KexiQueryDesignerSQLView::afterSwitchFrom(int mode)
if (mode==Kexi::NoViewMode) {
//User opened text view _directly_.
//This flag is set to indicate for beforeSwitchTo() that even if text has not been changed,
- //SQL text should be invalidated.
+ //SQL text should be tqinvalidated.
d->justSwitchedFromNoViewMode = true;
}
KexiQueryPart::TempData * temp = tempData();
KexiDB::QuerySchema *query = temp->query();
if (!query) {//try to just get saved schema, instead of temporary one
- query = dynamic_cast<KexiDB::QuerySchema *>(parentDialog()->schemaData());
+ query = dynamic_cast<KexiDB::QuerySchema *>(tqparentDialog()->schemaData());
}
if (mode!=0/*failure only if it is switching from prev. view*/ && !query) {
@@ -320,11 +320,11 @@ KexiQueryDesignerSQLView::afterSwitchFrom(int mode)
d->slotTextChangedEnabled = false;
d->editor->setText( d->origStatement );
d->slotTextChangedEnabled = true;
- QTimer::singleShot(100, d->editor, SLOT(setFocus()));
+ TQTimer::singleShot(100, d->editor, TQT_SLOT(setFocus()));
return true;
}
-QString
+TQString
KexiQueryDesignerSQLView::sqlText() const
{
return d->editor->text();
@@ -332,7 +332,7 @@ KexiQueryDesignerSQLView::sqlText() const
bool KexiQueryDesignerSQLView::slotCheckQuery()
{
- QString sqlText( d->editor->text().stripWhiteSpace() );
+ TQString sqlText( d->editor->text().stripWhiteSpace() );
if (sqlText.isEmpty()) {
delete d->parsedQuery;
d->parsedQuery = 0;
@@ -366,7 +366,7 @@ void KexiQueryDesignerSQLView::slotUpdateMode()
d->eventFilterForSplitterEnabled = false;
- QValueList<int> sz = d->splitter->sizes();
+ TQValueList<int> sz = d->splitter->sizes();
d->action_toggle_history_was_checked = d->action_toggle_history->isChecked();
int heightToSet = -1;
if (d->action_toggle_history->isChecked()) {
@@ -407,13 +407,13 @@ void KexiQueryDesignerSQLView::slotTextChanged()
setStatusEmpty();
}
-bool KexiQueryDesignerSQLView::eventFilter( QObject *o, QEvent *e )
+bool KexiQueryDesignerSQLView::eventFilter( TQObject *o, TQEvent *e )
{
if (d->eventFilterForSplitterEnabled) {
- if (e->type()==QEvent::Resize && o && o==d->historyHead && d->historyHead->isVisible()) {
+ if (e->type()==TQEvent::Resize && o && TQT_BASE_OBJECT(o)==TQT_BASE_OBJECT(d->historyHead) && d->historyHead->isVisible()) {
d->heightForHistoryMode = d->historyHead->height();
}
- else if (e->type()==QEvent::Resize && o && o==d->status_hbox && d->status_hbox->isVisible()) {
+ else if (e->type()==TQEvent::Resize && o && TQT_BASE_OBJECT(o)==TQT_BASE_OBJECT(d->status_hbox) && d->status_hbox->isVisible()) {
d->heightForStatusMode = d->status_hbox->height();
}
}
@@ -432,7 +432,7 @@ void KexiQueryDesignerSQLView::updateActions(bool activated)
void KexiQueryDesignerSQLView::slotSelectQuery()
{
- QString sql = d->history->selectedStatement();
+ TQString sql = d->history->selectedStatement();
if (!sql.isEmpty()) {
d->editor->setText( sql );
}
@@ -441,7 +441,7 @@ void KexiQueryDesignerSQLView::slotSelectQuery()
KexiQueryPart::TempData *
KexiQueryDesignerSQLView::tempData() const
{
- return dynamic_cast<KexiQueryPart::TempData*>(parentDialog()->tempData());
+ return dynamic_cast<KexiQueryPart::TempData*>(tqparentDialog()->tempData());
}
KexiDB::SchemaData*
@@ -449,7 +449,7 @@ KexiQueryDesignerSQLView::storeNewData(const KexiDB::SchemaData& sdata, bool &ca
{
Q_UNUSED( cancel );
- //here: we won't store query layout: it will be recreated 'by hand' in GUI Query Editor
+ //here: we won't store query tqlayout: it will be recreated 'by hand' in GUI Query Editor
bool queryOK = slotCheckQuery();
bool ok = true;
KexiDB::SchemaData* query = 0;
@@ -519,7 +519,7 @@ tristate KexiQueryDesignerSQLView::storeData(bool dontAsk)
#endif
}
if (res == true) {
- QString empty_xml;
+ TQString empty_xml;
res = storeDataBlock( empty_xml, "query_layout" ); //clear
}
if (!res)
@@ -528,7 +528,7 @@ tristate KexiQueryDesignerSQLView::storeData(bool dontAsk)
}
-/*void KexiQueryDesignerSQLView::slotHistoryHeaderButtonClicked(const QString& buttonIdentifier)
+/*void KexiQueryDesignerSQLView::slotHistoryHeaderButtonClicked(const TQString& buttonIdentifier)
{
if (buttonIdentifier=="select_query") {
slotSelectQuery();
diff --git a/kexi/plugins/queries/kexiquerydesignersql.h b/kexi/plugins/queries/kexiquerydesignersql.h
index f31c838f..ae07d457 100644
--- a/kexi/plugins/queries/kexiquerydesignersql.h
+++ b/kexi/plugins/queries/kexiquerydesignersql.h
@@ -18,8 +18,8 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef KEXIQUERYDESIGNERSQL_H
-#define KEXIQUERYDESIGNERSQL_H
+#ifndef KEXITQUERYDESIGNERSQL_H
+#define KEXITQUERYDESIGNERSQL_H
#include <kexiviewbase.h>
#include "kexiquerypart.h"
@@ -35,15 +35,16 @@ class KexiQueryDesignerSQLViewPrivate;
class KexiQueryDesignerSQLView : public KexiViewBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiQueryDesignerSQLView(KexiMainWindow *mainWin, QWidget *parent, const char *name = 0);
+ KexiQueryDesignerSQLView(KexiMainWindow *mainWin, TQWidget *tqparent, const char *name = 0);
virtual ~KexiQueryDesignerSQLView();
- QString sqlText() const;
+ TQString sqlText() const;
KexiQueryDesignerSQLEditor *editor() const;
- virtual bool eventFilter ( QObject *o, QEvent *e );
+ virtual bool eventFilter ( TQObject *o, TQEvent *e );
protected:
KexiQueryPart::TempData * tempData() const;
@@ -54,9 +55,9 @@ class KexiQueryDesignerSQLView : public KexiViewBase
virtual tristate storeData(bool dontAsk = false);
void setStatusOk();
- void setStatusError(const QString& msg);
+ void setStatusError(const TQString& msg);
void setStatusEmpty();
- void setStatusText(const QString& text);
+ void setStatusText(const TQString& text);
virtual void updateActions(bool activated);
@@ -66,7 +67,7 @@ class KexiQueryDesignerSQLView : public KexiViewBase
bool slotCheckQuery();
void slotUpdateMode();
void slotTextChanged();
-// void slotHistoryHeaderButtonClicked(const QString& buttonIdentifier);
+// void slotHistoryHeaderButtonClicked(const TQString& buttonIdentifier);
void slotSelectQuery();
signals:
diff --git a/kexi/plugins/queries/kexiquerydesignersqlhistory.cpp b/kexi/plugins/queries/kexiquerydesignersqlhistory.cpp
index d86caf83..19c0e06a 100644
--- a/kexi/plugins/queries/kexiquerydesignersqlhistory.cpp
+++ b/kexi/plugins/queries/kexiquerydesignersqlhistory.cpp
@@ -18,9 +18,9 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qpainter.h>
-#include <qclipboard.h>
-#include <qregexp.h>
+#include <tqpainter.h>
+#include <tqclipboard.h>
+#include <tqregexp.h>
#include <kpopupmenu.h>
#include <klocale.h>
@@ -31,8 +31,8 @@
#include "kexiquerydesignersqlhistory.h"
-KexiQueryDesignerSQLHistory::KexiQueryDesignerSQLHistory(QWidget *parent, const char *name)
- : QScrollView(parent, name)
+KexiQueryDesignerSQLHistory::KexiQueryDesignerSQLHistory(TQWidget *tqparent, const char *name)
+ : TQScrollView(tqparent, name)
{
viewport()->setPaletteBackgroundColor(white);
@@ -41,7 +41,7 @@ KexiQueryDesignerSQLHistory::KexiQueryDesignerSQLHistory(QWidget *parent, const
m_history->setAutoDelete(true);
m_popup = new KPopupMenu(this);
- m_popup->insertItem(SmallIcon("editcopy"), i18n("Copy to Clipboard"), this, SLOT(slotToClipboard()));
+ m_popup->insertItem(SmallIcon("editcopy"), i18n("Copy to Clipboard"), this, TQT_SLOT(slotToClipboard()));
}
KexiQueryDesignerSQLHistory::~KexiQueryDesignerSQLHistory()
@@ -49,65 +49,65 @@ KexiQueryDesignerSQLHistory::~KexiQueryDesignerSQLHistory()
}
void
-KexiQueryDesignerSQLHistory::drawContents(QPainter *p, int cx, int cy, int cw, int ch)
+KexiQueryDesignerSQLHistory::drawContents(TQPainter *p, int cx, int cy, int cw, int ch)
{
- QRect clipping(cx, cy, cw, ch);
+ TQRect clipping(cx, cy, cw, ch);
int y = 0;
for(HistoryEntry *it = m_history->first(); it; it = m_history->next())
{
// it->drawItem(p, visibleWidth());
- if(clipping.intersects(it->geometry(y, visibleWidth(), fontMetrics())))
+ if(clipping.intersects(it->tqgeometry(y, visibleWidth(), fontMetrics())))
{
p->saveWorldMatrix();
p->translate(0, y);
- it->drawItem(p, visibleWidth(), colorGroup());
+ it->drawItem(p, visibleWidth(), tqcolorGroup());
p->restoreWorldMatrix();
}
- y += it->geometry(y, visibleWidth(), fontMetrics()).height() + 5;
+ y += it->tqgeometry(y, visibleWidth(), fontMetrics()).height() + 5;
}
}
void
-KexiQueryDesignerSQLHistory::contentsMousePressEvent(QMouseEvent * e)
+KexiQueryDesignerSQLHistory::contentsMousePressEvent(TQMouseEvent * e)
{
int y = 0;
HistoryEntry *popupHistory = 0;
int pos;
- for(QPtrListIterator<HistoryEntry> it(*m_history); it.current(); ++it)
+ for(TQPtrListIterator<HistoryEntry> it(*m_history); it.current(); ++it)
{
if(it.current()->isSelected())
{
//clear
- it.current()->setSelected(false, colorGroup());
- updateContents(it.current()->geometry(y, visibleWidth(), fontMetrics()));
+ it.current()->setSelected(false, tqcolorGroup());
+ updateContents(it.current()->tqgeometry(y, visibleWidth(), fontMetrics()));
}
- if(it.current()->geometry(y, visibleWidth(), fontMetrics()).contains(e->pos()))
+ if(it.current()->tqgeometry(y, visibleWidth(), fontMetrics()).tqcontains(e->pos()))
{
popupHistory = it.current();
pos = y;
}
- y += it.current()->geometry(y, visibleWidth(), fontMetrics()).height() + 5;
+ y += it.current()->tqgeometry(y, visibleWidth(), fontMetrics()).height() + 5;
}
//now do update
if (popupHistory) {
if (m_selected && m_selected != popupHistory) {
- m_selected->setSelected(false, colorGroup());
- updateContents(m_selected->geometry(pos, visibleWidth(), fontMetrics()));
+ m_selected->setSelected(false, tqcolorGroup());
+ updateContents(m_selected->tqgeometry(pos, visibleWidth(), fontMetrics()));
}
m_selected = popupHistory;
- m_selected->setSelected(true, colorGroup());
- updateContents(m_selected->geometry(pos, visibleWidth(), fontMetrics()));
- if(e->button() == RightButton) {
+ m_selected->setSelected(true, tqcolorGroup());
+ updateContents(m_selected->tqgeometry(pos, visibleWidth(), fontMetrics()));
+ if(e->button() == Qt::RightButton) {
m_popup->exec(e->globalPos());
}
}
}
void
-KexiQueryDesignerSQLHistory::contentsMouseDoubleClickEvent(QMouseEvent * e)
+KexiQueryDesignerSQLHistory::contentsMouseDoubleClickEvent(TQMouseEvent * e)
{
contentsMousePressEvent(e);
if (m_selected)
@@ -115,17 +115,17 @@ KexiQueryDesignerSQLHistory::contentsMouseDoubleClickEvent(QMouseEvent * e)
}
void
-KexiQueryDesignerSQLHistory::addEvent(const QString& q, bool s, const QString &error)
+KexiQueryDesignerSQLHistory::addEvent(const TQString& q, bool s, const TQString &error)
{
HistoryEntry *he=m_history->last();
if (he) {
if (he->statement()==q) {
- he->updateTime(QTime::currentTime());
- repaint();
+ he->updateTime(TQTime::currentTime());
+ tqrepaint();
return;
}
}
- addEntry(new HistoryEntry(s, QTime::currentTime(), q, error));
+ addEntry(new HistoryEntry(s, TQTime::currentTime(), q, error));
}
void
@@ -137,37 +137,37 @@ KexiQueryDesignerSQLHistory::addEntry(HistoryEntry *e)
int y = 0;
for(HistoryEntry *it = m_history->first(); it; it = m_history->next())
{
- y += it->geometry(y, visibleWidth(), fontMetrics()).height() + 5;
+ y += it->tqgeometry(y, visibleWidth(), fontMetrics()).height() + 5;
}
resizeContents(visibleWidth() - 1, y);
if (m_selected) {
- m_selected->setSelected(false, colorGroup());
+ m_selected->setSelected(false, tqcolorGroup());
}
m_selected = e;
- m_selected->setSelected(true, colorGroup());
+ m_selected->setSelected(true, tqcolorGroup());
ensureVisible(0,y+5);
updateContents();
/* ensureVisible(0, 0);
if (m_selected) {
- m_selected->setSelected(false, colorGroup());
+ m_selected->setSelected(false, tqcolorGroup());
}
m_selected = e;
- m_selected->setSelected(true, colorGroup());
+ m_selected->setSelected(true, tqcolorGroup());
// updateContents();
- updateContents(m_selected->geometry(0, visibleWidth(), fontMetrics()));*/
+ updateContents(m_selected->tqgeometry(0, visibleWidth(), fontMetrics()));*/
}
/*void
-KexiQueryDesignerSQLHistory::contextMenu(const QPoint &pos, HistoryEntry *)
+KexiQueryDesignerSQLHistory::contextMenu(const TQPoint &pos, HistoryEntry *)
{
KPopupMenu p(this);
- p.insertItem(SmallIcon("editcopy"), i18n("Copy to Clipboard"), this, SLOT(slotToClipboard()));
+ p.insertItem(SmallIcon("editcopy"), i18n("Copy to Clipboard"), this, TQT_SLOT(slotToClipboard()));
#ifndef KEXI_NO_UNFINISHED
p.insertSeparator();
- p.insertItem(SmallIcon("edit"), i18n("Edit"), this, SLOT(slotEdit()));
+ p.insertItem(SmallIcon("edit"), i18n("Edit"), this, TQT_SLOT(slotEdit()));
p.insertItem(SmallIcon("reload"), i18n("Requery"));
#endif
@@ -180,7 +180,7 @@ KexiQueryDesignerSQLHistory::slotToClipboard()
if(!m_selected)
return;
- QApplication::clipboard()->setText(m_selected->statement(), QClipboard::Clipboard);
+ TQApplication::tqclipboard()->setText(m_selected->statement(), TQClipboard::Clipboard);
}
void
@@ -189,10 +189,10 @@ KexiQueryDesignerSQLHistory::slotEdit()
emit editRequested(m_selected->statement());
}
-QString
+TQString
KexiQueryDesignerSQLHistory::selectedStatement() const
{
- return m_selected ? m_selected->statement() : QString::null;
+ return m_selected ? m_selected->statement() : TQString();
}
void
@@ -216,37 +216,37 @@ KPopupMenu* KexiQueryDesignerSQLHistory::popupMenu() const
//==================================
-HistoryEntry::HistoryEntry(bool succeed, const QTime &execTime, const QString &statement, /*int ,*/ const QString &err)
+HistoryEntry::HistoryEntry(bool succeed, const TQTime &execTime, const TQString &statement, /*int ,*/ const TQString &err)
{
m_succeed = succeed;
m_execTime = execTime;
m_statement = statement;
m_error = err;
m_selected = false;
- highlight(QColorGroup());
+ highlight(TQColorGroup());
}
void
-HistoryEntry::drawItem(QPainter *p, int width, const QColorGroup &cg)
+HistoryEntry::drawItem(TQPainter *p, int width, const TQColorGroup &cg)
{
- p->setPen(QColor(200, 200, 200));
- p->setBrush(QColor(200, 200, 200));
+ p->setPen(TQColor(200, 200, 200));
+ p->setBrush(TQColor(200, 200, 200));
p->drawRect(2, 2, 200, 20);
- p->setPen(QColor(0, 0, 0));
+ p->setPen(TQColor(0, 0, 0));
if(m_succeed)
p->drawPixmap(4, 4, SmallIcon("button_ok"));
else
p->drawPixmap(4, 4, SmallIcon("button_cancel"));
- p->drawText(22, 2, 180, 20, Qt::AlignLeft | Qt::AlignVCenter, m_execTime.toString());
- p->setPen(QColor(200, 200, 200));
- p->setBrush(QColor(255, 255, 255));
+ p->drawText(22, 2, 180, 20, TQt::AlignLeft | TQt::AlignVCenter, m_execTime.toString());
+ p->setPen(TQColor(200, 200, 200));
+ p->setBrush(TQColor(255, 255, 255));
m_formated->setWidth(width - 2);
- QRect content(2, 21, width - 2, m_formated->height());
-// QRect content = p->fontMetrics().boundingRect(2, 21, width - 2, 0, Qt::WordBreak | Qt::AlignLeft | Qt::AlignVCenter, m_statement);
-// QRect content(2, 21, width - 2, p->fontMetrics().height() + 4);
-// content = QRect(2, 21, width - 2, m_for.height());
+ TQRect content(2, 21, width - 2, m_formated->height());
+// TQRect content = p->fontMetrics().boundingRect(2, 21, width - 2, 0, TQt::WordBreak | TQt::AlignLeft | TQt::AlignVCenter, m_statement);
+// TQRect content(2, 21, width - 2, p->fontMetrics().height() + 4);
+// content = TQRect(2, 21, width - 2, m_for.height());
if(m_selected)
p->setBrush(cg.highlight());
@@ -260,36 +260,36 @@ HistoryEntry::drawItem(QPainter *p, int width, const QColorGroup &cg)
content.setX(content.x() + 2);
content.setWidth(content.width() - 2);
-// p->drawText(content, Qt::WordBreak | Qt::AlignLeft | Qt::AlignVCenter, m_statement);
+// p->drawText(content, TQt::WordBreak | TQt::AlignLeft | TQt::AlignVCenter, m_statement);
m_formated->draw(p, content.x(), content.y(), content, cg);
}
void
-HistoryEntry::highlight(const QColorGroup &cg)
+HistoryEntry::highlight(const TQColorGroup &cg)
{
- QString statement;
- QString text;
+ TQString statement;
+ TQString text;
bool quote = false;
bool dblquote = false;
statement = m_statement;
- statement.replace("<", "&lt;");
- statement.replace(">", "&gt;");
- statement.replace("\r\n", "<br>"); //(js) first win32 specific pair
- statement.replace("\n", "<br>"); // now single \n
- statement.replace(" ", "&nbsp;");
- statement.replace("\t", "&nbsp;&nbsp;&nbsp;");
+ statement.tqreplace("<", "&lt;");
+ statement.tqreplace(">", "&gt;");
+ statement.tqreplace("\r\n", "<br>"); //(js) first win32 specific pair
+ statement.tqreplace("\n", "<br>"); // now single \n
+ statement.tqreplace(" ", "&nbsp;");
+ statement.tqreplace("\t", "&nbsp;&nbsp;&nbsp;");
// getting quoting...
if(!m_selected)
{
for(int i=0; i < (int)statement.length(); i++)
{
- QString beginTag;
- QString endTag;
- QChar curr = QChar(statement[i]);
+ TQString beginTag;
+ TQString endTag;
+ TQChar curr = TQChar(statement[i]);
- if(curr == "'" && !dblquote && QChar(statement[i-1]) != "\\")
+ if(TQString(curr) == "'" && !dblquote && TQString(TQChar(statement[i-1])) != "\\")
{
if(!quote)
{
@@ -302,7 +302,7 @@ HistoryEntry::highlight(const QColorGroup &cg)
endTag += "</font>";
}
}
- if(curr == "\"" && !quote && QChar(statement[i-1]) != "\\")
+ if(TQString(curr) == "\"" && !quote && TQString(TQChar(statement[i-1])) != "\\")
{
if(!dblquote)
{
@@ -315,7 +315,7 @@ HistoryEntry::highlight(const QColorGroup &cg)
endTag += "</font>";
}
}
- if(QRegExp("[0-9]").exactMatch(QString(curr)) && !quote && !dblquote)
+ if(TQRegExp("[0-9]").exactMatch(TQString(curr)) && !quote && !dblquote)
{
beginTag += "<font color=\"#0000ff\">";
endTag += "</font>";
@@ -326,43 +326,43 @@ HistoryEntry::highlight(const QColorGroup &cg)
}
else
{
- text = QString("<font color=\"%1\">%2").arg(cg.highlightedText().name()).arg(statement);
+ text = TQString("<font color=\"%1\">%2").tqarg(cg.highlightedText().name()).tqarg(statement);
}
- QRegExp keywords("\\b(SELECT|UPDATE|INSERT|DELETE|DROP|FROM|WHERE|AND|OR|NOT|NULL|JOIN|LEFT|RIGHT|ON|INTO|TABLE)\\b");
+ TQRegExp keywords("\\b(SELECT|UPDATE|INSERT|DELETE|DROP|FROM|WHERE|AND|OR|NOT|NULL|JOIN|LEFT|RIGHT|ON|INTO|TABLE)\\b");
keywords.setCaseSensitive(false);
- text = text.replace(keywords, "<b>\\1</b>");
+ text = text.tqreplace(keywords, "<b>\\1</b>");
if(!m_error.isEmpty())
-// text += ("<br>"+i18n("Error: %1").arg(m_error));
-// text += QString("<br><font face=\"") + KGlobalSettings::generalFont().family() + QString("\" size=\"-1\">") + i18n("Error: %1").arg(m_error) + "</font>";
- text += QString("<br><font face=\"") + KGlobalSettings::generalFont().family() + QString("\">") + i18n("Error: %1").arg(m_error) + "</font>";
+// text += ("<br>"+i18n("Error: %1").tqarg(m_error));
+// text += TQString("<br><font face=\"") + KGlobalSettings::generalFont().family() + TQString("\" size=\"-1\">") + i18n("Error: %1").tqarg(m_error) + "</font>";
+ text += TQString("<br><font face=\"") + KGlobalSettings::generalFont().family() + TQString("\">") + i18n("Error: %1").tqarg(m_error) + "</font>";
kdDebug() << "HistoryEntry::highlight() text:" << text << endl;
-// m_formated = new QSimpleRichText(text, QFont("courier", 8));
- m_formated = new QSimpleRichText(text, KGlobalSettings::fixedFont());
+// m_formated = new TQSimpleRichText(text, TQFont("courier", 8));
+ m_formated = new TQSimpleRichText(text, KGlobalSettings::fixedFont());
}
void
-HistoryEntry::setSelected(bool selected, const QColorGroup &cg)
+HistoryEntry::setSelected(bool selected, const TQColorGroup &cg)
{
m_selected = selected;
highlight(cg);
}
-QRect
-HistoryEntry::geometry(int y, int width, QFontMetrics f)
+TQRect
+HistoryEntry::tqgeometry(int y, int width, TQFontMetrics f)
{
Q_UNUSED( f );
-// int h = 21 + f.boundingRect(2, 21, width - 2, 0, Qt::WordBreak | Qt::AlignLeft | Qt::AlignVCenter, m_statement).height();
-// return QRect(0, y, width, h);
+// int h = 21 + f.boundingRect(2, 21, width - 2, 0, TQt::WordBreak | TQt::AlignLeft | TQt::AlignVCenter, m_statement).height();
+// return TQRect(0, y, width, h);
m_formated->setWidth(width - 2);
- return QRect(0, y, width, m_formated->height() + 21);
+ return TQRect(0, y, width, m_formated->height() + 21);
}
-void HistoryEntry::updateTime(const QTime &execTime) {
+void HistoryEntry::updateTime(const TQTime &execTime) {
m_execTime=execTime;
}
diff --git a/kexi/plugins/queries/kexiquerydesignersqlhistory.h b/kexi/plugins/queries/kexiquerydesignersqlhistory.h
index a8d0c2e0..6709a22f 100644
--- a/kexi/plugins/queries/kexiquerydesignersqlhistory.h
+++ b/kexi/plugins/queries/kexiquerydesignersqlhistory.h
@@ -18,65 +18,66 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef KEXIQUERYDESIGNERSQLHISTORY_H
-#define KEXIQUERYDESIGNERSQLHISTORY_H
+#ifndef KEXITQUERYDESIGNERSQLHISTORY_H
+#define KEXITQUERYDESIGNERSQLHISTORY_H
-#include <qscrollview.h>
-#include <qdatetime.h>
-#include <qptrlist.h>
-#include <qmap.h>
-#include <qsimplerichtext.h>
+#include <tqscrollview.h>
+#include <tqdatetime.h>
+#include <tqptrlist.h>
+#include <tqmap.h>
+#include <tqsimplerichtext.h>
-class QSimpleRichText;
+class TQSimpleRichText;
class KPopupMenu;
class HistoryEntry
{
public:
- HistoryEntry(bool success, const QTime &time, const QString &statement, /*int y,*/ const QString &error = QString::null);
+ HistoryEntry(bool success, const TQTime &time, const TQString &statement, /*int y,*/ const TQString &error = TQString());
~HistoryEntry();
- QRect geometry(int y, int width, QFontMetrics f);
- void drawItem(QPainter *p, int width, const QColorGroup &cg);
+ TQRect tqgeometry(int y, int width, TQFontMetrics f);
+ void drawItem(TQPainter *p, int width, const TQColorGroup &cg);
- void setSelected(bool selected, const QColorGroup &cg);
+ void setSelected(bool selected, const TQColorGroup &cg);
bool isSelected() const { return m_selected; }
- void highlight(const QColorGroup &selected);
+ void highlight(const TQColorGroup &selected);
- QString statement() { return m_statement; }
- void updateTime(const QTime &execTime);
+ TQString statement() { return m_statement; }
+ void updateTime(const TQTime &execTime);
private:
bool m_succeed;
- QTime m_execTime;
- QString m_statement;
- QString m_error;
- QSimpleRichText *m_formated;
+ TQTime m_execTime;
+ TQString m_statement;
+ TQString m_error;
+ TQSimpleRichText *m_formated;
int m_y;
bool m_selected;
};
-typedef QPtrList<HistoryEntry> History;
+typedef TQPtrList<HistoryEntry> History;
-class KexiQueryDesignerSQLHistory : public QScrollView
+class KexiQueryDesignerSQLHistory : public TQScrollView
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiQueryDesignerSQLHistory(QWidget *parent, const char *name=0);
+ KexiQueryDesignerSQLHistory(TQWidget *tqparent, const char *name=0);
virtual ~KexiQueryDesignerSQLHistory();
KPopupMenu* popupMenu() const;
-// void contextMenu(const QPoint &pos, HistoryEntry *e);
+// void contextMenu(const TQPoint &pos, HistoryEntry *e);
void setHistory(History *h);
- QString selectedStatement() const;
+ TQString selectedStatement() const;
public slots:
- void addEvent(const QString& q, bool s, const QString &error);
+ void addEvent(const TQString& q, bool s, const TQString &error);
void slotToClipboard();
void slotEdit();
@@ -87,12 +88,12 @@ class KexiQueryDesignerSQLHistory : public QScrollView
protected:
void addEntry(HistoryEntry *e);
- virtual void drawContents(QPainter *p, int cx, int cy, int cw, int ch);
- virtual void contentsMousePressEvent(QMouseEvent * e);
- virtual void contentsMouseDoubleClickEvent(QMouseEvent * e);
+ virtual void drawContents(TQPainter *p, int cx, int cy, int cw, int ch);
+ virtual void contentsMousePressEvent(TQMouseEvent * e);
+ virtual void contentsMouseDoubleClickEvent(TQMouseEvent * e);
signals:
- void editRequested(const QString &text);
+ void editRequested(const TQString &text);
void currentItemDoubleClicked();
private:
diff --git a/kexi/plugins/queries/kexiquerypart.cpp b/kexi/plugins/queries/kexiquerypart.cpp
index 6cecfcf1..c9ce5755 100644
--- a/kexi/plugins/queries/kexiquerypart.cpp
+++ b/kexi/plugins/queries/kexiquerypart.cpp
@@ -37,8 +37,8 @@
//------------------------------------------------
-KexiQueryPart::KexiQueryPart(QObject *parent, const char *name, const QStringList &l)
- : KexiPart::Part(parent, name, l)
+KexiQueryPart::KexiQueryPart(TQObject *tqparent, const char *name, const TQStringList &l)
+ : KexiPart::Part(tqparent, name, l)
{
// REGISTERED ID:
m_registeredPartID = (int)KexiPart::QueryObjectType;
@@ -65,33 +65,33 @@ KexiQueryPart::createTempData(KexiDialogBase* dialog)
}
KexiViewBase*
-KexiQueryPart::createView(QWidget *parent, KexiDialogBase* dialog, KexiPart::Item &item, int viewMode, QMap<QString,QString>*)
+KexiQueryPart::createView(TQWidget *tqparent, KexiDialogBase* dialog, KexiPart::Item &item, int viewMode, TQMap<TQString,TQString>*)
{
Q_UNUSED( item );
kdDebug() << "KexiQueryPart::createView()" << endl;
if (viewMode == Kexi::DataViewMode) {
- return new KexiQueryView(dialog->mainWin(), parent, "dataview");
+ return new KexiQueryView(dialog->mainWin(), tqparent, "dataview");
}
else if (viewMode == Kexi::DesignViewMode) {
KexiQueryDesignerGuiEditor* view = new KexiQueryDesignerGuiEditor(
- dialog->mainWin(), parent, "guieditor");
+ dialog->mainWin(), tqparent, "guieditor");
//needed for updating tables combo box:
KexiProject *prj = dialog->mainWin()->project();
- connect(prj, SIGNAL(newItemStored(KexiPart::Item&)),
- view, SLOT(slotNewItemStored(KexiPart::Item&)));
- connect(prj, SIGNAL(itemRemoved(const KexiPart::Item&)),
- view, SLOT(slotItemRemoved(const KexiPart::Item&)));
- connect(prj, SIGNAL(itemRenamed(const KexiPart::Item&, const QCString&)),
- view, SLOT(slotItemRenamed(const KexiPart::Item&, const QCString&)));
-
-// connect(dialog->mainWin()->project(), SIGNAL(tableCreated(KexiDB::TableSchema&)),
-// view, SLOT(slotTableCreated(KexiDB::TableSchema&)));
+ connect(prj, TQT_SIGNAL(newItemStored(KexiPart::Item&)),
+ view, TQT_SLOT(slotNewItemStored(KexiPart::Item&)));
+ connect(prj, TQT_SIGNAL(itemRemoved(const KexiPart::Item&)),
+ view, TQT_SLOT(slotItemRemoved(const KexiPart::Item&)));
+ connect(prj, TQT_SIGNAL(itemRenamed(const KexiPart::Item&, const TQCString&)),
+ view, TQT_SLOT(slotItemRenamed(const KexiPart::Item&, const TQCString&)));
+
+// connect(dialog->mainWin()->project(), TQT_SIGNAL(tableCreated(KexiDB::TableSchema&)),
+// view, TQT_SLOT(slotTableCreated(KexiDB::TableSchema&)));
return view;
}
else if (viewMode == Kexi::TextViewMode) {
- return new KexiQueryDesignerSQLView(dialog->mainWin(), parent, "sqldesigner");
+ return new KexiQueryDesignerSQLView(dialog->mainWin(), tqparent, "sqldesigner");
}
return 0;
@@ -128,9 +128,9 @@ void KexiQueryPart::initInstanceActions( int mode, KActionCollection *col )
else if (mode==Kexi::DesignViewMode) {
}
else if (mode==Kexi::TextViewMode) {
-// new KAction(i18n("Check Query"), "test_it", 0, this, SLOT(slotCheckQuery()), col, "querypart_check_query");
+// new KAction(i18n("Check Query"), "test_it", 0, this, TQT_SLOT(slotCheckQuery()), col, "querypart_check_query");
-//TODO new KAction(i18n("Execute Query"), "?????", 0, this, SLOT(checkQuery()), col, "querypart_execute_query");
+//TODO new KAction(i18n("Execute Query"), "?????", 0, this, TQT_SLOT(checkQuery()), col, "querypart_execute_query");
}
}
#endif
@@ -141,7 +141,7 @@ void KexiQueryPart::initPartActions()
void KexiQueryPart::initInstanceActions()
{
-// new KAction(i18n("Check Query"), "test_it", 0, this, SLOT(slotCheckQuery()),
+// new KAction(i18n("Check Query"), "test_it", 0, this, TQT_SLOT(slotCheckQuery()),
// m_instanceGuiClients[Kexi::DesignViewMode]->actionCollection(), "querypart_check_query");
KAction *a = createSharedAction(Kexi::TextViewMode, i18n("Check Query"), "test_it",
@@ -161,7 +161,7 @@ KexiDB::SchemaData*
KexiQueryPart::loadSchemaData(KexiDialogBase *dlg, const KexiDB::SchemaData& sdata, int viewMode)
{
KexiQueryPart::TempData * temp = static_cast<KexiQueryPart::TempData*>(dlg->tempData());
- QString sqlText;
+ TQString sqlText;
if (!loadDataBlock( dlg, sqlText, "sql" )) {
return 0;
}
@@ -191,7 +191,7 @@ KexiQueryPart::loadSchemaData(KexiDialogBase *dlg, const KexiDB::SchemaData& sda
return query;
}
-QString KexiQueryPart::i18nMessage(const QCString& englishMessage, KexiDialogBase* dlg) const
+TQString KexiQueryPart::i18nMessage(const TQCString& englishMessage, KexiDialogBase* dlg) const
{
Q_UNUSED(dlg);
if (englishMessage=="Design of object \"%1\" has been modified.")
@@ -202,7 +202,7 @@ QString KexiQueryPart::i18nMessage(const QCString& englishMessage, KexiDialogBas
return englishMessage;
}
-tristate KexiQueryPart::rename(KexiMainWindow *win, KexiPart::Item &item, const QString& newName)
+tristate KexiQueryPart::rename(KexiMainWindow *win, KexiPart::Item &item, const TQString& newName)
{
Q_UNUSED(newName);
if (!win->project()->dbConnection())
@@ -213,8 +213,8 @@ tristate KexiQueryPart::rename(KexiMainWindow *win, KexiPart::Item &item, const
//----------------
-KexiQueryPart::TempData::TempData(KexiDialogBase* parent, KexiDB::Connection *conn)
- : KexiDialogTempData(parent)
+KexiQueryPart::TempData::TempData(KexiDialogBase* tqparent, KexiDB::Connection *conn)
+ : KexiDialogTempData(TQT_TQOBJECT(tqparent))
, KexiDB::Connection::TableSchemaChangeListenerInterface()
, queryChangedInPreviousView(false)
, m_query(0)
@@ -253,7 +253,7 @@ void KexiQueryPart::TempData::registerTableSchemaChanges(KexiDB::QuerySchema *q)
tristate KexiQueryPart::TempData::closeListener()
{
- KexiDialogBase* dlg = static_cast<KexiDialogBase*>(parent());
+ KexiDialogBase* dlg = static_cast<KexiDialogBase*>(TQT_TQWIDGET(tqparent()));
return dlg->mainWin()->closeDialog(dlg);
}
@@ -270,7 +270,7 @@ void KexiQueryPart::TempData::setQuery(KexiDB::QuerySchema *query)
return;
if (m_query
/* query not owned by dialog */
- && (static_cast<KexiDialogBase*>(parent())->schemaData() != static_cast<KexiDB::SchemaData*>( m_query )))
+ && (static_cast<KexiDialogBase*>(TQT_TQWIDGET(tqparent()))->schemaData() != static_cast<KexiDB::SchemaData*>( m_query )))
{
delete m_query;
}
diff --git a/kexi/plugins/queries/kexiquerypart.h b/kexi/plugins/queries/kexiquerypart.h
index 6b16f28d..aee905e6 100644
--- a/kexi/plugins/queries/kexiquerypart.h
+++ b/kexi/plugins/queries/kexiquerypart.h
@@ -18,10 +18,10 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef KEXIQUERYPART_H
-#define KEXIQUERYPART_H
+#ifndef KEXITQUERYPART_H
+#define KEXITQUERYPART_H
-#include <qmap.h>
+#include <tqmap.h>
#include <kexidialogbase.h>
#include <kexipart.h>
@@ -44,9 +44,10 @@ class KexiProject;
class KexiQueryPart : public KexiPart::Part
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiQueryPart(QObject *parent, const char *name, const QStringList &);
+ KexiQueryPart(TQObject *tqparent, const char *name, const TQStringList &);
virtual ~KexiQueryPart();
virtual bool remove(KexiMainWindow *win, KexiPart::Item &item);
@@ -56,7 +57,7 @@ class KexiQueryPart : public KexiPart::Part
public KexiDB::Connection::TableSchemaChangeListenerInterface
{
public:
- TempData(KexiDialogBase* parent, KexiDB::Connection *conn);
+ TempData(KexiDialogBase* tqparent, KexiDB::Connection *conn);
virtual ~TempData();
virtual tristate closeListener();
void clearQuery();
@@ -65,7 +66,7 @@ class KexiQueryPart : public KexiPart::Part
/*! Assigns query \a query for this data.
Existing query (available using query()) is deleted but only
- if it is not owned by parent dialog (i.e. != KexiDialogBase::schemaData()).
+ if it is not owned by tqparent dialog (i.e. != KexiDialogBase::schemaData()).
\a query can be 0.
If \a query is equal to existing query, nothing is performed.
*/
@@ -91,18 +92,18 @@ class KexiQueryPart : public KexiPart::Part
KexiDB::QuerySchema *m_query;
};
- virtual QString i18nMessage(const QCString& englishMessage,
+ virtual TQString i18nMessage(const TQCString& englishMessage,
KexiDialogBase* dlg) const;
/*! Renames stored data pointed by \a item to \a newName.
Reimplemented to mark the query obsolete by using KexiDB::Connection::setQuerySchemaObsolete(). */
- virtual tristate rename(KexiMainWindow * win, KexiPart::Item & item, const QString& newName);
+ virtual tristate rename(KexiMainWindow * win, KexiPart::Item & item, const TQString& newName);
protected:
virtual KexiDialogTempData* createTempData(KexiDialogBase* dialog);
- virtual KexiViewBase* createView(QWidget *parent, KexiDialogBase* dialog,
- KexiPart::Item &item, int viewMode = Kexi::DataViewMode, QMap<QString,QString>* staticObjectArgs = 0);
+ virtual KexiViewBase* createView(TQWidget *tqparent, KexiDialogBase* dialog,
+ KexiPart::Item &item, int viewMode = Kexi::DataViewMode, TQMap<TQString,TQString>* staticObjectArgs = 0);
// virtual void initPartActions( KActionCollection *col );
// virtual void initInstanceActions( int mode, KActionCollection *col );
diff --git a/kexi/plugins/queries/kexiqueryview.cpp b/kexi/plugins/queries/kexiqueryview.cpp
index cf3fee96..cf5400dc 100644
--- a/kexi/plugins/queries/kexiqueryview.cpp
+++ b/kexi/plugins/queries/kexiqueryview.cpp
@@ -50,8 +50,8 @@ class KexiQueryView::Private
//---------------------------------------------------------------------------------
-KexiQueryView::KexiQueryView(KexiMainWindow *win, QWidget *parent, const char *name)
- : KexiDataTable(win, parent, name)
+KexiQueryView::KexiQueryView(KexiMainWindow *win, TQWidget *tqparent, const char *name)
+ : KexiDataTable(win, tqparent, name)
, d( new Private() )
{
tableView()->setInsertingEnabled(false); //default
@@ -72,7 +72,7 @@ tristate KexiQueryView::executeQuery(KexiDB::QuerySchema *query)
KexiDB::Cursor *oldCursor = d->cursor;
KexiDB::debug( query->parameters() );
bool ok;
- QValueList<QVariant> params;
+ TQValueList<TQVariant> params;
{
KexiUtils::WaitCursorRemover remover;
params = KexiQueryParameters::getParameters(this,
@@ -83,7 +83,7 @@ tristate KexiQueryView::executeQuery(KexiDB::QuerySchema *query)
}
d->cursor = mainWin()->project()->dbConnection()->executeQuery(*query, params);
if (!d->cursor) {
- parentDialog()->setStatus(parentDialog()->mainWin()->project()->dbConnection(),
+ tqparentDialog()->settqStatus(tqparentDialog()->mainWin()->project()->dbConnection(),
i18n("Query executing failed."));
//todo: also provide server result and sql statement
return false;
@@ -100,7 +100,7 @@ tristate KexiQueryView::executeQuery(KexiDB::QuerySchema *query)
tableView()->setReadOnly( true );
//! @todo maybe allow writing and inserting for single-table relations?
//set data model itself read-only too
- tableView()->data()->setReadOnly( true );
+ tableView()->KexiDataAwareObjectInterface::data()->setReadOnly( true );
tableView()->setInsertingEnabled( false );
return true;
}
@@ -108,13 +108,13 @@ tristate KexiQueryView::executeQuery(KexiDB::QuerySchema *query)
tristate KexiQueryView::afterSwitchFrom(int mode)
{
if (mode==Kexi::NoViewMode) {
- KexiDB::QuerySchema *querySchema = static_cast<KexiDB::QuerySchema *>(parentDialog()->schemaData());
+ KexiDB::QuerySchema *querySchema = static_cast<KexiDB::QuerySchema *>(tqparentDialog()->schemaData());
const tristate result = executeQuery(querySchema);
if (true != result)
return result;
}
else if (mode==Kexi::DesignViewMode || Kexi::TextViewMode) {
- KexiQueryPart::TempData * temp = static_cast<KexiQueryPart::TempData*>(parentDialog()->tempData());
+ KexiQueryPart::TempData * temp = static_cast<KexiQueryPart::TempData*>(tqparentDialog()->tempData());
//remember what view we should use to store data changes, if needed
// if (temp->queryChangedInPreviousView)
@@ -131,7 +131,7 @@ tristate KexiQueryView::afterSwitchFrom(int mode)
KexiDB::SchemaData* KexiQueryView::storeNewData(const KexiDB::SchemaData& sdata, bool &cancel)
{
- KexiViewBase * view = parentDialog()->viewThatRecentlySetDirtyFlag();
+ KexiViewBase * view = tqparentDialog()->viewThatRecentlySetDirtyFlag();
if (dynamic_cast<KexiQueryDesignerGuiEditor*>(view))
return dynamic_cast<KexiQueryDesignerGuiEditor*>(view)->storeNewData(sdata, cancel);
if (dynamic_cast<KexiQueryDesignerSQLView*>(view))
@@ -141,7 +141,7 @@ KexiDB::SchemaData* KexiQueryView::storeNewData(const KexiDB::SchemaData& sdata,
tristate KexiQueryView::storeData(bool dontAsk)
{
- KexiViewBase * view = parentDialog()->viewThatRecentlySetDirtyFlag();
+ KexiViewBase * view = tqparentDialog()->viewThatRecentlySetDirtyFlag();
if (dynamic_cast<KexiQueryDesignerGuiEditor*>(view))
return dynamic_cast<KexiQueryDesignerGuiEditor*>(view)->storeData(dontAsk);
if (dynamic_cast<KexiQueryDesignerSQLView*>(view))
diff --git a/kexi/plugins/queries/kexiqueryview.h b/kexi/plugins/queries/kexiqueryview.h
index f0083738..b1f183ad 100644
--- a/kexi/plugins/queries/kexiqueryview.h
+++ b/kexi/plugins/queries/kexiqueryview.h
@@ -18,8 +18,8 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef KEXIQUERYVIEW_H
-#define KEXIQUERYVIEW_H
+#ifndef KEXITQUERYVIEW_H
+#define KEXITQUERYVIEW_H
#include <kexidatatable.h>
@@ -32,9 +32,10 @@ class KexiMainWindow;
class KexiQueryView : public KexiDataTable
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiQueryView(KexiMainWindow *win, QWidget *parent, const char *name=0);
+ KexiQueryView(KexiMainWindow *win, TQWidget *tqparent, const char *name=0);
~KexiQueryView();
protected:
diff --git a/kexi/plugins/relations/kexirelationmaindlg.cpp b/kexi/plugins/relations/kexirelationmaindlg.cpp
index 6b14fffa..ded97e1c 100644
--- a/kexi/plugins/relations/kexirelationmaindlg.cpp
+++ b/kexi/plugins/relations/kexirelationmaindlg.cpp
@@ -23,7 +23,7 @@
#include <kdebug.h>
#include <kiconloader.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kexidb/connection.h>
@@ -32,8 +32,8 @@
#include "kexirelationwidget.h"
#include "kexirelationview.h"
-KexiRelationMainDlg::KexiRelationMainDlg(KexiMainWindow *mainWin, QWidget *parent, const char *name)
- : KexiViewBase(mainWin, parent, name)
+KexiRelationMainDlg::KexiRelationMainDlg(KexiMainWindow *mainWin, TQWidget *tqparent, const char *name)
+ : KexiViewBase(mainWin, tqparent, name)
{
kdDebug() << "KexiRelationMainDlg()" << endl;
// setIcon(SmallIcon("relation"));
@@ -46,13 +46,13 @@ KexiRelationMainDlg::KexiRelationMainDlg(KexiMainWindow *mainWin, QWidget *paren
addActionProxyChild( m_rel );
// addActionProxyChild( m_view->relationView() );
- QVBoxLayout *g = new QVBoxLayout(this);
+ TQVBoxLayout *g = new TQVBoxLayout(this);
g->addWidget(m_rel);
//show all tables
KexiDB::Connection *conn = mainWin->project()->dbConnection();
- QStringList tables = conn->tableNames();
- for (QStringList::ConstIterator it = tables.constBegin(); it!=tables.constEnd(); ++it) {
+ TQStringList tables = conn->tableNames();
+ for (TQStringList::ConstIterator it = tables.constBegin(); it!=tables.constEnd(); ++it) {
m_rel->addTable( *it );
}
}
@@ -61,18 +61,18 @@ KexiRelationMainDlg::~KexiRelationMainDlg()
{
}
-QSize KexiRelationMainDlg::sizeHint() const
+TQSize KexiRelationMainDlg::tqsizeHint() const
{
- return QSize(600,300);
+ return TQSize(600,300);
}
-QWidget*
+TQWidget*
KexiRelationMainDlg::mainWidget()
{
return m_rel;
}
-QString KexiRelationMainDlg::itemIcon()
+TQString KexiRelationMainDlg::itemIcon()
{
return "relation";
}
diff --git a/kexi/plugins/relations/kexirelationmaindlg.h b/kexi/plugins/relations/kexirelationmaindlg.h
index 791d6544..4dbc7698 100644
--- a/kexi/plugins/relations/kexirelationmaindlg.h
+++ b/kexi/plugins/relations/kexirelationmaindlg.h
@@ -28,16 +28,17 @@ class KexiRelationWidget;
class KexiRelationMainDlg : public KexiViewBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiRelationMainDlg(KexiMainWindow *mainWin, QWidget *parent, const char *name = 0);
+ KexiRelationMainDlg(KexiMainWindow *mainWin, TQWidget *tqparent, const char *name = 0);
~KexiRelationMainDlg();
- virtual QSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
- virtual QWidget* mainWidget();
+ virtual TQWidget* mainWidget();
- virtual QString itemIcon();
+ virtual TQString itemIcon();
private:
KexiRelationWidget *m_rel;
diff --git a/kexi/plugins/relations/kexirelationpartimpl.cpp b/kexi/plugins/relations/kexirelationpartimpl.cpp
index a2a7c213..9d08527b 100644
--- a/kexi/plugins/relations/kexirelationpartimpl.cpp
+++ b/kexi/plugins/relations/kexirelationpartimpl.cpp
@@ -28,8 +28,8 @@
#include <kiconloader.h>
#include <kdebug.h>
-KexiRelationPartImpl::KexiRelationPartImpl(QObject *parent, const char *name, const QStringList &args)
- : KexiInternalPart(parent, name, args)
+KexiRelationPartImpl::KexiRelationPartImpl(TQObject *tqparent, const char *name, const TQStringList &args)
+ : KexiInternalPart(tqparent, name, args)
{
kdDebug() << "KexiRelationPartImpl()" << endl;
}
@@ -38,11 +38,11 @@ KexiRelationPartImpl::~KexiRelationPartImpl()
{
}
-/*QWidget *
+/*TQWidget *
KexiRelationPartImpl::createWidget(const char* , KexiMainWindow* mainWin,
- QWidget *parent, const char *objName)
+ TQWidget *tqparent, const char *objName)
{
- return new KexiRelationWidget(mainWin, parent, objName);
+ return new KexiRelationWidget(mainWin, tqparent, objName);
}*/
/*KexiDialogBase *
@@ -62,14 +62,14 @@ KexiRelationPartImpl::createDialog(KexiMainWindow* mainWin, const char *)
}*/
KexiViewBase *
-KexiRelationPartImpl::createView(KexiMainWindow* mainWin, QWidget *parent, const char *)
+KexiRelationPartImpl::createView(KexiMainWindow* mainWin, TQWidget *tqparent, const char *)
{
// kdDebug() << "KexiRelationPartImpl::createDialog()" << endl;
// KexiDialogBase * dlg = new KexiDialogBase(mainWin, i18n("Relations"));
// dlg->setIcon(SmallIcon("relation"));
// dlg->setDocID( mainWin->generatePrivateDocID() );
- KexiRelationMainDlg *view = new KexiRelationMainDlg(mainWin, parent, "relations");
+ KexiRelationMainDlg *view = new KexiRelationMainDlg(mainWin, tqparent, "relations");
// dlg->addView(view);
// dlg->show();
// dlg->registerDialog();
diff --git a/kexi/plugins/relations/kexirelationpartimpl.h b/kexi/plugins/relations/kexirelationpartimpl.h
index b5b5438e..58ee5674 100644
--- a/kexi/plugins/relations/kexirelationpartimpl.h
+++ b/kexi/plugins/relations/kexirelationpartimpl.h
@@ -25,20 +25,21 @@
class KexiRelationPartImpl : public KexiInternalPart
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiRelationPartImpl(QObject *parent, const char *name, const QStringList &args);
+ KexiRelationPartImpl(TQObject *tqparent, const char *name, const TQStringList &args);
virtual ~KexiRelationPartImpl();
protected:
-// virtual QWidget *createWidget(const char* widgetClass, KexiMainWindow* mainWin,
-// QWidget *parent, const char *objName=0);
+// virtual TQWidget *createWidget(const char* widgetClass, KexiMainWindow* mainWin,
+// TQWidget *tqparent, const char *objName=0);
- virtual KexiViewBase *createView(KexiMainWindow* mainWin, QWidget *parent,
+ virtual KexiViewBase *createView(KexiMainWindow* mainWin, TQWidget *tqparent,
const char *objName=0);
- //virtual KexiDialogBase *createWindow(KexiMainWindow *parent);
- //virtual QWidget *createWidget(QWidget *parent, KexiMainWindow *win);
+ //virtual KexiDialogBase *createWindow(KexiMainWindow *tqparent);
+ //virtual TQWidget *createWidget(TQWidget *tqparent, KexiMainWindow *win);
};
#endif
diff --git a/kexi/plugins/reports/kexireportfactory.cpp b/kexi/plugins/reports/kexireportfactory.cpp
index 0ac782c4..d863bc9f 100644
--- a/kexi/plugins/reports/kexireportfactory.cpp
+++ b/kexi/plugins/reports/kexireportfactory.cpp
@@ -16,8 +16,8 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
-#include <qpopupmenu.h>
-#include <qvaluevector.h>
+#include <tqpopupmenu.h>
+#include <tqvaluevector.h>
#include <kgenericfactory.h>
#include <klocale.h>
@@ -33,8 +33,8 @@
#include "reportwidgets.h"
#include "kexireportfactory.h"
-KexiReportFactory::KexiReportFactory(QObject *parent, const char *name, const QStringList &)
- : KFormDesigner::WidgetFactory(parent, name)
+KexiReportFactory::KexiReportFactory(TQObject *tqparent, const char *name, const TQStringList &)
+ : KFormDesigner::WidgetFactory(tqparent, name)
{
KFormDesigner::WidgetInfo *wView = new KFormDesigner::WidgetInfo(this);
wView->setPixmap("report");
@@ -86,20 +86,20 @@ KexiReportFactory::~KexiReportFactory()
{
}
-QString
+TQString
KexiReportFactory::name()
{
return "kexireportwidgets";
}
-QWidget*
-KexiReportFactory::createWidget(const QCString &c, QWidget *p, const char *n,
+TQWidget*
+KexiReportFactory::createWidget(const TQCString &c, TQWidget *p, const char *n,
KFormDesigner::Container *container, int options)
{
Q_UNUSED(options);
kexipluginsdbg << "KexiReportFactory::create() " << this << endl;
- QString text( container->form()->library()->textForWidgetName(n, c) );
+ TQString text( container->form()->library()->textForWidgetName(n, c) );
if(c == "Label")
return new Label(text, p, n);
@@ -114,56 +114,56 @@ KexiReportFactory::createWidget(const QCString &c, QWidget *p, const char *n,
}
bool
-KexiReportFactory::createMenuActions(const QCString &classname, QWidget *w,
- QPopupMenu *menu, KFormDesigner::Container *container)
+KexiReportFactory::createMenuActions(const TQCString &classname, TQWidget *w,
+ TQPopupMenu *menu, KFormDesigner::Container *container)
{
Q_UNUSED(w);
Q_UNUSED(container);
if(classname == "Label") {
/*! @todo use KAction */
- menu->insertItem(SmallIconSet("edit"), i18n("Edit Rich Text"), this, SLOT(editText()));
+ menu->insertItem(SmallIconSet("edit"), i18n("Edit Rich Text"), this, TQT_SLOT(editText()));
return true;
}
return false;
}
bool
-KexiReportFactory::startEditing(const QCString &c, QWidget *w, KFormDesigner::Container *container)
+KexiReportFactory::startEditing(const TQCString &c, TQWidget *w, KFormDesigner::Container *container)
{
m_container = container;
if(c == "Label") {
- QLabel *label = static_cast<QLabel*>(w);
+ TQLabel *label = static_cast<TQLabel*>(w);
if(label->textFormat() == RichText) {
m_widget = w;
editText();
}
else
- createEditor(c, label->text(), label, container, label->geometry(), label->alignment());
+ createEditor(c, label->text(), label, container, label->tqgeometry(), label->tqalignment());
return true;
}
return false;
}
bool
-KexiReportFactory::isPropertyVisibleInternal(const QCString &classname, QWidget *w, const QCString &property, bool isTopLevel)
+KexiReportFactory::isPropertyVisibleInternal(const TQCString &classname, TQWidget *w, const TQCString &property, bool isTopLevel)
{
if(classname == "Label") {
if(property == "pixmap")
return false;
}
else if(classname == "PicLabel") {
- if((property == "text") || (property == "indent") || (property == "textFormat") || (property == "font") || (property == "alignment"))
+ if((property == "text") || (property == "indent") || (property == "textFormat") || (property == "font") || (property == "tqalignment"))
return false;
}
return WidgetFactory::isPropertyVisibleInternal(classname, w, property, isTopLevel);
}
-QValueList<QCString>
-KexiReportFactory::autoSaveProperties(const QCString &classname)
+TQValueList<TQCString>
+KexiReportFactory::autoSaveProperties(const TQCString &classname)
{
- QValueList<QCString> l;
+ TQValueList<TQCString> l;
if(classname == "Label")
l << "text";
@@ -175,23 +175,23 @@ KexiReportFactory::autoSaveProperties(const QCString &classname)
/*
void
-KexiReportFactory::changeText(const QString &text)
+KexiReportFactory::changeText(const TQString &text)
{
- QWidget *w = WidgetFactory::m_widget;
+ TQWidget *w = WidgetFactory::m_widget;
changeProperty("text", text, m_container);
- int width = w->sizeHint().width();
+ int width = w->tqsizeHint().width();
if(w->width() < width)
w->resize(width, w->height() );
}
void
-KexiReportFactory::resizeEditor(QWidget *widget, const QCString &)
+KexiReportFactory::resizeEditor(TQWidget *widget, const TQCString &)
{
- QSize s = widget->size();
- QPoint p = widget->pos();
- QRect r;
+ TQSize s = widget->size();
+ TQPoint p = widget->pos();
+ TQRect r;
m_editor->resize(s);
m_editor->move(p);
@@ -200,11 +200,11 @@ KexiReportFactory::resizeEditor(QWidget *widget, const QCString &)
void
KexiReportFactory::editText()
{
- QCString classname = m_widget->className();
- QString text;
+ TQCString classname = m_widget->className();
+ TQString text;
if(classname == "Label")
- text = ((QLabel*)m_widget)->text();
+ text = ((TQLabel*)m_widget)->text();
if(editRichText(m_widget, text)) {
changeProperty("textFormat", "RichText", m_container->form());
@@ -212,11 +212,11 @@ KexiReportFactory::editText()
}
if(classname == "Label")
- m_widget->resize(m_widget->sizeHint());
+ m_widget->resize(m_widget->tqsizeHint());
}
bool
-KexiReportFactory::previewWidget(const QCString &, QWidget *, KFormDesigner::Container *)
+KexiReportFactory::previewWidget(const TQCString &, TQWidget *, KFormDesigner::Container *)
{
return false;
}
diff --git a/kexi/plugins/reports/kexireportfactory.h b/kexi/plugins/reports/kexireportfactory.h
index c6b91702..ab2ce7a1 100644
--- a/kexi/plugins/reports/kexireportfactory.h
+++ b/kexi/plugins/reports/kexireportfactory.h
@@ -26,35 +26,36 @@
class KexiReportFactory : public KFormDesigner::WidgetFactory
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiReportFactory(QObject *parent, const char *name, const QStringList &args);
+ KexiReportFactory(TQObject *tqparent, const char *name, const TQStringList &args);
virtual ~KexiReportFactory();
- virtual QString name();
- virtual QWidget *createWidget(const QCString &classname, QWidget *parent, const char *name, KFormDesigner::Container *container,
+ virtual TQString name();
+ virtual TQWidget *createWidget(const TQCString &classname, TQWidget *tqparent, const char *name, KFormDesigner::Container *container,
int options = DefaultOptions);
- virtual bool createMenuActions(const QCString &classname, QWidget *w, QPopupMenu *menu,
+ virtual bool createMenuActions(const TQCString &classname, TQWidget *w, TQPopupMenu *menu,
KFormDesigner::Container *container);
- virtual bool startEditing(const QCString &classname, QWidget *w, KFormDesigner::Container *container);
- virtual bool previewWidget(const QCString &, QWidget *, KFormDesigner::Container *);
+ virtual bool startEditing(const TQCString &classname, TQWidget *w, KFormDesigner::Container *container);
+ virtual bool previewWidget(const TQCString &, TQWidget *, KFormDesigner::Container *);
- //virtual void saveSpecialProperty(const QString &classname, const QString &name, const QVariant &value, QWidget *w,
- //QDomElement &parentNode, QDomDocument &parent) {}
- //virtual void readSpecialProperty(const QCString &classname, QDomElement &node, QWidget *w, KFormDesigner::ObjectTreeItem *item) {}
- virtual QValueList<QCString> autoSaveProperties(const QCString &classname);
+ //virtual void saveSpecialProperty(const TQString &classname, const TQString &name, const TQVariant &value, TQWidget *w,
+ //TQDomElement &tqparentNode, TQDomDocument &tqparent) {}
+ //virtual void readSpecialProperty(const TQCString &classname, TQDomElement &node, TQWidget *w, KFormDesigner::ObjectTreeItem *item) {}
+ virtual TQValueList<TQCString> autoSaveProperties(const TQCString &classname);
public slots:
void editText();
protected:
- virtual bool isPropertyVisibleInternal(const QCString &, QWidget *, const QCString &, bool isTopLevel);
-// virtual void changeText(const QString &newText);
-// virtual void resizeEditor(QWidget *widget, const QCString &classname);
+ virtual bool isPropertyVisibleInternal(const TQCString &, TQWidget *, const TQCString &, bool isTopLevel);
+// virtual void changeText(const TQString &newText);
+// virtual void resizeEditor(TQWidget *widget, const TQCString &classname);
private:
- QWidget *m_widget;
+ TQWidget *m_widget;
KFormDesigner::Container *m_container;
};
diff --git a/kexi/plugins/reports/kexireportform.cpp b/kexi/plugins/reports/kexireportform.cpp
index d5dd6f55..f77b41a5 100644
--- a/kexi/plugins/reports/kexireportform.cpp
+++ b/kexi/plugins/reports/kexireportform.cpp
@@ -18,20 +18,20 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qobjectlist.h>
-#include <qpainter.h>
-#include <qcursor.h>
+#include <tqobjectlist.h>
+#include <tqpainter.h>
+#include <tqcursor.h>
#include <kdebug.h>
#include "kexireportform.h"
-KexiReportForm::KexiReportForm(QWidget *parent, const char *name/*, KexiDB::Connection *conn*/)
- : QWidget(parent, name)
+KexiReportForm::KexiReportForm(TQWidget *tqparent, const char *name/*, KexiDB::Connection *conn*/)
+ : TQWidget(tqparent, name)
{
//m_conn = conn;
kexipluginsdbg << "KexiReportForm::KexiReportForm(): " << endl;
- setCursor(QCursor(Qt::ArrowCursor)); //to avoid keeping Size cursor when moving from form's boundaries
+ setCursor(TQCursor(TQt::ArrowCursor)); //to avoid keeping Size cursor when moving from form's boundaries
setBackgroundColor(white);
}
@@ -40,47 +40,47 @@ KexiReportForm::~KexiReportForm()
kexipluginsdbg << "KexiReportForm::~KexiReportForm(): close" << endl;
}
-//repaint all children widgets
-static void repaintAll(QWidget *w)
+//tqrepaint all tqchildren widgets
+static void tqrepaintAll(TQWidget *w)
{
- QObjectList *list = w->queryList("QWidget");
- QObjectListIt it(*list);
- for (QObject *obj; (obj=it.current()); ++it ) {
- static_cast<QWidget*>(obj)->repaint();
+ TQObjectList *list = w->queryList(TQWIDGET_OBJECT_NAME_STRING);
+ TQObjectListIt it(*list);
+ for (TQObject *obj; (obj=it.current()); ++it ) {
+ static_cast<TQWidget*>(obj)->tqrepaint();
}
delete list;
}
void
-KexiReportForm::drawRect(const QRect& r, int type)
+KexiReportForm::drawRect(const TQRect& r, int type)
{
- QValueList<QRect> l;
+ TQValueList<TQRect> l;
l.append(r);
drawRects(l, type);
}
void
-KexiReportForm::drawRects(const QValueList<QRect> &list, int type)
+KexiReportForm::drawRects(const TQValueList<TQRect> &list, int type)
{
- QPainter p;
+ TQPainter p;
p.begin(this, true);
bool unclipped = testWFlags( WPaintUnclipped );
setWFlags( WPaintUnclipped );
if (prev_rect.isValid()) {
//redraw prev. selection's rectangle
- p.drawPixmap( QPoint(prev_rect.x()-2, prev_rect.y()-2), buffer, QRect(prev_rect.x()-2, prev_rect.y()-2, prev_rect.width()+4, prev_rect.height()+4));
+ p.drawPixmap( TQPoint(prev_rect.x()-2, prev_rect.y()-2), buffer, TQRect(prev_rect.x()-2, prev_rect.y()-2, prev_rect.width()+4, prev_rect.height()+4));
}
- p.setBrush(QBrush::NoBrush);
+ p.setBrush(TQBrush::NoBrush);
if(type == 1) // selection rect
- p.setPen(QPen(white, 1, Qt::DotLine));
+ p.setPen(TQPen(white, 1, TQt::DotLine));
else if(type == 2) // insert rect
- p.setPen(QPen(white, 2));
+ p.setPen(TQPen(white, 2));
p.setRasterOp(XorROP);
- prev_rect = QRect();
- QValueList<QRect>::ConstIterator endIt = list.constEnd();
- for(QValueList<QRect>::ConstIterator it = list.constBegin(); it != endIt; ++it) {
+ prev_rect = TQRect();
+ TQValueList<TQRect>::ConstIterator endIt = list.constEnd();
+ for(TQValueList<TQRect>::ConstIterator it = list.constBegin(); it != endIt; ++it) {
p.drawRect(*it);
prev_rect = prev_rect.unite(*it);
}
@@ -93,58 +93,58 @@ KexiReportForm::drawRects(const QValueList<QRect> &list, int type)
void
KexiReportForm::initBuffer()
{
- repaintAll(this);
+ tqrepaintAll(this);
buffer.resize( width(), height() );
- buffer = QPixmap::grabWindow( winId() );
- prev_rect = QRect();
+ buffer = TQPixmap::grabWindow( winId() );
+ prev_rect = TQRect();
}
void
KexiReportForm::clearForm()
{
- QPainter p;
+ TQPainter p;
p.begin(this, true);
bool unclipped = testWFlags( WPaintUnclipped );
setWFlags( WPaintUnclipped );
//redraw entire form surface
- p.drawPixmap( QPoint(0,0), buffer, QRect(0,0,buffer.width(), buffer.height()) );
+ p.drawPixmap( TQPoint(0,0), buffer, TQRect(0,0,buffer.width(), buffer.height()) );
if (!unclipped)
clearWFlags( WPaintUnclipped );
p.end();
- repaintAll(this);
+ tqrepaintAll(this);
}
void
-KexiReportForm::highlightWidgets(QWidget *from, QWidget *to)//, const QPoint &point)
+KexiReportForm::highlightWidgets(TQWidget *from, TQWidget *to)//, const TQPoint &point)
{
- QPoint fromPoint, toPoint;
- if(from && from->parentWidget() && (from != this))
- fromPoint = from->parentWidget()->mapTo(this, from->pos());
- if(to && to->parentWidget() && (to != this))
- toPoint = to->parentWidget()->mapTo(this, to->pos());
+ TQPoint fromPoint, toPoint;
+ if(from && from->tqparentWidget() && (from != this))
+ fromPoint = from->tqparentWidget()->mapTo(this, from->pos());
+ if(to && to->tqparentWidget() && (to != this))
+ toPoint = to->tqparentWidget()->mapTo(this, to->pos());
- QPainter p;
+ TQPainter p;
p.begin(this, true);
bool unclipped = testWFlags( WPaintUnclipped );
setWFlags( WPaintUnclipped );
if (prev_rect.isValid()) {
//redraw prev. selection's rectangle
- p.drawPixmap( QPoint(prev_rect.x(), prev_rect.y()), buffer, QRect(prev_rect.x(), prev_rect.y(), prev_rect.width(), prev_rect.height()));
+ p.drawPixmap( TQPoint(prev_rect.x(), prev_rect.y()), buffer, TQRect(prev_rect.x(), prev_rect.y(), prev_rect.width(), prev_rect.height()));
}
- p.setPen( QPen(Qt::red, 2) );
+ p.setPen( TQPen(TQt::red, 2) );
if(to)
{
- QPixmap pix1 = QPixmap::grabWidget(from);
- QPixmap pix2 = QPixmap::grabWidget(to);
+ TQPixmap pix1 = TQPixmap::grabWidget(from);
+ TQPixmap pix2 = TQPixmap::grabWidget(to);
if((from != this) && (to != this))
- p.drawLine( from->parentWidget()->mapTo(this, from->geometry().center()), to->parentWidget()->mapTo(this, to->geometry().center()) );
+ p.drawLine( from->tqparentWidget()->mapTo(this, from->tqgeometry().center()), to->tqparentWidget()->mapTo(this, to->tqgeometry().center()) );
p.drawPixmap(fromPoint.x(), fromPoint.y(), pix1);
p.drawPixmap(toPoint.x(), toPoint.y(), pix2);
@@ -161,7 +161,7 @@ KexiReportForm::highlightWidgets(QWidget *from, QWidget *to)//, const QPoint &po
p.drawRoundRect(fromPoint.x(), fromPoint.y(), from->width(), from->height(), 5, 5);
if((to == this) || (from == this))
- prev_rect = QRect(0, 0, buffer.width(), buffer.height());
+ prev_rect = TQRect(0, 0, buffer.width(), buffer.height());
else if(to)
{
prev_rect.setX( (fromPoint.x() < toPoint.x()) ? (fromPoint.x() - 5) : (toPoint.x() - 5) );
@@ -170,18 +170,18 @@ KexiReportForm::highlightWidgets(QWidget *from, QWidget *to)//, const QPoint &po
prev_rect.setBottom( (fromPoint.y() < toPoint.y()) ? (toPoint.y() + to->height() + 10) : (fromPoint.y() + from->height() + 10) ) ;
}
else
- prev_rect = QRect(fromPoint.x()- 5, fromPoint.y() -5, from->width() + 10, from->height() + 10);
+ prev_rect = TQRect(fromPoint.x()- 5, fromPoint.y() -5, from->width() + 10, from->height() + 10);
if (!unclipped)
clearWFlags( WPaintUnclipped );
p.end();
}
-QSize
-KexiReportForm::sizeHint() const
+TQSize
+KexiReportForm::tqsizeHint() const
{
//todo: find better size (user configured?)
- return QSize(400,300);
+ return TQSize(400,300);
}
#include "kexireportform.moc"
diff --git a/kexi/plugins/reports/kexireportform.h b/kexi/plugins/reports/kexireportform.h
index 8b03c2ec..9f13fbc9 100644
--- a/kexi/plugins/reports/kexireportform.h
+++ b/kexi/plugins/reports/kexireportform.h
@@ -21,40 +21,41 @@
#ifndef KEXIREPORTFORM_H
#define KEXIREPORTFORM_H
-#include <qwidget.h>
-#include <qpixmap.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
#include <formeditor/form.h>
//! The report top widget
-class KEXIREPORTUTILS_EXPORT KexiReportForm : public QWidget, public KFormDesigner::FormWidget
+class KEXIREPORTUTILS_EXPORT KexiReportForm : public TQWidget, public KFormDesigner::FormWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiReportForm(QWidget *parent, const char *name="kexi_dbform");
+ KexiReportForm(TQWidget *tqparent, const char *name="kexi_dbform");
virtual ~KexiReportForm();
- /*QString datasource() const { return m_ds; }
+ /*TQString datasource() const { return m_ds; }
bool navigatorShown() const { return m_nav; }
- void setDatasource(const QString &s) { m_ds = s; }
+ void setDatasource(const TQString &s) { m_ds = s; }
void showRecordNavigator(bool s) { m_nav = s; }*/
- virtual void drawRect(const QRect& r, int type);
- virtual void drawRects(const QValueList<QRect> &list, int type);
+ virtual void drawRect(const TQRect& r, int type);
+ virtual void drawRects(const TQValueList<TQRect> &list, int type);
virtual void initBuffer();
virtual void clearForm();
- virtual void highlightWidgets(QWidget *from, QWidget *to/*, const QPoint &p*/);
+ virtual void highlightWidgets(TQWidget *from, TQWidget *to/*, const TQPoint &p*/);
- virtual QSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
private:
- /*QString m_ds;
+ /*TQString m_ds;
bool m_nav;
KexiDB::Connection *m_conn;*/
- QPixmap buffer; //!< stores grabbed entire form's area for redraw
- QRect prev_rect; //!< previously selected rectangle
+ TQPixmap buffer; //!< stores grabbed entire form's area for redraw
+ TQRect prev_rect; //!< previously selected rectangle
};
#endif
diff --git a/kexi/plugins/reports/kexireportpart.cpp b/kexi/plugins/reports/kexireportpart.cpp
index ad83cbf4..6b9c6bc3 100644
--- a/kexi/plugins/reports/kexireportpart.cpp
+++ b/kexi/plugins/reports/kexireportpart.cpp
@@ -43,8 +43,8 @@
KFormDesigner::WidgetLibrary* KexiReportPart::static_reportsLibrary = 0L;
-KexiReportPart::KexiReportPart(QObject *parent, const char *name, const QStringList &l)
- : KexiPart::Part(parent, name, l)
+KexiReportPart::KexiReportPart(TQObject *tqparent, const char *name, const TQStringList &l)
+ : KexiPart::Part(tqparent, name, l)
{
// REGISTERED ID:
m_registeredPartID = (int)KexiPart::ReportObjectType;
@@ -66,7 +66,7 @@ KexiReportPart::KexiReportPart(QObject *parent, const char *name, const QStringL
// Create and store a handle to report' library. Forms will have their own library too.
/* @todo add configuration for supported factory groups */
- QStringList supportedFactoryGroups;
+ TQStringList supportedFactoryGroups;
supportedFactoryGroups += "kexi-report";
static_reportsLibrary = KFormDesigner::FormManager::createWidgetLibrary(
formManager, supportedFactoryGroups);
@@ -101,22 +101,22 @@ KexiReportPart::createTempData(KexiDialogBase* dialog)
}
KexiViewBase*
-KexiReportPart::createView(QWidget *parent, KexiDialogBase* dialog,
- KexiPart::Item &item, int, QMap<QString,QString>*)
+KexiReportPart::createView(TQWidget *tqparent, KexiDialogBase* dialog,
+ KexiPart::Item &item, int, TQMap<TQString,TQString>*)
{
kexipluginsdbg << "KexiReportPart::createView()" << endl;
KexiMainWindow *win = dialog->mainWin();
if (!win || !win->project() || !win->project()->dbConnection())
return 0;
- KexiReportView *view = new KexiReportView(win, parent, item.name().latin1(),
+ KexiReportView *view = new KexiReportView(win, tqparent, item.name().latin1(),
win->project()->dbConnection() );
return view;
}
-QString
-KexiReportPart::i18nMessage(const QCString& englishMessage, KexiDialogBase* dlg) const
+TQString
+KexiReportPart::i18nMessage(const TQCString& englishMessage, KexiDialogBase* dlg) const
{
Q_UNUSED(dlg);
if (englishMessage=="Design of object \"%1\" has been modified.")
@@ -128,8 +128,8 @@ KexiReportPart::i18nMessage(const QCString& englishMessage, KexiDialogBase* dlg)
//---------------
-KexiReportPart::TempData::TempData(QObject* parent)
- : KexiDialogTempData(parent)
+KexiReportPart::TempData::TempData(TQObject* tqparent)
+ : KexiDialogTempData(tqparent)
{
}
diff --git a/kexi/plugins/reports/kexireportpart.h b/kexi/plugins/reports/kexireportpart.h
index 19731e57..ee93580f 100644
--- a/kexi/plugins/reports/kexireportpart.h
+++ b/kexi/plugins/reports/kexireportpart.h
@@ -42,9 +42,10 @@ namespace KexiDB
class KEXIREPORTUTILS_EXPORT KexiReportPart : public KexiPart::Part
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiReportPart(QObject *parent, const char *name, const QStringList &);
+ KexiReportPart(TQObject *tqparent, const char *name, const TQStringList &);
virtual ~KexiReportPart();
//! \return a pointer to Reports Widget Library.
@@ -52,28 +53,28 @@ class KEXIREPORTUTILS_EXPORT KexiReportPart : public KexiPart::Part
// KFormDesigner::FormManager *manager() { return m_manager; }
- void generateForm(KexiDB::FieldList *list, QDomDocument &domDoc);
+ void generateForm(KexiDB::FieldList *list, TQDomDocument &domDoc);
class TempData : public KexiDialogTempData
{
public:
- TempData(QObject* parent);
+ TempData(TQObject* tqparent);
~TempData();
- QGuardedPtr<KFormDesigner::Form> form;
- QGuardedPtr<KFormDesigner::Form> previewForm;
- QString tempForm;
- QPoint scrollViewContentsPos; //!< to preserve contents pos after switching to other view
+ TQGuardedPtr<KFormDesigner::Form> form;
+ TQGuardedPtr<KFormDesigner::Form> previewForm;
+ TQString tempForm;
+ TQPoint scrollViewContentsPos; //!< to preserve contents pos after switching to other view
int resizeMode; //!< form's window's resize mode -one of KexiFormView::ResizeMode items
};
- virtual QString i18nMessage(const QCString& englishMessage,
+ virtual TQString i18nMessage(const TQCString& englishMessage,
KexiDialogBase* dlg) const;
protected:
virtual KexiDialogTempData* createTempData(KexiDialogBase* dialog);
- virtual KexiViewBase* createView(QWidget *parent, KexiDialogBase* dialog,
- KexiPart::Item &item, int viewMode = Kexi::DataViewMode, QMap<QString,QString>* staticObjectArgs = 0);
+ virtual KexiViewBase* createView(TQWidget *tqparent, KexiDialogBase* dialog,
+ KexiPart::Item &item, int viewMode = Kexi::DataViewMode, TQMap<TQString,TQString>* staticObjectArgs = 0);
virtual void initPartActions();
virtual void initInstanceActions();
@@ -81,7 +82,7 @@ class KEXIREPORTUTILS_EXPORT KexiReportPart : public KexiPart::Part
static KFormDesigner::WidgetLibrary* static_reportsLibrary;
private:
-// QGuardedPtr<KFormDesigner::FormManager> m_manager;
+// TQGuardedPtr<KFormDesigner::FormManager> m_manager;
};
#endif
diff --git a/kexi/plugins/reports/kexireportview.cpp b/kexi/plugins/reports/kexireportview.cpp
index 6b7f46b5..913a493e 100644
--- a/kexi/plugins/reports/kexireportview.cpp
+++ b/kexi/plugins/reports/kexireportview.cpp
@@ -39,15 +39,15 @@
#define NO_DSWIZARD
-KexiReportScrollView::KexiReportScrollView(QWidget *parent, bool preview)
- : KexiScrollView(parent, preview)
+KexiReportScrollView::KexiReportScrollView(TQWidget *tqparent, bool preview)
+ : KexiScrollView(tqparent, preview)
{
if(preview) {
setRecordNavigatorVisible(true);
recordNavigator()->setLabelText(i18n("Page:"));
recordNavigator()->setInsertingButtonVisible(false);
}
- connect(this, SIGNAL(resizingStarted()), this, SLOT(slotResizingStarted()));
+ connect(this, TQT_SIGNAL(resizingStarted()), this, TQT_SLOT(slotResizingStarted()));
}
KexiReportScrollView::~KexiReportScrollView()
@@ -61,7 +61,7 @@ KexiReportScrollView::show()
//now get resize mode settings for entire form
if (m_preview) {
- KexiReportView* fv = dynamic_cast<KexiReportView*>(parent());
+ KexiReportView* fv = dynamic_cast<KexiReportView*>(tqparent());
int resizeMode = fv ? fv->resizeMode() : KexiReportView::ResizeAuto;
if (resizeMode == KexiReportView::ResizeAuto)
setResizePolicy(AutoOneFit);
@@ -80,12 +80,12 @@ KexiReportScrollView::slotResizingStarted()
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
-KexiReportView::KexiReportView(KexiMainWindow *win, QWidget *parent, const char *name,
+KexiReportView::KexiReportView(KexiMainWindow *win, TQWidget *tqparent, const char *name,
KexiDB::Connection *conn)
- : KexiViewBase(win, parent, name), m_propertySet(0), m_conn(conn)
+ : KexiViewBase(win, tqparent, name), m_propertySet(0), m_conn(conn)
, m_resizeMode(KexiReportView::ResizeDefault)
{
- QHBoxLayout *l = new QHBoxLayout(this);
+ TQHBoxLayout *l = new TQHBoxLayout(this);
l->setAutoAdd(true);
m_scrollView = new KexiReportScrollView(this, viewMode()==Kexi::DataViewMode);
@@ -93,7 +93,7 @@ KexiReportView::KexiReportView(KexiMainWindow *win, QWidget *parent, const char
// m_scrollView->show();
m_reportform = new KexiReportForm(m_scrollView->viewport(), name/*, conn*/);
-// m_reportform->resize(QSize(400, 300));
+// m_reportform->resize(TQSize(400, 300));
m_scrollView->setWidget(m_reportform);
m_scrollView->setResizingEnabled(viewMode()!=Kexi::DataViewMode);
@@ -102,54 +102,54 @@ KexiReportView::KexiReportView(KexiMainWindow *win, QWidget *parent, const char
if (viewMode()==Kexi::DataViewMode) {
m_scrollView->viewport()->setPaletteBackgroundColor(m_reportform->palette().active().background());
#if 0
- connect(reportPart()->manager(), SIGNAL(noFormSelected()), SLOT(slotNoFormSelected()));
+ connect(reportPart()->manager(), TQT_SIGNAL(noFormSelected()), TQT_SLOT(slotNoFormSelected()));
#endif
}
else {
- connect(KFormDesigner::FormManager::self(), SIGNAL(propertySetSwitched(KoProperty::Set *, bool)),
- this, SLOT(slotPropertySetSwitched(KoProperty::Set *, bool)));
- connect(KFormDesigner::FormManager::self(), SIGNAL(dirty(KFormDesigner::Form *, bool)),
- this, SLOT(slotDirty(KFormDesigner::Form *, bool)));
+ connect(KFormDesigner::FormManager::self(), TQT_SIGNAL(propertySetSwitched(KoProperty::Set *, bool)),
+ this, TQT_SLOT(slotPropertySetSwitched(KoProperty::Set *, bool)));
+ connect(KFormDesigner::FormManager::self(), TQT_SIGNAL(dirty(KFormDesigner::Form *, bool)),
+ this, TQT_SLOT(slotDirty(KFormDesigner::Form *, bool)));
// action stuff
- /*connect(reportPart()->manager(), SIGNAL(widgetSelected(KFormDesigner::Form*, bool)), SLOT(slotWidgetSelected(KFormDesigner::Form*, bool)));
- connect(reportPart()->manager(), SIGNAL(formWidgetSelected(KFormDesigner::Form*)), SLOT(slotFormWidgetSelected(KFormDesigner::Form*)));
- connect(reportPart()->manager(), SIGNAL(undoEnabled(bool, const QString&)), this, SLOT(setUndoEnabled(bool)));
- connect(reportPart()->manager(), SIGNAL(redoEnabled(bool, const QString&)), this, SLOT(setRedoEnabled(bool)));*/
-
- plugSharedAction("edit_copy", KFormDesigner::FormManager::self(), SLOT(copyWidget()));
- plugSharedAction("edit_cut", KFormDesigner::FormManager::self(), SLOT(cutWidget()));
- plugSharedAction("edit_paste", KFormDesigner::FormManager::self(), SLOT(pasteWidget()));
- plugSharedAction("edit_delete", KFormDesigner::FormManager::self(), SLOT(deleteWidget()));
- plugSharedAction("edit_select_all", KFormDesigner::FormManager::self(), SLOT(selectAll()));
- plugSharedAction("reportpart_clear_contents", KFormDesigner::FormManager::self(), SLOT(clearWidgetContent()));
- plugSharedAction("edit_undo", KFormDesigner::FormManager::self(), SLOT(undo()));
- plugSharedAction("edit_redo", KFormDesigner::FormManager::self(), SLOT(redo()));
-
- plugSharedAction("reportpart_format_raise", KFormDesigner::FormManager::self(), SLOT(bringWidgetToFront()) );
- plugSharedAction("reportpart_format_lower", KFormDesigner::FormManager::self(), SLOT(sendWidgetToBack()) );
+ /*connect(reportPart()->manager(), TQT_SIGNAL(widgetSelected(KFormDesigner::Form*, bool)), TQT_SLOT(slotWidgetSelected(KFormDesigner::Form*, bool)));
+ connect(reportPart()->manager(), TQT_SIGNAL(formWidgetSelected(KFormDesigner::Form*)), TQT_SLOT(slotFormWidgetSelected(KFormDesigner::Form*)));
+ connect(reportPart()->manager(), TQT_SIGNAL(undoEnabled(bool, const TQString&)), this, TQT_SLOT(setUndoEnabled(bool)));
+ connect(reportPart()->manager(), TQT_SIGNAL(redoEnabled(bool, const TQString&)), this, TQT_SLOT(setRedoEnabled(bool)));*/
+
+ plugSharedAction("edit_copy", KFormDesigner::FormManager::self(), TQT_SLOT(copyWidget()));
+ plugSharedAction("edit_cut", KFormDesigner::FormManager::self(), TQT_SLOT(cutWidget()));
+ plugSharedAction("edit_paste", KFormDesigner::FormManager::self(), TQT_SLOT(pasteWidget()));
+ plugSharedAction("edit_delete", KFormDesigner::FormManager::self(), TQT_SLOT(deleteWidget()));
+ plugSharedAction("edit_select_all", KFormDesigner::FormManager::self(), TQT_SLOT(selectAll()));
+ plugSharedAction("reportpart_clear_contents", KFormDesigner::FormManager::self(), TQT_SLOT(clearWidgetContent()));
+ plugSharedAction("edit_undo", KFormDesigner::FormManager::self(), TQT_SLOT(undo()));
+ plugSharedAction("edit_redo", KFormDesigner::FormManager::self(), TQT_SLOT(redo()));
+
+ plugSharedAction("reportpart_format_raise", KFormDesigner::FormManager::self(), TQT_SLOT(bringWidgetToFront()) );
+ plugSharedAction("reportpart_format_lower", KFormDesigner::FormManager::self(), TQT_SLOT(sendWidgetToBack()) );
plugSharedAction("reportpart_align_menu", KFormDesigner::FormManager::self(), 0 );
- plugSharedAction("reportpart_align_to_left", KFormDesigner::FormManager::self(),SLOT(alignWidgetsToLeft()) );
- plugSharedAction("reportpart_align_to_right", KFormDesigner::FormManager::self(), SLOT(alignWidgetsToRight()) );
- plugSharedAction("reportpart_align_to_top", KFormDesigner::FormManager::self(), SLOT(alignWidgetsToTop()) );
- plugSharedAction("reportpart_align_to_bottom", KFormDesigner::FormManager::self(), SLOT(alignWidgetsToBottom()) );
- plugSharedAction("reportpart_align_to_grid", KFormDesigner::FormManager::self(), SLOT(alignWidgetsToGrid()) );
+ plugSharedAction("reportpart_align_to_left", KFormDesigner::FormManager::self(),TQT_SLOT(alignWidgetsToLeft()) );
+ plugSharedAction("reportpart_align_to_right", KFormDesigner::FormManager::self(), TQT_SLOT(alignWidgetsToRight()) );
+ plugSharedAction("reportpart_align_to_top", KFormDesigner::FormManager::self(), TQT_SLOT(alignWidgetsToTop()) );
+ plugSharedAction("reportpart_align_to_bottom", KFormDesigner::FormManager::self(), TQT_SLOT(alignWidgetsToBottom()) );
+ plugSharedAction("reportpart_align_to_grid", KFormDesigner::FormManager::self(), TQT_SLOT(alignWidgetsToGrid()) );
plugSharedAction("reportpart_adjust_size_menu", KFormDesigner::FormManager::self(), 0 );
- plugSharedAction("reportpart_adjust_to_fit", KFormDesigner::FormManager::self(), SLOT(adjustWidgetSize()) );
- plugSharedAction("reportpart_adjust_size_grid", KFormDesigner::FormManager::self(), SLOT(adjustSizeToGrid()) );
- plugSharedAction("reportpart_adjust_height_small", KFormDesigner::FormManager::self(), SLOT(adjustHeightToSmall()) );
- plugSharedAction("reportpart_adjust_height_big", KFormDesigner::FormManager::self(), SLOT(adjustHeightToBig()) );
- plugSharedAction("reportpart_adjust_width_small", KFormDesigner::FormManager::self(), SLOT(adjustWidthToSmall()) );
- plugSharedAction("reportpart_adjust_width_big", KFormDesigner::FormManager::self(), SLOT(adjustWidthToBig()) );
+ plugSharedAction("reportpart_adjust_to_fit", KFormDesigner::FormManager::self(), TQT_SLOT(adjustWidgetSize()) );
+ plugSharedAction("reportpart_adjust_size_grid", KFormDesigner::FormManager::self(), TQT_SLOT(adjustSizeToGrid()) );
+ plugSharedAction("reportpart_adjust_height_small", KFormDesigner::FormManager::self(), TQT_SLOT(adjustHeightToSmall()) );
+ plugSharedAction("reportpart_adjust_height_big", KFormDesigner::FormManager::self(), TQT_SLOT(adjustHeightToBig()) );
+ plugSharedAction("reportpart_adjust_width_small", KFormDesigner::FormManager::self(), TQT_SLOT(adjustWidthToSmall()) );
+ plugSharedAction("reportpart_adjust_width_big", KFormDesigner::FormManager::self(), TQT_SLOT(adjustWidthToBig()) );
}
initForm();
- connect(this, SIGNAL(focus(bool)), this, SLOT(slotFocus(bool)));
+ connect(this, TQT_SIGNAL(focus(bool)), this, TQT_SLOT(slotFocus(bool)));
/// @todo skip this if ther're no borders
-// m_reportform->resize( m_reportform->size()+QSize(m_scrollView->verticalScrollBar()->width(), m_scrollView->horizontalScrollBar()->height()) );
+// m_reportform->resize( m_reportform->size()+TQSize(m_scrollView->verticalScrollBar()->width(), m_scrollView->horizontalScrollBar()->height()) );
}
KexiReportView::~KexiReportView()
@@ -187,10 +187,10 @@ KexiReportView::initForm()
// Show the form wizard if this is a new Form
// KexiDB::FieldList *fields = 0;
- if(parentDialog()->id() < 0)
+ if(tqparentDialog()->id() < 0)
{
#ifndef NO_DSWIZARD
- KexiDataSourceWizard *w = new KexiDataSourceWizard(mainWin(), (QWidget*)mainWin(), "datasource_wizard");
+ KexiDataSourceWizard *w = new KexiDataSourceWizard(mainWin(), (TQWidget*)mainWin(), "datasource_wizard");
if(!w->exec())
fields = 0;
else
@@ -202,7 +202,7 @@ KexiReportView::initForm()
/* if(fields)
{
@todo generate a report from a table or a query
- QDomDocument dom;
+ TQDomDocument dom;
reportPart()->generateForm(fields, dom);
KFormDesigner::FormIO::loadFormFromDom(form(), m_reportform, dom);
}
@@ -220,7 +220,7 @@ KexiReportView::loadForm()
//@todo also load m_resizeMode !
- kexipluginsdbg << "KexiReportForm::loadForm() Loading the form with id : " << parentDialog()->id() << endl;
+ kexipluginsdbg << "KexiReportForm::loadForm() Loading the form with id : " << tqparentDialog()->id() << endl;
// If we are previewing the Form, use the tempData instead of the form stored in the db
if(viewMode()==Kexi::DataViewMode && !tempData()->tempForm.isNull() ) {
KFormDesigner::FormIO::loadFormFromString(form(), m_reportform, tempData()->tempForm);
@@ -228,7 +228,7 @@ KexiReportView::loadForm()
}
// normal load
- QString data;
+ TQString data;
loadDataBlock(data);
KFormDesigner::FormIO::loadFormFromString(form(), m_reportform, data);
}
@@ -249,7 +249,7 @@ KexiReportView::beforeSwitchTo(int mode, bool &dontStore)
if (mode!=viewMode() && viewMode()!=Kexi::DataViewMode) {
//remember our pos
tempData()->scrollViewContentsPos
- = QPoint(m_scrollView->contentsX(), m_scrollView->contentsY());
+ = TQPoint(m_scrollView->contentsX(), m_scrollView->contentsY());
}
// we don't store on db, but in our TempData
@@ -322,12 +322,12 @@ tristate
KexiReportView::storeData(bool dontAsk)
{
Q_UNUSED(dontAsk)
- kexipluginsdbg << "KexiReportForm::storeData(): " << parentDialog()->partItem()->name() << " [" << parentDialog()->id() << "]" << endl;
- QString data;
+ kexipluginsdbg << "KexiReportForm::storeData(): " << tqparentDialog()->partItem()->name() << " [" << tqparentDialog()->id() << "]" << endl;
+ TQString data;
KFormDesigner::FormIO::saveFormToString(tempData()->form, data);
if (!storeDataBlock(data))
return false;
- tempData()->tempForm = QString();
+ tempData()->tempForm = TQString();
return true;
}
@@ -428,17 +428,17 @@ KexiReportView::setRedoEnabled(bool enabled)
}
#endif
-QSize
-KexiReportView::preferredSizeHint(const QSize& otherSize)
+TQSize
+KexiReportView::preferredSizeHint(const TQSize& otherSize)
{
return (m_reportform->size()
- +QSize(m_scrollView->verticalScrollBar()->isVisible() ? m_scrollView->verticalScrollBar()->width()*3/2 : 10,
+ +TQSize(m_scrollView->verticalScrollBar()->isVisible() ? m_scrollView->verticalScrollBar()->width()*3/2 : 10,
m_scrollView->horizontalScrollBar()->isVisible() ? m_scrollView->horizontalScrollBar()->height()*3/2 : 10))
.expandedTo( KexiViewBase::preferredSizeHint(otherSize) );
}
void
-KexiReportView::resizeEvent( QResizeEvent *e )
+KexiReportView::resizeEvent( TQResizeEvent *e )
{
if (viewMode()==Kexi::DataViewMode) {
m_scrollView->refreshContentsSizeLater(
@@ -461,7 +461,7 @@ KexiReportView::show()
// if (resizeMode() == KexiFormView::ResizeAuto)
if (viewMode()==Kexi::DataViewMode) {
if (resizeMode() == ResizeAuto)
- m_scrollView->setResizePolicy(QScrollView::AutoOneFit);
+ m_scrollView->setResizePolicy(TQScrollView::AutoOneFit);
}
}
diff --git a/kexi/plugins/reports/kexireportview.h b/kexi/plugins/reports/kexireportview.h
index b600c06d..02b4b48a 100644
--- a/kexi/plugins/reports/kexireportview.h
+++ b/kexi/plugins/reports/kexireportview.h
@@ -21,8 +21,8 @@
#ifndef KEXIREPORTVIEW_H
#define KEXIREPORTVIEW_H
-#include <qscrollview.h>
-#include <qtimer.h>
+#include <tqscrollview.h>
+#include <tqtimer.h>
#include <kexiviewbase.h>
@@ -34,9 +34,10 @@ class KexiReportForm;
class KEXIREPORTUTILS_EXPORT KexiReportScrollView : public KexiScrollView
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiReportScrollView(QWidget *parent, bool preview);
+ KexiReportScrollView(TQWidget *tqparent, bool preview);
virtual ~KexiReportScrollView();
void setForm(KFormDesigner::Form *form) { m_form = form; }
@@ -62,6 +63,7 @@ class KEXIREPORTUTILS_EXPORT KexiReportScrollView : public KexiScrollView
class KEXIREPORTUTILS_EXPORT KexiReportView : public KexiViewBase
{
Q_OBJECT
+ TQ_OBJECT
public:
enum ResizeMode {
@@ -71,12 +73,12 @@ class KEXIREPORTUTILS_EXPORT KexiReportView : public KexiViewBase
NoResize = 2 /*! @todo */
};
- KexiReportView(KexiMainWindow *win, QWidget *parent, const char *name, KexiDB::Connection *conn);
+ KexiReportView(KexiMainWindow *win, TQWidget *tqparent, const char *name, KexiDB::Connection *conn);
virtual ~KexiReportView();
KexiDB::Connection* connection() { return m_conn; }
- virtual QSize preferredSizeHint(const QSize& otherSize);
+ virtual TQSize preferredSizeHint(const TQSize& otherSize);
int resizeMode() const { return m_resizeMode; }
@@ -105,7 +107,7 @@ class KEXIREPORTUTILS_EXPORT KexiReportView : public KexiViewBase
virtual tristate storeData(bool dontAsk = false);
KexiReportPart::TempData* tempData() const {
- return static_cast<KexiReportPart::TempData*>(parentDialog()->tempData()); }
+ return static_cast<KexiReportPart::TempData*>(tqparentDialog()->tempData()); }
KexiReportPart* reportPart() const { return static_cast<KexiReportPart*>(part()); }
void disableWidgetActions();
@@ -117,7 +119,7 @@ class KEXIREPORTUTILS_EXPORT KexiReportView : public KexiViewBase
void initForm();
void loadForm();
- virtual void resizeEvent ( QResizeEvent * );
+ virtual void resizeEvent ( TQResizeEvent * );
private:
KexiReportForm *m_reportform;
diff --git a/kexi/plugins/reports/reportwidgets.cpp b/kexi/plugins/reports/reportwidgets.cpp
index 5437325a..393beaad 100644
--- a/kexi/plugins/reports/reportwidgets.cpp
+++ b/kexi/plugins/reports/reportwidgets.cpp
@@ -16,7 +16,7 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
-#include <qpainter.h>
+#include <tqpainter.h>
#include <form.h>
#include <formIO.h>
@@ -28,20 +28,20 @@
#include "kexireportview.h"
#include "reportwidgets.h"
-Label::Label(const QString &text, QWidget *parent, const char *name)
-: QLabel(text, parent, name)
+Label::Label(const TQString &text, TQWidget *tqparent, const char *name)
+: TQLabel(text, tqparent, name)
{
setPaletteBackgroundColor(white);
}
////////////////////////////////////////////////////////////////////
-ReportLine::ReportLine(QWidget *parent, const char *name)
-: QWidget(parent, name)
+ReportLine::ReportLine(TQWidget *tqparent, const char *name)
+: TQWidget(tqparent, name)
{
- m_lineStyle = (ReportLineStyle)Qt::SolidLine;
+ m_lineStyle = (ReportLineStyle)TQt::SolidLine;
m_lineWidth = 1;
- m_capStyle = (CapStyle)Qt::FlatCap;
+ m_capStyle = (CapStyle)TQt::FlatCap;
m_color = paletteForegroundColor();
setPaletteBackgroundColor(white);
}
@@ -72,14 +72,14 @@ ReportLine::setLineWidth(int width)
update();
}
-QColor
+TQColor
ReportLine::color() const
{
return m_color;
}
void
-ReportLine::setColor(const QColor &color)
+ReportLine::setColor(const TQColor &color)
{
m_color = color;
update();
@@ -99,13 +99,13 @@ ReportLine::setCapStyle(CapStyle capStyle)
}
void
-ReportLine::paintEvent (QPaintEvent *ev)
+ReportLine::paintEvent (TQPaintEvent *ev)
{
- QPainter p(this);
+ TQPainter p(this);
if(!ev->erased())
p.eraseRect(0, 0, width(), height());
- QPen pen(m_color, m_lineWidth, (Qt::PenStyle)m_lineStyle);
- pen.setCapStyle((Qt::PenCapStyle)m_capStyle);
+ TQPen pen(m_color, m_lineWidth, (Qt::PenStyle)m_lineStyle);
+ pen.setCapStyle((TQt::PenCapStyle)m_capStyle);
p.setPen(pen);
p.drawLine(0, 0, width() -1, height() - 1);
}
@@ -113,8 +113,8 @@ ReportLine::paintEvent (QPaintEvent *ev)
////////////////////////////////////////////////////////////////////
-PicLabel::PicLabel(const QPixmap &pix, QWidget *parent, const char *name)
- : QLabel(parent, name)
+PicLabel::PicLabel(const TQPixmap &pix, TQWidget *tqparent, const char *name)
+ : TQLabel(tqparent, name)
{
setPixmap(pix);
setScaledContents(false);
@@ -122,52 +122,52 @@ PicLabel::PicLabel(const QPixmap &pix, QWidget *parent, const char *name)
}
bool
-PicLabel::setProperty(const char *name, const QVariant &value)
+PicLabel::setProperty(const char *name, const TQVariant &value)
{
- if(QString(name) == "pixmap")
+ if(TQString(name) == "pixmap")
resize(value.toPixmap().height(), value.toPixmap().width());
- return QLabel::setProperty(name, value);
+ return TQLabel::setProperty(name, value);
}
////////////////////////////////////////////////////////////////////
-KexiSubReport::KexiSubReport(QWidget *parent, const char *name)
-: QScrollView(parent, name), m_form(0), m_widget(0)
+KexiSubReport::KexiSubReport(TQWidget *tqparent, const char *name)
+: TQScrollView(tqparent, name), m_form(0), m_widget(0)
{
- setFrameStyle(QFrame::Plain | QFrame::Box);
+ setFrameStyle(TQFrame::Plain | TQFrame::Box);
viewport()->setPaletteBackgroundColor(white);
}
void
-KexiSubReport::setReportName(const QString &name)
+KexiSubReport::setReportName(const TQString &name)
{
if(name.isEmpty())
return;
// we need a KexiReportView*
- QWidget *w = parentWidget();
+ TQWidget *w = tqparentWidget();
while(w && !w->isA("KexiReportView"))
- w = w->parentWidget();
+ w = w->tqparentWidget();
KexiReportView *view = (KexiReportView*)w;
if(!view)
return;
// we check if there is a form with this name
int id = KexiDB::idForObjectName(*(view->connection()), name, KexiPart::ReportObjectType);
- if((id == 0) || (id == view->parentDialog()->id())) // == our form
+ if((id == 0) || (id == view->tqparentDialog()->id())) // == our form
return; // because of recursion when loading
// we create the container widget
delete m_widget;
- m_widget = new QWidget(viewport(), "kexisubreport_widget");
+ m_widget = new TQWidget(viewport(), "kexisubreport_widget");
m_widget->show();
addChild(m_widget);
m_form = new Form(KexiReportPart::library(), this->name());
m_form->createToplevel(m_widget);
// and load the sub form
- QString data;
- tristate res = view->connection()->loadDataBlock(id, data , QString::null);
+ TQString data;
+ tristate res = view->connection()->loadDataBlock(id, data , TQString());
if(res != true)
return;
diff --git a/kexi/plugins/reports/reportwidgets.h b/kexi/plugins/reports/reportwidgets.h
index f8140b0c..9e587556 100644
--- a/kexi/plugins/reports/reportwidgets.h
+++ b/kexi/plugins/reports/reportwidgets.h
@@ -20,8 +20,8 @@
#ifndef KEXIREPORTWIDGETS_H
#define KEXIREPORTWIDGETS_H
-#include <qlabel.h>
-#include <qscrollview.h>
+#include <tqlabel.h>
+#include <tqscrollview.h>
namespace KFormDesigner {
class Form;
@@ -31,63 +31,67 @@ namespace KFormDesigner {
using KFormDesigner::Form;
//! A form embedded as a widget inside other form
-class KexiSubReport : public QScrollView
+class KexiSubReport : public TQScrollView
{
Q_OBJECT
- Q_PROPERTY(QString reportName READ reportName WRITE setReportName DESIGNABLE true);
+ TQ_OBJECT
+ TQ_PROPERTY(TQString reportName READ reportName WRITE setReportName DESIGNABLE true);
public:
- KexiSubReport(QWidget *parent, const char *name);
+ KexiSubReport(TQWidget *tqparent, const char *name);
~KexiSubReport() {}
//! \return the name of the subreport inside the db
- QString reportName() const { return m_reportName; }
- void setReportName(const QString &name);
+ TQString reportName() const { return m_reportName; }
+ void setReportName(const TQString &name);
private:
// KFormDesigner::FormManager *m_manager;
Form *m_form;
- QWidget *m_widget;
- QString m_reportName;
+ TQWidget *m_widget;
+ TQString m_reportName;
};
//! A simple label inside a report
-class Label : public QLabel
+class Label : public TQLabel
{
Q_OBJECT
+ TQ_OBJECT
public:
- Label(const QString &text, QWidget *parent, const char *name);
+ Label(const TQString &text, TQWidget *tqparent, const char *name);
~Label() {}
};
//! A simple picture label inside a report
-class PicLabel : public QLabel
+class PicLabel : public TQLabel
{
Q_OBJECT
+ TQ_OBJECT
public:
- PicLabel(const QPixmap &pix, QWidget *parent, const char *name);
+ PicLabel(const TQPixmap &pix, TQWidget *tqparent, const char *name);
~PicLabel() {}
- virtual bool setProperty(const char *name, const QVariant &value);
+ virtual bool setProperty(const char *name, const TQVariant &value);
};
//! A line
-class ReportLine : public QWidget
+class ReportLine : public TQWidget
{
Q_OBJECT
- Q_PROPERTY(ReportLineStyle lineStyle READ lineStyle WRITE setLineStyle)
- Q_PROPERTY(int lineWidth READ lineWidth WRITE setLineWidth)
- Q_PROPERTY(QColor color READ color WRITE setColor)
- Q_PROPERTY(CapStyle capStyle READ capStyle WRITE setCapStyle)
+ TQ_OBJECT
+ TQ_PROPERTY(ReportLineStyle lineStyle READ lineStyle WRITE setLineStyle)
+ TQ_PROPERTY(int lineWidth READ lineWidth WRITE setLineWidth)
+ TQ_PROPERTY(TQColor color READ color WRITE setColor)
+ TQ_PROPERTY(CapStyle capStyle READ capStyle WRITE setCapStyle)
public:
- enum ReportLineStyle { NoLine = Qt::NoPen, Solid = Qt::SolidLine, Dash = Qt::DashLine, Dot = Qt::DotLine,
- DashDot = Qt::DashDotLine, DashDotDot = Qt::DashDotDotLine };
- enum CapStyle { Flat = Qt::FlatCap, Square = Qt::SquareCap, Round = Qt::RoundCap };
+ enum ReportLineStyle { NoLine = TQt::NoPen, Solid = TQt::SolidLine, Dash = TQt::DashLine, Dot = TQt::DotLine,
+ DashDot = TQt::DashDotLine, DashDotDot = TQt::DashDotDotLine };
+ enum CapStyle { Flat = TQt::FlatCap, Square = TQt::SquareCap, Round = TQt::RoundCap };
- ReportLine(QWidget *parent, const char *name);
+ ReportLine(TQWidget *tqparent, const char *name);
~ReportLine(){;}
ReportLineStyle lineStyle() const;
@@ -96,20 +100,20 @@ class ReportLine : public QWidget
int lineWidth() const;
void setLineWidth(int width);
- QColor color() const;
- void setColor(const QColor &color);
+ TQColor color() const;
+ void setColor(const TQColor &color);
CapStyle capStyle() const;
void setCapStyle(CapStyle capStyle);
protected:
- virtual void paintEvent (QPaintEvent *ev);
+ virtual void paintEvent (TQPaintEvent *ev);
private:
ReportLineStyle m_lineStyle;
int m_lineWidth;
CapStyle m_capStyle;
- QColor m_color;
+ TQColor m_color;
};
diff --git a/kexi/plugins/scripting/kexiapp/kexiappmainwindow.cpp b/kexi/plugins/scripting/kexiapp/kexiappmainwindow.cpp
index 4d82bc5d..5ee81a43 100644
--- a/kexi/plugins/scripting/kexiapp/kexiappmainwindow.cpp
+++ b/kexi/plugins/scripting/kexiapp/kexiappmainwindow.cpp
@@ -67,7 +67,7 @@ KexiAppMainWindow::~KexiAppMainWindow()
delete d;
}
-const QString KexiAppMainWindow::getClassName() const
+const TQString KexiAppMainWindow::getClassName() const
{
return "Kross::KexiApp::KexiAppMainWindow";
}
@@ -88,7 +88,7 @@ Kross::Api::Object::Ptr KexiAppMainWindow::getConnection()
return module->get("KexiDBConnection", connection);
}
-Kross::Api::List* KexiAppMainWindow::getPartItems(const QString& mimetype)
+Kross::Api::List* KexiAppMainWindow::getPartItems(const TQString& mimetype)
{
if(mimetype.isNull()) return 0; // just to be sure...
KexiPart::ItemDict* items = d->project()->itemsForMimeType( mimetype.latin1() );
diff --git a/kexi/plugins/scripting/kexiapp/kexiappmainwindow.h b/kexi/plugins/scripting/kexiapp/kexiappmainwindow.h
index fd02c193..7eecd213 100644
--- a/kexi/plugins/scripting/kexiapp/kexiappmainwindow.h
+++ b/kexi/plugins/scripting/kexiapp/kexiappmainwindow.h
@@ -20,8 +20,8 @@
#ifndef KROSS_KEXIAPP_KEXIAPPMAINWINDOW_H
#define KROSS_KEXIAPP_KEXIAPPMAINWINDOW_H
-#include <qstring.h>
-#include <qvariant.h>
+#include <tqstring.h>
+#include <tqvariant.h>
#include <api/object.h>
#include <api/variant.h>
@@ -58,7 +58,7 @@ namespace Kross { namespace KexiApp {
virtual ~KexiAppMainWindow();
/// \see Kross::Api::Object::getClassName
- virtual const QString getClassName() const;
+ virtual const TQString getClassName() const;
/** \return true if Kexi is connected with a project else
false is returned. */
@@ -74,7 +74,7 @@ namespace Kross { namespace KexiApp {
/** \return a list of \a KexiAppPartItem objects for the defined
\p mimetype string. */
- Kross::Api::List* getPartItems(const QString& mimetype);
+ Kross::Api::List* getPartItems(const TQString& mimetype);
/** Try to open the defined \a KexiAppPartItem and \return true
on success else false. */
diff --git a/kexi/plugins/scripting/kexiapp/kexiappmodule.cpp b/kexi/plugins/scripting/kexiapp/kexiappmodule.cpp
index cb664496..9a1c73d7 100644
--- a/kexi/plugins/scripting/kexiapp/kexiappmodule.cpp
+++ b/kexi/plugins/scripting/kexiapp/kexiappmodule.cpp
@@ -90,7 +90,7 @@ KexiAppModule::~KexiAppModule()
}
-const QString KexiAppModule::getClassName() const
+const TQString KexiAppModule::getClassName() const
{
return "Kross::KexiApp::KexiAppModule";
}
diff --git a/kexi/plugins/scripting/kexiapp/kexiappmodule.h b/kexi/plugins/scripting/kexiapp/kexiappmodule.h
index 08ed71f0..2b87cca5 100644
--- a/kexi/plugins/scripting/kexiapp/kexiappmodule.h
+++ b/kexi/plugins/scripting/kexiapp/kexiappmodule.h
@@ -20,8 +20,8 @@
#ifndef KROSS_KEXIAPP_KEXIAPPMODULE_H
#define KROSS_KEXIAPP_KEXIAPPMODULE_H
-#include <qstring.h>
-#include <qvariant.h>
+#include <tqstring.h>
+#include <tqvariant.h>
#include <api/module.h>
@@ -63,7 +63,7 @@ namespace KexiApp {
virtual ~KexiAppModule();
/// \see Kross::Api::Object::getClassName
- virtual const QString getClassName() const;
+ virtual const TQString getClassName() const;
private:
/// Private d-pointer class.
diff --git a/kexi/plugins/scripting/kexiapp/kexiapppart.h b/kexi/plugins/scripting/kexiapp/kexiapppart.h
index 5f55d6bf..bf399641 100644
--- a/kexi/plugins/scripting/kexiapp/kexiapppart.h
+++ b/kexi/plugins/scripting/kexiapp/kexiapppart.h
@@ -20,8 +20,8 @@
#ifndef KROSS_KEXIAPP_KEXIAPPPART_H
#define KROSS_KEXIAPP_KEXIAPPPART_H
-#include <qstring.h>
-#include <qvariant.h>
+#include <tqstring.h>
+#include <tqvariant.h>
#include <api/object.h>
#include <api/variant.h>
@@ -43,7 +43,7 @@ namespace Kross { namespace KexiApp {
public:
KexiAppPartItem(KexiPart::Item*);
virtual ~KexiAppPartItem() {}
- virtual const QString getClassName() const { return "Kross::KexiApp::KexiAppPartItem"; }
+ virtual const TQString getClassName() const { return "Kross::KexiApp::KexiAppPartItem"; }
KexiPart::Item* item() { return m_item; }
private:
diff --git a/kexi/plugins/scripting/kexidb.doxyfile b/kexi/plugins/scripting/kexidb.doxyfile
index e40a378e..3e21f7f1 100644
--- a/kexi/plugins/scripting/kexidb.doxyfile
+++ b/kexi/plugins/scripting/kexidb.doxyfile
@@ -16,7 +16,7 @@ ABBREVIATE_BRIEF = "The $name class" \
is \
provides \
specifies \
- contains \
+ tqcontains \
represents \
a \
an \
@@ -111,7 +111,7 @@ RECURSIVE = YES
EXCLUDE =
EXCLUDE_SYMLINKS = YES
-EXCLUDE_PATTERNS = config.h *.moc.cpp
+EXCLUDE_PATTERNS = config.h *.tqmoc.cpp
EXAMPLE_PATH =
EXAMPLE_PATTERNS = *
diff --git a/kexi/plugins/scripting/kexidb/kexidbconnection.cpp b/kexi/plugins/scripting/kexidb/kexidbconnection.cpp
index d3b7cc76..f64a089f 100644
--- a/kexi/plugins/scripting/kexidb/kexidbconnection.cpp
+++ b/kexi/plugins/scripting/kexidb/kexidbconnection.cpp
@@ -94,20 +94,20 @@ KexiDBConnection::KexiDBConnection(::KexiDB::Connection* connection, KexiDBDrive
KexiDBConnection::~KexiDBConnection() {
}
-const QString KexiDBConnection::getClassName() const {
+const TQString KexiDBConnection::getClassName() const {
return "Kross::KexiDB::KexiDBConnection";
}
::KexiDB::Connection* KexiDBConnection::connection() const {
if(! m_connection)
- throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(QString("KexiDB::Connection is NULL.")) );
+ throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("KexiDB::Connection is NULL.")) );
//if(m_connection->error())
- // throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(QString("KexiDB::Connection error: %1").arg(m_connection->errorMsg())) );
+ // throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("KexiDB::Connection error: %1").tqarg(m_connection->errorMsg())) );
return m_connection;
}
bool KexiDBConnection::hadError() const { return connection()->error(); }
-const QString KexiDBConnection::lastError() const { return connection()->errorMsg(); }
+const TQString KexiDBConnection::lastError() const { return connection()->errorMsg(); }
KexiDBConnectionData* KexiDBConnection::data() { return m_connectiondata.data(); }
KexiDBDriver* KexiDBConnection::driver() { return m_driver.data(); }
@@ -118,31 +118,31 @@ bool KexiDBConnection::disconnect() { return connection()->disconnect(); }
bool KexiDBConnection::isReadOnly() const { return connection()->isReadOnly(); }
-bool KexiDBConnection::databaseExists(const QString& dbname) { return connection()->databaseExists(dbname); }
-const QString KexiDBConnection::currentDatabase() const { return connection()->currentDatabase(); }
-const QStringList KexiDBConnection::databaseNames() const { return connection()->databaseNames(); }
+bool KexiDBConnection::databaseExists(const TQString& dbname) { return connection()->databaseExists(dbname); }
+const TQString KexiDBConnection::currentDatabase() const { return connection()->currentDatabase(); }
+const TQStringList KexiDBConnection::databaseNames() const { return connection()->databaseNames(); }
bool KexiDBConnection::isDatabaseUsed() const { return connection()->isDatabaseUsed(); }
-bool KexiDBConnection::useDatabase(const QString& dbname) { return connection()->databaseExists(dbname) && m_connection->useDatabase(dbname); }
+bool KexiDBConnection::useDatabase(const TQString& dbname) { return connection()->databaseExists(dbname) && m_connection->useDatabase(dbname); }
bool KexiDBConnection::closeDatabase() { return connection()->closeDatabase(); }
-const QStringList KexiDBConnection::allTableNames() const { return connection()->tableNames(true); }
-const QStringList KexiDBConnection::tableNames() const { return connection()->tableNames(false); }
+const TQStringList KexiDBConnection::allTableNames() const { return connection()->tableNames(true); }
+const TQStringList KexiDBConnection::tableNames() const { return connection()->tableNames(false); }
-const QStringList KexiDBConnection::queryNames() const {
+const TQStringList KexiDBConnection::queryNames() const {
bool ok = true;
- QStringList queries = connection()->objectNames(::KexiDB::QueryObjectType, &ok);
- if(! ok) throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(QString("Failed to determinate querynames.")) );
+ TQStringList queries = connection()->objectNames(::KexiDB::QueryObjectType, &ok);
+ if(! ok) throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Failed to determinate querynames.")) );
return queries;
}
-KexiDBCursor* KexiDBConnection::executeQueryString(const QString& sqlquery) {
+KexiDBCursor* KexiDBConnection::executeQueryString(const TQString& sqlquery) {
// The ::KexiDB::Connection::executeQuery() method does not check if we pass a valid SELECT-statement
// or e.g. a DROP TABLE operation. So, let's check for such dangerous operations right now.
::KexiDB::Parser parser( connection() );
if(! parser.parse(sqlquery))
- throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(QString("Failed to parse query: %1 %2").arg(parser.error().type()).arg(parser.error().error())) );
+ throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Failed to parse query: %1 %2").tqarg(parser.error().type()).tqarg(parser.error().error())) );
if( parser.query() == 0 || parser.operation() != ::KexiDB::Parser::OP_Select )
- throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(QString("Invalid query operation \"%1\"").arg(parser.operationString()) ) );
+ throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Invalid query operation \"%1\"").tqarg(parser.operationString()) ) );
::KexiDB::Cursor* cursor = connection()->executeQuery(sqlquery);
return cursor ? new KexiDBCursor(cursor) : 0;
}
@@ -153,39 +153,39 @@ KexiDBCursor* KexiDBConnection::executeQuerySchema(KexiDBQuerySchema* queryschem
}
/*TODO
-bool KexiDBConnection::insertRecordIntoFieldlist(KexiDBFieldList* fieldlist, QValueList<QVariant> values) {
+bool KexiDBConnection::insertRecordIntoFieldlist(KexiDBFieldList* fieldlist, TQValueList<TQVariant> values) {
return connection()->insertRecord(*fieldlist->fieldlist(), values);
}
-bool KexiDBConnection::insertRecordIntoTable(KexiDBTableSchema* tableschema, QValueList<QVariant> values) {
+bool KexiDBConnection::insertRecordIntoTable(KexiDBTableSchema* tableschema, TQValueList<TQVariant> values) {
return connection()->insertRecord(*tableschema->tableschema(), values);
}
*/
Kross::Api::Object::Ptr KexiDBConnection::insertRecord(Kross::Api::List::Ptr args) {
- QValueList<QVariant> values = Kross::Api::Variant::toList(args->item(1));
+ TQValueList<TQVariant> values = Kross::Api::Variant::toList(args->item(1));
Kross::Api::Object::Ptr obj = args->item(0);
if(obj->getClassName() == "Kross::KexiDB::KexiDBFieldList")
return new Kross::Api::Variant(
- QVariant(connection()->insertRecord(
+ TQVariant(connection()->insertRecord(
*Kross::Api::Object::fromObject<KexiDBFieldList>(obj)->fieldlist(),
values
), 0));
return new Kross::Api::Variant(
- QVariant(connection()->insertRecord(
+ TQVariant(connection()->insertRecord(
*Kross::Api::Object::fromObject<KexiDBTableSchema>(obj)->tableschema(),
values
), 0));
}
-bool KexiDBConnection::createDatabase(const QString& dbname) { return connection()->createDatabase(dbname); }
-bool KexiDBConnection::dropDatabase(const QString& dbname) { return connection()->dropDatabase(dbname); }
+bool KexiDBConnection::createDatabase(const TQString& dbname) { return connection()->createDatabase(dbname); }
+bool KexiDBConnection::dropDatabase(const TQString& dbname) { return connection()->dropDatabase(dbname); }
bool KexiDBConnection::createTable(KexiDBTableSchema* tableschema) { return connection()->createTable(tableschema->tableschema(), false); }
-bool KexiDBConnection::dropTable(const QString& tablename) { return true == connection()->dropTable(tablename); }
+bool KexiDBConnection::dropTable(const TQString& tablename) { return true == connection()->dropTable(tablename); }
bool KexiDBConnection::alterTable(KexiDBTableSchema* fromschema, KexiDBTableSchema* toschema) { return true == connection()->alterTable(*fromschema->tableschema(), *toschema->tableschema()); }
-bool KexiDBConnection::alterTableName(KexiDBTableSchema* tableschema, const QString& newtablename) { return connection()->alterTableName(*tableschema->tableschema(), newtablename); }
+bool KexiDBConnection::alterTableName(KexiDBTableSchema* tableschema, const TQString& newtablename) { return connection()->alterTableName(*tableschema->tableschema(), newtablename); }
-KexiDBTableSchema* KexiDBConnection::tableSchema(const QString& tablename) const {
+KexiDBTableSchema* KexiDBConnection::tableSchema(const TQString& tablename) const {
::KexiDB::TableSchema* tableschema = connection()->tableSchema(tablename);
return tableschema ? new KexiDBTableSchema(tableschema) : 0;
}
@@ -196,7 +196,7 @@ bool KexiDBConnection::isEmptyTable(KexiDBTableSchema* tableschema) const {
return (! (success && notempty));
}
-KexiDBQuerySchema* KexiDBConnection::querySchema(const QString& queryname) const {
+KexiDBQuerySchema* KexiDBConnection::querySchema(const TQString& queryname) const {
::KexiDB::QuerySchema* queryschema = connection()->querySchema(queryname);
return queryschema ? new KexiDBQuerySchema(queryschema) : 0;
}
diff --git a/kexi/plugins/scripting/kexidb/kexidbconnection.h b/kexi/plugins/scripting/kexidb/kexidbconnection.h
index 7e1a7d3a..925a6e8e 100644
--- a/kexi/plugins/scripting/kexidb/kexidbconnection.h
+++ b/kexi/plugins/scripting/kexidb/kexidbconnection.h
@@ -20,7 +20,7 @@
#ifndef KROSS_KEXIDB_KEXIDBCONNECTION_H
#define KROSS_KEXIDB_KEXIDBCONNECTION_H
-#include <qstring.h>
+#include <tqstring.h>
#include <ksharedptr.h>
#include <api/object.h>
@@ -70,14 +70,14 @@ namespace Kross { namespace KexiDB {
public:
KexiDBConnection(::KexiDB::Connection* connection, KexiDBDriver* driver = 0, KexiDBConnectionData* connectiondata = 0);
virtual ~KexiDBConnection();
- virtual const QString getClassName() const;
+ virtual const TQString getClassName() const;
private:
/** Return true if there was an error during last operation on the database. */
bool hadError() const;
/** Return the last errormessage. */
- const QString lastError() const;
+ const TQString lastError() const;
/** Return the KexiDBConnectionData object used to create this connection. */
KexiDBConnectionData* data();
@@ -95,31 +95,31 @@ namespace Kross { namespace KexiDB {
bool isReadOnly() const;
/** Return true if the as argument passed databasename exists. */
- bool databaseExists(const QString& dbname);
+ bool databaseExists(const TQString& dbname);
/** Return the name of currently used database for this connection or empty
string if there is no used database. */
- const QString currentDatabase() const;
+ const TQString currentDatabase() const;
/** Return list of database names for opened connection. */
- const QStringList databaseNames() const;
+ const TQStringList databaseNames() const;
/** Return true if connection is properly established. */
bool isDatabaseUsed() const;
/** Opens an existing database specified by the as argument passed databasename
and returns true if the database is used now. */
- bool useDatabase(const QString& dbname);
+ bool useDatabase(const TQString& dbname);
/** Closes currently used database for this connection. */
bool closeDatabase();
/** Return names of all table schemas stored in currently used database include the
internal KexiDB system table names (kexi__*) */
- const QStringList allTableNames() const;
+ const TQStringList allTableNames() const;
/** Return names of all table schemas without the internal KexiDB system table names (kexi__*) */
- const QStringList tableNames() const;
+ const TQStringList tableNames() const;
/** Return names of all query schemas stored in currently used database. */
- const QStringList queryNames() const;
+ const TQStringList queryNames() const;
/** Executes query described by the as argument passed sqlstatement-string. Returns the
opened cursor created for results of this query. */
- KexiDBCursor* executeQueryString(const QString& sqlquery);
+ KexiDBCursor* executeQueryString(const TQString& sqlquery);
/** Executes query described by the as argument passed KexiDBQuerySchema object. Returns
the opened cursor created for results of this query. */
KexiDBCursor* executeQuerySchema(KexiDBQuerySchema* queryschema);
@@ -129,28 +129,28 @@ namespace Kross { namespace KexiDB {
Kross::Api::Object::Ptr insertRecord(Kross::Api::List::Ptr);
/** Creates new database with the as argument passed databasename. */
- bool createDatabase(const QString& dbname);
+ bool createDatabase(const TQString& dbname);
/** Drops the as argument passed databasename. */
- bool dropDatabase(const QString& dbname);
+ bool dropDatabase(const TQString& dbname);
/** Creates table defined by the as argument passed KexiTableSchema object. */
bool createTable(KexiDBTableSchema* tableschema);
/** Drops table defined by the as argument passed KexiDBTableSchema object. */
- bool dropTable(const QString& tablename);
+ bool dropTable(const TQString& tablename);
/** Alters the as first argument passed KexiDBTableSchema object using the as
second argument passed KexiDBTableSchema. */
bool alterTable(KexiDBTableSchema* fromschema, KexiDBTableSchema* toschema);
/** Alters the tablename of the as first argument passed KexiDBTableSchema into
the as second argument passed new tablename. */
- bool alterTableName(KexiDBTableSchema* tableschema, const QString& newtablename);
+ bool alterTableName(KexiDBTableSchema* tableschema, const TQString& newtablename);
/** Returns the KexiDBTableSchema object of the table matching to the as argument
passed tablename. */
- KexiDBTableSchema* tableSchema(const QString& tablename) const;
+ KexiDBTableSchema* tableSchema(const TQString& tablename) const;
/** Returns true if there is at least one valid record in the as argument passed tablename. */
bool isEmptyTable(KexiDBTableSchema* tableschema) const;
/** Returns the KexiDBQuerySchema object of the query matching to the as argument passed queryname. */
- KexiDBQuerySchema* querySchema(const QString& queryname) const;
+ KexiDBQuerySchema* querySchema(const TQString& queryname) const;
/** Return true if the \"auto commit\" option is on. */
bool autoCommit() const;
diff --git a/kexi/plugins/scripting/kexidb/kexidbconnectiondata.cpp b/kexi/plugins/scripting/kexidb/kexidbconnectiondata.cpp
index 61b81d3e..bcfe4702 100644
--- a/kexi/plugins/scripting/kexidb/kexidbconnectiondata.cpp
+++ b/kexi/plugins/scripting/kexidb/kexidbconnectiondata.cpp
@@ -19,7 +19,7 @@
#include "kexidbconnectiondata.h"
-#include <qvariant.h>
+#include <tqvariant.h>
using namespace Kross::KexiDB;
@@ -70,43 +70,43 @@ KexiDBConnectionData::~KexiDBConnectionData()
//delete m_data;
}
-const QString KexiDBConnectionData::getClassName() const
+const TQString KexiDBConnectionData::getClassName() const
{
return "Kross::KexiDB::KexiDBConnectionData";
}
-const QString KexiDBConnectionData::caption() const { return m_data->caption; }
-void KexiDBConnectionData::setCaption(const QString& name) { m_data->caption = name; }
+const TQString KexiDBConnectionData::caption() const { return m_data->caption; }
+void KexiDBConnectionData::setCaption(const TQString& name) { m_data->caption = name; }
-const QString KexiDBConnectionData::description() const { return m_data->description; }
-void KexiDBConnectionData::setDescription(const QString& desc) { m_data->description = desc; }
+const TQString KexiDBConnectionData::description() const { return m_data->description; }
+void KexiDBConnectionData::setDescription(const TQString& desc) { m_data->description = desc; }
-const QString KexiDBConnectionData::driverName() const { return m_data->driverName; }
-void KexiDBConnectionData::setDriverName(const QString& driver) { m_data->driverName = driver; }
+const TQString KexiDBConnectionData::driverName() const { return m_data->driverName; }
+void KexiDBConnectionData::setDriverName(const TQString& driver) { m_data->driverName = driver; }
bool KexiDBConnectionData::localSocketFileUsed() const { return m_data->useLocalSocketFile; }
void KexiDBConnectionData::setLocalSocketFileUsed(bool used) { m_data->useLocalSocketFile = used; }
-const QString KexiDBConnectionData::localSocketFileName() const { return m_data->localSocketFileName; }
-void KexiDBConnectionData::setLocalSocketFileName(const QString& socketfilename) { m_data->localSocketFileName = socketfilename; }
+const TQString KexiDBConnectionData::localSocketFileName() const { return m_data->localSocketFileName; }
+void KexiDBConnectionData::setLocalSocketFileName(const TQString& socketfilename) { m_data->localSocketFileName = socketfilename; }
-const QString KexiDBConnectionData::databaseName() const { return m_dbname; }
-void KexiDBConnectionData::setDatabaseName(const QString& dbname) { m_dbname = dbname; }
+const TQString KexiDBConnectionData::databaseName() const { return m_dbname; }
+void KexiDBConnectionData::setDatabaseName(const TQString& dbname) { m_dbname = dbname; }
-const QString KexiDBConnectionData::hostName() const { return m_data->hostName; }
-void KexiDBConnectionData::setHostName(const QString& hostname) { m_data->hostName = hostname; }
+const TQString KexiDBConnectionData::hostName() const { return m_data->hostName; }
+void KexiDBConnectionData::setHostName(const TQString& hostname) { m_data->hostName = hostname; }
int KexiDBConnectionData::port() const { return m_data->port; }
void KexiDBConnectionData::setPort(int p) { m_data->port = p; }
-const QString KexiDBConnectionData::password() const { return m_data->password; }
-void KexiDBConnectionData::setPassword(const QString& passwd) { m_data->password = passwd; }
+const TQString KexiDBConnectionData::password() const { return m_data->password; }
+void KexiDBConnectionData::setPassword(const TQString& passwd) { m_data->password = passwd; }
-const QString KexiDBConnectionData::userName() const { return m_data->userName; }
-void KexiDBConnectionData::setUserName(const QString& username) { m_data->userName = username; }
+const TQString KexiDBConnectionData::userName() const { return m_data->userName; }
+void KexiDBConnectionData::setUserName(const TQString& username) { m_data->userName = username; }
-const QString KexiDBConnectionData::fileName() const { return m_data->fileName(); }
-void KexiDBConnectionData::setFileName(const QString& filename) { m_data->setFileName(filename); }
+const TQString KexiDBConnectionData::fileName() const { return m_data->fileName(); }
+void KexiDBConnectionData::setFileName(const TQString& filename) { m_data->setFileName(filename); }
-const QString KexiDBConnectionData::dbPath() const { return m_data->dbPath(); }
-const QString KexiDBConnectionData::dbFileName() const { return m_data->dbFileName(); }
-const QString KexiDBConnectionData::serverInfoString() const { return m_data->serverInfoString(true); }
+const TQString KexiDBConnectionData::dbPath() const { return m_data->dbPath(); }
+const TQString KexiDBConnectionData::dbFileName() const { return m_data->dbFileName(); }
+const TQString KexiDBConnectionData::serverInfoString() const { return m_data->serverInfoString(true); }
diff --git a/kexi/plugins/scripting/kexidb/kexidbconnectiondata.h b/kexi/plugins/scripting/kexidb/kexidbconnectiondata.h
index aaddffbd..b82c7b6e 100644
--- a/kexi/plugins/scripting/kexidb/kexidbconnectiondata.h
+++ b/kexi/plugins/scripting/kexidb/kexidbconnectiondata.h
@@ -20,7 +20,7 @@
#ifndef KROSS_KEXIDB_KEXIDBCONNECTIONDATA_H
#define KROSS_KEXIDB_KEXIDBCONNECTIONDATA_H
-#include <qstring.h>
+#include <tqstring.h>
#include <api/object.h>
#include <api/variant.h>
@@ -44,46 +44,46 @@ namespace Kross { namespace KexiDB {
virtual ~KexiDBConnectionData();
operator ::KexiDB::ConnectionData& () { return *m_data; }
operator ::KexiDB::ConnectionData* () { return m_data; }
- virtual const QString getClassName() const;
+ virtual const TQString getClassName() const;
::KexiDB::ConnectionData* data() { return m_data; }
private:
/** Return the connection name. */
- const QString caption() const;
+ const TQString caption() const;
/** Set the connection name. */
- void setCaption(const QString& name);
+ void setCaption(const TQString& name);
/** Return the description. */
- const QString description() const;
+ const TQString description() const;
/** Set the description. */
- void setDescription(const QString& desc);
+ void setDescription(const TQString& desc);
/** Return drivername. */
- const QString driverName() const;
+ const TQString driverName() const;
/** Set the drivername. */
- void setDriverName(const QString& driver);
+ void setDriverName(const TQString& driver);
/** Return true if a local socket file is used else false. */
bool localSocketFileUsed() const;
/** Set if the local socket file should be used. */
void setLocalSocketFileUsed(bool used);
/** Return the local socket filename. */
- const QString localSocketFileName() const;
+ const TQString localSocketFileName() const;
/** Set the local socket filename. */
- void setLocalSocketFileName(const QString& socketfilename);
+ void setLocalSocketFileName(const TQString& socketfilename);
// For serverbased drivers
/** Return the database name. */
- const QString databaseName() const;
+ const TQString databaseName() const;
/** Set the database name. */
- void setDatabaseName(const QString& dbname);
+ void setDatabaseName(const TQString& dbname);
/** Return the hostname. */
- const QString hostName() const;
+ const TQString hostName() const;
/** Set the hostname. */
- void setHostName(const QString& hostname);
+ void setHostName(const TQString& hostname);
/** Return the port number. */
int port() const;
@@ -91,33 +91,33 @@ namespace Kross { namespace KexiDB {
void setPort(int p);
/** Return the password. */
- const QString password() const;
+ const TQString password() const;
/** Set the password. */
- void setPassword(const QString& passwd);
+ void setPassword(const TQString& passwd);
/** Return the username. */
- const QString userName() const;
+ const TQString userName() const;
/** Set the username. */
- void setUserName(const QString& username);
+ void setUserName(const TQString& username);
// For filebased drivers
/** Return the filename. */
- const QString fileName() const;
+ const TQString fileName() const;
/** Set the filename. */
- void setFileName(const QString& filename);
+ void setFileName(const TQString& filename);
/** Return the database path. */
- const QString dbPath() const;
+ const TQString dbPath() const;
/** Return the database filename. */
- const QString dbFileName() const;
+ const TQString dbFileName() const;
/** Return a user-friendly string representation. */
- const QString serverInfoString() const;
+ const TQString serverInfoString() const;
private:
::KexiDB::ConnectionData* m_data;
- QString m_dbname;
+ TQString m_dbname;
};
}}
diff --git a/kexi/plugins/scripting/kexidb/kexidbcursor.cpp b/kexi/plugins/scripting/kexidb/kexidbcursor.cpp
index 3bc1763d..bb9f53df 100644
--- a/kexi/plugins/scripting/kexidb/kexidbcursor.cpp
+++ b/kexi/plugins/scripting/kexidb/kexidbcursor.cpp
@@ -58,14 +58,14 @@ KexiDBCursor::~KexiDBCursor()
void KexiDBCursor::clearBuffers()
{
- QMap<Q_LLONG, Record*>::ConstIterator
+ TQMap<TQ_LLONG, Record*>::ConstIterator
it( m_modifiedrecords.constBegin() ), end( m_modifiedrecords.constEnd() );
for( ; it != end; ++it)
delete it.data();
m_modifiedrecords.clear();
}
-const QString KexiDBCursor::getClassName() const
+const TQString KexiDBCursor::getClassName() const
{
return "Kross::KexiDB::KexiDBCursor";
}
@@ -83,15 +83,15 @@ bool KexiDBCursor::moveNext() { return m_cursor->moveNext(); }
bool KexiDBCursor::bof() { return m_cursor->bof(); }
bool KexiDBCursor::eof() { return m_cursor->eof(); }
-Q_LLONG KexiDBCursor::at() { return m_cursor->at(); }
+TQ_LLONG KexiDBCursor::at() { return m_cursor->at(); }
uint KexiDBCursor::fieldCount() { return m_cursor->fieldCount(); }
-QVariant KexiDBCursor::value(uint index)
+TQVariant KexiDBCursor::value(uint index)
{
return m_cursor->value(index);
}
-bool KexiDBCursor::setValue(uint index, QVariant value)
+bool KexiDBCursor::setValue(uint index, TQVariant value)
{
::KexiDB::QuerySchema* query = m_cursor->query();
if(! query) {
@@ -105,9 +105,9 @@ bool KexiDBCursor::setValue(uint index, QVariant value)
return false;
}
- const Q_LLONG position = m_cursor->at();
- if(! m_modifiedrecords.contains(position))
- m_modifiedrecords.replace(position, new Record(m_cursor));
+ const TQ_LLONG position = m_cursor->at();
+ if(! m_modifiedrecords.tqcontains(position))
+ m_modifiedrecords.tqreplace(position, new Record(m_cursor));
m_modifiedrecords[position]->buffer->insert(*column, value);
return true;
}
@@ -124,7 +124,7 @@ bool KexiDBCursor::save()
m_cursor->close();
bool ok = true;
- QMap<Q_LLONG, Record*>::ConstIterator
+ TQMap<TQ_LLONG, Record*>::ConstIterator
it( m_modifiedrecords.constBegin() ), end( m_modifiedrecords.constEnd() );
for( ; it != end; ++it) {
bool b = m_cursor->updateRow(it.data()->rowdata, * it.data()->buffer, m_cursor->isBuffered());
diff --git a/kexi/plugins/scripting/kexidb/kexidbcursor.h b/kexi/plugins/scripting/kexidb/kexidbcursor.h
index 6e92a38e..6ff094ae 100644
--- a/kexi/plugins/scripting/kexidb/kexidbcursor.h
+++ b/kexi/plugins/scripting/kexidb/kexidbcursor.h
@@ -20,7 +20,7 @@
#ifndef KROSS_KEXIDB_KEXIDBCURSOR_H
#define KROSS_KEXIDB_KEXIDBCURSOR_H
-#include <qstring.h>
+#include <tqstring.h>
#include <api/object.h>
#include <api/variant.h>
@@ -87,7 +87,7 @@ namespace Kross { namespace KexiDB {
public:
KexiDBCursor(::KexiDB::Cursor* cursor);
virtual ~KexiDBCursor();
- virtual const QString getClassName() const;
+ virtual const TQString getClassName() const;
private:
@@ -117,14 +117,14 @@ namespace Kross { namespace KexiDB {
/** Returns current internal position of the cursor's query. Records
are numbered from 0; the value -1 means that the cursor does not
point to a valid record. */
- Q_LLONG at();
+ TQ_LLONG at();
/** Returns the number of fields available for this cursor. */
uint fieldCount();
/** Returns the value stored in the passed column number (counting from 0). */
- QVariant value(uint index);
+ TQVariant value(uint index);
/** Set the value for the field defined with index. The new value is buffered
and does not got written as long as save() is not called. */
- bool setValue(uint index, QVariant value);
+ bool setValue(uint index, TQVariant value);
/** Save any changes done with setValue(). You should call this only once at
the end of all value/setValue iterations cause the cursor is closed once
@@ -148,7 +148,7 @@ namespace Kross { namespace KexiDB {
delete buffer;
}
};
- QMap<Q_LLONG, Record*> m_modifiedrecords;
+ TQMap<TQ_LLONG, Record*> m_modifiedrecords;
void clearBuffers();
};
diff --git a/kexi/plugins/scripting/kexidb/kexidbdriver.cpp b/kexi/plugins/scripting/kexidb/kexidbdriver.cpp
index f019b237..0429c9f3 100644
--- a/kexi/plugins/scripting/kexidb/kexidbdriver.cpp
+++ b/kexi/plugins/scripting/kexidb/kexidbdriver.cpp
@@ -20,8 +20,8 @@
#include "kexidbdriver.h"
#include "kexidbdrivermanager.h"
-#include <qvaluelist.h>
-#include <qptrlist.h>
+#include <tqvaluelist.h>
+#include <tqptrlist.h>
#include <kdebug.h>
#include <kexidb/connection.h>
@@ -51,7 +51,7 @@ KexiDBDriver::~KexiDBDriver()
{
}
-const QString KexiDBDriver::getClassName() const
+const TQString KexiDBDriver::getClassName() const
{
return "Kross::KexiDB::KexiDBDriver";
}
@@ -59,12 +59,12 @@ const QString KexiDBDriver::getClassName() const
bool KexiDBDriver::isValid() { return m_driver->isValid(); }
int KexiDBDriver::versionMajor() { return m_driver->version().major; }
int KexiDBDriver::versionMinor() { return m_driver->version().minor; }
-QString KexiDBDriver::escapeString(const QString& s) { return m_driver->escapeString(s); }
+TQString KexiDBDriver::escapeString(const TQString& s) { return m_driver->escapeString(s); }
bool KexiDBDriver::isFileDriver() { return m_driver->isFileDriver(); }
-QString KexiDBDriver::fileDBDriverMimeType() { return m_driver->fileDBDriverMimeType(); }
-bool KexiDBDriver::isSystemObjectName(const QString& name) { return m_driver->isSystemObjectName(name); }
-bool KexiDBDriver::isSystemDatabaseName(const QString& name) { return m_driver->isSystemDatabaseName(name); }
-bool KexiDBDriver::isSystemFieldName(const QString& name) { return m_driver->isSystemFieldName(name); }
-QString KexiDBDriver::valueToSQL(const QString& fieldtype, const QVariant& value) { return m_driver->valueToSQL(fieldtype, value); }
+TQString KexiDBDriver::fileDBDriverMimeType() { return m_driver->fileDBDriverMimeType(); }
+bool KexiDBDriver::isSystemObjectName(const TQString& name) { return m_driver->isSystemObjectName(name); }
+bool KexiDBDriver::isSystemDatabaseName(const TQString& name) { return m_driver->isSystemDatabaseName(name); }
+bool KexiDBDriver::isSystemFieldName(const TQString& name) { return m_driver->isSystemFieldName(name); }
+TQString KexiDBDriver::valueToSQL(const TQString& fieldtype, const TQVariant& value) { return m_driver->valueToSQL(fieldtype, value); }
KexiDBConnection* KexiDBDriver::createConnection(KexiDBConnectionData* data) { return new KexiDBConnection( m_driver->createConnection(*data) ); }
-QPtrList< ::KexiDB::Connection > KexiDBDriver::connectionsList() { return m_driver->connectionsList(); }
+TQPtrList< ::KexiDB::Connection > KexiDBDriver::connectionsList() { return m_driver->connectionsList(); }
diff --git a/kexi/plugins/scripting/kexidb/kexidbdriver.h b/kexi/plugins/scripting/kexidb/kexidbdriver.h
index edf7283c..786cbb1a 100644
--- a/kexi/plugins/scripting/kexidb/kexidbdriver.h
+++ b/kexi/plugins/scripting/kexidb/kexidbdriver.h
@@ -20,9 +20,9 @@
#ifndef KROSS_KEXIDB_KEXIDBDRIVER_H
#define KROSS_KEXIDB_KEXIDBDRIVER_H
-#include <qstring.h>
-#include <qvaluelist.h>
-//#include <qguardedptr.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
+//#include <tqguardedptr.h>
#include <api/object.h>
#include <api/variant.h>
@@ -67,7 +67,7 @@ namespace Kross { namespace KexiDB {
public:
KexiDBDriver(::KexiDB::Driver* driver);
virtual ~KexiDBDriver();
- virtual const QString getClassName() const;
+ virtual const TQString getClassName() const;
private:
@@ -79,30 +79,30 @@ namespace Kross { namespace KexiDB {
int versionMinor();
/** Driver-specific SQL string escaping. For example the " or ' char may
need to be escaped for values used within SQL-statements. */
- QString escapeString(const QString& s);
+ TQString escapeString(const TQString& s);
/** Returns true if this driver is file-based. */
bool isFileDriver();
/** Return a name of MIME type of files handled by this driver if it is a
file-based database's driver otherwise returns null string. */
- QString fileDBDriverMimeType();
+ TQString fileDBDriverMimeType();
/** Returns true if the passed string is a system object's name, eg. name
of build-in system table that cannot be used or created by a user. */
- bool isSystemObjectName(const QString& name);
+ bool isSystemObjectName(const TQString& name);
/** Returns true if the passed string is a system database's name, eg. name
of build-in, system database that cannot be used or created by a user. */
- bool isSystemDatabaseName(const QString& name);
+ bool isSystemDatabaseName(const TQString& name);
/** Returns true if the passed string is a system field's name, build-in
system field that cannot be used or created by a user. */
- bool isSystemFieldName(const QString& name);
+ bool isSystemFieldName(const TQString& name);
/** The as second argument passed string got escaped to be usable within
a SQL-statement and those escaped string got returned by the method.
The first argument defines the fieldtype to what we should escape the
second argument to. */
- QString valueToSQL(const QString& fieldtype, const QVariant& value);
+ TQString valueToSQL(const TQString& fieldtype, const TQVariant& value);
/** Create a new KexiDBConnection object and return it. */
KexiDBConnection* createConnection(KexiDBConnectionData* data);
/** Return a list of KexiDBConnection objects. */
- QPtrList< ::KexiDB::Connection > connectionsList();
+ TQPtrList< ::KexiDB::Connection > connectionsList();
private:
::KexiDB::Driver* m_driver;
diff --git a/kexi/plugins/scripting/kexidb/kexidbdrivermanager.cpp b/kexi/plugins/scripting/kexidb/kexidbdrivermanager.cpp
index 66a0df26..c2475276 100644
--- a/kexi/plugins/scripting/kexidb/kexidbdrivermanager.cpp
+++ b/kexi/plugins/scripting/kexidb/kexidbdrivermanager.cpp
@@ -25,7 +25,7 @@
#include <api/exception.h>
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
#include <kdebug.h>
#include <kmimetype.h>
@@ -40,7 +40,7 @@ using namespace Kross::KexiDB;
KexiDBDriverManager::KexiDBDriverManager()
: Kross::Api::Class<KexiDBDriverManager>("DriverManager")
{
- //krossdebug( QString("Kross::KexiDB::KexiDBDriverManager::KexiDBDriverManager()") );
+ //krossdebug( TQString("Kross::KexiDB::KexiDBDriverManager::KexiDBDriverManager()") );
this->addFunction0< Kross::Api::Variant >("driverNames", this, &KexiDBDriverManager::driverNames);
@@ -56,37 +56,37 @@ KexiDBDriverManager::KexiDBDriverManager()
}
KexiDBDriverManager::~KexiDBDriverManager() {
- //krossdebug( QString("Kross::KexiDB::KexiDBDriverManager::~KexiDBDriverManager()") );
+ //krossdebug( TQString("Kross::KexiDB::KexiDBDriverManager::~KexiDBDriverManager()") );
}
-const QString KexiDBDriverManager::getClassName() const {
+const TQString KexiDBDriverManager::getClassName() const {
return "Kross::KexiDB::KexiDBDriverManager";
}
KexiDB::DriverManager& KexiDBDriverManager::driverManager()
{
if(m_drivermanager.error())
- throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(QString("KexiDB::DriverManager error: %1").arg(m_drivermanager.errorMsg())) );
+ throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("KexiDB::DriverManager error: %1").tqarg(m_drivermanager.errorMsg())) );
return m_drivermanager;
}
-const QStringList KexiDBDriverManager::driverNames() {
+const TQStringList KexiDBDriverManager::driverNames() {
return driverManager().driverNames();
}
-KexiDBDriver* KexiDBDriverManager::driver(const QString& drivername) {
- QGuardedPtr< ::KexiDB::Driver > driver = driverManager().driver(drivername); // caching is done by the DriverManager
+KexiDBDriver* KexiDBDriverManager::driver(const TQString& drivername) {
+ TQGuardedPtr< ::KexiDB::Driver > driver = driverManager().driver(drivername); // caching is done by the DriverManager
if(! driver) return 0;
- if(driver->error()) throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(QString("KexiDB::Driver error for drivername '%1': %2").arg(drivername).arg(driver->errorMsg())) );
+ if(driver->error()) throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("KexiDB::Driver error for drivername '%1': %2").tqarg(drivername).tqarg(driver->errorMsg())) );
return new KexiDBDriver(driver);
}
-const QString KexiDBDriverManager::lookupByMime(const QString& mimetype) {
+const TQString KexiDBDriverManager::lookupByMime(const TQString& mimetype) {
return driverManager().lookupByMime(mimetype);
}
-const QString KexiDBDriverManager::mimeForFile(const QString& filename) {
- QString mimename = KMimeType::findByFileContent( filename )->name();
+const TQString KexiDBDriverManager::mimeForFile(const TQString& filename) {
+ TQString mimename = KMimeType::findByFileContent( filename )->name();
if(mimename.isEmpty() || mimename=="application/octet-stream" || mimename=="text/plain")
mimename = KMimeType::findByURL(filename)->name();
return mimename;
@@ -96,18 +96,18 @@ KexiDBConnectionData* KexiDBDriverManager::createConnectionData() {
return new KexiDBConnectionData( new ::KexiDB::ConnectionData() );
}
-KexiDBConnectionData* KexiDBDriverManager::createConnectionDataByFile(const QString& filename) {
+KexiDBConnectionData* KexiDBDriverManager::createConnectionDataByFile(const TQString& filename) {
//! @todo reuse the original code!
- QString mimename = KMimeType::findByFileContent(filename)->name();
+ TQString mimename = KMimeType::findByFileContent(filename)->name();
if(mimename.isEmpty() || mimename=="application/octet-stream" || mimename=="text/plain")
mimename = KMimeType::findByURL(filename)->name();
if(mimename == "application/x-kexiproject-shortcut" || mimename == "application/x-kexi-connectiondata") {
KConfig config(filename, true, false);
- QString groupkey;
- QStringList groups(config.groupList());
- QStringList::ConstIterator it, end( groups.constEnd() );
+ TQString groupkey;
+ TQStringList groups(config.groupList());
+ TQStringList::ConstIterator it, end( groups.constEnd() );
for( it = groups.constBegin(); it != end; ++it) {
if((*it).lower()!="file information") {
groupkey = *it;
@@ -120,15 +120,15 @@ KexiDBConnectionData* KexiDBDriverManager::createConnectionDataByFile(const QStr
}
config.setGroup(groupkey);
- //QString type( config.readEntry("type", "database").lower() );
+ //TQString type( config.readEntry("type", "database").lower() );
//bool isDatabaseShortcut = (type == "database");
::KexiDB::ConnectionData* data = new ::KexiDB::ConnectionData();
int version = config.readNumEntry("version", 2); //KexiDBShortcutFile_version
- data->setFileName(QString::null);
+ data->setFileName(TQString());
data->caption = config.readEntry("caption");
data->description = config.readEntry("comment");
- QString dbname = config.readEntry("name");
+ TQString dbname = config.readEntry("name");
data->driverName = config.readEntry("engine");
data->hostName = config.readEntry("server");
data->port = config.readNumEntry("port", 0);
@@ -139,7 +139,7 @@ KexiDBConnectionData* KexiDBDriverManager::createConnectionDataByFile(const QStr
data->password = config.readEntry("encryptedPassword");
uint len = data->password.length();
for (uint i=0; i<len; i++)
- data->password[i] = QChar( data->password[i].unicode() - 47 - i );
+ data->password[i] = TQChar( data->password[i].tqunicode() - 47 - i );
}
if(data->password.isEmpty())
data->password = config.readEntry("password");
@@ -152,7 +152,7 @@ KexiDBConnectionData* KexiDBDriverManager::createConnectionDataByFile(const QStr
return c;
}
- QString const drivername = driverManager().lookupByMime(mimename);
+ TQString const drivername = driverManager().lookupByMime(mimename);
if(! drivername) {
kdDebug() << "No driver in KexiDBDriverManager::createConnectionDataByFile filename=" << filename << " mimename=" << mimename << endl;
return 0;
@@ -168,7 +168,7 @@ KexiDBField* KexiDBDriverManager::field() {
return new KexiDBField( new ::KexiDB::Field() );
}
-KexiDBTableSchema* KexiDBDriverManager::tableSchema(const QString& tablename) {
+KexiDBTableSchema* KexiDBDriverManager::tableSchema(const TQString& tablename) {
return new KexiDBTableSchema( new ::KexiDB::TableSchema(tablename) );
}
diff --git a/kexi/plugins/scripting/kexidb/kexidbdrivermanager.h b/kexi/plugins/scripting/kexidb/kexidbdrivermanager.h
index b6e31108..51b20271 100644
--- a/kexi/plugins/scripting/kexidb/kexidbdrivermanager.h
+++ b/kexi/plugins/scripting/kexidb/kexidbdrivermanager.h
@@ -20,7 +20,7 @@
#ifndef KROSS_KEXIDB_KEXIDBDRIVERMANAGER_H
#define KROSS_KEXIDB_KEXIDBDRIVERMANAGER_H
-#include <qstring.h>
+#include <tqstring.h>
#include <api/object.h>
#include <api/variant.h>
@@ -61,21 +61,21 @@ namespace Kross { namespace KexiDB {
public:
KexiDBDriverManager();
virtual ~KexiDBDriverManager();
- virtual const QString getClassName() const;
+ virtual const TQString getClassName() const;
private:
/** Returns a list with avaible drivernames. */
- const QStringList driverNames();
+ const TQStringList driverNames();
/** Return the to the defined drivername matching KexiDBDriver object. */
- KexiDBDriver* driver(const QString& drivername);
+ KexiDBDriver* driver(const TQString& drivername);
/** Return the to the defined mimetype-string matching drivername. */
- const QString lookupByMime(const QString& mimetype);
+ const TQString lookupByMime(const TQString& mimetype);
/** Return the matching mimetype for the defined file. */
- const QString mimeForFile(const QString& filename);
+ const TQString mimeForFile(const TQString& filename);
/** Return a new KexiDBConnectionData object. */
KexiDBConnectionData* createConnectionData();
@@ -83,13 +83,13 @@ namespace Kross { namespace KexiDB {
/** Create and return a KexiDBConnectionData object. Fill the content of the
KexiDBConnectionData object with the defined file as. The file could be e.g.
a *.kexi file or a *.kexis file. */
- KexiDBConnectionData* createConnectionDataByFile(const QString& filename);
+ KexiDBConnectionData* createConnectionDataByFile(const TQString& filename);
/** Return a new KexiDBField object. */
KexiDBField* field();
/** Return a new KexiDBTableSchema object. */
- KexiDBTableSchema* tableSchema(const QString& tablename);
+ KexiDBTableSchema* tableSchema(const TQString& tablename);
/** Return a new KexiDBQuerySchema object. */
KexiDBQuerySchema* querySchema();
diff --git a/kexi/plugins/scripting/kexidb/kexidbfield.cpp b/kexi/plugins/scripting/kexidb/kexidbfield.cpp
index 949b5e1a..1f5a51de 100644
--- a/kexi/plugins/scripting/kexidb/kexidbfield.cpp
+++ b/kexi/plugins/scripting/kexidb/kexidbfield.cpp
@@ -87,19 +87,19 @@ KexiDBField::~KexiDBField()
{
}
-const QString KexiDBField::getClassName() const
+const TQString KexiDBField::getClassName() const
{
return "Kross::KexiDB::KexiDBField";
}
-const QString KexiDBField::type() { return m_field->typeString(); }
-void KexiDBField::setType(const QString type) { m_field->setType( ::KexiDB::Field::typeForString(type) ); }
+const TQString KexiDBField::type() { return m_field->typeString(); }
+void KexiDBField::setType(const TQString type) { m_field->setType( ::KexiDB::Field::typeForString(type) ); }
-const QString KexiDBField::subType() { return m_field->subType(); }
-void KexiDBField::setSubType(const QString& subtype) { m_field->setSubType(subtype); }
+const TQString KexiDBField::subType() { return m_field->subType(); }
+void KexiDBField::setSubType(const TQString& subtype) { m_field->setSubType(subtype); }
-const QString KexiDBField::variantType() { return QVariant::typeToName( m_field->variantType() ); }
-const QString KexiDBField::typeGroup() { return m_field->typeGroupString(); }
+const TQString KexiDBField::variantType() { return TQVariant::typeToName( m_field->variantType() ); }
+const TQString KexiDBField::typeGroup() { return m_field->typeGroupString(); }
bool KexiDBField::isAutoInc() { return m_field->isAutoIncrement(); }
void KexiDBField::setAutoInc(bool autoinc) { m_field->setAutoIncrement(autoinc); }
@@ -125,14 +125,14 @@ void KexiDBField::setIndexed(bool indexed) { m_field->setIndexed(indexed); }
bool KexiDBField::isUnsigned() { return m_field->isUnsigned(); }
void KexiDBField::setUnsigned(bool isunsigned) { m_field->setUnsigned(isunsigned); }
-const QString KexiDBField::name() { return m_field->name(); }
-void KexiDBField::setName(const QString& name) { m_field->setName(name); }
+const TQString KexiDBField::name() { return m_field->name(); }
+void KexiDBField::setName(const TQString& name) { m_field->setName(name); }
-const QString KexiDBField::caption() { return m_field->caption(); }
-void KexiDBField::setCaption(const QString& caption) { m_field->setCaption(caption); }
+const TQString KexiDBField::caption() { return m_field->caption(); }
+void KexiDBField::setCaption(const TQString& caption) { m_field->setCaption(caption); }
-const QString KexiDBField::description() { return m_field->description(); }
-void KexiDBField::setDescription(const QString& desc) { m_field->setDescription(desc); }
+const TQString KexiDBField::description() { return m_field->description(); }
+void KexiDBField::setDescription(const TQString& desc) { m_field->setDescription(desc); }
uint KexiDBField::length() { return m_field->length(); }
void KexiDBField::setLength(uint length) { m_field->setLength(length); }
@@ -143,5 +143,5 @@ void KexiDBField::setPrecision(uint precision) { m_field->setPrecision(precision
uint KexiDBField::width() { return m_field->width(); }
void KexiDBField::setWidth(uint width) { m_field->setWidth(width); }
-QVariant KexiDBField::defaultValue() { return m_field->defaultValue(); }
-void KexiDBField::setDefaultValue(const QVariant& defaultvalue) { m_field->setDefaultValue(defaultvalue); }
+TQVariant KexiDBField::defaultValue() { return m_field->defaultValue(); }
+void KexiDBField::setDefaultValue(const TQVariant& defaultvalue) { m_field->setDefaultValue(defaultvalue); }
diff --git a/kexi/plugins/scripting/kexidb/kexidbfield.h b/kexi/plugins/scripting/kexidb/kexidbfield.h
index a4c2ef23..4cc85f38 100644
--- a/kexi/plugins/scripting/kexidb/kexidbfield.h
+++ b/kexi/plugins/scripting/kexidb/kexidbfield.h
@@ -20,7 +20,7 @@
#ifndef KROSS_KEXIDB_KEXIDBFIELD_H
#define KROSS_KEXIDB_KEXIDBFIELD_H
-#include <qstring.h>
+#include <tqstring.h>
#include <api/object.h>
#include <api/list.h>
@@ -39,27 +39,27 @@ namespace Kross { namespace KexiDB {
public:
KexiDBField(::KexiDB::Field* field);
virtual ~KexiDBField();
- virtual const QString getClassName() const;
+ virtual const TQString getClassName() const;
::KexiDB::Field* field() { return m_field; }
private:
/** Returns the type string for this field, e.g. "Integer" for Integer type. */
- const QString type();
+ const TQString type();
/** Sets the type string for this field, e.g. "Integer" for Integer type. */
- void setType(const QString type);
+ void setType(const TQString type);
/** Returns the optional subtype for this field. Subtype is a string providing
additional hint for field's type. E.g. for BLOB type, it can be a MIME type or
- certain QVariant type name, for example: "QPixmap", "QColor" or "QFont". */
- const QString subType();
+ certain TQVariant type name, for example: TQPIXMAP_OBJECT_NAME_STRING, "TQColor" or "TQFont". */
+ const TQString subType();
/** Sets the optional subtype for this field. */
- void setSubType(const QString& subtype);
+ void setSubType(const TQString& subtype);
- /** Returns the QVariant::typeName which is equivalent to the type this field has. */
- const QString variantType();
+ /** Returns the TQVariant::typeName which is equivalent to the type this field has. */
+ const TQString variantType();
/** Returns type group string for this field, e.g. "IntegerGroup" for IntegerGroup type. */
- const QString typeGroup();
+ const TQString typeGroup();
/** Returns true if the field is autoincrement (e.g. integer/numeric). */
bool isAutoInc();
@@ -102,19 +102,19 @@ namespace Kross { namespace KexiDB {
void setUnsigned(bool isunsigned);
/** Returns the name of this field. */
- const QString name();
+ const TQString name();
/** Sets the name of this field. */
- void setName(const QString& name);
+ void setName(const TQString& name);
/** Returns the caption of this field. */
- const QString caption();
+ const TQString caption();
/** Sets the caption of this field. */
- void setCaption(const QString& caption);
+ void setCaption(const TQString& caption);
/** Returns the descriptive text for this field. */
- const QString description();
+ const TQString description();
/** Set the description for this field. */
- void setDescription(const QString& desc);
+ void setDescription(const TQString& desc);
/** Returns the length of text if the field type is text. */
uint length();
@@ -134,9 +134,9 @@ namespace Kross { namespace KexiDB {
void setWidth(uint width);
/** Returns the default value this field has. */
- QVariant defaultValue();
+ TQVariant defaultValue();
/** Sets the default value this field has. */
- void setDefaultValue(const QVariant& defaultvalue);
+ void setDefaultValue(const TQVariant& defaultvalue);
private:
::KexiDB::Field* m_field;
diff --git a/kexi/plugins/scripting/kexidb/kexidbfieldlist.cpp b/kexi/plugins/scripting/kexidb/kexidbfieldlist.cpp
index f36bf0b0..4e07e166 100644
--- a/kexi/plugins/scripting/kexidb/kexidbfieldlist.cpp
+++ b/kexi/plugins/scripting/kexidb/kexidbfieldlist.cpp
@@ -53,7 +53,7 @@ KexiDBFieldList::~KexiDBFieldList()
{
}
-const QString KexiDBFieldList::getClassName() const
+const TQString KexiDBFieldList::getClassName() const
{
return "Kross::KexiDB::KexiDBFieldList";
}
@@ -67,7 +67,7 @@ KexiDBField* KexiDBFieldList::field(uint index) {
return field ? new KexiDBField(field) : 0;
}
-KexiDBField* KexiDBFieldList::fieldByName(const QString& name) {
+KexiDBField* KexiDBFieldList::fieldByName(const TQString& name) {
::KexiDB::Field* field = m_fieldlist->field(name);
return field ? new KexiDBField(field) : 0;
}
@@ -77,7 +77,7 @@ Kross::Api::List* KexiDBFieldList::fields() {
}
bool KexiDBFieldList::hasField(KexiDBField* field) { return m_fieldlist->hasField( field->field() ); }
-const QStringList KexiDBFieldList::names() const { return m_fieldlist->names(); }
+const TQStringList KexiDBFieldList::names() const { return m_fieldlist->names(); }
void KexiDBFieldList::addField(KexiDBField* field) { m_fieldlist->addField( field->field() ); }
void KexiDBFieldList::insertField(uint index, KexiDBField* field) { m_fieldlist->insertField(index, field->field()); }
void KexiDBFieldList::removeField(KexiDBField* field) { m_fieldlist->removeField( field->field() ); }
@@ -90,9 +90,9 @@ void KexiDBFieldList::setFields(KexiDBFieldList* fieldlist) {
m_fieldlist->addField( it.current() );
}
-KexiDBFieldList* KexiDBFieldList::subList(QValueList<QVariant> list) {
- QValueList<QVariant>::ConstIterator it( list.constBegin() ), end( list.constEnd() );
- QStringList sl;
+KexiDBFieldList* KexiDBFieldList::subList(TQValueList<TQVariant> list) {
+ TQValueList<TQVariant>::ConstIterator it( list.constBegin() ), end( list.constEnd() );
+ TQStringList sl;
for(; it != end; ++it) sl.append( (*it).toString() );
::KexiDB::FieldList* fl = m_fieldlist->subList(sl);
return fl ? new Kross::KexiDB::KexiDBFieldList(fl) : 0;
diff --git a/kexi/plugins/scripting/kexidb/kexidbfieldlist.h b/kexi/plugins/scripting/kexidb/kexidbfieldlist.h
index ee990eb3..1d7b7665 100644
--- a/kexi/plugins/scripting/kexidb/kexidbfieldlist.h
+++ b/kexi/plugins/scripting/kexidb/kexidbfieldlist.h
@@ -20,7 +20,7 @@
#ifndef KROSS_KEXIDB_KEXIDBFIELDLIST_H
#define KROSS_KEXIDB_KEXIDBFIELDLIST_H
-#include <qstring.h>
+#include <tqstring.h>
#include <api/object.h>
#include <api/list.h>
@@ -61,7 +61,7 @@ namespace Kross { namespace KexiDB {
public:
KexiDBFieldList(::KexiDB::FieldList* fieldlist);
virtual ~KexiDBFieldList();
- virtual const QString getClassName() const;
+ virtual const TQString getClassName() const;
::KexiDB::FieldList* fieldlist() { return m_fieldlist; }
private:
@@ -71,14 +71,14 @@ namespace Kross { namespace KexiDB {
/** Return the field specified by the index-number passed as an argument. */
KexiDBField* field(uint index);
/** Return the field specified by the as an argument passed fieldname. */
- KexiDBField* fieldByName(const QString& name);
+ KexiDBField* fieldByName(const TQString& name);
/** Returns a list of all fields. */
Kross::Api::List* fields();
/** Returns true if the KexiDBField object passed as an argument is in the field list. */
bool hasField(KexiDBField* field);
/** Return a list of field names. */
- const QStringList names() const;
+ const TQStringList names() const;
/** Adds the KexiDBField object passed as an argument to the field list. */
void addField(KexiDBField* field);
@@ -92,7 +92,7 @@ namespace Kross { namespace KexiDB {
/** Set the fieldlist to the as argument passed list of fields. */
void setFields(KexiDBFieldList* fieldlist);
/** Creates and returns list that contain fields selected by name. */
- KexiDBFieldList* subList(QValueList<QVariant> list);
+ KexiDBFieldList* subList(TQValueList<TQVariant> list);
private:
::KexiDB::FieldList* m_fieldlist;
diff --git a/kexi/plugins/scripting/kexidb/kexidbmodule.cpp b/kexi/plugins/scripting/kexidb/kexidbmodule.cpp
index 36f7b71f..91472a1f 100644
--- a/kexi/plugins/scripting/kexidb/kexidbmodule.cpp
+++ b/kexi/plugins/scripting/kexidb/kexidbmodule.cpp
@@ -58,12 +58,12 @@ KexiDBModule::~KexiDBModule()
//kdDebug() << "Kross::KexiDB::KexiDBModule Dtor" << endl;
}
-const QString KexiDBModule::getClassName() const
+const TQString KexiDBModule::getClassName() const
{
return "Kross::KexiDB::KexiDBModule";
}
-Kross::Api::Object::Ptr KexiDBModule::get(const QString& name, void* p)
+Kross::Api::Object::Ptr KexiDBModule::get(const TQString& name, void* p)
{
if(name == "KexiDBConnection") {
::KexiDB::Connection* connection = (::KexiDB::Connection*)p;
diff --git a/kexi/plugins/scripting/kexidb/kexidbmodule.h b/kexi/plugins/scripting/kexidb/kexidbmodule.h
index b91b6047..eb7c9c22 100644
--- a/kexi/plugins/scripting/kexidb/kexidbmodule.h
+++ b/kexi/plugins/scripting/kexidb/kexidbmodule.h
@@ -20,8 +20,8 @@
#ifndef KROSS_KEXIDB_KEXIDBMODULE_H
#define KROSS_KEXIDB_KEXIDBMODULE_H
-#include <qstring.h>
-#include <qvariant.h>
+#include <tqstring.h>
+#include <tqvariant.h>
#include <api/module.h>
@@ -45,7 +45,7 @@ namespace KexiDB {
public:
KexiDBModule(Kross::Api::Manager* manager);
virtual ~KexiDBModule();
- virtual const QString getClassName() const;
+ virtual const TQString getClassName() const;
/**
* \internal
@@ -59,7 +59,7 @@ namespace KexiDB {
* the module and the name what this pointer is.
* \return a \a Kross::Api::Object or NULL.
*/
- virtual Kross::Api::Object::Ptr get(const QString& name, void* p = 0);
+ virtual Kross::Api::Object::Ptr get(const TQString& name, void* p = 0);
};
diff --git a/kexi/plugins/scripting/kexidb/kexidbparser.cpp b/kexi/plugins/scripting/kexidb/kexidbparser.cpp
index b022570d..63aecda9 100644
--- a/kexi/plugins/scripting/kexidb/kexidbparser.cpp
+++ b/kexi/plugins/scripting/kexidb/kexidbparser.cpp
@@ -50,14 +50,14 @@ KexiDBParser::~KexiDBParser()
{
}
-const QString KexiDBParser::getClassName() const
+const TQString KexiDBParser::getClassName() const
{
return "Kross::KexiDB::KexiDBParser";
}
-bool KexiDBParser::parse(const QString& sql) { return m_parser->parse(sql); }
+bool KexiDBParser::parse(const TQString& sql) { return m_parser->parse(sql); }
void KexiDBParser::clear() { m_parser->clear(); }
-const QString KexiDBParser::operation() { return m_parser->operationString(); }
+const TQString KexiDBParser::operation() { return m_parser->operationString(); }
KexiDBTableSchema* KexiDBParser::table() {
::KexiDB::TableSchema* t = m_parser->table();
@@ -70,8 +70,8 @@ KexiDBQuerySchema* KexiDBParser::query() {
}
KexiDBConnection* KexiDBParser::connection() { return m_connection; }
-const QString KexiDBParser::statement() { return m_parser->statement(); }
+const TQString KexiDBParser::statement() { return m_parser->statement(); }
-const QString KexiDBParser::errorType() { return m_parser->error().type(); }
-const QString KexiDBParser::errorMsg() { return m_parser->error().error(); }
+const TQString KexiDBParser::errorType() { return m_parser->error().type(); }
+const TQString KexiDBParser::errorMsg() { return m_parser->error().error(); }
int KexiDBParser::errorAt() { return m_parser->error().at(); }
diff --git a/kexi/plugins/scripting/kexidb/kexidbparser.h b/kexi/plugins/scripting/kexidb/kexidbparser.h
index 09ac22da..e09df068 100644
--- a/kexi/plugins/scripting/kexidb/kexidbparser.h
+++ b/kexi/plugins/scripting/kexidb/kexidbparser.h
@@ -20,7 +20,7 @@
#ifndef KROSS_KEXIDB_KEXIDBPARSER_H
#define KROSS_KEXIDB_KEXIDBPARSER_H
-#include <qstring.h>
+#include <tqstring.h>
#include <api/object.h>
#include <api/list.h>
@@ -57,16 +57,16 @@ namespace Kross { namespace KexiDB {
public:
KexiDBParser(KexiDBConnection* connection, ::KexiDB::Parser* parser);
virtual ~KexiDBParser();
- virtual const QString getClassName() const;
+ virtual const TQString getClassName() const;
private:
/** Clears previous results and runs the parser on the SQL statement passed as an argument. */
- bool parse(const QString& sql);
+ bool parse(const TQString& sql);
/** Clears parsing results. */
void clear();
/** Returns the resulting operation. */
- const QString operation();
+ const TQString operation();
/** Returns the KexiDBTableSchema object on a CREATE TABLE operation. */
KexiDBTableSchema* table();
@@ -75,12 +75,12 @@ namespace Kross { namespace KexiDB {
/** Returns the KexiDBConnection object pointing to the used database connection. */
KexiDBConnection* connection();
/** Returns the SQL query statement. */
- const QString statement();
+ const TQString statement();
/** Returns the type string of the last error. */
- const QString errorType();
+ const TQString errorType();
/** Returns the message of the last error. */
- const QString errorMsg();
+ const TQString errorMsg();
/** Returns the position where the last error occurred. */
int errorAt();
diff --git a/kexi/plugins/scripting/kexidb/kexidbschema.cpp b/kexi/plugins/scripting/kexidb/kexidbschema.cpp
index e07917f3..aebcbd7e 100644
--- a/kexi/plugins/scripting/kexidb/kexidbschema.cpp
+++ b/kexi/plugins/scripting/kexidb/kexidbschema.cpp
@@ -21,7 +21,7 @@
#include "kexidbschema.h"
#include "kexidbfieldlist.h"
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <api/variant.h>
@@ -33,7 +33,7 @@ using namespace Kross::KexiDB;
*/
template<class T>
-KexiDBSchema<T>::KexiDBSchema(const QString& name, ::KexiDB::SchemaData* schema, ::KexiDB::FieldList* fieldlist)
+KexiDBSchema<T>::KexiDBSchema(const TQString& name, ::KexiDB::SchemaData* schema, ::KexiDB::FieldList* fieldlist)
: Kross::Api::Class<T>(name)
, m_schema(schema)
, m_fieldlist(fieldlist)
@@ -55,32 +55,32 @@ KexiDBSchema<T>::~KexiDBSchema<T>() {
}
template<class T>
-const QString KexiDBSchema<T>::name() const {
+const TQString KexiDBSchema<T>::name() const {
return m_schema->name();
}
template<class T>
-void KexiDBSchema<T>::setName(const QString& name) {
+void KexiDBSchema<T>::setName(const TQString& name) {
m_schema->setName(name);
}
template<class T>
-const QString KexiDBSchema<T>::caption() const {
+const TQString KexiDBSchema<T>::caption() const {
return m_schema->caption();
}
template<class T>
-void KexiDBSchema<T>::setCaption(const QString& caption) {
+void KexiDBSchema<T>::setCaption(const TQString& caption) {
m_schema->setCaption(caption);
}
template<class T>
-const QString KexiDBSchema<T>::description() const {
+const TQString KexiDBSchema<T>::description() const {
return m_schema->description();
}
template<class T>
-void KexiDBSchema<T>::setDescription(const QString& description) {
+void KexiDBSchema<T>::setDescription(const TQString& description) {
m_schema->setDescription(description);
}
@@ -102,7 +102,7 @@ KexiDBTableSchema::KexiDBTableSchema(::KexiDB::TableSchema* tableschema)
KexiDBTableSchema::~KexiDBTableSchema() {
}
-const QString KexiDBTableSchema::getClassName() const {
+const TQString KexiDBTableSchema::getClassName() const {
return "Kross::KexiDB::KexiDBTableSchema";
}
@@ -129,7 +129,7 @@ KexiDBQuerySchema::KexiDBQuerySchema(::KexiDB::QuerySchema* queryschema)
KexiDBQuerySchema::~KexiDBQuerySchema() {
}
-const QString KexiDBQuerySchema::getClassName() const {
+const TQString KexiDBQuerySchema::getClassName() const {
return "Kross::KexiDB::KexiDBQuerySchema";
}
@@ -137,53 +137,53 @@ const QString KexiDBQuerySchema::getClassName() const {
return static_cast< ::KexiDB::QuerySchema* >(m_schema);
}
-const QString KexiDBQuerySchema::statement() const {
+const TQString KexiDBQuerySchema::statement() const {
return static_cast< ::KexiDB::QuerySchema* >(m_schema)->statement();
}
-void KexiDBQuerySchema::setStatement(const QString& statement) {
+void KexiDBQuerySchema::setStatement(const TQString& statement) {
static_cast< ::KexiDB::QuerySchema* >(m_schema)->setStatement(statement);
}
-bool KexiDBQuerySchema::setWhereExpression(const QString& whereexpression) {
+bool KexiDBQuerySchema::setWhereExpression(const TQString& whereexpression) {
::KexiDB::BaseExpr* oldexpr = static_cast< ::KexiDB::QuerySchema* >(m_schema)->whereExpression();
///@todo use ::KexiDB::Parser for such kind of parser-functionality.
- QString s = whereexpression;
+ TQString s = whereexpression;
try {
- QRegExp re("[\"',]{1,1}");
+ TQRegExp re("[\"',]{1,1}");
while(true) {
- s.remove(QRegExp("^[\\s,]+"));
- int pos = s.find('=');
+ s.remove(TQRegExp("^[\\s,]+"));
+ int pos = s.tqfind('=');
if(pos < 0) break;
- QString key = s.left(pos).stripWhiteSpace();
+ TQString key = s.left(pos).stripWhiteSpace();
s = s.mid(pos + 1).stripWhiteSpace();
- QString value;
- int sp = s.find(re);
+ TQString value;
+ int sp = s.tqfind(re);
if(sp >= 0) {
if(re.cap(0) == ",") {
value = s.left(sp).stripWhiteSpace();
s = s.mid(sp+1).stripWhiteSpace();
}
else {
- int ep = s.find(re.cap(0),sp+1);
+ int ep = s.tqfind(re.cap(0),sp+1);
value = s.mid(sp+1,ep-1);
s = s.mid(ep + 1);
}
}
else {
value = s;
- s = QString::null;
+ s = TQString();
}
::KexiDB::Field* field = static_cast< ::KexiDB::QuerySchema* >(m_schema)->field(key);
if(! field)
- throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(QString("Invalid WHERE-expression: Field \"%1\" does not exists in tableschema \"%2\".").arg(key).arg(m_schema->name())) );
+ throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Invalid WHERE-expression: Field \"%1\" does not exists in tableschema \"%2\".").tqarg(key).tqarg(m_schema->name())) );
- QVariant v(value);
+ TQVariant v(value);
if(! v.cast(field->variantType()))
- throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(QString("Invalid WHERE-expression: The for Field \"%1\" defined value is of type \"%2\" rather then the expected type \"%3\"").arg(key).arg(v.typeName()).arg(field->variantType())) );
+ throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Invalid WHERE-expression: The for Field \"%1\" defined value is of type \"%2\" rather then the expected type \"%3\"").tqarg(key).tqarg(v.typeName()).tqarg(field->variantType())) );
static_cast< ::KexiDB::QuerySchema* >(m_schema)->addToWhereExpression(field,v);
}
diff --git a/kexi/plugins/scripting/kexidb/kexidbschema.h b/kexi/plugins/scripting/kexidb/kexidbschema.h
index 61b6bc88..c2243035 100644
--- a/kexi/plugins/scripting/kexidb/kexidbschema.h
+++ b/kexi/plugins/scripting/kexidb/kexidbschema.h
@@ -20,7 +20,7 @@
#ifndef KROSS_KEXIDB_KEXIDBSCHEMA_H
#define KROSS_KEXIDB_KEXIDBSCHEMA_H
-#include <qstring.h>
+#include <tqstring.h>
#include <api/object.h>
#include <api/class.h>
@@ -59,25 +59,25 @@ namespace Kross { namespace KexiDB {
class KexiDBSchema : public Kross::Api::Class<T>
{
public:
- KexiDBSchema(const QString& name, ::KexiDB::SchemaData* schema, ::KexiDB::FieldList* fieldlist);
+ KexiDBSchema(const TQString& name, ::KexiDB::SchemaData* schema, ::KexiDB::FieldList* fieldlist);
virtual ~KexiDBSchema();
private:
/** Returns the name of the schema. */
- const QString name() const;
+ const TQString name() const;
/** Set the name of the schema. */
- void setName(const QString& name);
+ void setName(const TQString& name);
/** Returns the caption of the schema. */
- const QString caption() const;
+ const TQString caption() const;
/** Set the caption of the schema. */
- void setCaption(const QString& caption);
+ void setCaption(const TQString& caption);
/** Returns a description of the schema. */
- const QString description() const;
+ const TQString description() const;
/** Set a description of the schema. */
- void setDescription(const QString& description);
+ void setDescription(const TQString& description);
/** Returns the KexiDBFieldList object this schema has. */
KexiDBFieldList* fieldlist() const;
@@ -95,7 +95,7 @@ namespace Kross { namespace KexiDB {
public:
KexiDBTableSchema(::KexiDB::TableSchema* tableschema);
virtual ~KexiDBTableSchema();
- virtual const QString getClassName() const;
+ virtual const TQString getClassName() const;
::KexiDB::TableSchema* tableschema();
private:
@@ -114,17 +114,17 @@ namespace Kross { namespace KexiDB {
public:
KexiDBQuerySchema(::KexiDB::QuerySchema* queryschema);
virtual ~KexiDBQuerySchema();
- virtual const QString getClassName() const;
+ virtual const TQString getClassName() const;
::KexiDB::QuerySchema* queryschema();
private:
/** Returns the SQL-statement of this query schema. */
- const QString statement() const;
+ const TQString statement() const;
/** Set the SQL-statement of this query schema. */
- void setStatement(const QString& statement);
+ void setStatement(const TQString& statement);
/** Set the where-expression. */
- bool setWhereExpression(const QString& whereexpression);
+ bool setWhereExpression(const TQString& whereexpression);
};
diff --git a/kexi/plugins/scripting/kexidb/kexidbtransaction.cpp b/kexi/plugins/scripting/kexidb/kexidbtransaction.cpp
index d4cdff24..73f4bf28 100644
--- a/kexi/plugins/scripting/kexidb/kexidbtransaction.cpp
+++ b/kexi/plugins/scripting/kexidb/kexidbtransaction.cpp
@@ -38,7 +38,7 @@ KexiDBTransaction::~KexiDBTransaction()
{
}
-const QString KexiDBTransaction::getClassName() const
+const TQString KexiDBTransaction::getClassName() const
{
return "Kross::KexiDB::KexiDBTransaction";
}
diff --git a/kexi/plugins/scripting/kexidb/kexidbtransaction.h b/kexi/plugins/scripting/kexidb/kexidbtransaction.h
index 6a6b5785..d02e44d6 100644
--- a/kexi/plugins/scripting/kexidb/kexidbtransaction.h
+++ b/kexi/plugins/scripting/kexidb/kexidbtransaction.h
@@ -20,7 +20,7 @@
#ifndef KROSS_KEXIDB_KEXIDBTRANSACTION_H
#define KROSS_KEXIDB_KEXIDBTRANSACTION_H
-#include <qstring.h>
+#include <tqstring.h>
#include <api/class.h>
@@ -41,7 +41,7 @@ namespace Kross { namespace KexiDB {
public:
KexiDBTransaction(::KexiDB::Transaction& transaction);
virtual ~KexiDBTransaction();
- virtual const QString getClassName() const;
+ virtual const TQString getClassName() const;
::KexiDB::Transaction& transaction();
private:
diff --git a/kexi/plugins/scripting/kexiscripting/kexiscriptdesignview.cpp b/kexi/plugins/scripting/kexiscripting/kexiscriptdesignview.cpp
index ff2f93d0..0c95cb0e 100644
--- a/kexi/plugins/scripting/kexiscripting/kexiscriptdesignview.cpp
+++ b/kexi/plugins/scripting/kexiscripting/kexiscriptdesignview.cpp
@@ -28,12 +28,12 @@
#include <kross/main/scriptaction.h>
#include <kross/api/interpreter.h>
-#include <qlayout.h>
-#include <qsplitter.h>
-#include <qtimer.h>
-#include <qdatetime.h>
-#include <qdom.h>
-#include <qstylesheet.h>
+#include <tqlayout.h>
+#include <tqsplitter.h>
+#include <tqtimer.h>
+#include <tqdatetime.h>
+#include <tqdom.h>
+#include <tqstylesheet.h>
#include <ktextbrowser.h>
#include <kdebug.h>
@@ -64,17 +64,17 @@ class KexiScriptDesignViewPrivate
KTextBrowser* statusbrowser;
};
-KexiScriptDesignView::KexiScriptDesignView(KexiMainWindow *mainWin, QWidget *parent, Kross::Api::ScriptAction* scriptaction)
- : KexiViewBase(mainWin, parent, "KexiScriptDesignView")
+KexiScriptDesignView::KexiScriptDesignView(KexiMainWindow *mainWin, TQWidget *tqparent, Kross::Api::ScriptAction* scriptaction)
+ : KexiViewBase(mainWin, tqparent, "KexiScriptDesignView")
, d( new KexiScriptDesignViewPrivate() )
{
d->scriptaction = scriptaction;
d->updatesProperties = false;
- QSplitter* splitter = new QSplitter(this);
- splitter->setOrientation(Vertical);
- QHBoxLayout* layout = new QHBoxLayout(this);
- layout->addWidget(splitter);
+ TQSplitter* splitter = new TQSplitter(this);
+ splitter->setOrientation(Qt::Vertical);
+ TQHBoxLayout* tqlayout = new TQHBoxLayout(this);
+ tqlayout->addWidget(splitter);
d->editor = new KexiScriptEditor(mainWin, splitter, "ScriptEditor");
splitter->setFocusProxy(d->editor);
@@ -83,23 +83,23 @@ KexiScriptDesignView::KexiScriptDesignView(KexiMainWindow *mainWin, QWidget *par
d->statusbrowser = new KTextBrowser(splitter, "ScriptStatusBrowser");
d->statusbrowser->setReadOnly(true);
- d->statusbrowser->setTextFormat(QTextBrowser::RichText);
- //d->browser->setWordWrap(QTextEdit::WidgetWidth);
+ d->statusbrowser->setTextFormat(TQTextBrowser::RichText);
+ //d->browser->setWordWrap(TQTextEdit::WidgetWidth);
d->statusbrowser->installEventFilter(this);
- splitter->setResizeMode(d->statusbrowser, QSplitter::KeepSize);
+ splitter->setResizeMode(d->statusbrowser, TQSplitter::KeepSize);
- plugSharedAction( "data_execute", this, SLOT(execute()) );
+ plugSharedAction( "data_execute", TQT_TQOBJECT(this), TQT_SLOT(execute()) );
if(KexiEditor::isAdvancedEditor()) // the configeditor is only in advanced mode avaiable.
- plugSharedAction( "script_config_editor", d->editor, SLOT(slotConfigureEditor()) );
+ plugSharedAction( "script_config_editor", TQT_TQOBJECT(d->editor), TQT_SLOT(slotConfigureEditor()) );
loadData();
- d->properties = new KoProperty::Set(this, "KexiScripting");
- connect(d->properties, SIGNAL( propertyChanged(KoProperty::Set&, KoProperty::Property&) ),
- this, SLOT( slotPropertyChanged(KoProperty::Set&, KoProperty::Property&) ));
+ d->properties = new KoProperty::Set(TQT_TQOBJECT(this), "KexiScripting");
+ connect(d->properties, TQT_SIGNAL( propertyChanged(KoProperty::Set&, KoProperty::Property&) ),
+ this, TQT_SLOT( slotPropertyChanged(KoProperty::Set&, KoProperty::Property&) ));
// To schedule the initialize fixes a crasher in Kate.
- QTimer::singleShot(50, this, SLOT( initialize() ));
+ TQTimer::singleShot(50, this, TQT_SLOT( initialize() ));
}
KexiScriptDesignView::~KexiScriptDesignView()
@@ -127,14 +127,14 @@ void KexiScriptDesignView::updateProperties()
Kross::Api::Manager* manager = Kross::Api::Manager::scriptManager();
- QString interpretername = d->scriptaction->getInterpreterName();
+ TQString interpretername = d->scriptaction->getInterpreterName();
Kross::Api::InterpreterInfo* info = interpretername.isEmpty() ? 0 : manager->getInterpreterInfo(interpretername);
{
// if interpreter isn't defined or invalid, try to fallback.
- QStringList list;
+ TQStringList list;
list << "python" << "ruby";
- QStringList::ConstIterator it( list.constBegin() ), end( list.constEnd() );
+ TQStringList::ConstIterator it( list.constBegin() ), end( list.constEnd() );
while( (! info) && (it != end) ) {
interpretername = (*it);
info = manager->getInterpreterInfo(interpretername);
@@ -147,7 +147,7 @@ void KexiScriptDesignView::updateProperties()
if(info) {
d->properties->clear();
- QStringList interpreters = manager->getInterpreters();
+ TQStringList interpreters = manager->getInterpreters();
KoProperty::Property::ListData* proplist = new KoProperty::Property::ListData(interpreters, interpreters);
KoProperty::Property* prop = new KoProperty::Property(
"language", // name
@@ -190,8 +190,8 @@ void KexiScriptDesignView::slotPropertyChanged(KoProperty::Set& /*set*/, KoPrope
return;
if(property.name() == "language") {
- QString language = property.value().toString();
- kdDebug() << QString("KexiScriptDesignView::slotPropertyChanged() language=%1").arg(language) << endl;
+ TQString language = property.value().toString();
+ kdDebug() << TQString("KexiScriptDesignView::slotPropertyChanged() language=%1").tqarg(language) << endl;
d->scriptaction->setInterpreterName( language );
// We assume Kross and the HighlightingInterface are using same
// names for the support languages...
@@ -201,7 +201,7 @@ void KexiScriptDesignView::slotPropertyChanged(KoProperty::Set& /*set*/, KoPrope
else {
bool ok = d->scriptaction->setOption( property.name(), property.value() );
if(! ok) {
- kdWarning() << QString("KexiScriptDesignView::slotPropertyChanged() unknown property '%1'.").arg(property.name()) << endl;
+ kdWarning() << TQString("KexiScriptDesignView::slotPropertyChanged() unknown property '%1'.").tqarg(TQString(property.name())) << endl;
return;
}
}
@@ -212,40 +212,40 @@ void KexiScriptDesignView::slotPropertyChanged(KoProperty::Set& /*set*/, KoPrope
void KexiScriptDesignView::execute()
{
d->statusbrowser->clear();
- QTime time;
+ TQTime time;
time.start();
- d->statusbrowser->append( i18n("Execution of the script \"%1\" started.").arg(d->scriptaction->name()) );
+ d->statusbrowser->append( i18n("Execution of the script \"%1\" started.").tqarg(d->scriptaction->name()) );
d->scriptaction->activate();
if( d->scriptaction->hadException() ) {
- QString errormessage = d->scriptaction->getException()->getError();
- d->statusbrowser->append(QString("<b>%2</b><br>").arg(QStyleSheet::escape(errormessage)) );
+ TQString errormessage = d->scriptaction->getException()->getError();
+ d->statusbrowser->append(TQString("<b>%2</b><br>").tqarg(TQStyleSheet::escape(errormessage)) );
- QString tracedetails = d->scriptaction->getException()->getTrace();
- d->statusbrowser->append( QStyleSheet::escape(tracedetails) );
+ TQString tracedetails = d->scriptaction->getException()->getTrace();
+ d->statusbrowser->append( TQStyleSheet::escape(tracedetails) );
long lineno = d->scriptaction->getException()->getLineNo();
if(lineno >= 0)
d->editor->setLineNo(lineno);
}
else {
- d->statusbrowser->append( i18n("Successfully executed. Time elapsed: %1ms").arg(time.elapsed()) );
+ d->statusbrowser->append( i18n("Successfully executed. Time elapsed: %1ms").tqarg(time.elapsed()) );
}
}
bool KexiScriptDesignView::loadData()
{
- QString data;
+ TQString data;
if(! loadDataBlock(data)) {
kexipluginsdbg << "KexiScriptDesignView::loadData(): no DataBlock" << endl;
return false;
}
- QString errMsg;
+ TQString errMsg;
int errLine;
int errCol;
- QDomDocument domdoc;
+ TQDomDocument domdoc;
bool parsed = domdoc.setContent(data, false, &errMsg, &errLine, &errCol);
if(! parsed) {
@@ -253,13 +253,13 @@ bool KexiScriptDesignView::loadData()
return false;
}
- QDomElement scriptelem = domdoc.namedItem("script").toElement();
+ TQDomElement scriptelem = domdoc.namedItem("script").toElement();
if(scriptelem.isNull()) {
kexipluginsdbg << "KexiScriptDesignView::loadData(): script domelement is null" << endl;
return false;
}
- QString interpretername = scriptelem.attribute("language");
+ TQString interpretername = scriptelem.attribute("language");
Kross::Api::Manager* manager = Kross::Api::Manager::scriptManager();
Kross::Api::InterpreterInfo* info = interpretername.isEmpty() ? 0 : manager->getInterpreterInfo(interpretername);
if(info) {
@@ -268,10 +268,10 @@ bool KexiScriptDesignView::loadData()
Kross::Api::InterpreterInfo::Option::Map options = info->getOptions();
Kross::Api::InterpreterInfo::Option::Map::ConstIterator it, end = options.constEnd();
for( it = options.constBegin(); it != end; ++it) {
- QString value = scriptelem.attribute( it.data()->name );
+ TQString value = scriptelem.attribute( it.data()->name );
if(! value.isNull()) {
- QVariant v(value);
- if( v.cast( it.data()->value.type() ) ) // preserve the QVariant's type
+ TQVariant v(value);
+ if( v.cast( it.data()->value.type() ) ) // preserve the TQVariant's type
d->scriptaction->setOption(it.data()->name, v);
}
}
@@ -295,7 +295,7 @@ KexiDB::SchemaData* KexiScriptDesignView::storeNewData(const KexiDB::SchemaData&
if(! storeData()) {
kdWarning() << "KexiScriptDesignView::storeNewData Failed to store the data." << endl;
//failure: remove object's schema data to avoid garbage
- KexiDB::Connection *conn = parentDialog()->mainWin()->project()->dbConnection();
+ KexiDB::Connection *conn = tqparentDialog()->mainWin()->project()->dbConnection();
conn->removeObject( s->id() );
delete s;
return 0;
@@ -306,28 +306,28 @@ KexiDB::SchemaData* KexiScriptDesignView::storeNewData(const KexiDB::SchemaData&
tristate KexiScriptDesignView::storeData(bool /*dontAsk*/)
{
- kexipluginsdbg << "KexiScriptDesignView::storeData(): " << parentDialog()->partItem()->name() << " [" << parentDialog()->id() << "]" << endl;
+ kexipluginsdbg << "KexiScriptDesignView::storeData(): " << tqparentDialog()->partItem()->name() << " [" << tqparentDialog()->id() << "]" << endl;
- QDomDocument domdoc("script");
- QDomElement scriptelem = domdoc.createElement("script");
+ TQDomDocument domdoc("script");
+ TQDomElement scriptelem = domdoc.createElement("script");
domdoc.appendChild(scriptelem);
- QString language = d->scriptaction->getInterpreterName();
+ TQString language = d->scriptaction->getInterpreterName();
scriptelem.setAttribute("language", language);
Kross::Api::InterpreterInfo* info = Kross::Api::Manager::scriptManager()->getInterpreterInfo(language);
if(info) {
Kross::Api::InterpreterInfo::Option::Map defoptions = info->getOptions();
- QMap<QString, QVariant>& options = d->scriptaction->getOptions();
- QMap<QString, QVariant>::ConstIterator it, end( options.constEnd() );
+ TQMap<TQString, TQVariant>& options = d->scriptaction->getOptions();
+ TQMap<TQString, TQVariant>::ConstIterator it, end( options.constEnd() );
for( it = options.constBegin(); it != end; ++it) {
- if( defoptions.contains(it.key()) ) { // only remember options which the InterpreterInfo knows about...
+ if( defoptions.tqcontains(it.key()) ) { // only remember options which the InterpreterInfo knows about...
scriptelem.setAttribute(it.key(), it.data().toString());
}
}
}
- QDomText scriptcode = domdoc.createTextNode(d->scriptaction->getCode());
+ TQDomText scriptcode = domdoc.createTextNode(d->scriptaction->getCode());
scriptelem.appendChild(scriptcode);
return storeDataBlock( domdoc.toString() );
diff --git a/kexi/plugins/scripting/kexiscripting/kexiscriptdesignview.h b/kexi/plugins/scripting/kexiscripting/kexiscriptdesignview.h
index cee1ed76..ac5240ed 100644
--- a/kexi/plugins/scripting/kexiscripting/kexiscriptdesignview.h
+++ b/kexi/plugins/scripting/kexiscripting/kexiscriptdesignview.h
@@ -46,13 +46,14 @@ namespace Kross { namespace Api {
class KexiScriptDesignView : public KexiViewBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor.
*/
- KexiScriptDesignView(KexiMainWindow *mainWin, QWidget *parent, Kross::Api::ScriptAction* scriptaction);
+ KexiScriptDesignView(KexiMainWindow *mainWin, TQWidget *tqparent, Kross::Api::ScriptAction* scriptaction);
/**
* Destructor.
diff --git a/kexi/plugins/scripting/kexiscripting/kexiscripteditor.cpp b/kexi/plugins/scripting/kexiscripting/kexiscripteditor.cpp
index a638af36..a6f2dfc1 100644
--- a/kexi/plugins/scripting/kexiscripting/kexiscripteditor.cpp
+++ b/kexi/plugins/scripting/kexiscripting/kexiscripteditor.cpp
@@ -41,8 +41,8 @@ class KexiScriptEditor::Private
Private() : scriptaction(0) {}
};
-KexiScriptEditor::KexiScriptEditor(KexiMainWindow *mainWin, QWidget *parent, const char *name)
- : KexiEditor(mainWin, parent, name)
+KexiScriptEditor::KexiScriptEditor(KexiMainWindow *mainWin, TQWidget *tqparent, const char *name)
+ : KexiEditor(mainWin, tqparent, name)
, d( new Private() )
{
}
@@ -62,13 +62,13 @@ void KexiScriptEditor::initialize(Kross::Api::ScriptAction* scriptaction)
d->scriptaction = scriptaction;
Q_ASSERT(d->scriptaction);
- disconnect(this, SIGNAL(textChanged()), this, SLOT(slotTextChanged()));
+ disconnect(this, TQT_SIGNAL(textChanged()), this, TQT_SLOT(slotTextChanged()));
- QString code = d->scriptaction->getCode();
+ TQString code = d->scriptaction->getCode();
if(code.isNull()) {
// If there is no code we just add some information.
///@todo remove after release
- code = "# " + QStringList::split("\n", i18n(
+ code = "# " + TQStringList::split("\n", i18n(
"This note will appear for a user in the script's source code "
"as a comment. Keep every row not longer than 60 characters and use '\n.'",
@@ -76,7 +76,7 @@ void KexiScriptEditor::initialize(Kross::Api::ScriptAction* scriptaction)
"support in Kexi. The scripting API may change in details\n"
"in the next Kexi version.\n"
"For more information and documentation see\n%1"
- ).arg("http://www.kexi-project.org/scripting/"), true).join("\n# ") + "\n";
+ ).tqarg("http://www.kexi-project.org/scripting/"), true).join("\n# ") + "\n";
}
KexiEditor::setText(code);
// We assume Kross and the HighlightingInterface are using same
@@ -85,7 +85,7 @@ void KexiScriptEditor::initialize(Kross::Api::ScriptAction* scriptaction)
clearUndoRedo();
KexiEditor::setDirty(false);
- connect(this, SIGNAL(textChanged()), this, SLOT(slotTextChanged()));
+ connect(this, TQT_SIGNAL(textChanged()), this, TQT_SLOT(slotTextChanged()));
}
void KexiScriptEditor::slotTextChanged()
diff --git a/kexi/plugins/scripting/kexiscripting/kexiscripteditor.h b/kexi/plugins/scripting/kexiscripting/kexiscripteditor.h
index 1ef02ff9..22415a7b 100644
--- a/kexi/plugins/scripting/kexiscripting/kexiscripteditor.h
+++ b/kexi/plugins/scripting/kexiscripting/kexiscripteditor.h
@@ -36,13 +36,14 @@ namespace Kross { namespace Api {
class KexiScriptEditor : public KexiEditor
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor.
*/
- KexiScriptEditor(KexiMainWindow *mainWin, QWidget *parent, const char *name = 0);
+ KexiScriptEditor(KexiMainWindow *mainWin, TQWidget *tqparent, const char *name = 0);
/**
* Destructor.
diff --git a/kexi/plugins/scripting/kexiscripting/kexiscriptpart.cpp b/kexi/plugins/scripting/kexiscripting/kexiscriptpart.cpp
index d650e958..b778bc75 100644
--- a/kexi/plugins/scripting/kexiscripting/kexiscriptpart.cpp
+++ b/kexi/plugins/scripting/kexiscripting/kexiscriptpart.cpp
@@ -44,8 +44,8 @@ class KexiScriptPart::Private
Kross::Api::ScriptGUIClient* scriptguiclient;
};
-KexiScriptPart::KexiScriptPart(QObject *parent, const char *name, const QStringList &l)
- : KexiPart::Part(parent, name, l)
+KexiScriptPart::KexiScriptPart(TQObject *tqparent, const char *name, const TQStringList &l)
+ : KexiPart::Part(tqparent, name, l)
, d( new Private() )
{
d->scriptguiclient = 0;
@@ -68,7 +68,7 @@ KexiScriptPart::~KexiScriptPart()
delete d;
}
-bool KexiScriptPart::execute(KexiPart::Item* item, QObject* sender)
+bool KexiScriptPart::execute(KexiPart::Item* item, TQObject* sender)
{
Q_UNUSED(sender);
@@ -88,21 +88,21 @@ bool KexiScriptPart::execute(KexiPart::Item* item, QObject* sender)
Kross::Api::ScriptAction* scriptaction = view->scriptAction();
if(scriptaction) {
- const QString dontAskAgainName = "askExecuteScript";
+ const TQString dontAskAgainName = "askExecuteScript";
KConfig* config = KGlobal::config();
- QString dontask = config->readEntry(dontAskAgainName).lower();
+ TQString dontask = config->readEntry(dontAskAgainName).lower();
bool exec = (dontask == "yes");
if( !exec && dontask != "no" ) {
exec = KMessageBox::warningContinueCancel(0,
- i18n("Do you want to execute the script \"%1\"?\n\nScripts obtained from unknown sources can contain dangerous code.").arg(scriptaction->text()),
+ i18n("Do you want to execute the script \"%1\"?\n\nScripts obtained from unknown sources can contain dangerous code.").tqarg(scriptaction->text()),
i18n("Execute Script?"), KGuiItem(i18n("Execute"), "exec"),
dontAskAgainName, KMessageBox::Notify | KMessageBox::Dangerous
) == KMessageBox::Continue;
}
if(exec) {
- //QTimer::singleShot(10, scriptaction, SLOT(activate()));
+ //TQTimer::singleShot(10, scriptaction, TQT_SLOT(activate()));
d->scriptguiclient->executeScriptAction( scriptaction );
}
}
@@ -124,12 +124,12 @@ void KexiScriptPart::initPartActions()
// scripting-plugin depends on this instance and loading the plugin will
// fail if it's not avaiable.
if(! Kross::Api::Manager::scriptManager()->hasChild("KexiMainWindow")) {
- Kross::Api::Manager::scriptManager()->addQObject(m_mainWin, "KexiMainWindow");
+ Kross::Api::Manager::scriptManager()->addTQObject(TQT_TQOBJECT(m_mainWin), "KexiMainWindow");
// Add the KAction's provided by the ScriptGUIClient to the
// KexiMainWindow.
//FIXME: fix+use createSharedPartAction() whyever it doesn't work as expected right now...
- QPopupMenu* popup = m_mainWin->findPopupMenu("tools");
+ TQPopupMenu* popup = m_mainWin->findPopupMenu("tools");
if(popup) {
KAction* execscriptaction = d->scriptguiclient->action("executescriptfile");
if(execscriptaction)
@@ -159,9 +159,9 @@ void KexiScriptPart::initInstanceActions()
createSharedAction(Kexi::DesignViewMode, i18n("Configure Editor..."), "configure", 0, "script_config_editor");
}
-KexiViewBase* KexiScriptPart::createView(QWidget *parent, KexiDialogBase* dialog, KexiPart::Item& item, int viewMode, QMap<QString,QString>*)
+KexiViewBase* KexiScriptPart::createView(TQWidget *tqparent, KexiDialogBase* dialog, KexiPart::Item& item, int viewMode, TQMap<TQString,TQString>*)
{
- QString partname = item.name();
+ TQString partname = item.name();
if( ! partname.isNull() ) {
KexiMainWindow *win = dialog->mainWin();
if(!win || !win->project() || !win->project()->dbConnection())
@@ -181,13 +181,13 @@ KexiViewBase* KexiScriptPart::createView(QWidget *parent, KexiDialogBase* dialog
}
if(viewMode == Kexi::DesignViewMode) {
- return new KexiScriptDesignView(win, parent, scriptaction);
+ return new KexiScriptDesignView(win, tqparent, scriptaction);
}
}
return 0;
}
-QString KexiScriptPart::i18nMessage(const QCString& englishMessage) const
+TQString KexiScriptPart::i18nMessage(const TQCString& englishMessage) const
{
if (englishMessage=="Design of object \"%1\" has been modified.")
return i18n("Design of script \"%1\" has been modified.");
diff --git a/kexi/plugins/scripting/kexiscripting/kexiscriptpart.h b/kexi/plugins/scripting/kexiscripting/kexiscriptpart.h
index ddba0d72..eca7a001 100644
--- a/kexi/plugins/scripting/kexiscripting/kexiscriptpart.h
+++ b/kexi/plugins/scripting/kexiscripting/kexiscriptpart.h
@@ -22,8 +22,8 @@
#ifndef KEXISCRIPTPART_H
#define KEXISCRIPTPART_H
-#include <qdom.h>
-#include <qcstring.h>
+#include <tqdom.h>
+#include <tqcstring.h>
#include <kexi.h>
#include <kexipart.h>
@@ -35,17 +35,18 @@
class KexiScriptPart : public KexiPart::Part
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor.
*
- * \param parent The parent QObject this part is child of.
+ * \param tqparent The tqparent TQObject this part is child of.
* \param name The name this part has.
* \param args Optional list of arguments passed to this part.
*/
- KexiScriptPart(QObject *parent, const char *name, const QStringList& args);
+ KexiScriptPart(TQObject *tqparent, const char *name, const TQStringList& args);
/**
* Destructor.
@@ -56,28 +57,28 @@ class KexiScriptPart : public KexiPart::Part
* Implementation of the \a KexiPart::Part::execute method used to
* execute the passed \p item instance.
*/
- virtual bool execute(KexiPart::Item* item, QObject* sender = 0);
+ virtual bool execute(KexiPart::Item* item, TQObject* sender = 0);
/**
* \return the i18n message for the passed \p englishMessage string.
*/
- virtual QString i18nMessage(const QCString& englishMessage) const;
+ virtual TQString i18nMessage(const TQCString& englishMessage) const;
protected:
/**
* Create a new view.
*
- * \param parent The parent QWidget the new view is displayed in.
+ * \param tqparent The tqparent TQWidget the new view is displayed in.
* \param dialog The \a KexiDialogBase the view is child of.
* \param item The \a KexiPart::Item this view is for.
* \param viewMode The viewmode we like to have a view for.
*/
- virtual KexiViewBase* createView(QWidget *parent,
+ virtual KexiViewBase* createView(TQWidget *tqparent,
KexiDialogBase* dialog,
KexiPart::Item& item,
int viewMode = Kexi::DesignViewMode,
- QMap<QString,QString>* staticObjectArgs = 0);
+ TQMap<TQString,TQString>* staticObjectArgs = 0);
/**
* Initialize the part's actions.
diff --git a/kexi/plugins/scripting/scripts/copycenter/CopyCenter.py b/kexi/plugins/scripting/scripts/copycenter/CopyCenter.py
index 3718512f..3a2734aa 100644
--- a/kexi/plugins/scripting/scripts/copycenter/CopyCenter.py
+++ b/kexi/plugins/scripting/scripts/copycenter/CopyCenter.py
@@ -89,14 +89,14 @@ def runGuiApp(copycenter, name):
#--------------------------------------------------------------------
class ListViewDialog(qt.QDialog):
- def __init__(self, parent, caption):
- qt.QDialog.__init__(self, parent, "ProgressDialog", 1)
- self.parent = parent
+ def __init__(self, tqparent, caption):
+ qt.QDialog.__init__(self, tqparent, "ProgressDialog", 1)
+ self.tqparent = tqparent
self.setCaption(caption)
- layout = qt.QVBoxLayout(self)
+ tqlayout = qt.QVBoxLayout(self)
box = qt.QVBox(self)
box.setMargin(2)
- layout.addWidget(box)
+ tqlayout.addWidget(box)
self.listview = qt.QListView(box)
self.listview.setAllColumnsShowFocus(True)
self.listview.header().setStretchEnabled(True,0)
@@ -124,9 +124,9 @@ def runGuiApp(copycenter, name):
#--------------------------------------------------------------------
class CopyJobWidget(qt.QVBox):
- def __init__(self,dialog,parent):
+ def __init__(self,dialog,tqparent):
self.dialog = dialog
- qt.QVBox.__init__(self,parent)
+ qt.QVBox.__init__(self,tqparent)
self.setSpacing(6)
typebox = qt.QHBox(self)
typebox.setSpacing(6)
@@ -165,7 +165,7 @@ def runGuiApp(copycenter, name):
def doubleClicked(self, **args):
print "CopyJobWidget.doubleClicked"
item = self.listview.selectedItem()
- if item and item.parent(): item.startRename(1)
+ if item and item.tqparent(): item.startRename(1)
def readOptions(self,domnode,plugininst):
print "CopyJobWidget.readOptions plugintype=\"%s\"" % plugininst.plugintype
@@ -210,13 +210,13 @@ def runGuiApp(copycenter, name):
if filename != "": self.jobfilecombobox.setCurrentText(filename)
def escape(self,s):
- return s.replace("&", "&amp;").replace("'", "&apos;").replace("<", "&lt;").replace(">", "&gt;").replace('"', "&quot;")
+ return s.tqreplace("&", "&amp;").tqreplace("'", "&apos;").tqreplace("<", "&lt;").tqreplace(">", "&gt;").tqreplace('"', "&quot;")
def writeOptions(self,writer,pluginname,plugininst):
print "CopyJobWidget.writeOptions"
writer.write("<%s plugin=\"%s\">\n" % (plugininst.plugintype, pluginname))
for optionname in plugininst.options:
- value = self.escape( unicode(plugininst.options[optionname]).encode("utf-8") )
+ value = self.escape( tqunicode(plugininst.options[optionname]).encode("utf-8") )
writer.write("\t<%s value=\"%s\" />\n" % (optionname,value))
writer.write("</%s>\n" % plugininst.plugintype)
@@ -238,19 +238,19 @@ def runGuiApp(copycenter, name):
f.close()
print "File \%s\" successfully written." % filename
- def addItem(self, pluginimpl, afteritem = None, parentitem = None):
+ def addItem(self, pluginimpl, afteritem = None, tqparentitem = None):
#print "CopyJobWidget.addItem"
class ListViewItem(qt.QListViewItem):
- def __init__(self, pluginimpl, listview, parentitem = None, afteritem = None):
+ def __init__(self, pluginimpl, listview, tqparentitem = None, afteritem = None):
self.pluginimpl = pluginimpl
- if parentitem == None:
+ if tqparentitem == None:
qt.QListViewItem.__init__(self,listview)
self.setOpen(True)
else:
if afteritem == None:
- qt.QListViewItem.__init__(self,parentitem)
+ qt.QListViewItem.__init__(self,tqparentitem)
else:
- qt.QListViewItem.__init__(self,parentitem,afteritem)
+ qt.QListViewItem.__init__(self,tqparentitem,afteritem)
self.setRenameEnabled(1,True)
def startRename(self, columnindex):
qt.QListViewItem.startRename(self,columnindex)
@@ -271,10 +271,10 @@ def runGuiApp(copycenter, name):
def text(self, columnindex):
if columnindex == 1:
- if qt.QListViewItem.text(self,0).contains("password"):
+ if qt.QListViewItem.text(self,0).tqcontains("password"):
return "*" * len(str(qt.QListViewItem.text(self,1)))
return qt.QListViewItem.text(self,columnindex)
- return ListViewItem(pluginimpl, self.listview, parentitem, afteritem)
+ return ListViewItem(pluginimpl, self.listview, tqparentitem, afteritem)
def updateItem(self,pluginname,pluginimpl):
#print "CopyJobWidget.updateItem"
@@ -309,31 +309,31 @@ def runGuiApp(copycenter, name):
self.starttime = None
qt.QDialog.__init__(self, dialog, "ProgressDialog", 1)
self.setCaption("Copying...")
- layout = qt.QVBoxLayout(self)
+ tqlayout = qt.QVBoxLayout(self)
box = qt.QVBox(self)
box.setSpacing(6)
box.setMargin(6)
- layout.addWidget(box)
+ tqlayout.addWidget(box)
self.textbrowser = qt.QTextBrowser(box)
self.textbrowser.setWordWrap(qt.QTextEdit.WidgetWidth)
self.textbrowser.setTextFormat(qt.Qt.RichText)
statusbox = qt.QFrame(box)
- layout = qt.QGridLayout(statusbox,4,2,0,2)
- layout.addWidget(qt.QLabel("Number of records done:",statusbox),0,0)
+ tqlayout = qt.QGridLayout(statusbox,4,2,0,2)
+ tqlayout.addWidget(qt.QLabel("Number of records done:",statusbox),0,0)
self.donecounter = 0
self.donelabel = qt.QLabel("-",statusbox)
- layout.addWidget(self.donelabel,0,1)
- layout.addWidget(qt.QLabel("Successfully copied records:",statusbox),1,0)
+ tqlayout.addWidget(self.donelabel,0,1)
+ tqlayout.addWidget(qt.QLabel("Successfully copied records:",statusbox),1,0)
self.successcounter = 0
self.successlabel = qt.QLabel("-",statusbox)
- layout.addWidget(self.successlabel,1,1)
- layout.addWidget(qt.QLabel("Failed to copy records:",statusbox),2,0)
+ tqlayout.addWidget(self.successlabel,1,1)
+ tqlayout.addWidget(qt.QLabel("Failed to copy records:",statusbox),2,0)
self.failedcounter = 0
self.failedlabel = qt.QLabel("-",statusbox)
- layout.addWidget(self.failedlabel,2,1)
- layout.addWidget(qt.QLabel("Elapsed time in seconds:",statusbox),3,0)
+ tqlayout.addWidget(self.failedlabel,2,1)
+ tqlayout.addWidget(qt.QLabel("Elapsed time in seconds:",statusbox),3,0)
self.elapsedlabel = qt.QLabel("-",statusbox)
- layout.addWidget(self.elapsedlabel,3,1)
+ tqlayout.addWidget(self.elapsedlabel,3,1)
btnbox = qt.QHBox(box)
btnbox.setSpacing(6)
self.donebtn = qt.QPushButton(btnbox)
@@ -359,11 +359,11 @@ def runGuiApp(copycenter, name):
def writeSuccess(self, record, rowcount):
self.donecounter += rowcount
self.successcounter += rowcount
- qt.qApp.processEvents()
+ qt.tqApp.processEvents()
def writeFailed(self, record):
self.donecounter += 1
self.failedcounter += 1
- qt.qApp.processEvents()
+ qt.tqApp.processEvents()
def startCopy(self):
try:
@@ -397,7 +397,7 @@ def runGuiApp(copycenter, name):
self.starttime.start()
self.updatetimer.start(500)
- qt.qApp.processEvents()
+ qt.tqApp.processEvents()
# Copy the records
self.textbrowser.append("<hr><i>Copy the records...</i>")
@@ -428,7 +428,7 @@ def runGuiApp(copycenter, name):
def show(self):
qt.QDialog.show(self)
qt.QTimer.singleShot(10,self.startCopy)
- qt.qApp.processEvents()
+ qt.tqApp.processEvents()
def closeEvent(self, closeevent):
if not self.dialog.getSourcePluginImpl().isFinished():
@@ -442,13 +442,13 @@ def runGuiApp(copycenter, name):
#--------------------------------------------------------------------
class DataSelector(qt.QVGroupBox):
- def __init__(self, plugintype, title, caption, parent, dialog, items):
+ def __init__(self, plugintype, title, caption, tqparent, dialog, items):
self.plugintype = plugintype
self.pluginimpl = None
self.dialog = dialog
self.mainbox = None
- qt.QVGroupBox.__init__(self,title,parent)
+ qt.QVGroupBox.__init__(self,title,tqparent)
self.setInsideMargin(6)
self.setInsideSpacing(0)
@@ -520,7 +520,7 @@ def runGuiApp(copycenter, name):
#--------------------------------------------------------------------
class Dialog(qt.QDialog):
- def __init__(self, copycenter, parent):
+ def __init__(self, copycenter, tqparent):
self.copycenter = copycenter
import qt
@@ -528,13 +528,13 @@ def runGuiApp(copycenter, name):
import sys
self.ListViewDialog = ListViewDialog
- qt.QDialog.__init__(self, parent, "Dialog", 1, qt.Qt.WDestructiveClose)
+ qt.QDialog.__init__(self, tqparent, "Dialog", 1, qt.Qt.WDestructiveClose)
self.setCaption("Copy Center")
- layout = qt.QVBoxLayout(self)
+ tqlayout = qt.QVBoxLayout(self)
box = qt.QVBox(self)
box.setMargin(6)
box.setSpacing(6)
- layout.addWidget(box)
+ tqlayout.addWidget(box)
self.tab = qt.QTabWidget(box)
self.tab.setMargin(6)
box.setStretchFactor(self.tab,1)
@@ -629,7 +629,7 @@ def runGuiApp(copycenter, name):
if name == "__main__":
qtapp = qt.QApplication(sys.argv)
else:
- qtapp = qt.qApp
+ qtapp = qt.tqApp
dialog = Dialog(copycenter, qtapp.mainWidget())
dialog.exec_loop()
diff --git a/kexi/plugins/scripting/scripts/copycenter/CopyCenterPluginKexiDB.py b/kexi/plugins/scripting/scripts/copycenter/CopyCenterPluginKexiDB.py
index e8241405..85023ee4 100644
--- a/kexi/plugins/scripting/scripts/copycenter/CopyCenterPluginKexiDB.py
+++ b/kexi/plugins/scripting/scripts/copycenter/CopyCenterPluginKexiDB.py
@@ -53,9 +53,9 @@ class CopyCenterPlugin:
def finish(self):
""" Called if reading is finished."""
self.connection.finish()
- def createWidget(self, dialog, parent):
+ def createWidget(self, dialog, tqparent):
""" Create and return a widget to modify the plugin settings. """
- return self.copycenterplugin.createWidget(dialog, self, parent)
+ return self.copycenterplugin.createWidget(dialog, self, tqparent)
class Source(Plugin):
""" Specialization of the Plugin class to implement the
@@ -196,7 +196,7 @@ class CopyCenterPlugin:
self.drivermanager = krosskexidb.DriverManager()
self.copycenter = copycenter
- def createWidget(self, dialog, plugin, parent):
+ def createWidget(self, dialog, plugin, tqparent):
""" Each plugin may provide a qt.QWidget back to the
CopyCenter.py. The widget will be used to configure our
plugin settings. """
@@ -208,12 +208,12 @@ class CopyCenterPlugin:
self.dialog = dialog
self.mainbox = None
class ProjectBox(qt.QHBox):
- def __init__(self,main,copycenterplugin,plugin,parent):
+ def __init__(self,main,copycenterplugin,plugin,tqparent):
self.main = main
self.copycenterplugin = copycenterplugin
self.plugin = plugin
- qt.QHBox.__init__(self,parent)
+ qt.QHBox.__init__(self,tqparent)
prjlabel = qt.QLabel("Project File:",self)
self.prjcombo = qt.QComboBox(self)
self.prjcombo.setEditable(True)
@@ -244,8 +244,8 @@ class CopyCenterPlugin:
if str(filename) != "": self.prjcombo.setCurrentText(str(filename))
class DriverBox(qt.QVBox):
- def __init__(self,main,parent):
- qt.QVBox.__init__(self,parent)
+ def __init__(self,main,tqparent):
+ qt.QVBox.__init__(self,tqparent)
self.main = main
self.copycenterplugin = main.copycenterplugin
self.plugin = main.plugin
@@ -364,8 +364,8 @@ class CopyCenterPlugin:
if str(filename) != "": self.sockfileedit.setText(str(filename))
class TableBox(qt.QHBox):
- def __init__(self,copycenterplugin,plugin,parent):
- qt.QHBox.__init__(self,parent)
+ def __init__(self,copycenterplugin,plugin,tqparent):
+ qt.QHBox.__init__(self,tqparent)
self.copycenterplugin = copycenterplugin
self.plugin = plugin
tablelabel = qt.QLabel("Table:",self)
@@ -405,8 +405,8 @@ class CopyCenterPlugin:
dialog.show()
class FieldBox(qt.QHBox):
- def __init__(self,copycenterplugin,plugin,parent):
- qt.QHBox.__init__(self,parent)
+ def __init__(self,copycenterplugin,plugin,tqparent):
+ qt.QHBox.__init__(self,tqparent)
self.copycenterplugin = copycenterplugin
self.plugin = plugin
self.tablename = ""
@@ -462,15 +462,15 @@ class CopyCenterPlugin:
self.fieldsbtn.setEnabled(False)
class MainBox(qt.QHBox):
- def __init__(self,copycenterplugin,plugin,parent):
- qt.QHBox.__init__(self,parent)
+ def __init__(self,copycenterplugin,plugin,tqparent):
+ qt.QHBox.__init__(self,tqparent)
self.copycenterplugin = copycenterplugin
self.plugin = plugin
- self.prjbox = ProjectBox(self,copycenterplugin,plugin,parent)
- self.driverbox = DriverBox(self,parent)
+ self.prjbox = ProjectBox(self,copycenterplugin,plugin,tqparent)
+ self.driverbox = DriverBox(self,tqparent)
- statusbar = qt.QHBox(parent)
+ statusbar = qt.QHBox(tqparent)
statusbar.setSpacing(2)
#self.statuslabel = qt.QLabel("Disconnected",statusbar)
#statusbar.setStretchFactor(self.statuslabel,1)
@@ -482,9 +482,9 @@ class CopyCenterPlugin:
self.disconnectbtn.setEnabled(False)
qt.QObject.connect(self.disconnectbtn, qt.SIGNAL("clicked()"),self.disconnectClicked)
- #self.connectionbox = ConnectionBox(copycenterplugin,plugin,parent)
- self.tablebox = TableBox(copycenterplugin,plugin,parent)
- self.fieldbox = FieldBox(copycenterplugin,plugin,parent)
+ #self.connectionbox = ConnectionBox(copycenterplugin,plugin,tqparent)
+ self.tablebox = TableBox(copycenterplugin,plugin,tqparent)
+ self.fieldbox = FieldBox(copycenterplugin,plugin,tqparent)
qt.QObject.connect(self.tablebox.tableedit, qt.SIGNAL("textChanged(const QString&)"), self.fieldbox.tableChanged)
if self.plugin.options['project'] != '':
@@ -499,7 +499,7 @@ class CopyCenterPlugin:
pass
if self.plugin.plugintype == "Destination":
- #typebox = qt.QHBox(parent)
+ #typebox = qt.QHBox(tqparent)
#label = qt.QLabel("Operation:",typebox)
#combobox = qt.QComboBox(typebox)
#combobox.insertItem("Append")
@@ -511,15 +511,15 @@ class CopyCenterPlugin:
#typebox.setStretchFactor(combobox,1)
pass
elif self.plugin.plugintype == "Source":
- wherebox = qt.QHBox(parent)
+ wherebox = qt.QHBox(tqparent)
wherelabel = qt.QLabel("Where:",wherebox)
self.whereedit = qt.QLineEdit(self.plugin.options['where'],wherebox)
- #orderbox = qt.QHBox(parent)
+ #orderbox = qt.QHBox(tqparent)
#orderlabel = qt.QLabel("Order By:",orderbox)
#orderedit = qt.QLineEdit("",orderbox)
- #errbox = qt.QHBox(parent)
+ #errbox = qt.QHBox(tqparent)
#errlabel = qt.QLabel("On Error:",errbox)
#errcombo = qt.QComboBox(errbox)
#errcombo.insertItem("Ask")
@@ -640,7 +640,7 @@ class CopyCenterPlugin:
pass
return ""
- mainbox = MainBox(self,plugin,parent)
+ mainbox = MainBox(self,plugin,tqparent)
plugin.widget = mainbox
return mainbox
diff --git a/kexi/plugins/scripting/scripts/copycenter/CopyCenterPluginQtSQL.py b/kexi/plugins/scripting/scripts/copycenter/CopyCenterPluginQtSQL.py
index 985d757d..de553b92 100644
--- a/kexi/plugins/scripting/scripts/copycenter/CopyCenterPluginQtSQL.py
+++ b/kexi/plugins/scripting/scripts/copycenter/CopyCenterPluginQtSQL.py
@@ -39,8 +39,8 @@ class CopyCenterPlugin:
def finish(self):
self.isfinished = True
self.widget.disconnectClicked()
- def createWidget(self,dialog,parent):
- return self.copycenterplugin.widget(dialog, self, parent)
+ def createWidget(self,dialog,tqparent):
+ return self.copycenterplugin.widget(dialog, self, tqparent)
class Source(Plugin):
plugintype = "Source"
@@ -84,7 +84,7 @@ class CopyCenterPlugin:
return None
record = []
for fieldname in self.fieldlist:
- record.append( unicode(self.cursor.value(fieldname).toString()).encode("latin-1") )
+ record.append( tqunicode(self.cursor.value(fieldname).toString()).encode("latin-1") )
#print "read record: %s" % record
return record
@@ -145,8 +145,8 @@ class CopyCenterPlugin:
cursorrecord.setValue(self.fieldlist[i], v)
rowcount = self.cursor.insert()
if rowcount < 1:
- drv = unicode(self.cursor.lastError().driverText()).encode("latin-1")
- db = unicode(self.cursor.lastError().databaseText()).encode("latin-1")
+ drv = tqunicode(self.cursor.lastError().driverText()).encode("latin-1")
+ db = tqunicode(self.cursor.lastError().databaseText()).encode("latin-1")
print "failed: %s %s" % (drv,db)
self.copierer.writeFailed(record)
else:
@@ -209,7 +209,7 @@ class CopyCenterPlugin:
""" Constructor. """
pass
- def widget(self,dialog,plugin,parent):
+ def widget(self,dialog,plugin,tqparent):
""" Each plugin may provide a qt.QWidget back to the
CopyCenter.py. The widget will be used to configure our
plugin settings. """
@@ -246,7 +246,7 @@ class CopyCenterPlugin:
class FieldsDialog(ListViewDialog):
def __init__(self, mainwidget):
- ListViewDialog.__init__(self,parent,"Fields")
+ ListViewDialog.__init__(self,tqparent,"Fields")
self.mainwidget = mainwidget
self.listview.setSelectionMode(qt.QListView.Multi)
self.listview.setSorting(-1)
@@ -280,14 +280,14 @@ class CopyCenterPlugin:
class MainWidget(qt.QHBox):
- def __init__(self,plugin,dialog,parent):
+ def __init__(self,plugin,dialog,tqparent):
import qt
import qtsql
- qt.QHBox.__init__(self,parent)
+ qt.QHBox.__init__(self,tqparent)
self.dialog = dialog
self.plugin = plugin
- self.connectionbox = qt.QVBox(parent)
+ self.connectionbox = qt.QVBox(tqparent)
self.connectionbox.setSpacing(2)
driverbox = qt.QHBox(self.connectionbox)
@@ -331,7 +331,7 @@ class CopyCenterPlugin:
dblabel.setBuddy(self.dbedit)
dbbox.setStretchFactor(self.dbedit,1)
- statusbar = qt.QHBox(parent)
+ statusbar = qt.QHBox(tqparent)
statusbar.setSpacing(2)
statusbar.setStretchFactor(qt.QWidget(statusbar),1)
self.connectbtn = qt.QPushButton("Connect",statusbar)
@@ -340,7 +340,7 @@ class CopyCenterPlugin:
self.disconnectbtn.setEnabled(False)
qt.QObject.connect(self.disconnectbtn, qt.SIGNAL("clicked()"),self.disconnectClicked)
- tablebox = qt.QHBox(parent)
+ tablebox = qt.QHBox(tqparent)
tablelabel = qt.QLabel("Table:",tablebox)
self.tableedit = qt.QLineEdit(self.plugin.options['table'],tablebox)
qt.QObject.connect(self.tableedit, qt.SIGNAL("textChanged(const QString&)"), self.tableEditChanged)
@@ -350,7 +350,7 @@ class CopyCenterPlugin:
tablelabel.setBuddy(self.tableedit)
tablebox.setStretchFactor(self.tableedit,1)
- fieldbox = qt.QHBox(parent)
+ fieldbox = qt.QHBox(tqparent)
fieldlabel = qt.QLabel("Fields:",fieldbox)
self.fieldedit = qt.QLineEdit(self.plugin.options['fields'],fieldbox)
self.fieldbtn = qt.QPushButton("...",fieldbox)
@@ -360,7 +360,7 @@ class CopyCenterPlugin:
fieldbox.setStretchFactor(self.fieldedit,1)
if self.plugin.plugintype == "Source":
- box = qt.QHBox(parent)
+ box = qt.QHBox(tqparent)
wherelabel = qt.QLabel("Where:",box)
self.whereedit = qt.QLineEdit(self.plugin.options['where'],box)
wherelabel.setBuddy(self.whereedit)
@@ -368,9 +368,9 @@ class CopyCenterPlugin:
elif self.plugin.plugintype == "Destination":
class OperationBox(qt.QVBox):
- def __init__(self, mainwidget, parent):
+ def __init__(self, mainwidget, tqparent):
self.mainwidget = mainwidget
- qt.QVBox.__init__(self, parent)
+ qt.QVBox.__init__(self, tqparent)
opbox = qt.QHBox(self)
operationlabel = qt.QLabel("Operation:",opbox)
self.mainwidget.operationedit = qt.QComboBox(opbox)
@@ -401,7 +401,7 @@ class CopyCenterPlugin:
1: showUpdate,
}[ self.mainwidget.operationedit.currentItem() ](self)
if self.box != None: self.box.show()
- OperationBox(self,parent)
+ OperationBox(self,tqparent)
def tableEditChanged(self,text):
if self.plugin.database != None and self.plugin.database.isOpen():
@@ -491,5 +491,5 @@ class CopyCenterPlugin:
print "database is closed now!"
self.updateConnectState()
- plugin.widget = MainWidget(plugin,self.dialog,parent)
+ plugin.widget = MainWidget(plugin,self.dialog,tqparent)
return plugin.widget
diff --git a/kexi/plugins/scripting/scripts/exportxhtml/ExportXHTML.py b/kexi/plugins/scripting/scripts/exportxhtml/ExportXHTML.py
index cace0340..9febfcdd 100644
--- a/kexi/plugins/scripting/scripts/exportxhtml/ExportXHTML.py
+++ b/kexi/plugins/scripting/scripts/exportxhtml/ExportXHTML.py
@@ -83,7 +83,7 @@ class HtmlExporter:
def htmlescape(self, text):
import string
- return string.replace(string.replace(string.replace(str(text),'&','&amp;'),'<','&lt;'),'>','&gt;')
+ return string.tqreplace(string.tqreplace(string.tqreplace(str(text),'&','&amp;'),'<','&lt;'),'>','&gt;')
def write(self, output, style):
name = self.datasource.name()
@@ -131,7 +131,7 @@ class HtmlExporter:
if items == None: break
output.write("<tr>")
for item in items:
- u = unicode(str(self.htmlescape(item)),"latin-1")
+ u = tqunicode(str(self.htmlescape(item)),"latin-1")
output.write("<td>%s</td>" % u.encode("utf-8"))
output.write("</tr>\n")
output.write("</table>\n")
diff --git a/kexi/plugins/scripting/scripts/importxhtml/ImportXHTML.py b/kexi/plugins/scripting/scripts/importxhtml/ImportXHTML.py
index 200b3dee..6ca94f9a 100755
--- a/kexi/plugins/scripting/scripts/importxhtml/ImportXHTML.py
+++ b/kexi/plugins/scripting/scripts/importxhtml/ImportXHTML.py
@@ -124,9 +124,9 @@ class SaxInput:
was parsed. """
if self.field != None:
- # the xml-data is unicode and we need to encode it
+ # the xml-data is tqunicode and we need to encode it
# to latin-1 cause KexiDB deals only with latin-1.
- u = unicode(chars[offset:offset+length])
+ u = tqunicode(chars[offset:offset+length])
self.field.append(u.encode("latin-1"))
# start the job
diff --git a/kexi/plugins/tables/kexilookupcolumnpage.cpp b/kexi/plugins/tables/kexilookupcolumnpage.cpp
index 9df92794..33e12d64 100644
--- a/kexi/plugins/tables/kexilookupcolumnpage.cpp
+++ b/kexi/plugins/tables/kexilookupcolumnpage.cpp
@@ -19,10 +19,10 @@
#include "kexilookupcolumnpage.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qheader.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqheader.h>
#include <kiconloader.h>
#include <klocale.h>
@@ -41,7 +41,7 @@
#include <koproperty/property.h>
#include <koproperty/utils.h>
-QString mimeTypeToType(const QString& mimeType)
+TQString mimeTypeToType(const TQString& mimeType)
{
if (mimeType=="kexi/table")
return "table";
@@ -51,7 +51,7 @@ QString mimeTypeToType(const QString& mimeType)
return mimeType;
}
-QString typeToMimeType(const QString& type)
+TQString typeToMimeType(const TQString& type)
{
if (type=="table")
return "kexi/table";
@@ -85,18 +85,18 @@ class KexiLookupColumnPage::Private
propertySet = aPropertySet;
}
- QVariant propertyValue(const QCString& propertyName) const {
- return propertySet ? propertySet->property(propertyName).value() : QVariant();
+ TQVariant propertyValue(const TQCString& propertyName) const {
+ return propertySet ? propertySet->property(propertyName).value() : TQVariant();
}
- void changeProperty(const QCString &property, const QVariant &value)
+ void changeProperty(const TQCString &property, const TQVariant &value)
{
if (!propertySetEnabled)
return;
propertySet->changeProperty(property, value);
}
- void updateInfoLabelForPropertySet(const QString& textToDisplayForNullSet) {
+ void updateInfoLabelForPropertySet(const TQString& textToDisplayForNullSet) {
KexiPropertyEditorView::updateInfoLabelForPropertySet(
objectInfoLabel, propertySet, textToDisplayForNullSet);
}
@@ -104,8 +104,8 @@ class KexiLookupColumnPage::Private
KexiDataSourceComboBox *rowSourceCombo;
KexiFieldComboBox *boundColumnCombo, *visibleColumnCombo;
KexiObjectInfoLabel *objectInfoLabel;
- QLabel *rowSourceLabel, *boundColumnLabel, *visibleColumnLabel;
- QToolButton *clearRowSourceButton, *gotoRowSourceButton, *clearBoundColumnButton,
+ TQLabel *rowSourceLabel, *boundColumnLabel, *visibleColumnLabel;
+ TQToolButton *clearRowSourceButton, *gotoRowSourceButton, *clearBoundColumnButton,
*clearVisibleColumnButton;
//! Used only in assignPropertySet() to check whether we already have the set assigned
int currentFieldUid;
@@ -117,18 +117,18 @@ class KexiLookupColumnPage::Private
private:
//! A property set that is displayed on the page.
//! The set is also updated after any change in this page's data.
- QGuardedPtr<KoProperty::Set> propertySet;
+ TQGuardedPtr<KoProperty::Set> propertySet;
};
//----------------------------------------------
-KexiLookupColumnPage::KexiLookupColumnPage(QWidget *parent)
- : QWidget(parent)
+KexiLookupColumnPage::KexiLookupColumnPage(TQWidget *tqparent)
+ : TQWidget(tqparent)
, d(new Private())
{
setName("KexiLookupColumnPage");
- QVBoxLayout *vlyr = new QVBoxLayout(this);
+ TQVBoxLayout *vlyr = new TQVBoxLayout(this);
d->objectInfoLabel = new KexiObjectInfoLabel(this, "KexiObjectInfoLabel");
vlyr->addWidget(d->objectInfoLabel);
@@ -136,30 +136,30 @@ KexiLookupColumnPage::KexiLookupColumnPage(QWidget *parent)
//todo d->noDataSourceAvailableMultiText = i18n("No data source could be assigned for multiple widgets.");
//-Row Source
- QWidget *contents = new QWidget(this);
+ TQWidget *contents = new TQWidget(this);
vlyr->addWidget(contents);
- QVBoxLayout *contentsVlyr = new QVBoxLayout(contents);
+ TQVBoxLayout *contentsVlyr = new TQVBoxLayout(contents);
- QHBoxLayout *hlyr = new QHBoxLayout(contentsVlyr);
- d->rowSourceLabel = new QLabel(i18n("Row source:"), contents);
- d->rowSourceLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
+ TQHBoxLayout *hlyr = new TQHBoxLayout(contentsVlyr);
+ d->rowSourceLabel = new TQLabel(i18n("Row source:"), contents);
+ d->rowSourceLabel->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed);
d->rowSourceLabel->setMargin(2);
d->rowSourceLabel->setMinimumHeight(IconSize(KIcon::Small)+4);
- d->rowSourceLabel->setAlignment(Qt::AlignLeft|Qt::AlignBottom);
+ d->rowSourceLabel->tqsetAlignment(TQt::AlignLeft|TQt::AlignBottom);
hlyr->addWidget(d->rowSourceLabel);
- d->gotoRowSourceButton = new KexiSmallToolButton(contents, QString::null, "goto", "gotoRowSourceButton");
+ d->gotoRowSourceButton = new KexiSmallToolButton(contents, TQString(), "goto", "gotoRowSourceButton");
d->gotoRowSourceButton->setMinimumHeight(d->rowSourceLabel->minimumHeight());
- QToolTip::add(d->gotoRowSourceButton, i18n("Go to selected row source"));
+ TQToolTip::add(d->gotoRowSourceButton, i18n("Go to selected row source"));
hlyr->addWidget(d->gotoRowSourceButton);
- connect(d->gotoRowSourceButton, SIGNAL(clicked()), this, SLOT(slotGotoSelectedRowSource()));
+ connect(d->gotoRowSourceButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotGotoSelectedRowSource()));
- d->clearRowSourceButton = new KexiSmallToolButton(contents, QString::null,
+ d->clearRowSourceButton = new KexiSmallToolButton(contents, TQString(),
"clear_left", "clearRowSourceButton");
d->clearRowSourceButton->setMinimumHeight(d->rowSourceLabel->minimumHeight());
- QToolTip::add(d->clearRowSourceButton, i18n("Clear row source"));
+ TQToolTip::add(d->clearRowSourceButton, i18n("Clear row source"));
hlyr->addWidget(d->clearRowSourceButton);
- connect(d->clearRowSourceButton, SIGNAL(clicked()), this, SLOT(clearRowSourceSelection()));
+ connect(d->clearRowSourceButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(clearRowSourceSelection()));
d->rowSourceCombo = new KexiDataSourceComboBox(contents, "rowSourceCombo");
d->rowSourceLabel->setBuddy(d->rowSourceCombo);
@@ -168,20 +168,20 @@ KexiLookupColumnPage::KexiLookupColumnPage(QWidget *parent)
contentsVlyr->addSpacing(8);
//- Bound Column
- hlyr = new QHBoxLayout(contentsVlyr);
- d->boundColumnLabel = new QLabel(i18n("Bound column:"), contents);
- d->boundColumnLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
+ hlyr = new TQHBoxLayout(contentsVlyr);
+ d->boundColumnLabel = new TQLabel(i18n("Bound column:"), contents);
+ d->boundColumnLabel->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed);
d->boundColumnLabel->setMargin(2);
d->boundColumnLabel->setMinimumHeight(IconSize(KIcon::Small)+4);
- d->boundColumnLabel->setAlignment(Qt::AlignLeft|Qt::AlignBottom);
+ d->boundColumnLabel->tqsetAlignment(TQt::AlignLeft|TQt::AlignBottom);
hlyr->addWidget(d->boundColumnLabel);
- d->clearBoundColumnButton = new KexiSmallToolButton(contents, QString::null,
+ d->clearBoundColumnButton = new KexiSmallToolButton(contents, TQString(),
"clear_left", "clearBoundColumnButton");
d->clearBoundColumnButton->setMinimumHeight(d->boundColumnLabel->minimumHeight());
- QToolTip::add(d->clearBoundColumnButton, i18n("Clear bound column"));
+ TQToolTip::add(d->clearBoundColumnButton, i18n("Clear bound column"));
hlyr->addWidget(d->clearBoundColumnButton);
- connect(d->clearBoundColumnButton, SIGNAL(clicked()), this, SLOT(clearBoundColumnSelection()));
+ connect(d->clearBoundColumnButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(clearBoundColumnSelection()));
d->boundColumnCombo = new KexiFieldComboBox(contents, "boundColumnCombo");
d->boundColumnLabel->setBuddy(d->boundColumnCombo);
@@ -190,20 +190,20 @@ KexiLookupColumnPage::KexiLookupColumnPage(QWidget *parent)
contentsVlyr->addSpacing(8);
//- Visible Column
- hlyr = new QHBoxLayout(contentsVlyr);
- d->visibleColumnLabel = new QLabel(i18n("Visible column:"), contents);
- d->visibleColumnLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
+ hlyr = new TQHBoxLayout(contentsVlyr);
+ d->visibleColumnLabel = new TQLabel(i18n("Visible column:"), contents);
+ d->visibleColumnLabel->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed);
d->visibleColumnLabel->setMargin(2);
d->visibleColumnLabel->setMinimumHeight(IconSize(KIcon::Small)+4);
- d->visibleColumnLabel->setAlignment(Qt::AlignLeft|Qt::AlignBottom);
+ d->visibleColumnLabel->tqsetAlignment(TQt::AlignLeft|TQt::AlignBottom);
hlyr->addWidget(d->visibleColumnLabel);
- d->clearVisibleColumnButton = new KexiSmallToolButton(contents, QString::null,
+ d->clearVisibleColumnButton = new KexiSmallToolButton(contents, TQString(),
"clear_left", "clearVisibleColumnButton");
d->clearVisibleColumnButton->setMinimumHeight(d->visibleColumnLabel->minimumHeight());
- QToolTip::add(d->clearVisibleColumnButton, i18n("Clear visible column"));
+ TQToolTip::add(d->clearVisibleColumnButton, i18n("Clear visible column"));
hlyr->addWidget(d->clearVisibleColumnButton);
- connect(d->clearVisibleColumnButton, SIGNAL(clicked()), this, SLOT(clearVisibleColumnSelection()));
+ connect(d->clearVisibleColumnButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(clearVisibleColumnSelection()));
d->visibleColumnCombo = new KexiFieldComboBox(contents, "visibleColumnCombo");
d->visibleColumnLabel->setBuddy(d->visibleColumnCombo);
@@ -211,11 +211,11 @@ KexiLookupColumnPage::KexiLookupColumnPage(QWidget *parent)
vlyr->addStretch(1);
- connect(d->rowSourceCombo, SIGNAL(textChanged(const QString &)),
- this, SLOT(slotRowSourceTextChanged(const QString &)));
- connect(d->rowSourceCombo, SIGNAL(dataSourceChanged()), this, SLOT(slotRowSourceChanged()));
- connect(d->boundColumnCombo, SIGNAL(selected()), this, SLOT(slotBoundColumnSelected()));
- connect(d->visibleColumnCombo, SIGNAL(selected()), this, SLOT(slotVisibleColumnSelected()));
+ connect(d->rowSourceCombo, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(slotRowSourceTextChanged(const TQString &)));
+ connect(d->rowSourceCombo, TQT_SIGNAL(dataSourceChanged()), this, TQT_SLOT(slotRowSourceChanged()));
+ connect(d->boundColumnCombo, TQT_SIGNAL(selected()), this, TQT_SLOT(slotBoundColumnSelected()));
+ connect(d->visibleColumnCombo, TQT_SIGNAL(selected()), this, TQT_SLOT(slotVisibleColumnSelected()));
clearBoundColumnSelection();
clearVisibleColumnSelection();
@@ -249,7 +249,7 @@ void KexiLookupColumnPage::assignPropertySet(KoProperty::Set* propertySet)
const bool hasRowSource = d->hasPropertySet() && !d->propertyValue("rowSourceType").isNull()
&& !d->propertyValue("rowSource").isNull();
- QString rowSource, rowSourceType;
+ TQString rowSource, rowSourceType;
if (hasRowSource) {
rowSourceType = typeToMimeType( d->propertyValue("rowSourceType").toString() );
rowSource = d->propertyValue("rowSource").toString();
@@ -274,7 +274,7 @@ void KexiLookupColumnPage::assignPropertySet(KoProperty::Set* propertySet)
void KexiLookupColumnPage::clearBoundColumnSelection()
{
d->boundColumnCombo->setCurrentText("");
- d->boundColumnCombo->setFieldOrExpression(QString::null);
+ d->boundColumnCombo->setFieldOrExpression(TQString());
slotBoundColumnSelected();
d->clearBoundColumnButton->setEnabled(false);
}
@@ -307,7 +307,7 @@ void KexiLookupColumnPage::slotBoundColumnSelected()
void KexiLookupColumnPage::clearVisibleColumnSelection()
{
d->visibleColumnCombo->setCurrentText("");
- d->visibleColumnCombo->setFieldOrExpression(QString::null);
+ d->visibleColumnCombo->setFieldOrExpression(TQString());
slotVisibleColumnSelected();
d->clearVisibleColumnButton->setEnabled(false);
}
@@ -329,9 +329,9 @@ void KexiLookupColumnPage::slotRowSourceChanged()
{
if (!d->rowSourceCombo->project())
return;
- QString mime = d->rowSourceCombo->selectedMimeType();
+ TQString mime = d->rowSourceCombo->selectedMimeType();
bool rowSourceFound = false;
- QString name = d->rowSourceCombo->selectedName();
+ TQString name = d->rowSourceCombo->selectedName();
if ((mime=="kexi/table" || mime=="kexi/query") && d->rowSourceCombo->isSelectionValid()) {
KexiDB::TableOrQuerySchema *tableOrQuery = new KexiDB::TableOrQuerySchema(
d->rowSourceCombo->project()->dbConnection(), name.latin1(), mime=="kexi/table");
@@ -372,7 +372,7 @@ void KexiLookupColumnPage::slotRowSourceChanged()
//! @todo update d->propertySet ^^
}
-void KexiLookupColumnPage::slotRowSourceTextChanged(const QString & string)
+void KexiLookupColumnPage::slotRowSourceTextChanged(const TQString & string)
{
Q_UNUSED(string);
const bool enable = d->rowSourceCombo->isSelectionValid();
@@ -398,7 +398,7 @@ void KexiLookupColumnPage::clearRowSourceSelection(bool alsoClearComboBox)
void KexiLookupColumnPage::slotGotoSelectedRowSource()
{
- QString mime = d->rowSourceCombo->selectedMimeType();
+ TQString mime = d->rowSourceCombo->selectedMimeType();
if (mime=="kexi/table" || mime=="kexi/query") {
if (d->rowSourceCombo->isSelectionValid())
emit jumpToObjectRequested(mime.latin1(), d->rowSourceCombo->selectedName().latin1());
diff --git a/kexi/plugins/tables/kexilookupcolumnpage.h b/kexi/plugins/tables/kexilookupcolumnpage.h
index 457b2e3d..f7b79bb2 100644
--- a/kexi/plugins/tables/kexilookupcolumnpage.h
+++ b/kexi/plugins/tables/kexilookupcolumnpage.h
@@ -19,7 +19,7 @@
#ifndef KEXILOOKUPCOLUMNPAGE_H
#define KEXILOOKUPCOLUMNPAGE_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kexidb/field.h>
#include <kexidb/utils.h>
#include <koproperty/set.h>
@@ -31,9 +31,9 @@ class KexiFieldComboBox;
class KexiFieldListView;
class KexiProject;
class KexiSmallToolButton;
-class QToolButton;
-class QLabel;
-class QFrame;
+class TQToolButton;
+class TQLabel;
+class TQFrame;
//! @short A page within table designer's property pane, providing lookup column editor.
/*! It's data model is basically KexiDB::LookupFieldSchema class, but the page does
@@ -42,12 +42,13 @@ class QFrame;
@todo not all features of KexiDB::LookupFieldSchema class are displayed on this page yet
*/
-class KexiLookupColumnPage : public QWidget
+class KexiLookupColumnPage : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiLookupColumnPage(QWidget *parent);
+ KexiLookupColumnPage(TQWidget *tqparent);
virtual ~KexiLookupColumnPage();
public slots:
@@ -61,14 +62,14 @@ class KexiLookupColumnPage : public QWidget
signals:
//! Signal emitted when helper button 'Go to selected row sourcesource' is clicked.
- void jumpToObjectRequested(const QCString& mime, const QCString& name);
+ void jumpToObjectRequested(const TQCString& mime, const TQCString& name);
// /*! Signal emitted when current bound column has been changed. */
-// void boundColumnChanged(const QString& string, const QString& caption,
+// void boundColumnChanged(const TQString& string, const TQString& caption,
// KexiDB::Field::Type type);
protected slots:
- void slotRowSourceTextChanged(const QString & string);
+ void slotRowSourceTextChanged(const TQString & string);
void slotRowSourceChanged();
void slotGotoSelectedRowSource();
void slotBoundColumnSelected();
@@ -78,7 +79,7 @@ class KexiLookupColumnPage : public QWidget
void updateBoundColumnWidgetsAvailability();
//! Used instead of m_propertySet->changeProperty() to honor m_propertySetEnabled
- void changeProperty(const QCString &property, const QVariant &value);
+ void changeProperty(const TQCString &property, const TQVariant &value);
private:
class Private;
diff --git a/kexi/plugins/tables/kexitabledesigner_dataview.cpp b/kexi/plugins/tables/kexitabledesigner_dataview.cpp
index bea2d9f5..2b0b3608 100644
--- a/kexi/plugins/tables/kexitabledesigner_dataview.cpp
+++ b/kexi/plugins/tables/kexitabledesigner_dataview.cpp
@@ -26,8 +26,8 @@
#include "kexidatatableview.h"
#include "keximainwindow.h"
-KexiTableDesigner_DataView::KexiTableDesigner_DataView(KexiMainWindow *win, QWidget *parent)
- : KexiDataTable(win, parent, "KexiTableDesigner_DataView", true/*db-aware*/)
+KexiTableDesigner_DataView::KexiTableDesigner_DataView(KexiMainWindow *win, TQWidget *tqparent)
+ : KexiDataTable(win, tqparent, "KexiTableDesigner_DataView", true/*db-aware*/)
{
}
@@ -73,7 +73,7 @@ tristate KexiTableDesigner_DataView::afterSwitchFrom(int mode)
KexiTablePart::TempData* KexiTableDesigner_DataView::tempData() const
{
- return static_cast<KexiTablePart::TempData*>(parentDialog()->tempData());
+ return static_cast<KexiTablePart::TempData*>(tqparentDialog()->tempData());
}
#include "kexitabledesigner_dataview.moc"
diff --git a/kexi/plugins/tables/kexitabledesigner_dataview.h b/kexi/plugins/tables/kexitabledesigner_dataview.h
index 59e84ab1..1a974fd8 100644
--- a/kexi/plugins/tables/kexitabledesigner_dataview.h
+++ b/kexi/plugins/tables/kexitabledesigner_dataview.h
@@ -26,9 +26,10 @@
class KexiTableDesigner_DataView : public KexiDataTable
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiTableDesigner_DataView(KexiMainWindow *win, QWidget *parent);
+ KexiTableDesigner_DataView(KexiMainWindow *win, TQWidget *tqparent);
virtual ~KexiTableDesigner_DataView();
diff --git a/kexi/plugins/tables/kexitabledesignercommands.cpp b/kexi/plugins/tables/kexitabledesignercommands.cpp
index ccbb181a..298363c4 100644
--- a/kexi/plugins/tables/kexitabledesignercommands.cpp
+++ b/kexi/plugins/tables/kexitabledesignercommands.cpp
@@ -16,12 +16,12 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
-#include <qdom.h>
-#include <qwidget.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qsplitter.h>
-#include <qmetaobject.h>
+#include <tqdom.h>
+#include <tqwidget.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqsplitter.h>
+#include <tqmetaobject.h>
#include <kdebug.h>
#include <klocale.h>
@@ -49,7 +49,7 @@ Command::~Command()
//--------------------------------------------------------
ChangeFieldPropertyCommand::ChangeFieldPropertyCommand( KexiTableDesignerView* view,
- const KoProperty::Set& set, const QCString& propertyName, const QVariant& oldValue, const QVariant& newValue,
+ const KoProperty::Set& set, const TQCString& propertyName, const TQVariant& oldValue, const TQVariant& newValue,
KoProperty::Property::ListData* const oldListData, KoProperty::Property::ListData* const newListData)
: Command(view)
, m_alterTableAction(
@@ -69,27 +69,27 @@ ChangeFieldPropertyCommand::~ChangeFieldPropertyCommand()
delete m_listData;
}
-QString ChangeFieldPropertyCommand::name() const
+TQString ChangeFieldPropertyCommand::name() const
{
return i18n("Change \"%1\" property for table field from \"%2\" to \"%3\"")
- .arg(m_alterTableAction.propertyName()).arg(m_oldValue.toString())
- .arg(m_alterTableAction.newValue().toString());
+ .tqarg(m_alterTableAction.propertyName()).tqarg(m_oldValue.toString())
+ .tqarg(m_alterTableAction.newValue().toString());
}
-QString ChangeFieldPropertyCommand::debugString()
+TQString ChangeFieldPropertyCommand::debugString()
{
- QString s( name() );
+ TQString s( name() );
if (m_oldListData || m_listData)
- s += QString("\nAnd list data from [%1]\n to [%2]")
- .arg( m_oldListData ?
- QString("%1 -> %2")
- .arg(m_oldListData->keysAsStringList().join(",")).arg(m_oldListData->names.join(","))
- : QString("<NONE>"))
- .arg( m_listData ?
- QString("%1 -> %2")
- .arg(m_listData->keysAsStringList().join(",")).arg(m_listData->names.join(","))
- : QString("<NONE>"));
- return s + QString(" (UID=%1)").arg(m_alterTableAction.uid());
+ s += TQString("\nAnd list data from [%1]\n to [%2]")
+ .tqarg( m_oldListData ?
+ TQString("%1 -> %2")
+ .tqarg(m_oldListData->keysAsStringList().join(",")).tqarg(m_oldListData->names.join(","))
+ : TQString("<NONE>"))
+ .tqarg( m_listData ?
+ TQString("%1 -> %2")
+ .tqarg(m_listData->keysAsStringList().join(",")).tqarg(m_listData->names.join(","))
+ : TQString("<NONE>"));
+ return s + TQString(" (UID=%1)").tqarg(m_alterTableAction.uid());
}
void ChangeFieldPropertyCommand::execute()
@@ -121,7 +121,7 @@ KexiDB::AlterTableHandler::ActionBase* ChangeFieldPropertyCommand::createAction(
RemoveFieldCommand::RemoveFieldCommand( KexiTableDesignerView* view, int fieldIndex,
const KoProperty::Set* set)
: Command(view)
- , m_alterTableAction( set ? (*set)["name"].value().toString() : QString::null,
+ , m_alterTableAction( set ? (*set)["name"].value().toString() : TQString(),
set ? (*set)["uid"].value().toInt() : -1 )
, m_set( set ? new KoProperty::Set(*set /*deep copy*/) : 0 )
, m_fieldIndex(fieldIndex)
@@ -133,12 +133,12 @@ RemoveFieldCommand::~RemoveFieldCommand()
delete m_set;
}
-QString RemoveFieldCommand::name() const
+TQString RemoveFieldCommand::name() const
{
if (m_set)
- return i18n("Remove table field \"%1\"").arg(m_alterTableAction.fieldName());
+ return i18n("Remove table field \"%1\"").tqarg(m_alterTableAction.fieldName());
- return QString("Remove empty row at position %1").arg(m_fieldIndex);
+ return TQString("Remove empty row at position %1").tqarg(m_fieldIndex);
}
void RemoveFieldCommand::execute()
@@ -154,14 +154,14 @@ void RemoveFieldCommand::unexecute()
m_view->insertField( m_fieldIndex, *m_set );
}
-QString RemoveFieldCommand::debugString()
+TQString RemoveFieldCommand::debugString()
{
if (!m_set)
return name();
- return name() + "\nAT ROW " + QString::number(m_fieldIndex)
+ return name() + "\nAT ROW " + TQString::number(m_fieldIndex)
+ ", FIELD: " + (*m_set)["caption"].value().toString()
- + QString(" (UID=%1)").arg(m_alterTableAction.uid());
+ + TQString(" (UID=%1)").tqarg(m_alterTableAction.uid());
}
KexiDB::AlterTableHandler::ActionBase* RemoveFieldCommand::createAction()
@@ -190,9 +190,9 @@ InsertFieldCommand::~InsertFieldCommand()
delete m_alterTableAction;
}
-QString InsertFieldCommand::name() const
+TQString InsertFieldCommand::name() const
{
- return i18n("Insert table field \"%1\"").arg(m_set["caption"].value().toString());
+ return i18n("Insert table field \"%1\"").tqarg(m_set["caption"].value().toString());
}
void InsertFieldCommand::execute()
@@ -213,7 +213,7 @@ KexiDB::AlterTableHandler::ActionBase* InsertFieldCommand::createAction()
//--------------------------------------------------------
ChangePropertyVisibilityCommand::ChangePropertyVisibilityCommand( KexiTableDesignerView* view,
- const KoProperty::Set& set, const QCString& propertyName, bool visible)
+ const KoProperty::Set& set, const TQCString& propertyName, bool visible)
: Command(view)
, m_alterTableAction(set.property("name").value().toString(), propertyName, visible, set["uid"].value().toInt())
// , m_fieldUID(set["uid"].value().toInt())
@@ -226,12 +226,12 @@ ChangePropertyVisibilityCommand::~ChangePropertyVisibilityCommand()
{
}
-QString ChangePropertyVisibilityCommand::name() const
+TQString ChangePropertyVisibilityCommand::name() const
{
- return QString("[internal] Change \"%1\" visibility from \"%2\" to \"%3\"")
- .arg(m_alterTableAction.propertyName())
- .arg(m_oldVisibility ? "true" : "false")
- .arg(m_alterTableAction.newValue().toBool() ? "true" : "false");
+ return TQString("[internal] Change \"%1\" visibility from \"%2\" to \"%3\"")
+ .tqarg(m_alterTableAction.propertyName())
+ .tqarg(m_oldVisibility ? "true" : "false")
+ .tqarg(m_alterTableAction.newValue().toBool() ? "true" : "false");
}
void ChangePropertyVisibilityCommand::execute()
@@ -263,9 +263,9 @@ InsertEmptyRowCommand::~InsertEmptyRowCommand()
{
}
-QString InsertEmptyRowCommand::name() const
+TQString InsertEmptyRowCommand::name() const
{
- return QString("Insert empty row at position %1").arg(m_row);
+ return TQString("Insert empty row at position %1").tqarg(m_row);
}
void InsertEmptyRowCommand::execute()
diff --git a/kexi/plugins/tables/kexitabledesignercommands.h b/kexi/plugins/tables/kexitabledesignercommands.h
index 355aabe2..1e6225e3 100644
--- a/kexi/plugins/tables/kexitabledesignercommands.h
+++ b/kexi/plugins/tables/kexitabledesignercommands.h
@@ -20,12 +20,12 @@
#ifndef KEXITABLEDESIGNER_COMMANDS_H
#define KEXITABLEDESIGNER_COMMANDS_H
-#include <qmap.h>
-#include <qdict.h>
-#include <qptrlist.h>
-#include <qptrdict.h>
-#include <qvariant.h>
-#include <qguardedptr.h>
+#include <tqmap.h>
+#include <tqdict.h>
+#include <tqptrlist.h>
+#include <tqptrdict.h>
+#include <tqvariant.h>
+#include <tqguardedptr.h>
#include <kcommand.h>
#include <kexidb/alter.h>
@@ -33,11 +33,11 @@
#include "kexitabledesignerview.h"
-class QWidget;
-class QRect;
-class QPoint;
-class QStringList;
-class QCString;
+class TQWidget;
+class TQRect;
+class TQPoint;
+class TQStringList;
+class TQCString;
namespace KexiTableDesignerCommands {
@@ -52,10 +52,10 @@ class Command : public KCommand
//! Can return 0 if the action should not be passed to AlterTableHandler
virtual KexiDB::AlterTableHandler::ActionBase* createAction() { return 0; }
- virtual QString debugString() { return name(); }
+ virtual TQString debugString() { return name(); }
protected:
- QGuardedPtr<KexiTableDesignerView> m_view;
+ TQGuardedPtr<KexiTableDesignerView> m_view;
};
//! @short Undo/redo command used for when changing a property for a table field
@@ -70,21 +70,21 @@ class ChangeFieldPropertyCommand : public Command
on execute() and unexecute().
*/
ChangeFieldPropertyCommand( KexiTableDesignerView* view,
- const KoProperty::Set& set, const QCString& propertyName,
- const QVariant& oldValue, const QVariant& newValue,
+ const KoProperty::Set& set, const TQCString& propertyName,
+ const TQVariant& oldValue, const TQVariant& newValue,
KoProperty::Property::ListData* const oldListData = 0, KoProperty::Property::ListData* const newListData = 0);
virtual ~ChangeFieldPropertyCommand();
- virtual QString name() const;
+ virtual TQString name() const;
virtual void execute();
virtual void unexecute();
virtual KexiDB::AlterTableHandler::ActionBase* createAction();
- virtual QString debugString();
+ virtual TQString debugString();
protected:
KexiDB::AlterTableHandler::ChangeFieldPropertyAction m_alterTableAction;
- QVariant m_oldValue;
+ TQVariant m_oldValue;
// int m_fieldUID;
KoProperty::Property::ListData* m_oldListData, *m_listData;
};
@@ -100,12 +100,12 @@ class RemoveFieldCommand : public Command
virtual ~RemoveFieldCommand();
- virtual QString name() const;
+ virtual TQString name() const;
virtual void execute();
virtual void unexecute();
virtual KexiDB::AlterTableHandler::ActionBase* createAction();
- virtual QString debugString();
+ virtual TQString debugString();
protected:
KexiDB::AlterTableHandler::RemoveFieldAction m_alterTableAction;
@@ -121,13 +121,13 @@ class InsertFieldCommand : public Command
int fieldIndex/*, const KexiDB::Field& field*/, const KoProperty::Set& set );
virtual ~InsertFieldCommand();
- virtual QString name() const;
+ virtual TQString name() const;
virtual void execute();
virtual void unexecute();
virtual KexiDB::AlterTableHandler::ActionBase* createAction();
- virtual QString debugString() {
- return name() + "\nAT ROW " + QString::number(m_alterTableAction->index()) //m_alterTableAction.index())
+ virtual TQString debugString() {
+ return name() + "\nAT ROW " + TQString::number(m_alterTableAction->index()) //m_alterTableAction.index())
+ ", FIELD: " + m_set["caption"].value().toString(); //m_alterTableAction.field().debugString();
}
@@ -150,12 +150,12 @@ class ChangePropertyVisibilityCommand : public Command
(it's invalid but allowed in design time).
*/
ChangePropertyVisibilityCommand( KexiTableDesignerView* view,
- const KoProperty::Set& set, const QCString& propertyName,
+ const KoProperty::Set& set, const TQCString& propertyName,
bool visible);
virtual ~ChangePropertyVisibilityCommand();
- virtual QString name() const;
+ virtual TQString name() const;
virtual void execute();
virtual void unexecute();
@@ -174,7 +174,7 @@ class InsertEmptyRowCommand : public Command
InsertEmptyRowCommand( KexiTableDesignerView* view, int row );
virtual ~InsertEmptyRowCommand();
- virtual QString name() const;
+ virtual TQString name() const;
virtual void execute();
virtual void unexecute();
diff --git a/kexi/plugins/tables/kexitabledesignerview.cpp b/kexi/plugins/tables/kexitabledesignerview.cpp
index 7e3478ed..a612453a 100644
--- a/kexi/plugins/tables/kexitabledesignerview.cpp
+++ b/kexi/plugins/tables/kexitabledesignerview.cpp
@@ -22,9 +22,9 @@
#include "kexilookupcolumnpage.h"
#include "kexitabledesignercommands.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qsplitter.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqsplitter.h>
#include <kiconloader.h>
#include <kdebug.h>
@@ -65,47 +65,47 @@
using namespace KexiTableDesignerCommands;
-//! @internal Used in tryCastQVariant() anf canCastQVariant()
-static bool isIntegerQVariant(QVariant::Type t)
+//! @internal Used in tryCastTQVariant() anf canCastTQVariant()
+static bool isIntegerTQVariant(TQVariant::Type t)
{
- return t==QVariant::LongLong
- || t==QVariant::ULongLong
- || t==QVariant::Int
- || t==QVariant::UInt;
+ return t==TQVariant::LongLong
+ || t==TQVariant::ULongLong
+ || t==TQVariant::Int
+ || t==TQVariant::UInt;
}
-//! @internal Used in tryCastQVariant()
-static bool canCastQVariant(QVariant::Type fromType, QVariant::Type toType)
+//! @internal Used in tryCastTQVariant()
+static bool canCastTQVariant(TQVariant::Type fromType, TQVariant::Type toType)
{
- return (fromType==QVariant::Int && toType==QVariant::UInt)
- || (fromType==QVariant::CString && toType==QVariant::String)
- || (fromType==QVariant::LongLong && toType==QVariant::ULongLong)
- || ((fromType==QVariant::String || fromType==QVariant::CString)
- && (isIntegerQVariant(toType) || toType==QVariant::Double));
+ return (fromType==TQVariant::Int && toType==TQVariant::UInt)
+ || (fromType==TQVariant::CString && toType==TQVariant::String)
+ || (fromType==TQVariant::LongLong && toType==TQVariant::ULongLong)
+ || ((fromType==TQVariant::String || fromType==TQVariant::CString)
+ && (isIntegerTQVariant(toType) || toType==TQVariant::Double));
}
/*! @internal
\return a variant value converted from \a fromVal to \a toType type.
- Null QVariant is returned if \a fromVal's type and \a toType type
+ Null TQVariant is returned if \a fromVal's type and \a toType type
are incompatible. */
-static QVariant tryCastQVariant( const QVariant& fromVal, QVariant::Type toType )
+static TQVariant tryCastTQVariant( const TQVariant& fromVal, TQVariant::Type toType )
{
- const QVariant::Type fromType = fromVal.type();
+ const TQVariant::Type fromType = fromVal.type();
if (fromType == toType)
return fromVal;
- if (canCastQVariant(fromType, toType) || canCastQVariant(toType, fromType)
- || (isIntegerQVariant(fromType) && toType==QVariant::Double))
+ if (canCastTQVariant(fromType, toType) || canCastTQVariant(toType, fromType)
+ || (isIntegerTQVariant(fromType) && toType==TQVariant::Double))
{
- QVariant res( fromVal );
+ TQVariant res( fromVal );
if (res.cast(toType))
return res;
}
- return QVariant();
+ return TQVariant();
}
-KexiTableDesignerView::KexiTableDesignerView(KexiMainWindow *win, QWidget *parent)
- : KexiDataTable(win, parent, "KexiTableDesignerView", false/*not db-aware*/)
+KexiTableDesignerView::KexiTableDesignerView(KexiMainWindow *win, TQWidget *tqparent)
+ : KexiDataTable(win, tqparent, "KexiTableDesignerView", false/*not db-aware*/)
, KexiTableDesignerInterface()
, d( new KexiTableDesignerViewPrivate(this) )
{
@@ -120,7 +120,7 @@ KexiTableDesignerView::KexiTableDesignerView(KexiMainWindow *win, QWidget *paren
d->data->setReadOnly(true);
d->data->setInsertingEnabled( false );
- KexiTableViewColumn *col = new KexiTableViewColumn("pk", KexiDB::Field::Text, QString::null,
+ KexiTableViewColumn *col = new KexiTableViewColumn("pk", KexiDB::Field::Text, TQString(),
i18n("Additional information about the field"));
col->setIcon( KexiUtils::colorizeIconToTextColor( SmallIcon("info"), d->view->palette() ) );
col->setHeaderTextVisible(false);
@@ -142,15 +142,15 @@ KexiTableDesignerView::KexiTableDesignerView(KexiMainWindow *win, QWidget *paren
#ifdef KEXI_NO_BLOB_FIELDS
//! @todo remove this later
- QValueVector<QString> types(KexiDB::Field::LastTypeGroup-1); //don't show last type (BLOB)
+ TQValueVector<TQString> types(KexiDB::Field::LastTypeGroup-1); //don't show last type (BLOB)
#else
- QValueVector<QString> types(KexiDB::Field::LastTypeGroup);
+ TQValueVector<TQString> types(KexiDB::Field::LastTypeGroup);
#endif
d->maxTypeNameTextWidth = 0;
- QFontMetrics fm(font());
+ TQFontMetrics fm(font());
for (uint i=1; i<=types.count(); i++) {
types[i-1] = KexiDB::Field::typeGroupName(i);
- d->maxTypeNameTextWidth = QMAX(d->maxTypeNameTextWidth, fm.width(types[i-1]));
+ d->maxTypeNameTextWidth = TQMAX(d->maxTypeNameTextWidth, fm.width(types[i-1]));
}
col->field()->setEnumHints(types);
@@ -159,46 +159,46 @@ KexiTableDesignerView::KexiTableDesignerView(KexiMainWindow *win, QWidget *paren
d->view->setSpreadSheetMode();
- connect(d->data, SIGNAL(aboutToChangeCell(KexiTableItem*,int,QVariant&,KexiDB::ResultInfo*)),
- this, SLOT(slotBeforeCellChanged(KexiTableItem*,int,QVariant&,KexiDB::ResultInfo*)));
- connect(d->data, SIGNAL(rowUpdated(KexiTableItem*)),
- this, SLOT(slotRowUpdated(KexiTableItem*)));
- //connect(d->data, SIGNAL(aboutToInsertRow(KexiTableItem*,KexiDB::ResultInfo*,bool)),
- // this, SLOT(slotAboutToInsertRow(KexiTableItem*,KexiDB::ResultInfo*,bool)));
- connect(d->data, SIGNAL(aboutToDeleteRow(KexiTableItem&,KexiDB::ResultInfo*,bool)),
- this, SLOT(slotAboutToDeleteRow(KexiTableItem&,KexiDB::ResultInfo*,bool)));
+ connect(d->data, TQT_SIGNAL(aboutToChangeCell(KexiTableItem*,int,TQVariant&,KexiDB::ResultInfo*)),
+ TQT_TQOBJECT(this), TQT_SLOT(slotBeforeCellChanged(KexiTableItem*,int,TQVariant&,KexiDB::ResultInfo*)));
+ connect(d->data, TQT_SIGNAL(rowUpdated(KexiTableItem*)),
+ TQT_TQOBJECT(this), TQT_SLOT(slotRowUpdated(KexiTableItem*)));
+ //connect(d->data, TQT_SIGNAL(aboutToInsertRow(KexiTableItem*,KexiDB::ResultInfo*,bool)),
+ // TQT_TQOBJECT(this), TQT_SLOT(slotAboutToInsertRow(KexiTableItem*,KexiDB::ResultInfo*,bool)));
+ connect(d->data, TQT_SIGNAL(aboutToDeleteRow(KexiTableItem&,KexiDB::ResultInfo*,bool)),
+ TQT_TQOBJECT(this), TQT_SLOT(slotAboutToDeleteRow(KexiTableItem&,KexiDB::ResultInfo*,bool)));
- setMinimumSize(d->view->minimumSizeHint().width(), d->view->minimumSizeHint().height());
+ setMinimumSize(d->view->tqminimumSizeHint().width(), d->view->tqminimumSizeHint().height());
d->view->setFocus();
d->sets = new KexiDataAwarePropertySet( this, d->view );
- connect(d->sets, SIGNAL(rowDeleted()), this, SLOT(updateActions()));
- connect(d->sets, SIGNAL(rowInserted()), this, SLOT(slotRowInserted()));
+ connect(d->sets, TQT_SIGNAL(rowDeleted()), TQT_TQOBJECT(this), TQT_SLOT(updateActions()));
+ connect(d->sets, TQT_SIGNAL(rowInserted()), TQT_TQOBJECT(this), TQT_SLOT(slotRowInserted()));
d->contextMenuTitle = new KPopupTitle(d->view->contextMenu());
d->view->contextMenu()->insertItem(d->contextMenuTitle, -1, 0);
- connect(d->view->contextMenu(), SIGNAL(aboutToShow()), this, SLOT(slotAboutToShowContextMenu()));
+ connect(d->view->contextMenu(), TQT_SIGNAL(aboutToShow()), TQT_TQOBJECT(this), TQT_SLOT(slotAboutToShowContextMenu()));
- plugSharedAction("tablepart_toggle_pkey", this, SLOT(slotTogglePrimaryKey()));
+ plugSharedAction("tablepart_toggle_pkey", TQT_TQOBJECT(this), TQT_SLOT(slotTogglePrimaryKey()));
d->action_toggle_pkey = static_cast<KToggleAction*>( sharedAction("tablepart_toggle_pkey") );
d->action_toggle_pkey->plug(d->view->contextMenu(), 1); //add at the beginning
d->view->contextMenu()->insertSeparator(2);
setAvailable("tablepart_toggle_pkey", !conn->isReadOnly());
#ifndef KEXI_NO_UNDOREDO_ALTERTABLE
- plugSharedAction("edit_undo", this, SLOT(slotUndo()));
- plugSharedAction("edit_redo", this, SLOT(slotRedo()));
+ plugSharedAction("edit_undo", TQT_TQOBJECT(this), TQT_SLOT(slotUndo()));
+ plugSharedAction("edit_redo", TQT_TQOBJECT(this), TQT_SLOT(slotRedo()));
setAvailable("edit_undo", false);
setAvailable("edit_redo", false);
- connect(d->history, SIGNAL(commandExecuted(KCommand*)), this, SLOT(slotCommandExecuted(KCommand*)));
+ connect(d->history, TQT_SIGNAL(commandExecuted(KCommand*)), TQT_TQOBJECT(this), TQT_SLOT(slotCommandExecuted(KCommand*)));
#endif
#ifdef KEXI_DEBUG_GUI
- KexiUtils::addAlterTableActionDebug(QString::null); //to create the tab
+ KexiUtils::addAlterTableActionDebug(TQString()); //to create the tab
KexiUtils::connectPushButtonActionForDebugWindow(
- "simulateAlterTableExecution", this, SLOT(slotSimulateAlterTableExecution()));
+ "simulateAlterTableExecution", TQT_TQOBJECT(this), TQT_SLOT(slotSimulateAlterTableExecution()));
KexiUtils::connectPushButtonActionForDebugWindow(
- "executeRealAlterTable", this, SLOT(executeRealAlterTable()));
+ "executeRealAlterTable", TQT_TQOBJECT(this), TQT_SLOT(executeRealAlterTable()));
#endif
}
@@ -284,7 +284,7 @@ void KexiTableDesignerView::initData()
//! Gets subtype strings and names for type \a fieldType
void
KexiTableDesignerView::getSubTypeListData(KexiDB::Field::TypeGroup fieldTypeGroup,
- QStringList& stringsList, QStringList& namesList)
+ TQStringList& stringsList, TQStringList& namesList)
{
/* disabled - "mime" is moved from subType to "objectType" custom property
if (fieldTypeGroup==KexiDB::Field::BLOBGroup) {
@@ -304,12 +304,12 @@ KexiTableDesignerView::getSubTypeListData(KexiDB::Field::TypeGroup fieldTypeGrou
KoProperty::Set *
KexiTableDesignerView::createPropertySet( int row, const KexiDB::Field& field, bool newOne )
{
- QString typeName = "KexiDB::Field::" + field.typeGroupString();
+ TQString typeName = "KexiDB::Field::" + field.typeGroupString();
KoProperty::Set *set = new KoProperty::Set(d->sets, typeName);
if (mainWin()->project()->dbConnection()->isReadOnly())
set->setReadOnly( true );
-// connect(buff,SIGNAL(propertyChanged(KexiPropertyBuffer&,KexiProperty&)),
-// this, SLOT(slotPropertyChanged(KexiPropertyBuffer&,KexiProperty&)));
+// connect(buff,TQT_SIGNAL(propertyChanged(KexiPropertyBuffer&,KexiProperty&)),
+// TQT_TQOBJECT(this), TQT_SLOT(slotPropertyChanged(KexiPropertyBuffer&,KexiProperty&)));
KoProperty::Property *prop;
@@ -325,58 +325,58 @@ KexiTableDesignerView::createPropertySet( int row, const KexiDB::Field& field, b
));
prop->setVisible(false);
set->addProperty(prop = new KoProperty::Property("this:useCaptionAsObjectName",
- QVariant(true, 1), QString::null)); //we want "caption" to be displayed in the header, not name
+ TQVariant(true, 1), TQString())); //we want "caption" to be displayed in the header, not name
prop->setVisible(false);
//name
set->addProperty(prop
- = new KoProperty::Property("name", QVariant(field.name()), i18n("Name"),
- QString::null, KexiCustomPropertyFactory::Identifier) );
+ = new KoProperty::Property("name", TQVariant(field.name()), i18n("Name"),
+ TQString(), KexiCustomPropertyFactory::Identifier) );
//type
set->addProperty( prop
- = new KoProperty::Property("type", QVariant(field.type()), i18n("Type")) );
+ = new KoProperty::Property("type", TQVariant(field.type()), i18n("Type")) );
#ifndef KexiTableDesignerView_DEBUG
prop->setVisible(false);//always hidden
#endif
//subtype
- QStringList typeStringList, typeNameList;
+ TQStringList typeStringList, typeNameList;
getSubTypeListData(field.typeGroup(), typeStringList, typeNameList);
/* disabled - "mime" is moved from subType to "objectType" custom property
- QString subTypeValue;
+ TQString subTypeValue;
if (field.typeGroup()==KexiDB::Field::BLOBGroup) {
// special case: BLOB type uses "mime-based" subtypes
//! @todo this should be retrieved from KexiDB::Field when BLOB supports many different mimetypes
subTypeValue = slist.first();
}
else {*/
- QString subTypeValue = field.typeString();
+ TQString subTypeValue = field.typeString();
//}
set->addProperty(prop = new KoProperty::Property("subType",
typeStringList, typeNameList, subTypeValue, i18n("Subtype")));
// objectType
- QStringList objectTypeStringList, objectTypeNameList;
+ TQStringList objectTypeStringList, objectTypeNameList;
//! @todo this should be retrieved from KexiDB::Field when BLOB supports many different mimetypes
objectTypeStringList << "image";
objectTypeNameList << i18n("Image object type", "Image");
- QString objectTypeValue( field.customProperty("objectType").toString() );
+ TQString objectTypeValue( field.customProperty("objectType").toString() );
if (objectTypeValue.isEmpty())
objectTypeValue = DEFAULT_OBJECT_TYPE_VALUE;
set->addProperty(prop = new KoProperty::Property("objectType",
objectTypeStringList, objectTypeNameList, objectTypeValue, i18n("Subtype")/*todo other i18n string?*/));
set->addProperty( prop
- = new KoProperty::Property("caption", QVariant(field.caption()), i18n("Caption") ) );
+ = new KoProperty::Property("caption", TQVariant(field.caption()), i18n("Caption") ) );
prop->setVisible(false);//always hidden
set->addProperty( prop
- = new KoProperty::Property("description", QVariant(field.description())) );
+ = new KoProperty::Property("description", TQVariant(field.description())) );
prop->setVisible(false);//always hidden
set->addProperty(prop
- = new KoProperty::Property("unsigned", QVariant(field.isUnsigned(), 4), i18n("Unsigned Number")));
+ = new KoProperty::Property("unsigned", TQVariant(field.isUnsigned(), 4), i18n("Unsigned Number")));
set->addProperty( prop
= new KoProperty::Property("length", (int)field.length()/*200?*/, i18n("Length")));
@@ -400,40 +400,40 @@ KexiTableDesignerView::createPropertySet( int row, const KexiDB::Field& field, b
set->addProperty( prop
= new KoProperty::Property("defaultValue", field.defaultValue(), i18n("Default Value"),
- QString::null,
+ TQString(),
//! @todo use "Variant" type here when supported by KoProperty
(KoProperty::PropertyType)field.variantType()) );
prop->setOption("3rdState", i18n("None"));
// prop->setVisible(false);
set->addProperty( prop
- = new KoProperty::Property("primaryKey", QVariant(field.isPrimaryKey(), 4), i18n("Primary Key")));
+ = new KoProperty::Property("primaryKey", TQVariant(field.isPrimaryKey(), 4), i18n("Primary Key")));
prop->setIcon("key");
set->addProperty( prop
- = new KoProperty::Property("unique", QVariant(field.isUniqueKey(), 4), i18n("Unique")));
+ = new KoProperty::Property("unique", TQVariant(field.isUniqueKey(), 4), i18n("Unique")));
set->addProperty( prop
- = new KoProperty::Property("notNull", QVariant(field.isNotNull(), 4), i18n("Required")));
+ = new KoProperty::Property("notNull", TQVariant(field.isNotNull(), 4), i18n("Required")));
set->addProperty( prop
- = new KoProperty::Property("allowEmpty", QVariant(!field.isNotEmpty(), 4), i18n("Allow Zero\nSize")));
+ = new KoProperty::Property("allowEmpty", TQVariant(!field.isNotEmpty(), 4), i18n("Allow Zero\nSize")));
set->addProperty( prop
- = new KoProperty::Property("autoIncrement", QVariant(field.isAutoIncrement(), 4), i18n("Autonumber")));
+ = new KoProperty::Property("autoIncrement", TQVariant(field.isAutoIncrement(), 4), i18n("Autonumber")));
prop->setIcon("autonumber");
set->addProperty( prop
- = new KoProperty::Property("indexed", QVariant(field.isIndexed(), 4), i18n("Indexed")));
+ = new KoProperty::Property("indexed", TQVariant(field.isIndexed(), 4), i18n("Indexed")));
//- properties related to lookup columns (used and set by the "lookup column" tab in the property pane)
KexiDB::LookupFieldSchema *lookupFieldSchema = field.table() ? field.table()->lookupFieldSchema(field) : 0;
set->addProperty( prop = new KoProperty::Property("rowSource",
- lookupFieldSchema ? lookupFieldSchema->rowSource().name() : QString::null, i18n("Row Source")));
+ lookupFieldSchema ? lookupFieldSchema->rowSource().name() : TQString(), i18n("Row Source")));
prop->setVisible(false);
set->addProperty( prop = new KoProperty::Property("rowSourceType",
- lookupFieldSchema ? lookupFieldSchema->rowSource().typeName() : QString::null, i18n("Row Source\nType")));
+ lookupFieldSchema ? lookupFieldSchema->rowSource().typeName() : TQString(), i18n("Row Source\nType")));
prop->setVisible(false);
set->addProperty( prop
@@ -456,8 +456,8 @@ KexiTableDesignerView::createPropertySet( int row, const KexiDB::Field& field, b
//----
d->updatePropertiesVisibility(field.type(), *set);
- connect(set, SIGNAL(propertyChanged(KoProperty::Set&, KoProperty::Property&)),
- this, SLOT(slotPropertyChanged(KoProperty::Set&, KoProperty::Property&)));
+ connect(set, TQT_SIGNAL(propertyChanged(KoProperty::Set&, KoProperty::Property&)),
+ TQT_TQOBJECT(this), TQT_SLOT(slotPropertyChanged(KoProperty::Set&, KoProperty::Property&)));
d->sets->insert(row, set, newOne);
return set;
@@ -491,15 +491,15 @@ void KexiTableDesignerView::slotTogglePrimaryKey()
return;
KoProperty::Set &set = *propertySet();
bool isSet = !set["primaryKey"].value().toBool();
- set.changeProperty("primaryKey", QVariant(isSet,1)); //this will update all related properties as well
+ set.changeProperty("primaryKey", TQVariant(isSet,1)); //this will update all related properties as well
/* CommandGroup *setPrimaryKeyCommand;
if (isSet) {
setPrimaryKeyCommand = new CommandGroup(i18n("Set primary key for field \"%1\"")
- .arg(set["name"].value().toString()) );
+ .tqarg(set["name"].value().toString()) );
}
else {
setPrimaryKeyCommand = new CommandGroup(i18n("Unset primary key for field \"%1\"")
- .arg(set["name"].value().toString()) );
+ .tqarg(set["name"].value().toString()) );
}
switchPrimaryKey(set, isSet, false, setPrimaryKeyCommand);*/
//addHistoryCommand( setPrimaryKeyCommand, false /* !execute */ );
@@ -510,17 +510,17 @@ void KexiTableDesignerView::switchPrimaryKey(KoProperty::Set &propertySet,
bool set, bool aWasPKey, CommandGroup* commandGroup)
{
const bool was_pkey = aWasPKey || propertySet["primaryKey"].value().toBool();
-// propertySet["primaryKey"] = QVariant(set, 1);
- d->setPropertyValueIfNeeded( propertySet, "primaryKey", QVariant(set,1), commandGroup );
+// propertySet["primaryKey"] = TQVariant(set, 1);
+ d->setPropertyValueIfNeeded( propertySet, "primaryKey", TQVariant(set,1), commandGroup );
if (&propertySet==this->propertySet()) {
//update action and icon @ column 0 (only if we're changing current property set)
d->action_toggle_pkey->setChecked(set);
if (d->view->selectedItem()) {
//show key in the table
- d->view->data()->clearRowEditBuffer();
- d->view->data()->updateRowEditBuffer(d->view->selectedItem(), COLUMN_ID_ICON,
- QVariant(set ? "key" : ""));
- d->view->data()->saveRowChanges(*d->view->selectedItem(), true);
+ d->view->KexiDataAwareObjectInterface::data()->clearRowEditBuffer();
+ d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(d->view->selectedItem(), COLUMN_ID_ICON,
+ TQVariant(set ? "key" : ""));
+ d->view->KexiDataAwareObjectInterface::data()->saveRowChanges(*d->view->selectedItem(), true);
}
if (was_pkey || set) //change flag only if we're setting pk or really clearing it
d->primaryKeyExists = set;
@@ -537,31 +537,31 @@ void KexiTableDesignerView::switchPrimaryKey(KoProperty::Set &propertySet,
break;
}
if (i<count) {//remove
- //(*s)["autoIncrement"] = QVariant(false, 0);
- d->setPropertyValueIfNeeded( *s, "autoIncrement", QVariant(false,0), commandGroup );
- //(*s)["primaryKey"] = QVariant(false, 0);
- d->setPropertyValueIfNeeded( *s, "primaryKey", QVariant(false,0), commandGroup );
+ //(*s)["autoIncrement"] = TQVariant(false, 0);
+ d->setPropertyValueIfNeeded( *s, "autoIncrement", TQVariant(false,0), commandGroup );
+ //(*s)["primaryKey"] = TQVariant(false, 0);
+ d->setPropertyValueIfNeeded( *s, "primaryKey", TQVariant(false,0), commandGroup );
//remove key from table
- d->view->data()->clearRowEditBuffer();
+ d->view->KexiDataAwareObjectInterface::data()->clearRowEditBuffer();
KexiTableItem *item = d->view->itemAt(i);
if (item) {
- d->view->data()->updateRowEditBuffer(item, COLUMN_ID_ICON, QVariant());
- d->view->data()->saveRowChanges(*item, true);
+ d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(item, COLUMN_ID_ICON, TQVariant());
+ d->view->KexiDataAwareObjectInterface::data()->saveRowChanges(*item, true);
}
}
//set unsigned big-integer type
-// d->view->data()->saveRowChanges(*d->view->selectedItem());
+// d->view->KexiDataAwareObjectInterface::data()->saveRowChanges(*d->view->selectedItem());
d->slotBeforeCellChanged_enabled = false;
- d->view->data()->clearRowEditBuffer();
- d->view->data()->updateRowEditBuffer(d->view->selectedItem(), COLUMN_ID_TYPE,
- QVariant(KexiDB::Field::IntegerGroup-1/*counting from 0*/));
-// QVariant(KexiDB::Field::typeGroupName(KexiDB::Field::IntegerGroup)));
- d->view->data()->saveRowChanges(*d->view->selectedItem(), true);
+ d->view->KexiDataAwareObjectInterface::data()->clearRowEditBuffer();
+ d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(d->view->selectedItem(), COLUMN_ID_TYPE,
+ TQVariant(KexiDB::Field::IntegerGroup-1/*counting from 0*/));
+// TQVariant(KexiDB::Field::typeGroupName(KexiDB::Field::IntegerGroup)));
+ d->view->KexiDataAwareObjectInterface::data()->saveRowChanges(*d->view->selectedItem(), true);
//propertySet["subType"] = KexiDB::Field::typeString(KexiDB::Field::BigInteger);
d->setPropertyValueIfNeeded( propertySet, "subType", KexiDB::Field::typeString(KexiDB::Field::BigInteger),
commandGroup );
- //propertySet["unsigned"] = QVariant(true,4);
- d->setPropertyValueIfNeeded( propertySet, "unsigned", QVariant(true,4), commandGroup );
+ //propertySet["unsigned"] = TQVariant(true,4);
+ d->setPropertyValueIfNeeded( propertySet, "unsigned", TQVariant(true,4), commandGroup );
/*todo*/
d->slotBeforeCellChanged_enabled = true;
}
@@ -588,13 +588,13 @@ tristate KexiTableDesignerView::beforeSwitchTo(int mode, bool &dontStore)
else */
tristate res = true;
if (mode==Kexi::DataViewMode) {
- if (!dirty() && parentDialog()->neverSaved()) {
+ if (!dirty() && tqparentDialog()->neverSaved()) {
KMessageBox::sorry(this, i18n("Cannot switch to data view, because table design is empty.\n"
"First, please create your design.") );
return cancelled;
}
//<temporary>
- else if (dirty() && !parentDialog()->neverSaved()) {
+ else if (dirty() && !tqparentDialog()->neverSaved()) {
// cancelled = (KMessageBox::No == KMessageBox::questionYesNo(this, i18n("Saving changes for existing table design is not yet supported.\nDo you want to discard your changes now?")));
// KexiDB::Connection *conn = mainWin()->project()->dbConnection();
@@ -602,8 +602,8 @@ tristate KexiTableDesignerView::beforeSwitchTo(int mode, bool &dontStore)
int r = KMessageBox::warningYesNoCancel(this,
i18n("Saving changes for existing table design is now required.")
+ "\n" + d->messageForSavingChanges(emptyTable, /* skip warning? */!isPhysicalAlteringNeeded()),
- QString::null,
- KStdGuiItem::save(), KStdGuiItem::discard(), QString::null,
+ TQString(),
+ KStdGuiItem::save(), KStdGuiItem::discard(), TQString(),
KMessageBox::Notify|KMessageBox::Dangerous);
if (r == KMessageBox::Cancel)
res = cancelled;
@@ -655,7 +655,7 @@ void KexiTableDesignerView::removeCurrentPropertySet()
*/
void KexiTableDesignerView::slotBeforeCellChanged(
- KexiTableItem *item, int colnum, QVariant& newValue, KexiDB::ResultInfo* /*result*/)
+ KexiTableItem *item, int colnum, TQVariant& newValue, KexiDB::ResultInfo* /*result*/)
{
if (!d->slotBeforeCellChanged_enabled)
return;
@@ -666,14 +666,14 @@ void KexiTableDesignerView::slotBeforeCellChanged(
//if 'type' is not filled yet
if (item->at(COLUMN_ID_TYPE).isNull()) {
//auto select 1st row of 'type' column
- d->view->data()->updateRowEditBuffer(item, COLUMN_ID_TYPE, QVariant((int)0));
+ d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(item, COLUMN_ID_TYPE, TQVariant((int)0));
}
KoProperty::Set *propertySetForItem = d->sets->findPropertySetForItem(*item);
if (propertySetForItem) {
d->addHistoryCommand_in_slotPropertyChanged_enabled = false; //because we'll add the two changes as one KMacroCommand
- QString oldName( propertySetForItem->property("name").value().toString() );
- QString oldCaption( propertySetForItem->property("caption").value().toString() );
+ TQString oldName( propertySetForItem->property("name").value().toString() );
+ TQString oldCaption( propertySetForItem->property("caption").value().toString() );
//we need to create the action now as set["name"] will be changed soon..
ChangeFieldPropertyCommand *changeCaptionCommand
@@ -687,8 +687,8 @@ void KexiTableDesignerView::slotBeforeCellChanged(
//remember this action containing 2 subactions
CommandGroup *changeCaptionAndNameCommand = new CommandGroup(
i18n("Change \"%1\" field's name to \"%2\" and caption from \"%3\" to \"%4\"")
- .arg(oldName).arg(propertySetForItem->property("name").value().toString())
- .arg(oldCaption).arg(newValue.toString() ));
+ .tqarg(oldName).tqarg(propertySetForItem->property("name").value().toString())
+ .tqarg(oldCaption).tqarg(newValue.toString() ));
changeCaptionAndNameCommand->addCommand( changeCaptionCommand );
// new ChangeFieldPropertyCommand( this, *propertySetForItem,
// "caption", oldCaption, newValue)
@@ -706,9 +706,9 @@ void KexiTableDesignerView::slotBeforeCellChanged(
if (newValue.isNull()) {
//'type' col will be cleared: clear all other columns as well
d->slotBeforeCellChanged_enabled = false;
- d->view->data()->updateRowEditBuffer(item, COLUMN_ID_ICON, QVariant());
- d->view->data()->updateRowEditBuffer(item, COLUMN_ID_CAPTION, QVariant(QString::null));
- d->view->data()->updateRowEditBuffer(item, COLUMN_ID_DESC, QVariant());
+ d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(item, COLUMN_ID_ICON, TQVariant());
+ d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(item, COLUMN_ID_CAPTION, TQVariant(TQString()));
+ d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(item, COLUMN_ID_DESC, TQVariant());
d->slotBeforeCellChanged_enabled = true;
return;
}
@@ -741,10 +741,10 @@ void KexiTableDesignerView::slotBeforeCellChanged(
// set["subType"] = KexiDB::Field::typeName(fieldType);
//-get subtypes for this type: keys (slist) and names (nlist)
- QStringList slist, nlist;
+ TQStringList slist, nlist;
getSubTypeListData(fieldTypeGroup, slist, nlist);
- QString subTypeValue;
+ TQString subTypeValue;
/* disabled - "mime" is moved from subType to "objectType" custom property
if (fieldType==KexiDB::Field::BLOB) {
// special case: BLOB type uses "mime-based" subtypes
@@ -759,7 +759,7 @@ void KexiTableDesignerView::slotBeforeCellChanged(
// *** this action contains subactions ***
CommandGroup *changeDataTypeCommand = new CommandGroup(
i18n("Change data type for field \"%1\" to \"%2\"")
- .arg(set["name"].value().toString()).arg( KexiDB::Field::typeName( fieldType ) ) );
+ .tqarg(set["name"].value().toString()).tqarg( KexiDB::Field::typeName( fieldType ) ) );
//kexipluginsdbg << "++++++++++" << slist << nlist << endl;
@@ -780,9 +780,9 @@ void KexiTableDesignerView::slotBeforeCellChanged(
// notNull and defaultValue=false is reasonable for boolean type
if (fieldType == KexiDB::Field::Boolean) {
//! @todo maybe this is good for other data types as well?
- d->setPropertyValueIfNeeded( set, "notNull", QVariant(true, 1), changeDataTypeCommand,
+ d->setPropertyValueIfNeeded( set, "notNull", TQVariant(true, 1), changeDataTypeCommand,
false /*!forceAddCommand*/, false /*!rememberOldValue*/);
- d->setPropertyValueIfNeeded( set, "defaultValue", QVariant(false, 1), changeDataTypeCommand,
+ d->setPropertyValueIfNeeded( set, "defaultValue", TQVariant(false, 1), changeDataTypeCommand,
false /*!forceAddCommand*/, false /*!rememberOldValue*/);
}
@@ -797,10 +797,10 @@ void KexiTableDesignerView::slotBeforeCellChanged(
//primary keys require big int, so if selected type is not integer- remove PK
if (fieldTypeGroup != KexiDB::Field::IntegerGroup) {
/*not needed, line below will do the work
- d->view->data()->updateRowEditBuffer(item, COLUMN_ID_ICON, QVariant());
- d->view->data()->saveRowChanges(*item); */
- //set["primaryKey"] = QVariant(false, 1);
- d->setPropertyValueIfNeeded( set, "primaryKey", QVariant(false, 1), changeDataTypeCommand );
+ d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(item, COLUMN_ID_ICON, TQVariant());
+ d->view->KexiDataAwareObjectInterface::data()->saveRowChanges(*item); */
+ //set["primaryKey"] = TQVariant(false, 1);
+ d->setPropertyValueIfNeeded( set, "primaryKey", TQVariant(false, 1), changeDataTypeCommand );
//! @todo should we display (passive?) dialog informing about cleared pkey?
}
}
@@ -822,7 +822,7 @@ void KexiTableDesignerView::slotBeforeCellChanged(
if (!propertySetForItem)
return;
//update field desc.
- QVariant oldValue((*propertySetForItem)["description"].value());
+ TQVariant oldValue((*propertySetForItem)["description"].value());
kexipluginsdbg << oldValue << endl;
propertySetForItem->changeProperty("description", newValue);
/*moved addHistoryCommand(
@@ -833,7 +833,7 @@ void KexiTableDesignerView::slotBeforeCellChanged(
void KexiTableDesignerView::slotRowUpdated(KexiTableItem *item)
{
- const int row = d->view->data()->findRef(item);
+ const int row = d->view->KexiDataAwareObjectInterface::data()->tqfindRef(item);
if (row < 0)
return;
@@ -841,7 +841,7 @@ void KexiTableDesignerView::slotRowUpdated(KexiTableItem *item)
//-check if the row was empty before updating
//if yes: we want to add a property set for this new row (field)
- QString fieldCaption( item->at(COLUMN_ID_CAPTION).toString() );
+ TQString fieldCaption( item->at(COLUMN_ID_CAPTION).toString() );
const bool prop_set_allowed = !item->at(COLUMN_ID_TYPE).isNull();
if (!prop_set_allowed && d->sets->at(row)/*propertySet()*/) {
@@ -849,10 +849,10 @@ void KexiTableDesignerView::slotRowUpdated(KexiTableItem *item)
d->sets->remove( row ); //d->sets->removeCurrentPropertySet();
//clear 'type' column:
- d->view->data()->clearRowEditBuffer();
-// d->view->data()->updateRowEditBuffer(d->view->selectedItem(), COLUMN_ID_TYPE, QVariant());
- d->view->data()->updateRowEditBuffer(item, COLUMN_ID_TYPE, QVariant());
- d->view->data()->saveRowChanges(*item);
+ d->view->KexiDataAwareObjectInterface::data()->clearRowEditBuffer();
+// d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(d->view->selectedItem(), COLUMN_ID_TYPE, TQVariant());
+ d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(item, COLUMN_ID_TYPE, TQVariant());
+ d->view->KexiDataAwareObjectInterface::data()->saveRowChanges(*item);
} else if (prop_set_allowed && !d->sets->at(row)/*propertySet()*/) {
//-- create a new field:
@@ -862,10 +862,10 @@ void KexiTableDesignerView::slotRowUpdated(KexiTableItem *item)
if (intFieldType==0)
return;
- QString description( item->at(COLUMN_ID_DESC).toString() );
+ TQString description( item->at(COLUMN_ID_DESC).toString() );
//todo: check uniqueness:
- QString fieldName( KexiUtils::string2Identifier(fieldCaption) );
+ TQString fieldName( KexiUtils::string2Identifier(fieldCaption) );
KexiDB::Field::Type fieldType = KexiDB::intToFieldType( intFieldType );
KexiDB::Field field( //tmp
@@ -875,7 +875,7 @@ void KexiTableDesignerView::slotRowUpdated(KexiTableItem *item)
KexiDB::Field::NoOptions,
/*length*/0,
/*precision*/0,
- /*defaultValue*/QVariant(),
+ /*defaultValue*/TQVariant(),
fieldCaption,
description,
/*width*/0);
@@ -884,7 +884,7 @@ void KexiTableDesignerView::slotRowUpdated(KexiTableItem *item)
// reasonable case for boolean type: set notNull flag and "false" as default value
if (fieldType == KexiDB::Field::Boolean) {
field.setNotNull( true );
- field.setDefaultValue( QVariant(false, 0) );
+ field.setDefaultValue( TQVariant(false, 0) );
}
kexipluginsdbg << "KexiTableDesignerView::slotRowUpdated(): " << field.debugString() << endl;
@@ -894,7 +894,7 @@ void KexiTableDesignerView::slotRowUpdated(KexiTableItem *item)
//moved
//add a special property indicating that this is brand new buffer,
//not just changed
-// KoProperty::Property* prop = new KoProperty::Property("newrow", QVariant());
+// KoProperty::Property* prop = new KoProperty::Property("newrow", TQVariant());
// prop->setVisible(false);
// newbuff->addProperty( prop );
@@ -922,7 +922,7 @@ void KexiTableDesignerView::slotPropertyChanged(KoProperty::Set& set, KoProperty
{
// if (!d->slotPropertyChanged_enabled)
// return;
- const QCString pname = property.name();
+ const TQCString pname = property.name();
kexipluginsdbg << "KexiTableDesignerView::slotPropertyChanged(): " << pname << " = " << property.value()
<< " (oldvalue = " << property.oldValue() << ")" << endl;
@@ -951,11 +951,11 @@ void KexiTableDesignerView::slotPropertyChanged(KoProperty::Set& set, KoProperty
CommandGroup *toplevelCommand = 0;
if (pname=="autoIncrement" && property.value().toBool()==true) {
if (set["primaryKey"].value().toBool()==false) {//we need PKEY here!
- QString msg = QString("<p>")
+ TQString msg = TQString("<p>")
+i18n("Setting autonumber requires primary key to be set for current field.")+"</p>";
if (d->primaryKeyExists)
- msg += (QString("<p>")+ i18n("Previous primary key will be removed.")+"</p>");
- msg += (QString("<p>")
+ msg += (TQString("<p>")+ i18n("Previous primary key will be removed.")+"</p>");
+ msg += (TQString("<p>")
+i18n("Do you want to create primary key for current field? "
"Click \"Cancel\" to cancel setting autonumber.")+"</p>");
@@ -968,17 +968,17 @@ void KexiTableDesignerView::slotPropertyChanged(KoProperty::Set& set, KoProperty
//switchPrimaryKey(set, true);
// this will be toplevel command
setAutonumberCommand = new CommandGroup(
- i18n("Assign autonumber for field \"%1\"").arg(set["name"].value().toString()) );
+ i18n("Assign autonumber for field \"%1\"").tqarg(set["name"].value().toString()) );
toplevelCommand = setAutonumberCommand;
- d->setPropertyValueIfNeeded( set, "autoIncrement", QVariant(true,1), setAutonumberCommand );
+ d->setPropertyValueIfNeeded( set, "autoIncrement", TQVariant(true,1), setAutonumberCommand );
}
else {
setAutonumberCommand = new CommandGroup(
- i18n("Remove autonumber from field \"%1\"").arg(set["name"].value().toString()) );
+ i18n("Remove autonumber from field \"%1\"").tqarg(set["name"].value().toString()) );
//d->slotPropertyChanged_enabled = false;
-// set["autoIncrement"].setValue( QVariant(false,1), false/*don't save old*/);
+// set["autoIncrement"].setValue( TQVariant(false,1), false/*don't save old*/);
// d->slotPropertyChanged_enabled = true;
- d->setPropertyValueIfNeeded( set, "autoIncrement", QVariant(false,1), setAutonumberCommand,
+ d->setPropertyValueIfNeeded( set, "autoIncrement", TQVariant(false,1), setAutonumberCommand,
true /*forceAddCommand*/, false/*rememberOldValue*/ );
addHistoryCommand( setAutonumberCommand, false /* !execute */ );
return;
@@ -995,12 +995,12 @@ void KexiTableDesignerView::slotPropertyChanged(KoProperty::Set& set, KoProperty
setPrimaryKey = false;
// this will be toplevel command
CommandGroup *unsetIndexedOrUniquOrNotNullCommand = new CommandGroup(
- i18n("Set \"%1\" property for field \"%2\"").arg(property.caption()).arg(set["name"].value().toString()) );
+ i18n("Set \"%1\" property for field \"%2\"").tqarg(property.caption()).tqarg(set["name"].value().toString()) );
toplevelCommand = unsetIndexedOrUniquOrNotNullCommand;
- d->setPropertyValueIfNeeded( set, pname, QVariant(false,1), unsetIndexedOrUniquOrNotNullCommand );
+ d->setPropertyValueIfNeeded( set, pname, TQVariant(false,1), unsetIndexedOrUniquOrNotNullCommand );
if (pname=="notNull") {
-//? d->setPropertyValueIfNeeded( set, "notNull", QVariant(true,1), unsetIndexedOrUniquOrNotNullCommand );
- d->setPropertyValueIfNeeded( set, "unique", QVariant(false,1), unsetIndexedOrUniquOrNotNullCommand );
+//? d->setPropertyValueIfNeeded( set, "notNull", TQVariant(true,1), unsetIndexedOrUniquOrNotNullCommand );
+ d->setPropertyValueIfNeeded( set, "unique", TQVariant(false,1), unsetIndexedOrUniquOrNotNullCommand );
}
}
@@ -1021,11 +1021,11 @@ void KexiTableDesignerView::slotPropertyChanged(KoProperty::Set& set, KoProperty
}
KexiDB::Field::Type type = KexiDB::intToFieldType( set["type"].value().toInt() );
- QString typeName;
+ TQString typeName;
/* disabled - "mime" is moved from subType to "objectType" custom property
if (type==KexiDB::Field::BLOB) { //special case
//find i18n'd text
- QStringList stringsList, namesList;
+ TQStringList stringsList, namesList;
getSubTypeListData(KexiDB::Field::BLOBGroup, stringsList, namesList);
const int stringIndex = stringsList.findIndex( property.value().toString() );
if (-1 == stringIndex || stringIndex>=(int)namesList.count())
@@ -1040,8 +1040,8 @@ void KexiTableDesignerView::slotPropertyChanged(KoProperty::Set& set, KoProperty
// kdDebug() << set["type"].value() << endl;
// if (KexiDB::Field::typeGroup( set["type"].value().toInt() ) == (int)KexiDB::Field::TextGroup) {
CommandGroup* changeFieldTypeCommand = new CommandGroup(
- i18n("Change type for field \"%1\" to \"%2\"").arg(set["name"].value().toString())
- .arg(typeName) );
+ i18n("Change type for field \"%1\" to \"%2\"").tqarg(set["name"].value().toString())
+ .tqarg(typeName) );
d->setPropertyValueIfNeeded( set, "subType", property.value(), property.oldValue(),
changeFieldTypeCommand );
@@ -1050,8 +1050,8 @@ void KexiTableDesignerView::slotPropertyChanged(KoProperty::Set& set, KoProperty
set["type"].setValue( newType );
// cast "defaultValue" property value to a new type
- QVariant oldDefVal( set["defaultValue"].value() );
- QVariant newDefVal( tryCastQVariant(oldDefVal, KexiDB::Field::variantType(type)) );
+ TQVariant oldDefVal( set["defaultValue"].value() );
+ TQVariant newDefVal( tryCastTQVariant(oldDefVal, KexiDB::Field::variantType(type)) );
if (oldDefVal.type()!=newDefVal.type())
set["defaultValue"].setType( newDefVal.type() );
d->setPropertyValueIfNeeded( set, "defaultValue", newDefVal, newDefVal,
@@ -1085,25 +1085,25 @@ void KexiTableDesignerView::slotPropertyChanged(KoProperty::Set& set, KoProperty
//this action contains subactions
CommandGroup *setPrimaryKeyCommand = new CommandGroup(
i18n("Set primary key for field \"%1\"")
- .arg(set["name"].value().toString()) );
+ .tqarg(set["name"].value().toString()) );
if (toplevelCommand)
toplevelCommand->addCommand( setPrimaryKeyCommand );
else
toplevelCommand = setPrimaryKeyCommand;
- d->setPropertyValueIfNeeded( set, "primaryKey", QVariant(true,1), setPrimaryKeyCommand, true /*forceAddCommand*/ );
- d->setPropertyValueIfNeeded( set, "unique", QVariant(true,1), setPrimaryKeyCommand );
- d->setPropertyValueIfNeeded( set, "notNull", QVariant(true,1), setPrimaryKeyCommand );
- d->setPropertyValueIfNeeded( set, "allowEmpty", QVariant(false,1), setPrimaryKeyCommand );
- d->setPropertyValueIfNeeded( set, "indexed", QVariant(true,1), setPrimaryKeyCommand );
+ d->setPropertyValueIfNeeded( set, "primaryKey", TQVariant(true,1), setPrimaryKeyCommand, true /*forceAddCommand*/ );
+ d->setPropertyValueIfNeeded( set, "unique", TQVariant(true,1), setPrimaryKeyCommand );
+ d->setPropertyValueIfNeeded( set, "notNull", TQVariant(true,1), setPrimaryKeyCommand );
+ d->setPropertyValueIfNeeded( set, "allowEmpty", TQVariant(false,1), setPrimaryKeyCommand );
+ d->setPropertyValueIfNeeded( set, "indexed", TQVariant(true,1), setPrimaryKeyCommand );
//! \todo: add setting for this: "Integer PKeys have autonumber set by default"
- d->setPropertyValueIfNeeded( set, "autoIncrement", QVariant(true,1), setPrimaryKeyCommand );
+ d->setPropertyValueIfNeeded( set, "autoIncrement", TQVariant(true,1), setPrimaryKeyCommand );
-/* set["unique"] = QVariant(true,1);
- set["notNull"] = QVariant(true,1);
- set["allowEmpty"] = QVariant(false,1);
- set["indexed"] = QVariant(true,1);
- set["autoIncrement"] = QVariant(true,1);*/
+/* set["unique"] = TQVariant(true,1);
+ set["notNull"] = TQVariant(true,1);
+ set["allowEmpty"] = TQVariant(false,1);
+ set["indexed"] = TQVariant(true,1);
+ set["autoIncrement"] = TQVariant(true,1);*/
// d->addHistoryCommand_in_slotPropertyChanged_enabled = prev_addHistoryCommand_in_slotPropertyChanged_enabled;
//down addHistoryCommand( toplevelCommand, false /* !execute */ );
}
@@ -1111,15 +1111,15 @@ void KexiTableDesignerView::slotPropertyChanged(KoProperty::Set& set, KoProperty
//remember this action containing 2 subactions
CommandGroup *setPrimaryKeyCommand = new CommandGroup(
i18n("Unset primary key for field \"%1\"")
- .arg(set["name"].value().toString()) );
+ .tqarg(set["name"].value().toString()) );
if (toplevelCommand)
toplevelCommand->addCommand( setPrimaryKeyCommand );
else
toplevelCommand = setPrimaryKeyCommand;
- d->setPropertyValueIfNeeded( set, "primaryKey", QVariant(false,1), setPrimaryKeyCommand, true /*forceAddCommand*/ );
- d->setPropertyValueIfNeeded( set, "autoIncrement", QVariant(false,1), setPrimaryKeyCommand );
-// set["autoIncrement"] = QVariant(false,1);
+ d->setPropertyValueIfNeeded( set, "primaryKey", TQVariant(false,1), setPrimaryKeyCommand, true /*forceAddCommand*/ );
+ d->setPropertyValueIfNeeded( set, "autoIncrement", TQVariant(false,1), setPrimaryKeyCommand );
+// set["autoIncrement"] = TQVariant(false,1);
//down addHistoryCommand( toplevelCommand, false /* !execute */ );
}
@@ -1147,15 +1147,15 @@ void KexiTableDesignerView::slotRowInserted()
}
void KexiTableDesignerView::slotAboutToDeleteRow(
- KexiTableItem& item, KexiDB::ResultInfo* result, bool repaint)
+ KexiTableItem& item, KexiDB::ResultInfo* result, bool tqrepaint)
{
Q_UNUSED(result)
- Q_UNUSED(repaint)
+ Q_UNUSED(tqrepaint)
if (item[COLUMN_ID_ICON].toString()=="key")
d->primaryKeyExists = false;
if (d->addHistoryCommand_in_slotAboutToDeleteRow_enabled) {
- const int row = d->view->data()->findRef(&item);
+ const int row = d->view->KexiDataAwareObjectInterface::data()->tqfindRef(&item);
KoProperty::Set *set = row >=0 ? d->sets->at(row) : 0;
//set can be 0 here, what means "removing empty row"
addHistoryCommand(
@@ -1169,17 +1169,17 @@ KexiDB::Field * KexiTableDesignerView::buildField( const KoProperty::Set &set )
{
//create a map of property values
kexipluginsdbg << set["type"].value() << endl;
- QMap<QCString, QVariant> values = KoProperty::propertyValues(set);
+ TQMap<TQCString, TQVariant> values = KoProperty::propertyValues(set);
//remove internal values, to avoid creating custom field's properties
- QMap<QCString, QVariant>::Iterator it = values.begin();
+ TQMap<TQCString, TQVariant>::Iterator it = values.begin();
KexiDB::Field *field = new KexiDB::Field();
while (it!=values.end()) {
- const QString propName( it.key() );
- if (d->internalPropertyNames.find(propName.latin1()) || propName.startsWith("this:")
+ const TQString propName( it.key() );
+ if (d->internalPropertyNames.tqfind(propName.latin1()) || propName.startsWith("this:")
|| (/*sanity*/propName=="objectType" && KexiDB::Field::BLOB != KexiDB::intToFieldType( set["type"].value().toInt() )))
{
- QMap<QCString, QVariant>::Iterator it_tmp = it;
+ TQMap<TQCString, TQVariant>::Iterator it_tmp = it;
++it;
values.remove(it_tmp);
}
@@ -1213,8 +1213,8 @@ tristate KexiTableDesignerView::buildSchema(KexiDB::TableSchema &schema, bool be
"for creating relations between database tables. "
"Do you want to add primary key automatically now?</p>"
"<p>If you want to add a primary key by hand, press \"Cancel\" "
- "to cancel saving table design.</p>").arg(schema.name()),
- QString::null, KGuiItem(i18n("&Add Primary Key"), "key"), KStdGuiItem::no(),
+ "to cancel saving table design.</p>").tqarg(schema.name()),
+ TQString(), KGuiItem(i18n("&Add Primary Key"), "key"), KStdGuiItem::no(),
"autogeneratePrimaryKeysOnTableDesignSaving");
if (questionRes==KMessageBox::Cancel) {
return cancelled;
@@ -1223,15 +1223,15 @@ tristate KexiTableDesignerView::buildSchema(KexiDB::TableSchema &schema, bool be
//-find unique name, starting with, "id", "id2", ....
int i=0;
int idIndex = 1; //means "id"
- QString pkFieldName("id%1");
- QString pkFieldCaption(i18n("Identifier%1", "Id%1"));
+ TQString pkFieldName("id%1");
+ TQString pkFieldCaption(i18n("Identifier%1", "Id%1"));
while (i<(int)d->sets->size()) {
KoProperty::Set *set = d->sets->at(i);
if (set) {
if ((*set)["name"].value().toString()
- == pkFieldName.arg(idIndex==1?QString::null : QString::number(idIndex))
+ == pkFieldName.tqarg(idIndex==1?TQString() : TQString::number(idIndex))
|| (*set)["caption"].value().toString()
- == pkFieldCaption.arg(idIndex==1?QString::null : QString::number(idIndex)))
+ == pkFieldCaption.tqarg(idIndex==1?TQString() : TQString::number(idIndex)))
{
//try next id index
i = 0;
@@ -1241,16 +1241,16 @@ tristate KexiTableDesignerView::buildSchema(KexiDB::TableSchema &schema, bool be
}
i++;
}
- pkFieldName = pkFieldName.arg(idIndex==1?QString::null : QString::number(idIndex));
- pkFieldCaption = pkFieldCaption.arg(idIndex==1?QString::null : QString::number(idIndex));
+ pkFieldName = pkFieldName.tqarg(idIndex==1?TQString() : TQString::number(idIndex));
+ pkFieldCaption = pkFieldCaption.tqarg(idIndex==1?TQString() : TQString::number(idIndex));
//ok, add PK with such unique name
d->view->insertEmptyRow(0);
d->view->setCursorPosition(0, COLUMN_ID_CAPTION);
- d->view->data()->updateRowEditBuffer(d->view->selectedItem(), COLUMN_ID_CAPTION,
- QVariant(pkFieldCaption));
- d->view->data()->updateRowEditBuffer(d->view->selectedItem(), COLUMN_ID_TYPE,
- QVariant(KexiDB::Field::IntegerGroup-1/*counting from 0*/));
- if (!d->view->data()->saveRowChanges(*d->view->selectedItem(), true)) {
+ d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(d->view->selectedItem(), COLUMN_ID_CAPTION,
+ TQVariant(pkFieldCaption));
+ d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(d->view->selectedItem(), COLUMN_ID_TYPE,
+ TQVariant(KexiDB::Field::IntegerGroup-1/*counting from 0*/));
+ if (!d->view->KexiDataAwareObjectInterface::data()->saveRowChanges(*d->view->selectedItem(), true)) {
return cancelled;
}
slotTogglePrimaryKey();
@@ -1262,18 +1262,18 @@ tristate KexiTableDesignerView::buildSchema(KexiDB::TableSchema &schema, bool be
KoProperty::Set *b = 0;
bool no_fields = true;
int i;
- QDict<char> names(101, false);
+ TQDict<char> names(101, false);
char dummy;
for (i=0;i<(int)d->sets->size();i++) {
b = d->sets->at(i);
if (b) {
no_fields = false;
- const QString name = (*b)["name"].value().toString();
+ const TQString name = (*b)["name"].value().toString();
if (name.isEmpty()) {
if (beSilent) {
kexipluginswarn <<
- QString("KexiTableDesignerView::buildSchema(): no field caption entered at row %1...")
- .arg(i+1) << endl;
+ TQString("KexiTableDesignerView::buildSchema(): no field caption entered at row %1...")
+ .tqarg(i+1) << endl;
}
else {
d->view->setCursorPosition(i, COLUMN_ID_CAPTION);
@@ -1303,8 +1303,8 @@ tristate KexiTableDesignerView::buildSchema(KexiDB::TableSchema &schema, bool be
if (res == true && b && i<(int)d->sets->size()) {//found a duplicate
if (beSilent) {
kexipluginswarn <<
- QString("KexiTableDesignerView::buildSchema(): duplicated field name '%1'")
- .arg((*b)["name"].value().toString()) << endl;
+ TQString("KexiTableDesignerView::buildSchema(): duplicated field name '%1'")
+ .tqarg((*b)["name"].value().toString()) << endl;
}
else {
d->view->setCursorPosition(i, COLUMN_ID_CAPTION);
@@ -1313,7 +1313,7 @@ tristate KexiTableDesignerView::buildSchema(KexiDB::TableSchema &schema, bool be
KMessageBox::sorry(this,
i18n("You have added \"%1\" field name twice.\nField names cannot be repeated. "
"Correct name of the field.")
- .arg((*b)["name"].value().toString()) );
+ .tqarg((*b)["name"].value().toString()) );
}
res = cancelled;
}
@@ -1336,7 +1336,7 @@ tristate KexiTableDesignerView::buildSchema(KexiDB::TableSchema &schema, bool be
//! @todo this is backward-compatible code for "single visible column" implementation
//! for multiple columns, only the first is displayed, so there is a data loss is GUI is used
//! -- special koproperty editor needed
- QValueList<uint> visibleColumns;
+ TQValueList<uint> visibleColumns;
const int visibleColumn = (*s)["visibleColumn"].value().toInt();
if (visibleColumn >= 0)
visibleColumns.append( (uint)visibleColumn );
@@ -1360,7 +1360,7 @@ static void copyAlterTableActions(KCommand* command, KexiDB::AlterTableHandler::
{
CommandGroup* cmdGroup = dynamic_cast<CommandGroup*>( command );
if (cmdGroup) {//command group: flatten it
- for (QPtrListIterator<KCommand> it(cmdGroup->commands()); it.current(); ++it)
+ for (TQPtrListIterator<KCommand> it(cmdGroup->commands()); it.current(); ++it)
copyAlterTableActions(it.current(), actions);
return;
}
@@ -1380,7 +1380,7 @@ tristate KexiTableDesignerView::buildAlterTableActions(KexiDB::AlterTableHandler
actions.clear();
kexipluginsdbg << "KexiTableDesignerView::buildAlterTableActions(): " << d->history->commands().count()
<< " top-level command(s) to process..." << endl;
- for (QPtrListIterator<KCommand> it(d->history->commands()); it.current(); ++it) {
+ for (TQPtrListIterator<KCommand> it(d->history->commands()); it.current(); ++it) {
copyAlterTableActions(it.current(), actions);
}
return true;
@@ -1406,7 +1406,7 @@ KexiDB::SchemaData* KexiTableDesignerView::storeNewData(const KexiDB::SchemaData
KexiDB::Connection *conn = mainWin()->project()->dbConnection();
res = conn->createTable(tempData()->table);
if (res!=true)
- parentDialog()->setStatus(conn, "");
+ tqparentDialog()->settqStatus(conn, "");
}
if (res == true) {
@@ -1457,7 +1457,7 @@ tristate KexiTableDesignerView::storeData(bool dontAsk)
this, *conn, *tempData()->table,
i18n("You are about to change the design of table \"%1\" "
"but following objects using this table are opened:")
- .arg(tempData()->table->name()));
+ .tqarg(tempData()->table->name()));
}
if (res == true) {
@@ -1468,7 +1468,7 @@ tristate KexiTableDesignerView::storeData(bool dontAsk)
// - inform about removing the current table and ask for confirmation
if (!d->dontAskOnStoreData && !dontAsk) {
bool emptyTable;
- const QString msg = d->messageForSavingChanges(emptyTable);
+ const TQString msg = d->messageForSavingChanges(emptyTable);
if (!emptyTable) {
if (KMessageBox::No == KMessageBox::questionYesNo(this, msg))
res = cancelled;
@@ -1489,7 +1489,7 @@ tristate KexiTableDesignerView::storeData(bool dontAsk)
res = conn->alterTable(*tempData()->table, *newTable);
if (res != true)
- parentDialog()->setStatus(conn, "");
+ tqparentDialog()->settqStatus(conn, "");
}
else {
KexiDB::AlterTableHandler::ExecutionArguments args;
@@ -1499,7 +1499,7 @@ tristate KexiTableDesignerView::storeData(bool dontAsk)
<< res.toString() << endl;
if (true != res) {
alterTableHandler->debugError();
- parentDialog()->setStatus(alterTableHandler, "");
+ tqparentDialog()->settqStatus(alterTableHandler, "");
}
}
}
@@ -1517,11 +1517,11 @@ tristate KexiTableDesignerView::storeData(bool dontAsk)
return res;
}
-tristate KexiTableDesignerView::simulateAlterTableExecution(QString *debugTarget)
+tristate KexiTableDesignerView::simulateAlterTableExecution(TQString *debugTarget)
{
#ifndef KEXI_NO_UNDOREDO_ALTERTABLE
# ifdef KEXI_DEBUG_GUI
- if (mainWin()->activeWindow() != parentDialog()) //to avoid executing for multiple alter table views
+ if (mainWin()->activeWindow() != tqparentDialog()) //to avoid executing for multiple alter table views
return false;
if (!tempData()->table || !m_dialog->schemaData())
return false;
@@ -1555,8 +1555,8 @@ void KexiTableDesignerView::slotSimulateAlterTableExecution()
tristate KexiTableDesignerView::executeRealAlterTable()
{
- QSignal signal;
- signal.connect( mainWin(), SLOT(slotProjectSave()) );
+ TQSignal signal;
+ signal.connect( mainWin(), TQT_SLOT(slotProjectSave()) );
d->tempStoreDataUsingRealAlterTable = true;
d->recentResultOfStoreData = false;
signal.activate(); //will call KexiMainWindowImpl::slotProjectSaveAs() and thus storeData()
@@ -1566,7 +1566,7 @@ tristate KexiTableDesignerView::executeRealAlterTable()
KexiTablePart::TempData* KexiTableDesignerView::tempData() const
{
- return static_cast<KexiTablePart::TempData*>(parentDialog()->tempData());
+ return static_cast<KexiTablePart::TempData*>(tqparentDialog()->tempData());
}
/*void KexiTableDesignerView::slotAboutToUpdateRow(
@@ -1575,8 +1575,8 @@ KexiTablePart::TempData* KexiTableDesignerView::tempData() const
KexiDB::RowEditBuffer::SimpleMap map = buffer->simpleBuffer();
buffer->debug();
- QVariant old_type = item->at(1);
- QVariant *buf_type = buffer->at( d->view->field(1)->name() );
+ TQVariant old_type = item->at(1);
+ TQVariant *buf_type = buffer->at( d->view->field(1)->name() );
//check if there is a type specified
// if ((old_type.isNull() && !buf_type) || (buf_type && buf_type->isNull())) {
@@ -1595,7 +1595,7 @@ void KexiTableDesignerView::debugCommand( KCommand* command, int nestingLevel )
KexiUtils::addAlterTableActionDebug(command->name(), nestingLevel);
//show subcommands
if (dynamic_cast<CommandGroup*>(command)) {
- for (QPtrListIterator<KCommand> it(dynamic_cast<CommandGroup*>(command)->commands()); it.current(); ++it) {
+ for (TQPtrListIterator<KCommand> it(dynamic_cast<CommandGroup*>(command)->commands()); it.current(); ++it) {
debugCommand(it.current(), nestingLevel + 1);
}
}
@@ -1625,7 +1625,7 @@ void KexiTableDesignerView::slotUndo()
{
#ifndef KEXI_NO_UNDOREDO_ALTERTABLE
# ifdef KEXI_DEBUG_GUI
- KexiUtils::addAlterTableActionDebug(QString("UNDO:"));
+ KexiUtils::addAlterTableActionDebug(TQString("UNDO:"));
# endif
d->history->undo();
updateUndoRedoActions();
@@ -1636,7 +1636,7 @@ void KexiTableDesignerView::slotRedo()
{
#ifndef KEXI_NO_UNDOREDO_ALTERTABLE
# ifdef KEXI_DEBUG_GUI
- KexiUtils::addAlterTableActionDebug(QString("REDO:"));
+ KexiUtils::addAlterTableActionDebug(TQString("REDO:"));
# endif
d->history->redo();
updateUndoRedoActions();
@@ -1655,25 +1655,25 @@ void KexiTableDesignerView::slotAboutToShowContextMenu()
//update title
if (propertySet()) {
const KoProperty::Set &set = *propertySet();
- QString captionOrName(set["caption"].value().toString());
+ TQString captionOrName(set["caption"].value().toString());
if (captionOrName.isEmpty())
captionOrName = set["name"].value().toString();
//! @todo show "field" icon
- d->contextMenuTitle->setTitle( i18n("Table field \"%1\"").arg(captionOrName) );
+ d->contextMenuTitle->setTitle( i18n("Table field \"%1\"").tqarg(captionOrName) );
}
else {
d->contextMenuTitle->setTitle( i18n("Empty table row", "Empty Row") );
}
}
-QString KexiTableDesignerView::debugStringForCurrentTableSchema(tristate& result)
+TQString KexiTableDesignerView::debugStringForCurrentTableSchema(tristate& result)
{
KexiDB::TableSchema tempTable;
//copy schema data
static_cast<KexiDB::SchemaData&>(tempTable) = static_cast<KexiDB::SchemaData&>(*tempData()->table);
result = buildSchema(tempTable, true /*beSilent*/);
if (true!=result)
- return QString::null;
+ return TQString();
return tempTable.debugString(false /*without name*/);
}
@@ -1689,35 +1689,35 @@ void KexiTableDesignerView::clearRow(int row, bool addCommand)
//remove from prop. set
d->sets->remove( row );
//clear row in table view (just clear value in COLUMN_ID_TYPE column)
-// for (int i=0; i < (int)d->view->data()->columnsCount(); i++) {
+// for (int i=0; i < (int)d->view->KexiDataAwareObjectInterface::data()->columnsCount(); i++) {
if (!addCommand) {
d->addHistoryCommand_in_slotRowUpdated_enabled = false;
d->addHistoryCommand_in_slotPropertyChanged_enabled = false;
d->slotBeforeCellChanged_enabled = false;
}
- d->view->data()->updateRowEditBuffer(item, COLUMN_ID_TYPE, QVariant());
+ d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(item, COLUMN_ID_TYPE, TQVariant());
if (!addCommand) {
d->addHistoryCommand_in_slotRowUpdated_enabled = true;
d->addHistoryCommand_in_slotPropertyChanged_enabled = true;
d->slotBeforeCellChanged_enabled = true;
}
- d->view->data()->saveRowChanges(*item, true);
+ d->view->KexiDataAwareObjectInterface::data()->saveRowChanges(*item, true);
}
-void KexiTableDesignerView::insertField(int row, const QString& caption, bool addCommand)
+void KexiTableDesignerView::insertField(int row, const TQString& caption, bool addCommand)
{
insertFieldInternal(row, 0, caption, addCommand);
}
void KexiTableDesignerView::insertField(int row, KoProperty::Set& set, bool addCommand)
{
- insertFieldInternal(row, &set, QString::null, addCommand);
+ insertFieldInternal(row, &set, TQString(), addCommand);
}
void KexiTableDesignerView::insertFieldInternal(int row, KoProperty::Set* set, //const KexiDB::Field& field,
- const QString& caption, bool addCommand)
+ const TQString& caption, bool addCommand)
{
- if (set && (!set->contains("type") || !set->contains("caption"))) {
+ if (set && (!set->tqcontains("type") || !set->tqcontains("caption"))) {
kexipluginswarn << "KexiTableDesignerView::insertField(): no 'type' or 'caption' property in set!" << endl;
return;
}
@@ -1731,19 +1731,19 @@ void KexiTableDesignerView::insertFieldInternal(int row, KoProperty::Set* set, /
d->addHistoryCommand_in_slotPropertyChanged_enabled = false;
d->slotBeforeCellChanged_enabled = false;
}
- d->view->data()->updateRowEditBuffer(item, COLUMN_ID_CAPTION,
- set ? (*set)["caption"].value() : QVariant(caption));//field.caption());
- d->view->data()->updateRowEditBuffer(item, COLUMN_ID_TYPE,
+ d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(item, COLUMN_ID_CAPTION,
+ set ? (*set)["caption"].value() : TQVariant(caption));//field.caption());
+ d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(item, COLUMN_ID_TYPE,
set ? (int)KexiDB::Field::typeGroup( (*set)["type"].value().toInt() )-1/*counting from 0*/
: (((int)KexiDB::Field::TextGroup)-1)/*default type, counting from 0*/
);
- d->view->data()->updateRowEditBuffer(item, COLUMN_ID_DESC,
- set ? (*set)["description"].value() : QVariant());//field.description());
+ d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(item, COLUMN_ID_DESC,
+ set ? (*set)["description"].value() : TQVariant());//field.description());
if (!addCommand) {
d->slotBeforeCellChanged_enabled = true;
}
//this will create a new property set:
- d->view->data()->saveRowChanges(*item);
+ d->view->KexiDataAwareObjectInterface::data()->saveRowChanges(*item);
if (set) {
KoProperty::Set *newSet = d->sets->at(row);
if (newSet) {
@@ -1775,7 +1775,7 @@ void KexiTableDesignerView::insertEmptyRow( int row, bool addCommand )
/*void KexiTableDesignerView::deleteRow( int row )
{
d->addHistoryCommand_in_slotAboutToDeleteRow_enabled = false;
- d->view->deleteItem( d->view->data()->at(row) );
+ d->view->deleteItem( d->view->KexiDataAwareObjectInterface::data()->at(row) );
d->addHistoryCommand_in_slotAboutToDeleteRow_enabled = true;
}*/
@@ -1796,18 +1796,18 @@ void KexiTableDesignerView::deleteRow( int row, bool addCommand )
}
void KexiTableDesignerView::changeFieldPropertyForRow( int row,
- const QCString& propertyName, const QVariant& newValue,
+ const TQCString& propertyName, const TQVariant& newValue,
KoProperty::Property::ListData* const listData, bool addCommand )
{
#ifdef KEXI_DEBUG_GUI
- KexiUtils::addAlterTableActionDebug(QString("** changeFieldProperty: \"")
- + QString(propertyName) + "\" to \"" + newValue.toString() + "\"", 2/*nestingLevel*/);
+ KexiUtils::addAlterTableActionDebug(TQString("** changeFieldProperty: \"")
+ + TQString(propertyName) + "\" to \"" + newValue.toString() + "\"", 2/*nestingLevel*/);
#endif
if (!d->view->acceptRowEdit())
return;
KoProperty::Set* set = d->sets->at( row );
- if (!set || !set->contains(propertyName))
+ if (!set || !set->tqcontains(propertyName))
return;
KoProperty::Property &property = set->property(propertyName);
if (listData) {
@@ -1825,9 +1825,9 @@ void KexiTableDesignerView::changeFieldPropertyForRow( int row,
// d->addHistoryCommand_in_slotRowUpdated_enabled = false;
// d->addHistoryCommand_in_slotPropertyChanged_enabled = false;
d->slotPropertyChanged_subType_enabled = false;
- d->view->data()->updateRowEditBuffer(item, COLUMN_ID_TYPE,
+ d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(item, COLUMN_ID_TYPE,
int( KexiDB::Field::typeGroup( newValue.toInt() ) )-1);
- d->view->data()->saveRowChanges(*item);
+ d->view->KexiDataAwareObjectInterface::data()->saveRowChanges(*item);
d->addHistoryCommand_in_slotRowUpdated_enabled = true;
// d->addHistoryCommand_in_slotPropertyChanged_enabled = true;
// d->slotPropertyChanged_subType_enabled = true;
@@ -1844,8 +1844,8 @@ void KexiTableDesignerView::changeFieldPropertyForRow( int row,
if (!addCommand) {
d->slotBeforeCellChanged_enabled = false;
}
- d->view->data()->updateRowEditBuffer(item, COLUMN_ID_CAPTION, newValue);
- d->view->data()->saveRowChanges(*item);
+ d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(item, COLUMN_ID_CAPTION, newValue);
+ d->view->KexiDataAwareObjectInterface::data()->saveRowChanges(*item);
if (!addCommand) {
d->slotBeforeCellChanged_enabled = true;
}
@@ -1854,11 +1854,11 @@ void KexiTableDesignerView::changeFieldPropertyForRow( int row,
if (!addCommand) {
d->slotBeforeCellChanged_enabled = false;
}
- d->view->data()->updateRowEditBuffer(item, COLUMN_ID_DESC, newValue);
+ d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(item, COLUMN_ID_DESC, newValue);
if (!addCommand) {
d->slotBeforeCellChanged_enabled = true;
}
- d->view->data()->saveRowChanges(*item);
+ d->view->KexiDataAwareObjectInterface::data()->saveRowChanges(*item);
}
if (!addCommand) {
d->addHistoryCommand_in_slotPropertyChanged_enabled = true;
@@ -1869,7 +1869,7 @@ void KexiTableDesignerView::changeFieldPropertyForRow( int row,
}
void KexiTableDesignerView::changeFieldProperty( int fieldUID,
- const QCString& propertyName, const QVariant& newValue,
+ const TQCString& propertyName, const TQVariant& newValue,
KoProperty::Property::ListData* const listData, bool addCommand )
{
//find a property by UID
@@ -1882,11 +1882,11 @@ void KexiTableDesignerView::changeFieldProperty( int fieldUID,
}
void KexiTableDesignerView::changePropertyVisibility(
- int fieldUID, const QCString& propertyName, bool visible )
+ int fieldUID, const TQCString& propertyName, bool visible )
{
#ifdef KEXI_DEBUG_GUI
- KexiUtils::addAlterTableActionDebug(QString("** changePropertyVisibility: \"")
- + QString(propertyName) + "\" to \"" + (visible ? "true" : "false") + "\"", 2/*nestingLevel*/);
+ KexiUtils::addAlterTableActionDebug(TQString("** changePropertyVisibility: \"")
+ + TQString(propertyName) + "\" to \"" + (visible ? "true" : "false") + "\"", 2/*nestingLevel*/);
#endif
if (!d->view->acceptRowEdit())
return;
@@ -1896,7 +1896,7 @@ void KexiTableDesignerView::changePropertyVisibility(
if (row<0)
return;
KoProperty::Set* set = d->sets->at( row );
- if (!set || !set->contains(propertyName))
+ if (!set || !set->tqcontains(propertyName))
return;
KoProperty::Property &property = set->property(propertyName);
@@ -1910,10 +1910,10 @@ void KexiTableDesignerView::propertySetSwitched()
{
KexiDataTable::propertySetSwitched();
- //if (parentDialog()!=parentDialog()->mainWin()->currentDialog())
+ //if (tqparentDialog()!=tqparentDialog()->mainWin()->currentDialog())
// return; //this is not the current dialog's view
- static_cast<KexiTablePart*>(parentDialog()->part())->lookupColumnPage()
+ static_cast<KexiTablePart*>(tqparentDialog()->part())->lookupColumnPage()
->assignPropertySet(propertySet());
}
diff --git a/kexi/plugins/tables/kexitabledesignerview.h b/kexi/plugins/tables/kexitabledesignerview.h
index 773163b6..b7ff7a23 100644
--- a/kexi/plugins/tables/kexitabledesignerview.h
+++ b/kexi/plugins/tables/kexitabledesignerview.h
@@ -56,10 +56,11 @@ namespace KoProperty {
class KexiTableDesignerView : public KexiDataTable, public KexiTableDesignerInterface
{
Q_OBJECT
+ TQ_OBJECT
public:
/*! Creates a new alter table dialog. */
- KexiTableDesignerView(KexiMainWindow *win, QWidget *parent);
+ KexiTableDesignerView(KexiMainWindow *win, TQWidget *tqparent);
virtual ~KexiTableDesignerView();
@@ -72,7 +73,7 @@ class KexiTableDesignerView : public KexiDataTable, public KexiTableDesignerInte
/*! Inserts a new field with \a caption for \a row.
Property set is also created. */
- virtual void insertField(int row, const QString& caption, bool addCommand = false);
+ virtual void insertField(int row, const TQString& caption, bool addCommand = false);
/*! Inserts a new \a field for \a row.
Property set is also created. \a set will be deeply-copied into the new set.
@@ -97,29 +98,29 @@ class KexiTableDesignerView : public KexiDataTable, public KexiTableDesignerInte
If \a listData is not NULL and not empty, a deep copy of it is passed to Property::setListData().
If \a listData \a nlist if not NULL but empty, Property::setListData(0) is called. */
virtual void changeFieldPropertyForRow( int row,
- const QCString& propertyName, const QVariant& newValue,
+ const TQCString& propertyName, const TQVariant& newValue,
KoProperty::Property::ListData* const listData, bool addCommand );
/*! Changes property \a propertyName to \a newValue.
Works exactly like changeFieldPropertyForRow() except the field is pointed by \a fieldUID.
Used by ChangeFieldPropertyCommand to change field's property. */
- void changeFieldProperty( int fieldUID, const QCString& propertyName,
- const QVariant& newValue, KoProperty::Property::ListData* const listData = 0,
+ void changeFieldProperty( int fieldUID, const TQCString& propertyName,
+ const TQVariant& newValue, KoProperty::Property::ListData* const listData = 0,
bool addCommand = false );
/*! Changes visibility of property \a propertyName to \a visible for a field pointed by \a fieldUID.
Used by ChangePropertyVisibilityCommand. */
- void changePropertyVisibility( int fieldUID, const QCString& propertyName, bool visible );
+ void changePropertyVisibility( int fieldUID, const TQCString& propertyName, bool visible );
/*! Builds table field's schema by looking at the \a set. */
KexiDB::Field * buildField( const KoProperty::Set &set ) const;
/*! Creates temporary table for the current design and returns debug string for it. */
- virtual QString debugStringForCurrentTableSchema(tristate& result);
+ virtual TQString debugStringForCurrentTableSchema(tristate& result);
/*! Simulates execution of alter table, and puts debug into \a debugTarget.
A case when debugTarget is not 0 is true for the alter table test suite. */
- virtual tristate simulateAlterTableExecution(QString *debugTarget);
+ virtual tristate simulateAlterTableExecution(TQString *debugTarget);
public slots:
/*! Real execution of the Alter Table. For debugging of the real alter table.
@@ -138,17 +139,17 @@ class KexiTableDesignerView : public KexiDataTable, public KexiTableDesignerInte
//! Called before cell change in tableview.
void slotBeforeCellChanged(KexiTableItem *item, int colnum,
- QVariant& newValue, KexiDB::ResultInfo* result);
+ TQVariant& newValue, KexiDB::ResultInfo* result);
//! Called on row change in a tableview.
void slotRowUpdated(KexiTableItem *item);
//! Called before row inserting in tableview.
void slotRowInserted();
-// void slotAboutToInsertRow(KexiTableItem* item, KexiDB::ResultInfo* result, bool repaint);
+// void slotAboutToInsertRow(KexiTableItem* item, KexiDB::ResultInfo* result, bool tqrepaint);
//! Called before row deleting in tableview.
- void slotAboutToDeleteRow(KexiTableItem& item, KexiDB::ResultInfo* result, bool repaint);
+ void slotAboutToDeleteRow(KexiTableItem& item, KexiDB::ResultInfo* result, bool tqrepaint);
/*! Called after any property has been changed in the current property set,
to perform some actions (like updating other dependent properties) */
@@ -218,13 +219,13 @@ class KexiTableDesignerView : public KexiDataTable, public KexiTableDesignerInte
Assigns primary key icon and value for property set \a propertySet,
and deselects it from previous pkey's row.
\a aWasPKey is internal.
- If \a commandGroup is not 0, it is used as parent group for storing actions' history. */
+ If \a commandGroup is not 0, it is used as tqparent group for storing actions' history. */
void switchPrimaryKey(KoProperty::Set &propertySet, bool set, bool aWasPKey = false,
CommandGroup* commandGroup = 0);
//! Gets subtype strings and names for type \a fieldType.
void getSubTypeListData(KexiDB::Field::TypeGroup fieldTypeGroup,
- QStringList& stringsList, QStringList& namesList);
+ TQStringList& stringsList, TQStringList& namesList);
/*! Adds history command \a command to the undo/redo buffer.
If \a execute is true, the command is executed afterwards. */
@@ -240,7 +241,7 @@ class KexiTableDesignerView : public KexiDataTable, public KexiTableDesignerInte
/*! Inserts a new \a field for \a row.
Property set is also created. If \a set is not 0 (the default),
it will be copied into the new set. Used by insertField(). */
- void insertFieldInternal(int row, KoProperty::Set* set, const QString& caption, bool addCommand);
+ void insertFieldInternal(int row, KoProperty::Set* set, const TQString& caption, bool addCommand);
//! Reimplemented to pass the information also to the "Lookup" tab
virtual void propertySetSwitched();
diff --git a/kexi/plugins/tables/kexitabledesignerview_p.cpp b/kexi/plugins/tables/kexitabledesignerview_p.cpp
index 56ef997d..cf98b683 100644
--- a/kexi/plugins/tables/kexitabledesignerview_p.cpp
+++ b/kexi/plugins/tables/kexitabledesignerview_p.cpp
@@ -20,9 +20,9 @@
#include "kexitabledesignerview_p.h"
#include "kexitabledesignerview.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qsplitter.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqsplitter.h>
#include <kiconloader.h>
#include <kdebug.h>
@@ -109,7 +109,7 @@ KexiTableDesignerViewPrivate::KexiTableDesignerViewPrivate(KexiTableDesignerView
, slotBeforeCellChanged_enabled(true)
, tempStoreDataUsingRealAlterTable(false)
{
- historyActionCollection = new KActionCollection((QWidget*)0,"");
+ historyActionCollection = new KActionCollection((TQWidget*)0,"");
history = new CommandHistory(historyActionCollection, true);
internalPropertyNames.insert("subType",(char*)1);
@@ -133,10 +133,10 @@ int KexiTableDesignerViewPrivate::generateUniqueId()
}
void KexiTableDesignerViewPrivate::setPropertyValueIfNeeded(
- const KoProperty::Set& set, const QCString& propertyName,
- const QVariant& newValue, const QVariant& oldValue, CommandGroup* commandGroup,
+ const KoProperty::Set& set, const TQCString& propertyName,
+ const TQVariant& newValue, const TQVariant& oldValue, CommandGroup* commandGroup,
bool forceAddCommand, bool rememberOldValue,
- QStringList* const slist, QStringList* const nlist)
+ TQStringList* const slist, TQStringList* const nlist)
{
KoProperty::Property& property = set[propertyName];
@@ -173,13 +173,13 @@ void KexiTableDesignerViewPrivate::setPropertyValueIfNeeded(
}
void KexiTableDesignerViewPrivate::setPropertyValueIfNeeded(
- const KoProperty::Set& set, const QCString& propertyName,
- const QVariant& newValue, CommandGroup* commandGroup,
+ const KoProperty::Set& set, const TQCString& propertyName,
+ const TQVariant& newValue, CommandGroup* commandGroup,
bool forceAddCommand, bool rememberOldValue,
- QStringList* const slist, QStringList* const nlist)
+ TQStringList* const slist, TQStringList* const nlist)
{
KoProperty::Property& property = set[propertyName];
- QVariant oldValue( property.value() );
+ TQVariant oldValue( property.value() );
setPropertyValueIfNeeded( set, propertyName, newValue, property.value(),
commandGroup, forceAddCommand, rememberOldValue, slist, nlist);
}
@@ -269,26 +269,26 @@ bool KexiTableDesignerViewPrivate::updatePropertiesVisibility(KexiDB::Field::Typ
return changed;
}
-QString KexiTableDesignerViewPrivate::messageForSavingChanges(bool &emptyTable, bool skipWarning)
+TQString KexiTableDesignerViewPrivate::messageForSavingChanges(bool &emptyTable, bool skipWarning)
{
KexiDB::Connection *conn = designerView->mainWin()->project()->dbConnection();
bool ok;
emptyTable = conn->isEmpty( *designerView->tempData()->table, ok ) && ok;
return i18n("Do you want to save the design now?")
- + ( (emptyTable || skipWarning) ? QString::null :
- (QString("\n\n") + designerView->part()->i18nMessage(":additional message before saving design",
- designerView->parentDialog())) );
+ + ( (emptyTable || skipWarning) ? TQString() :
+ (TQString("\n\n") + designerView->part()->i18nMessage(":additional message before saving design",
+ designerView->tqparentDialog())) );
}
void KexiTableDesignerViewPrivate::updateIconForItem(KexiTableItem &item, KoProperty::Set& set)
{
- QVariant icon;
+ TQVariant icon;
if (!set["rowSource"].value().toString().isEmpty() && !set["rowSourceType"].value().toString().isEmpty())
icon = "combo";
//show/hide icon in the table
- view->data()->clearRowEditBuffer();
- view->data()->updateRowEditBuffer(&item, COLUMN_ID_ICON, icon);
- view->data()->saveRowChanges(item, true);
+ view->KexiDataAwareObjectInterface::data()->clearRowEditBuffer();
+ view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(&item, COLUMN_ID_ICON, icon);
+ view->KexiDataAwareObjectInterface::data()->saveRowChanges(item, true);
}
#include "kexitabledesignerview_p.moc"
diff --git a/kexi/plugins/tables/kexitabledesignerview_p.h b/kexi/plugins/tables/kexitabledesignerview_p.h
index f5650e74..8f647548 100644
--- a/kexi/plugins/tables/kexitabledesignerview_p.h
+++ b/kexi/plugins/tables/kexitabledesignerview_p.h
@@ -37,11 +37,11 @@ class KexiDataAwarePropertySet;
class CommandGroup : public KMacroCommand
{
public:
- CommandGroup( const QString & name )
+ CommandGroup( const TQString & name )
: KMacroCommand(name)
{}
virtual ~CommandGroup() {}
- const QPtrList<KCommand>& commands() const { return m_commands; }
+ const TQPtrList<KCommand>& commands() const { return m_commands; }
};
/*! @internal
@@ -50,10 +50,11 @@ class CommandGroup : public KMacroCommand
class CommandHistory : public KCommandHistory
{
Q_OBJECT
+ TQ_OBJECT
public:
CommandHistory(KActionCollection *actionCollection, bool withMenus = true);
- const QPtrList<KCommand>& commands() const { return m_commandsToUndo; }
+ const TQPtrList<KCommand>& commands() const { return m_commandsToUndo; }
void addCommand(KCommand *command, bool execute = true);
@@ -64,7 +65,7 @@ class CommandHistory : public KCommandHistory
virtual void redo();
protected:
- QPtrList<KCommand> m_commandsToUndo, m_commandsToRedo;
+ TQPtrList<KCommand> m_commandsToUndo, m_commandsToRedo;
};
//----------------------------------------------
@@ -96,17 +97,17 @@ class KexiTableDesignerViewPrivate
addHistoryCommand_in_slotPropertyChanged_enabled is then set back to the original state.
*/
- void setPropertyValueIfNeeded( const KoProperty::Set& set, const QCString& propertyName,
- const QVariant& newValue, CommandGroup* commandGroup,
+ void setPropertyValueIfNeeded( const KoProperty::Set& set, const TQCString& propertyName,
+ const TQVariant& newValue, CommandGroup* commandGroup,
bool forceAddCommand = false, bool rememberOldValue = true,
- QStringList* const slist = 0, QStringList* const nlist = 0);
+ TQStringList* const slist = 0, TQStringList* const nlist = 0);
/*! Like above but allows to specify \a oldValue. */
void setPropertyValueIfNeeded(
- const KoProperty::Set& set, const QCString& propertyName,
- const QVariant& newValue, const QVariant& oldValue, CommandGroup* commandGroup,
+ const KoProperty::Set& set, const TQCString& propertyName,
+ const TQVariant& newValue, const TQVariant& oldValue, CommandGroup* commandGroup,
bool forceAddCommand = false, bool rememberOldValue = true,
- QStringList* const slist = 0, QStringList* const nlist = 0);
+ TQStringList* const slist = 0, TQStringList* const nlist = 0);
/*! @internal
Used in updatePropertiesVisibility().
@@ -123,7 +124,7 @@ class KexiTableDesignerViewPrivate
\a emptyTable is set to true if the table designed contains no rows.
If \a skipWarning is true, no warning about data loss is appended (useful when
only non-physical altering actions will be performed). */
- QString messageForSavingChanges(bool &emptyTable, bool skipWarning = false);
+ TQString messageForSavingChanges(bool &emptyTable, bool skipWarning = false);
/*! Updates icon in the first column, depending on property set \a set.
For example, when "rowSource" and "rowSourceType" propertiesa are not empty,
@@ -185,7 +186,7 @@ class KexiTableDesignerViewPrivate
//! A cache used in KexiTableDesignerView::buildField() to quickly identify
//! properties internal to the designer
- QAsciiDict<char> internalPropertyNames;
+ TQAsciiDict<char> internalPropertyNames;
};
#endif
diff --git a/kexi/plugins/tables/kexitablepart.cpp b/kexi/plugins/tables/kexitablepart.cpp
index 3d09a81e..1ee3d049 100644
--- a/kexi/plugins/tables/kexitablepart.cpp
+++ b/kexi/plugins/tables/kexitablepart.cpp
@@ -51,11 +51,11 @@ class KexiTablePart::Private
{
delete static_cast<KexiLookupColumnPage*>(lookupColumnPage);
}
- QGuardedPtr<KexiLookupColumnPage> lookupColumnPage;
+ TQGuardedPtr<KexiLookupColumnPage> lookupColumnPage;
};
-KexiTablePart::KexiTablePart(QObject *parent, const char *name, const QStringList &l)
- : KexiPart::Part(parent, name, l)
+KexiTablePart::KexiTablePart(TQObject *tqparent, const char *name, const TQStringList &l)
+ : KexiPart::Part(tqparent, name, l)
, d(new Private())
{
// REGISTERED ID:
@@ -93,11 +93,11 @@ void KexiTablePart::initInstanceActions()
KexiDialogTempData* KexiTablePart::createTempData(KexiDialogBase* dialog)
{
- return new KexiTablePart::TempData(dialog);
+ return new KexiTablePart::TempData(TQT_TQOBJECT(dialog));
}
-KexiViewBase* KexiTablePart::createView(QWidget *parent, KexiDialogBase* dialog,
- KexiPart::Item &item, int viewMode, QMap<QString,QString>*)
+KexiViewBase* KexiTablePart::createView(TQWidget *tqparent, KexiDialogBase* dialog,
+ KexiPart::Item &item, int viewMode, TQMap<TQString,TQString>*)
{
KexiMainWindow *win = dialog->mainWin();
if (!win || !win->project() || !win->project()->dbConnection())
@@ -111,7 +111,7 @@ KexiViewBase* KexiTablePart::createView(QWidget *parent, KexiDialogBase* dialog,
}
if (viewMode == Kexi::DesignViewMode) {
- KexiTableDesignerView *t = new KexiTableDesignerView(win, parent);
+ KexiTableDesignerView *t = new KexiTableDesignerView(win, tqparent);
return t;
}
else if (viewMode == Kexi::DataViewMode) {
@@ -119,7 +119,7 @@ KexiViewBase* KexiTablePart::createView(QWidget *parent, KexiDialogBase* dialog,
return 0; //todo: message
//we're not setting table schema here -it will be forced to set
// in KexiTableDesigner_DataView::afterSwitchFrom()
- KexiTableDesigner_DataView *t = new KexiTableDesigner_DataView(win, parent);
+ KexiTableDesigner_DataView *t = new KexiTableDesigner_DataView(win, tqparent);
return t;
}
return 0;
@@ -137,7 +137,7 @@ bool KexiTablePart::remove(KexiMainWindow *win, KexiPart::Item &item)
tristate res = KexiTablePart::askForClosingObjectsUsingTableSchema(
win, *conn, *sch,
i18n("You are about to remove table \"%1\" but following objects using this table are opened:")
- .arg(sch->name()));
+ .tqarg(sch->name()));
return true == conn->dropTable( sch );
}
//last chance: just remove item
@@ -145,7 +145,7 @@ bool KexiTablePart::remove(KexiMainWindow *win, KexiPart::Item &item)
}
tristate KexiTablePart::rename(KexiMainWindow *win, KexiPart::Item & item,
- const QString& newName)
+ const TQString& newName)
{
//TODO: what about objects (queries/forms) that use old name?
KexiDB::Connection *conn = win->project()->dbConnection();
@@ -171,24 +171,24 @@ KexiTablePart::dataSource()
}
#endif
-tristate KexiTablePart::askForClosingObjectsUsingTableSchema(QWidget *parent, KexiDB::Connection& conn,
- KexiDB::TableSchema& table, const QString& msg)
+tristate KexiTablePart::askForClosingObjectsUsingTableSchema(TQWidget *tqparent, KexiDB::Connection& conn,
+ KexiDB::TableSchema& table, const TQString& msg)
{
- QPtrList<KexiDB::Connection::TableSchemaChangeListenerInterface>* listeners
+ TQPtrList<KexiDB::Connection::TableSchemaChangeListenerInterface>* listeners
= conn.tableSchemaChangeListeners(table);
if (!listeners || listeners->isEmpty())
return true;
- QString openedObjectsStr = "<ul>";
- for (QPtrListIterator<KexiDB::Connection::TableSchemaChangeListenerInterface> it(*listeners);
+ TQString openedObjectsStr = "<ul>";
+ for (TQPtrListIterator<KexiDB::Connection::TableSchemaChangeListenerInterface> it(*listeners);
it.current(); ++it) {
- openedObjectsStr += QString("<li>%1</li>").arg(it.current()->listenerInfoString);
+ openedObjectsStr += TQString("<li>%1</li>").tqarg(it.current()->listenerInfoString);
}
openedObjectsStr += "</ul>";
- int r = KMessageBox::questionYesNo(parent,
+ int r = KMessageBox::questionYesNo(tqparent,
"<p>"+msg+"</p><p>"+openedObjectsStr+"</p><p>"
+i18n("Do you want to close all windows for these objects?"),
- QString::null, KGuiItem(i18n("Close windows"),"fileclose"), KStdGuiItem::cancel());
+ TQString(), KGuiItem(i18n("Close windows"),"fileclose"), KStdGuiItem::cancel());
tristate res;
if (r == KMessageBox::Yes) {
//try to close every window
@@ -202,8 +202,8 @@ tristate KexiTablePart::askForClosingObjectsUsingTableSchema(QWidget *parent, Ke
return res;
}
-QString
-KexiTablePart::i18nMessage(const QCString& englishMessage, KexiDialogBase* dlg) const
+TQString
+KexiTablePart::i18nMessage(const TQCString& englishMessage, KexiDialogBase* dlg) const
{
if (englishMessage=="Design of object \"%1\" has been modified.")
return i18n("Design of table \"%1\" has been modified.");
@@ -222,18 +222,18 @@ void KexiTablePart::setupCustomPropertyPanelTabs(KTabWidget *tab, KexiMainWindow
{
if (!d->lookupColumnPage) {
d->lookupColumnPage = new KexiLookupColumnPage(0);
- connect(d->lookupColumnPage, SIGNAL(jumpToObjectRequested(const QCString&, const QCString&)),
- mainWin, SLOT(highlightObject(const QCString&, const QCString&)));
+ connect(d->lookupColumnPage, TQT_SIGNAL(jumpToObjectRequested(const TQCString&, const TQCString&)),
+ mainWin, TQT_SLOT(highlightObject(const TQCString&, const TQCString&)));
//! @todo add "Table" tab
/*
- connect(d->dataSourcePage, SIGNAL(formDataSourceChanged(const QCString&, const QCString&)),
- KFormDesigner::FormManager::self(), SLOT(setFormDataSource(const QCString&, const QCString&)));
- connect(d->dataSourcePage, SIGNAL(dataSourceFieldOrExpressionChanged(const QString&, const QString&, KexiDB::Field::Type)),
- KFormDesigner::FormManager::self(), SLOT(setDataSourceFieldOrExpression(const QString&, const QString&, KexiDB::Field::Type)));
- connect(d->dataSourcePage, SIGNAL(insertAutoFields(const QString&, const QString&, const QStringList&)),
- KFormDesigner::FormManager::self(), SLOT(insertAutoFields(const QString&, const QString&, const QStringList&)));*/
+ connect(d->dataSourcePage, TQT_SIGNAL(formDataSourceChanged(const TQCString&, const TQCString&)),
+ KFormDesigner::FormManager::self(), TQT_SLOT(setFormDataSource(const TQCString&, const TQCString&)));
+ connect(d->dataSourcePage, TQT_SIGNAL(dataSourceFieldOrExpressionChanged(const TQString&, const TQString&, KexiDB::Field::Type)),
+ KFormDesigner::FormManager::self(), TQT_SLOT(setDataSourceFieldOrExpression(const TQString&, const TQString&, KexiDB::Field::Type)));
+ connect(d->dataSourcePage, TQT_SIGNAL(insertAutoFields(const TQString&, const TQString&, const TQStringList&)),
+ KFormDesigner::FormManager::self(), TQT_SLOT(insertAutoFields(const TQString&, const TQString&, const TQStringList&)));*/
}
KexiProject *prj = mainWin->project();
@@ -278,8 +278,8 @@ KexiTableDataSource::cursor(KexiProject * /*project*/,
//----------------
-KexiTablePart::TempData::TempData(QObject* parent)
- : KexiDialogTempData(parent)
+KexiTablePart::TempData::TempData(TQObject* tqparent)
+ : KexiDialogTempData(tqparent)
, table(0)
, tableSchemaChangedInPreviousView(true /*to force reloading on startup*/ )
{
diff --git a/kexi/plugins/tables/kexitablepart.h b/kexi/plugins/tables/kexitablepart.h
index e4b060ad..68825138 100644
--- a/kexi/plugins/tables/kexitablepart.h
+++ b/kexi/plugins/tables/kexitablepart.h
@@ -35,22 +35,23 @@ class KexiLookupColumnPage;
class KexiTablePart : public KexiPart::Part
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiTablePart(QObject *parent, const char *name, const QStringList &);
+ KexiTablePart(TQObject *tqparent, const char *name, const TQStringList &);
virtual ~KexiTablePart();
virtual bool remove(KexiMainWindow *win, KexiPart::Item &item);
virtual tristate rename(KexiMainWindow *win, KexiPart::Item &item,
- const QString& newName);
+ const TQString& newName);
// virtual KexiPart::DataSource *dataSource();
class TempData : public KexiDialogTempData
{
public:
- TempData(QObject* parent);
+ TempData(TQObject* tqparent);
KexiDB::TableSchema *table;
/*! true, if \a table member has changed in previous view. Used on view switching.
We're checking this flag to see if we should refresh data for DataViewMode. */
@@ -58,10 +59,10 @@ class KexiTablePart : public KexiPart::Part
};
static tristate askForClosingObjectsUsingTableSchema(
- QWidget *parent, KexiDB::Connection& conn,
- KexiDB::TableSchema& table, const QString& msg);
+ TQWidget *tqparent, KexiDB::Connection& conn,
+ KexiDB::TableSchema& table, const TQString& msg);
- virtual QString i18nMessage(const QCString& englishMessage,
+ virtual TQString i18nMessage(const TQCString& englishMessage,
KexiDialogBase* dlg) const;
KexiLookupColumnPage* lookupColumnPage() const;
@@ -69,8 +70,8 @@ class KexiTablePart : public KexiPart::Part
protected:
virtual KexiDialogTempData* createTempData(KexiDialogBase* dialog);
- virtual KexiViewBase* createView(QWidget *parent, KexiDialogBase* dialog,
- KexiPart::Item &item, int viewMode = Kexi::DataViewMode, QMap<QString,QString>* staticObjectArgs = 0);
+ virtual KexiViewBase* createView(TQWidget *tqparent, KexiDialogBase* dialog,
+ KexiPart::Item &item, int viewMode = Kexi::DataViewMode, TQMap<TQString,TQString>* staticObjectArgs = 0);
virtual void initPartActions();
virtual void initInstanceActions();