summaryrefslogtreecommitdiffstats
path: root/quanta/utility
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
commitdc6b8e72fed2586239e3514819238c520636c9d9 (patch)
tree88b200df0a0b7fab9d6f147596173556f1ed9a13 /quanta/utility
parent6927d4436e54551917f600b706a8d6109e49de1c (diff)
downloadtdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.tar.gz
tdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1157656 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'quanta/utility')
-rw-r--r--quanta/utility/newstuff.cpp22
-rw-r--r--quanta/utility/newstuff.h12
-rw-r--r--quanta/utility/qpevents.cpp64
-rw-r--r--quanta/utility/qpevents.h32
-rw-r--r--quanta/utility/quantabookmarks.cpp58
-rw-r--r--quanta/utility/quantabookmarks.h16
-rw-r--r--quanta/utility/quantacommon.cpp212
-rw-r--r--quanta/utility/quantacommon.h102
-rw-r--r--quanta/utility/quantanetaccess.cpp40
-rw-r--r--quanta/utility/quantanetaccess.h28
-rw-r--r--quanta/utility/resource.h18
-rw-r--r--quanta/utility/tagaction.cpp232
-rw-r--r--quanta/utility/tagaction.h40
-rw-r--r--quanta/utility/tagactionmanager.cpp8
-rw-r--r--quanta/utility/tagactionmanager.h10
-rw-r--r--quanta/utility/tagactionset.cpp74
-rw-r--r--quanta/utility/tagactionset.h36
-rw-r--r--quanta/utility/toolbartabwidget.cpp154
-rw-r--r--quanta/utility/toolbartabwidget.h50
-rw-r--r--quanta/utility/toolbarxmlgui.cpp2
-rw-r--r--quanta/utility/toolbarxmlgui.h2
21 files changed, 606 insertions, 606 deletions
diff --git a/quanta/utility/newstuff.cpp b/quanta/utility/newstuff.cpp
index f6cbf397..bc3a052f 100644
--- a/quanta/utility/newstuff.cpp
+++ b/quanta/utility/newstuff.cpp
@@ -13,7 +13,7 @@
* *
***************************************************************************/
//qt includes
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
//kde includes
#include <kglobal.h>
@@ -36,8 +36,8 @@ void QNewDTEPStuff::installResource()
if (tar.open(IO_ReadOnly))
{
const KArchiveDirectory *directory = tar.directory();
- QString dtepDir =KGlobal::dirs()->saveLocation("data") + resourceDir + "dtep/";
- QString dtdName = (*directory->entries().at(0));
+ TQString dtepDir =KGlobal::dirs()->saveLocation("data") + resourceDir + "dtep/";
+ TQString dtdName = (*directory->entries().at(0));
if (dtdName.isEmpty())
{
ok = false;
@@ -53,16 +53,16 @@ void QNewDTEPStuff::installResource()
KMessageBox::error(parentWidget(), i18n("There was an error with the downloaded DTEP tarball file. Possible causes are damaged archive or invalid directory structure in the archive."), i18n("DTEP Installation Error"));
}
-QNewToolbarStuff::QNewToolbarStuff(const QString &type, QWidget *parentWidget)
+QNewToolbarStuff::QNewToolbarStuff(const TQString &type, TQWidget *parentWidget)
:KNewStuffSecure(type, parentWidget)
{
- connect(this, SIGNAL(loadToolbarFile(const KURL&)), parentWidget, SLOT(slotLoadToolbarFile(const KURL&)));
+ connect(this, TQT_SIGNAL(loadToolbarFile(const KURL&)), parentWidget, TQT_SLOT(slotLoadToolbarFile(const KURL&)));
}
void QNewToolbarStuff::installResource()
{
- KURL destURL = KURL::fromPathOrURL(KGlobal::dirs()->saveLocation("data") + resourceDir + "toolbars/" + QFileInfo(m_tarName).fileName());
+ KURL destURL = KURL::fromPathOrURL(KGlobal::dirs()->saveLocation("data") + resourceDir + "toolbars/" + TQFileInfo(m_tarName).fileName());
bool ok = true;
if (QuantaCommon::checkOverwrite(destURL, parentWidget()))
{
@@ -80,16 +80,16 @@ void QNewToolbarStuff::installResource()
}
}
-QNewTemplateStuff::QNewTemplateStuff(const QString &type, QWidget *parentWidget)
+QNewTemplateStuff::QNewTemplateStuff(const TQString &type, TQWidget *parentWidget)
:KNewStuffSecure(type, parentWidget)
{
- connect(this, SIGNAL(openFile(const KURL&)), parentWidget, SLOT(slotFileOpen(const KURL&)));
+ connect(this, TQT_SIGNAL(openFile(const KURL&)), parentWidget, TQT_SLOT(slotFileOpen(const KURL&)));
}
void QNewTemplateStuff::installResource()
{
- KURL destURL = KURL::fromPathOrURL(KGlobal::dirs()->saveLocation("data") + resourceDir + "templates/" + QFileInfo(m_tarName).fileName());
+ KURL destURL = KURL::fromPathOrURL(KGlobal::dirs()->saveLocation("data") + resourceDir + "templates/" + TQFileInfo(m_tarName).fileName());
bool ok = true;
if (QuantaCommon::checkOverwrite(destURL, parentWidget()))
{
@@ -114,7 +114,7 @@ void QNewScriptStuff::installResource()
if (tar.open(IO_ReadOnly))
{
const KArchiveDirectory *directory = tar.directory();
- QString scriptsDir =KGlobal::dirs()->saveLocation("data") + resourceDir + "scripts/";
+ TQString scriptsDir =KGlobal::dirs()->saveLocation("data") + resourceDir + "scripts/";
directory->copyTo(scriptsDir, true);
tar.close();
} else
@@ -131,7 +131,7 @@ void QNewDocStuff::installResource()
if (tar.open(IO_ReadOnly))
{
const KArchiveDirectory *directory = tar.directory();
- QString docDir =KGlobal::dirs()->saveLocation("data") + resourceDir + "doc/";
+ TQString docDir =KGlobal::dirs()->saveLocation("data") + resourceDir + "doc/";
directory->copyTo(docDir, true);
tar.close();
} else
diff --git a/quanta/utility/newstuff.h b/quanta/utility/newstuff.h
index dd2ad104..bdd49a50 100644
--- a/quanta/utility/newstuff.h
+++ b/quanta/utility/newstuff.h
@@ -17,7 +17,7 @@
#define NEWSTUFF_H
//qt includes
-#include <qobject.h>
+#include <tqobject.h>
//kde includes
#include <knewstuff/knewstuffsecure.h>
@@ -34,7 +34,7 @@ class QNewDTEPStuff: public KNewStuffSecure
Q_OBJECT
public:
- QNewDTEPStuff(const QString &type, QWidget *parentWidget=0)
+ QNewDTEPStuff(const TQString &type, TQWidget *parentWidget=0)
:KNewStuffSecure(type, parentWidget){};
~QNewDTEPStuff() {};
@@ -52,7 +52,7 @@ class QNewToolbarStuff: public KNewStuffSecure
Q_OBJECT
public:
- QNewToolbarStuff(const QString &type, QWidget *parentWidget=0);
+ QNewToolbarStuff(const TQString &type, TQWidget *parentWidget=0);
~QNewToolbarStuff() {};
signals:
@@ -72,7 +72,7 @@ class QNewTemplateStuff: public KNewStuffSecure
Q_OBJECT
public:
- QNewTemplateStuff(const QString &type, QWidget *parentWidget=0);
+ QNewTemplateStuff(const TQString &type, TQWidget *parentWidget=0);
~QNewTemplateStuff() {};
signals:
@@ -92,7 +92,7 @@ class QNewScriptStuff: public KNewStuffSecure
Q_OBJECT
public:
- QNewScriptStuff(const QString &type, QWidget *parentWidget=0)
+ QNewScriptStuff(const TQString &type, TQWidget *parentWidget=0)
:KNewStuffSecure(type, parentWidget){};
~QNewScriptStuff() {};
@@ -110,7 +110,7 @@ class QNewDocStuff: public KNewStuffSecure
Q_OBJECT
public:
- QNewDocStuff(const QString &type, QWidget *parentWidget=0)
+ QNewDocStuff(const TQString &type, TQWidget *parentWidget=0)
:KNewStuffSecure(type, parentWidget){};
~QNewDocStuff() {};
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();
}
diff --git a/quanta/utility/qpevents.h b/quanta/utility/qpevents.h
index 83f6d37b..373ae089 100644
--- a/quanta/utility/qpevents.h
+++ b/quanta/utility/qpevents.h
@@ -17,7 +17,7 @@
#ifndef QPEVENTS_H
#define QPEVENTS_H
-#include <qobject.h>
+#include <tqobject.h>
/**
@author Andras Mantia
@@ -36,10 +36,10 @@ struct EventAction {
this is the name of the script, in case of internal events it can be one of the
following: "email"
*/
- QString action;
+ TQString action;
/** The arguments for the event action. It is different for each action.
*/
- QStringList arguments;
+ TQStringList arguments;
};
/** The configured events. The key is the event name, the data is the event description.
@@ -48,32 +48,32 @@ before a file is saved. Possible key names are: before_save, after_save, after_o
after_project_open, after_project_save, before_upload, after_upload, after_project_add,
after_project_remove, after_commit
*/
-typedef QMap<QString, QValueList<EventAction> > EventActions;
+typedef TQMap<TQString, TQValueList<EventAction> > EventActions;
class QPEvents : public QObject
{
Q_OBJECT
public:
- static QPEvents* const ref(QObject *parent = 0L)
+ static QPEvents* const ref(TQObject *parent = 0L)
{
static QPEvents *m_ref;
if (!m_ref) m_ref = new QPEvents(parent);
return m_ref;
}
~QPEvents();
- QString fullEventName(const QString &name);
- QString fullActionName(const QString &name);
- QString eventName(const QString &fullName);
- QString actionName(const QString &fullName);
- QStringList eventNames();
- QStringList actionNames();
+ TQString fullEventName(const TQString &name);
+ TQString fullActionName(const TQString &name);
+ TQString eventName(const TQString &fullName);
+ TQString actionName(const TQString &fullName);
+ TQStringList eventNames();
+ TQStringList actionNames();
public slots:
/** Called when an event has happened */
- void slotEventHappened(const QString& name, const QString& argument1, const QString& argument2);
+ void slotEventHappened(const TQString& name, const TQString& argument1, const TQString& argument2);
private:
- QPEvents(QObject *parent = 0, const char *name = 0);
+ QPEvents(TQObject *parent = 0, const char *name = 0);
/** Calls the action associated with an event. Returns true if the call succeeded, false
otherwise. The call might fail if:
- the action type is unknown
@@ -82,9 +82,9 @@ private:
*/
bool handleEvent(const EventAction& ev);
- QMap<QString, QString> m_eventNames;
- QMap<QString, QString> m_actionNames;
- QString m_eventName;
+ TQMap<TQString, TQString> m_eventNames;
+ TQMap<TQString, TQString> m_actionNames;
+ TQString m_eventName;
};
#endif
diff --git a/quanta/utility/quantabookmarks.cpp b/quanta/utility/quantabookmarks.cpp
index ebca5843..12ba69c5 100644
--- a/quanta/utility/quantabookmarks.cpp
+++ b/quanta/utility/quantabookmarks.cpp
@@ -31,21 +31,21 @@
#include <ktexteditor/editinterface.h>
#include <ktexteditor/viewcursorinterface.h>
-#include <qregexp.h>
-#include <qmemarray.h>
-#include <qevent.h>
+#include <tqregexp.h>
+#include <tqmemarray.h>
+#include <tqevent.h>
#include "viewmanager.h"
#include "document.h"
/**
Utility: selection sort
- sort a QMemArray<uint> in ascending order.
+ sort a TQMemArray<uint> in ascending order.
max it the largest (zerobased) index to sort.
To sort the entire array: ssort( *array, array.size() -1 );
This is only efficient if ran only once.
*/
-static void ssort( QMemArray<uint> &a, int max )
+static void ssort( TQMemArray<uint> &a, int max )
{
uint tmp, j, maxpos;
for ( uint h = max; h >= 1; h-- )
@@ -62,7 +62,7 @@ static void ssort( QMemArray<uint> &a, int max )
// TODO add a insort() or bubble_sort - more efficient for aboutToShow() ?
QuantaBookmarks::QuantaBookmarks(ViewManager *parent,Sorting sort, bool onlyFromActualDocument )
- : QObject( parent, "bookmarks" )
+ : TQObject( parent, "bookmarks" )
, m_sorting(sort)
, m_onlyFromActualDocument(onlyFromActualDocument)
{
@@ -86,38 +86,38 @@ void QuantaBookmarks::init(KActionCollection* ac)
{
m_bookmarkToggle = new KToggleAction(
i18n("Set &Bookmark"), "bookmark", CTRL+Key_B,
- this, SLOT(toggleBookmark()),
+ this, TQT_SLOT(toggleBookmark()),
ac, "bookmarks_toggle" );
m_bookmarkToggle->setWhatsThis(i18n("If a line has no bookmark then add one, otherwise remove it."));
m_bookmarkToggle->setCheckedState( i18n("Clear &Bookmark") );
m_bookmarkClear = new KAction(
i18n("Clear &All Bookmarks"), 0,
- this, SLOT(clearBookmarks()),
+ this, TQT_SLOT(clearBookmarks()),
ac, "bookmarks_clear");
m_bookmarkClear->setWhatsThis(i18n("Remove all bookmarks of the current document."));
m_goNext = new KAction(
i18n("Next Bookmark"), "next", ALT + Key_PageDown,
- this, SLOT(goNext()),
+ this, TQT_SLOT(goNext()),
ac, "bookmarks_next");
m_goNext->setWhatsThis(i18n("Go to the next bookmark."));
m_goPrevious = new KAction(
i18n("Previous Bookmark"), "previous", ALT + Key_PageUp,
- this, SLOT(goPrevious()),
+ this, TQT_SLOT(goPrevious()),
ac, "bookmarks_previous");
m_goPrevious->setWhatsThis(i18n("Go to the previous bookmark."));
//connect the aboutToShow() and aboutToHide() signals with
//the bookmarkMenuAboutToShow() and bookmarkMenuAboutToHide() slots
- connect( m_bookmarksMenu, SIGNAL(aboutToShow()), this, SLOT(bookmarkMenuAboutToShow()));
- connect( m_bookmarksMenu, SIGNAL(aboutToHide()), this, SLOT(bookmarkMenuAboutToHide()) );
+ connect( m_bookmarksMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(bookmarkMenuAboutToShow()));
+ connect( m_bookmarksMenu, TQT_SIGNAL(aboutToHide()), this, TQT_SLOT(bookmarkMenuAboutToHide()) );
marksChanged ();
}
-void QuantaBookmarks::setBookmarksMenu(QPopupMenu* bookmarksMenu)
+void QuantaBookmarks::setBookmarksMenu(TQPopupMenu* bookmarksMenu)
{
m_bookmarksMenu = bookmarksMenu;
@@ -147,7 +147,7 @@ void QuantaBookmarks::clearBookmarks ()
Document *doc = m_viewManager->activeDocument();
if (doc && doc->markIf)
{
- QPtrList<KTextEditor::Mark> m = doc->markIf->marks();
+ TQPtrList<KTextEditor::Mark> m = doc->markIf->marks();
for (uint i=0; i < m.count(); i++)
doc->markIf->removeMark( m.at(i)->line, KTextEditor::MarkInterface::markType01 );
@@ -156,21 +156,21 @@ void QuantaBookmarks::clearBookmarks ()
}
}
-int QuantaBookmarks::insertBookmarks(QPopupMenu& menu, Document *doc, bool insertNavigationItems )
+int QuantaBookmarks::insertBookmarks(TQPopupMenu& menu, Document *doc, bool insertNavigationItems )
{
int insertedItems = 0;
if (doc->markIf)
{
uint line = doc->viewCursorIf->cursorLine();
- const QRegExp re("&(?!&)");
+ const TQRegExp re("&(?!&)");
int idx( -1 );
int old_menu_count = menu.count();
KTextEditor::Mark *next = 0;
KTextEditor::Mark *prev = 0;
- QPtrList<KTextEditor::Mark> m = doc->markIf->marks();
- QMemArray<uint> sortArray( m.count() );
- QPtrListIterator<KTextEditor::Mark> it( m );
+ TQPtrList<KTextEditor::Mark> m = doc->markIf->marks();
+ TQMemArray<uint> sortArray( m.count() );
+ TQPtrListIterator<KTextEditor::Mark> it( m );
if ( it.count() > 0 && insertNavigationItems)
menu.insertSeparator();
@@ -179,7 +179,7 @@ int QuantaBookmarks::insertBookmarks(QPopupMenu& menu, Document *doc, bool inser
{
if( (*it)->type & KTextEditor::MarkInterface::markType01 )
{
- QString bText = KStringHandler::rEmSqueeze
+ TQString bText = KStringHandler::rEmSqueeze
( doc->editIf->textLine( (*it)->line ),
menu.fontMetrics(), 32 );
bText.replace(re, "&&"); // kill undesired accellerators!
@@ -196,7 +196,7 @@ int QuantaBookmarks::insertBookmarks(QPopupMenu& menu, Document *doc, bool inser
}
menu.insertItem(
- QString("%1 - \"%2\"").arg( (*it)->line+1 ).arg( bText ),
+ TQString("%1 - \"%2\"").arg( (*it)->line+1 ).arg( bText ),
0, (*it)->line, idx );
insertedItems++;
@@ -234,7 +234,7 @@ int QuantaBookmarks::insertBookmarks(QPopupMenu& menu, Document *doc, bool inser
if ( next || prev )
menu.insertSeparator( idx );
}
- connect(&menu, SIGNAL(activated(int)), this, SLOT(gotoLineNumber(int)));
+ connect(&menu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(gotoLineNumber(int)));
}
return insertedItems;
}
@@ -259,10 +259,10 @@ void QuantaBookmarks::bookmarkMenuAboutToShow()
Document *doc = m_doc;
if (!doc)
doc = m_viewManager->activeDocument();
- QValueList<Document*> openedDocuments = m_viewManager->openedDocuments();
+ TQValueList<Document*> openedDocuments = m_viewManager->openedDocuments();
if (doc && doc->markIf)
{
- QPtrList<KTextEditor::Mark> m = doc->markIf->marks();
+ TQPtrList<KTextEditor::Mark> m = doc->markIf->marks();
if (!m_onlyFromActualDocument)
{
@@ -279,11 +279,11 @@ void QuantaBookmarks::bookmarkMenuAboutToShow()
if (!m_onlyFromActualDocument)
{
int i = 0;
- for (QValueList<Document*>::Iterator it = openedDocuments.begin(); it != openedDocuments.end(); ++it)
+ for (TQValueList<Document*>::Iterator it = openedDocuments.begin(); it != openedDocuments.end(); ++it)
{
if (*it != doc)
{
- QPopupMenu *menu = new QPopupMenu(m_bookmarksMenu);
+ TQPopupMenu *menu = new TQPopupMenu(m_bookmarksMenu);
m_bookmarksMenu->insertItem((*it)->url().fileName(), menu);
if (insertBookmarks(*menu, *it, false) > 0)
{
@@ -317,7 +317,7 @@ void QuantaBookmarks::goNext()
doc = m_viewManager->activeDocument();
if (doc && doc->markIf)
{
- QPtrList<KTextEditor::Mark> m = doc->markIf->marks();
+ TQPtrList<KTextEditor::Mark> m = doc->markIf->marks();
if (m.isEmpty())
return;
@@ -340,7 +340,7 @@ void QuantaBookmarks::goPrevious()
doc = m_viewManager->activeDocument();
if (doc && doc->markIf)
{
- QPtrList<KTextEditor::Mark> m = doc->markIf->marks();
+ TQPtrList<KTextEditor::Mark> m = doc->markIf->marks();
if (m.isEmpty())
return;
@@ -361,7 +361,7 @@ void QuantaBookmarks::gotoLineNumber(int line)
Document *doc = m_doc;
if (!doc)
doc = m_viewManager->activeDocument();
- const QObject *s = sender();
+ const TQObject *s = sender();
for (uint i = 0; i < m_othersMenuList.count(); i++)
{
if (s == m_othersMenuList[i])
diff --git a/quanta/utility/quantabookmarks.h b/quanta/utility/quantabookmarks.h
index 10c0aad4..5170a774 100644
--- a/quanta/utility/quantabookmarks.h
+++ b/quanta/utility/quantabookmarks.h
@@ -24,8 +24,8 @@ Quanta, so it works over multiple document */
#ifndef QUANTABOOKMARKS_H
#define QUANTABOOKMARKS_H
-#include <qobject.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
namespace KTextEditor { class Mark; }
@@ -50,14 +50,14 @@ class QuantaBookmarks : public QObject
virtual ~QuantaBookmarks();
void createActions( KActionCollection* );
- void setBookmarksMenu(QPopupMenu* bookmarksMenu);
+ void setBookmarksMenu(TQPopupMenu* bookmarksMenu);
QuantaBookmarks::Sorting sorting() { return m_sorting; };
void setSorting( Sorting s ) { m_sorting = s; };
void setDocument(Document *doc) {m_doc = doc;}
protected:
- int insertBookmarks(QPopupMenu& menu, Document *doc, bool insertNavigationItems = true);
+ int insertBookmarks(TQPopupMenu& menu, Document *doc, bool insertNavigationItems = true);
void init(KActionCollection* ac = 0L);
private slots:
@@ -74,7 +74,7 @@ class QuantaBookmarks : public QObject
void marksChanged ();
signals:
- void gotoFileAndLine(const QString&, int, int);
+ void gotoFileAndLine(const TQString&, int, int);
private:
KToggleAction* m_bookmarkToggle;
@@ -83,9 +83,9 @@ class QuantaBookmarks : public QObject
KAction* m_goPrevious;
Sorting m_sorting;
- QPopupMenu* m_bookmarksMenu;
- QValueList<QPopupMenu*> m_othersMenuList;
- QValueList<Document*> m_others;
+ TQPopupMenu* m_bookmarksMenu;
+ TQValueList<TQPopupMenu*> m_othersMenuList;
+ TQValueList<Document*> m_others;
ViewManager* m_viewManager;
Document *m_doc;
bool m_onlyFromActualDocument;
diff --git a/quanta/utility/quantacommon.cpp b/quanta/utility/quantacommon.cpp
index 7cc7fb1b..93421764 100644
--- a/quanta/utility/quantacommon.cpp
+++ b/quanta/utility/quantacommon.cpp
@@ -18,13 +18,13 @@
#include <unistd.h>
//qt includes
-#include <qstringlist.h>
-#include <qdict.h>
-#include <qdir.h>
-#include <qdom.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qwidget.h>
+#include <tqstringlist.h>
+#include <tqdict.h>
+#include <tqdir.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqwidget.h>
//kde includes
#include <kapplication.h>
@@ -48,10 +48,10 @@
#include <ktoolbar.h>
#include <ktoolbarbutton.h>
#include <kstringhandler.h>
-#include <qwhatsthis.h>
-#include <qtimer.h>
-#include <qclipboard.h>
-#include <qdatastream.h>
+#include <tqwhatsthis.h>
+#include <tqtimer.h>
+#include <tqclipboard.h>
+#include <tqdatastream.h>
#include "qextfileinfo.h"
#include "quantacommon.h"
@@ -61,22 +61,22 @@
QConfig qConfig; //holds the main configuration settings
-QString tmpDir;
+TQString tmpDir;
-QRegExp scriptBeginRx;
-QRegExp scriptEndRx;
+TQRegExp scriptBeginRx;
+TQRegExp scriptEndRx;
Node *baseNode;
Parser *parser;
KDirWatch *fileWatcher;
KProgress *progressBar;
-QString toolbarExtension = ".toolbar.tgz";
-QRegExp newLineRx("\\n");
-QStringList charList; //hold the list of the &char; chars. See the data/chars file.
-QMap<int, QString> replacementMap;
-QPtrList<KTempFile> tempFileList;
-QPtrList<KTempDir> tempDirList;
+TQString toolbarExtension = ".toolbar.tgz";
+TQRegExp newLineRx("\\n");
+TQStringList charList; //hold the list of the &char; chars. See the data/chars file.
+TQMap<int, TQString> replacementMap;
+TQPtrList<KTempFile> tempFileList;
+TQPtrList<KTempDir> tempDirList;
bool typingInProgress;
QuantaCommon::QuantaCommon(){
@@ -86,9 +86,9 @@ QuantaCommon::~QuantaCommon(){
}
/** convert tag to upper or lower case */
-QString QuantaCommon::tagCase( const QString& tag)
+TQString QuantaCommon::tagCase( const TQString& tag)
{
- QString sTag = tag;
+ TQString sTag = tag;
switch (qConfig.tagCase)
{
@@ -100,9 +100,9 @@ QString QuantaCommon::tagCase( const QString& tag)
}
/** convert attr of tag to upper or lower case */
-QString QuantaCommon::attrCase( const QString& attr)
+TQString QuantaCommon::attrCase( const TQString& attr)
{
- QString sAttr = attr;
+ TQString sAttr = attr;
switch (qConfig.attrCase)
{
@@ -115,14 +115,14 @@ QString QuantaCommon::attrCase( const QString& attr)
/** returns the attribute value in quoted form, by taking care of the
quotation setting*/
-QString QuantaCommon::quoteAttributeValue(const QString& value)
+TQString QuantaCommon::quoteAttributeValue(const TQString& value)
{
- QString quote = qConfig.attrValueQuotation;
+ TQString quote = qConfig.attrValueQuotation;
return quote + value + quote;
}
/** Set's up the url correctly from urlString. */
-void QuantaCommon::setUrl(KURL &url, const QString& urlString)
+void QuantaCommon::setUrl(KURL &url, const TQString& urlString)
{
KURL oldUrl = url;
url = urlString;
@@ -136,7 +136,7 @@ void QuantaCommon::setUrl(KURL &url, const QString& urlString)
}
/** No descriptions */
-bool QuantaCommon::isSingleTag(const QString& dtdName, const QString& tag)
+bool QuantaCommon::isSingleTag(const TQString& dtdName, const TQString& tag)
{
bool single = false;
@@ -147,7 +147,7 @@ bool QuantaCommon::isSingleTag(const QString& dtdName, const QString& tag)
const DTDStruct* dtd = DTDs::ref()->find(dtdName);
if (dtd && !tag.isEmpty())
{
- QString searchForTag = (dtd->caseSensitive) ? tag : tag.upper();
+ TQString searchForTag = (dtd->caseSensitive) ? tag : tag.upper();
QTag* qtag = dtd->tagsList->find(searchForTag);
if (qtag)
single = qtag->isSingle();
@@ -157,14 +157,14 @@ bool QuantaCommon::isSingleTag(const QString& dtdName, const QString& tag)
}
/** No descriptions */
-bool QuantaCommon::isOptionalTag(const QString& dtdName, const QString& tag)
+bool QuantaCommon::isOptionalTag(const TQString& dtdName, const TQString& tag)
{
bool optional = false;
const DTDStruct* dtd = DTDs::ref()->find(dtdName);
if (dtd && !tag.isEmpty())
{
- QString searchForTag = (dtd->caseSensitive) ? tag : tag.upper();
+ TQString searchForTag = (dtd->caseSensitive) ? tag : tag.upper();
QTag* qtag = dtd->tagsList->find(searchForTag);
if (qtag)
optional = qtag->isOptional();
@@ -173,14 +173,14 @@ bool QuantaCommon::isOptionalTag(const QString& dtdName, const QString& tag)
return optional;
}
/** No descriptions */
-bool QuantaCommon::isKnownTag(const QString& dtdName, const QString& tag)
+bool QuantaCommon::isKnownTag(const TQString& dtdName, const TQString& tag)
{
bool known = false;
const DTDStruct* dtd = DTDs::ref()->find(dtdName);
if (dtd && !tag.isEmpty())
{
- QString searchForTag = (dtd->caseSensitive) ? tag : tag.upper();
+ TQString searchForTag = (dtd->caseSensitive) ? tag : tag.upper();
if (dtd->tagsList->find(searchForTag))
known = true;
}
@@ -188,14 +188,14 @@ bool QuantaCommon::isKnownTag(const QString& dtdName, const QString& tag)
return known;
}
-AttributeList* QuantaCommon::tagAttributes(const QString& dtdName, const QString& tag)
+AttributeList* QuantaCommon::tagAttributes(const TQString& dtdName, const TQString& tag)
{
AttributeList* attrs = 0L;
const DTDStruct* dtd = DTDs::ref()->find(dtdName);
if (dtd && !tag.isEmpty())
{
- QString searchForTag = (dtd->caseSensitive) ? tag : tag.upper();
+ TQString searchForTag = (dtd->caseSensitive) ? tag : tag.upper();
QTag* qtag = dtd->tagsList->find(searchForTag);
if (qtag)
attrs = qtag->attributes();
@@ -205,19 +205,19 @@ AttributeList* QuantaCommon::tagAttributes(const QString& dtdName, const QString
}
/** Returns the QTag object for the tag "tag" from the DTD named "dtdname". */
-QTag* QuantaCommon::tagFromDTD(const QString& dtdName, const QString& tag)
+QTag* QuantaCommon::tagFromDTD(const TQString& dtdName, const TQString& tag)
{
const DTDStruct* dtd = DTDs::ref()->find(dtdName);
return tagFromDTD(dtd, tag);
}
/** Returns the QTag object for the tag "tag" from the DTD. */
-QTag* QuantaCommon::tagFromDTD(const DTDStruct *dtd, const QString& tag)
+QTag* QuantaCommon::tagFromDTD(const DTDStruct *dtd, const TQString& tag)
{
QTag *qtag = 0;
if (dtd && !tag.isEmpty())
{
- QString searchForTag = (dtd->caseSensitive) ? tag : tag.upper();
+ TQString searchForTag = (dtd->caseSensitive) ? tag : tag.upper();
qtag = dtd->tagsList->find(searchForTag);
}
@@ -234,18 +234,18 @@ QTag* QuantaCommon::tagFromDTD(Node *node)
}
/** Returns an XML style string containing the GUI for attributes. */
-QString QuantaCommon::xmlFromAttributes(AttributeList* attributes)
+TQString QuantaCommon::xmlFromAttributes(AttributeList* attributes)
{
- QString xmlStr;
- QTextStream stream( &xmlStr, IO_WriteOnly );
- stream.setEncoding(QTextStream::UnicodeUTF8);
+ TQString xmlStr;
+ TQTextStream stream( &xmlStr, IO_WriteOnly );
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
if (attributes)
{
int row = 0;
for ( uint i = 0; i< attributes->count();i++)
{
Attribute *attribute = attributes->at(i);
- QString name = attribute->name.left(1).upper()+attribute->name.right(attribute->name.length()-1);
+ TQString name = attribute->name.left(1).upper()+attribute->name.right(attribute->name.length()-1);
stream << " <attr name=\"" + attribute->name +"\" type=\""+attribute->type+"\"";
if (!attribute->defaultValue.isEmpty())
stream << " defaultValue=\"" + attribute->defaultValue + "\"";
@@ -301,13 +301,13 @@ KStandardDirs* QuantaCommon::pluginDirs(const char *type)
return dirs;
}
/** Return true, if the url belong to the mimetype group. */
-bool QuantaCommon::checkMimeGroup(const KURL& url, const QString& group)
+bool QuantaCommon::checkMimeGroup(const KURL& url, const TQString& group)
{
KMimeType::List list = KMimeType::allMimeTypes();
KMimeType::List::iterator it;
bool status = false;
KMimeType::Ptr mime = KMimeType::findByURL(url);
- QString mimetype = mime->name();
+ TQString mimetype = mime->name();
mimetype = mimetype.section('/',-1);
for ( it = list.begin(); it != list.end(); ++it )
{
@@ -327,7 +327,7 @@ bool QuantaCommon::checkMimeGroup(const KURL& url, const QString& group)
status = true;
} else
{
- QVariant v = mime->property("X-KDE-text");
+ TQVariant v = mime->property("X-KDE-text");
if (v.isValid())
status = v.toBool();
}
@@ -339,10 +339,10 @@ bool QuantaCommon::checkMimeGroup(const KURL& url, const QString& group)
}
/** Return true, if the url has the mimetype type. */
-bool QuantaCommon::checkMimeType(const KURL& url, const QString& type)
+bool QuantaCommon::checkMimeType(const KURL& url, const TQString& type)
{
bool status = false;
- QString mimetype = KMimeType::findByURL(url)->name();
+ TQString mimetype = KMimeType::findByURL(url)->name();
mimetype = mimetype.section('/',-1);
if (mimetype == type) status = true;
@@ -350,10 +350,10 @@ bool QuantaCommon::checkMimeType(const KURL& url, const QString& type)
}
/** Return true, if the url has exactly the mimetype type. */
-bool QuantaCommon::checkExactMimeType(const KURL& url, const QString& type)
+bool QuantaCommon::checkExactMimeType(const KURL& url, const TQString& type)
{
bool status = false;
- QString mimetype = KMimeType::findByURL(url)->name();
+ TQString mimetype = KMimeType::findByURL(url)->name();
if (mimetype == type) status = true;
return status;
@@ -371,15 +371,15 @@ KURL QuantaCommon::convertToPath(const KURL& url)
/** Return a string to be used when an url is saved to the project file.
Returns url.url() if it's an absolute url and
url.path() if the url is relative */
-QString QuantaCommon::qUrl(const KURL &url)
+TQString QuantaCommon::qUrl(const KURL &url)
{
- QString result = url.path();
+ TQString result = url.path();
if (url.path().startsWith("/")) result = url.url();
return result;
}
/** No descriptions */
-void QuantaCommon::dirCreationError(QWidget *widget, const KURL& url)
+void QuantaCommon::dirCreationError(TQWidget *widget, const KURL& url)
{
KMessageBox::error(widget, i18n("<qt>Cannot create folder<br><b>%1</b>.<br>Check that you have write permission in the parent folder or that the connection to<br><b>%2</b><br> is valid.</qt>")
.arg(url.prettyURL(0, KURL::StripFileProtocol))
@@ -388,26 +388,26 @@ void QuantaCommon::dirCreationError(QWidget *widget, const KURL& url)
/**
Adds the backslash before the special chars (like ?, *, . ) so the returned
string can be used in regular expressions.*/
-QString QuantaCommon::makeRxCompatible(const QString& s)
+TQString QuantaCommon::makeRxCompatible(const TQString& s)
{
const uint max = 7;
- const QRegExp rxs[max]={QRegExp("\\?"),
- QRegExp("\\*"),
- QRegExp("\\."),
- QRegExp("\\^"),
- QRegExp("\\$"),
- QRegExp("\\{"),
- QRegExp("\\}")
+ const TQRegExp rxs[max]={TQRegExp("\\?"),
+ TQRegExp("\\*"),
+ TQRegExp("\\."),
+ TQRegExp("\\^"),
+ TQRegExp("\\$"),
+ TQRegExp("\\{"),
+ TQRegExp("\\}")
};
- const QString strs[max]={QString("\\?"),
- QString("\\*"),
- QString("\\."),
- QString("\\^"),
- QString("\\$"),
- QString("\\{"),
- QString("\\}")
+ const TQString strs[max]={TQString("\\?"),
+ TQString("\\*"),
+ TQString("\\."),
+ TQString("\\^"),
+ TQString("\\$"),
+ TQString("\\{"),
+ TQString("\\}")
};
- QString str = s;
+ TQString str = s;
for (uint i = 0; i < max - 1; i++)
{
str.replace(rxs[i], strs[i]);
@@ -417,11 +417,11 @@ QString QuantaCommon::makeRxCompatible(const QString& s)
}
/** Returns the translated a_str in English. A "back-translation" useful e.g in case of CSS elements selected from a listbox. */
-QString QuantaCommon::i18n2normal(const QString& a_str)
+TQString QuantaCommon::i18n2normal(const TQString& a_str)
{
-//TODO: a QMap lookup would be faster, but we need a pre-built QMap<QString,QString>
+//TODO: a TQMap lookup would be faster, but we need a pre-built TQMap<TQString,TQString>
const int keywordNum = 15 *5;
- const QString keywords[keywordNum] =
+ const TQString keywords[keywordNum] =
{"normal", "italic", "oblique", "serif", "sans-serif",
"cursive", "fantasy", "monospace", "small-caps", "lighter",
"bold", "bolder", "xx-small", "x-small", "small",
@@ -437,7 +437,7 @@ QString QuantaCommon::i18n2normal(const QString& a_str)
"none", "pre", "nowrap", "disc", "circle",
"square", "decimal", "lower-roman","upper-roman","lower-alpha",
"upper-alpha","inside","outside", "auto", "both" };
- QString str = a_str;
+ TQString str = a_str;
if (!a_str.isEmpty())
{
for (int i = 0; i < keywordNum; i++)
@@ -452,15 +452,15 @@ QString QuantaCommon::i18n2normal(const QString& a_str)
return str;
}
-static const QChar space(' ');
+static const TQChar space(' ');
-void QuantaCommon::removeCommentsAndQuotes(QString &str, const DTDStruct *dtd)
+void QuantaCommon::removeCommentsAndQuotes(TQString &str, const DTDStruct *dtd)
{
//Replace all the commented strings and the escaped quotation marks (\", \')
// with spaces so they will not mess up our parsing
int pos = 0;
int l;
- QString s;
+ TQString s;
while (pos != -1)
{
pos = dtd->commentsStartRx.search(str, pos);
@@ -500,7 +500,7 @@ void QuantaCommon::removeCommentsAndQuotes(QString &str, const DTDStruct *dtd)
}
//Now replace the quoted strings with spaces
- QRegExp strRx("(\"[^\"]*\"|'[^']*')");
+ TQRegExp strRx("(\"[^\"]*\"|'[^']*')");
pos = 0;
while (pos != -1)
{
@@ -518,13 +518,13 @@ void QuantaCommon::removeCommentsAndQuotes(QString &str, const DTDStruct *dtd)
}
-bool QuantaCommon::insideCommentsOrQuotes(int position, const QString &string, const DTDStruct *dtd)
+bool QuantaCommon::insideCommentsOrQuotes(int position, const TQString &string, const DTDStruct *dtd)
{
//Return true if position is inside a commented or quoted string
- QString str = string;
+ TQString str = string;
int pos = 0;
int l;
- QString s;
+ TQString s;
while (pos != -1)
{
pos = dtd->commentsStartRx.search(str, pos);
@@ -568,7 +568,7 @@ bool QuantaCommon::insideCommentsOrQuotes(int position, const QString &string, c
}
//Now replace the quoted strings with spaces
- const QRegExp strRx("(\"[^\"]*\"|'[^']*')");
+ const TQRegExp strRx("(\"[^\"]*\"|'[^']*')");
pos = 0;
while (pos != -1)
{
@@ -589,14 +589,14 @@ bool QuantaCommon::insideCommentsOrQuotes(int position, const QString &string, c
return false;
}
-DCOPReply QuantaCommon::callDCOPMethod(const QString& interface, const QString& method, const QString& arguments)
+DCOPReply QuantaCommon::callDCOPMethod(const TQString& interface, const TQString& method, const TQString& arguments)
{
- QStringList argumentList = QStringList::split(",", arguments, true);
- QString app = "quanta";
+ TQStringList argumentList = TQStringList::split(",", arguments, true);
+ TQString app = "quanta";
if (!kapp->inherits("KUniqueApplication"))
{
pid_t pid = ::getpid();
- app += QString("-%1").arg(pid);
+ app += TQString("-%1").arg(pid);
}
DCOPRef quantaRef(app.utf8(), interface.utf8());
DCOPReply reply;
@@ -627,7 +627,7 @@ DCOPReply QuantaCommon::callDCOPMethod(const QString& interface, const QString&
return reply;
}
-void QuantaCommon::normalizeStructure(QString f,QStringList& l)
+void QuantaCommon::normalizeStructure(TQString f,TQStringList& l)
{
f.remove("\t");
f.remove("\n");
@@ -635,7 +635,7 @@ void QuantaCommon::normalizeStructure(QString f,QStringList& l)
while(f.contains("<"))
{
- QString z(f);
+ TQString z(f);
z.truncate(z.find(">")+1);
z.remove(0,z.find("<"));
f.remove(0,f.find(">")+1);
@@ -649,26 +649,26 @@ bool QuantaCommon::closesTag(Tag *tag1, Tag *tag2)
{
if (!tag2->nameSpace.isEmpty())
return false; //namespace missmatch
- QString tag1Name = tag1->dtd()->caseSensitive ? tag1->name : tag1->name.upper();
- QString tag2Name = tag2->dtd()->caseSensitive ? tag2->name : tag2->name.upper();
+ TQString tag1Name = tag1->dtd()->caseSensitive ? tag1->name : tag1->name.upper();
+ TQString tag2Name = tag2->dtd()->caseSensitive ? tag2->name : tag2->name.upper();
if ("/" + tag1Name != tag2Name)
return false; //not the closing tag
} else
{
if (tag2->nameSpace.isEmpty())
return false; //namespace missmatch
- QString tag1Name = tag1->dtd()->caseSensitive ? (tag1->nameSpace + tag1->name) : (tag1->nameSpace.upper() + tag1->name.upper());
- QString tag2Name = tag2->dtd()->caseSensitive ? (tag2->nameSpace + tag2->name) : (tag2->nameSpace.upper() + tag2->name.upper());
+ TQString tag1Name = tag1->dtd()->caseSensitive ? (tag1->nameSpace + tag1->name) : (tag1->nameSpace.upper() + tag1->name.upper());
+ TQString tag2Name = tag2->dtd()->caseSensitive ? (tag2->nameSpace + tag2->name) : (tag2->nameSpace.upper() + tag2->name.upper());
if ("/" + tag1Name != tag2Name)
return false; //namespace missmatch or not the closing tag
}
return true;
}
-bool QuantaCommon::closesTag(QString namespaceName, QString tagName, bool caseSensitive,
- QString namespaceName2, QString tagName2, bool caseSensitive2)
+bool QuantaCommon::closesTag(TQString namespaceName, TQString tagName, bool caseSensitive,
+ TQString namespaceName2, TQString tagName2, bool caseSensitive2)
{
- QString tag1Name, tag2Name;
+ TQString tag1Name, tag2Name;
if(namespaceName.isEmpty())
{
if(!namespaceName.isEmpty())
@@ -692,7 +692,7 @@ bool QuantaCommon::closesTag(QString namespaceName, QString tagName, bool caseSe
return true;
}
-int QuantaCommon::denyBinaryInsert(QWidget *window)
+int QuantaCommon::denyBinaryInsert(TQWidget *window)
{
int result = KMessageBox::questionYesNo(window, i18n("The file type is not recognized. \
Opening binary files may confuse Quanta.\n Are you sure you want to open this file?"),
@@ -700,25 +700,25 @@ int QuantaCommon::denyBinaryInsert(QWidget *window)
return result;
}
-bool QuantaCommon::checkOverwrite(const KURL& url, QWidget *window)
+bool QuantaCommon::checkOverwrite(const KURL& url, TQWidget *window)
{
bool result = true;
if (QExtFileInfo::exists(url, false, window))
{
if (KMessageBox::warningContinueCancel(window,
- i18n( "<qt>The file <b>%1</b> already exists.<br>Do you want to overwrite it?</qt>" ).arg(url.prettyURL(0, KURL::StripFileProtocol)), QString::null, i18n("Overwrite")) == KMessageBox::Cancel)
+ i18n( "<qt>The file <b>%1</b> already exists.<br>Do you want to overwrite it?</qt>" ).arg(url.prettyURL(0, KURL::StripFileProtocol)), TQString::null, i18n("Overwrite")) == KMessageBox::Cancel)
result = false;
}
return result;
}
-QStringList QuantaCommon::readPathListEntry(KConfig *config, const QString &pKey)
+TQStringList QuantaCommon::readPathListEntry(KConfig *config, const TQString &pKey)
{
- QStringList list = config->readPathListEntry(pKey);
- QStringList::Iterator end = list.end();
- for (QStringList::Iterator it = list.begin(); it != end; ++it)
+ TQStringList list = config->readPathListEntry(pKey);
+ TQStringList::Iterator end = list.end();
+ for (TQStringList::Iterator it = list.begin(); it != end; ++it)
{
KURL u = KURL::fromPathOrURL(*it);
if (u.isValid() && u.isLocalFile())
@@ -730,9 +730,9 @@ QStringList QuantaCommon::readPathListEntry(KConfig *config, const QString &pKey
return list;
}
-QString QuantaCommon::readPathEntry(KConfig *config, const QString &pKey)
+TQString QuantaCommon::readPathEntry(KConfig *config, const TQString &pKey)
{
- QString path = config->readPathEntry(pKey);
+ TQString path = config->readPathEntry(pKey);
KURL u = KURL::fromPathOrURL(path);
if (u.isValid() && u.isLocalFile())
{
@@ -742,12 +742,12 @@ QString QuantaCommon::readPathEntry(KConfig *config, const QString &pKey)
return path;
}
-QString QuantaCommon::encodedChar(uint code)
+TQString QuantaCommon::encodedChar(uint code)
{
if (replacementMap.contains(code))
- return QString("%1;").arg(replacementMap[code]);
+ return TQString("%1;").arg(replacementMap[code]);
else
- return QString("&#%1;").arg(code);
+ return TQString("&#%1;").arg(code);
}
diff --git a/quanta/utility/quantacommon.h b/quanta/utility/quantacommon.h
index a88276b7..c9e283fa 100644
--- a/quanta/utility/quantacommon.h
+++ b/quanta/utility/quantacommon.h
@@ -26,7 +26,7 @@
*@author Andras Mantia
*/
-#define DEFAULT_DTD QString("-//W3C//DTD HTML 4.01 Transitional//EN")
+#define DEFAULT_DTD TQString("-//W3C//DTD HTML 4.01 Transitional//EN")
class QString;
class DCOPReply;
@@ -42,8 +42,8 @@ class KPopupMenu;
class Abbreviation{
public:
/*A list with abbreviations in the for of: <template templatename, code> */
- QMap<QString, QString> abbreviations;
- QStringList dteps;
+ TQMap<TQString, TQString> abbreviations;
+ TQStringList dteps;
};
@@ -53,7 +53,7 @@ public:
//Tag style options
uint tagCase;
uint attrCase;
- QChar attrValueQuotation;
+ TQChar attrValueQuotation;
bool closeOptionalTags;
bool closeTags;
bool updateClosingTags;
@@ -61,17 +61,17 @@ public:
//editor settings
bool useAutoCompletion;
bool enableDTDToolbar;
- QString defaultEncoding;
+ TQString defaultEncoding;
//parser options
bool instantUpdate;
bool showEmptyNodes;
bool showClosingTags;
uint refreshFrequency;
- QString defaultDocType;
+ TQString defaultDocType;
uint expandLevel;
bool showDTDSelectDialog;
- QString showCloseButtons; ///< can be Disabled, ShowAlways or ShowDelayed
+ TQString showCloseButtons; ///< can be Disabled, ShowAlways or ShowDelayed
uint toolviewTabs; ///< how does the toolview tabs look like
//kafka sync options
@@ -84,30 +84,30 @@ public:
bool inlineNodeIndentation;
//environment options
- QString globalDataDir; //not stored, initialized on app startup
- QStringList pluginSearchPaths; //global but read from plugins.rc
- QString markupMimeTypes;
- QString scriptMimeTypes;
- QString imageMimeTypes;
- QString textMimeTypes;
- QString previewPosition;
- QString docPosition;
- QString windowLayout;
+ TQString globalDataDir; //not stored, initialized on app startup
+ TQStringList pluginSearchPaths; //global but read from plugins.rc
+ TQString markupMimeTypes;
+ TQString scriptMimeTypes;
+ TQString imageMimeTypes;
+ TQString textMimeTypes;
+ TQString previewPosition;
+ TQString docPosition;
+ TQString windowLayout;
uint autosaveInterval;
- QString backupDirPath;
- QString quantaPID;
+ TQString backupDirPath;
+ TQString quantaPID;
bool showHiddenFiles; ///< show hidden files in files treeview?
bool saveTrees; ///< save tree status for local trees?
- QMap<QString, Abbreviation> abbreviations; ///< the abbreviation groups
+ TQMap<TQString, Abbreviation> abbreviations; ///< the abbreviation groups
bool replaceAccented; ///< replace or not the accented characters
bool replaceNotInEncoding; ///< replace characters with their entity number if they cannot be saved in the current encoding of the document.
bool smartTagInsertion; //enable/disable smartTagInsertion
};
typedef struct DirInfo{
- QString mimeType;
- QString preText;
- QString postText;
+ TQString mimeType;
+ TQString preText;
+ TQString postText;
bool usePrePostText;
};
@@ -121,30 +121,30 @@ public:
~QuantaCommon();
/** convert tag to upper or lower case */
- static QString tagCase( const QString& tag);
+ static TQString tagCase( const TQString& tag);
/** convert tag to upper or lower case */
- static QString attrCase( const QString& attr);
+ static TQString attrCase( const TQString& attr);
/** returns the attribute value in quoted form, by taking care of the
quotation setting*/
- static QString quoteAttributeValue(const QString& value);
+ static TQString quoteAttributeValue(const TQString& value);
/** Set's up the url correctly from urlString. */
- static void setUrl(KURL &url, const QString& urlString);
+ static void setUrl(KURL &url, const TQString& urlString);
/** No descriptions */
- static bool isSingleTag(const QString& dtdName, const QString& tag);
+ static bool isSingleTag(const TQString& dtdName, const TQString& tag);
/** No descriptions */
- static bool isOptionalTag(const QString& dtdName, const QString& tag);
+ static bool isOptionalTag(const TQString& dtdName, const TQString& tag);
/** No descriptions */
- static bool isKnownTag(const QString& dtdName, const QString& tag);
+ static bool isKnownTag(const TQString& dtdName, const TQString& tag);
/** No descriptions */
- static AttributeList* tagAttributes(const QString& dtdName, const QString& tag);
+ static AttributeList* tagAttributes(const TQString& dtdName, const TQString& tag);
/** Returns the QTag object for the tag "tag" from the DTD named "dtdname". */
- static QTag* tagFromDTD(const QString& dtdName, const QString& tag);
+ static QTag* tagFromDTD(const TQString& dtdName, const TQString& tag);
/** Returns the QTag object for the tag "tag" from the DTD. */
- static QTag* tagFromDTD(const DTDStruct* dtd, const QString& tag);
+ static QTag* tagFromDTD(const DTDStruct* dtd, const TQString& tag);
/** Returns the QTag object for the node "node" from node's DTD. */
static QTag* tagFromDTD(Node *node);
/** Returns an XML style string containing the GUI for attributes. */
- static QString xmlFromAttributes(AttributeList* attributes);
+ static TQString xmlFromAttributes(AttributeList* attributes);
/** Returns 0 if the (line,col) is inside the area specified by the other arguments,
-1 if it is before the area and 1 if it is after. */
static int isBetween(int line, int col, int bLine, int bCol, int eLine, int eCol);
@@ -153,47 +153,47 @@ pointer must be deleted by the caller!! */
static KStandardDirs* pluginDirs(const char *type);
/** Return true, if the url has the mimetype starting with type. */
- static bool checkMimeGroup(const KURL& url, const QString& type);
+ static bool checkMimeGroup(const KURL& url, const TQString& type);
/** Return true, if the url has the mimetype type. */
- static bool checkMimeType(const KURL& url, const QString& type);
+ static bool checkMimeType(const KURL& url, const TQString& type);
/** Return true, if the url has exactly the mimetype type. */
- static bool checkExactMimeType(const KURL& url, const QString& type);
+ static bool checkExactMimeType(const KURL& url, const TQString& type);
/** Returns the url without the filename. */
static KURL convertToPath(const KURL& url);
/** Return a string to be used when an url is saved to the project file.
Returns url.url() if it's an absolute url and
url.path() if the url is relative */
- static QString qUrl(const KURL& url);
+ static TQString qUrl(const KURL& url);
/** No descriptions */
- static void dirCreationError(QWidget *widget, const KURL& url);
+ static void dirCreationError(TQWidget *widget, const KURL& url);
/**
Adds the backslash before the special chars (like ?, *, . ) so the returned string can be used in regular expressions.
*/
- static QString makeRxCompatible(const QString& s);
+ static TQString makeRxCompatible(const TQString& s);
/** Returns the translated a_str in English. A "back-translation" useful e.g in case of CSS elements selected from a listbox. */
- static QString i18n2normal(const QString& a_str);
+ static TQString i18n2normal(const TQString& a_str);
/** No descriptions */
- static void normalizeStructure(QString f,QStringList& l);
+ static void normalizeStructure(TQString f,TQStringList& l);
/**Returns true if tag2 is the closing pair of tag1. It's namespace aware.*/
static bool closesTag(Tag *tag1, Tag *tag2);
- static bool closesTag(QString namespaceName, QString tagName, bool caseSensitive,
- QString namespaceName2, QString tagName2, bool caseSensitive2);
- static int denyBinaryInsert(QWidget *window);
- static void removeCommentsAndQuotes(QString& str, const DTDStruct* dtd);
- static bool insideCommentsOrQuotes(int position, const QString &string, const DTDStruct *dtd);
+ static bool closesTag(TQString namespaceName, TQString tagName, bool caseSensitive,
+ TQString namespaceName2, TQString tagName2, bool caseSensitive2);
+ static int denyBinaryInsert(TQWidget *window);
+ static void removeCommentsAndQuotes(TQString& str, const DTDStruct* dtd);
+ static bool insideCommentsOrQuotes(int position, const TQString &string, const DTDStruct *dtd);
/** Calls a Quanta DCOP method.
* @param interface the DCOP interface the method belongs to
* @param method the DCOP method name (with the argument types)
* @param arguments comma separated list of argument
* @return the return value of the DCOP caller
*/
- static DCOPReply callDCOPMethod(const QString& interface, const QString& method, const QString& arguments);
+ static DCOPReply callDCOPMethod(const TQString& interface, const TQString& method, const TQString& arguments);
/** Checks if url exists and shows a question about overwriting it.
* @param url the url to check
* @return true if the user answered yes, false otherwise.
*/
- static bool checkOverwrite(const KURL& url, QWidget *window);
+ static bool checkOverwrite(const KURL& url, TQWidget *window);
/**
* Same as KConfigBase::readPathListEntry, but resolves symlinks
@@ -201,7 +201,7 @@ pointer must be deleted by the caller!! */
* @param pKey
* @return
*/
- static QStringList readPathListEntry(KConfig *config, const QString &pKey);
+ static TQStringList readPathListEntry(KConfig *config, const TQString &pKey);
/**
* Same as KConfigBase::readPathEntry, but resolves symlinks
@@ -209,7 +209,7 @@ pointer must be deleted by the caller!! */
* @param pKey
* @return
*/
- static QString readPathEntry(KConfig *config, const QString &pKey);
+ static TQString readPathEntry(KConfig *config, const TQString &pKey);
/**
* Returns the HTML encoding string for character with the specified code.
@@ -218,7 +218,7 @@ pointer must be deleted by the caller!! */
* @param code the numeric code of the character
* @return the encoded string
*/
- static QString encodedChar(uint code);
+ static TQString encodedChar(uint code);
};
diff --git a/quanta/utility/quantanetaccess.cpp b/quanta/utility/quantanetaccess.cpp
index 095f9e08..dbaf1ce3 100644
--- a/quanta/utility/quantanetaccess.cpp
+++ b/quanta/utility/quantanetaccess.cpp
@@ -13,9 +13,9 @@
* *
***************************************************************************/
-#include <qstring.h>
-#include <qwidget.h>
-#include <qdir.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqdir.h>
#include <kio/netaccess.h>
#include <kurl.h>
@@ -28,7 +28,7 @@
#include "quantanetaccess.h"
#include "project.h"
-bool QuantaNetAccess::upload(const QString& src, const KURL& target, QWidget* window, bool confirm)
+bool QuantaNetAccess::upload(const TQString& src, const KURL& target, TQWidget* window, bool confirm)
{
bool ok = KIO::NetAccess::upload(src, target, window);
if (ok) {
@@ -42,7 +42,7 @@ bool QuantaNetAccess::upload(const QString& src, const KURL& target, QWidget* wi
bool QuantaNetAccess::file_copy( const KURL& src, const KURL& target, int permissions,
- bool overwrite, bool resume, QWidget* window, bool confirm)
+ bool overwrite, bool resume, TQWidget* window, bool confirm)
{
bool ok = KIO::NetAccess::file_copy( src, target, permissions, overwrite, resume, window );
if (ok) {
@@ -56,7 +56,7 @@ bool QuantaNetAccess::file_copy( const KURL& src, const KURL& target, int permis
bool QuantaNetAccess::file_move( const KURL& src, const KURL& target, int permissions,
- bool overwrite, bool resume, QWidget* window, bool confirm)
+ bool overwrite, bool resume, TQWidget* window, bool confirm)
{
// don't ask if move is inside of the project
bool oldConfirm = confirm;
@@ -79,7 +79,7 @@ bool QuantaNetAccess::file_move( const KURL& src, const KURL& target, int permis
}
-bool QuantaNetAccess::dircopy( const KURL::List & srcList, const KURL & target, QWidget* window, bool confirm )
+bool QuantaNetAccess::dircopy( const KURL::List & srcList, const KURL & target, TQWidget* window, bool confirm )
{
bool ok = KIO::NetAccess::dircopy( srcList, target, window );
if (ok) {
@@ -98,7 +98,7 @@ bool QuantaNetAccess::dircopy( const KURL::List & srcList, const KURL & target,
}
-bool QuantaNetAccess::move( const KURL::List& srcList, const KURL& target, QWidget* window, bool confirm )
+bool QuantaNetAccess::move( const KURL::List& srcList, const KURL& target, TQWidget* window, bool confirm )
{
KURL targetURL = adjustURL(target);
bool oldConfirm = confirm;
@@ -142,7 +142,7 @@ bool QuantaNetAccess::move( const KURL::List& srcList, const KURL& target, QWidg
}
-bool QuantaNetAccess::del( const KURL & url, QWidget* window, bool confirm )
+bool QuantaNetAccess::del( const KURL & url, TQWidget* window, bool confirm )
{
if ( !checkProjectDel(url, window, confirm)) {
return false;
@@ -156,7 +156,7 @@ bool QuantaNetAccess::del( const KURL & url, QWidget* window, bool confirm )
}
-bool QuantaNetAccess::mkdir( const KURL & url, QWidget* window, int permissions, bool confirm )
+bool QuantaNetAccess::mkdir( const KURL & url, TQWidget* window, int permissions, bool confirm )
{
KURL u = url;
u.adjustPath(-1); //some servers refuse to create directories ending with a slash
@@ -171,7 +171,7 @@ bool QuantaNetAccess::mkdir( const KURL & url, QWidget* window, int permissions,
}
-void QuantaNetAccess::checkProjectInsert(const KURL& target, QWidget* window, bool confirm)
+void QuantaNetAccess::checkProjectInsert(const KURL& target, TQWidget* window, bool confirm)
{
if ( !Project::ref()->hasProject()) return;
KURL saveUrl = adjustURL(target);
@@ -180,7 +180,7 @@ void QuantaNetAccess::checkProjectInsert(const KURL& target, QWidget* window, bo
{
if (confirm)
{
- QString nice = QExtFileInfo::toRelative(saveUrl, baseURL).path();
+ TQString nice = QExtFileInfo::toRelative(saveUrl, baseURL).path();
nice = KStringHandler::lsqueeze(nice, 60);
if ( KMessageBox::Yes != KMessageBox::questionYesNo(window, i18n("<qt>Do you want to add <br><b>%1</b><br> to the project?</qt>").arg(nice), i18n("Add to Project"), KStdGuiItem::add(), i18n("Do Not Add"), "AddToProject") )
{
@@ -196,7 +196,7 @@ void QuantaNetAccess::checkProjectInsert(const KURL& target, QWidget* window, bo
}
-bool QuantaNetAccess::checkProjectRemove(const KURL& src, QWidget* window, bool confirm, bool remove)
+bool QuantaNetAccess::checkProjectRemove(const KURL& src, TQWidget* window, bool confirm, bool remove)
{
if ( !Project::ref()->hasProject() ) return true;
KURL url = adjustURL(src);
@@ -205,7 +205,7 @@ bool QuantaNetAccess::checkProjectRemove(const KURL& src, QWidget* window, bool
{
if (confirm)
{
- QString nice = QExtFileInfo::toRelative(url, baseURL).path();
+ TQString nice = QExtFileInfo::toRelative(url, baseURL).path();
nice = KStringHandler::lsqueeze(nice, 60);
if ( KMessageBox::Continue != KMessageBox::warningContinueCancel(window, i18n("<qt>Do you really want to remove <br><b>%1</b><br> from the project?</qt>").arg(nice), i18n("Remove From Project"), KStdGuiItem::remove(), "RemoveFromProject") )
{
@@ -219,7 +219,7 @@ bool QuantaNetAccess::checkProjectRemove(const KURL& src, QWidget* window, bool
}
-bool QuantaNetAccess::checkProjectDel(const KURL& src, QWidget* window, bool confirm)
+bool QuantaNetAccess::checkProjectDel(const KURL& src, TQWidget* window, bool confirm)
{
KURL url = adjustURL(src);
if ( Project::ref()->hasProject() )
@@ -228,7 +228,7 @@ bool QuantaNetAccess::checkProjectDel(const KURL& src, QWidget* window, bool con
{
if (confirm)
{
- QString nice = url.prettyURL(0, KURL::StripFileProtocol);
+ TQString nice = url.prettyURL(0, KURL::StripFileProtocol);
nice = KStringHandler::csqueeze(nice, 60);
if ( KMessageBox::Continue != KMessageBox::warningContinueCancel(window, i18n("<qt>Do you really want to delete <br><b>%1</b><br> and remove it from the project?</qt>").arg(nice), i18n("Delete & Remove From Project"), KStdGuiItem::del(), "DeleteAndRemoveFromProject") )
{
@@ -241,7 +241,7 @@ bool QuantaNetAccess::checkProjectDel(const KURL& src, QWidget* window, bool con
}
// confirm normal delete if wanted
if (confirm) {
- QString nice = url.prettyURL(0, KURL::StripFileProtocol);
+ TQString nice = url.prettyURL(0, KURL::StripFileProtocol);
nice = KStringHandler::csqueeze(nice, 60);
return (KMessageBox::Continue == KMessageBox::warningContinueCancel(window, i18n("<qt>Do you really want to delete <br><b>%1</b>?</qt>").arg(nice), i18n("Delete File or Folder"), KStdGuiItem::del(), "DeleteFileOrFolder") );
}
@@ -253,16 +253,16 @@ KURL QuantaNetAccess::adjustURL(const KURL &url)
KURL u = url;
if ( u.isLocalFile() )
{
- QDir dir(u.path());
+ TQDir dir(u.path());
u.setPath(dir.canonicalPath());
}
return u;
}
-void QuantaNetAccess::errorMsg(QWidget* window)
+void QuantaNetAccess::errorMsg(TQWidget* window)
{
- QString msg = KIO::NetAccess::lastErrorString();
+ TQString msg = KIO::NetAccess::lastErrorString();
if ( !msg.isEmpty())
KMessageBox::sorry(window, msg);
}
diff --git a/quanta/utility/quantanetaccess.h b/quanta/utility/quantanetaccess.h
index abdedc86..244b92ae 100644
--- a/quanta/utility/quantanetaccess.h
+++ b/quanta/utility/quantanetaccess.h
@@ -32,50 +32,50 @@ class QuantaNetAccess
{
public:
- static bool upload(const QString& src, const KURL& target, QWidget* window, bool confirm = true);
+ static bool upload(const TQString& src, const KURL& target, TQWidget* window, bool confirm = true);
- static bool copy( const KURL & src, const KURL & target, QWidget* window, bool confirm = true )
+ static bool copy( const KURL & src, const KURL & target, TQWidget* window, bool confirm = true )
{
return file_copy( src, target, -1, false /*not overwrite*/, false, window, confirm );
}
static bool file_copy( const KURL& src, const KURL& target, int permissions,
- bool overwrite, bool resume, QWidget* window, bool confirm = true );
+ bool overwrite, bool resume, TQWidget* window, bool confirm = true );
static bool file_move( const KURL& src, const KURL& target, int permissions,
- bool overwrite, bool resume, QWidget* window, bool confirm = true );
+ bool overwrite, bool resume, TQWidget* window, bool confirm = true );
- static bool dircopy( const KURL & src, const KURL & target, QWidget* window, bool confirm = true )
+ static bool dircopy( const KURL & src, const KURL & target, TQWidget* window, bool confirm = true )
{
KURL::List srcList;
srcList.append( src );
return dircopy( srcList, target, window, confirm );
};
- static bool dircopy( const KURL::List & srcList, const KURL & target, QWidget* window, bool confirm = true );
+ static bool dircopy( const KURL::List & srcList, const KURL & target, TQWidget* window, bool confirm = true );
- static bool move( const KURL& src, const KURL& target, QWidget* window, bool confirm = true )
+ static bool move( const KURL& src, const KURL& target, TQWidget* window, bool confirm = true )
{
KURL::List srcList;
srcList.append( src );
return move( srcList, target, window, confirm );
}
- static bool move( const KURL::List& srcList, const KURL& target, QWidget* window, bool confirm = true );
+ static bool move( const KURL::List& srcList, const KURL& target, TQWidget* window, bool confirm = true );
- static bool del( const KURL & url, QWidget* window, bool confirm = true );
+ static bool del( const KURL & url, TQWidget* window, bool confirm = true );
- static bool mkdir( const KURL & url, QWidget* window, int permissions, bool confirm = true );
+ static bool mkdir( const KURL & url, TQWidget* window, int permissions, bool confirm = true );
- static void checkProjectInsert(const KURL& target, QWidget* window, bool confirm = true);
+ static void checkProjectInsert(const KURL& target, TQWidget* window, bool confirm = true);
- static bool checkProjectRemove(const KURL& target, QWidget* window, bool confirm = true, bool remove = true);
+ static bool checkProjectRemove(const KURL& target, TQWidget* window, bool confirm = true, bool remove = true);
- static bool checkProjectDel(const KURL& target, QWidget* window, bool confirm = true);
+ static bool checkProjectDel(const KURL& target, TQWidget* window, bool confirm = true);
static KURL adjustURL(const KURL &url);
- static void errorMsg(QWidget* window = 0);
+ static void errorMsg(TQWidget* window = 0);
private:
QuantaNetAccess() {};
diff --git a/quanta/utility/resource.h b/quanta/utility/resource.h
index 3f09946e..72160dac 100644
--- a/quanta/utility/resource.h
+++ b/quanta/utility/resource.h
@@ -33,25 +33,25 @@ struct DTDStruct;
extern QConfig qConfig;
-extern QString tmpDir;
+extern TQString tmpDir;
-extern QRegExp scriptBeginRx;
-extern QRegExp scriptEndRx;
+extern TQRegExp scriptBeginRx;
+extern TQRegExp scriptEndRx;
extern Node *baseNode;
extern Parser *parser;
extern KDirWatch *fileWatcher;
-extern QString toolbarExtension;
-extern QRegExp newLineRx;
-extern QStringList charList; //hold the list of the &char; chars. See the data/chars file.
-extern QPtrList<KTempFile> tempFileList;
-extern QPtrList<KTempDir> tempDirList;
+extern TQString toolbarExtension;
+extern TQRegExp newLineRx;
+extern TQStringList charList; //hold the list of the &char; chars. See the data/chars file.
+extern TQPtrList<KTempFile> tempFileList;
+extern TQPtrList<KTempDir> tempDirList;
extern KProgress *progressBar;
extern QuantaApp *quantaApp;
-extern const QString resourceDir;
+extern const TQString resourceDir;
extern bool typingInProgress;
extern int nodeNum;
diff --git a/quanta/utility/tagaction.cpp b/quanta/utility/tagaction.cpp
index 98bcf87c..28d37450 100644
--- a/quanta/utility/tagaction.cpp
+++ b/quanta/utility/tagaction.cpp
@@ -21,10 +21,10 @@
//qt includes
-#include <qdir.h>
-#include <qdom.h>
-#include <qfile.h>
-#include <qtimer.h>
+#include <tqdir.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqtimer.h>
//kde includes
#include <kapplication.h>
@@ -72,8 +72,8 @@ int MyProcess::commSetupDoneC()
return KProcess::commSetupDoneC();
}
-TagAction::TagAction( QDomElement *element, KMainWindow *parentMainWindow, bool toggle)
- : KToggleAction(element->attribute("text").isEmpty() ? QString("") : i18n(element->attribute("text").utf8()),
+TagAction::TagAction( TQDomElement *element, KMainWindow *parentMainWindow, bool toggle)
+ : KToggleAction(element->attribute("text").isEmpty() ? TQString("") : i18n(element->attribute("text").utf8()),
KShortcut(element->attribute("shortcut")), 0, 0, parentMainWindow->actionCollection(), element->attribute("name")),
//disable toggle now m_toggle(toggle)
m_toggle(false)
@@ -84,31 +84,31 @@ TagAction::TagAction( QDomElement *element, KMainWindow *parentMainWindow, bool
m_useInputFile = false;
m_useOutputFile = false;
tag = element->cloneNode().toElement();
- QString s = tag.attribute("icon");
- if (!QFileInfo(s).exists())
+ TQString s = tag.attribute("icon");
+ if (!TQFileInfo(s).exists())
{
- s = QFileInfo(s).fileName();
+ s = TQFileInfo(s).fileName();
}
setIcon(s);
m_file = 0L;
loopStarted = false;
#if KDE_VERSION >= KDE_MAKE_VERSION(3,4,0)
- connect(this, SIGNAL(activated(KAction::ActivationReason, Qt::ButtonState)),
- SLOT(slotActionActivated(KAction::ActivationReason, Qt::ButtonState)));
+ connect(this, TQT_SIGNAL(activated(KAction::ActivationReason, Qt::ButtonState)),
+ TQT_SLOT(slotActionActivated(KAction::ActivationReason, Qt::ButtonState)));
#else
- connect(this, SIGNAL(activated()), SLOT(slotActionActivated()));
+ connect(this, TQT_SIGNAL(activated()), TQT_SLOT(slotActionActivated()));
#endif
- connect(this, SIGNAL(showMessage(const QString&, bool)), m_parentMainWindow, SIGNAL(showMessage(const QString&, bool)));
- connect(this, SIGNAL(clearMessages()), m_parentMainWindow, SIGNAL(clearMessages()));
- connect(this, SIGNAL(showMessagesView()), m_parentMainWindow, SLOT(slotShowMessagesView()));
- connect(this, SIGNAL(createNewFile()), m_parentMainWindow, SLOT(slotFileNew()));
+ connect(this, TQT_SIGNAL(showMessage(const TQString&, bool)), m_parentMainWindow, TQT_SIGNAL(showMessage(const TQString&, bool)));
+ connect(this, TQT_SIGNAL(clearMessages()), m_parentMainWindow, TQT_SIGNAL(clearMessages()));
+ connect(this, TQT_SIGNAL(showMessagesView()), m_parentMainWindow, TQT_SLOT(slotShowMessagesView()));
+ connect(this, TQT_SIGNAL(createNewFile()), m_parentMainWindow, TQT_SLOT(slotFileNew()));
}
TagAction::~TagAction()
{
}
-QString TagAction::type()
+TQString TagAction::type()
{
return tag.attribute("type","");
}
@@ -125,22 +125,22 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, Qt::Button
w->viewCursorIf->cursorPositionReal(&line, &col);
NodeModifsSet* modifs = new NodeModifsSet();
- QString space;
+ TQString space;
space.fill( ' ', col);
- QString type = tag.attribute("type","");
+ TQString type = tag.attribute("type","");
if ( type == "tag" && view->hadLastFocus() == QuantaView::VPLFocus && toggable())
{
KafkaWidget* kafka_widget = KafkaDocument::ref()->getKafkaWidget();
- QString tag_name = XMLTagName();
+ TQString tag_name = XMLTagName();
NodeSelectionInd selection;
selection.fillWithVPLCursorSelection();
Node* start_node = 0, *end_node = 0, *current_node = 0;
int start_offset = 0, end_offset = 0, current_offset = 0;
- QString scope;
+ TQString scope;
if(kafka_widget->hasSelection())
{
// get selection
@@ -217,8 +217,8 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, Qt::Button
}
else if(inside_tag == 1)
{
- QString attribute_name(tag.attribute("attribute_name", QString()));
- QString attribute_value(tag.attribute("attribute_value", QString()));
+ TQString attribute_name(tag.attribute("attribute_name", TQString()));
+ TQString attribute_value(tag.attribute("attribute_value", TQString()));
// special case
if(!attribute_name.isEmpty() && !attribute_value.isEmpty())
@@ -235,7 +235,7 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, Qt::Button
if(aux1 == tag_parent && aux2 == tag_parent->getClosingNode())
{
if(tag_parent->tag->attributeValue(attribute_name, true) == attribute_value)
- kafkaCommon::editNodeAttribute(tag_parent, attribute_name, QString(), modifs);
+ kafkaCommon::editNodeAttribute(tag_parent, attribute_name, TQString(), modifs);
else
kafkaCommon::editNodeAttribute(tag_parent, attribute_name, attribute_value, modifs);
}
@@ -255,10 +255,10 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, Qt::Button
}
if ( type == "tag" ) {
- QDomElement otag = (tag.namedItem("tag")).toElement();
- QDomElement xtag = (tag.namedItem("xtag")).toElement();
+ TQDomElement otag = (tag.namedItem("tag")).toElement();
+ TQDomElement xtag = (tag.namedItem("xtag")).toElement();
- QString attr = otag.text();
+ TQString attr = otag.text();
if ( attr[0] == '<' )
attr.remove(0,1);
if ( attr.right(1) == ">" )
@@ -266,7 +266,7 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, Qt::Button
attr = attr.stripWhiteSpace();
int i = 0;
while ( !attr[i].isSpace() && !attr[i].isNull() ) i++;
- QString name = attr.left(i);
+ TQString name = attr.left(i);
attr = attr.remove(0,i).stripWhiteSpace();
if (otag.attribute("useDialog","false") == "true" && QuantaCommon::isKnownTag(w->defaultDTD()->name, name))
@@ -275,7 +275,7 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, Qt::Button
}
else
{
- QString s1 = QuantaCommon::tagCase(name);
+ TQString s1 = QuantaCommon::tagCase(name);
if (otag.text().left(1) == "<") s1 = "<"+s1;
if (!attr.isEmpty())
s1 += " "+QuantaCommon::attrCase(attr);
@@ -292,7 +292,7 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, Qt::Button
s1.append(">");
}
- QString s2;
+ TQString s2;
if ( xtag.attribute("use","false") == "true" )
{
if (qConfig.closeTags)
@@ -324,12 +324,12 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, Qt::Button
proc = new MyProcess();
proc->setWorkingDirectory(quantaApp->projectBaseURL().path());
- QDomElement script = tag.namedItem("script").toElement();
- QString command = script.text();
+ TQDomElement script = tag.namedItem("script").toElement();
+ TQString command = script.text();
if ( !w->isUntitled() ) {
- QString fname = w->url().url();
+ TQString fname = w->url().url();
if ( w->url().protocol() == "file")
fname = w->url().path();
command.replace("%f", fname );
@@ -338,13 +338,13 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, Qt::Button
pid_t pid = ::getpid();
if (kapp->inherits("KUniqueApplication"))
{
- command.replace("%pid", QString("unique %1").arg(pid));
+ command.replace("%pid", TQString("unique %1").arg(pid));
} else
{
- command.replace("%pid", QString("%1").arg(pid));
+ command.replace("%pid", TQString("%1").arg(pid));
}
- QString buffer;
- QString inputType = script.attribute("input","none");
+ TQString buffer;
+ TQString inputType = script.attribute("input","none");
if ( inputType == "current" ) {
buffer = w->editIf->text();
@@ -355,7 +355,7 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, Qt::Button
command.replace("%input", buffer);
command = command.stripWhiteSpace();
int pos = command.find(' ');
- QString args;
+ TQString args;
if (pos != -1)
{
args = command.mid(pos+1);
@@ -364,7 +364,7 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, Qt::Button
if (command.startsWith("~"))
{
command = command.mid(1);
- command.prepend(QDir::homeDirPath());
+ command.prepend(TQDir::homeDirPath());
}
*proc << command.stripWhiteSpace();
@@ -375,7 +375,7 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, Qt::Button
while (pos != -1 )
{
pos = args.find("%scriptdir");
- QString scriptname;
+ TQString scriptname;
if (pos != -1)
{
int begin = args.findRev('"', pos);
@@ -410,13 +410,13 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, Qt::Button
int pos = args.find("%projectbase");
if (pos != -1)
{
- QString s;
+ TQString s;
if (Project::ref()->hasProject())
s = Project::ref()->projectBaseURL().url();
args.replace("%projectbase", s);
}
- QStringList argsList1 = QStringList::split(' ', args);
- QStringList argsList;
+ TQStringList argsList1 = TQStringList::split(' ', args);
+ TQStringList argsList;
for (uint i = 0; i < argsList1.count(); i++)
{
if (argsList1[i] == "%userarguments")
@@ -434,12 +434,12 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, Qt::Button
firstOutput = true;
firstError = true;
- connect( proc, SIGNAL(receivedStdout( KProcess*,char*,int)), this,
- SLOT( slotGetScriptOutput(KProcess*,char*,int)));
- connect( proc, SIGNAL(receivedStderr( KProcess*,char*,int)), this,
- SLOT( slotGetScriptError(KProcess*,char*,int)));
- connect( proc, SIGNAL(processExited( KProcess*)), this,
- SLOT( slotProcessExited(KProcess*)));
+ connect( proc, TQT_SIGNAL(receivedStdout( KProcess*,char*,int)), this,
+ TQT_SLOT( slotGetScriptOutput(KProcess*,char*,int)));
+ connect( proc, TQT_SIGNAL(receivedStderr( KProcess*,char*,int)), this,
+ TQT_SLOT( slotGetScriptError(KProcess*,char*,int)));
+ connect( proc, TQT_SIGNAL(processExited( KProcess*)), this,
+ TQT_SLOT( slotProcessExited(KProcess*)));
@@ -498,21 +498,21 @@ bool TagAction::slotActionActivated()
if ( !view || !view->document())
return false;
- QString space="";
- QString output;
+ TQString space="";
+ TQString output;
unsigned int line, col;
Document *w = view->document();
w->viewCursorIf->cursorPositionReal(&line, &col);
space.fill( ' ', col);
- QString type = tag.attribute("type","");
+ TQString type = tag.attribute("type","");
if ( type == "tag" ) {
- QDomElement otag = (tag.namedItem("tag")).toElement();
- QDomElement xtag = (tag.namedItem("xtag")).toElement();
+ TQDomElement otag = (tag.namedItem("tag")).toElement();
+ TQDomElement xtag = (tag.namedItem("xtag")).toElement();
- QString attr = otag.text();
+ TQString attr = otag.text();
if ( attr[0] == '<' )
attr.remove(0,1);
if ( attr.right(1) == ">" )
@@ -520,7 +520,7 @@ bool TagAction::slotActionActivated()
attr = attr.stripWhiteSpace();
int i = 0;
while ( !attr[i].isSpace() && !attr[i].isNull() ) i++;
- QString name = attr.left(i);
+ TQString name = attr.left(i);
attr = attr.remove(0,i).stripWhiteSpace();
if (otag.attribute("useDialog","false") == "true" && QuantaCommon::isKnownTag(w->defaultDTD()->name, name))
@@ -529,7 +529,7 @@ bool TagAction::slotActionActivated()
}
else
{
- QString s1 = QuantaCommon::tagCase(name);
+ TQString s1 = QuantaCommon::tagCase(name);
if (otag.text().left(1) == "<") s1 = "<"+s1;
if (!attr.isEmpty())
s1 += " "+QuantaCommon::attrCase(attr);
@@ -546,7 +546,7 @@ bool TagAction::slotActionActivated()
s1.append(">");
}
- QString s2;
+ TQString s2;
if ( xtag.attribute("use","false") == "true" )
{
if (qConfig.closeTags)
@@ -578,12 +578,12 @@ bool TagAction::slotActionActivated()
proc = new MyProcess();
proc->setWorkingDirectory(quantaApp->projectBaseURL().path());
- QDomElement script = tag.namedItem("script").toElement();
- QString command = script.text();
+ TQDomElement script = tag.namedItem("script").toElement();
+ TQString command = script.text();
if ( !w->isUntitled() ) {
- QString fname = w->url().url();
+ TQString fname = w->url().url();
if ( w->url().protocol() == "file")
fname = w->url().path();
command.replace("%f", fname );
@@ -592,13 +592,13 @@ bool TagAction::slotActionActivated()
pid_t pid = ::getpid();
if (kapp->inherits("KUniqueApplication"))
{
- command.replace("%pid", QString("unique %1").arg(pid));
+ command.replace("%pid", TQString("unique %1").arg(pid));
} else
{
- command.replace("%pid", QString("%1").arg(pid));
+ command.replace("%pid", TQString("%1").arg(pid));
}
- QString buffer;
- QString inputType = script.attribute("input","none");
+ TQString buffer;
+ TQString inputType = script.attribute("input","none");
if ( inputType == "current" ) {
buffer = w->editIf->text();
@@ -609,7 +609,7 @@ bool TagAction::slotActionActivated()
command.replace("%input", buffer);
command = command.stripWhiteSpace();
int pos = command.find(' ');
- QString args;
+ TQString args;
if (pos != -1)
{
args = command.mid(pos+1);
@@ -618,7 +618,7 @@ bool TagAction::slotActionActivated()
if (command.startsWith("~"))
{
command = command.mid(1);
- command.prepend(QDir::homeDirPath());
+ command.prepend(TQDir::homeDirPath());
}
*proc << command.stripWhiteSpace();
@@ -629,7 +629,7 @@ bool TagAction::slotActionActivated()
while (pos != -1 )
{
pos = args.find("%scriptdir");
- QString scriptname;
+ TQString scriptname;
if (pos != -1)
{
int begin = args.findRev('"', pos);
@@ -664,13 +664,13 @@ bool TagAction::slotActionActivated()
int pos = args.find("%projectbase");
if (pos != -1)
{
- QString s;
+ TQString s;
if (Project::ref()->hasProject())
s = Project::ref()->projectBaseURL().url();
args.replace("%projectbase", s);
}
- QStringList argsList1 = QStringList::split(' ', args);
- QStringList argsList;
+ TQStringList argsList1 = TQStringList::split(' ', args);
+ TQStringList argsList;
for (uint i = 0; i < argsList1.count(); i++)
{
if (argsList1[i] == "%userarguments")
@@ -688,12 +688,12 @@ bool TagAction::slotActionActivated()
firstOutput = true;
firstError = true;
- connect( proc, SIGNAL(receivedStdout( KProcess*,char*,int)), this,
- SLOT( slotGetScriptOutput(KProcess*,char*,int)));
- connect( proc, SIGNAL(receivedStderr( KProcess*,char*,int)), this,
- SLOT( slotGetScriptError(KProcess*,char*,int)));
- connect( proc, SIGNAL(processExited( KProcess*)), this,
- SLOT( slotProcessExited(KProcess*)));
+ connect( proc, TQT_SIGNAL(receivedStdout( KProcess*,char*,int)), this,
+ TQT_SLOT( slotGetScriptOutput(KProcess*,char*,int)));
+ connect( proc, TQT_SIGNAL(receivedStderr( KProcess*,char*,int)), this,
+ TQT_SLOT( slotGetScriptError(KProcess*,char*,int)));
+ connect( proc, TQT_SIGNAL(processExited( KProcess*)), this,
+ TQT_SLOT( slotProcessExited(KProcess*)));
@@ -742,8 +742,8 @@ bool TagAction::slotActionActivated()
void TagAction::slotGetScriptOutput( KProcess *, char *buffer, int buflen )
{
- QCString tmp( buffer, buflen + 1 );
- QString text( QString::fromLocal8Bit(tmp) );
+ TQCString tmp( buffer, buflen + 1 );
+ TQString text( TQString::fromLocal8Bit(tmp) );
// kdDebug(24000) << "Script output received: |" << text << "|" << endl;
Document *w = ViewManager::ref()->activeDocument();
if (!w)
@@ -804,8 +804,8 @@ void TagAction::slotGetScriptOutput( KProcess *, char *buffer, int buflen )
void TagAction::slotGetScriptError( KProcess *, char *buffer, int buflen )
{
Document *w = ViewManager::ref()->activeDocument();
- QCString tmp( buffer, buflen + 1 );
- QString text( QString::fromLocal8Bit(tmp) );
+ TQCString tmp( buffer, buflen + 1 );
+ TQString text( TQString::fromLocal8Bit(tmp) );
if ( scriptErrorDest == "merge" )
{
@@ -861,19 +861,19 @@ void TagAction::scriptDone()
proc = 0;
}
-void TagAction::setOutputFile(QFile* file)
+void TagAction::setOutputFile(TQFile* file)
{
m_file = file;
}
-void TagAction::setInputFileName(const QString& fileName)
+void TagAction::setInputFileName(const TQString& fileName)
{
m_inputFileName = fileName;
}
-QString TagAction::actionText()
+TQString TagAction::actionText()
{
- QString t = tag.attribute("text");
+ TQString t = tag.attribute("text");
int pos = t.find('&');
if (pos < (int)t.length()-1 && t[pos+1] != '&')
return t.remove(pos, 1);
@@ -881,15 +881,15 @@ QString TagAction::actionText()
return t;
}
-QString TagAction::XMLTagName() const
+TQString TagAction::XMLTagName() const
{
if(tag.attribute("type","").lower() != "tag")
- return QString();
+ return TQString();
- QDomElement otag = (tag.namedItem("tag")).toElement();
- QDomElement xtag = (tag.namedItem("xtag")).toElement();
+ TQDomElement otag = (tag.namedItem("tag")).toElement();
+ TQDomElement xtag = (tag.namedItem("xtag")).toElement();
- QString attr = otag.text();
+ TQString attr = otag.text();
if ( attr[0] == '<' )
attr.remove(0,1);
if ( attr.right(1) == ">" )
@@ -898,19 +898,19 @@ QString TagAction::XMLTagName() const
int i = 0;
while ( !attr[i].isSpace() && !attr[i].isNull() )
++i;
- QString name = attr.left(i);
+ TQString name = attr.left(i);
return name;
}
-QString TagAction::openXMLTagString() const
+TQString TagAction::openXMLTagString() const
{
- QString name = XMLTagName();
+ TQString name = XMLTagName();
- QDomElement otag = (tag.namedItem("tag")).toElement();
- QDomElement xtag = (tag.namedItem("xtag")).toElement();
+ TQDomElement otag = (tag.namedItem("tag")).toElement();
+ TQDomElement xtag = (tag.namedItem("xtag")).toElement();
- QString attr = otag.text();
+ TQString attr = otag.text();
if ( attr[0] == '<' )
attr.remove(0,1);
if ( attr.right(1) == ">" )
@@ -918,7 +918,7 @@ QString TagAction::openXMLTagString() const
attr = attr.stripWhiteSpace();
attr.remove(0, name.length());
- QString s1 = QuantaCommon::tagCase(name);
+ TQString s1 = QuantaCommon::tagCase(name);
if (otag.text().left(1) == "<") s1 = "<"+s1;
if (!attr.isEmpty())
s1 += " "+QuantaCommon::attrCase(attr);
@@ -939,10 +939,10 @@ QString TagAction::openXMLTagString() const
return s1;
}
-QString TagAction::closeXMLTagString() const
+TQString TagAction::closeXMLTagString() const
{
- QString s2;
- QDomElement xtag = (tag.namedItem("xtag")).toElement();
+ TQString s2;
+ TQDomElement xtag = (tag.namedItem("xtag")).toElement();
if ( xtag.attribute("use","false") == "true" )
{
if (qConfig.closeTags)
@@ -974,7 +974,7 @@ void TagAction::slotProcessExited(KProcess *process)
delete process;
}
-void TagAction::addArguments(const QStringList &arguments)
+void TagAction::addArguments(const TQStringList &arguments)
{
m_argsList = arguments;
}
@@ -990,8 +990,8 @@ void TagAction::execute(bool blocking)
if (slotActionActivated())
{
//To avoid lock-ups, start a timer.
- timer = new QTimer(this);
- connect(timer, SIGNAL(timeout()), SLOT(slotTimeout()));
+ timer = new TQTimer(this);
+ connect(timer, TQT_SIGNAL(timeout()), TQT_SLOT(slotTimeout()));
timer->start(180*1000, true);
QExtFileInfo internalFileInfo;
loopStarted = true;
@@ -1038,10 +1038,10 @@ void TagAction::applyTagInSelection(Node* start_node, int start_offset, Node* en
Q_ASSERT(view->hadLastFocus() == QuantaView::VPLFocus);
Q_ASSERT(toggable());
- QString tag_name = XMLTagName();
+ TQString tag_name = XMLTagName();
Q_ASSERT(kafkaCommon::isInsideTag(start_node, end_node, tag_name) == -1);
- QString open_tag = openXMLTagString();
+ TQString open_tag = openXMLTagString();
//We build the node from the tag name
Node* node = kafkaCommon::createNode("", "", Tag::XmlTag, w);
@@ -1066,7 +1066,7 @@ void TagAction::applyTagInSelection(Node* start_node, int start_offset, Node* en
if (!nodeQTag) return;
bool specialTagInsertion = false;
- QPtrList<QTag> qTagList = nodeQTag->parents();
+ TQPtrList<QTag> qTagList = nodeQTag->parents();
QTag* qTag = 0;
for (qTag = qTagList.first(); qTag; qTag = qTagList.next())
{
@@ -1128,7 +1128,7 @@ void TagAction::applyTagInMixedSelection(Node* start_node, int start_offset, Nod
{
Q_ASSERT(start_node != end_node);
- QString const tag_name = XMLTagName();
+ TQString const tag_name = XMLTagName();
// FIXME o pai pode ser do endNode. nao sei se esta merda eh precisa
/* Node* tag_parent = kafkaCommon::hasParent(start_node, tag_name);
@@ -1142,8 +1142,8 @@ void TagAction::applyTagInMixedSelection(Node* start_node, int start_offset, Nod
end_node = kafkaCommon::getCorrectEndNode(end_node, end_offset);
// look for commonParent
- QValueList<int> commonParentStartChildLocation;
- QValueList<int> commonParentEndChildLocation;
+ TQValueList<int> commonParentStartChildLocation;
+ TQValueList<int> commonParentEndChildLocation;
Node* commonParent = kafkaCommon::DTDGetCommonParent(start_node, end_node, commonParentStartChildLocation, commonParentEndChildLocation, 0);
if(!commonParent) return;
@@ -1159,7 +1159,7 @@ void TagAction::applyTagInMixedSelection(Node* start_node, int start_offset, Nod
// kafkaCommon::coutTree(baseNode, 3);
//We build the node from the tag name
- QString const open_tag_string = openXMLTagString();
+ TQString const open_tag_string = openXMLTagString();
Node* new_node = kafkaCommon::createNode("", "", Tag::XmlTag, w);
new_node->tag->parse(open_tag_string, w);
new_node->tag->name = QuantaCommon::tagCase(new_node->tag->name);
@@ -1211,15 +1211,15 @@ void TagAction::deapplyTagInSelection(Node* start_node, int start_offset, Node*
// QuantaView *view = ViewManager::ref()->activeView();
// Document* w = view->document();
- QString const tag_name = XMLTagName();
+ TQString const tag_name = XMLTagName();
// Set start and end nodes to the correct node
start_node = kafkaCommon::getCorrectStartNode(start_node, start_offset);
end_node = kafkaCommon::getCorrectEndNode(end_node, end_offset);
// look for commonParent
- QValueList<int> commonParentStartChildLocation;
- QValueList<int> commonParentEndChildLocation;
+ TQValueList<int> commonParentStartChildLocation;
+ TQValueList<int> commonParentEndChildLocation;
Node* commonParent = kafkaCommon::DTDGetCommonParent(start_node, end_node, commonParentStartChildLocation, commonParentEndChildLocation, 0);
if(!commonParent) return;
@@ -1235,12 +1235,12 @@ void TagAction::deapplyTagInSelection(Node* start_node, int start_offset, Node*
Node* tag_parent = kafkaCommon::hasParent(start_node, end_node, tag_name);
Q_ASSERT(tag_parent);
- QString attribute_name(tag.attribute("attribute_name", QString()));
- QString attribute_value(tag.attribute("attribute_value", QString()));
+ TQString attribute_name(tag.attribute("attribute_name", TQString()));
+ TQString attribute_value(tag.attribute("attribute_value", TQString()));
if(!attribute_name.isEmpty() && !attribute_value.isEmpty())
{
- kafkaCommon::editNodeAttribute(tag_parent, attribute_name, QString(), modifs);
+ kafkaCommon::editNodeAttribute(tag_parent, attribute_name, TQString(), modifs);
}
else
diff --git a/quanta/utility/tagaction.h b/quanta/utility/tagaction.h
index addb35cf..56fcde0e 100644
--- a/quanta/utility/tagaction.h
+++ b/quanta/utility/tagaction.h
@@ -22,8 +22,8 @@
#include <kaction.h>
#include <kactioncollection.h>
-#include <qstring.h>
-#include <qdom.h>
+#include <tqstring.h>
+#include <tqdom.h>
class KMainWindow;
class QuantaView;
@@ -54,15 +54,15 @@ public:
* @param toggle If set to true, the class behaves like a KToggleAction;
* Else it behaves like a KAction. This avoids the multi-inheritance problem.
*/
- TagAction(QDomElement *element, KMainWindow *parentMainWindow, bool toggle = false);
+ TagAction(TQDomElement *element, KMainWindow *parentMainWindow, bool toggle = false);
virtual ~TagAction();
- QDomElement data() const { return tag; }
+ TQDomElement data() const { return tag; }
void setModified(bool modified) { m_modified = modified;}
bool isModified() const {return m_modified;}
- void setOutputFile(QFile* file);
- void setInputFileName(const QString& fileName);
- void addArguments(const QStringList& arguments);
+ void setOutputFile(TQFile* file);
+ void setInputFileName(const TQString& fileName);
+ void addArguments(const TQStringList& arguments);
bool toggable() const {return tag.attribute("toggable") == "true";}
bool toggled() const {return isChecked();}
@@ -70,18 +70,18 @@ public:
@param blocking in case of script actions, the script is run in blocking mode, if this argument is true
*/
void execute(bool blocking);
- QString type();
+ TQString type();
/**
* Remove accelerator from tag action name *
*/
- QString actionText();
+ TQString actionText();
- QString XMLTagName() const;
- QString openXMLTagString() const;
- QString closeXMLTagString() const;
+ TQString XMLTagName() const;
+ TQString openXMLTagString() const;
+ TQString closeXMLTagString() const;
signals:
- void showMessage(const QString& msg, bool append);
+ void showMessage(const TQString& msg, bool append);
void clearMessages();
void showMessagesView();
void createNewFile();
@@ -121,14 +121,14 @@ private:
bool loopStarted;
bool m_useInputFile;
bool m_useOutputFile;
- QString scriptOutputDest;
- QString scriptErrorDest;
- QTimer* timer;
- QDomElement tag;
- QFile* m_file;
+ TQString scriptOutputDest;
+ TQString scriptErrorDest;
+ TQTimer* timer;
+ TQDomElement tag;
+ TQFile* m_file;
KMainWindow *m_parentMainWindow;
- QString m_inputFileName;
- QStringList m_argsList;
+ TQString m_inputFileName;
+ TQStringList m_argsList;
uint m_killCount;
bool const m_toggle;
};
diff --git a/quanta/utility/tagactionmanager.cpp b/quanta/utility/tagactionmanager.cpp
index 21183073..3733aaaf 100644
--- a/quanta/utility/tagactionmanager.cpp
+++ b/quanta/utility/tagactionmanager.cpp
@@ -22,7 +22,7 @@
#include <klocale.h>
#include <dom/dom_node.h>
-#include <qwidget.h>
+#include <tqwidget.h>
#include "tagactionmanager.h"
#include "tagactionset.h"
@@ -54,7 +54,7 @@ TagActionManager* TagActionManager::self()
return s_mSelf;
}
-void TagActionManager::initActions(QWidget* parent)
+void TagActionManager::initActions(TQWidget* parent)
{
Q_ASSERT(parent);
@@ -69,14 +69,14 @@ void TagActionManager::initActions(QWidget* parent)
m_tagActionSets.append(table);
}
-void TagActionManager::fillWithTagActions(QWidget* widget, DOM::Node const& node)
+void TagActionManager::fillWithTagActions(TQWidget* widget, DOM::Node const& node)
{
TagActionSetAbstract* tagActionSet = 0;
for(tagActionSet = m_tagActionSets.first(); tagActionSet; tagActionSet = m_tagActionSets.next())
tagActionSet->fillWithTagActions(widget, node);
}
-bool TagActionManager::canIndentDTD(QString const& dtd)
+bool TagActionManager::canIndentDTD(TQString const& dtd)
{
return (dtd.contains("HTML", false) ||
dtd.contains("XML", false));
diff --git a/quanta/utility/tagactionmanager.h b/quanta/utility/tagactionmanager.h
index 533c3b39..6f5968c8 100644
--- a/quanta/utility/tagactionmanager.h
+++ b/quanta/utility/tagactionmanager.h
@@ -24,7 +24,7 @@ namespace DOM
class Node;
}
-#include <qptrlist.h>
+#include <tqptrlist.h>
class QWidget;
class TagActionSetAbstract;
@@ -48,9 +48,9 @@ public:
* @param widget The widget in wich the actions will be pluged.
* @param node The context/current node.
*/
- void fillWithTagActions(QWidget* widget, DOM::Node const& node);
+ void fillWithTagActions(TQWidget* widget, DOM::Node const& node);
- static bool canIndentDTD(QString const& dtd);
+ static bool canIndentDTD(TQString const& dtd);
KActionCollection* actionCollection() const
{
@@ -62,13 +62,13 @@ private:
TagActionManager(TagActionManager const&)
{}
- void initActions(QWidget* parent);
+ void initActions(TQWidget* parent);
private:
static TagActionManager* s_mSelf;
KActionCollection* m_actionCollection;
- QPtrList<TagActionSetAbstract> m_tagActionSets;
+ TQPtrList<TagActionSetAbstract> m_tagActionSets;
};
#endif
diff --git a/quanta/utility/tagactionset.cpp b/quanta/utility/tagactionset.cpp
index 691ad182..a74df537 100644
--- a/quanta/utility/tagactionset.cpp
+++ b/quanta/utility/tagactionset.cpp
@@ -23,7 +23,7 @@
#include <dom/dom_string.h>
#include <klocale.h>
-#include <qwidget.h>
+#include <tqwidget.h>
#include "tagactionset.h"
#include "tagactionmanager.h"
@@ -40,14 +40,14 @@
#include "resource.h"
-TagActionSetAbstract::TagActionSetAbstract(QObject *parent, const char *name)
- : QObject(parent, name), m_currentNode(0)
+TagActionSetAbstract::TagActionSetAbstract(TQObject *parent, const char *name)
+ : TQObject(parent, name), m_currentNode(0)
{}
TagActionSetAbstract::~TagActionSetAbstract()
{}
-Node* TagActionSetAbstract::parentTag(Node* node, QString const& tagName)
+Node* TagActionSetAbstract::parentTag(Node* node, TQString const& tagName)
{
Q_ASSERT(node);
@@ -58,7 +58,7 @@ Node* TagActionSetAbstract::parentTag(Node* node, QString const& tagName)
return aux;
}
-Node* TagActionSetAbstract::firstChildTag(Node* startParentNode, QString const& tagName)
+Node* TagActionSetAbstract::firstChildTag(Node* startParentNode, TQString const& tagName)
{
Node* aux = startParentNode;
while(aux && aux->nodeName().lower() != tagName)
@@ -71,7 +71,7 @@ Node* TagActionSetAbstract::firstChildTag(Node* startParentNode, QString const&
return aux;
}
-bool TagActionSetAbstract::fillWithTagActions(QWidget* /*widget*/, DOM::Node const& node)
+bool TagActionSetAbstract::fillWithTagActions(TQWidget* /*widget*/, DOM::Node const& node)
{
m_currentDomNode = node;
m_currentNode = KafkaDocument::ref()->getNode(m_currentDomNode);
@@ -81,7 +81,7 @@ bool TagActionSetAbstract::fillWithTagActions(QWidget* /*widget*/, DOM::Node con
//_____________________________________________________________________________
-TagActionSet::TagActionSet(QObject *parent, const char *name)
+TagActionSet::TagActionSet(TQObject *parent, const char *name)
: TagActionSetAbstract(parent, name), m_separator(0)
{
m_separator = new KActionSeparator();
@@ -92,31 +92,31 @@ bool TagActionSet::isInTagContext() const
return true;
}
-void TagActionSet::initActionMenus(QWidget* /*widget*/)
+void TagActionSet::initActionMenus(TQWidget* /*widget*/)
{
}
-void TagActionSet::initActions(QWidget* /*parent*/)
+void TagActionSet::initActions(TQWidget* /*parent*/)
{
KActionCollection* ac(TagActionManager::self()->actionCollection());
- QString actionName = "apply_source_indentation";
+ TQString actionName = "apply_source_indentation";
new KAction(i18n("Apply Source Indentation"), 0, this,
- SLOT(slotApplySourceIndentation()),
+ TQT_SLOT(slotApplySourceIndentation()),
ac, actionName);
actionName = "copy_div_element";
new KAction(i18n("Copy DIV Area"), 0, this,
- SLOT(slotCopyDivElement()),
+ TQT_SLOT(slotCopyDivElement()),
ac, actionName);
actionName = "cut_div_element";
new KAction(i18n("Cut DIV Area"), 0, this,
- SLOT(slotCutDivElement()),
+ TQT_SLOT(slotCutDivElement()),
ac, actionName);
}
-bool TagActionSet::fillWithTagActions(QWidget* widget, DOM::Node const& node)
+bool TagActionSet::fillWithTagActions(TQWidget* widget, DOM::Node const& node)
{
bool validNode = TagActionSetAbstract::fillWithTagActions(widget, node);
@@ -162,7 +162,7 @@ bool TagActionSet::fillWithTagActions(QWidget* widget, DOM::Node const& node)
return true;
}
-void TagActionSet::unplugAllActions(QWidget* widget) const
+void TagActionSet::unplugAllActions(TQWidget* widget) const
{
KActionCollection* ac(TagActionManager::self()->actionCollection());
@@ -238,7 +238,7 @@ void TagActionSet::slotCopyDivElement()
return;
}
- KafkaDocument::ref()->slotCopy(divNode, 0, divClosingNode, 0, QString());
+ KafkaDocument::ref()->slotCopy(divNode, 0, divClosingNode, 0, TQString());
}
void TagActionSet::slotCutDivElement()
@@ -260,13 +260,13 @@ void TagActionSet::slotCutDivElement()
int cursorOffset = selection_ind.cursorOffset();
- KafkaDocument::ref()->slotCut(divNode, 0, divClosingNode, 0, &m_currentNode, cursorOffset, QString());
+ KafkaDocument::ref()->slotCut(divNode, 0, divClosingNode, 0, &m_currentNode, cursorOffset, TQString());
}
//_____________________________________________________________________________
-TableTagActionSet::TableTagActionSet(QObject *parent, const char *name)
+TableTagActionSet::TableTagActionSet(TQObject *parent, const char *name)
: TagActionSetAbstract(parent, name), m_separator(0), m_tableActionMenu_0(0), m_insertActionMenu_1(0)
{
m_separator = new KActionSeparator();
@@ -277,7 +277,7 @@ bool TableTagActionSet::isInTagContext() const
return parentTag(m_currentNode, "table");
}
-void TableTagActionSet::initActionMenus(QWidget* widget)
+void TableTagActionSet::initActionMenus(TQWidget* widget)
{
Q_ASSERT(!m_tableActionMenu_0);
@@ -287,7 +287,7 @@ void TableTagActionSet::initActionMenus(QWidget* widget)
}
-void TableTagActionSet::initActions(QWidget* parent)
+void TableTagActionSet::initActions(TQWidget* parent)
{
if(!m_tableActionMenu_0)
initActionMenus(parent);
@@ -296,34 +296,34 @@ void TableTagActionSet::initActions(QWidget* parent)
// Insert___________________________________________________________________________
- QString actionName = "insert_table";
+ TQString actionName = "insert_table";
//m_actionNames += actionName;
new KAction(i18n("Table..."), 0, this,
- SLOT(slotInsertTable()),
+ TQT_SLOT(slotInsertTable()),
ac, actionName);
actionName = "insert_row_above";
//m_actionNames += actionName;
new KAction(i18n("Row Above"), 0, this,
- SLOT(slotInsertRowAbove()),
+ TQT_SLOT(slotInsertRowAbove()),
ac, actionName);
actionName = "insert_row_below";
//m_actionNames += actionName;
new KAction(i18n("Row Below"), 0, this,
- SLOT(slotInsertRowBelow()),
+ TQT_SLOT(slotInsertRowBelow()),
ac, actionName);
actionName = "insert_column_left";
//m_actionNames += actionName;
new KAction(i18n("Column Left"), 0, this,
- SLOT(slotInsertColumnLeft()),
+ TQT_SLOT(slotInsertColumnLeft()),
ac, actionName);
actionName = "insert_column_right";
//m_actionNames += actionName;
new KAction(i18n("Column Right"), 0, this,
- SLOT(slotInsertColumnRight()),
+ TQT_SLOT(slotInsertColumnRight()),
ac, actionName);
// Remove___________________________________________________________________________
@@ -331,31 +331,31 @@ void TableTagActionSet::initActions(QWidget* parent)
actionName = "remove_table";
//m_actionNames += actionName;
new KAction(i18n("Table"), 0, this,
- SLOT(slotRemoveTable()),
+ TQT_SLOT(slotRemoveTable()),
ac, actionName);
actionName = "remove_rows";
//m_actionNames += actionName;
new KAction(i18n("Row(s)"), 0, this,
- SLOT(slotRemoveRows()),
+ TQT_SLOT(slotRemoveRows()),
ac, actionName);
actionName = "remove_columns";
//m_actionNames += actionName;
new KAction(i18n("Column(s)"), 0, this,
- SLOT(slotRemoveColumns()),
+ TQT_SLOT(slotRemoveColumns()),
ac, actionName);
actionName = "remove_cells";
//m_actionNames += actionName;
new KAction(i18n("Cell(s)"), 0, this,
- SLOT(slotRemoveCells()),
+ TQT_SLOT(slotRemoveCells()),
ac, actionName);
actionName = "remove_cells_content";
//m_actionNames += actionName;
new KAction(i18n("Cell(s) Content"), 0, this,
- SLOT(slotRemoveCellsContent()),
+ TQT_SLOT(slotRemoveCellsContent()),
ac, actionName);
// Merge___________________________________________________________________________
@@ -363,11 +363,11 @@ void TableTagActionSet::initActions(QWidget* parent)
actionName = "merge_selected_cells";
//m_actionNames += actionName;
new KAction(i18n("Merge Selected Cells"), 0, this,
- SLOT(slotMergeSelectedCells()),
+ TQT_SLOT(slotMergeSelectedCells()),
ac, actionName);
}
-bool TableTagActionSet::fillWithTagActions(QWidget* widget, DOM::Node const& node)
+bool TableTagActionSet::fillWithTagActions(TQWidget* widget, DOM::Node const& node)
{
bool validNode = TagActionSetAbstract::fillWithTagActions(widget, node);
@@ -553,7 +553,7 @@ bool TableTagActionSet::fillWithTagActions(QWidget* widget, DOM::Node const& nod
return true;
}
-void TableTagActionSet::unplugAllActions(QWidget* widget) const
+void TableTagActionSet::unplugAllActions(TQWidget* widget) const
{
m_separator->unplugAll();
m_tableActionMenu_0->unplug(widget);
@@ -912,8 +912,8 @@ bool TableTagActionSet::canMergeSelectedCells() const
NodeSelectionInd selection;
selection.fillWithVPLCursorSelection();
- QValueList<int> start = selection.cursorNode();
- QValueList<int> end = selection.cursorNodeEndSel();
+ TQValueList<int> start = selection.cursorNode();
+ TQValueList<int> end = selection.cursorNodeEndSel();
return start != end;
}
@@ -960,7 +960,7 @@ void TableTagActionSet::slotMergeSelectedCells()
if(count == 1)
return;
- kafkaCommon::editNodeAttribute(startTd, "colspan", QString::number(count), modifs);
+ kafkaCommon::editNodeAttribute(startTd, "colspan", TQString::number(count), modifs);
kafkaCommon::editNodeAttribute(startTd, "rowspan", "1", modifs);
view->document()->docUndoRedo->addNewModifsSet(modifs, undoRedo::NodeTreeModif);
diff --git a/quanta/utility/tagactionset.h b/quanta/utility/tagactionset.h
index 6bb2448f..b5a962c5 100644
--- a/quanta/utility/tagactionset.h
+++ b/quanta/utility/tagactionset.h
@@ -24,7 +24,7 @@ class Node;
}
class KActionSeparator;
-#include <qobject.h>
+#include <tqobject.h>
class QWidget;
class KActionSet;
class KActionMenu;
@@ -39,21 +39,21 @@ class TagActionSetAbstract : public QObject
{
Q_OBJECT
public:
- TagActionSetAbstract(QObject *parent = 0, const char *name = 0);
+ TagActionSetAbstract(TQObject *parent = 0, const char *name = 0);
virtual ~TagActionSetAbstract();
DOM::Node const& currentDomNode() const {return m_currentDomNode;}
- static Node* parentTag(Node* node, QString const& tagName);
- static Node* firstChildTag(Node* node, QString const& tagName);
+ static Node* parentTag(Node* node, TQString const& tagName);
+ static Node* firstChildTag(Node* node, TQString const& tagName);
virtual bool isInTagContext(/*DOM::Node const& node*/) const = 0;
- virtual void initActions(QWidget* parent) = 0;
- virtual bool fillWithTagActions(QWidget* widget, DOM::Node const& node);
- virtual void unplugAllActions(QWidget* widget) const = 0;
+ virtual void initActions(TQWidget* parent) = 0;
+ virtual bool fillWithTagActions(TQWidget* widget, DOM::Node const& node);
+ virtual void unplugAllActions(TQWidget* widget) const = 0;
protected:
- virtual void initActionMenus(QWidget* widget) = 0;
+ virtual void initActionMenus(TQWidget* widget) = 0;
protected:
Node* m_currentNode;
@@ -67,13 +67,13 @@ class TagActionSet : public TagActionSetAbstract
{
Q_OBJECT
public:
- TagActionSet(QObject *parent = 0, const char *name = 0);
+ TagActionSet(TQObject *parent = 0, const char *name = 0);
virtual ~TagActionSet() {}
virtual bool isInTagContext() const;
- virtual void initActions(QWidget* parent);
- virtual bool fillWithTagActions(QWidget* widget, DOM::Node const& node);
- virtual void unplugAllActions(QWidget* widget) const;
+ virtual void initActions(TQWidget* parent);
+ virtual bool fillWithTagActions(TQWidget* widget, DOM::Node const& node);
+ virtual void unplugAllActions(TQWidget* widget) const;
public slots:
void slotApplySourceIndentation();
@@ -81,7 +81,7 @@ public slots:
void slotCutDivElement();
protected:
- virtual void initActionMenus(QWidget* widget);
+ virtual void initActionMenus(TQWidget* widget);
private:
bool isInDivArea() const;
@@ -95,14 +95,14 @@ class TableTagActionSet : public TagActionSetAbstract
{
Q_OBJECT
public:
- TableTagActionSet(QObject *parent = 0, const char *name = 0);
+ TableTagActionSet(TQObject *parent = 0, const char *name = 0);
virtual ~TableTagActionSet()
{}
virtual bool isInTagContext(/*DOM::Node const& node*/) const;
- virtual void initActions(QWidget* parent);
- virtual bool fillWithTagActions(QWidget* widget, DOM::Node const& node);
- virtual void unplugAllActions(QWidget* widget) const;
+ virtual void initActions(TQWidget* parent);
+ virtual bool fillWithTagActions(TQWidget* widget, DOM::Node const& node);
+ virtual void unplugAllActions(TQWidget* widget) const;
public slots:
// Insert
@@ -121,7 +121,7 @@ public slots:
void slotMergeSelectedCells();
protected:
- virtual void initActionMenus(QWidget* widget);
+ virtual void initActionMenus(TQWidget* widget);
private:
// Insert
diff --git a/quanta/utility/toolbartabwidget.cpp b/quanta/utility/toolbartabwidget.cpp
index 03c6e86b..29c7cfa9 100644
--- a/quanta/utility/toolbartabwidget.cpp
+++ b/quanta/utility/toolbartabwidget.cpp
@@ -13,14 +13,14 @@
***************************************************************************/
//qt includes
-#include <qevent.h>
-#include <qlayout.h>
-#include <qobjectlist.h>
-#include <qpoint.h>
-#include <qtabbar.h>
-#include <qwidgetstack.h>
-#include <qtabwidget.h>
-#include <qfontmetrics.h>
+#include <tqevent.h>
+#include <tqlayout.h>
+#include <tqobjectlist.h>
+#include <tqpoint.h>
+#include <tqtabbar.h>
+#include <tqwidgetstack.h>
+#include <tqtabwidget.h>
+#include <tqfontmetrics.h>
//kde includes
#include <kaction.h>
@@ -38,45 +38,45 @@
//app includes
#include "toolbartabwidget.h"
-ToolbarTabWidget::ToolbarTabWidget(QWidget * parent, const char * name, WFlags f)
-:QTabWidget(parent, name, f)
+ToolbarTabWidget::ToolbarTabWidget(TQWidget * parent, const char * name, WFlags f)
+:TQTabWidget(parent, name, f)
{
m_popupMenu = new KPopupMenu(this);
m_popupMenu->insertTitle(i18n("Toolbar Menu"), 1);
- m_popupMenu->insertItem(i18n("New Action..."), parent, SLOT(slotNewAction()));
+ m_popupMenu->insertItem(i18n("New Action..."), parent, TQT_SLOT(slotNewAction()));
m_popupMenu->insertSeparator();
- m_popupMenu->insertItem(i18n("New Toolbar..."), parent, SLOT(slotAddToolbar()));
- m_popupMenu->insertItem(i18n("Remove Toolbar"), this, SLOT(slotRemoveToolbar()));
- m_popupMenu->insertItem(i18n("Rename Toolbar..."), this, SLOT(slotRenameToolbar()));
- m_popupMenu->insertItem(SmallIconSet("configure_toolbars"), i18n("Configure Toolbars..."), this, SLOT(slotEditToolbar()));
+ m_popupMenu->insertItem(i18n("New Toolbar..."), parent, TQT_SLOT(slotAddToolbar()));
+ m_popupMenu->insertItem(i18n("Remove Toolbar"), this, TQT_SLOT(slotRemoveToolbar()));
+ m_popupMenu->insertItem(i18n("Rename Toolbar..."), this, TQT_SLOT(slotRenameToolbar()));
+ m_popupMenu->insertItem(SmallIconSet("configure_toolbars"), i18n("Configure Toolbars..."), this, TQT_SLOT(slotEditToolbar()));
- connect(this, SIGNAL(removeToolbar(const QString&)),
- parent, SLOT(slotRemoveToolbar(const QString&)));
- connect(this, SIGNAL(renameToolbar(const QString&)),
- parent, SLOT(slotRenameToolbar(const QString&)));
- connect(this, SIGNAL(editToolbar(const QString&)),
- parent, SLOT(slotConfigureToolbars(const QString&)));
- connect(this, SIGNAL(newAction()),
- parent, SLOT(slotNewAction()));
- connect(this, SIGNAL(addToolbar()),
- parent, SLOT(slotAddToolbar()));
+ connect(this, TQT_SIGNAL(removeToolbar(const TQString&)),
+ parent, TQT_SLOT(slotRemoveToolbar(const TQString&)));
+ connect(this, TQT_SIGNAL(renameToolbar(const TQString&)),
+ parent, TQT_SLOT(slotRenameToolbar(const TQString&)));
+ connect(this, TQT_SIGNAL(editToolbar(const TQString&)),
+ parent, TQT_SLOT(slotConfigureToolbars(const TQString&)));
+ connect(this, TQT_SIGNAL(newAction()),
+ parent, TQT_SLOT(slotNewAction()));
+ connect(this, TQT_SIGNAL(addToolbar()),
+ parent, TQT_SLOT(slotAddToolbar()));
KAcceleratorManager::setNoAccel(this);
}
-void ToolbarTabWidget::insertTab(QWidget *child, const QString &label, const QString &id)
+void ToolbarTabWidget::insertTab(TQWidget *child, const TQString &label, const TQString &id)
{
if (child->inherits("KToolBar") && child->parentWidget())
{
- QTabWidget::insertTab(child->parentWidget(), label);
+ TQTabWidget::insertTab(child->parentWidget(), label);
toolbarList.insert(id, child);
}
}
-QWidget* ToolbarTabWidget::page(int index)
+TQWidget* ToolbarTabWidget::page(int index)
{
- QWidget *w = QTabWidget::page(index);
+ TQWidget *w = TQTabWidget::page(index);
- for (QMap<QString, QWidget*>::Iterator it = toolbarList.begin(); it != toolbarList.end(); ++it)
+ for (TQMap<TQString, TQWidget*>::Iterator it = toolbarList.begin(); it != toolbarList.end(); ++it)
{
if (it.data()->parentWidget() == w)
{
@@ -87,10 +87,10 @@ QWidget* ToolbarTabWidget::page(int index)
return w;
}
-QString ToolbarTabWidget::id(QWidget *w) const
+TQString ToolbarTabWidget::id(TQWidget *w) const
{
- QString idStr;
- for (QMap<QString, QWidget*>::ConstIterator it = toolbarList.constBegin(); it != toolbarList.constEnd(); ++it)
+ TQString idStr;
+ for (TQMap<TQString, TQWidget*>::ConstIterator it = toolbarList.constBegin(); it != toolbarList.constEnd(); ++it)
{
if (it.data()->parentWidget() == w)
{
@@ -101,11 +101,11 @@ QString ToolbarTabWidget::id(QWidget *w) const
return idStr;
}
-QString ToolbarTabWidget::id(int index) const
+TQString ToolbarTabWidget::id(int index) const
{
- QWidget *w = QTabWidget::page(index);
- QString idStr;
- for (QMap<QString, QWidget*>::ConstIterator it = toolbarList.constBegin(); it != toolbarList.constEnd(); ++it)
+ TQWidget *w = TQTabWidget::page(index);
+ TQString idStr;
+ for (TQMap<TQString, TQWidget*>::ConstIterator it = toolbarList.constBegin(); it != toolbarList.constEnd(); ++it)
{
if (it.data()->parentWidget() == w)
{
@@ -116,19 +116,19 @@ QString ToolbarTabWidget::id(int index) const
return idStr;
}
-QWidget* ToolbarTabWidget::page(const QString& id)
+TQWidget* ToolbarTabWidget::page(const TQString& id)
{
- QWidget *w = toolbarList.find(id).data();
+ TQWidget *w = toolbarList.find(id).data();
return w;
}
-void ToolbarTabWidget::removePage(QWidget * w)
+void ToolbarTabWidget::removePage(TQWidget * w)
{
- QWidget *parent = w->parentWidget();
+ TQWidget *parent = w->parentWidget();
if (w->inherits("KToolBar") && parent)
{
- QTabWidget::removePage(parent);
- for (QMap<QString, QWidget*>::ConstIterator it = toolbarList.constBegin(); it != toolbarList.constEnd(); ++it)
+ TQTabWidget::removePage(parent);
+ for (TQMap<TQString, TQWidget*>::ConstIterator it = toolbarList.constBegin(); it != toolbarList.constEnd(); ++it)
{
if (it.data() == w)
{
@@ -155,21 +155,21 @@ void ToolbarTabWidget::slotEditToolbar()
emit editToolbar(tabUnderMouseLabel + " <quanta>");
}
-void ToolbarTabWidget::mousePressEvent ( QMouseEvent * e )
+void ToolbarTabWidget::mousePressEvent ( TQMouseEvent * e )
{
if (e->button() == Qt::RightButton)
{
- QPoint p = e->globalPos();
- QTab *tab = 0L;
- QWidget *pageW = 0L;
+ TQPoint p = e->globalPos();
+ TQTab *tab = 0L;
+ TQWidget *pageW = 0L;
for (int i =0; i < tabBar()->count(); i++)
{
tab = tabBar()->tabAt(i);
pageW = page(i);
- QRect r = tab->rect();
- QPoint p1 = mapToGlobal(r.topLeft());
- QPoint p2 = mapToGlobal(r.bottomRight());
- if (QRect(p1, p2).contains(p))
+ TQRect r = tab->rect();
+ TQPoint p1 = mapToGlobal(r.topLeft());
+ TQPoint p2 = mapToGlobal(r.bottomRight());
+ if (TQRect(p1, p2).contains(p))
break;
else
tab = 0L;
@@ -177,7 +177,7 @@ void ToolbarTabWidget::mousePressEvent ( QMouseEvent * e )
tabUnderMouseLabel = tab ? tab->text() : label(currentPageIndex());
if (!pageW)
pageW = currentPage();
- for (QMap<QString, QWidget*>::Iterator it = toolbarList.begin(); it != toolbarList.end(); ++it)
+ for (TQMap<TQString, TQWidget*>::Iterator it = toolbarList.begin(); it != toolbarList.end(); ++it)
{
if (it.data()->parentWidget() == pageW)
{
@@ -191,14 +191,14 @@ void ToolbarTabWidget::mousePressEvent ( QMouseEvent * e )
}
-void ToolbarTabWidget::resizeEvent(QResizeEvent *e)
+void ToolbarTabWidget::resizeEvent(TQResizeEvent *e)
{
- QWidget::resizeEvent(e);
- QWidget *tb;
- for (QMap<QString, QWidget*>::Iterator it = toolbarList.begin(); it != toolbarList.end(); ++it)
+ TQWidget::resizeEvent(e);
+ TQWidget *tb;
+ for (TQMap<TQString, TQWidget*>::Iterator it = toolbarList.begin(); it != toolbarList.end(); ++it)
{
tb = it.data();
- tb->resize(QSize(width(), tb->height()));
+ tb->resize(TQSize(width(), tb->height()));
}
int i = currentPageIndex();
if (i > 0)
@@ -217,13 +217,13 @@ int ToolbarTabWidget::tabHeight() const
int height = tabBar()->height();
if (height < 2)
{
- height = QFontMetrics(KGlobalSettings::generalFont()).height() + 12;
+ height = TQFontMetrics(KGlobalSettings::generalFont()).height() + 12;
}
return height;
}
-QuantaToolBar::QuantaToolBar(QWidget *parent, const char *name, bool honor_style, bool readConfig)
+QuantaToolBar::QuantaToolBar(TQWidget *parent, const char *name, bool honor_style, bool readConfig)
:KToolBar (parent, name=0, honor_style, readConfig)
{
m_popupMenu = new KPopupMenu(this);
@@ -235,8 +235,8 @@ QuantaToolBar::QuantaToolBar(QWidget *parent, const char *name, bool honor_style
m_iconTextMenu->insertItem(i18n("Text Only"), 1);
m_iconTextMenu->insertItem(i18n("Text Alongside Icons"), 2);
m_iconTextMenu->insertItem(i18n("Text Under Icons"), 3);
- connect(m_iconTextMenu, SIGNAL(activated(int)), SLOT(slotIconTextChanged(int)));
- connect(m_iconTextMenu, SIGNAL(aboutToShow()), SLOT(slotIconTextMenuAboutToShow()));
+ connect(m_iconTextMenu, TQT_SIGNAL(activated(int)), TQT_SLOT(slotIconTextChanged(int)));
+ connect(m_iconTextMenu, TQT_SIGNAL(aboutToShow()), TQT_SLOT(slotIconTextMenuAboutToShow()));
setIconText(ToolbarTabWidget::ref()->iconText(), false);
}
@@ -263,7 +263,7 @@ void QuantaToolBar::slotIconTextChanged(int id)
{
ToolbarTabWidget *toolbarTab = ToolbarTabWidget::ref();
int width = toolbarTab->width();
- int bigHeight = iconSize() + QFontMetrics(KGlobalSettings::toolBarFont()).height() + 10;
+ int bigHeight = iconSize() + TQFontMetrics(KGlobalSettings::toolBarFont()).height() + 10;
int normalHeight = iconSize() + 10;
for (int i = 0; i < toolbarTab->count(); i++)
{
@@ -294,41 +294,41 @@ void QuantaToolBar::slotIconTextChanged(int id)
}
}
-void QuantaToolBar::mousePressEvent(QMouseEvent *e)
+void QuantaToolBar::mousePressEvent(TQMouseEvent *e)
{
if (e->button() == Qt::RightButton)
{
m_popupMenu->clear();
- QPoint p = e->globalPos();
+ TQPoint p = e->globalPos();
if (m_toolbarTab)
{
m_toolbarTab->tabUnderMouse = m_toolbarTab->id(m_toolbarTab->currentPageIndex());
m_toolbarTab->tabUnderMouseLabel = m_toolbarTab->label(m_toolbarTab->currentPageIndex());
m_popupMenu->insertTitle(i18n("Toolbar Menu") + " - "
+ i18n(m_toolbarTab->tabUnderMouseLabel.utf8()));
- m_popupMenu->insertItem(i18n("New Action..."), m_toolbarTab, SIGNAL(newAction()));
- QObjectList* childrenList = queryList("KToolBarButton");
+ m_popupMenu->insertItem(i18n("New Action..."), m_toolbarTab, TQT_SIGNAL(newAction()));
+ TQObjectList* childrenList = queryList("KToolBarButton");
for (uint i = 0; i < childrenList->count(); i++)
{
KToolBarButton *w = static_cast<KToolBarButton*>(childrenList->at(i));
- QPoint p1 = w->parentWidget()->mapToGlobal(w->pos());
- QPoint p2 = QPoint(p1.x() + w->width(), p1.y()+w->height());
- if (QRect(p1, p2).contains(p))
+ TQPoint p1 = w->parentWidget()->mapToGlobal(w->pos());
+ TQPoint p2 = TQPoint(p1.x() + w->width(), p1.y()+w->height());
+ if (TQRect(p1, p2).contains(p))
{
currentActionName = w->textLabel();
- QString actionName = currentActionName;
- m_popupMenu->insertItem(i18n("Remove Action - %1").arg(actionName.replace('&',"&&")), this, SLOT(slotRemoveAction()));
- m_popupMenu->insertItem(i18n("Edit Action - %1").arg(actionName), this, SLOT(slotEditAction()));
+ TQString actionName = currentActionName;
+ m_popupMenu->insertItem(i18n("Remove Action - %1").arg(actionName.replace('&',"&&")), this, TQT_SLOT(slotRemoveAction()));
+ m_popupMenu->insertItem(i18n("Edit Action - %1").arg(actionName), this, TQT_SLOT(slotEditAction()));
break;
}
}
m_popupMenu->insertSeparator();
- m_popupMenu->insertItem(i18n("New Toolbar..."), m_toolbarTab, SIGNAL(addToolbar()));
- m_popupMenu->insertItem(i18n("Remove Toolbar"), m_toolbarTab, SLOT(slotRemoveToolbar()));
- m_popupMenu->insertItem(i18n("Rename Toolbar..."), m_toolbarTab, SLOT(slotRenameToolbar()));
+ m_popupMenu->insertItem(i18n("New Toolbar..."), m_toolbarTab, TQT_SIGNAL(addToolbar()));
+ m_popupMenu->insertItem(i18n("Remove Toolbar"), m_toolbarTab, TQT_SLOT(slotRemoveToolbar()));
+ m_popupMenu->insertItem(i18n("Rename Toolbar..."), m_toolbarTab, TQT_SLOT(slotRenameToolbar()));
m_popupMenu->insertSeparator();
m_popupMenu->insertItem( i18n("Text Position"), m_iconTextMenu);
- m_popupMenu->insertItem(SmallIconSet("configure_toolbars"), i18n("Configure Toolbars..."), m_toolbarTab, SLOT(slotEditToolbar()));
+ m_popupMenu->insertItem(SmallIconSet("configure_toolbars"), i18n("Configure Toolbars..."), m_toolbarTab, TQT_SLOT(slotEditToolbar()));
}
m_popupMenu->popup(p);
}
@@ -341,7 +341,7 @@ void QuantaToolBar::slotEditAction()
void QuantaToolBar::slotRemoveAction()
{
- if ( KMessageBox::warningContinueCancel(this, i18n("<qt>Are you sure you want to remove the <b>%1</b> action?</qt>").arg(currentActionName),QString::null,KStdGuiItem::del()) == KMessageBox::Continue )
+ if ( KMessageBox::warningContinueCancel(this, i18n("<qt>Are you sure you want to remove the <b>%1</b> action?</qt>").arg(currentActionName),TQString::null,KStdGuiItem::del()) == KMessageBox::Continue )
{
emit removeAction(m_toolbarTab->tabUnderMouse, currentActionName);
}
diff --git a/quanta/utility/toolbartabwidget.h b/quanta/utility/toolbartabwidget.h
index aa800ae6..2fcc6718 100644
--- a/quanta/utility/toolbartabwidget.h
+++ b/quanta/utility/toolbartabwidget.h
@@ -15,8 +15,8 @@
#ifndef TOOLBARTABWIDGET_H
#define TOOLBARTABWIDGET_H
-#include <qwidget.h>
-#include <qmap.h>
+#include <tqwidget.h>
+#include <tqmap.h>
class QTabWidget;
class KPopupMenu;
@@ -28,9 +28,9 @@ class ToolbarTabWidget: public QTabWidget
{
Q_OBJECT
public:
- QWidgetStack *m_widgetStack;
+ TQWidgetStack *m_widgetStack;
- static ToolbarTabWidget* const ref(QWidget *parent = 0L, const char *name = 0L)
+ static ToolbarTabWidget* const ref(TQWidget *parent = 0L, const char *name = 0L)
{
static ToolbarTabWidget *m_ref;
if (!m_ref) m_ref = new ToolbarTabWidget (parent, name);
@@ -38,18 +38,18 @@ public:
}
virtual ~ToolbarTabWidget(){};
- virtual void insertTab(QWidget *child, const QString &label, const QString &id);
- virtual QWidget* page(int index);
- virtual QWidget* page(const QString& id);
+ virtual void insertTab(TQWidget *child, const TQString &label, const TQString &id);
+ virtual TQWidget* page(int index);
+ virtual TQWidget* page(const TQString& id);
int tabHeight() const;
- QString id(QWidget *w) const;
- QString id(int index) const;
+ TQString id(TQWidget *w) const;
+ TQString id(int index) const;
KToolBar::IconText iconText() const {return m_iconText;}
void setIconText(KToolBar::IconText mode) {m_iconText = mode; emit iconTextModeChanged();}
public slots:
- virtual void removePage(QWidget * w );
- virtual void resizeEvent(QResizeEvent *);
+ virtual void removePage(TQWidget * w );
+ virtual void resizeEvent(TQResizeEvent *);
private slots:
void slotRemoveToolbar();
@@ -57,26 +57,26 @@ private slots:
void slotEditToolbar();
signals:
- void removeToolbar(const QString&);
- void renameToolbar(const QString&);
- void editToolbar(const QString&);
+ void removeToolbar(const TQString&);
+ void renameToolbar(const TQString&);
+ void editToolbar(const TQString&);
void newAction();
void addToolbar();
void iconTextModeChanged();
public:
- QString tabUnderMouse;
- QString tabUnderMouseLabel;
+ TQString tabUnderMouse;
+ TQString tabUnderMouseLabel;
protected:
- virtual void mousePressEvent ( QMouseEvent * e );
+ virtual void mousePressEvent ( TQMouseEvent * e );
KPopupMenu *m_popupMenu;
- QTabBar *m_tabBar;
- QMap<QString, QWidget*> toolbarList;
+ TQTabBar *m_tabBar;
+ TQMap<TQString, TQWidget*> toolbarList;
private:
- ToolbarTabWidget(QWidget * parent = 0, const char * name = 0, WFlags f = 0);
+ ToolbarTabWidget(TQWidget * parent = 0, const char * name = 0, WFlags f = 0);
KToolBar::IconText m_iconText;
};
@@ -86,7 +86,7 @@ class QuantaToolBar: public KToolBar
Q_OBJECT
public:
- QuantaToolBar (QWidget *parent, const char *name=0, bool honor_style=FALSE, bool readConfig=TRUE);
+ QuantaToolBar (TQWidget *parent, const char *name=0, bool honor_style=FALSE, bool readConfig=TRUE);
virtual ~QuantaToolBar() {};
private slots:
@@ -96,16 +96,16 @@ private slots:
void slotIconTextMenuAboutToShow();
signals:
- void removeAction(const QString&, const QString&);
- void editAction(const QString&);
+ void removeAction(const TQString&, const TQString&);
+ void editAction(const TQString&);
protected:
- virtual void mousePressEvent ( QMouseEvent * e );
+ virtual void mousePressEvent ( TQMouseEvent * e );
KPopupMenu *m_popupMenu;
KPopupMenu *m_iconTextMenu;
ToolbarTabWidget *m_toolbarTab;
- QString currentActionName;
+ TQString currentActionName;
};
#endif
diff --git a/quanta/utility/toolbarxmlgui.cpp b/quanta/utility/toolbarxmlgui.cpp
index 1d7d1558..0292e188 100644
--- a/quanta/utility/toolbarxmlgui.cpp
+++ b/quanta/utility/toolbarxmlgui.cpp
@@ -15,7 +15,7 @@
#include "toolbarxmlgui.h"
-ToolbarXMLGUI::ToolbarXMLGUI(const QString& xmlFile)
+ToolbarXMLGUI::ToolbarXMLGUI(const TQString& xmlFile)
: KXMLGUIClient()
{
setLocalXMLFile(xmlFile);
diff --git a/quanta/utility/toolbarxmlgui.h b/quanta/utility/toolbarxmlgui.h
index 74ac04cf..3043424a 100644
--- a/quanta/utility/toolbarxmlgui.h
+++ b/quanta/utility/toolbarxmlgui.h
@@ -25,7 +25,7 @@
class ToolbarXMLGUI : public KXMLGUIClient {
public:
- ToolbarXMLGUI(const QString& xmlFile);
+ ToolbarXMLGUI(const TQString& xmlFile);
~ToolbarXMLGUI();
};