summaryrefslogtreecommitdiffstats
path: root/kexi/plugins/forms/kexiformeventhandler.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kexi/plugins/forms/kexiformeventhandler.cpp
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kexi/plugins/forms/kexiformeventhandler.cpp')
-rw-r--r--kexi/plugins/forms/kexiformeventhandler.cpp44
1 files changed, 22 insertions, 22 deletions
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;