summaryrefslogtreecommitdiffstats
path: root/quanta/utility/qpevents.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'quanta/utility/qpevents.cpp')
-rw-r--r--quanta/utility/qpevents.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/quanta/utility/qpevents.cpp b/quanta/utility/qpevents.cpp
index bb0d5db4..7bad8715 100644
--- a/quanta/utility/qpevents.cpp
+++ b/quanta/utility/qpevents.cpp
@@ -15,9 +15,9 @@
***************************************************************************/
//qt includes
-#include <qdatetime.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqdatetime.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
//kde includes
#include <kapplication.h>
@@ -36,8 +36,8 @@
#include "tagaction.h"
//TODO: Better create a class for each internal event action
-QPEvents::QPEvents(QObject *parent, const char *name)
- : QObject(parent, name)
+QPEvents::QPEvents(TQObject *parent, const char *name)
+ : TQObject(parent, name)
{
m_eventNames["before_save"] = i18n("Before Document Save");
m_eventNames["after_save"] = i18n("After Document Save");
@@ -70,7 +70,7 @@ QPEvents::~QPEvents()
{
}
-void QPEvents::slotEventHappened(const QString& name, const QString& argument1, const QString& argument2)
+void QPEvents::slotEventHappened(const TQString& name, const TQString& argument1, const TQString& argument2)
{
if (!quantaApp || !Project::ref()->eventsEnabled())
return;
@@ -79,8 +79,8 @@ void QPEvents::slotEventHappened(const QString& name, const QString& argument1,
if (events->contains(name))
{
m_eventName = name;
- QValueList<EventAction> evList = (*events)[name];
- for (QValueList<EventAction>::Iterator it = evList.begin(); it != evList.end(); ++it)
+ TQValueList<EventAction> evList = (*events)[name];
+ for (TQValueList<EventAction>::Iterator it = evList.begin(); it != evList.end(); ++it)
{
EventAction ev = *it;
if (ev.type == EventAction::Internal)
@@ -131,7 +131,7 @@ void QPEvents::slotEventHappened(const QString& name, const QString& argument1,
}
} else
{
- QString relativePath = QExtFileInfo::toRelative(url, Project::ref()->projectBaseURL()).path();
+ TQString relativePath = QExtFileInfo::toRelative(url, Project::ref()->projectBaseURL()).path();
if (inProject && name == "after_save")
{
ev.arguments << i18n("Document saved");
@@ -230,16 +230,16 @@ bool QPEvents::handleEvent(const EventAction& ev)
{
if (ev.action == "email")
{
- QString receiver = ev.arguments[0];
+ TQString receiver = ev.arguments[0];
TeamMember member;
if (receiver == "teamleader")
member = Project::ref()->teamLeader();
else if (receiver.startsWith("subprojectleader-"))
{
- QString s = receiver.remove("subprojectleader-");
+ TQString s = receiver.remove("subprojectleader-");
member = Project::ref()->subprojectLeader(s);
SubProject subProject;
- QValueList<SubProject> *subprojects = Project::ref()->subprojects();
+ TQValueList<SubProject> *subprojects = Project::ref()->subprojects();
for (uint i = 0 ; i < subprojects->count(); i++)
{
if ((*subprojects)[i].name == s)
@@ -257,16 +257,16 @@ bool QPEvents::handleEvent(const EventAction& ev)
else if (receiver.startsWith("taskleader-"))
member = Project::ref()->taskLeader(receiver.remove("taskleader-"));
- QString body;
+ TQString body;
for (uint i = 2; i < ev.arguments.count(); i++)
body += ev.arguments[i] + "\n";
- kapp->invokeMailer(member.name + "<" + member.email + ">", "", "", ev.arguments[1], body, "", QStringList(), "");
+ kapp->invokeMailer(member.name + "<" + member.email + ">", "", "", ev.arguments[1], body, "", TQStringList(), "");
return true;
}
if (ev.action == "log")
{
- QString logFile = ev.arguments[0];
+ TQString logFile = ev.arguments[0];
KURL url = KURL::fromPathOrURL(logFile);
if (url.isValid() && !url.isLocalFile())
{
@@ -283,7 +283,7 @@ bool QPEvents::handleEvent(const EventAction& ev)
return false;
}
}
- QFile file(url.path());
+ TQFile file(url.path());
bool result;
if (ev.arguments[2] == "create_new")
result = file.open(IO_WriteOnly);
@@ -291,10 +291,10 @@ bool QPEvents::handleEvent(const EventAction& ev)
result = file.open(IO_WriteOnly | IO_Append);
if (result)
{
- QTextStream stream(&file);
- stream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream stream(&file);
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
//Note: the log text should not be translated.
- QString s = QDateTime::currentDateTime().toString(Qt::ISODate) + ": ";
+ TQString s = TQDateTime::currentDateTime().toString(Qt::ISODate) + ": ";
s.append( "Event : " + m_eventName + " : ");
s.append( "Action: " + ev.action + " : ");
if (ev.arguments[1] == "full")
@@ -320,7 +320,7 @@ bool QPEvents::handleEvent(const EventAction& ev)
//KMessageBox::sorry(0L, i18n("External event actions are not yet supported."));
if (ev.action == "script" || ev.action =="action")
{
- QString name = ev.arguments[0];
+ TQString name = ev.arguments[0];
KAction *action = quantaApp->actionCollection()->action(name);
TagAction *tagAction = dynamic_cast<TagAction*>(action);
if (tagAction)
@@ -344,7 +344,7 @@ bool QPEvents::handleEvent(const EventAction& ev)
return false;
}
-QString QPEvents::fullEventName(const QString &name)
+TQString QPEvents::fullEventName(const TQString &name)
{
if (m_eventNames.contains(name))
return m_eventNames[name];
@@ -352,7 +352,7 @@ QString QPEvents::fullEventName(const QString &name)
return name;
}
-QString QPEvents::fullActionName(const QString& name)
+TQString QPEvents::fullActionName(const TQString& name)
{
if (m_actionNames.contains(name))
return m_actionNames[name];
@@ -360,9 +360,9 @@ QString QPEvents::fullActionName(const QString& name)
return name;
}
-QString QPEvents::eventName(const QString &fullName)
+TQString QPEvents::eventName(const TQString &fullName)
{
- for (QMap<QString, QString>::ConstIterator it = m_eventNames.constBegin(); it != m_eventNames.constEnd(); ++it)
+ for (TQMap<TQString, TQString>::ConstIterator it = m_eventNames.constBegin(); it != m_eventNames.constEnd(); ++it)
{
if (fullName == it.data())
return it.key();
@@ -370,9 +370,9 @@ QString QPEvents::eventName(const QString &fullName)
return fullName;
}
-QString QPEvents::actionName(const QString &fullName)
+TQString QPEvents::actionName(const TQString &fullName)
{
- for (QMap<QString, QString>::ConstIterator it = m_actionNames.constBegin(); it != m_actionNames.constEnd(); ++it)
+ for (TQMap<TQString, TQString>::ConstIterator it = m_actionNames.constBegin(); it != m_actionNames.constEnd(); ++it)
{
if (fullName == it.data())
return it.key();
@@ -380,20 +380,20 @@ QString QPEvents::actionName(const QString &fullName)
return fullName;
}
-QStringList QPEvents::eventNames()
+TQStringList QPEvents::eventNames()
{
- QStringList names;
- for (QMap<QString, QString>::ConstIterator it = m_eventNames.constBegin(); it != m_eventNames.constEnd(); ++it)
+ TQStringList names;
+ for (TQMap<TQString, TQString>::ConstIterator it = m_eventNames.constBegin(); it != m_eventNames.constEnd(); ++it)
{
names << it.data();
}
return names;
}
-QStringList QPEvents::actionNames()
+TQStringList QPEvents::actionNames()
{
- QStringList names;
- for (QMap<QString, QString>::ConstIterator it = m_actionNames.constBegin(); it != m_actionNames.constEnd(); ++it)
+ TQStringList names;
+ for (TQMap<TQString, TQString>::ConstIterator it = m_actionNames.constBegin(); it != m_actionNames.constEnd(); ++it)
{
names << it.data();
}