summaryrefslogtreecommitdiffstats
path: root/kexi/plugins/macros/kexiactions
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/macros/kexiactions
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/macros/kexiactions')
-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
15 files changed, 91 insertions, 86 deletions
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: