summaryrefslogtreecommitdiffstats
path: root/quanta/src
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/src
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/src')
-rw-r--r--quanta/src/dcopquanta.cpp34
-rw-r--r--quanta/src/dcopquanta.h6
-rw-r--r--quanta/src/dcopquantaif.h8
-rw-r--r--quanta/src/dcopsettings.cpp8
-rw-r--r--quanta/src/dcopsettings.h6
-rw-r--r--quanta/src/dcopsettingsif.h8
-rw-r--r--quanta/src/dcopwindowmanagerif.h30
-rw-r--r--quanta/src/document.cpp556
-rw-r--r--quanta/src/document.h140
-rw-r--r--quanta/src/dtds.cpp274
-rw-r--r--quanta/src/dtds.h36
-rw-r--r--quanta/src/kqapp.cpp32
-rw-r--r--quanta/src/kqapp.h2
-rw-r--r--quanta/src/main.cpp14
-rw-r--r--quanta/src/quanta.cpp960
-rw-r--r--quanta/src/quanta.h162
-rw-r--r--quanta/src/quanta_init.cpp830
-rw-r--r--quanta/src/quanta_init.h18
-rw-r--r--quanta/src/quantadoc.cpp68
-rw-r--r--quanta/src/quantadoc.h6
-rw-r--r--quanta/src/quantaview.cpp152
-rw-r--r--quanta/src/quantaview.h52
-rw-r--r--quanta/src/viewmanager.cpp112
-rw-r--r--quanta/src/viewmanager.h16
24 files changed, 1765 insertions, 1765 deletions
diff --git a/quanta/src/dcopquanta.cpp b/quanta/src/dcopquanta.cpp
index 55ff068e..149240d6 100644
--- a/quanta/src/dcopquanta.cpp
+++ b/quanta/src/dcopquanta.cpp
@@ -17,7 +17,7 @@
//kde includes
//qt includes
-#include <qregexp.h>
+#include <tqregexp.h>
//app includes
#include "dcopquanta.h"
@@ -29,21 +29,21 @@ DCOPQuanta::DCOPQuanta() : DCOPObject("QuantaIf")
{
}
-QStringList DCOPQuanta::selectors(const QString& tag)
+TQStringList DCOPQuanta::selectors(const TQString& tag)
{
- const QRegExp rx("\\.|\\#|\\:");
- QStringList selectorList;
+ const TQRegExp rx("\\.|\\#|\\:");
+ TQStringList selectorList;
GroupElementMapList::Iterator it;
for ( it = globalGroupMap.begin(); it != globalGroupMap.end(); ++it )
{
- QString key = it.key();
+ TQString key = it.key();
if (key.startsWith("Selectors|"))
{
- QString selectorName = key.mid(10);
+ TQString selectorName = key.mid(10);
int index = selectorName.find(':');
if (index != -1)
selectorName = selectorName.mid(0, index);
- QString tmpStr;
+ TQString tmpStr;
index = selectorName.find(rx);
if (index != -1)
{
@@ -63,17 +63,17 @@ QStringList DCOPQuanta::selectors(const QString& tag)
return selectorList;
}
-QStringList DCOPQuanta::idSelectors()
+TQStringList DCOPQuanta::idSelectors()
{
- QStringList selectorList;
+ TQStringList selectorList;
GroupElementMapList::Iterator it;
for ( it = globalGroupMap.begin(); it != globalGroupMap.end(); ++it )
{
- QString key = it.key();
+ TQString key = it.key();
if (key.startsWith("Selectors|"))
{
- QString selectorName = key.mid(10);
- QString tmpStr;
+ TQString selectorName = key.mid(10);
+ TQString tmpStr;
if (selectorName.startsWith("#"))
{
selectorList << selectorName.mid(1);
@@ -83,20 +83,20 @@ QStringList DCOPQuanta::idSelectors()
return selectorList;
}
-QStringList DCOPQuanta::groupElements(const QString& group)
+TQStringList DCOPQuanta::groupElements(const TQString& group)
{
- QStringList elementList;
+ TQStringList elementList;
GroupElementMapList::Iterator it;
for ( it = globalGroupMap.begin(); it != globalGroupMap.end(); ++it )
{
- QString key = it.key();
+ TQString key = it.key();
if (key.startsWith(group + "|"))
{
- QString name = key.mid(10);
+ TQString name = key.mid(10);
int index = name.find(':');
if (index != -1)
name = name.mid(0, index);
- QString tmpStr;
+ TQString tmpStr;
index = name.find("|");
if (index != -1)
{
diff --git a/quanta/src/dcopquanta.h b/quanta/src/dcopquanta.h
index 5c92f06f..b1dd7c4b 100644
--- a/quanta/src/dcopquanta.h
+++ b/quanta/src/dcopquanta.h
@@ -26,9 +26,9 @@ public:
DCOPQuanta();
~DCOPQuanta() {};
- virtual QStringList selectors(const QString& tag);
- virtual QStringList idSelectors();
- virtual QStringList groupElements(const QString &group);
+ virtual TQStringList selectors(const TQString& tag);
+ virtual TQStringList idSelectors();
+ virtual TQStringList groupElements(const TQString &group);
};
#endif
diff --git a/quanta/src/dcopquantaif.h b/quanta/src/dcopquantaif.h
index f0ec1818..f5ee3a5c 100644
--- a/quanta/src/dcopquantaif.h
+++ b/quanta/src/dcopquantaif.h
@@ -17,7 +17,7 @@
#ifndef DCOPQUANTAIF_H
#define DCOPQUANTAIF_H
#include <dcopobject.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
class DCOPQuantaIf : virtual public DCOPObject
{
@@ -25,9 +25,9 @@ class DCOPQuantaIf : virtual public DCOPObject
k_dcop:
- virtual QStringList selectors(const QString &tag) = 0;
- virtual QStringList idSelectors() = 0;
- virtual QStringList groupElements(const QString &group) = 0;
+ virtual TQStringList selectors(const TQString &tag) = 0;
+ virtual TQStringList idSelectors() = 0;
+ virtual TQStringList groupElements(const TQString &group) = 0;
};
#endif
diff --git a/quanta/src/dcopsettings.cpp b/quanta/src/dcopsettings.cpp
index b47e6c39..504eca84 100644
--- a/quanta/src/dcopsettings.cpp
+++ b/quanta/src/dcopsettings.cpp
@@ -25,16 +25,16 @@ DCOPSettings::DCOPSettings() : DCOPObject("SettingsIf")
{
}
-QString DCOPSettings::encoding()
+TQString DCOPSettings::encoding()
{
- QString encoding = quantaApp->defaultEncoding();
+ TQString encoding = quantaApp->defaultEncoding();
encoding.replace("iso ", "iso-"); //it's said that "iso-8859-x" is the valid format
encoding.replace("utf", "utf-"); //it's said that "utf-x" is the valid format
encoding.replace("cp ", "windows-");
return encoding;
}
-QString DCOPSettings::dtep()
+TQString DCOPSettings::dtep()
{
if (Project::ref()->hasProject())
{
@@ -44,7 +44,7 @@ QString DCOPSettings::dtep()
return DTDs::ref()->getDTDNickNameFromName(qConfig.defaultDocType);
}
-QString DCOPSettings::quotationChar()
+TQString DCOPSettings::quotationChar()
{
return qConfig.attrValueQuotation;
}
diff --git a/quanta/src/dcopsettings.h b/quanta/src/dcopsettings.h
index 62dc52b0..9509e62c 100644
--- a/quanta/src/dcopsettings.h
+++ b/quanta/src/dcopsettings.h
@@ -27,9 +27,9 @@ public:
DCOPSettings();
~DCOPSettings() {};
- virtual QString encoding();
- virtual QString dtep();
- virtual QString quotationChar();
+ virtual TQString encoding();
+ virtual TQString dtep();
+ virtual TQString quotationChar();
};
#endif
diff --git a/quanta/src/dcopsettingsif.h b/quanta/src/dcopsettingsif.h
index 7a811bc2..048117a4 100644
--- a/quanta/src/dcopsettingsif.h
+++ b/quanta/src/dcopsettingsif.h
@@ -17,7 +17,7 @@
#define DCOPSETTINGSIF_H
#include <dcopobject.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
class DCOPSettingsIf : virtual public DCOPObject
{
@@ -25,9 +25,9 @@ class DCOPSettingsIf : virtual public DCOPObject
k_dcop:
- virtual QString encoding() = 0;
- virtual QString dtep() = 0;
- virtual QString quotationChar() = 0;
+ virtual TQString encoding() = 0;
+ virtual TQString dtep() = 0;
+ virtual TQString quotationChar() = 0;
};
#endif
diff --git a/quanta/src/dcopwindowmanagerif.h b/quanta/src/dcopwindowmanagerif.h
index d0f8a908..9030f9e0 100644
--- a/quanta/src/dcopwindowmanagerif.h
+++ b/quanta/src/dcopwindowmanagerif.h
@@ -17,7 +17,7 @@
#define DCOPWINDOWMANAGERIF_H
#include <dcopobject.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
class DCOPWindowManagerIf : virtual public DCOPObject
{
@@ -26,20 +26,20 @@ class DCOPWindowManagerIf : virtual public DCOPObject
k_dcop:
virtual int currentEditorIfNum() const = 0;
- virtual QString currentURL() const = 0;
- virtual QString projectURL() const = 0;
- virtual QStringList openedURLs() const = 0;
- virtual QStringList tagAreas(const QString& tag, bool includeCoordinates, bool skipFoundContent) const = 0;
- virtual void newCursorPosition(const QString &file, int lineNumber, int columnNumber) = 0;
- virtual void newDebuggerPosition(const QString &file, int lineNumber) = 0;
- virtual void openFile(const QString &file, int lineNumber, int columnNumber) = 0;
- virtual QString saveCurrentFile() = 0;
- virtual void setDtep(const QString& dtepName, bool convert) = 0;
- virtual QString documentFolderForURL(const QString &url) = 0;
- virtual QString urlWithPreviewPrefix(const QString &url) = 0;
- virtual void addFileToProject(const QString &url) = 0;
- virtual void addFolderToProject(const QString &url) = 0;
- virtual void uploadURL(const QString &url, const QString& profile, bool markOnly) = 0;
+ virtual TQString currentURL() const = 0;
+ virtual TQString projectURL() const = 0;
+ virtual TQStringList openedURLs() const = 0;
+ virtual TQStringList tagAreas(const TQString& tag, bool includeCoordinates, bool skipFoundContent) const = 0;
+ virtual void newCursorPosition(const TQString &file, int lineNumber, int columnNumber) = 0;
+ virtual void newDebuggerPosition(const TQString &file, int lineNumber) = 0;
+ virtual void openFile(const TQString &file, int lineNumber, int columnNumber) = 0;
+ virtual TQString saveCurrentFile() = 0;
+ virtual void setDtep(const TQString& dtepName, bool convert) = 0;
+ virtual TQString documentFolderForURL(const TQString &url) = 0;
+ virtual TQString urlWithPreviewPrefix(const TQString &url) = 0;
+ virtual void addFileToProject(const TQString &url) = 0;
+ virtual void addFolderToProject(const TQString &url) = 0;
+ virtual void uploadURL(const TQString &url, const TQString& profile, bool markOnly) = 0;
};
#endif
diff --git a/quanta/src/document.cpp b/quanta/src/document.cpp
index 0c3c30ab..c3309a42 100644
--- a/quanta/src/document.cpp
+++ b/quanta/src/document.cpp
@@ -20,16 +20,16 @@
#include <stdlib.h>
//QT includes
-#include <qcheckbox.h>
-#include <qdir.h>
-#include <qeventloop.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qlineedit.h>
-#include <qtextcodec.h>
-#include <qtextstream.h>
-#include <qregexp.h>
-#include <qradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqdir.h>
+#include <tqeventloop.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqlineedit.h>
+#include <tqtextcodec.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
+#include <tqradiobutton.h>
// KDE includes
#include <kapplication.h>
@@ -93,8 +93,8 @@
extern GroupElementMapList globalGroupMap;
Document::Document(KTextEditor::Document *doc,
- QWidget *parent, const char *name, WFlags f )
- : QWidget(parent, name, f)
+ TQWidget *parent, const char *name, WFlags f )
+ : TQWidget(parent, name, f)
{
m_dirty = false;
busy = false;
@@ -164,7 +164,7 @@ Document::Document(KTextEditor::Document *doc,
m_encoding = encodingIf->encoding();
if (m_encoding.isEmpty())
m_encoding = "utf8"; //final fallback
- m_codec = QTextCodec::codecForName(m_encoding);
+ m_codec = TQTextCodec::codecForName(m_encoding);
selectionIf = dynamic_cast<KTextEditor::SelectionInterface *>(m_doc);
selectionIfExt = dynamic_cast<KTextEditor::SelectionInterfaceExt *>(m_doc);
@@ -190,7 +190,7 @@ Document::Document(KTextEditor::Document *doc,
}
tempFile = 0;
- m_tempFileName = QString::null;
+ m_tempFileName = TQString::null;
dtdName = Project::ref()->defaultDTD();
reparseEnabled = true;
repaintEnabled = true;
@@ -198,27 +198,27 @@ Document::Document(KTextEditor::Document *doc,
docUndoRedo = new undoRedo(this);
//path of the backup copy file of the document
- m_backupPathValue = QString::null;
+ m_backupPathValue = TQString::null;
- connect( m_doc, SIGNAL(charactersInteractivelyInserted (int ,int ,const QString&)),
- this, SLOT(slotCharactersInserted(int ,int ,const QString&)) );
+ connect( m_doc, TQT_SIGNAL(charactersInteractivelyInserted (int ,int ,const TQString&)),
+ this, TQT_SLOT(slotCharactersInserted(int ,int ,const TQString&)) );
- connect( m_view, SIGNAL(completionAborted()),
- this, SLOT( slotCompletionAborted()) );
+ connect( m_view, TQT_SIGNAL(completionAborted()),
+ this, TQT_SLOT( slotCompletionAborted()) );
- connect( m_view, SIGNAL(completionDone(KTextEditor::CompletionEntry)),
- this, SLOT( slotCompletionDone(KTextEditor::CompletionEntry)) );
+ connect( m_view, TQT_SIGNAL(completionDone(KTextEditor::CompletionEntry)),
+ this, TQT_SLOT( slotCompletionDone(KTextEditor::CompletionEntry)) );
- connect( m_view, SIGNAL(filterInsertString(KTextEditor::CompletionEntry*,QString *)),
- this, SLOT( slotFilterCompletion(KTextEditor::CompletionEntry*,QString *)) );
- connect( m_doc, SIGNAL(textChanged()), SLOT(slotTextChanged()));
+ connect( m_view, TQT_SIGNAL(filterInsertString(KTextEditor::CompletionEntry*,TQString *)),
+ this, TQT_SLOT( slotFilterCompletion(KTextEditor::CompletionEntry*,TQString *)) );
+ connect( m_doc, TQT_SIGNAL(textChanged()), TQT_SLOT(slotTextChanged()));
- connect(m_view, SIGNAL(gotFocus(Kate::View*)), SIGNAL(editorGotFocus()));
+ connect(m_view, TQT_SIGNAL(gotFocus(Kate::View*)), TQT_SIGNAL(editorGotFocus()));
- connect(fileWatcher, SIGNAL(dirty(const QString&)), SLOT(slotFileDirty(const QString&)));
+ connect(fileWatcher, TQT_SIGNAL(dirty(const TQString&)), TQT_SLOT(slotFileDirty(const TQString&)));
-// connect(m_doc, SIGNAL(marksChanged()), this, SLOT(slotMarksChanged()));
- connect(m_doc, SIGNAL(markChanged(KTextEditor::Mark, KTextEditor::MarkInterfaceExtension::MarkChangeAction)), this, SLOT(slotMarkChanged(KTextEditor::Mark, KTextEditor::MarkInterfaceExtension::MarkChangeAction)));
+// connect(m_doc, TQT_SIGNAL(marksChanged()), this, TQT_SLOT(slotMarksChanged()));
+ connect(m_doc, TQT_SIGNAL(markChanged(KTextEditor::Mark, KTextEditor::MarkInterfaceExtension::MarkChangeAction)), this, TQT_SLOT(slotMarkChanged(KTextEditor::Mark, KTextEditor::MarkInterfaceExtension::MarkChangeAction)));
}
@@ -232,7 +232,7 @@ Document::~Document()
delete m_doc;
}
-void Document::setUntitledUrl(const QString &url)
+void Document::setUntitledUrl(const TQString &url)
{
untitledUrl = url;
openURL(KURL());
@@ -250,9 +250,9 @@ KURL Document::url()
// kwrite addons
-void Document::insertTag(const QString &s1, const QString &s2)
+void Document::insertTag(const TQString &s1, const TQString &s2)
{
- QString selection;
+ TQString selection;
if (selectionIf && selectionIf->hasSelection())
{
@@ -267,10 +267,10 @@ void Document::insertTag(const QString &s1, const QString &s2)
/** Change the current tag's attributes with those from dict */
-void Document::changeTag(Tag *tag, QDict<QString> *dict )
+void Document::changeTag(Tag *tag, TQDict<TQString> *dict )
{
tag->modifyAttributes(dict);
- QString tagStr = tag->toString();
+ TQString tagStr = tag->toString();
reparseEnabled = false;
int bLine, bCol, eLine, eCol;
@@ -283,7 +283,7 @@ void Document::changeTag(Tag *tag, QDict<QString> *dict )
/**Change the namespace in a tag. Add if it's not present, or remove if the
namespace argument is empty*/
-void Document::changeTagNamespace(Tag *tag, const QString& nameSpace)
+void Document::changeTagNamespace(Tag *tag, const TQString& nameSpace)
{
int bl, bc;
int nl, nc;
@@ -312,9 +312,9 @@ void Document::changeTagNamespace(Tag *tag, const QString& nameSpace)
}
/**Change the attr value of the called attrName to attrValue*/
-void Document::changeTagAttribute(Tag *tag, const QString& attrName, const QString& attrValue)
+void Document::changeTagAttribute(Tag *tag, const TQString& attrName, const TQString& attrValue)
{
- QString value;
+ TQString value;
int line, col;
int index = tag->attributeIndex(attrName);
if (index != -1)
@@ -329,7 +329,7 @@ void Document::changeTagAttribute(Tag *tag, const QString& attrName, const QStri
if (line == aLine && col == aCol)
{
col += tag->attribute(index).length();
- value = QString("=") + qConfig.attrValueQuotation + attrValue + qConfig.attrValueQuotation;
+ value = TQString("=") + qConfig.attrValueQuotation + attrValue + qConfig.attrValueQuotation;
} else
{
endCol = col + value.length();
@@ -339,7 +339,7 @@ void Document::changeTagAttribute(Tag *tag, const QString& attrName, const QStri
endCol++;
}
reparseEnabled = false;
- QString textLine = editIf->textLine(line);
+ TQString textLine = editIf->textLine(line);
while (col > 1 && textLine[col-1].isSpace())
col--;
@@ -385,7 +385,7 @@ void Document::selectText(int x1, int y1, int x2, int y2 )
}
-void Document::replaceSelected(const QString &s)
+void Document::replaceSelected(const TQString &s)
{
if (selectionIf)
{
@@ -401,7 +401,7 @@ void Document::replaceSelected(const QString &s)
void Document::insertFile(const KURL& url)
{
- QString fileName;
+ TQString fileName;
if (url.isLocalFile())
{
fileName = url.path();
@@ -413,11 +413,11 @@ void Document::insertFile(const KURL& url)
return;
}
}
- QFile file(fileName);
+ TQFile file(fileName);
if (file.open(IO_ReadOnly))
{
- QTextStream stream( &file );
- stream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream stream( &file );
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
insertText(stream.read());
file.close();
} else
@@ -425,9 +425,9 @@ void Document::insertFile(const KURL& url)
}
/** Inserts text at the current cursor position */
-void Document::insertText(const QString &a_text, bool adjustCursor, bool reparse)
+void Document::insertText(const TQString &a_text, bool adjustCursor, bool reparse)
{
- QString text = a_text;
+ TQString text = a_text;
if(text.isEmpty())
return;
@@ -440,7 +440,7 @@ void Document::insertText(const QString &a_text, bool adjustCursor, bool reparse
{
int bLine, bCol;
n->tag->beginPos(bLine, bCol);
- QString s = this->text(bLine, bCol, line, col);
+ TQString s = this->text(bLine, bCol, line, col);
bool insideQuotes = false;
for (int i = 0 ; i < (int)s.length() - 1; i++)
{
@@ -500,7 +500,7 @@ void Document::insertText(const QString &a_text, bool adjustCursor, bool reparse
}
else if(!noWordWrap && !(isspace(ascii[i]))) // new word, see if it wraps
{
- // TOO SLOW int wordLength = (text.mid(i).section(QRegExp("[ \t\r\n]"), 0, 0).length());
+ // TOO SLOW int wordLength = (text.mid(i).section(TQRegExp("[ \t\r\n]"), 0, 0).length());
wordLength = -1;
for(j = i+1;ascii[j];++j) // get word size, ascii is MUCH faster
{
@@ -559,14 +559,14 @@ bool Document::insertChildTags(QTag *tag, QTag *lastTag)
{
return false;
}
- QMap<QString, bool>::Iterator it;
+ TQMap<TQString, bool>::Iterator it;
for (it = tag->childTags.begin(); it != tag->childTags.end(); ++it)
{
if (it.data())
{
childInserted = true;
QTag *childTag = QuantaCommon::tagFromDTD(tag->parentDTD, it.key());
- QString tagStr =QuantaCommon::tagCase(it.key());
+ TQString tagStr =QuantaCommon::tagCase(it.key());
if ( tag->parentDTD->singleTagStyle == "xml" &&
( childTag->isSingle() ||
(childTag->isOptional() && !qConfig.closeOptionalTags)) )
@@ -576,7 +576,7 @@ bool Document::insertChildTags(QTag *tag, QTag *lastTag)
{
insertText("<" +tagStr + ">", true, false);
}
- QString closingStr;
+ TQString closingStr;
if (insertChildTags(childTag, tag))
{
closingStr = "";
@@ -624,16 +624,16 @@ void Document::createTempFile()
closeTempFile();
tempFile = new KTempFile(tmpDir);
tempFile->setAutoDelete(true);
- m_tempFileName = QFileInfo(*(tempFile->file())).filePath();
- QString encoding = quantaApp->defaultEncoding();
+ m_tempFileName = TQFileInfo(*(tempFile->file())).filePath();
+ TQString encoding = quantaApp->defaultEncoding();
if (encodingIf)
encoding = encodingIf->encoding();
if (encoding.isEmpty())
encoding = "utf8"; //final fallback
- tempFile->textStream()->setCodec(QTextCodec::codecForName(encoding));
+ tempFile->textStream()->setCodec(TQTextCodec::codecForName(encoding));
* (tempFile->textStream()) << editIf->text();
- m_tempFileName = QFileInfo(*(tempFile->file())).filePath();
+ m_tempFileName = TQFileInfo(*(tempFile->file())).filePath();
tempFile->close();
// kdDebug(24000) << "Creating tempfile " << m_tempFileName << " for " << url() << endl;
}
@@ -645,13 +645,13 @@ void Document::closeTempFile()
delete tempFile;
tempFile = 0L;
}
- if (QFileInfo(m_tempFileName).exists())
- QFile::remove(m_tempFileName);
+ if (TQFileInfo(m_tempFileName).exists())
+ TQFile::remove(m_tempFileName);
- m_tempFileName = QString::null;
+ m_tempFileName = TQString::null;
}
-QString Document::tempFileName()
+TQString Document::tempFileName()
{
return m_tempFileName;
}
@@ -661,10 +661,10 @@ QString Document::tempFileName()
It will work even if the tag has not been completed yet. An
empty string will be returned if no tag is found.
*/
-QString Document::getTagNameAt(int line, int col )
+TQString Document::getTagNameAt(int line, int col )
{
- QString name = "";
- QString textLine = editIf->textLine(line);
+ TQString name = "";
+ TQString textLine = editIf->textLine(line);
textLine = textLine.left(col);
while (line >= 0)
{
@@ -703,7 +703,7 @@ QString Document::getTagNameAt(int line, int col )
}
/** Show the code completions passed in as an argument */
-void Document::showCodeCompletions( QValueList<KTextEditor::CompletionEntry> *completions ) {
+void Document::showCodeCompletions( TQValueList<KTextEditor::CompletionEntry> *completions ) {
bool reparse = reparseEnabled;
reparseEnabled = false;
codeCompletionIf->showCompletionBox( *completions, false );
@@ -725,7 +725,7 @@ void Document::slotCompletionDone( KTextEditor::CompletionEntry completion )
/* if (completion.type == "charCompletion")
{
m_lastCompletionList = getCharacterCompletions(completion.userdata);
- QTimer::singleShot(0, this, SLOT(slotDelayedShowCodeCompletion()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedShowCodeCompletion()));
} else*/
if (completion.type == "attribute")
{
@@ -736,7 +736,7 @@ void Document::slotCompletionDone( KTextEditor::CompletionEntry completion )
if (tag)
{
m_lastCompletionList = getAttributeValueCompletions(tag->name(), completion.text);
- QTimer::singleShot(0, this, SLOT(slotDelayedShowCodeCompletion()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedShowCodeCompletion()));
}
}
} else
@@ -755,7 +755,7 @@ void Document::slotCompletionDone( KTextEditor::CompletionEntry completion )
{
m_lastLine = line;
m_lastCol = col - 1;
- QTimer::singleShot(0, this, SLOT(slotDelayedScriptAutoCompletion()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedScriptAutoCompletion()));
}
}
}
@@ -774,12 +774,12 @@ void Document::slotDelayedShowCodeCompletion()
can filter this completion to allow more intelligent
code compeltions
*/
-void Document::slotFilterCompletion( KTextEditor::CompletionEntry *completion ,QString *string )
+void Document::slotFilterCompletion( KTextEditor::CompletionEntry *completion ,TQString *string )
{
kdDebug(24000) << *string << endl;
kdDebug(24000) << completion->userdata << endl;
int pos = completion->userdata.find("|");
- QString s = completion->userdata.left(pos);
+ TQString s = completion->userdata.left(pos);
completion->userdata.remove(0,pos+1);
string->remove(0, s.length());
kdDebug(24000) << *string << endl;
@@ -789,7 +789,7 @@ void Document::slotFilterCompletion( KTextEditor::CompletionEntry *completion ,Q
*string = completion->userdata;
uint line, col;
viewCursorIf->cursorPositionReal(&line, &col);
- QString s2 = editIf->textLine(line).left(col);
+ TQString s2 = editIf->textLine(line).left(col);
kdDebug(24000) << s2 << endl;
int pos = s2.findRev('&');
if (pos != -1)
@@ -804,8 +804,8 @@ void Document::slotFilterCompletion( KTextEditor::CompletionEntry *completion ,Q
{
uint line, col;
viewCursorIf->cursorPositionReal(&line, &col);
- QString textLine = editIf->textLine(line);
- QChar tagSeparator = completionDTD->tagSeparator;
+ TQString textLine = editIf->textLine(line);
+ TQChar tagSeparator = completionDTD->tagSeparator;
if (tagSeparator == '\'' || tagSeparator =='"')
tagSeparator = qConfig.attrValueQuotation;
if (textLine[col] != tagSeparator)
@@ -813,13 +813,13 @@ void Document::slotFilterCompletion( KTextEditor::CompletionEntry *completion ,Q
} else
if ( completion->type == "attribute" )
{
- string->append("="+QString(qConfig.attrValueQuotation)+QString(qConfig.attrValueQuotation));
+ string->append("="+TQString(qConfig.attrValueQuotation)+TQString(qConfig.attrValueQuotation));
} else
if (completion->type == "doctypeList")
{
s = *string;
string->remove(0, string->length());
- QString s2 = QString("public \""+DTDs::ref()->getDTDNameFromNickName(s)+"\"");
+ TQString s2 = TQString("public \""+DTDs::ref()->getDTDNameFromNickName(s)+"\"");
const DTDStruct *dtd = DTDs::ref()->find(DTDs::ref()->getDTDNameFromNickName(s));
if (dtd && !dtd->url.isEmpty())
{
@@ -842,24 +842,24 @@ void Document::slotReplaceChar()
/** Called when a user types in a character. From this we can show possibile
completions based on what they are trying to input.
*/
-void Document::slotCharactersInserted(int line, int column, const QString& string)
+void Document::slotCharactersInserted(int line, int column, const TQString& string)
{
if (qConfig.replaceNotInEncoding)
{
if (encodingIf)
{
- QString encoding = encodingIf->encoding();
+ TQString encoding = encodingIf->encoding();
if (encoding != m_encoding)
{
m_encoding = encoding;
- m_codec = QTextCodec::codecForName(encoding);
+ m_codec = TQTextCodec::codecForName(encoding);
}
if (!m_codec->canEncode(string[0]))
{
m_replaceLine = line;
m_replaceCol = column;
m_replaceStr = QuantaCommon::encodedChar(string[0].unicode());
- QTimer::singleShot(0, this, SLOT(slotReplaceChar()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotReplaceChar()));
return;
}
}
@@ -872,7 +872,7 @@ void Document::slotCharactersInserted(int line, int column, const QString& strin
m_replaceLine = line;
m_replaceCol = column;
m_replaceStr = QuantaCommon::encodedChar(c);
- QTimer::singleShot(0, this, SLOT(slotReplaceChar()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotReplaceChar()));
return;
}
}
@@ -934,17 +934,17 @@ void Document::slotCharactersInserted(int line, int column, const QString& strin
/** Called whenever a user inputs text in an XML type document.
Returns true if the code completionw as handled.
*/
-bool Document::xmlAutoCompletion(int line, int column, const QString & string)
+bool Document::xmlAutoCompletion(int line, int column, const TQString & string)
{
QTag *tag;
- QString tagName;
+ TQString tagName;
bool handled = false;
tagName = getTagNameAt(line, column);
tag = QuantaCommon::tagFromDTD(completionDTD, tagName);
if (!tag && !tagName.isEmpty())
tag = userTagList.find(tagName.lower());
- QString s = editIf->textLine(line).left(column + 1);
+ TQString s = editIf->textLine(line).left(column + 1);
bool namespacecompletion = false;
if (!tagName.isEmpty() && string ==":" && s.endsWith("<" + tagName + ":"))
namespacecompletion = true;
@@ -983,7 +983,7 @@ bool Document::xmlAutoCompletion(int line, int column, const QString & string)
node = node->parent;
if (node->tag->type == Tag::XmlTag && (!node->next || !QuantaCommon::closesTag(node->tag, node->next->tag)))
{
- QString name = node->tag->name;
+ TQString name = node->tag->name;
name = name.left(name.find(" | "));
if (!node->tag->nameSpace.isEmpty())
name.prepend(node->tag->nameSpace + ":");
@@ -1041,7 +1041,7 @@ bool Document::xmlAutoCompletion(int line, int column, const QString & string)
}
else if ( string == " " )
{
- QString textLine = editIf->textLine(line);
+ TQString textLine = editIf->textLine(line);
if (!QuantaCommon::insideCommentsOrQuotes(column, textLine, completionDTD))
{
showCodeCompletions(getAttributeCompletions(tagName, ""));
@@ -1051,8 +1051,8 @@ bool Document::xmlAutoCompletion(int line, int column, const QString & string)
else if ( string[0] == qConfig.attrValueQuotation )
{
//we need to find the attribute name
- QString textLine = editIf->textLine(line).left(column-1);
- QString attribute = textLine.mid(textLine.findRev(' ')+1);
+ TQString textLine = editIf->textLine(line).left(column-1);
+ TQString attribute = textLine.mid(textLine.findRev(' ')+1);
if (attribute == "style" && completionDTD->insideDTDs.contains("css"))
{
completionDTD = DTDs::ref()->find("text/css");
@@ -1066,7 +1066,7 @@ bool Document::xmlAutoCompletion(int line, int column, const QString & string)
if (!handled)
{
//check if we are inside a style attribute, and use css autocompletion if we are
- QString textLine = editIf->textLine(line);
+ TQString textLine = editIf->textLine(line);
textLine = textLine.left(column);
int pos = textLine.findRev('"');
if (pos != -1)
@@ -1078,7 +1078,7 @@ bool Document::xmlAutoCompletion(int line, int column, const QString & string)
pos = textLine.find('=');
if (pos != -1)
{
- QString attribute = textLine.left(pos);
+ TQString attribute = textLine.left(pos);
if (attribute == "style" && completionDTD->insideDTDs.contains("css"))
{
completionDTD = DTDs::ref()->find("text/css");
@@ -1088,7 +1088,7 @@ bool Document::xmlAutoCompletion(int line, int column, const QString & string)
}
}
}
- QString s = editIf->textLine(line).left(column + 1);
+ TQString s = editIf->textLine(line).left(column + 1);
pos = s.findRev('&');
if (pos != -1)
{
@@ -1102,20 +1102,20 @@ bool Document::xmlAutoCompletion(int line, int column, const QString & string)
}
/** Return a list of possible variable name completions */
-QValueList<KTextEditor::CompletionEntry>* Document::getGroupCompletions(Node *node, const StructTreeGroup& group, int line, int col)
+TQValueList<KTextEditor::CompletionEntry>* Document::getGroupCompletions(Node *node, const StructTreeGroup& group, int line, int col)
{
- QValueList<KTextEditor::CompletionEntry> *completions = new QValueList<KTextEditor::CompletionEntry>();
+ TQValueList<KTextEditor::CompletionEntry> *completions = new TQValueList<KTextEditor::CompletionEntry>();
KTextEditor::CompletionEntry completion;
completion.type = "variable";
- QString textLine = editIf->textLine(line).left(col);
- QString word = findWordRev(textLine);
+ TQString textLine = editIf->textLine(line).left(col);
+ TQString word = findWordRev(textLine);
if (!group.removeFromAutoCompleteWordRx.pattern().isEmpty())
word.remove(group.removeFromAutoCompleteWordRx);
completion.userdata = word + "|";
GroupElementMapList::Iterator it;
- QString str = group.name;
+ TQString str = group.name;
str.append("|");
str.append(word);
for ( it = globalGroupMap.begin(); it != globalGroupMap.end(); ++it )
@@ -1151,7 +1151,7 @@ QValueList<KTextEditor::CompletionEntry>* Document::getGroupCompletions(Node *no
IncludedGroupElementsMap::Iterator it2;
for ( it2 = elements.begin(); it2 != elements.end(); ++it2 )
{
- QStringList list = it2.data()[group.name].keys();
+ TQStringList list = it2.data()[group.name].keys();
list.sort();
for (uint i = 0; i < list.count(); i++)
{
@@ -1167,12 +1167,12 @@ QValueList<KTextEditor::CompletionEntry>* Document::getGroupCompletions(Node *no
return completions;
}
-bool Document::isDerivatedFrom(const QString& className, const QString &baseClass)
+bool Document::isDerivatedFrom(const TQString& className, const TQString &baseClass)
{
if (className.isEmpty() || !completionDTD->classInheritance.contains(className))
return false;
- QString parentClass = completionDTD->classInheritance[className];
+ TQString parentClass = completionDTD->classInheritance[className];
int result = 0;
do {
if (parentClass == baseClass)
@@ -1191,9 +1191,9 @@ bool Document::isDerivatedFrom(const QString& className, const QString &baseClas
/** Return a list of possible tag name completions */
-QValueList<KTextEditor::CompletionEntry>* Document::getTagCompletions(int line, int col)
+TQValueList<KTextEditor::CompletionEntry>* Document::getTagCompletions(int line, int col)
{
- QValueList<KTextEditor::CompletionEntry> *completions = new QValueList<KTextEditor::CompletionEntry>();
+ TQValueList<KTextEditor::CompletionEntry> *completions = new TQValueList<KTextEditor::CompletionEntry>();
KTextEditor::CompletionEntry completion;
switch (completionDTD->family)
{
@@ -1211,10 +1211,10 @@ QValueList<KTextEditor::CompletionEntry>* Document::getTagCompletions(int line,
QTag *parentQTag= 0L;
if (node && node->parent)
parentQTag = QuantaCommon::tagFromDTD(node->parent);
- QString textLine = editIf->textLine(line).left(col);
- QString word = findWordRev(textLine, completionDTD).upper();
- QString classStr = "";
- QString objStr;
+ TQString textLine = editIf->textLine(line).left(col);
+ TQString word = findWordRev(textLine, completionDTD).upper();
+ TQString classStr = "";
+ TQString objStr;
if (completionDTD->classGroupIndex != -1 && completionDTD->objectGroupIndex != -1)
{
textLine = textLine.left(textLine.length() - word.length());
@@ -1222,14 +1222,14 @@ QValueList<KTextEditor::CompletionEntry>* Document::getTagCompletions(int line,
if (pos != -1)
{
textLine = textLine.left(pos);
- QRegExp *r = &(completionDTD->structTreeGroups[completionDTD->classGroupIndex].usageRx);
+ TQRegExp *r = &(completionDTD->structTreeGroups[completionDTD->classGroupIndex].usageRx);
pos = r->searchRev(textLine);
if (pos != -1)
{
objStr = r->cap(1);
if (objStr == "this")
{
- QString parentGroupStr = "";
+ TQString parentGroupStr = "";
bool classFound = false;
parser->synchParseInDetail();
Node *n = parser->nodeAt(line, col);
@@ -1285,12 +1285,12 @@ QValueList<KTextEditor::CompletionEntry>* Document::getTagCompletions(int line,
return completions;
}
completion.userdata = word + "|";
- QStringList tagNameList;
- QMap<QString, QString> comments;
- //A QMap to hold the completion type (function/string/class/etc)
- QMap<QString, QString> type;
- QString tagName;
- QDictIterator<QTag> it(*(completionDTD->tagsList));
+ TQStringList tagNameList;
+ TQMap<TQString, TQString> comments;
+ //A TQMap to hold the completion type (function/string/class/etc)
+ TQMap<TQString, TQString> type;
+ TQString tagName;
+ TQDictIterator<QTag> it(*(completionDTD->tagsList));
int i = 0;
for( ; it.current(); ++it )
{
@@ -1303,7 +1303,7 @@ QValueList<KTextEditor::CompletionEntry>* Document::getTagCompletions(int line,
{
if (!parentQTag || (parentQTag && parentQTag->isChild(tagName)))
{
- tagName = tag->name() + QString("%1").arg(i, 10);
+ tagName = tag->name() + TQString("%1").arg(i, 10);
tagNameList += tagName;
comments.insert(tagName, tag->comment);
i++;
@@ -1312,14 +1312,14 @@ QValueList<KTextEditor::CompletionEntry>* Document::getTagCompletions(int line,
}
}
- QDictIterator<QTag> it2(userTagList);
+ TQDictIterator<QTag> it2(userTagList);
for( ; it2.current(); ++it2 )
{
QTag *tag = it2.current();
if ((tag->className == classStr ||
isDerivatedFrom(classStr, tag->className)) && tag->name().upper().startsWith(word))
{
- tagName = tag->name() + QString("%1").arg(i, 10);
+ tagName = tag->name() + TQString("%1").arg(i, 10);
tagNameList += tagName;
comments.insert(tagName, tag->comment);
@@ -1350,8 +1350,8 @@ QValueList<KTextEditor::CompletionEntry>* Document::getTagCompletions(int line,
// We only want to do this if we are completing Script DTDs
// We are going to use a couple of iterators to sort the list by Type
// Type Sorting is as follows: 0:Other, 1:Variables, 2: Functions (script)
- QValueList<KTextEditor::CompletionEntry>::Iterator otherIt=completions->begin();
- QValueList<KTextEditor::CompletionEntry>::Iterator variableIt=completions->begin();
+ TQValueList<KTextEditor::CompletionEntry>::Iterator otherIt=completions->begin();
+ TQValueList<KTextEditor::CompletionEntry>::Iterator variableIt=completions->begin();
for (uint i = 0; i < tagNameList.count(); i++)
{
if (completionDTD->family == Xml)
@@ -1400,16 +1400,16 @@ QValueList<KTextEditor::CompletionEntry>* Document::getTagCompletions(int line,
}
/** Return a list of valid attributes for the given tag */
-QValueList<KTextEditor::CompletionEntry>* Document::getAttributeCompletions(const QString& tagName, const QString& a_startsWith )
+TQValueList<KTextEditor::CompletionEntry>* Document::getAttributeCompletions(const TQString& tagName, const TQString& a_startsWith )
{
- QValueList<KTextEditor::CompletionEntry> *completions = new QValueList<KTextEditor::CompletionEntry>();
+ TQValueList<KTextEditor::CompletionEntry> *completions = new TQValueList<KTextEditor::CompletionEntry>();
KTextEditor::CompletionEntry completion;
QTag *tag = QuantaCommon::tagFromDTD(completionDTD, tagName);
if (!tag)
{
tag = userTagList.find(tagName.lower());
}
- QString startsWith = a_startsWith.upper();
+ TQString startsWith = a_startsWith.upper();
if (tag)
{
switch (completionDTD->family)
@@ -1421,11 +1421,11 @@ QValueList<KTextEditor::CompletionEntry>* Document::getAttributeCompletions(cons
//list specified attributes for this tag
AttributeList *list = tag->attributes();
- QValueList<KTextEditor::CompletionEntry> tempCompletions;
- QStringList nameList;
+ TQValueList<KTextEditor::CompletionEntry> tempCompletions;
+ TQStringList nameList;
for (uint i = 0; i < list->count(); i++)
{
- QString item = list->at(i)->name;
+ TQString item = list->at(i)->name;
if (item.upper().startsWith(startsWith))
{
completion.text = QuantaCommon::attrCase(item);
@@ -1436,12 +1436,12 @@ QValueList<KTextEditor::CompletionEntry>* Document::getAttributeCompletions(cons
}
//list common attributes for this tag
- for (QStringList::Iterator it = tag->commonGroups.begin(); it != tag->commonGroups.end(); ++it)
+ for (TQStringList::Iterator it = tag->commonGroups.begin(); it != tag->commonGroups.end(); ++it)
{
AttributeList *attrs = tag->parentDTD->commonAttrs->find(*it);
for (uint j = 0; j < attrs->count(); j++)
{
- QString name = attrs->at(j)->name;
+ TQString name = attrs->at(j)->name;
if (name.upper().startsWith(startsWith))
{
completion.text = QuantaCommon::attrCase(name);
@@ -1454,8 +1454,8 @@ QValueList<KTextEditor::CompletionEntry>* Document::getAttributeCompletions(cons
if (tag->name().contains("!doctype",false)) //special case, list all the known document types
{
- QStringList nickNames = DTDs::ref()->nickNameList(true);
- for ( QStringList::Iterator it = nickNames.begin(); it != nickNames.end(); ++it )
+ TQStringList nickNames = DTDs::ref()->nickNameList(true);
+ for ( TQStringList::Iterator it = nickNames.begin(); it != nickNames.end(); ++it )
{
completion.type = "doctypeList";
completion.text = *it;
@@ -1463,11 +1463,11 @@ QValueList<KTextEditor::CompletionEntry>* Document::getAttributeCompletions(cons
nameList.append(completion.text);
}
}
- //below isn't fast, but enough here. May be better with QMap<QString, KTextEditor::CompletionEntry>
+ //below isn't fast, but enough here. May be better with TQMap<TQString, KTextEditor::CompletionEntry>
nameList.sort();
- for ( QStringList::Iterator it = nameList.begin(); it != nameList.end(); ++it )
+ for ( TQStringList::Iterator it = nameList.begin(); it != nameList.end(); ++it )
{
- for (QValueList<KTextEditor::CompletionEntry>::Iterator compIt = tempCompletions.begin(); compIt != tempCompletions.end(); ++compIt)
+ for (TQValueList<KTextEditor::CompletionEntry>::Iterator compIt = tempCompletions.begin(); compIt != tempCompletions.end(); ++compIt)
{
if ( (*compIt).text == *it)
{
@@ -1485,7 +1485,7 @@ QValueList<KTextEditor::CompletionEntry>* Document::getAttributeCompletions(cons
AttributeList *list = tag->attributes();
for (uint i = 0; i < list->count(); i++)
{
- QString item = list->at(i)->name;
+ TQString item = list->at(i)->name;
completion.text = item;
completion.comment = list->at(i)->type;
completions->append( completion );
@@ -1499,21 +1499,21 @@ QValueList<KTextEditor::CompletionEntry>* Document::getAttributeCompletions(cons
}
/** Return a list of valid attribute values for the given tag and attribute */
-QValueList<KTextEditor::CompletionEntry>* Document::getAttributeValueCompletions(const QString& tagName, const QString& attribute, const QString& startsWith )
+TQValueList<KTextEditor::CompletionEntry>* Document::getAttributeValueCompletions(const TQString& tagName, const TQString& attribute, const TQString& startsWith )
{
- QValueList<KTextEditor::CompletionEntry> *completions = new QValueList<KTextEditor::CompletionEntry>();
+ TQValueList<KTextEditor::CompletionEntry> *completions = new TQValueList<KTextEditor::CompletionEntry>();
KTextEditor::CompletionEntry completion;
completion.type = "attributeValue";
completion.userdata = startsWith+"|"+tagName + "," + attribute;
bool deleteValues;
- QStringList *values = tagAttributeValues(completionDTD->name,tagName, attribute, deleteValues);
+ TQStringList *values = tagAttributeValues(completionDTD->name,tagName, attribute, deleteValues);
if (attribute.lower() == "class")
{
if (!values)
{
- values = new QStringList(quantaApp->selectors(tagName));
+ values = new TQStringList(quantaApp->selectors(tagName));
deleteValues = true;
}
} else
@@ -1521,13 +1521,13 @@ QValueList<KTextEditor::CompletionEntry>* Document::getAttributeValueCompletions
{
if (!values)
{
- values = new QStringList(quantaApp->idSelectors());
+ values = new TQStringList(quantaApp->idSelectors());
deleteValues = true;
}
}
if (values)
{
- for ( QStringList::Iterator it = values->begin(); it != values->end(); ++it )
+ for ( TQStringList::Iterator it = values->begin(); it != values->end(); ++it )
{
completion.text = *it;
if (completion.text.startsWith(startsWith))
@@ -1541,7 +1541,7 @@ QValueList<KTextEditor::CompletionEntry>* Document::getAttributeValueCompletions
int andSignPos = startsWith.find('&');
if (andSignPos != -1)
{
- QValueList<KTextEditor::CompletionEntry> *charCompletions = getCharacterCompletions(startsWith.mid(andSignPos + 1));
+ TQValueList<KTextEditor::CompletionEntry> *charCompletions = getCharacterCompletions(startsWith.mid(andSignPos + 1));
*completions += *charCompletions;
delete charCompletions;
}
@@ -1551,10 +1551,10 @@ QValueList<KTextEditor::CompletionEntry>* Document::getAttributeValueCompletions
}
/** Return a list of character completions (like &nbsp; ...) */
-QValueList<KTextEditor::CompletionEntry>* Document::getCharacterCompletions(const QString& startsWith)
+TQValueList<KTextEditor::CompletionEntry>* Document::getCharacterCompletions(const TQString& startsWith)
{
- QValueList<KTextEditor::CompletionEntry> *completions = 0L;
- QMap<QString, KTextEditor::CompletionEntry> completionMap;
+ TQValueList<KTextEditor::CompletionEntry> *completions = 0L;
+ TQMap<TQString, KTextEditor::CompletionEntry> completionMap;
//first search for entities defined in the document
const DTDStruct *dtdDTD = DTDs::ref()->find("dtd");
@@ -1583,18 +1583,18 @@ QValueList<KTextEditor::CompletionEntry>* Document::getCharacterCompletions(cons
}
if (!completions)
- completions = new QValueList<KTextEditor::CompletionEntry>();
+ completions = new TQValueList<KTextEditor::CompletionEntry>();
KTextEditor::CompletionEntry completion;
completion.type = "charCompletion";
//add the entities from the tag files
- QDictIterator<QTag> it(*(completionDTD->tagsList));
+ TQDictIterator<QTag> it(*(completionDTD->tagsList));
for( ; it.current(); ++it )
{
QTag *tag = it.current();
if (tag->type == "entity")
{
- QString tagName = tag->name(true);
+ TQString tagName = tag->name(true);
if (tagName.upper().startsWith(startsWith.upper()) || startsWith.isEmpty())
{
completion.text = tagName;
@@ -1605,22 +1605,22 @@ QValueList<KTextEditor::CompletionEntry>* Document::getCharacterCompletions(cons
}
}
- QValueList<KTextEditor::CompletionEntry> *completions2 = new QValueList<KTextEditor::CompletionEntry>();
- for (QMap<QString, KTextEditor::CompletionEntry>::ConstIterator it = completionMap.constBegin(); it != completionMap.constEnd(); ++it)
+ TQValueList<KTextEditor::CompletionEntry> *completions2 = new TQValueList<KTextEditor::CompletionEntry>();
+ for (TQMap<TQString, KTextEditor::CompletionEntry>::ConstIterator it = completionMap.constBegin(); it != completionMap.constEnd(); ++it)
{
completions2->append(it.data());
}
delete completions;
completions = completions2;
- for ( QStringList::Iterator it = charList.begin(); it != charList.end(); ++it )
+ for ( TQStringList::Iterator it = charList.begin(); it != charList.end(); ++it )
{
completion.text = *it;
int begin = completion.text.find("(&") + 2;
if (begin == 1)
continue;
int length = completion.text.find(";)") - begin + 1;
- QString s = completion.text.mid(begin, length - 1);
+ TQString s = completion.text.mid(begin, length - 1);
completion.text = s + " : " + completion.text.left(begin -2) + " - " + completion.text.mid(begin + length + 1);
if (s.startsWith(startsWith))
{
@@ -1633,13 +1633,13 @@ QValueList<KTextEditor::CompletionEntry>* Document::getCharacterCompletions(cons
}
/** Returns the DTD identifier for the document */
-QString Document::getDTDIdentifier()
+TQString Document::getDTDIdentifier()
{
return dtdName;
}
/** Sets the DTD identifier */
-void Document::setDTDIdentifier(const QString &id)
+void Document::setDTDIdentifier(const TQString &id)
{
dtdName = id.lower();
m_groupsForDTEPs.clear();
@@ -1669,15 +1669,15 @@ const DTDStruct* Document::defaultDTD() const
}
/** Find the DTD name for a part of the document. */
-QString Document::findDTDName(Tag **tag)
+TQString Document::findDTDName(Tag **tag)
{
//Do some magic to find the document type
int endLine = editIf->numLines();
- QString foundText = "";
+ TQString foundText = "";
int pos = 0;
int i = 0;
int line, startPos;
- QString text;
+ TQString text;
do
{
text = editIf->textLine(i);
@@ -1747,7 +1747,7 @@ QString Document::findDTDName(Tag **tag)
}
/** Called whenever a user inputs text in a script type document. */
-bool Document::scriptAutoCompletion(int line, int column, const QString& insertedString)
+bool Document::scriptAutoCompletion(int line, int column, const TQString& insertedString)
{
bool handled = false;
Node *node = parser->nodeAt(line, column);
@@ -1764,17 +1764,17 @@ bool Document::scriptAutoCompletion(int line, int column, const QString& inserte
int bl, bc;
node->tag->beginPos(bl, bc);
- QString s = text(bl, bc, line, column);
+ TQString s = text(bl, bc, line, column);
if (QuantaCommon::insideCommentsOrQuotes(s.length() -1, s, dtd))
return true; //again, nothing to do
- QString s2 = s;
+ TQString s2 = s;
int i = s.length() - 1;
while (i > 0 && s[i].isSpace())
i--;
while (i > 0 && (s[i].isLetterOrNumber() || s[i] == '_' ||
(completionDTD->minusAllowedInWord && s[i] == '-') ) )
i--;
- QString startStr = s.mid(i + 1).stripWhiteSpace();
+ TQString startStr = s.mid(i + 1).stripWhiteSpace();
s = s.left(i + 1);
if (s[i] == completionDTD->attributeSeparator)
{
@@ -1792,26 +1792,26 @@ bool Document::scriptAutoCompletion(int line, int column, const QString& inserte
if ( s[i] == completionDTD->attrAutoCompleteAfter ||
s[i] == completionDTD->attributeSeparator ) //if we need to list the arguments of a function
{
- QString textLine = s.left(i);
- QString word = findWordRev(textLine, completionDTD);
- QValueList<QTag *> tags;
+ TQString textLine = s.left(i);
+ TQString word = findWordRev(textLine, completionDTD);
+ TQValueList<QTag *> tags;
if (!word.isEmpty())
{
tags.append(userTagList.find(word.lower()));
- QDictIterator<QTag> it(*(completionDTD->tagsList));
+ TQDictIterator<QTag> it(*(completionDTD->tagsList));
for( ; it.current(); ++it )
{
if (it.currentKey() == word)
tags.append(it.current());
}
}
- QStringList argList;
- for (QValueList<QTag*>::ConstIterator it = tags.constBegin(); it != tags.constEnd(); ++it)
+ TQStringList argList;
+ for (TQValueList<QTag*>::ConstIterator it = tags.constBegin(); it != tags.constEnd(); ++it)
{
QTag *tag = *it;
if (!tag)
continue;
- QString arguments;
+ TQString arguments;
if (tag->type != "property")
{
for (int i =0; i < tag->attributeCount(); i++)
@@ -1873,7 +1873,7 @@ bool Document::scriptAutoCompletion(int line, int column, const QString& inserte
/** Retrives the text from the specified rectangle. The KTextEditor::EditInterface::text seems to not
work correctly. */
-QString Document::text(int bLine, int bCol, int eLine, int eCol) const
+TQString Document::text(int bLine, int bCol, int eLine, int eCol) const
{
if (bLine > eLine)
{
@@ -1884,7 +1884,7 @@ QString Document::text(int bLine, int bCol, int eLine, int eCol) const
bCol = eCol;
eCol = tmp;
}
- QString t = editIf->textLine(bLine);
+ TQString t = editIf->textLine(bLine);
if (bLine == eLine)
{
return t.mid(bCol, eCol-bCol +1);
@@ -1902,18 +1902,18 @@ QString Document::text(int bLine, int bCol, int eLine, int eCol) const
//TODO: profile which one is used more often and time critical places and use
//that one as the default and call from that one the other version
-QString Document::text(const AreaStruct &area) const
+TQString Document::text(const AreaStruct &area) const
{
return text(area.bLine, area.bCol, area.eLine, area.eCol);
}
-QString Document::find(const QRegExp& regExp, int sLine, int sCol, int& fbLine, int&fbCol, int &feLine, int&feCol)
+TQString Document::find(const TQRegExp& regExp, int sLine, int sCol, int& fbLine, int&fbCol, int &feLine, int&feCol)
{
- QRegExp rx = regExp;
- QString foundText = "";
+ TQRegExp rx = regExp;
+ TQString foundText = "";
int maxLine = editIf->numLines();
- QString textToSearch = text(sLine, sCol, sLine, editIf->lineLength(sLine));
+ TQString textToSearch = text(sLine, sCol, sLine, editIf->lineLength(sLine));
int pos;
int line = sLine;
do
@@ -1936,7 +1936,7 @@ QString Document::find(const QRegExp& regExp, int sLine, int sCol, int& fbLine,
if (pos != -1)
{
foundText = rx.cap();
- QString s = textToSearch.left(pos);
+ TQString s = textToSearch.left(pos);
int linesUntilFound = s.contains("\n");
fbLine = sLine + linesUntilFound;
fbCol = s.length()-s.findRev("\n")-1;
@@ -1965,13 +1965,13 @@ QString Document::find(const QRegExp& regExp, int sLine, int sCol, int& fbLine,
return foundText;
}
-QString Document::findRev(const QRegExp& regExp, int sLine, int sCol, int& fbLine, int&fbCol, int &feLine, int&feCol)
+TQString Document::findRev(const TQRegExp& regExp, int sLine, int sCol, int& fbLine, int&fbCol, int &feLine, int&feCol)
{
- QRegExp rx = regExp;
- QString foundText = "";
+ TQRegExp rx = regExp;
+ TQString foundText = "";
int pos = -1;
int line = sLine;
- QString textToSearch = text(sLine, 0, sLine, sCol);
+ TQString textToSearch = text(sLine, 0, sLine, sCol);
do
{
pos = rx.searchRev(textToSearch);
@@ -2003,7 +2003,7 @@ QString Document::findRev(const QRegExp& regExp, int sLine, int sCol, int& fbLin
if (fbCol < 0) fbCol = 0;
if (feCol < 0) feCol = 0;
/*
- QString s = text(fbLine, fbCol, feLine, feCol);
+ TQString s = text(fbLine, fbCol, feLine, feCol);
if (s != foundText) //debug, error
{
KMessageBox::error(this,"FindRev\nFound: "+foundText+"\nRead: "+s);
@@ -2046,7 +2046,7 @@ void Document::handleCodeCompletion()
/* if (!handled)
{
completionDTD = defaultDTD();
- QString s = text(line, 0, line, col).stripWhiteSpace();
+ TQString s = text(line, 0, line, col).stripWhiteSpace();
if (s.findRev("<") != -1)
{
//showCodeCompletions(getTagCompletions(line, col + 1));
@@ -2078,7 +2078,7 @@ void Document::codeCompletionHintRequested()
completionDTD = currentDTD();
if (completionDTD->family == Script)
{
-// QString textLine = editIf->textLine(line).left(col);
+// TQString textLine = editIf->textLine(line).left(col);
// int pos = textLine.findRev("(");
// int pos2 = textLine.findRev(")");
//if (pos > pos2 )
@@ -2088,13 +2088,13 @@ void Document::codeCompletionHintRequested()
completionRequested = false;
}
-QString Document::currentWord()
+TQString Document::currentWord()
{
uint line, col;
viewCursorIf->cursorPositionReal(&line, &col);
- QString textLine = editIf->textLine(line);
- int startPos = textLine.findRev(QRegExp("\\W"), col);
- int endPos = textLine.find(QRegExp("\\W"), col);
+ TQString textLine = editIf->textLine(line);
+ int startPos = textLine.findRev(TQRegExp("\\W"), col);
+ int endPos = textLine.find(TQRegExp("\\W"), col);
if (startPos == -1)
startPos = 0;
else
@@ -2105,16 +2105,16 @@ QString Document::currentWord()
}
/** Find the word until the first word boundary backwards */
-QString Document::findWordRev(const QString& textToSearch, const DTDStruct *dtd)
+TQString Document::findWordRev(const TQString& textToSearch, const DTDStruct *dtd)
{
- QString t = textToSearch;
+ TQString t = textToSearch;
while (t.endsWith(" "))
t = t.left(t.length()-1);
int startPos = -1;
int pos;
bool end = false;
do{
- pos = t.findRev(QRegExp("\\W"), startPos);
+ pos = t.findRev(TQRegExp("\\W"), startPos);
if (t[pos] == '_' ||
(dtd && dtd->minusAllowedInWord && t[pos] == '-'))
{
@@ -2139,9 +2139,9 @@ bool Document::xmlCodeCompletion(int line, int col)
Tag *tag = node->tag;
int bLine, bCol;
tag->beginPos(bLine, bCol);
- QString s;
+ TQString s;
int index;
- QString tagName = tag->name.section('|', 0, 0).stripWhiteSpace();
+ TQString tagName = tag->name.section('|', 0, 0).stripWhiteSpace();
int nameCol = bCol + tagName.length() + 1;
if (!tag->nameSpace.isEmpty())
nameCol += 1 + tag->nameSpace.length();
@@ -2189,7 +2189,7 @@ bool Document::xmlCodeCompletion(int line, int col)
}
if (!handled)
{
- QString s = editIf->textLine(line).left(col);
+ TQString s = editIf->textLine(line).left(col);
int pos = s.findRev('&');
if (pos != -1)
{
@@ -2214,7 +2214,7 @@ void Document::slotCompletionAborted()
/** Ask for user confirmation if the file was changed outside. */
void Document::checkDirtyStatus()
{
- QString fileName;
+ TQString fileName;
if (url().isLocalFile())
fileName = url().path();
if (m_dirty)
@@ -2222,7 +2222,7 @@ void Document::checkDirtyStatus()
createTempFile();
if (!fileName.isEmpty())
{
- QDateTime modifTime = QFileInfo(fileName).lastModified();
+ TQDateTime modifTime = TQFileInfo(fileName).lastModified();
if (modifTime == m_modifTime)
m_dirty = false;
}
@@ -2230,7 +2230,7 @@ void Document::checkDirtyStatus()
{
if (m_md5sum.isEmpty())
{
- QFile f(fileName);
+ TQFile f(fileName);
if (f.open(IO_ReadOnly))
{
const char* c = "";
@@ -2245,10 +2245,10 @@ void Document::checkDirtyStatus()
{
//check if the file is changed, also by file content. Might help to reduce
//unwanted warning on NFS
- QFile f(fileName);
+ TQFile f(fileName);
if (f.open(IO_ReadOnly))
{
- QString md5sum;
+ TQString md5sum;
const char* c = "";
KMD5 context(c);
context.reset();
@@ -2268,7 +2268,7 @@ void Document::checkDirtyStatus()
{
DirtyDlg *dlg = new DirtyDlg(url().path(), m_tempFileName, false, this);
DirtyDialog *w = static_cast<DirtyDialog*>(dlg->mainWidget());
- QString kompareStr = KStandardDirs::findExe("kompare");
+ TQString kompareStr = KStandardDirs::findExe("kompare");
if (kompareStr.isEmpty())
{
w->buttonCompare->setEnabled(false);
@@ -2279,7 +2279,7 @@ void Document::checkDirtyStatus()
m_doc->setModified(false);
openURL(url());
}
- m_modifTime = QFileInfo(fileName).lastModified();
+ m_modifTime = TQFileInfo(fileName).lastModified();
delete dlg;
}
closeTempFile();
@@ -2292,13 +2292,13 @@ void Document::save()
{
if (url().isLocalFile())
{
- QString fileName;
+ TQString fileName;
fileName = url().path();
fileWatcher->removeFile(fileName);
// kdDebug(24000) << "removeFile[save]: " << fileName << endl;
m_doc->save();
m_dirty = false;
- m_modifTime = QFileInfo(fileName).lastModified();
+ m_modifTime = TQFileInfo(fileName).lastModified();
fileWatcher->addFile(fileName);
// kdDebug(24000) << "addFile[save]: " << fileName << endl;
} else
@@ -2317,7 +2317,7 @@ bool Document::saveAs(const KURL& url)
m_md5sum = "";
if (url.isLocalFile())
{
- QFile f(url.path());
+ TQFile f(url.path());
if (f.open(IO_ReadOnly))
{
const char* c = "";
@@ -2332,7 +2332,7 @@ bool Document::saveAs(const KURL& url)
return result;
}
-void Document::enableGroupsForDTEP(const QString& dtepName, bool enable)
+void Document::enableGroupsForDTEP(const TQString& dtepName, bool enable)
{
if (m_groupsForDTEPs.isEmpty())
m_groupsForDTEPs = m_DTEPList;
@@ -2352,9 +2352,9 @@ void Document::resetGroupsForDTEPList()
}
/** Returns true if the number of " (excluding \") inside text is even. */
-bool Document::evenQuotes(const QString &text)
+bool Document::evenQuotes(const TQString &text)
{
- int num = text.contains(QRegExp("[^\\\\]\""));
+ int num = text.contains(TQRegExp("[^\\\\]\""));
return (num /2 *2 == num);
}
@@ -2367,7 +2367,7 @@ void Document::slotTextChanged()
{
kdDebug(24000) << "Delayed text changed called." << endl;
//delay the handling, otherwise we may get wrong values for (line,column)
- QTimer::singleShot(0, this, SLOT(slotDelayedTextChanged()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedTextChanged()));
delayedTextChangedEnabled = false;
}
}
@@ -2378,14 +2378,14 @@ void Document::slotDelayedTextChanged(bool forced)
{
kdDebug(24000) << "Reparsing delayed!" << endl;
parser->setParsingNeeded(true);
- QTimer::singleShot(1000, this, SLOT(slotDelayedTextChanged()));
+ TQTimer::singleShot(1000, this, TQT_SLOT(slotDelayedTextChanged()));
reparseEnabled = false;
delayedTextChangedEnabled = false;
return;
}
uint line, column;
- QString oldNodeName = "";
+ TQString oldNodeName = "";
Node *node;
Node *currentNode = 0L; //holds a copy of the node which is at (line,column)
Node *previousNode = 0L;//holds a copy of the node before currentNode
@@ -2441,7 +2441,7 @@ void Document::slotDelayedTextChanged(bool forced)
if (bl == bl2 && bc == bc2 &&
((node->tag->type == Tag::XmlTag && !node->tag->single) || currentNode->tag->type == Tag::XmlTagEnd))
{
- QString newName = node->tag->name;
+ TQString newName = node->tag->name;
bool updateClosing = (currentNode->tag->type == Tag::XmlTag) && !newName.startsWith("!");
int num = 1;
if (!node->tag->nameSpace.isEmpty())
@@ -2517,14 +2517,14 @@ void Document::slotDelayedTextChanged(bool forced)
}
/** Returns list of values for attribute */
-QStringList* Document::tagAttributeValues(const QString& dtdName, const QString& tag, const QString &attribute, bool &deleteResult)
+TQStringList* Document::tagAttributeValues(const TQString& dtdName, const TQString& tag, const TQString &attribute, bool &deleteResult)
{
- QStringList *values = 0L;
+ TQStringList *values = 0L;
deleteResult = true;
const DTDStruct* dtd = DTDs::ref()->find(dtdName);
if (dtd)
{
- QString searchForAttr = (dtd->caseSensitive) ? attribute : attribute.upper();
+ TQString searchForAttr = (dtd->caseSensitive) ? attribute : attribute.upper();
AttributeList* attrs = QuantaCommon::tagAttributes(dtdName, tag);
if (attrs)
{
@@ -2532,17 +2532,17 @@ QStringList* Document::tagAttributeValues(const QString& dtdName, const QString&
KURL u;
KURL base = url();
base.setPath(base.directory(false,false));
- QString s;
+ TQString s;
for ( attr = attrs->first(); attr; attr = attrs->next() )
{
- QString attrName = (dtd->caseSensitive) ? attr->name : attr->name.upper();
+ TQString attrName = (dtd->caseSensitive) ? attr->name : attr->name.upper();
if (attrName == searchForAttr)
{
if (attr->type == "url") {
Project *project = Project::ref();
if (project->hasProject())
{
- values = new QStringList(project->fileNameList());
+ values = new TQStringList(project->fileNameList());
for (uint i = 0; i < values->count(); i++)
{
u = (*values)[i];
@@ -2553,8 +2553,8 @@ QStringList* Document::tagAttributeValues(const QString& dtdName, const QString&
values->append("mailto:" + project->email());
} else
{
- QDir dir = QDir(url().directory());
- values = new QStringList(dir.entryList());
+ TQDir dir = TQDir(url().directory());
+ values = new TQStringList(dir.entryList());
}
break;
} else {
@@ -2590,11 +2590,11 @@ void Document::paste()
}
/** returns all the areas that are between tag and it's closing pair */
-QStringList Document::tagAreas(const QString& tag, bool includeCoordinates, bool skipFoundContent)
+TQStringList Document::tagAreas(const TQString& tag, bool includeCoordinates, bool skipFoundContent)
{
Node *node = baseNode;
int bl, bc, el, ec;
- QStringList result;
+ TQStringList result;
while (node)
{
@@ -2611,10 +2611,10 @@ QStringList Document::tagAreas(const QString& tag, bool includeCoordinates, bool
el = editIf->numLines()-1;
ec = editIf->lineLength(el);
}
- QString s = text(bl, bc, el, ec);
+ TQString s = text(bl, bc, el, ec);
if (includeCoordinates)
{
- s.prepend(QString("%1,%2,%3,%4\n").arg(bl).arg(bc).arg(el).arg(ec));
+ s.prepend(TQString("%1,%2,%3,%4\n").arg(bl).arg(bc).arg(el).arg(ec));
}
result += s;
if (skipFoundContent)
@@ -2647,7 +2647,7 @@ void Document::clearErrorMarks()
{
if (!markIf)
return;
- QPtrList<KTextEditor::Mark> marks = markIf->marks();
+ TQPtrList<KTextEditor::Mark> marks = markIf->marks();
KTextEditor::Mark* mark;
for (mark = marks.first(); mark; mark = marks.next())
{
@@ -2656,12 +2656,12 @@ void Document::clearErrorMarks()
}
}
-QString Document::backupPathEntryValue()
+TQString Document::backupPathEntryValue()
{
return m_backupPathValue;
}
-void Document::setBackupPathEntryValue(const QString& ev)
+void Document::setBackupPathEntryValue(const TQString& ev)
{
m_backupPathValue = ev;
}
@@ -2678,10 +2678,10 @@ void Document::createBackup(KConfig* config)
{
m_backupPathValue = qConfig.backupDirPath + url().fileName() + "." + hashFilePath(url().url());
}
- QString backupPathValueURL = KURL::fromPathOrURL(m_backupPathValue).url();
+ TQString backupPathValueURL = KURL::fromPathOrURL(m_backupPathValue).url();
//the encoding used for the current document
- QString encoding = quantaApp->defaultEncoding();
+ TQString encoding = quantaApp->defaultEncoding();
if (encodingIf)
encoding = encodingIf->encoding();
if (encoding.isEmpty())
@@ -2689,8 +2689,8 @@ void Document::createBackup(KConfig* config)
//creates an entry string in quantarc if it does not exist yet
config->setGroup("General Options");
- QStringList backedupFilesEntryList = QuantaCommon::readPathListEntry(config, "List of backedup files"); //the files that were backedup
- QStringList autosavedFilesEntryList = QuantaCommon::readPathListEntry(config, "List of autosaved files"); //the list of actual backup files inside $KDEHOME/share/apps/quanta/backups
+ TQStringList backedupFilesEntryList = QuantaCommon::readPathListEntry(config, "List of backedup files"); //the files that were backedup
+ TQStringList autosavedFilesEntryList = QuantaCommon::readPathListEntry(config, "List of autosaved files"); //the list of actual backup files inside $KDEHOME/share/apps/quanta/backups
if (!autosavedFilesEntryList.contains(backupPathValueURL)) //not yet backed up, add an entry for this file
{
autosavedFilesEntryList.append(backupPathValueURL);
@@ -2704,11 +2704,11 @@ void Document::createBackup(KConfig* config)
}
//creates a copy of this specific document
- QFile file(m_backupPathValue);
+ TQFile file(m_backupPathValue);
if (file.open(IO_WriteOnly))
{
- QTextStream stream(&file);
- stream.setCodec(QTextCodec::codecForName(encoding));
+ TQTextStream stream(&file);
+ stream.setCodec(TQTextCodec::codecForName(encoding));
stream << editIf->text();
file.close();
}
@@ -2717,13 +2717,13 @@ void Document::createBackup(KConfig* config)
/** if there is no more need for a backup copy then remove it */
void Document::removeBackup(KConfig *config)
{
- QString backupPathValueURL = KURL::fromPathOrURL(m_backupPathValue).url();
+ TQString backupPathValueURL = KURL::fromPathOrURL(m_backupPathValue).url();
config->reparseConfiguration();
config->setGroup("General Options");
- QStringList backedupFilesEntryList = QuantaCommon::readPathListEntry(config, "List of backedup files");
- QStringList autosavedFilesEntryList = QuantaCommon::readPathListEntry(config, "List of autosaved files");
+ TQStringList backedupFilesEntryList = QuantaCommon::readPathListEntry(config, "List of backedup files");
+ TQStringList autosavedFilesEntryList = QuantaCommon::readPathListEntry(config, "List of autosaved files");
autosavedFilesEntryList.remove(backupPathValueURL);
config->writePathEntry("List of autosaved files", autosavedFilesEntryList);
@@ -2731,22 +2731,22 @@ void Document::removeBackup(KConfig *config)
config->writePathEntry("List of backedup files", backedupFilesEntryList);
config->sync();
- if(QFile::exists(m_backupPathValue))
- QFile::remove(m_backupPathValue);
+ if(TQFile::exists(m_backupPathValue))
+ TQFile::remove(m_backupPathValue);
}
/** creates a string by hashing a bit the path string of this document */
-QString Document::hashFilePath(const QString& p)
+TQString Document::hashFilePath(const TQString& p)
{
switch(p.length())
{
case 1: {
int c = int(p[0]);
- return QString::number(c, 10) + "P" + qConfig.quantaPID;
+ return TQString::number(c, 10) + "P" + qConfig.quantaPID;
}
case 2: {
int c = int(p[1]) * 2;
- return QString::number(c, 10) + "P" + qConfig.quantaPID;
+ return TQString::number(c, 10) + "P" + qConfig.quantaPID;
}
default: {
@@ -2759,9 +2759,9 @@ QString Document::hashFilePath(const QString& p)
sign *= -1;
}
if( sum >= 0 )
- return QString::number(sum, 10) + "P" + qConfig.quantaPID;
+ return TQString::number(sum, 10) + "P" + qConfig.quantaPID;
else
- return QString::number(sum*(-1), 10) + "N" + qConfig.quantaPID;
+ return TQString::number(sum*(-1), 10) + "N" + qConfig.quantaPID;
}
}
}
@@ -2793,7 +2793,7 @@ void Document::convertCase()
progressDlg.setLabel(i18n("Changing tag and attribute case. This may take some time, depending on the document complexity."));
progressDlg.setAllowCancel(false);
progressDlg.show();
- kapp->eventLoop()->processEvents( QEventLoop::ExcludeUserInput | QEventLoop::ExcludeSocketNotifiers);
+ kapp->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput | TQEventLoop::ExcludeSocketNotifiers);
KProgress *pBar = progressDlg.progressBar();
pBar->setValue(0);
pBar->setTotalSteps(nodeNum);
@@ -2826,7 +2826,7 @@ void Document::convertCase()
ec = bc + node->tag->name.length();
editIf->removeText(bl, bc, bl, ec);
viewCursorIf->setCursorPositionReal(bl, bc);
- QString newName = node->tag->name;
+ TQString newName = node->tag->name;
if (tagCase == 1)
newName = newName.lower();
else if (tagCase == 2)
@@ -2837,7 +2837,7 @@ void Document::convertCase()
}
if (attrCase != 0)
{
- QString newName;
+ TQString newName;
for (int i = 0; i < node->tag->attrCount(); i++)
{
if(editIfExt)
@@ -2864,18 +2864,18 @@ void Document::convertCase()
}
}
-void Document::open(const KURL &url, const QString &encoding)
+void Document::open(const KURL &url, const TQString &encoding)
{
if (encodingIf)
{
encodingIf->setEncoding(encoding);
m_encoding = encoding;
- m_codec = QTextCodec::codecForName(m_encoding);
+ m_codec = TQTextCodec::codecForName(m_encoding);
}
- connect(m_doc, SIGNAL(completed()), this, SLOT(slotOpeningCompleted()));
- connect(m_doc, SIGNAL(canceled(const QString&)), this, SLOT(slotOpeningFailed(const QString&)));
+ connect(m_doc, TQT_SIGNAL(completed()), this, TQT_SLOT(slotOpeningCompleted()));
+ connect(m_doc, TQT_SIGNAL(canceled(const TQString&)), this, TQT_SLOT(slotOpeningFailed(const TQString&)));
if (!openURL(url))
- slotOpeningFailed(QString::null);
+ slotOpeningFailed(TQString::null);
if (!url.isLocalFile())
{
QExtFileInfo internalFileInfo;
@@ -2888,38 +2888,38 @@ void Document::slotOpeningCompleted()
KURL u = url();
if (!u.isLocalFile())
{
- m_modifTime = QDateTime();
+ m_modifTime = TQDateTime();
qApp->exit_loop();
}
else
{
fileWatcher->addFile(u.path());
- m_modifTime = QFileInfo(u.path()).lastModified();
+ m_modifTime = TQFileInfo(u.path()).lastModified();
// kdDebug(24000) << "addFile[Document::open]: " << u.path() << endl;
}
- disconnect(m_doc, SIGNAL(completed()), this, SLOT(slotOpeningCompleted()));
- disconnect(m_doc, SIGNAL(canceled(const QString&)), this, SLOT(slotOpeningFailed(const QString&)));
+ disconnect(m_doc, TQT_SIGNAL(completed()), this, TQT_SLOT(slotOpeningCompleted()));
+ disconnect(m_doc, TQT_SIGNAL(canceled(const TQString&)), this, TQT_SLOT(slotOpeningFailed(const TQString&)));
m_dirty = false;
m_view->setFocus();
processDTD();
emit openingCompleted(u);
}
-void Document::slotOpeningFailed(const QString &errorMessage)
+void Document::slotOpeningFailed(const TQString &errorMessage)
{
m_md5sum = "";
Q_UNUSED(errorMessage); //TODO: append the error message to our own error message
if (!url().isLocalFile())
qApp->exit_loop();
- disconnect(m_doc, SIGNAL(completed()), this, SLOT(slotOpeningCompleted()));
- disconnect(m_doc, SIGNAL(canceled(const QString&)), this, SLOT(slotOpeningFailed(const QString&)));
+ disconnect(m_doc, TQT_SIGNAL(completed()), this, TQT_SLOT(slotOpeningCompleted()));
+ disconnect(m_doc, TQT_SIGNAL(canceled(const TQString&)), this, TQT_SLOT(slotOpeningFailed(const TQString&)));
emit openingFailed(url());
}
-void Document::processDTD(const QString& documentType)
+void Document::processDTD(const TQString& documentType)
{
- QString foundName;
- QString projectDTD = Project::ref()->defaultDTD();
+ TQString foundName;
+ TQString projectDTD = Project::ref()->defaultDTD();
setDTDIdentifier(projectDTD);
Tag *tag = 0L;
if (documentType.isEmpty())
@@ -2931,8 +2931,8 @@ void Document::processDTD(const QString& documentType)
KDialogBase dlg(this, 0L, true, i18n("DTD Selector"), KDialogBase::Ok | KDialogBase::Cancel);
DTDSelectDialog *dtdWidget = new DTDSelectDialog(&dlg);
dlg.setMainWidget(dtdWidget);
- QStringList lst = DTDs::ref()->nickNameList(true);
- QString foundNickName = DTDs::ref()->getDTDNickNameFromName(foundName);
+ TQStringList lst = DTDs::ref()->nickNameList(true);
+ TQString foundNickName = DTDs::ref()->getDTDNickNameFromName(foundName);
for (uint i = 0; i < lst.count(); i++)
{
dtdWidget->dtdCombo->insertItem(lst[i]);
@@ -2946,14 +2946,14 @@ void Document::processDTD(const QString& documentType)
if (!DTDs::ref()->find(foundName))
{
//try to find the closest matching DTD
- QString s = foundName.lower();
+ TQString s = foundName.lower();
uint spaceNum = s.contains(' ');
- QStringList dtdList = DTDs::ref()->nameList();
- QStringList lastDtdList;
+ TQStringList dtdList = DTDs::ref()->nameList();
+ TQStringList lastDtdList;
for (uint i = 0; i <= spaceNum && !dtdList.empty(); i++)
{
lastDtdList = dtdList;
- QStringList::Iterator strIt = dtdList.begin();
+ TQStringList::Iterator strIt = dtdList.begin();
while (strIt != dtdList.end())
{
if (!(*strIt).startsWith(s.section(' ', 0, i)))
@@ -2969,7 +2969,7 @@ void Document::processDTD(const QString& documentType)
for (uint i = 0; i <= spaceNum && !dtdList.empty(); i++)
{
lastDtdList = dtdList;
- QStringList::Iterator strIt = dtdList.begin();
+ TQStringList::Iterator strIt = dtdList.begin();
while (strIt != dtdList.end())
{
if (!(*strIt).endsWith(s.section(' ', -(i+1), -1)))
@@ -2990,7 +2990,7 @@ void Document::processDTD(const QString& documentType)
// dlg->dtdCombo->insertItem(i18n("Create New DTD Info"));
dtdWidget->messageLabel->setText(i18n("This DTD is not known for Quanta. Choose a DTD or create a new one."));
dtdWidget->currentDTD->setText(DTDs::ref()->getDTDNickNameFromName(foundName));
- QString projectDTDNickName = DTDs::ref()->getDTDNickNameFromName(projectDTD);
+ TQString projectDTDNickName = DTDs::ref()->getDTDNickNameFromName(projectDTD);
for (int i = 0; i < dtdWidget->dtdCombo->count(); i++)
{
if (dtdWidget->dtdCombo->text(i) == projectDTDNickName)
@@ -3021,7 +3021,7 @@ void Document::processDTD(const QString& documentType)
} else //DOCTYPE not found in file
{
KURL u = url();
- QString dtdId = DTDs::ref()->DTDforURL(u)->name;
+ TQString dtdId = DTDs::ref()->DTDforURL(u)->name;
// if (dtdId == "empty")
{
const DTDStruct * dtd = DTDs::ref()->find(projectDTD);
@@ -3052,7 +3052,7 @@ void Document::processDTD(const QString& documentType)
/** Called when a file on the disk has changed. */
-void Document::slotFileDirty(const QString& fileName)
+void Document::slotFileDirty(const TQString& fileName)
{
if ( url().path() == fileName && !dirty() )
{
@@ -3081,7 +3081,7 @@ void Document::resetDTEPs()
m_DTEPList.append(defaultDTD()->name);
}
-void Document::addDTEP(const QString &dtepName)
+void Document::addDTEP(const TQString &dtepName)
{
if (m_DTEPList.contains(dtepName) == 0)
{
@@ -3089,7 +3089,7 @@ void Document::addDTEP(const QString &dtepName)
}
}
-QStringList Document::groupsForDTEPs()
+TQStringList Document::groupsForDTEPs()
{
if (m_groupsForDTEPs.isEmpty())
return m_DTEPList;
@@ -3097,16 +3097,16 @@ QStringList Document::groupsForDTEPs()
return m_groupsForDTEPs;
}
-QString Document::annotationText(uint line)
+TQString Document::annotationText(uint line)
{
- QMap<uint, QPair<QString, QString> >::Iterator it = m_annotations.find(line);
+ TQMap<uint, QPair<TQString, TQString> >::Iterator it = m_annotations.find(line);
if (it != m_annotations.end())
return it.data().first;
else
- return QString::null;
+ return TQString::null;
}
-void Document::setAnnotationText(uint line, const QString& text)
+void Document::setAnnotationText(uint line, const TQString& text)
{
if (text.isEmpty())
{
@@ -3115,16 +3115,16 @@ void Document::setAnnotationText(uint line, const QString& text)
markIf->removeMark(line, KTextEditor::MarkInterface::markType08);
} else
{
- m_annotations.insert(line, qMakePair(text, QString("")));
+ m_annotations.insert(line, qMakePair(text, TQString("")));
if (markIf)
markIf->setMark(line, KTextEditor::MarkInterface::markType08);
uint line, column;
viewCursorIf->cursorPositionReal(&line, &column);
viewCursorIf->setCursorPositionReal(line, 0);
const DTDStruct *dtd = currentDTD(true);
- QString commentBegin = "";
- QString commentEnd = "";
- for (QMap<QString, QString>::ConstIterator it = dtd->comments.constBegin(); it != dtd->comments.constEnd(); ++it)
+ TQString commentBegin = "";
+ TQString commentEnd = "";
+ for (TQMap<TQString, TQString>::ConstIterator it = dtd->comments.constBegin(); it != dtd->comments.constEnd(); ++it)
{
commentBegin = it.key();
commentEnd = it.data();
@@ -3143,15 +3143,15 @@ void Document::setAnnotationText(uint line, const QString& text)
commentEnd = "*/";
}
}
- QString s = "@annotation: " + text;
+ TQString s = "@annotation: " + text;
s.prepend(commentBegin + " ");
s.append(" " + commentEnd + "\n");
insertText(s, true, true);
- emit showAnnotation(line, "", qMakePair(text, QString("")));
+ emit showAnnotation(line, "", qMakePair(text, TQString("")));
}
}
-void Document::addAnnotation(uint line, const QPair<QString, QString>& annotation)
+void Document::addAnnotation(uint line, const QPair<TQString, TQString>& annotation)
{
m_annotations.insert(line, annotation);
if (markIf)
@@ -3163,7 +3163,7 @@ void Document::clearAnnotations()
{
if (markIf)
{
- QPtrList<KTextEditor::Mark> m = markIf->marks();
+ TQPtrList<KTextEditor::Mark> m = markIf->marks();
for (uint i=0; i < m.count(); i++)
markIf->removeMark( m.at(i)->line, KTextEditor::MarkInterface::markType08 );
}
@@ -3175,7 +3175,7 @@ bool Document::openURL(const KURL& url)
m_md5sum = "";
if (url.isLocalFile())
{
- QFile f(url.path());
+ TQFile f(url.path());
if (f.open(IO_ReadOnly))
{
const char* c = "";
diff --git a/quanta/src/document.h b/quanta/src/document.h
index 7b6ef151..ac5e3f84 100644
--- a/quanta/src/document.h
+++ b/quanta/src/document.h
@@ -19,10 +19,10 @@
#define DOCUMENT_H
//qt includes
-#include <qdatetime.h>
-#include <qdict.h>
-#include <qmap.h>
-#include <qwidget.h>
+#include <tqdatetime.h>
+#include <tqdict.h>
+#include <tqmap.h>
+#include <tqwidget.h>
#include <kurl.h>
#include <ktexteditor/markinterfaceextension.h>
@@ -71,39 +71,39 @@ class Document : public QWidget{
public:
Document(KTextEditor::Document *doc,
- QWidget *parent = 0, const char *name = 0, WFlags f=0);
+ TQWidget *parent = 0, const char *name = 0, WFlags f=0);
~Document();
KURL url();
bool isUntitled();
- void setUntitledUrl(const QString &url);
+ void setUntitledUrl(const TQString &url);
/** Returns tag name at specified position */
- QString getTagNameAt(int line, int col );
+ TQString getTagNameAt(int line, int col );
void selectText(int x1, int y1, int x2, int y2 );
- void replaceSelected(const QString &s);
+ void replaceSelected(const TQString &s);
/** insert tag in document */
- void insertTag(const QString &s1, const QString &s2 = QString::null);
+ void insertTag(const TQString &s1, const TQString &s2 = TQString::null);
/** Change the current tag's attributes with those from dict */
- void changeTag(Tag *tag, QDict<QString> *dict );
+ void changeTag(Tag *tag, TQDict<TQString> *dict );
/**Change the attr value of the called attrName to attrValue*/
- void changeTagAttribute(Tag *tag, const QString& attrName, const QString&attrValue);
+ void changeTagAttribute(Tag *tag, const TQString& attrName, const TQString&attrValue);
/**Change the namespace in a tag. Add if it's not present, or remove if the
namespace argument is empty*/
- void changeTagNamespace(Tag *tag, const QString& nameSpace);
+ void changeTagNamespace(Tag *tag, const TQString& nameSpace);
/** Insert the content of the url into the document. */
void insertFile(const KURL& url);
/** Inserts text at the current cursor position */
- void insertText(const QString &text, bool adjustCursor = true, bool reparse = true);
+ void insertText(const TQString &text, bool adjustCursor = true, bool reparse = true);
/** Recursively insert the mandatory childs of tag. Returns true if a child was
inserted.*/
bool insertChildTags(QTag *tag, QTag* lastTag = 0L);
- QPoint getGlobalCursorPos();
- QString find(const QRegExp& rx, int sLine, int sCol, int& fbLine, int&fbCol, int &feLine, int&feCol);
- QString findRev(const QRegExp& rx, int sLine, int sCol, int& fbLine, int&fbCol, int &feLine, int&feCol);
+ TQPoint getGlobalCursorPos();
+ TQString find(const TQRegExp& rx, int sLine, int sCol, int& fbLine, int&fbCol, int &feLine, int&feCol);
+ TQString findRev(const TQRegExp& rx, int sLine, int sCol, int& fbLine, int&fbCol, int &feLine, int&feCol);
/** Get the view of the document */
KTextEditor::View* view();
/** Get the KTextEditor::Document of the document */
@@ -118,24 +118,24 @@ public:
void createTempFile();
/** Closes and removes the temporary file. */
void closeTempFile();
- /** Returns the name of the temporary file, QString::null if no temporary file exists. */
- QString tempFileName();
+ /** Returns the name of the temporary file, TQString::null if no temporary file exists. */
+ TQString tempFileName();
/** Returns the DTD identifier for the document */
- QString getDTDIdentifier();
+ TQString getDTDIdentifier();
/** Sets the DTD identifier */
- void setDTDIdentifier(const QString &id);
+ void setDTDIdentifier(const TQString &id);
/** Get a pointer to the current active DTD. If fallback is true, this always gives back a valid and known DTD pointer: the active, the document specified and in last case the application default document type. */
const DTDStruct* currentDTD(bool fallback = true);
/** Get a pointer to the default DTD (document, or app). */
const DTDStruct* defaultDTD() const;
/** Find the DTD name for a part of the document. */
- QString findDTDName(Tag **tag);
+ TQString findDTDName(Tag **tag);
/** Retrives the text from the specified rectangle. The KTextEditor::EditInterface::text seems to not
work correctly. */
- QString text(int bLine, int bCol, int eLine, int eCol) const;
+ TQString text(int bLine, int bCol, int eLine, int eCol) const;
/** Same as the above, but using AreaStruct as an argument */
- QString text(const AreaStruct &area) const;
+ TQString text(const AreaStruct &area) const;
/** Code completion was requested by the user. */
void codeCompletionRequested();
/** Bring up the code completion tooltip. */
@@ -150,11 +150,11 @@ work correctly. */
/** Save the document under a new name and calculate the new md5sum. */
bool saveAs(const KURL& url);
/** Enable or disable the visibility of groups for a DTEP.*/
- void enableGroupsForDTEP(const QString& dtepName, bool enable = true);
+ void enableGroupsForDTEP(const TQString& dtepName, bool enable = true);
/** Clears the selected DTEP list */
void resetGroupsForDTEPList();
/** Find the word until the first word boundary backwards */
- QString findWordRev(const QString& textToSearch, const DTDStruct *dtd = 0L);
+ TQString findWordRev(const TQString& textToSearch, const DTDStruct *dtd = 0L);
/** Returns the changed status since the last query. Resets changed.*/
bool hasChanged();
/** Sets the changed status.*/
@@ -167,7 +167,7 @@ work correctly. */
bool parserActivated() {return reparseEnabled;}
/** returns all the areas that are between tag and it's closing pair */
- QStringList tagAreas(const QString &tag, bool includeCoordinates, bool skipFoundContent);
+ TQStringList tagAreas(const TQString &tag, bool includeCoordinates, bool skipFoundContent);
/** disable/enable the repaint of the Kate view */
void activateRepaintView(bool activation);
@@ -178,25 +178,25 @@ work correctly. */
void convertCase();
/** returns the word under the cursor */
- QString currentWord();
+ TQString currentWord();
/** Opens the url. The url must be valid and the file pointed to it must exists. */
- void open(const KURL &url, const QString &encoding);
+ void open(const KURL &url, const TQString &encoding);
/**
* Opens a file in the editor part.
* @param url
*/
bool openURL(const KURL& url);
/** Reads the DTD info from the file, tries to find the correct DTD and builds the tag/attribute list from the DTD file. */
- void processDTD(const QString& documentType = QString::null);
+ void processDTD(const TQString& documentType = TQString::null);
/** Resets the list of DTEPs found in the document */
void resetDTEPs();
/** Adds a DTEP to the list of DTEPs present in the document */
- void addDTEP(const QString &dtepName);
+ void addDTEP(const TQString &dtepName);
/** Returns the list of DTEPs that should appear in the structure tree. By default
this is the list of DTEPs present in the document, but the user can turn on/
off them with the help of RMB->Show Groups For in the structure tree */
- QStringList groupsForDTEPs();
+ TQStringList groupsForDTEPs();
bool busy;
@@ -219,17 +219,17 @@ work correctly. */
/** Creates an automatic backup copy for the crash recovering mechanism */
void createBackup(KConfig* config);
/** No descriptions */
- QString backupPathEntryValue();
+ TQString backupPathEntryValue();
/** No descriptions */
- void setBackupPathEntryValue(const QString& ev);
+ void setBackupPathEntryValue(const TQString& ev);
/** Removes automatic backup copies */
void removeBackup(KConfig *config);
/** create a string using document path string */
- static QString hashFilePath(const QString& p);
- QString annotationText(uint line);
- void setAnnotationText(uint line, const QString& text);
- QMap<uint, QPair<QString, QString> > annotations() {return m_annotations;}
- void addAnnotation(uint line, const QPair<QString, QString>& annotation);
+ static TQString hashFilePath(const TQString& p);
+ TQString annotationText(uint line);
+ void setAnnotationText(uint line, const TQString& text);
+ TQMap<uint, QPair<TQString, TQString> > annotations() {return m_annotations;}
+ void addAnnotation(uint line, const QPair<TQString, TQString>& annotation);
void clearAnnotations();
public slots:
@@ -237,9 +237,9 @@ public slots:
/** Called after a completion is inserted */
void slotCompletionDone( KTextEditor::CompletionEntry completion );
/** Called when a user selects a completion, we then can modify it */
- void slotFilterCompletion(KTextEditor::CompletionEntry*,QString *);
+ void slotFilterCompletion(KTextEditor::CompletionEntry*,TQString *);
/** Called whenever a user inputs text */
- void slotCharactersInserted(int ,int ,const QString&);
+ void slotCharactersInserted(int ,int ,const TQString&);
/** Called when the code completion is aborted.*/
void slotCompletionAborted();
/** Called whenever the text in the document is changed. */
@@ -259,44 +259,44 @@ signals:
void breakpointMarked(Document*, int);
void breakpointUnmarked(Document*, int);
- void showAnnotation(uint, const QString&, const QPair<QString, QString>&);
+ void showAnnotation(uint, const TQString&, const QPair<TQString, TQString>&);
private slots:
void slotReplaceChar();
void slotOpeningCompleted();
- void slotOpeningFailed(const QString &errorMessage);
+ void slotOpeningFailed(const TQString &errorMessage);
/** Called when a file on the disk has changed. */
- void slotFileDirty(const QString& fileName);
+ void slotFileDirty(const TQString& fileName);
void slotMarkChanged(KTextEditor::Mark mark, KTextEditor::MarkInterfaceExtension::MarkChangeAction action);
private:
/**
* Finds the beginning of a tag in the document, starting from a position.
* @param position start to look from this position backwards
- * @return the position of the starting character or an empty QPoint if not found
+ * @return the position of the starting character or an empty TQPoint if not found
*/
- QPoint findTagBeginning(const QPoint& position);
- QPoint findTagEnd(const QPoint& position);
+ TQPoint findTagBeginning(const TQPoint& position);
+ TQPoint findTagEnd(const TQPoint& position);
- QMap<uint, QPair<QString, QString> > m_annotations;
- QString untitledUrl;
+ TQMap<uint, QPair<TQString, TQString> > m_annotations;
+ TQString untitledUrl;
int m_replaceLine;
int m_replaceCol;
- QString m_replaceStr;
+ TQString m_replaceStr;
KTextEditor::Document *m_doc;
KTextEditor::View *m_view;
KTempFile *tempFile;
- QString m_tempFileName;
- QDateTime m_modifTime;
+ TQString m_tempFileName;
+ TQDateTime m_modifTime;
/* path of the backup copy file of the document */
- QString m_backupPathValue;
- QString dtdName;
- QString m_encoding;
- QTextCodec *m_codec;
+ TQString m_backupPathValue;
+ TQString dtdName;
+ TQString m_encoding;
+ TQTextCodec *m_codec;
/*The DTD valid in the place where the completion was invoked.*/
const DTDStruct *completionDTD;
@@ -310,42 +310,42 @@ private:
bool delayedTextChangedEnabled;
/** True if the document is dirty (has been modified outside). */
bool m_dirty;
- QString m_md5sum;
+ TQString m_md5sum;
Project *m_project;
/** Parse the document according to this DTD. */
- QStringList m_groupsForDTEPs; ///< The list of the DTEPs for which the groups should appear in the structure tree
- QStringList m_DTEPList; ///< The list of all DTEPs found in the document
+ TQStringList m_groupsForDTEPs; ///< The list of the DTEPs for which the groups should appear in the structure tree
+ TQStringList m_DTEPList; ///< The list of all DTEPs found in the document
//stores the data after an autocompletion. Used when bringing up the
//autocompletion box delayed with the singleshot timer (workaround for
//a bug: the box is not showing up if it is called from slotCompletionDone)
int m_lastLine, m_lastCol;
- QValueList<KTextEditor::CompletionEntry>* m_lastCompletionList;
+ TQValueList<KTextEditor::CompletionEntry>* m_lastCompletionList;
/** Get list of possibile variable name completions */
- QValueList<KTextEditor::CompletionEntry>* getGroupCompletions(Node *node, const StructTreeGroup& groupName, int line, int col);
+ TQValueList<KTextEditor::CompletionEntry>* getGroupCompletions(Node *node, const StructTreeGroup& groupName, int line, int col);
/** Get list of possibile tag name completions */
- QValueList<KTextEditor::CompletionEntry>* getTagCompletions(int line, int col);
+ TQValueList<KTextEditor::CompletionEntry>* getTagCompletions(int line, int col);
/** Get list of possibile tag attribute completions */
- QValueList<KTextEditor::CompletionEntry>* getAttributeCompletions(const QString& tagName,const QString& startsWith=QString::null);
+ TQValueList<KTextEditor::CompletionEntry>* getAttributeCompletions(const TQString& tagName,const TQString& startsWith=TQString::null);
/** Get list of possibile tag attribute value completions */
- QValueList<KTextEditor::CompletionEntry>* getAttributeValueCompletions(const QString& tagName, const QString& attribute, const QString& startsWith=QString::null);
+ TQValueList<KTextEditor::CompletionEntry>* getAttributeValueCompletions(const TQString& tagName, const TQString& attribute, const TQString& startsWith=TQString::null);
/** Get list of possibile completions in normal text input (nt creating a tag) */
- QValueList<KTextEditor::CompletionEntry>* getCharacterCompletions(const QString& starstWith=QString::null);
+ TQValueList<KTextEditor::CompletionEntry>* getCharacterCompletions(const TQString& starstWith=TQString::null);
/** Invoke code completion dialog for XML like tags according to the position (line, col), using DTD dtd. */
bool xmlCodeCompletion(int line, int col);
/** Returns list of values for attribute. If deleteResult is true after the call,
the caller must delete the returned list. */
- QStringList* tagAttributeValues(const QString& dtdName, const QString& tag, const QString& attribute, bool &deleteResult);
+ TQStringList* tagAttributeValues(const TQString& dtdName, const TQString& tag, const TQString& attribute, bool &deleteResult);
/** Brings up list of code completions */
- void showCodeCompletions( QValueList<KTextEditor::CompletionEntry> *completions );
+ void showCodeCompletions( TQValueList<KTextEditor::CompletionEntry> *completions );
/** Called whenever a user inputs text in an XML type document. */
- bool xmlAutoCompletion(int , int , const QString & );
+ bool xmlAutoCompletion(int , int , const TQString & );
/** Called whenever a user inputs text in a script type document. */
- bool scriptAutoCompletion(int line, int col, const QString &insertedString);
+ bool scriptAutoCompletion(int line, int col, const TQString &insertedString);
/** Returns true if the number of " (excluding \") inside text is even. */
- bool evenQuotes(const QString &text);
+ bool evenQuotes(const TQString &text);
void handleCodeCompletion();
- bool isDerivatedFrom(const QString& className, const QString &baseClass);
+ bool isDerivatedFrom(const TQString& className, const TQString &baseClass);
};
#endif
diff --git a/quanta/src/dtds.cpp b/quanta/src/dtds.cpp
index 44fba0ab..9943904a 100644
--- a/quanta/src/dtds.cpp
+++ b/quanta/src/dtds.cpp
@@ -19,11 +19,11 @@
***************************************************************************/
//qt includes
-#include <qfile.h>
+#include <tqfile.h>
#include <qextfileinfo.h>
-#include <qdom.h>
-#include <qcursor.h>
-#include <qtimer.h>
+#include <tqdom.h>
+#include <tqcursor.h>
+#include <tqtimer.h>
// include files for KDE
#include <kapplication.h>
@@ -50,36 +50,36 @@
#include "dtds.h"
/** filename for the desciption of the dtd */
-const QString m_rcFilename("description.rc");
+const TQString m_rcFilename("description.rc");
/**
This constructor reads the dictionary of known dtd's, the attributes and tags will be loaded
on the first access to one dtd.
*/
-DTDs::DTDs(QObject *parent)
- :QObject(parent)
+DTDs::DTDs(TQObject *parent)
+ :TQObject(parent)
{
- connect(this, SIGNAL(hideSplash()), parent, SLOT(slotHideSplash()));
- connect(this, SIGNAL(enableIdleTimer(bool)), parent, SLOT(slotEnableIdleTimer(bool)));
- connect(this, SIGNAL(loadToolbarForDTD(const QString&)), parent, SLOT(slotLoadToolbarForDTD(const QString&)));
+ connect(this, TQT_SIGNAL(hideSplash()), parent, TQT_SLOT(slotHideSplash()));
+ connect(this, TQT_SIGNAL(enableIdleTimer(bool)), parent, TQT_SLOT(slotEnableIdleTimer(bool)));
+ connect(this, TQT_SIGNAL(loadToolbarForDTD(const TQString&)), parent, TQT_SLOT(slotLoadToolbarForDTD(const TQString&)));
// kdDebug(24000) << "dtds::dtds" << endl;
- m_dict = new QDict<DTDStruct>(119, false); //optimized for max 119 DTD. This should be enough.
+ m_dict = new TQDict<DTDStruct>(119, false); //optimized for max 119 DTD. This should be enough.
m_dict->setAutoDelete(true);
- m_doc = new QDomDocument();
+ m_doc = new TQDomDocument();
- QString localKDEdir = KGlobal::instance()->dirs()->localkdedir();
- QStringList tagsResourceDirs = KGlobal::instance()->dirs()->findDirs("appdata", "dtep");
- QStringList tagsDirs;
- QStringList::ConstIterator end = tagsResourceDirs.constEnd();
- for ( QStringList::ConstIterator it = tagsResourceDirs.constBegin(); it != end; ++it )
+ TQString localKDEdir = KGlobal::instance()->dirs()->localkdedir();
+ TQStringList tagsResourceDirs = KGlobal::instance()->dirs()->findDirs("appdata", "dtep");
+ TQStringList tagsDirs;
+ TQStringList::ConstIterator end = tagsResourceDirs.constEnd();
+ for ( TQStringList::ConstIterator it = tagsResourceDirs.constBegin(); it != end; ++it )
{
if ((*it).startsWith(localKDEdir))
{
- QDir dir(*it);
- dir.setFilter(QDir::Dirs);
- QStringList subDirs = dir.entryList();
- QStringList::ConstIterator subitEnd = subDirs.constEnd();
- for ( QStringList::ConstIterator subit = subDirs.constBegin(); subit != subitEnd; ++subit )
+ TQDir dir(*it);
+ dir.setFilter(TQDir::Dirs);
+ TQStringList subDirs = dir.entryList();
+ TQStringList::ConstIterator subitEnd = subDirs.constEnd();
+ for ( TQStringList::ConstIterator subit = subDirs.constBegin(); subit != subitEnd; ++subit )
{
// kdDebug(24000) << "dtds::dtds add:" << *it + *subit+"/" << endl;
if ((*subit != ".") && (*subit != ".."))
@@ -87,15 +87,15 @@ DTDs::DTDs(QObject *parent)
}
}
}
- for ( QStringList::ConstIterator it = tagsResourceDirs.constBegin(); it != end; ++it )
+ for ( TQStringList::ConstIterator it = tagsResourceDirs.constBegin(); it != end; ++it )
{
if (!(*it).startsWith(localKDEdir))
{
- QDir dir(*it);
- dir.setFilter(QDir::Dirs);
- QStringList subDirs = dir.entryList();
- QStringList::ConstIterator subitEnd = subDirs.constEnd();
- for ( QStringList::ConstIterator subit = subDirs.constBegin(); subit != subitEnd; ++subit )
+ TQDir dir(*it);
+ dir.setFilter(TQDir::Dirs);
+ TQStringList subDirs = dir.entryList();
+ TQStringList::ConstIterator subitEnd = subDirs.constEnd();
+ for ( TQStringList::ConstIterator subit = subDirs.constBegin(); subit != subitEnd; ++subit )
{
// kdDebug(24000) << "dtds::dtds add2:" << *it + *subit+"/" << endl;
if ((*subit != ".") && (*subit != ".."))
@@ -104,17 +104,17 @@ DTDs::DTDs(QObject *parent)
}
}
// kdDebug(24000) << tagsDirs.count() << " folders found." << endl;
- QTime t;
+ TQTime t;
t.start();
- QStringList::ConstIterator tagsDirsEnd = tagsDirs.constEnd();
- for ( QStringList::ConstIterator it = tagsDirs.constBegin(); it != tagsDirsEnd; ++it )
+ TQStringList::ConstIterator tagsDirsEnd = tagsDirs.constEnd();
+ for ( TQStringList::ConstIterator it = tagsDirs.constBegin(); it != tagsDirsEnd; ++it )
{
// kdDebug(24000) << "read:" << *it << endl;
readTagDir(*it, false); // read all tags, but only short form
}
kdDebug(24000) << "DTD reading: " << t.elapsed() << endl;
//load the mimetypes from the insideDTDs
- QDictIterator<DTDStruct> it(*m_dict);
+ TQDictIterator<DTDStruct> it(*m_dict);
for( ; it.current(); ++it )
{
DTDStruct * dtd = it.current();
@@ -133,7 +133,7 @@ DTDs::DTDs(QObject *parent)
DTDs::~DTDs()
{
- QDictIterator<DTDStruct> it(*m_dict);
+ TQDictIterator<DTDStruct> it(*m_dict);
for( ; it.current(); ++it )
{
removeDTD (it.current());
@@ -159,15 +159,15 @@ void DTDs::removeDTD(DTDStruct *dtd)
/** Reads the tag files and the description.rc from tagDir in order to
build up the internal DTD and tag structures. */
-bool DTDs::readTagDir(const QString &dirName, bool loadAll)
+bool DTDs::readTagDir(const TQString &dirName, bool loadAll)
{
// kdDebug(24000) << "dtds::readTagDir:" << dirName << " all:" << loadAll << endl;
- QString tmpStr = dirName + m_rcFilename;
- if (!QFile::exists(tmpStr))
+ TQString tmpStr = dirName + m_rcFilename;
+ if (!TQFile::exists(tmpStr))
return false;
KConfig *dtdConfig = new KConfig(tmpStr, true);
dtdConfig->setGroup("General");
- QString dtdName = dtdConfig->readEntry("Name", "Unknown");
+ TQString dtdName = dtdConfig->readEntry("Name", "Unknown");
if (m_dict->find(dtdName.lower()))
{
delete dtdConfig;
@@ -194,14 +194,14 @@ bool DTDs::readTagDir(const QString &dirName, bool loadAll)
//Read the areas that define the areas
dtdConfig->setGroup("Parsing rules");
- QStringList definitionAreaBorders = dtdConfig->readListEntry("AreaBorders");
+ TQStringList definitionAreaBorders = dtdConfig->readListEntry("AreaBorders");
for (uint i = 0; i < definitionAreaBorders.count(); i++)
{
- QStringList tmpStrList = QStringList::split(" ", definitionAreaBorders[i].stripWhiteSpace());
+ TQStringList tmpStrList = TQStringList::split(" ", definitionAreaBorders[i].stripWhiteSpace());
dtd->definitionAreas[tmpStrList[0].stripWhiteSpace()] = tmpStrList[1].stripWhiteSpace();
}
//Read the tags that define this DTD
- QStringList tmpStrList = dtdConfig->readListEntry("Tags");
+ TQStringList tmpStrList = dtdConfig->readListEntry("Tags");
for (uint i = 0; i < tmpStrList.count(); i++)
{
tmpStr = tmpStrList[i].stripWhiteSpace();
@@ -237,9 +237,9 @@ bool DTDs::readTagDir2(DTDStruct *dtd)
{
// kdDebug(24000) << "dtds::readTagDir2:" << dtd->name << " at " << dtd->fileName << endl;
- if (!QFile::exists(dtd->fileName)) return false;
+ if (!TQFile::exists(dtd->fileName)) return false;
- kapp->setOverrideCursor( QCursor(Qt::WaitCursor) );
+ kapp->setOverrideCursor( TQCursor(Qt::WaitCursor) );
KConfig *dtdConfig = new KConfig(dtd->fileName, true);
@@ -269,15 +269,15 @@ bool DTDs::readTagDir2(DTDStruct *dtd)
//read all the tag files
KURL dirURL(dtd->fileName);
dirURL.setFileName("");
- QString dirName = dirURL.path(1);
- if (QFile::exists(dirName + "common.tag"))
+ TQString dirName = dirURL.path(1);
+ if (TQFile::exists(dirName + "common.tag"))
readTagFile(dirName + "common.tag", dtd, 0L);
//bool idleTimerStatus = quantaApp->slotEnableIdleTimer(false);
emit enableIdleTimer(false);
KURL::List files = QExtFileInfo::allFilesRelative(dirURL, "*.tag", 0L);
//quantaApp->slotEnableIdleTimer(idleTimerStatus);
emit enableIdleTimer(true);
- QString tmpStr;
+ TQString tmpStr;
KURL::List::ConstIterator end_f = files.constEnd();
for ( KURL::List::ConstIterator it_f = files.constBegin(); it_f != end_f; ++it_f )
{
@@ -306,15 +306,15 @@ bool DTDs::readTagDir2(DTDStruct *dtd)
//read the extra tags and their attributes
dtdConfig->setGroup("Extra tags");
dtd->defaultAttrType = dtdConfig->readEntry("DefaultAttrType","input");
- QStrList extraTagsList;
+ TQStrList extraTagsList;
dtdConfig->readListEntry("List",extraTagsList);
- QString option;
- QStrList optionsList;
- QStrList attrList;
+ TQString option;
+ TQStrList optionsList;
+ TQStrList attrList;
for (uint i = 0 ; i < extraTagsList.count(); i++)
{
QTag *tag = new QTag();
- tag->setName(QString(extraTagsList.at(i)).stripWhiteSpace());
+ tag->setName(TQString(extraTagsList.at(i)).stripWhiteSpace());
tmpStr = (dtd->caseSensitive) ? tag->name() : tag->name().upper();
if (tagList->find(tmpStr)) //the tag is already defined in a .tag file
@@ -324,11 +324,11 @@ bool DTDs::readTagDir2(DTDStruct *dtd)
}
tag->parentDTD = dtd;
//read the possible stopping tags
- QStrList stoppingTags;
+ TQStrList stoppingTags;
dtdConfig->readListEntry(tag->name() + "_stoppingtags",stoppingTags);
for (uint j = 0; j < stoppingTags.count(); j++)
{
- QString stopTag = QString(stoppingTags.at(j)).stripWhiteSpace();
+ TQString stopTag = TQString(stoppingTags.at(j)).stripWhiteSpace();
if (!dtd->caseSensitive) stopTag = stopTag.upper();
tag->stoppingTags.append(stopTag);
}
@@ -337,14 +337,14 @@ bool DTDs::readTagDir2(DTDStruct *dtd)
dtdConfig->readListEntry(tag->name() + "_options",optionsList);
for (uint j = 0; j < optionsList.count(); j++)
{
- option = QString(optionsList.at(j)).stripWhiteSpace();
- QDictIterator<AttributeList> it(*(dtd->commonAttrs));
+ option = TQString(optionsList.at(j)).stripWhiteSpace();
+ TQDictIterator<AttributeList> it(*(dtd->commonAttrs));
for( ; it.current(); ++it )
{
- tmpStr = "has" + QString(it.currentKey()).stripWhiteSpace();
+ tmpStr = "has" + TQString(it.currentKey()).stripWhiteSpace();
if (option == tmpStr)
{
- tag->commonGroups += QString(it.currentKey()).stripWhiteSpace();
+ tag->commonGroups += TQString(it.currentKey()).stripWhiteSpace();
}
}
if (option == "single")
@@ -361,7 +361,7 @@ bool DTDs::readTagDir2(DTDStruct *dtd)
for (uint j = 0; j < attrList.count(); j++)
{
Attribute* attr = new Attribute;
- attr->name = QString(attrList.at(j)).stripWhiteSpace();
+ attr->name = TQString(attrList.at(j)).stripWhiteSpace();
attr->type = dtd->defaultAttrType;
tag->addAttribute(attr);
delete attr;
@@ -383,7 +383,7 @@ bool DTDs::readTagDir2(DTDStruct *dtd)
dtdConfig->setGroup("Parsing rules");
bool appendCommonRules = dtdConfig->readBoolEntry("AppendCommonSpecialAreas", true);
//Read the special areas and area names
- QString rxStr = "";
+ TQString rxStr = "";
if (dtd->family == Xml && appendCommonRules)
{
dtd->specialAreas["<?xml"] = "?>";
@@ -396,14 +396,14 @@ bool DTDs::readTagDir2(DTDStruct *dtd)
tmpStr = "(<?xml)|(<!--)|(<!)|";
rxStr = QuantaCommon::makeRxCompatible(tmpStr);
}
- QStringList specialAreasList = dtdConfig->readListEntry("SpecialAreas");
- QStringList specialAreaNameList = dtdConfig->readListEntry("SpecialAreaNames");
- QStringList tmpStrList;
+ TQStringList specialAreasList = dtdConfig->readListEntry("SpecialAreas");
+ TQStringList specialAreaNameList = dtdConfig->readListEntry("SpecialAreaNames");
+ TQStringList tmpStrList;
for (uint i = 0; i < specialAreasList.count(); i++)
{
if (!specialAreasList[i].stripWhiteSpace().isEmpty())
{
- tmpStrList = QStringList::split(" ",specialAreasList[i].stripWhiteSpace());
+ tmpStrList = TQStringList::split(" ",specialAreasList[i].stripWhiteSpace());
tmpStr = tmpStrList[0].stripWhiteSpace();
rxStr.append(QuantaCommon::makeRxCompatible(tmpStr)+"|");
dtd->specialAreas[tmpStr] = tmpStrList[1].stripWhiteSpace();
@@ -426,15 +426,15 @@ bool DTDs::readTagDir2(DTDStruct *dtd)
dtd->specialTags[tmpStr.left(pos).stripWhiteSpace()] = tmpStr.mid(pos+1, tmpStr.findRev(')')-pos-1).stripWhiteSpace();
}
- //static const QString quotationStr = "\\\\\"|\\\\'";
+ //static const TQString quotationStr = "\\\\\"|\\\\'";
rxStr = "\\\\\"|\\\\'|";
- QStringList commentsList = dtdConfig->readListEntry("Comments");
+ TQStringList commentsList = dtdConfig->readListEntry("Comments");
if (dtd->family == Xml && appendCommonRules)
commentsList.append("<!-- -->");
- QString tmpStr2;
+ TQString tmpStr2;
for (uint i = 0; i < commentsList.count(); i++)
{
- tmpStrList = QStringList::split(" ",commentsList[i].stripWhiteSpace());
+ tmpStrList = TQStringList::split(" ",commentsList[i].stripWhiteSpace());
tmpStr = tmpStrList[0].stripWhiteSpace();
rxStr += QuantaCommon::makeRxCompatible(tmpStr);
rxStr += "|";
@@ -448,7 +448,7 @@ bool DTDs::readTagDir2(DTDStruct *dtd)
/**** End of code for the new parser *****/
//read the definition of a structure, and the structure keywords
- QStringList structKeywords = dtdConfig->readListEntry("StructKeywords",',');
+ TQStringList structKeywords = dtdConfig->readListEntry("StructKeywords",',');
if (structKeywords.count() !=0 )
{
tmpStr = "\\b(";
@@ -529,11 +529,11 @@ bool DTDs::readTagDir2(DTDStruct *dtd)
if (dtd->family == Script)
{
StructTreeGroup group;
- QRegExp attrRx("\\([^\\)]*\\)");
- QString tagStr;
+ TQRegExp attrRx("\\([^\\)]*\\)");
+ TQString tagStr;
for (uint index = 1; index <= structGroupsCount; index++)
{
- dtdConfig->setGroup(QString("StructGroup_%1").arg(index));
+ dtdConfig->setGroup(TQString("StructGroup_%1").arg(index));
//new code
group.name = dtdConfig->readEntry("Name").stripWhiteSpace();
group.noName = dtdConfig->readEntry("No_Name").stripWhiteSpace();
@@ -579,22 +579,22 @@ bool DTDs::readTagDir2(DTDStruct *dtd)
} else
{
XMLStructGroup group;
- QRegExp attrRx("\\([^\\)]*\\)");
- QString tagName;
+ TQRegExp attrRx("\\([^\\)]*\\)");
+ TQString tagName;
for (uint index = 1; index <= structGroupsCount; index++)
{
- dtdConfig->setGroup(QString("StructGroup_%1").arg(index));
+ dtdConfig->setGroup(TQString("StructGroup_%1").arg(index));
group.name = dtdConfig->readEntry("Name").stripWhiteSpace();
group.noName = dtdConfig->readEntry("No_Name").stripWhiteSpace();
group.icon = dtdConfig->readEntry("Icon").stripWhiteSpace();
group.appendToTags = dtdConfig->readBoolEntry("AppendToTags", false);
group.parentGroup = dtdConfig->readEntry("ParentGroup").stripWhiteSpace();
- QString tagStr = dtdConfig->readEntry("Tag").stripWhiteSpace();
+ TQString tagStr = dtdConfig->readEntry("Tag").stripWhiteSpace();
if (!tagStr.isEmpty())
{
attrRx.search(tagStr);
tmpStr = attrRx.cap();
- tmpStrList = QStringList::split(',', tmpStr.mid(1, tmpStr.length()-2));
+ tmpStrList = TQStringList::split(',', tmpStr.mid(1, tmpStr.length()-2));
tagName = tagStr.left(tagStr.find('(')).lower();
group.attributes.clear();
for (uint i = 0; i < tmpStrList.count(); i++)
@@ -621,11 +621,11 @@ void DTDs::resolveInherited (DTDStruct *dtd)
if (!dtd->inheritsTagsFrom.isEmpty())
{
DTDStruct *parent = (DTDStruct *) find(dtd->inheritsTagsFrom); // this loads the dtd, if not present in memory
- QDictIterator<QTag> tag_it(*(parent->tagsList));
+ TQDictIterator<QTag> tag_it(*(parent->tagsList));
for ( ; tag_it.current(); ++tag_it)
{
QTag *tag = tag_it.current();
- QString searchForTag = (dtd->caseSensitive) ? tag->name() : tag->name().upper();
+ TQString searchForTag = (dtd->caseSensitive) ? tag->name() : tag->name().upper();
if (!dtd->tagsList->find(searchForTag))
{
QTag *newTag = new QTag(*tag);
@@ -636,8 +636,8 @@ void DTDs::resolveInherited (DTDStruct *dtd)
//Read the pseudo DTD area definition strings (special area/tag string)
//from the DTD's which may be present in the DTD (May_Contain setting)
- QMap<QString, QString>::ConstIterator mapIt;
- QString specialAreaStartRxStr = dtd->specialAreaStartRx.pattern();
+ TQMap<TQString, TQString>::ConstIterator mapIt;
+ TQString specialAreaStartRxStr = dtd->specialAreaStartRx.pattern();
if (!specialAreaStartRxStr.isEmpty())
specialAreaStartRxStr += "|";
for (uint i = 0; i < dtd->insideDTDs.count(); i++)
@@ -649,7 +649,7 @@ void DTDs::resolveInherited (DTDStruct *dtd)
{
for (mapIt = insideDTD->definitionAreas.begin(); mapIt != insideDTD->definitionAreas.end(); ++mapIt)
{
- QString tmpStr = mapIt.key();
+ TQString tmpStr = mapIt.key();
dtd->specialAreas[tmpStr] = mapIt.data();
dtd->specialAreaNames[tmpStr] = dtd->insideDTDs[i];
specialAreaStartRxStr.append("(?:" + QuantaCommon::makeRxCompatible(tmpStr) + ")|");
@@ -667,10 +667,10 @@ void DTDs::resolveInherited (DTDStruct *dtd)
/** Reads the tags for the tag files. Returns the number of read tags. */
-uint DTDs::readTagFile(const QString& fileName, DTDStruct* parentDTD, QTagList *tagList)
+uint DTDs::readTagFile(const TQString& fileName, DTDStruct* parentDTD, QTagList *tagList)
{
// kdDebug(24000) << "dtds::readTagFile:" << fileName << endl;
- QFile f(fileName);
+ TQFile f(fileName);
if (! f.exists())
kdError() << "dtds::readTagFile file does not exist:" << fileName << endl;
else
@@ -680,7 +680,7 @@ uint DTDs::readTagFile(const QString& fileName, DTDStruct* parentDTD, QTagList *
kdError() << "dtds::readTagFile unable to open:" << fileName
<< " Status: " << f.status() << endl;
}
- QString errorMsg;
+ TQString errorMsg;
int errorLine, errorCol;
if (!m_doc->setContent( &f, &errorMsg, &errorLine, &errorCol ))
{
@@ -691,16 +691,16 @@ uint DTDs::readTagFile(const QString& fileName, DTDStruct* parentDTD, QTagList *
}
f.close();
- QDomNodeList nodeList = m_doc->elementsByTagName("tag");
+ TQDomNodeList nodeList = m_doc->elementsByTagName("tag");
uint numOfTags = nodeList.count();
for (uint i = 0; i < numOfTags; i++)
{
- QDomNode n = nodeList.item(i);
- QDomElement e = n.toElement();
+ TQDomNode n = nodeList.item(i);
+ TQDomElement e = n.toElement();
if (e.attribute("type") == "class")
{
- QString extends = e.attribute("extends");
- QString name = e.attribute("name");
+ TQString extends = e.attribute("extends");
+ TQString name = e.attribute("name");
if (!name.isEmpty() && !extends.isEmpty())
parentDTD->classInheritance[name] = extends;
continue;
@@ -713,7 +713,7 @@ uint DTDs::readTagFile(const QString& fileName, DTDStruct* parentDTD, QTagList *
setAttributes(&n, tag, common);
if (common)
{
- QString groupName = e.attribute("name");
+ TQString groupName = e.attribute("name");
AttributeList *attrs = tag->attributes();
attrs->setAutoDelete(false);
AttributeList *commonAttrList = new AttributeList; //no need to delete it
@@ -739,27 +739,27 @@ uint DTDs::readTagFile(const QString& fileName, DTDStruct* parentDTD, QTagList *
/**
Parse the dom document and retrieve the tag attributes
*/
-void DTDs::setAttributes(QDomNode *dom, QTag* tag, bool &common)
+void DTDs::setAttributes(TQDomNode *dom, QTag* tag, bool &common)
{
common = false;
Attribute *attr;
- QDomElement el = dom->toElement();
- QString tmpStr;
+ TQDomElement el = dom->toElement();
+ TQString tmpStr;
tmpStr = el.attribute("common");
if ((tmpStr != "1" && tmpStr != "yes")) //in case of common tags, we are not interested in these options
{
if (tag->parentDTD->commonAttrs)
{
- QDictIterator<AttributeList> it(*(tag->parentDTD->commonAttrs));
+ TQDictIterator<AttributeList> it(*(tag->parentDTD->commonAttrs));
for( ; it.current(); ++it )
{
- QString lookForAttr = "has" + QString(it.currentKey()).stripWhiteSpace();
+ TQString lookForAttr = "has" + TQString(it.currentKey()).stripWhiteSpace();
tmpStr = el.attribute(lookForAttr);
if (tmpStr == "1" || tmpStr == "yes")
{
- tag->commonGroups += QString(it.currentKey()).stripWhiteSpace();
+ tag->commonGroups += TQString(it.currentKey()).stripWhiteSpace();
}
}
}
@@ -790,20 +790,20 @@ void DTDs::setAttributes(QDomNode *dom, QTag* tag, bool &common)
{
common = true;
}
- QString attrList;
- for ( QDomNode n = dom->firstChild(); !n.isNull(); n = n.nextSibling() )
+ TQString attrList;
+ for ( TQDomNode n = dom->firstChild(); !n.isNull(); n = n.nextSibling() )
{
tmpStr = n.nodeName();
if (tmpStr == "children")
{
- QDomElement el = n.toElement();
- QDomElement item = el.firstChild().toElement();
+ TQDomElement el = n.toElement();
+ TQDomElement item = el.firstChild().toElement();
while ( !item.isNull() )
{
tmpStr = item.tagName();
if (tmpStr == "child")
{
- QString childTag = item.attribute("name");
+ TQString childTag = item.attribute("name");
if (!tag->parentDTD->caseSensitive)
childTag = childTag.upper();
tag->childTags.insert(childTag, item.attribute("usage") == "required");
@@ -813,13 +813,13 @@ void DTDs::setAttributes(QDomNode *dom, QTag* tag, bool &common)
} else
if (tmpStr == "stoppingtags") //read what tag can act as closing tag
{
- QDomElement el = n.toElement();
- QDomElement item = el.firstChild().toElement();
+ TQDomElement el = n.toElement();
+ TQDomElement item = el.firstChild().toElement();
while ( !item.isNull() )
{
if (item.tagName() == "stoppingtag")
{
- QString stopTag = item.attribute("name");
+ TQString stopTag = item.attribute("name");
if (!tag->parentDTD->caseSensitive)
stopTag = stopTag.upper();
tag->stoppingTags.append(stopTag);
@@ -829,7 +829,7 @@ void DTDs::setAttributes(QDomNode *dom, QTag* tag, bool &common)
} else
if (tmpStr == "attr") //an attribute
{
- QDomElement el = n.toElement();
+ TQDomElement el = n.toElement();
attr = new Attribute;
attr->name = el.attribute("name");
attr->source = el.attribute("source");
@@ -842,9 +842,9 @@ void DTDs::setAttributes(QDomNode *dom, QTag* tag, bool &common)
attr->status = el.attribute("status");
if ( attr->type == "list" ) {
- for ( QDomElement attrEl = el.firstChild().toElement(); !attrEl.isNull(); attrEl = attrEl.nextSibling().toElement() ) {
+ for ( TQDomElement attrEl = el.firstChild().toElement(); !attrEl.isNull(); attrEl = attrEl.nextSibling().toElement() ) {
if ( attrEl.tagName() == "items" ) {
- QDomElement item = attrEl.firstChild().toElement();
+ TQDomElement item = attrEl.firstChild().toElement();
while ( !item.isNull() ) {
attr->values.append( item.text() );
item = item.nextSibling().toElement();
@@ -907,21 +907,21 @@ void DTDs::slotLoadDTD()
DTDParser dtdParser(url, KGlobal::dirs()->saveLocation("data") + resourceDir + "dtep");
if (dtdParser.parse())
{
- QString dirName = dtdParser.dirName();
+ TQString dirName = dtdParser.dirName();
KConfig dtdcfg(dirName + m_rcFilename, true);
dtdcfg.setGroup("General");
- QString dtdName = dtdcfg.readEntry("Name");
- QString nickName = dtdcfg.readEntry("NickName", dtdName);
+ TQString dtdName = dtdcfg.readEntry("Name");
+ TQString nickName = dtdcfg.readEntry("NickName", dtdName);
DTDStruct * dtd = m_dict->find(dtdName) ;
if (dtd &&
- KMessageBox::warningYesNo(0L, i18n("<qt>Do you want to replace the existing <b>%1</b> DTD?</qt>").arg(nickName), QString::null, i18n("Replace"), i18n("Do Not Replace")) == KMessageBox::No)
+ KMessageBox::warningYesNo(0L, i18n("<qt>Do you want to replace the existing <b>%1</b> DTD?</qt>").arg(nickName), TQString::null, i18n("Replace"), i18n("Do Not Replace")) == KMessageBox::No)
{
return;
}
removeDTD(dtd);
if (readTagDir(dirName))
{
- QString family = dtdcfg.readEntry("Family", "1");
+ TQString family = dtdcfg.readEntry("Family", "1");
Document *w = ViewManager::ref()->activeDocument();
if (family == "1" && w &&
KMessageBox::questionYesNo(0L, i18n("<qt>Use the newly loaded <b>%1</b> DTD for the current document?</qt>").arg(nickName), i18n("Change DTD"), i18n("Use"), i18n("Do Not Use")) == KMessageBox::Yes)
@@ -935,18 +935,18 @@ void DTDs::slotLoadDTD()
}
}
-void DTDs::slotLoadDTEP(const QString &_dirName, bool askForAutoload)
+void DTDs::slotLoadDTEP(const TQString &_dirName, bool askForAutoload)
{
- QString dirName = _dirName;
+ TQString dirName = _dirName;
if (!dirName.endsWith("/"))
dirName += "/";
KConfig dtdcfg(dirName + m_rcFilename, true);
dtdcfg.setGroup("General");
- QString dtdName = dtdcfg.readEntry("Name");
- QString nickName = dtdcfg.readEntry("NickName", dtdName);
+ TQString dtdName = dtdcfg.readEntry("Name");
+ TQString nickName = dtdcfg.readEntry("NickName", dtdName);
DTDStruct * dtd = m_dict->find(dtdName) ;
if ( dtd &&
- KMessageBox::warningYesNo(0L, i18n("<qt>Do you want to replace the existing <b>%1</b> DTD?</qt>").arg(nickName), QString::null, i18n("Replace"), i18n("Do Not Replace")) == KMessageBox::No)
+ KMessageBox::warningYesNo(0L, i18n("<qt>Do you want to replace the existing <b>%1</b> DTD?</qt>").arg(nickName), TQString::null, i18n("Replace"), i18n("Do Not Replace")) == KMessageBox::No)
{
return;
}
@@ -956,13 +956,13 @@ void DTDs::slotLoadDTEP(const QString &_dirName, bool askForAutoload)
KMessageBox::error(0L, i18n("<qt>Cannot read the DTEP from <b>%1</b>. Check that the folder contains a valid DTEP (<i>description.rc and *.tag files</i>).</qt>").arg(dirName), i18n("Error Loading DTEP"));
} else
{
- QString family = dtdcfg.readEntry("Family", "1");
- if (askForAutoload && KMessageBox::questionYesNo(0L, i18n("<qt>Autoload the <b>%1</b> DTD in the future?</qt>").arg(nickName), QString::null, i18n("Load"), i18n("Do Not Load")) == KMessageBox::Yes)
+ TQString family = dtdcfg.readEntry("Family", "1");
+ if (askForAutoload && KMessageBox::questionYesNo(0L, i18n("<qt>Autoload the <b>%1</b> DTD in the future?</qt>").arg(nickName), TQString::null, i18n("Load"), i18n("Do Not Load")) == KMessageBox::Yes)
{
KURL src;
src.setPath(dirName);
KURL target;
- QString destDir = KGlobal::dirs()->saveLocation("data") + resourceDir + "dtep/";
+ TQString destDir = KGlobal::dirs()->saveLocation("data") + resourceDir + "dtep/";
target.setPath(destDir + src.fileName());
KIO::copy( src, target, false); //don't care about the result
}
@@ -981,12 +981,12 @@ void DTDs::slotLoadEntities()
{
KDialogBase dlg(0L, "loadentities", true, i18n("Load DTD Entities Into DTEP"), KDialogBase::Ok | KDialogBase::Cancel);
LoadEntityDlgS entitiesWidget(&dlg);
- QStringList lst(DTDs::ref()->nickNameList(true));
+ TQStringList lst(DTDs::ref()->nickNameList(true));
entitiesWidget.targetDTEPCombo->insertStringList(lst);
Document *w = ViewManager::ref()->activeDocument();
if (w)
{
- QString nickName = DTDs::ref()->getDTDNickNameFromName(w->getDTDIdentifier());
+ TQString nickName = DTDs::ref()->getDTDNickNameFromName(w->getDTDIdentifier());
entitiesWidget.targetDTEPCombo->setCurrentItem(lst.findIndex(nickName));
}
dlg.setMainWidget(&entitiesWidget);
@@ -994,7 +994,7 @@ void DTDs::slotLoadEntities()
{
DTDStruct * dtd = m_dict->find(getDTDNameFromNickName(entitiesWidget.targetDTEPCombo->currentText()));
DTDParser dtdParser(KURL::fromPathOrURL(entitiesWidget.sourceDTDRequester->url()), KGlobal::dirs()->saveLocation("data") + resourceDir + "dtep");
- QString dtdDir = QFileInfo(dtd->fileName).dirPath();
+ TQString dtdDir = TQFileInfo(dtd->fileName).dirPath();
if (dtdParser.parse(dtdDir, true))
{
readTagFile(dtdDir + "/entities.tag", dtd, dtd->tagsList);
@@ -1004,9 +1004,9 @@ void DTDs::slotLoadEntities()
/** Returns the DTD name (identifier) corresponding to the DTD's nickname */
-QString DTDs::getDTDNameFromNickName(const QString& nickName)
+TQString DTDs::getDTDNameFromNickName(const TQString& nickName)
{
- QDictIterator<DTDStruct> it(*m_dict);
+ TQDictIterator<DTDStruct> it(*m_dict);
for( ; it.current(); ++it )
{
if (it.current()->nickName.lower() == nickName.lower())
@@ -1018,10 +1018,10 @@ QString DTDs::getDTDNameFromNickName(const QString& nickName)
}
/** returns the known nick names */
-QStringList DTDs::nickNameList(bool topLevelOnly)
+TQStringList DTDs::nickNameList(bool topLevelOnly)
{
- QStringList nickList;
- QDictIterator<DTDStruct> it(*m_dict);
+ TQStringList nickList;
+ TQDictIterator<DTDStruct> it(*m_dict);
for( ; it.current(); ++it )
{
if (!topLevelOnly || it.current()->toplevel)
@@ -1035,10 +1035,10 @@ QStringList DTDs::nickNameList(bool topLevelOnly)
/** returns the known names */
-QStringList DTDs::nameList(bool topLevelOnly)
+TQStringList DTDs::nameList(bool topLevelOnly)
{
- QStringList nameList;
- QDictIterator<DTDStruct> it(*m_dict);
+ TQStringList nameList;
+ TQDictIterator<DTDStruct> it(*m_dict);
for( ; it.current(); ++it )
{
if (!topLevelOnly || it.current()->toplevel)
@@ -1050,10 +1050,10 @@ QStringList DTDs::nameList(bool topLevelOnly)
return nameList;
}
-QStringList DTDs::fileNameList(bool topLevelOnly)
+TQStringList DTDs::fileNameList(bool topLevelOnly)
{
- QStringList nameList;
- QDictIterator<DTDStruct> it(*m_dict);
+ TQStringList nameList;
+ TQDictIterator<DTDStruct> it(*m_dict);
for( ; it.current(); ++it )
{
if (!topLevelOnly || it.current()->toplevel)
@@ -1067,8 +1067,8 @@ QStringList DTDs::fileNameList(bool topLevelOnly)
const DTDStruct * DTDs::DTDforURL(const KURL &url)
{
- QValueList<DTDStruct*> foundList;
- QDictIterator<DTDStruct> it(*m_dict);
+ TQValueList<DTDStruct*> foundList;
+ TQDictIterator<DTDStruct> it(*m_dict);
for( ; it.current(); ++it )
{
if (it.current()->toplevel && canHandle(it.current(), url))
@@ -1080,7 +1080,7 @@ const DTDStruct * DTDs::DTDforURL(const KURL &url)
return find("empty");
else
{
- QString path = url.path();
+ TQString path = url.path();
for (uint i = 0; i < foundList.count(); i++)
{
if (path.endsWith('.' + foundList[i]->defaultExtension))
@@ -1092,7 +1092,7 @@ const DTDStruct * DTDs::DTDforURL(const KURL &url)
bool DTDs::canHandle(const DTDStruct *dtd, const KURL &url)
{
- QString mimetype = KMimeType::findByURL(url)->name();
+ TQString mimetype = KMimeType::findByURL(url)->name();
if (dtd->mimeTypes.contains(mimetype))
return true;
if (url.path().endsWith('.' + dtd->defaultExtension))
diff --git a/quanta/src/dtds.h b/quanta/src/dtds.h
index 1e26f712..a56da5b1 100644
--- a/quanta/src/dtds.h
+++ b/quanta/src/dtds.h
@@ -22,11 +22,11 @@
// application specific includes
#include "qtag.h"
-#include "qobject.h"
-#include "qfile.h"
+#include "tqobject.h"
+#include "tqfile.h"
//qt includes
-#include <qdict.h>
+#include <tqdict.h>
//kde includes
#include <kdebug.h>
@@ -56,7 +56,7 @@ public:
* since this class is a singleton you must use this function to access it
* @return the class pointer
*/
- static DTDs* ref(QObject *parent = 0L)
+ static DTDs* ref(TQObject *parent = 0L)
{
static DTDs *m_ref;
if (!m_ref) m_ref = new DTDs(parent);
@@ -72,7 +72,7 @@ public:
* @param dtdName name of the dtd, will be converted to lowercase inside
* @return the found dtd structure
*/
- const DTDStruct * find (const QString &dtdName)
+ const DTDStruct * find (const TQString &dtdName)
{
// kdDebug(24000) << "dtds::find " << dtdName << endl;
DTDStruct *dtd = m_dict->find(dtdName.lower()) ;
@@ -84,13 +84,13 @@ public:
* @return the name (identifier) to the nickname. If the DTD is not found you get
* nickName back!
*/
- QString getDTDNameFromNickName(const QString& nickName);
+ TQString getDTDNameFromNickName(const TQString& nickName);
/**
* @param name name of the DTD
* @return the nickname to the name. If the DTD is not found you get
* name back!
*/
- QString getDTDNickNameFromName(const QString& name)
+ TQString getDTDNickNameFromName(const TQString& name)
{
DTDStruct *dtd = m_dict->find(name);
if ( dtd )
@@ -106,7 +106,7 @@ public:
* are included
* @return all known nick names
*/
- QStringList nickNameList (bool topLevelOnly=false);
+ TQStringList nickNameList (bool topLevelOnly=false);
/**
* creates a list of all available names
@@ -115,7 +115,7 @@ public:
* are included
* @return all known names
*/
- QStringList nameList (bool topLevelOnly=false);
+ TQStringList nameList (bool topLevelOnly=false);
/**
* creates a list with the path to the description.rc of all available DTEPs
*
@@ -124,7 +124,7 @@ public:
* @return a list with the name and the path to the description.rc of all available DTEPs in form of
* DTEPName | path to description.rc
*/
- QStringList fileNameList (bool topLevelOnly=false);
+ TQStringList fileNameList (bool topLevelOnly=false);
/** finds a dtd for a given url
@@ -153,7 +153,7 @@ public slots:
* the DTEP will be copied to the local resource directory and will be autoloaded on
* startup
*/
- void slotLoadDTEP(const QString& dirName, bool askForAutoLoad);
+ void slotLoadDTEP(const TQString& dirName, bool askForAutoLoad);
/**
* Loads (replaces) the entities for a DTEP.
@@ -170,7 +170,7 @@ signals:
/** Enable/disbale the idle timer*/
void enableIdleTimer(bool);
- void loadToolbarForDTD(const QString&);
+ void loadToolbarForDTD(const TQString&);
private:
@@ -178,7 +178,7 @@ private:
* If you need the class use DTDs::ref() for
* construction and reference
*/
- DTDs(QObject *parent);
+ DTDs(TQObject *parent);
/** Reads the tag files and the description.rc from tagDir in order to
@@ -188,7 +188,7 @@ private:
* @param loadAll true = all information and tags will be loaded now (@ref readTagDir2 will be called)
* @return true = no error
*/
- bool readTagDir(const QString &dirName, bool loadAll=true);
+ bool readTagDir(const TQString &dirName, bool loadAll=true);
/** Reads the tag files and the description.rc from tagDir in order to
* build up the internal DTD and tag structures.
@@ -212,7 +212,7 @@ private:
* @param tagList the list where the tags are inserted
* @return the number of read tags.
*/
- uint readTagFile(const QString& fileName, DTDStruct* parentDTD, QTagList *tagList);
+ uint readTagFile(const TQString& fileName, DTDStruct* parentDTD, QTagList *tagList);
/** Parses the dom document and retrieve the tag attributes
*
@@ -220,7 +220,7 @@ private:
* @param tag the QTag object that will be initialized by using the information in dom
* @param common will be true, if the tag is a just a list of common group attributes
*/
- void setAttributes(QDomNode *dom, QTag* tag, bool &common);
+ void setAttributes(TQDomNode *dom, QTag* tag, bool &common);
/** removes dtd from dictonary and deletes all components
*
* @param dtd the dtd to delete
@@ -228,10 +228,10 @@ private:
void removeDTD(DTDStruct *dtd);
/** helper to read the tag files */
- QDomDocument *m_doc;
+ TQDomDocument *m_doc;
/** dictonary with references to all DTD's in memory */
- QDict<DTDStruct> *m_dict;
+ TQDict<DTDStruct> *m_dict;
};
diff --git a/quanta/src/kqapp.cpp b/quanta/src/kqapp.cpp
index 6e7f02df..1bf2055d 100644
--- a/quanta/src/kqapp.cpp
+++ b/quanta/src/kqapp.cpp
@@ -16,7 +16,7 @@
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US
*/
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -41,13 +41,13 @@ QuantaApp *quantaApp = 0L; //global pointer to the main application object
#define SPLASH_PICTURE "quantalogo"
KSplash::KSplash()
- : QFrame( 0L, QString("Quanta")+QUANTA_VERSION,
- QWidget::WStyle_NoBorder | QWidget::WStyle_Customize | WX11BypassWM)
+ : TQFrame( 0L, TQString("Quanta")+QUANTA_VERSION,
+ TQWidget::WStyle_NoBorder | TQWidget::WStyle_Customize | WX11BypassWM)
{
- QPixmap pm( UserIcon(SPLASH_PICTURE) );
+ TQPixmap pm( UserIcon(SPLASH_PICTURE) );
setBackgroundPixmap(pm);
- QRect desk = KGlobalSettings::splashScreenDesktopGeometry();
+ TQRect desk = KGlobalSettings::splashScreenDesktopGeometry();
setGeometry( desk.center().x()-225, desk.center().y()-150, 450, 300 );
setLineWidth(0);
show();
@@ -80,7 +80,7 @@ KQApplication::KQApplication()
KConfig *config = kapp->config();
config->setGroup("General Options");
int mdiMode = config->readNumEntry("MDI mode", KMdi::IDEAlMode);
- QString layout = config->readEntry("Window layout", "Default");
+ TQString layout = config->readEntry("Window layout", "Default");
if (layout == "Default" || args->isSet("resetlayout"))
{
mdiMode = KMdi::IDEAlMode;
@@ -93,8 +93,8 @@ KQApplication::KQApplication()
{
sp = new KSplashScreen(UserIcon(SPLASH_PICTURE));
sp->show();
- connect(quantaApp, SIGNAL(showSplash(bool)), sp, SLOT(setShown(bool)));
- QTimer::singleShot(10*1000, this, SLOT(slotSplashTimeout()));
+ connect(quantaApp, TQT_SIGNAL(showSplash(bool)), sp, TQT_SLOT(setShown(bool)));
+ TQTimer::singleShot(10*1000, this, TQT_SLOT(slotSplashTimeout()));
}
setMainWidget(quantaApp);
slotInit();
@@ -151,7 +151,7 @@ int KQUniqueApplication::newInstance()
KConfig *config = kapp->config();
config->setGroup("General Options");
int mdiMode = config->readNumEntry("MDI mode", KMdi::IDEAlMode);
- QString layout = config->readEntry("Window layout", "Default");
+ TQString layout = config->readEntry("Window layout", "Default");
if (layout == "Default" || args->isSet("resetlayout"))
{
mdiMode = KMdi::IDEAlMode;
@@ -164,8 +164,8 @@ int KQUniqueApplication::newInstance()
{
sp = new KSplashScreen(UserIcon(SPLASH_PICTURE));
sp->show();
- connect(quantaApp, SIGNAL(showSplash(bool)), sp, SLOT(setShown(bool)));
- QTimer::singleShot(10*1000, this, SLOT(slotSplashTimeout()));
+ connect(quantaApp, TQT_SIGNAL(showSplash(bool)), sp, TQT_SLOT(setShown(bool)));
+ TQTimer::singleShot(10*1000, this, TQT_SLOT(slotSplashTimeout()));
}
setMainWidget(quantaApp);
slotInit();
@@ -197,13 +197,13 @@ void KQApplicationPrivate::init()
quantaApp->m_quantaInit->initQuanta();
quantaApp->show();
- QString initialProject;
- QStringList initialFiles;
+ TQString initialProject;
+ TQStringList initialFiles;
for (int i = 0; i < args->count(); i++ )
{
- QString arg = args->url(i).url();
+ TQString arg = args->url(i).url();
- if(arg.findRev(QRegExp(".+\\.webprj")) != -1)
+ if(arg.findRev(TQRegExp(".+\\.webprj")) != -1)
initialProject = arg;
else
initialFiles += arg;
@@ -212,7 +212,7 @@ void KQApplicationPrivate::init()
//recoverCrashed manages the autosaved copies
quantaApp->m_quantaInit->recoverCrashed(initialFiles);
- for(QStringList::Iterator it = initialFiles.begin();it != initialFiles.end();++it)
+ for(TQStringList::Iterator it = initialFiles.begin();it != initialFiles.end();++it)
{
KURL url;
QuantaCommon::setUrl(url, (*it));
diff --git a/quanta/src/kqapp.h b/quanta/src/kqapp.h
index 592d7cbc..1ecda501 100644
--- a/quanta/src/kqapp.h
+++ b/quanta/src/kqapp.h
@@ -19,7 +19,7 @@
#ifndef KQAPPLICATION_H
#define KQAPPLICATION_H
-#include <qframe.h>
+#include <tqframe.h>
#include <kuniqueapplication.h>
class KCmdLineArgs;
diff --git a/quanta/src/main.cpp b/quanta/src/main.cpp
index 39672048..527c9956 100644
--- a/quanta/src/main.cpp
+++ b/quanta/src/main.cpp
@@ -28,11 +28,11 @@
#include <dcopref.h>
// qt includes
-#include <qpixmap.h>
-#include <qnetwork.h>
-#include <qdom.h>
-#include <qfile.h>
-#include <qfileinfo.h>
+#include <tqpixmap.h>
+#include <tqnetwork.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
// app includes
#include "kqapp.h"
@@ -202,8 +202,8 @@ int main(int argc, char *argv[])
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
for (int i = 0; i < args->count(); i++)
{
- QString s = args->url(i).url();
- DCOPRef("quanta", "WindowManagerIf").call("openFile(QString, int, int)", s, 1, 1); // Activate it
+ TQString s = args->url(i).url();
+ DCOPRef("quanta", "WindowManagerIf").call("openFile(TQString, int, int)", s, 1, 1); // Activate it
}
DCOPRef("quanta", QUANTA_PACKAGE).call("newInstance()");
exit(0);
diff --git a/quanta/src/quanta.cpp b/quanta/src/quanta.cpp
index 596dc7e3..55be7e18 100644
--- a/quanta/src/quanta.cpp
+++ b/quanta/src/quanta.cpp
@@ -18,34 +18,34 @@
#include <time.h>
// include files for QT
-#include <qaction.h>
-#include <qdragobject.h>
-#include <qdir.h>
-#include <qprinter.h>
-#include <qpainter.h>
-#include <qwidgetstack.h>
-#include <qtabwidget.h>
-#include <qfile.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qtabbar.h>
-#include <qradiobutton.h>
-#include <qimage.h>
-#include <qtimer.h>
-#include <qtextcodec.h>
-#include <qtextstream.h>
-#include <qtextedit.h>
-#include <qiodevice.h>
-#include <qcombobox.h>
-#include <qdockarea.h>
-#include <qdom.h>
-#include <qspinbox.h>
-#include <qeventloop.h>
-#include <qfontmetrics.h>
-#include <qclipboard.h>
-#include <qptrlist.h>
-#include <qbuffer.h>
-#include <qdatetime.h>
+#include <tqaction.h>
+#include <tqdragobject.h>
+#include <tqdir.h>
+#include <tqprinter.h>
+#include <tqpainter.h>
+#include <tqwidgetstack.h>
+#include <tqtabwidget.h>
+#include <tqfile.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqtabbar.h>
+#include <tqradiobutton.h>
+#include <tqimage.h>
+#include <tqtimer.h>
+#include <tqtextcodec.h>
+#include <tqtextstream.h>
+#include <tqtextedit.h>
+#include <tqiodevice.h>
+#include <tqcombobox.h>
+#include <tqdockarea.h>
+#include <tqdom.h>
+#include <tqspinbox.h>
+#include <tqeventloop.h>
+#include <tqfontmetrics.h>
+#include <tqclipboard.h>
+#include <tqptrlist.h>
+#include <tqbuffer.h>
+#include <tqdatetime.h>
// include files for KDE
@@ -193,7 +193,7 @@
extern int NN;
-const QString resourceDir = QString(QUANTA_PACKAGE) + "/";
+const TQString resourceDir = TQString(QUANTA_PACKAGE) + "/";
// from kfiledialog.cpp - avoid qt warning in STDERR (~/.xsessionerrors)
static void silenceQToolBar(QtMsgType, const char *){}
@@ -212,10 +212,10 @@ QuantaApp::QuantaApp(int mdiMode) : DCOPObject("WindowManagerIf"), KMdiMainFrm(
m_toolbarList.setAutoDelete(true);
userToolbarsCount = 0;
baseNode = 0L;
- currentToolbarDTD = QString::null;
+ currentToolbarDTD = TQString::null;
m_config=kapp->config();
- idleTimer = new QTimer(this);
- connect(idleTimer, SIGNAL(timeout()), SLOT(slotIdleTimerExpired()));
+ idleTimer = new TQTimer(this);
+ connect(idleTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotIdleTimerExpired()));
m_idleTimerEnabled = true;
qConfig.globalDataDir = KGlobal::dirs()->findResourceDir("data",resourceDir + "toolbar/quantalogo.png");
@@ -226,23 +226,23 @@ QuantaApp::QuantaApp(int mdiMode) : DCOPObject("WindowManagerIf"), KMdiMainFrm(
kdWarning() << i18n("Quanta data files were not found.") << endl;
kdWarning() << i18n("You may have forgotten to run \"make install\", or your KDEDIR, KDEDIRS or PATH are not set correctly.") << endl;
kdWarning() << "***************************************************************************" << endl;
- QTimer::singleShot(20, kapp, SLOT(quit()));
+ TQTimer::singleShot(20, kapp, TQT_SLOT(quit()));
return;
}
qConfig.enableDTDToolbar = true;
// connect up signals from KXXsldbgPart
- connectDCOPSignal(0, 0, "debuggerPositionChangedQString,int)", "newDebuggerPosition(QString,int)", false );
- connectDCOPSignal(0, 0, "editorPositionChanged(QString,int,int)", "newCursorPosition(QString,int,int)", false );
- connectDCOPSignal(0, 0, "openFile(QString,int,int)", "openFile(QString,int,int)", false);
+ connectDCOPSignal(0, 0, "debuggerPositionChangedQString,int)", "newDebuggerPosition(TQString,int)", false );
+ connectDCOPSignal(0, 0, "editorPositionChanged(TQString,int,int)", "newCursorPosition(TQString,int,int)", false );
+ connectDCOPSignal(0, 0, "openFile(TQString,int,int)", "openFile(TQString,int,int)", false);
m_partManager = new KParts::PartManager(this);
// When the manager says the active part changes,
// the builder updates (recreates) the GUI
- connect(m_partManager, SIGNAL(activePartChanged(KParts::Part * )),
- this, SLOT(slotActivePartChanged(KParts::Part * )));
- connect(this, SIGNAL(dockWidgetHasUndocked(KDockWidget *)), this, SLOT(slotDockWidgetHasUndocked(KDockWidget *)));
- connect(tabWidget(), SIGNAL(initiateDrag(QWidget *)), this, SLOT(slotTabDragged(QWidget*)));
+ connect(m_partManager, TQT_SIGNAL(activePartChanged(KParts::Part * )),
+ this, TQT_SLOT(slotActivePartChanged(KParts::Part * )));
+ connect(this, TQT_SIGNAL(dockWidgetHasUndocked(KDockWidget *)), this, TQT_SLOT(slotDockWidgetHasUndocked(KDockWidget *)));
+ connect(tabWidget(), TQT_SIGNAL(initiateDrag(TQWidget *)), this, TQT_SLOT(slotTabDragged(TQWidget*)));
m_oldKTextEditor = 0L;
m_previewToolView = 0L;
@@ -258,7 +258,7 @@ QuantaApp::QuantaApp(int mdiMode) : DCOPObject("WindowManagerIf"), KMdiMainFrm(
m_parserEnabled = true;
cursorLine = 0;
cursorCol = 0;
- emit eventHappened("quanta_start", QDateTime::currentDateTime().toString(Qt::ISODate), QString::null);
+ emit eventHappened("quanta_start", TQDateTime::currentDateTime().toString(Qt::ISODate), TQString::null);
setAcceptDrops(true);
tabWidget()->installEventFilter(this);
}
@@ -276,9 +276,9 @@ QuantaApp::~QuantaApp()
m_newScriptStuff = 0L;
delete m_newDTEPStuff;
m_newDocStuff = 0L;
- // disconnect(m_htmlPart, SIGNAL(destroyed(QObject *)));
- // disconnect(m_htmlPartDoc, SIGNAL(destroyed(QObject *)));
- disconnect(this, SIGNAL(lastChildViewClosed()), ViewManager::ref(), SLOT(slotLastViewClosed()));
+ // disconnect(m_htmlPart, TQT_SIGNAL(destroyed(TQObject *)));
+ // disconnect(m_htmlPartDoc, TQT_SIGNAL(destroyed(TQObject *)));
+ disconnect(this, TQT_SIGNAL(lastChildViewClosed()), ViewManager::ref(), TQT_SLOT(slotLastViewClosed()));
//kdDebug(24000) << "QuantaApp::~QuantaApp" << endl;
#ifdef ENABLE_CVSSERVICE
delete CVSService::ref();
@@ -305,7 +305,7 @@ QuantaApp::~QuantaApp()
KIO::NetAccess::del(KURL().fromPathOrURL(tempDirList.at(i)->name()), this);
}
tempDirList.clear();
- QDictIterator<ToolbarEntry> iter(m_toolbarList);
+ TQDictIterator<ToolbarEntry> iter(m_toolbarList);
ToolbarEntry *p_toolbar;
for( ; iter.current(); ++iter )
{
@@ -316,17 +316,17 @@ QuantaApp::~QuantaApp()
}
m_toolbarList.clear();
- QStringList tmpDirs = KGlobal::dirs()->resourceDirs("tmp");
+ TQStringList tmpDirs = KGlobal::dirs()->resourceDirs("tmp");
tmpDir = tmpDirs[0];
for (uint i = 0; i < tmpDirs.count(); i++)
{
if (tmpDirs[i].contains("kde-"))
tmpDir = tmpDirs[i];
}
- QString infoCss = tmpDir;
+ TQString infoCss = tmpDir;
infoCss += "quanta/info.css";
- QFile::remove(infoCss);
- QDir dir;
+ TQFile::remove(infoCss);
+ TQDir dir;
dir.rmdir(tmpDir + "quanta");
delete dcopSettings;
@@ -336,9 +336,9 @@ QuantaApp::~QuantaApp()
kdDebug(24000) << "Undeleted node objects :" << NN << endl;
}
-void QuantaApp::setTitle(const QString& title)
+void QuantaApp::setTitle(const TQString& title)
{
- QString s = title;
+ TQString s = title;
if (Project::ref()->hasProject())
{
s = Project::ref()->projectName() + " : " + s;
@@ -353,8 +353,8 @@ void QuantaApp::slotFileNew()
void QuantaApp::slotFileOpen()
{
- QString myEncoding = defaultEncoding();
- QString startDir;
+ TQString myEncoding = defaultEncoding();
+ TQString startDir;
Document *w = ViewManager::ref()->activeDocument();
if (w && !w->isUntitled())
startDir = w->url().url();
@@ -367,7 +367,7 @@ void QuantaApp::slotFileOpen()
slotFileOpen(data.URLs, data.encoding);
}
-void QuantaApp::slotFileOpen(const KURL::List &urls, const QString& encoding)
+void QuantaApp::slotFileOpen(const KURL::List &urls, const TQString& encoding)
{
m_doc->blockSignals(true);
m_parserEnabled = false;
@@ -397,12 +397,12 @@ void QuantaApp::slotFileOpen(const KURL &url)
slotFileOpen(url, defaultEncoding());
}
-void QuantaApp::slotFileOpen(const KURL &url, const QString& encoding)
+void QuantaApp::slotFileOpen(const KURL &url, const TQString& encoding)
{
m_doc->openDocument(url, encoding);
}
-void QuantaApp::slotFileOpen(const KURL &url, const QString& encoding, bool readOnly)
+void QuantaApp::slotFileOpen(const KURL &url, const TQString& encoding, bool readOnly)
{
m_doc->openDocument(url, encoding, true, readOnly);
}
@@ -412,7 +412,7 @@ void QuantaApp::slotFileOpenRecent(const KURL &url)
if (!QExtFileInfo::exists(url, true, this))
{
if (KMessageBox::questionYesNo(this,
- i18n("The file %1 does not exist.\n Do you want to remove it from the list?").arg(url.prettyURL(0, KURL::StripFileProtocol)), QString::null, KStdGuiItem::del(), i18n("Keep"))
+ i18n("The file %1 does not exist.\n Do you want to remove it from the list?").arg(url.prettyURL(0, KURL::StripFileProtocol)), TQString::null, KStdGuiItem::del(), i18n("Keep"))
== KMessageBox::Yes)
{
fileRecent->removeURL(url);
@@ -465,7 +465,7 @@ bool QuantaApp::slotFileSaveAs(QuantaView *viewToSave)
}
//FIXME: in katepart changing encoding saves the original file if it was modified, so it's useless in saveas...
-// QString myEncoding = dynamic_cast<KTextEditor::EncodingInterface*>(w->doc())->encoding();
+// TQString myEncoding = dynamic_cast<KTextEditor::EncodingInterface*>(w->doc())->encoding();
bool gotPath = false;
@@ -511,7 +511,7 @@ bool QuantaApp::slotFileSaveAs(QuantaView *viewToSave)
"all/allfiles text/html text/xml application/x-php text/plain", this, i18n("Save File"));
KURL saveUrl = data.URLs[0];
bool found;
- QString encoding = KGlobal::charsets()->codecForName(data.encoding, found)->name();
+ TQString encoding = KGlobal::charsets()->codecForName(data.encoding, found)->name();
KTextEditor::EncodingInterface* encodingIf = dynamic_cast<KTextEditor::EncodingInterface*>(w->doc());
if (encodingIf && encodingIf->encoding() != encoding)
encodingIf->setEncoding(encoding);
@@ -523,12 +523,12 @@ bool QuantaApp::slotFileSaveAs(QuantaView *viewToSave)
{
oldURL = saveUrl;
if (Project::ref()->hasProject() && !Project::ref()->contains(saveUrl) &&
- KMessageBox::Yes == KMessageBox::questionYesNo(0,i18n("<qt>Do you want to add the<br><b>%1</b><br>file to project?</qt>").arg(saveUrl.prettyURL(0, KURL::StripFileProtocol)), QString::null, KStdGuiItem::add(), i18n("Do Not Add"))
+ KMessageBox::Yes == KMessageBox::questionYesNo(0,i18n("<qt>Do you want to add the<br><b>%1</b><br>file to project?</qt>").arg(saveUrl.prettyURL(0, KURL::StripFileProtocol)), TQString::null, KStdGuiItem::add(), i18n("Do Not Add"))
)
{
if (saveUrl.isLocalFile())
{
- QDir dir(saveUrl.path());
+ TQDir dir(saveUrl.path());
saveUrl.setPath(dir.canonicalPath());
}
Project::ref()->insertFile(saveUrl, true);
@@ -558,17 +558,17 @@ void QuantaApp::saveAsTemplate(bool projectTemplate, bool selectionOnly)
int query;
KURL projectTemplateURL;
w->checkDirtyStatus();
- QString localTemplateDir = locateLocal("data", resourceDir + "templates/");
+ TQString localTemplateDir = locateLocal("data", resourceDir + "templates/");
do {
query = KMessageBox::Yes;
if (projectTemplate)
{
- url = KFileDialog::getSaveURL(Project::ref()->templateURL().url(), QString::null, this);
+ url = KFileDialog::getSaveURL(Project::ref()->templateURL().url(), TQString::null, this);
} else
{
- url = KFileDialog::getSaveURL(locateLocal("data", resourceDir + "templates/"), QString::null, this);
+ url = KFileDialog::getSaveURL(locateLocal("data", resourceDir + "templates/"), TQString::null, this);
}
if (url.isEmpty()) return;
@@ -595,10 +595,10 @@ void QuantaApp::saveAsTemplate(bool projectTemplate, bool selectionOnly)
{
KTempFile *tempFile = new KTempFile(tmpDir);
tempFile->setAutoDelete(true);
- QString content;
+ TQString content;
content = w->selectionIf->selection();
- QTextStream stream(tempFile->file());
- stream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream stream(tempFile->file());
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
stream << content;
tempFile->file()->flush();
tempFile->close();
@@ -703,15 +703,15 @@ void QuantaApp::slotEditFindInFiles()
void QuantaApp::slotHelpTip()
{
- KTipDialog::showTip(this, QString::null, true);
+ KTipDialog::showTip(this, TQString::null, true);
}
-void QuantaApp::slotStatusMsg(const QString &msg)
+void QuantaApp::slotStatusMsg(const TQString &msg)
{
statusbarTimer->stop();
statusBar()->changeItem(" " + KStringHandler::cPixelSqueeze(msg, statusBar()->fontMetrics(), progressBar->x() - 20), IDS_STATUS);
statusBar()->repaint();
- kapp->processEvents(QEventLoop::ExcludeUserInput | QEventLoop::ExcludeSocketNotifiers);
+ kapp->processEvents(TQEventLoop::ExcludeUserInput | TQEventLoop::ExcludeSocketNotifiers);
statusbarTimer->start(10000, true);
}
@@ -733,14 +733,14 @@ void QuantaApp::slotRepaintPreview()
KParts::BrowserExtension *browserExtension = KParts::BrowserExtension::childObject(m_htmlPart);
KParts::URLArgs args(true, browserExtension->xOffset(), browserExtension->yOffset());
browserExtension->setURLArgs( args );
- QString encoding = defaultEncoding();
+ TQString encoding = defaultEncoding();
KTextEditor::EncodingInterface* encodingIf = dynamic_cast<KTextEditor::EncodingInterface*>(w->doc());
if (encodingIf)
encoding = encodingIf->encoding();
KURL url;
m_htmlPart->setEncoding(encoding, true);
- QStringList list;
+ TQStringList list;
if (m_noFramesPreview)
{
list = w->tagAreas("frameset", true, true);
@@ -749,19 +749,19 @@ void QuantaApp::slotRepaintPreview()
else
{
m_htmlPart->closeURL();
- QStringList noframearea = w->tagAreas("noframes", false, true);
+ TQStringList noframearea = w->tagAreas("noframes", false, true);
//find the frameset area
int bl, bc, el, ec;
- QStringList l = QStringList::split('\n', list[0], true);
- QStringList coordList = QStringList::split(',', l[0], true);
+ TQStringList l = TQStringList::split('\n', list[0], true);
+ TQStringList coordList = TQStringList::split(',', l[0], true);
bl = coordList[0].toInt();
bc = coordList[1].toInt();
el = coordList[2].toInt();
ec = coordList[3].toInt();
- QString noFramesText = w->text(0,0, bl, bc - 1);
+ TQString noFramesText = w->text(0,0, bl, bc - 1);
noFramesText += noframearea[0];
noFramesText += w->text(el, ec + 1, w->editIf->numLines() - 1, w->editIf->lineLength(w->editIf->numLines() - 1));
- noFramesText.replace(QRegExp("</?noframes[^>]*>", false), "");
+ noFramesText.replace(TQRegExp("</?noframes[^>]*>", false), "");
//kdDebug(24000) << "NOFRAMES: " << noFramesText << endl;
if (w->isUntitled())
m_htmlPart->begin(Project::ref()->projectBaseURL(), xOffset, yOffset);
@@ -779,7 +779,7 @@ void QuantaApp::slotRepaintPreview()
if (!m_noFramesPreview)
{
m_htmlPart->closeURL();
- QString text = w->editIf->text();
+ TQString text = w->editIf->text();
if (text.isEmpty())
{
text = i18n("<center><h3>The current document is empty...</h3></center>");
@@ -798,15 +798,15 @@ void QuantaApp::slotRepaintPreview()
previewURL.setFileName("preview-" + previewURL.fileName());
//save the content to disk, so preview with prefix works
KTempFile *tmpFile = new KTempFile(tmpDir);
- QString tempFileName = QFileInfo(*(tmpFile->file())).filePath();
+ TQString tempFileName = TQFileInfo(*(tmpFile->file())).filePath();
tmpFile->setAutoDelete(true);
- QString encoding = quantaApp->defaultEncoding();
+ TQString encoding = quantaApp->defaultEncoding();
KTextEditor::EncodingInterface* encodingIf = dynamic_cast<KTextEditor::EncodingInterface*>(w->doc());
if (encodingIf)
encoding = encodingIf->encoding();
if (encoding.isEmpty())
encoding = "utf8"; //final fallback
- tmpFile->textStream()->setCodec(QTextCodec::codecForName(encoding));
+ tmpFile->textStream()->setCodec(TQTextCodec::codecForName(encoding));
*(tmpFile->textStream()) << w->editIf->text();
tmpFile->close();
if (!QExtFileInfo::copy(KURL::fromPathOrURL(tempFileName), previewURL, -1, true)) {
@@ -835,7 +835,7 @@ void QuantaApp::slotImageOpen(const KURL& url)
{
slotShowPreviewWidget(true);
WHTMLPart *part = m_htmlPart;
- QString text = "<html>\n<body>\n<div align=\"center\">\n<img src=\"";
+ TQString text = "<html>\n<body>\n<div align=\"center\">\n<img src=\"";
text += url.fileName(); //TODO
text += "\">\n</div>\n</body>\n</html>\n";
part->closeURL();
@@ -865,7 +865,7 @@ void QuantaApp::slotInsertTag(const KURL& url, DirInfo dirInfo)
baseURL.setFileName("");
}
KURL relURL = QExtFileInfo::toRelative(url, baseURL);
- QString urlStr = relURL.url();
+ TQString urlStr = relURL.url();
if (relURL.protocol() == baseURL.protocol())
urlStr = relURL.path();
bool isImage = false;
@@ -875,18 +875,18 @@ void QuantaApp::slotInsertTag(const KURL& url, DirInfo dirInfo)
w->insertTag(dirInfo.preText+urlStr+dirInfo.postText);
} else
{
- QString mimetype = KMimeType::findByURL(url)->name();
+ TQString mimetype = KMimeType::findByURL(url)->name();
if (mimetype.contains("image"))
{
- QString imgFileName;
+ TQString imgFileName;
KIO::NetAccess::download(url, imgFileName, this);
- QImage img(imgFileName);
+ TQImage img(imgFileName);
if (!img.isNull())
{
- QString width,height;
+ TQString width,height;
width.setNum(img.width());
height.setNum(img.height());
- QString imgTag = QuantaCommon::tagCase("<img ");
+ TQString imgTag = QuantaCommon::tagCase("<img ");
imgTag += QuantaCommon::attrCase("src=");
imgTag += QuantaCommon::quoteAttributeValue(urlStr);
imgTag += QuantaCommon::attrCase(" width=");
@@ -904,7 +904,7 @@ void QuantaApp::slotInsertTag(const KURL& url, DirInfo dirInfo)
}
if (!isImage)
{
- QString tag = QuantaCommon::tagCase("<a ");
+ TQString tag = QuantaCommon::tagCase("<a ");
tag += QuantaCommon::attrCase("href=");
tag += QuantaCommon::quoteAttributeValue(urlStr);
tag += ">";
@@ -955,14 +955,14 @@ void QuantaApp::slotOptionsConfigureKeys()
{
Document *w = ViewManager::ref()->activeDocument();
KKeyDialog dlg( false, this );
- QPtrList<KXMLGUIClient> toolbarGuiClients;
- QDictIterator<ToolbarEntry> iter(m_toolbarList);
+ TQPtrList<KXMLGUIClient> toolbarGuiClients;
+ TQDictIterator<ToolbarEntry> iter(m_toolbarList);
for( ; iter.current(); ++iter )
{
toolbarGuiClients.append(iter.current()->guiClient);
}
- QPtrList<KXMLGUIClient> clients = guiFactory()->clients();
- for( QPtrListIterator<KXMLGUIClient> it( clients );
+ TQPtrList<KXMLGUIClient> clients = guiFactory()->clients();
+ for( TQPtrListIterator<KXMLGUIClient> it( clients );
it.current(); ++it )
{
if (toolbarGuiClients.contains(*it) <= 0) //no need to insert the collections of the toolbars as they are present in the main actionCollection
@@ -972,9 +972,9 @@ void QuantaApp::slotOptionsConfigureKeys()
{
// this is needed for when we have multiple embedded kateparts and change one of them.
// it also needs to be done to their views, as they too have actioncollections to update
- if (const QPtrList<KParts::Part> * partlist = m_partManager->parts())
+ if (const TQPtrList<KParts::Part> * partlist = m_partManager->parts())
{
- QPtrListIterator<KParts::Part> it(*partlist);
+ TQPtrListIterator<KParts::Part> it(*partlist);
while (KParts::Part* part = it.current())
{
if (KTextEditor::Document *doc = dynamic_cast<KTextEditor::Document*>(part))
@@ -990,8 +990,8 @@ void QuantaApp::slotOptionsConfigureKeys()
}
doc->reloadXML();
- QPtrList<KTextEditor::View> const & list = doc->views();
- QPtrListIterator<KTextEditor::View> itt( list );
+ TQPtrList<KTextEditor::View> const & list = doc->views();
+ TQPtrListIterator<KTextEditor::View> itt( list );
while (KTextEditor::View * view = itt.current())
{
if (!w || w->view() != view)
@@ -1010,10 +1010,10 @@ void QuantaApp::slotOptionsConfigureKeys()
}
}
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent(KXMLGUIFactory::readConfigFile(xmlFile(), instance()));
- QDomNodeList nodeList = doc.elementsByTagName("ActionProperties");
- QDomNode node = nodeList.item(0).firstChild();
+ TQDomNodeList nodeList = doc.elementsByTagName("ActionProperties");
+ TQDomNode node = nodeList.item(0).firstChild();
while (!node.isNull())
{
if (node.nodeName() == "Action")
@@ -1022,7 +1022,7 @@ void QuantaApp::slotOptionsConfigureKeys()
if (action)
{
action->setModified(true);
- QDomElement el = action->data();
+ TQDomElement el = action->data();
el.setAttribute("shortcut", action->shortcut().toString());
el = node.toElement();
node = node.nextSibling();
@@ -1036,10 +1036,10 @@ void QuantaApp::slotOptionsConfigureKeys()
}
}
-void QuantaApp::slotConfigureToolbars(const QString& defaultToolbar)
+void QuantaApp::slotConfigureToolbars(const TQString& defaultToolbar)
{
currentPageIndex = ToolbarTabWidget::ref()->currentPageIndex();
- QDomNodeList nodeList;
+ TQDomNodeList nodeList;
ToolbarEntry *p_toolbar = 0L;
saveMainWindowSettings(KGlobal::config(), autoSaveGroup());
@@ -1065,7 +1065,7 @@ void QuantaApp::slotConfigureToolbars(const QString& defaultToolbar)
}
}
ToolbarTabWidget *tb = ToolbarTabWidget::ref();
- QString toolbarId;
+ TQString toolbarId;
for (int i = 0; i < tb->count(); i++)
{
toolbarId = tb->id(i);
@@ -1077,12 +1077,12 @@ void QuantaApp::slotConfigureToolbars(const QString& defaultToolbar)
}
}
- connect(dlg, SIGNAL(newToolbarConfig()), SLOT(slotNewToolbarConfig()));
+ connect(dlg, TQT_SIGNAL(newToolbarConfig()), TQT_SLOT(slotNewToolbarConfig()));
dlg->exec();
delete dlg;
- QPopupMenu *menu = 0L;
- m_tagsMenu = static_cast<QPopupMenu*>(factory()->container("tags", this));
- QString toolbarName;
+ TQPopupMenu *menu = 0L;
+ m_tagsMenu = static_cast<TQPopupMenu*>(factory()->container("tags", this));
+ TQString toolbarName;
for (int i = 0; i < tb->count(); i++)
{
toolbarName = tb->label(i);
@@ -1090,7 +1090,7 @@ void QuantaApp::slotConfigureToolbars(const QString& defaultToolbar)
p_toolbar = quantaApp->m_toolbarList[toolbarId];
if (p_toolbar)
{
- menu = new QPopupMenu(m_tagsMenu);
+ menu = new TQPopupMenu(m_tagsMenu);
nodeList = p_toolbar->guiClient->domDocument().elementsByTagName("Action");
for (uint i = 0; i < nodeList.count(); i++)
{
@@ -1105,7 +1105,7 @@ void QuantaApp::slotConfigureToolbars(const QString& defaultToolbar)
}
//add back the menus
- m_pluginInterface->setPluginMenu(static_cast<QPopupMenu*>(factory()->container("plugins", this)));
+ m_pluginInterface->setPluginMenu(static_cast<TQPopupMenu*>(factory()->container("plugins", this)));
m_pluginInterface->buildPluginMenu();
for (uint i = 0 ; i < mb->count(); i++)
{
@@ -1161,8 +1161,8 @@ void QuantaApp::slotOptions()
KDialogBase::Ok, this, "tabdialog");
// Tag Style options
- QVBox *page=kd->addVBoxPage(i18n("Tag Style"), QString::null, BarIcon("kwrite", KIcon::SizeMedium));
- StyleOptionsS *styleOptionsS = new StyleOptionsS( (QWidget *)page);
+ TQVBox *page=kd->addVBoxPage(i18n("Tag Style"), TQString::null, BarIcon("kwrite", KIcon::SizeMedium));
+ StyleOptionsS *styleOptionsS = new StyleOptionsS( (TQWidget *)page);
styleOptionsS->tagCase->setCurrentItem( qConfig.tagCase);
styleOptionsS->attributeCase->setCurrentItem( qConfig.attrCase);
@@ -1175,8 +1175,8 @@ void QuantaApp::slotOptions()
// Environment options
//TODO FileMasks name is not good anymore
- page=kd->addVBoxPage(i18n("Environment"), QString::null, UserIcon("files", KIcon::SizeMedium ) );
- FileMasks *fileMasks = new FileMasks((QWidget *)page);
+ page=kd->addVBoxPage(i18n("Environment"), TQString::null, UserIcon("files", KIcon::SizeMedium ) );
+ FileMasks *fileMasks = new FileMasks((TQWidget *)page);
fileMasks->lineMarkup->setText( qConfig.markupMimeTypes );
fileMasks->lineScript->setText( qConfig.scriptMimeTypes );
@@ -1191,9 +1191,9 @@ void QuantaApp::slotOptions()
fileMasks->sbAutoSave->setValue(m_config->readNumEntry("Autosave interval"));
//else default value 15
- QStringList availableEncodingNames(KGlobal::charsets()->availableEncodingNames());
+ TQStringList availableEncodingNames(KGlobal::charsets()->availableEncodingNames());
fileMasks->encodingCombo->insertStringList( availableEncodingNames );
- QStringList::ConstIterator iter;
+ TQStringList::ConstIterator iter;
int iIndex = -1;
for (iter = availableEncodingNames.begin(); iter != availableEncodingNames.end(); ++iter)
{
@@ -1204,7 +1204,7 @@ void QuantaApp::slotOptions()
break;
}
}
- QStringList lst = DTDs::ref()->nickNameList(true);
+ TQStringList lst = DTDs::ref()->nickNameList(true);
uint pos = 0;
for (uint i = 0; i < lst.count(); i++)
{
@@ -1215,8 +1215,8 @@ void QuantaApp::slotOptions()
fileMasks->defaultDTDCombo->setCurrentItem(pos);
// Preview options
- page=kd->addVBoxPage(i18n("User Interface"), QString::null, BarIcon("view_choose", KIcon::SizeMedium ) );
- PreviewOptions *uiOptions = new PreviewOptions( (QWidget *)page );
+ page=kd->addVBoxPage(i18n("User Interface"), TQString::null, BarIcon("view_choose", KIcon::SizeMedium ) );
+ PreviewOptions *uiOptions = new PreviewOptions( (TQWidget *)page );
uiOptions->setPosition(qConfig.previewPosition);
uiOptions->setDocPosition(qConfig.docPosition);
@@ -1238,11 +1238,11 @@ void QuantaApp::slotOptions()
uiOptions->warnEventActions->setChecked(true);
}
//kafka options
- page = kd->addVBoxPage(i18n("VPL View"), QString::null, UserIcon("vpl_text", KIcon::SizeMedium));
- KafkaSyncOptions *kafkaOptions = new KafkaSyncOptions( m_config, (QWidget *)page );
+ page = kd->addVBoxPage(i18n("VPL View"), TQString::null, UserIcon("vpl_text", KIcon::SizeMedium));
+ KafkaSyncOptions *kafkaOptions = new KafkaSyncOptions( m_config, (TQWidget *)page );
- page=kd->addVBoxPage(i18n("Parser"), QString::null, BarIcon("kcmsystem", KIcon::SizeMedium ) );
- ParserOptions *parserOptions = new ParserOptions( m_config, (QWidget *)page );
+ page=kd->addVBoxPage(i18n("Parser"), TQString::null, BarIcon("kcmsystem", KIcon::SizeMedium ) );
+ ParserOptions *parserOptions = new ParserOptions( m_config, (TQWidget *)page );
parserOptions->refreshFrequency->setValue(qConfig.refreshFrequency);
parserOptions->instantUpdate->setChecked(qConfig.instantUpdate);
@@ -1250,8 +1250,8 @@ void QuantaApp::slotOptions()
parserOptions->showClosingTags->setChecked(qConfig.showClosingTags);
parserOptions->spinExpand->setValue(qConfig.expandLevel);
- page = kd->addVBoxPage(i18n("Abbreviations"), QString::null, BarIcon("fontsizeup", KIcon::SizeMedium));
- AbbreviationDlg *abbreviationOptions = new AbbreviationDlg((QWidget*)(page));
+ page = kd->addVBoxPage(i18n("Abbreviations"), TQString::null, BarIcon("fontsizeup", KIcon::SizeMedium));
+ AbbreviationDlg *abbreviationOptions = new AbbreviationDlg((TQWidget*)(page));
bool reloadTrees = false;
kd->adjustSize();
@@ -1282,7 +1282,7 @@ void QuantaApp::slotOptions()
m_config->writeEntry("Reload Files", fileMasks->reloadFiles->isChecked());
qConfig.defaultEncoding = fileMasks->encodingCombo->currentText();
- QString tmpStr = uiOptions->closeButtons();
+ TQString tmpStr = uiOptions->closeButtons();
if (tmpStr != qConfig.showCloseButtons)
uiRebuildNeeded = true;
qConfig.showCloseButtons = tmpStr;
@@ -1379,14 +1379,14 @@ void QuantaApp::slotShowPreviewWidget(bool show)
{
delete m_previewToolView;
m_previewToolView = 0L;
- view->addCustomWidget(m_htmlPart->view(), QString::null);
+ view->addCustomWidget(m_htmlPart->view(), TQString::null);
} else
{
if (!m_previewToolView)
{
m_previewToolView= addToolWindow(m_htmlPart->view(), prevDockPosition(m_htmlPart->view(), KDockWidget::DockBottom), getMainDockWidget());
- connect(m_previewToolView->wrapperWidget(), SIGNAL(iMBeingClosed
-()), this, SLOT(slotPreviewBeingClosed()));
+ connect(m_previewToolView->wrapperWidget(), TQT_SIGNAL(iMBeingClosed
+()), this, TQT_SLOT(slotPreviewBeingClosed()));
}
m_htmlPart->view()->show();
m_previewToolView->show();
@@ -1397,12 +1397,12 @@ void QuantaApp::slotShowPreviewWidget(bool show)
{
m_noFramesPreview = false;
m_previewVisible = false;
- m_htmlPart->view()->reparent(this, 0, QPoint(), false);
+ m_htmlPart->view()->reparent(this, 0, TQPoint(), false);
m_htmlPart->view()->resize(0, 0);
m_htmlPart->view()->hide();
if (qConfig.previewPosition == "Editor")
{
- view->addCustomWidget(0L, QString::null);
+ view->addCustomWidget(0L, TQString::null);
delete m_previewToolView;
m_previewToolView = 0L;
} else
@@ -1504,25 +1504,25 @@ void QuantaApp::slotShowNoFramesPreview()
}
-void QuantaApp::newCursorPosition(const QString &file, int lineNumber, int columnNumber)
+void QuantaApp::newCursorPosition(const TQString &file, int lineNumber, int columnNumber)
{
Q_UNUSED(file);
typingInProgress = true;
startIdleTimer();
// updateTreeViews();
- QString linenumber;
+ TQString linenumber;
linenumber = i18n("Line: %1 Col: %2").arg(lineNumber).arg(columnNumber);
statusBar()->changeItem(linenumber, IDS_STATUS_CLM);
statusBar()->changeItem(i18n(" R/O "),IDS_INS_OVR);
statusBar()->changeItem("",IDS_MODIFIED);
}
-void QuantaApp::newDebuggerPosition(const QString &file, int lineNumber)
+void QuantaApp::newDebuggerPosition(const TQString &file, int lineNumber)
{
newCursorPosition(file, lineNumber, 0);
}
-void QuantaApp::openFile(const QString &file, int lineNumber, int columnNumber)
+void QuantaApp::openFile(const TQString &file, int lineNumber, int columnNumber)
{
gotoFileAndLine(file, lineNumber, columnNumber);
slotNewStatus();
@@ -1533,7 +1533,7 @@ void QuantaApp::slotNewLineColumn()
typingInProgress = true;
startIdleTimer();
// updateTreeViews();
- QString linenumber;
+ TQString linenumber;
oldCursorLine = cursorLine;
oldCursorCol = cursorCol;
Document *w = ViewManager::ref()->activeDocument();
@@ -1648,7 +1648,7 @@ void QuantaApp::setCursorPosition( int row, int col )
}
}
-void QuantaApp::gotoFileAndLine(const QString& filename, int line, int column)
+void QuantaApp::gotoFileAndLine(const TQString& filename, int line, int column)
{
// First, check if we're already showing this file
Document *w = ViewManager::ref()->activeDocument();
@@ -1707,7 +1707,7 @@ void QuantaApp::selectArea(int line1, int col1, int line2, int col2)
}
}
-void QuantaApp::openDoc(const QString& url)
+void QuantaApp::openDoc(const TQString& url)
{
if (qConfig.docPosition == "Tab")
{
@@ -1727,7 +1727,7 @@ void QuantaApp::openDoc(const QString& url)
}
m_htmlPartDoc->view()->setFocus(); // activates the part
- QString urlStr = url;
+ TQString urlStr = url;
if (urlStr.startsWith("/"))
urlStr.prepend("file:");
KURL u(urlStr);
@@ -1745,7 +1745,7 @@ void QuantaApp::slotContextHelp()
Document *w = ViewManager::ref()->activeDocument();
if (w)
{
- QString currentWord = "";
+ TQString currentWord = "";
parser->setSAParserEnabled(false);
reparse(true);
parser->setSAParserEnabled(true);
@@ -1760,7 +1760,7 @@ void QuantaApp::slotContextHelp()
currentWord = w->currentWord();
}
const DTDStruct *dtd = w->currentDTD(true);
- QString *url = dTab->contextHelp(dtd->documentation + "|" + currentWord);
+ TQString *url = dTab->contextHelp(dtd->documentation + "|" + currentWord);
if (url)
openDoc(*url);
}
@@ -1781,26 +1781,26 @@ void QuantaApp::slotShowAnnotationView()
makeDockVisible(dynamic_cast<KDockWidget*>(m_annotationOutputView->wrapperWidget()));
}
-QWidget* QuantaApp::createContainer( QWidget *parent, int index, const QDomElement &element, int &id )
+TQWidget* QuantaApp::createContainer( TQWidget *parent, int index, const TQDomElement &element, int &id )
{
- QString tabname = element.attribute( "i18ntabname", "" );
- QString idStr = element.attribute( "id", "" );
+ TQString tabname = element.attribute( "i18ntabname", "" );
+ TQString idStr = element.attribute( "id", "" );
if ( element.tagName().lower() == "toolbar" && !tabname.isEmpty())
{
-//avoid QToolBar warning in the log
+//avoid TQToolBar warning in the log
QtMsgHandler oldHandler = qInstallMsgHandler( silenceQToolBar );
ToolbarTabWidget *toolbarTab = ToolbarTabWidget::ref();
- QWidget *w = new QWidget(toolbarTab, "ToolbarHoldingWidget" + element.attribute("name"));
+ TQWidget *w = new TQWidget(toolbarTab, "ToolbarHoldingWidget" + element.attribute("name"));
QuantaToolBar *tb = new QuantaToolBar(w, element.attribute("name"), true, true);
tb->loadState(element);
- tb->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum);
+ tb->setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Minimum);
//kdDebug(24000) << "tb->iconSize() " << tb->iconSize() << endl;
if (toolbarTab->iconText() == KToolBar::IconTextBottom)
{
- tb->setGeometry(0,0, toolbarTab->width(), tb->iconSize() + QFontMetrics(KGlobalSettings::toolBarFont()).height() + 10);
+ tb->setGeometry(0,0, toolbarTab->width(), tb->iconSize() + TQFontMetrics(KGlobalSettings::toolBarFont()).height() + 10);
toolbarTab->setFixedHeight(toolbarTab->tabHeight() + tb->height() + 3);
} else
{
@@ -1815,10 +1815,10 @@ QWidget* QuantaApp::createContainer( QWidget *parent, int index, const QDomEleme
toolbarTab->insertTab(tb, tabname, idStr);
qInstallMsgHandler( oldHandler );
- connect(tb, SIGNAL(removeAction(const QString&, const QString&)),
- SLOT(slotRemoveAction(const QString&, const QString&)));
- connect(tb, SIGNAL(editAction(const QString&)),
- SLOT(slotEditAction(const QString&)));
+ connect(tb, TQT_SIGNAL(removeAction(const TQString&, const TQString&)),
+ TQT_SLOT(slotRemoveAction(const TQString&, const TQString&)));
+ connect(tb, TQT_SIGNAL(editAction(const TQString&)),
+ TQT_SLOT(slotEditAction(const TQString&)));
return tb;
}
@@ -1826,7 +1826,7 @@ QWidget* QuantaApp::createContainer( QWidget *parent, int index, const QDomEleme
}
-void QuantaApp::removeContainer( QWidget *container, QWidget *parent, QDomElement &element, int id )
+void QuantaApp::removeContainer( TQWidget *container, TQWidget *parent, TQDomElement &element, int id )
{
if (dynamic_cast<QuantaToolBar*>(container))
{
@@ -1880,11 +1880,11 @@ void QuantaApp::slotContextMenuAboutToShow()
Document *w = ViewManager::ref()->activeDocument();
if (w)
{
- QPopupMenu *popup = static_cast<QPopupMenu*>(factory()->container("popup_editor",this));
- QString name;
+ TQPopupMenu *popup = static_cast<TQPopupMenu*>(factory()->container("popup_editor",this));
+ TQString name;
uint line, col;
int bl, bc, el, ec;
- QString tagStr;
+ TQString tagStr;
w->viewCursorIf->cursorPositionReal(&line, &col);
Node *node = parser->nodeAt(line, col, false);
if (node)
@@ -1907,10 +1907,10 @@ void QuantaApp::slotContextMenuAboutToShow()
pos = group.definitionRx.search(node->tag->cleanStr, pos);
if (pos != -1)
{
- QString cleanName = node->tag->cleanStr.mid(pos, group.definitionRx.matchedLength());
+ TQString cleanName = node->tag->cleanStr.mid(pos, group.definitionRx.matchedLength());
name = tagStr.mid(pos, group.definitionRx.matchedLength());
node->tag->beginPos(bl, bc);
- QString tmpStr = tagStr.left(pos);
+ TQString tmpStr = tagStr.left(pos);
int newLines = tmpStr.contains('\n');
bl += newLines;
int l = tmpStr.findRev('\n'); //the last EOL
@@ -1942,7 +1942,7 @@ void QuantaApp::slotContextMenuAboutToShow()
}
} else
{
- QMap<QString, XMLStructGroup>::ConstIterator it = node->tag->dtd()->xmlStructTreeGroups.find(node->tag->name.lower());
+ TQMap<TQString, XMLStructGroup>::ConstIterator it = node->tag->dtd()->xmlStructTreeGroups.find(node->tag->name.lower());
if (it != node->tag->dtd()->xmlStructTreeGroups.constEnd())
{
@@ -1986,7 +1986,7 @@ void QuantaApp::slotContextMenuAboutToShow()
if(debugger() && debugger()->hasClient())
{
int startpos;
- QString word;
+ TQString word;
// If we have a selection made, thats what we want to use for watching, setting etc
if (w->selectionIf && w->selectionIf->hasSelection())
@@ -1997,13 +1997,13 @@ void QuantaApp::slotContextMenuAboutToShow()
{
// Otherwise, find the word under the cursor
word = w->editIf->textLine(w->viewCursorIf->cursorLine());
- startpos = word.findRev(QRegExp("$|[^a-zA-Z0-9_]"), w->viewCursorIf->cursorColumn());
+ startpos = word.findRev(TQRegExp("$|[^a-zA-Z0-9_]"), w->viewCursorIf->cursorColumn());
word.remove(0, startpos);
if(word.left(1) != "$")
word.remove(0, 1);
- word = word.left(word.find(QRegExp("[^a-zA-Z0-9_]"), 1));
+ word = word.left(word.find(TQRegExp("[^a-zA-Z0-9_]"), 1));
}
// If we have a linebreak, take everything before the break
startpos = word.find("\n");
@@ -2095,7 +2095,7 @@ void QuantaApp::slotOpenFileUnderCursor()
/** Load an user toolbar file from the disk. */
void QuantaApp::slotLoadToolbarFile(const KURL& url)
{
- QDictIterator<ToolbarEntry> it(m_toolbarList);
+ TQDictIterator<ToolbarEntry> it(m_toolbarList);
ToolbarEntry *p_toolbar;
while (it.current())
{
@@ -2104,31 +2104,31 @@ void QuantaApp::slotLoadToolbarFile(const KURL& url)
if (url == p_toolbar->url)
return;
}
- QDomDocument actionDom;
+ TQDomDocument actionDom;
- QTextStream str;
- str.setEncoding(QTextStream::UnicodeUTF8);
- QString fileName = url.path();
+ TQTextStream str;
+ str.setEncoding(TQTextStream::UnicodeUTF8);
+ TQString fileName = url.path();
if ( url.fileName().endsWith(toolbarExtension) )
{
- QDomDocument *toolbarDom = new QDomDocument();
+ TQDomDocument *toolbarDom = new TQDomDocument();
//extract the files from the archives
KTar tar(fileName);
if (tar.open(IO_ReadOnly))
{
- QString base = QFileInfo(fileName).baseName();
+ TQString base = TQFileInfo(fileName).baseName();
KArchiveFile* file = (KArchiveFile *) tar.directory()->entry(base+".toolbar");
if (file)
{
- QIODevice *device = file->device();
+ TQIODevice *device = file->device();
toolbarDom->setContent(device);
delete device;
}
file = (KArchiveFile *) tar.directory()->entry(base+".actions");
if (file)
{
- QIODevice *device = file->device();
+ TQIODevice *device = file->device();
actionDom.setContent(device);
delete device;
}
@@ -2142,14 +2142,14 @@ void QuantaApp::slotLoadToolbarFile(const KURL& url)
return;
}
- QDomNodeList nodeList = toolbarDom->elementsByTagName("ToolBar");
- QString name = nodeList.item(0).cloneNode().toElement().attribute("tabname");
+ TQDomNodeList nodeList = toolbarDom->elementsByTagName("ToolBar");
+ TQString name = nodeList.item(0).cloneNode().toElement().attribute("tabname");
//search for another toolbar with the same name
- QPtrList<KXMLGUIClient> xml_clients = guiFactory()->clients();
- QString newName = name;
- QString i18nName = i18n(name.utf8());
- QString origName = name;
+ TQPtrList<KXMLGUIClient> xml_clients = guiFactory()->clients();
+ TQString newName = name;
+ TQString i18nName = i18n(name.utf8());
+ TQString origName = name;
bool found = false;
bool nameModified = false;
int count = 2;
@@ -2166,8 +2166,8 @@ void QuantaApp::slotLoadToolbarFile(const KURL& url)
{
if ((nodeList.item(i).cloneNode().toElement().attribute("name").lower() ) == name.lower())
{
- newName = origName + QString(" (%1)").arg(count);
- i18nName = i18n(origName.utf8()) + QString(" (%1)").arg(count);
+ newName = origName + TQString(" (%1)").arg(count);
+ i18nName = i18n(origName.utf8()) + TQString(" (%1)").arg(count);
nameModified = true;
count++;
found = true;
@@ -2187,19 +2187,19 @@ void QuantaApp::slotLoadToolbarFile(const KURL& url)
p_toolbar = new ToolbarEntry;
- QDomDocument *dom = new QDomDocument();
+ TQDomDocument *dom = new TQDomDocument();
dom->setContent(toolbarDom->toString());
p_toolbar->dom = dom;
p_toolbar->nameModified = nameModified;
- QString s = i18nName.lower();
- QString toolbarId = s;
- QRegExp rx("\\s|\\.");
+ TQString s = i18nName.lower();
+ TQString toolbarId = s;
+ TQRegExp rx("\\s|\\.");
toolbarId.replace(rx, "_");
int n = 1;
while (m_toolbarList.find(toolbarId) != 0L)
{
- toolbarId = s + QString("%1").arg(n);
+ toolbarId = s + TQString("%1").arg(n);
toolbarId.replace(rx, "_");
n++;
}
@@ -2212,14 +2212,14 @@ void QuantaApp::slotLoadToolbarFile(const KURL& url)
tempFile->setAutoDelete(true);
nodeList = toolbarDom->elementsByTagName("ToolBar");
- QDomElement el = nodeList.item(0).toElement();
+ TQDomElement el = nodeList.item(0).toElement();
el.setAttribute("name", name.lower());
el.setAttribute("tabname", name);
el.setAttribute("i18ntabname", i18nName);
el.setAttribute("id", toolbarId);
nodeList = toolbarDom->elementsByTagName("text");
el.firstChild().setNodeValue(name);
- tempFile->textStream()->setEncoding(QTextStream::UnicodeUTF8);
+ tempFile->textStream()->setEncoding(TQTextStream::UnicodeUTF8);
* (tempFile->textStream()) << toolbarDom->toString();
tempFile->close();
@@ -2230,9 +2230,9 @@ void QuantaApp::slotLoadToolbarFile(const KURL& url)
nodeList = actionDom.elementsByTagName("action");
for (uint i = 0; i < nodeList.count(); i++)
{
- QDomNode node = nodeList.item(i).cloneNode();
+ TQDomNode node = nodeList.item(i).cloneNode();
el = node.toElement();
- QString actionName = el.attribute("name");
+ TQString actionName = el.attribute("name");
//if there is no such action yet, add to the available actions
if (!actionCollection()->action(actionName))
{
@@ -2241,7 +2241,7 @@ void QuantaApp::slotLoadToolbarFile(const KURL& url)
m_tagActions.append(tagAction);
//add the actions to every toolbar xmlguiclient
- QDictIterator<ToolbarEntry> it(m_toolbarList);
+ TQDictIterator<ToolbarEntry> it(m_toolbarList);
while (it.current())
{
it.current()->guiClient->actionCollection()->insert(tagAction);
@@ -2272,7 +2272,7 @@ void QuantaApp::slotLoadToolbarFile(const KURL& url)
guiFactory()->addClient(toolbarGUI);
//Plug in the actions & build the menu
- QPopupMenu *menu = new QPopupMenu;
+ TQPopupMenu *menu = new QPopupMenu;
KAction *action;
nodeList = toolbarGUI->domDocument().elementsByTagName("Action");
for (uint i = 0; i < nodeList.count(); i++)
@@ -2317,8 +2317,8 @@ void QuantaApp::showToolbarFile(const KURL &url)
}
} else
{
- QDomNodeList nodeList;
- QPopupMenu *menu = new QPopupMenu;
+ TQDomNodeList nodeList;
+ TQPopupMenu *menu = new QPopupMenu;
KAction *action;
KActionCollection *ac = actionCollection();
nodeList = p_toolbar->guiClient->domDocument().elementsByTagName("Action");
@@ -2360,7 +2360,7 @@ void QuantaApp::slotLoadGlobalToolbar()
}
}
-KURL QuantaApp::saveToolbarToFile(const QString& toolbarName, const KURL& destFile)
+KURL QuantaApp::saveToolbarToFile(const TQString& toolbarName, const KURL& destFile)
{
KURL tarFile = destFile;
@@ -2369,24 +2369,24 @@ KURL QuantaApp::saveToolbarToFile(const QString& toolbarName, const KURL& destFi
tarFile.setFileName(destFile.fileName() + toolbarExtension);
}
- QBuffer buffer;
+ TQBuffer buffer;
buffer.open(IO_ReadWrite);
- QString toolStr;
- QTextStream toolStream(&toolStr, IO_ReadWrite);
- toolStream.setEncoding(QTextStream::UnicodeUTF8);
+ TQString toolStr;
+ TQTextStream toolStream(&toolStr, IO_ReadWrite);
+ toolStream.setEncoding(TQTextStream::UnicodeUTF8);
- QBuffer buffer2;
+ TQBuffer buffer2;
buffer2.open(IO_WriteOnly);
- QTextStream actStr(&buffer2);
- actStr.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream actStr(&buffer2);
+ actStr.setEncoding(TQTextStream::UnicodeUTF8);
- QDomNodeList nodeList, nodeList2;
+ TQDomNodeList nodeList, nodeList2;
toolStream << "<!DOCTYPE kpartgui SYSTEM \"kpartgui.dtd\">\n<kpartgui name=\"quanta\" version=\"2\">\n";
- actStr << QString("<!DOCTYPE actionsconfig>\n<actions>\n");
+ actStr << TQString("<!DOCTYPE actionsconfig>\n<actions>\n");
//look up the clients
- QPtrList<KXMLGUIClient> xml_clients = factory()->clients();
+ TQPtrList<KXMLGUIClient> xml_clients = factory()->clients();
for (uint index = 0; index < xml_clients.count(); index++)
{
nodeList = xml_clients.at(index)->domDocument().elementsByTagName("ToolBar");
@@ -2397,10 +2397,10 @@ KURL QuantaApp::saveToolbarToFile(const QString& toolbarName, const KURL& destFi
{
//find the actions registered to the toolbar
- QDomNode n = nodeList.item(i).firstChild();
+ TQDomNode n = nodeList.item(i).firstChild();
while (! n.isNull())
{
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if (e.tagName() == "Action")
{
TagAction *action = dynamic_cast<TagAction*>(actionCollection()->action(e.attribute("name")));
@@ -2416,9 +2416,9 @@ KURL QuantaApp::saveToolbarToFile(const QString& toolbarName, const KURL& destFi
}
n = n.nextSibling();
}
- QDomElement e = nodeList.item(0).toElement();
- QString i18nName = e.attribute("i18ntabname");
- QString id = e.attribute("id");
+ TQDomElement e = nodeList.item(0).toElement();
+ TQString i18nName = e.attribute("i18ntabname");
+ TQString id = e.attribute("id");
e.removeAttribute("i18ntabname");
e.removeAttribute("id");
nodeList.item(i).save(toolStream,2);
@@ -2427,22 +2427,22 @@ KURL QuantaApp::saveToolbarToFile(const QString& toolbarName, const KURL& destFi
}
}
}
- toolStream << QString("\n</kpartgui>");
- actStr << QString("\n</actions>");
+ toolStream << TQString("\n</kpartgui>");
+ actStr << TQString("\n</actions>");
//buffer.flush();
ToolbarEntry *p_toolbar = m_toolbarList[toolbarName];
- QDomDocument *oldDom = p_toolbar->dom;
- QDomDocument *dom = new QDomDocument();
- QString s = toolStr;
- QString error;
+ TQDomDocument *oldDom = p_toolbar->dom;
+ TQDomDocument *dom = new TQDomDocument();
+ TQString s = toolStr;
+ TQString error;
int el, ec;
if (!dom->setContent(s, &error, &el, &ec))
- kdError(24000) << QString("Error %1 at (%2, %3)").arg(error).arg(el).arg(ec)<<endl;
+ kdError(24000) << TQString("Error %1 at (%2, %3)").arg(error).arg(el).arg(ec)<<endl;
p_toolbar->dom = dom;
- QTextStream bufferStr(&buffer);
- bufferStr.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream bufferStr(&buffer);
+ bufferStr.setEncoding(TQTextStream::UnicodeUTF8);
bufferStr << toolStr;
buffer.close();
buffer2.close();
@@ -2453,9 +2453,9 @@ KURL QuantaApp::saveToolbarToFile(const QString& toolbarName, const KURL& destFi
KTar tar(tempFile->name(), "application/x-gzip");
if (!tar.open(IO_WriteOnly))
return KURL();
- if (!tar.writeFile(QFileInfo(tarFile.path()).baseName()+".toolbar", "user", "group", buffer.buffer().size(), buffer.buffer().data()))
+ if (!tar.writeFile(TQFileInfo(tarFile.path()).baseName()+".toolbar", "user", "group", buffer.buffer().size(), buffer.buffer().data()))
return KURL();
- if (!tar.writeFile(QFileInfo(tarFile.path()).baseName()+".actions", "user", "group", buffer2.buffer().size(), buffer2.buffer().data()))
+ if (!tar.writeFile(TQFileInfo(tarFile.path()).baseName()+".actions", "user", "group", buffer2.buffer().size(), buffer2.buffer().data()))
return KURL();
tar.close();
if (!QExtFileInfo::copy(KURL::fromPathOrURL(tempFile->name()), tarFile, -1, true, false, this))
@@ -2472,20 +2472,20 @@ KURL QuantaApp::saveToolbarToFile(const QString& toolbarName, const KURL& destFi
}
/** Saves a toolbar as local or project specific. */
-bool QuantaApp::saveToolbar(bool localToolbar, const QString& toolbarToSave, const KURL& destURL)
+bool QuantaApp::saveToolbar(bool localToolbar, const TQString& toolbarToSave, const KURL& destURL)
{
int query;
KURL url;
KURL projectToolbarsURL;
- QString toolbarName;
- QString localToolbarsDir = locateLocal("data",resourceDir + "toolbars/");
+ TQString toolbarName;
+ TQString localToolbarsDir = locateLocal("data",resourceDir + "toolbars/");
if (toolbarToSave.isEmpty())
{
ToolbarTabWidget *tb = ToolbarTabWidget::ref();
- QStringList lst;
- QStringList idLst;
+ TQStringList lst;
+ TQStringList idLst;
int current=0;
for (int i = 0; i < tb->count(); i++)
{
@@ -2495,7 +2495,7 @@ bool QuantaApp::saveToolbar(bool localToolbar, const QString& toolbarToSave, con
}
bool ok = false;
- QString res = KInputDialog::getItem(
+ TQString res = KInputDialog::getItem(
i18n( "Save Toolbar" ),
i18n( "Please select a toolbar:" ), lst, current, false, &ok, this );
if ( !ok )
@@ -2514,8 +2514,8 @@ bool QuantaApp::saveToolbar(bool localToolbar, const QString& toolbarToSave, con
toolbarName = toolbarToSave;
}
ToolbarEntry *p_toolbar = m_toolbarList[toolbarName];
- QString toolbarFileName = p_toolbar->url.fileName(false);
- QString toolbarRelPath = p_toolbar->url.url();
+ TQString toolbarFileName = p_toolbar->url.fileName(false);
+ TQString toolbarRelPath = p_toolbar->url.url();
if (toolbarRelPath.startsWith("file://" + qConfig.globalDataDir))
{
toolbarRelPath.remove("file://" + qConfig.globalDataDir + resourceDir + "toolbars/");
@@ -2591,24 +2591,24 @@ void QuantaApp::slotSaveProjectToolbar()
void QuantaApp::slotAddToolbar()
{
bool ok;
- QString name = KInputDialog::getText(i18n("New Toolbar"), i18n("Enter toolbar name:"), i18n("User_%1").arg(userToolbarsCount), &ok, this);
+ TQString name = KInputDialog::getText(i18n("New Toolbar"), i18n("Enter toolbar name:"), i18n("User_%1").arg(userToolbarsCount), &ok, this);
if (ok)
{
userToolbarsCount++;
- QString toolbarId = name;
+ TQString toolbarId = name;
int n = 1;
while (m_toolbarList.find(toolbarId) != 0L)
{
- toolbarId = name + QString("%1").arg(n);
+ toolbarId = name + TQString("%1").arg(n);
n++;
}
toolbarId = toolbarId.lower();
KTempFile* tempFile = new KTempFile(tmpDir);
tempFile->setAutoDelete(true);
- tempFile->textStream()->setEncoding(QTextStream::UnicodeUTF8);
- * (tempFile->textStream()) << QString("<!DOCTYPE kpartgui SYSTEM \"kpartgui.dtd\">\n<kpartgui name=\"quanta\" version=\"2\">\n<ToolBar name=\"%1\" tabname=\"%2\" i18ntabname=\"%3\" id=\"%4\">\n<text>%5</text>\n</ToolBar>\n</kpartgui>\n")
+ tempFile->textStream()->setEncoding(TQTextStream::UnicodeUTF8);
+ * (tempFile->textStream()) << TQString("<!DOCTYPE kpartgui SYSTEM \"kpartgui.dtd\">\n<kpartgui name=\"quanta\" version=\"2\">\n<ToolBar name=\"%1\" tabname=\"%2\" i18ntabname=\"%3\" id=\"%4\">\n<text>%5</text>\n</ToolBar>\n</kpartgui>\n")
.arg(name.lower()).arg(name).arg(name).arg(toolbarId).arg(name);
tempFile->close();
@@ -2624,7 +2624,7 @@ void QuantaApp::slotAddToolbar()
ToolbarEntry *p_toolbar = new ToolbarEntry;
p_toolbar->guiClient = toolbarGUI;
- QDomDocument *dom = new QDomDocument(toolbarGUI->domDocument());
+ TQDomDocument *dom = new TQDomDocument(toolbarGUI->domDocument());
p_toolbar->dom = dom;
p_toolbar->name = name;
@@ -2647,8 +2647,8 @@ bool QuantaApp::slotRemoveToolbar()
ToolbarTabWidget *tb = ToolbarTabWidget::ref();
int i;
- QStringList lst;
- QStringList idLst;
+ TQStringList lst;
+ TQStringList idLst;
int current=0, j =0;
for (i = 0; i < tb->count(); i++)
{
@@ -2659,13 +2659,13 @@ bool QuantaApp::slotRemoveToolbar()
}
bool ok = false;
- QString res = KInputDialog::getItem(
+ TQString res = KInputDialog::getItem(
i18n( "Remove Toolbar" ),
i18n( "Please select a toolbar:" ), lst, current, false, &ok, this );
if (ok)
{
- QString id = res;
+ TQString id = res;
for (uint i = 0; i < lst.count(); i++)
{
if (lst[i] == res)
@@ -2680,12 +2680,12 @@ bool QuantaApp::slotRemoveToolbar()
}
-QString QuantaApp::createToolbarTarball()
+TQString QuantaApp::createToolbarTarball()
{
ToolbarTabWidget *tb = ToolbarTabWidget::ref();
- QStringList lst;
- QStringList idLst;
+ TQStringList lst;
+ TQStringList idLst;
int current = 0;
for (int i = 0; i < tb->count(); i++)
{
@@ -2695,14 +2695,14 @@ QString QuantaApp::createToolbarTarball()
}
bool ok = false;
- QString res = KInputDialog::getItem(
+ TQString res = KInputDialog::getItem(
i18n( "Send Toolbar" ),
i18n( "Please select a toolbar:" ), lst, current, false, &ok, this );
if (!ok)
- return QString::null;
+ return TQString::null;
- QString toolbarName = res;
+ TQString toolbarName = res;
for (uint i = 0; i < lst.count(); i++)
{
if (lst[i] == toolbarName)
@@ -2711,11 +2711,11 @@ QString QuantaApp::createToolbarTarball()
break;
}
}
- QString prefix="quanta";
+ TQString prefix="quanta";
KTempDir* tempDir = new KTempDir(tmpDir);
tempDir->setAutoDelete(true);
tempDirList.append(tempDir);
- QString tempFileName=tempDir->name() + toolbarName;
+ TQString tempFileName=tempDir->name() + toolbarName;
KURL tempURL;
tempURL.setPath(tempFileName);
@@ -2728,23 +2728,23 @@ QString QuantaApp::createToolbarTarball()
void QuantaApp::slotSendToolbar()
{
- QString tempFileName = createToolbarTarball();
+ TQString tempFileName = createToolbarTarball();
if (tempFileName.isNull())
return;
- QStringList toolbarFile;
+ TQStringList toolbarFile;
toolbarFile += tempFileName;
TagMailDlg *mailDlg = new TagMailDlg( this, i18n("Send toolbar in email"));
- QString toStr;
- QString message = i18n("Hi,\n This is a Quanta Plus [http://quanta.kdewebdev.org] toolbar.\n\nHave fun.\n");
- QString titleStr;
- QString subjectStr;
+ TQString toStr;
+ TQString message = i18n("Hi,\n This is a Quanta Plus [http://quanta.kdewebdev.org] toolbar.\n\nHave fun.\n");
+ TQString titleStr;
+ TQString subjectStr;
mailDlg->TitleLabel->setText(i18n("Content:"));
/* mailDlg->titleEdit->setFixedHeight(60);
- mailDlg->titleEdit->setVScrollBarMode(QTextEdit::Auto);
- mailDlg->titleEdit->setHScrollBarMode(QTextEdit::Auto);*/
+ mailDlg->titleEdit->setVScrollBarMode(TQTextEdit::Auto);
+ mailDlg->titleEdit->setHScrollBarMode(TQTextEdit::Auto);*/
if ( mailDlg->exec() ) {
if ( !mailDlg->lineEmail->text().isEmpty())
{
@@ -2759,7 +2759,7 @@ void QuantaApp::slotSendToolbar()
return;
}
- kapp->invokeMailer(toStr, QString::null, QString::null, subjectStr, message, QString::null, toolbarFile);
+ kapp->invokeMailer(toStr, TQString::null, TQString::null, subjectStr, message, TQString::null, toolbarFile);
}
delete mailDlg;
}
@@ -2773,7 +2773,7 @@ void QuantaApp::slotDownloadToolbar()
void QuantaApp::slotUploadToolbar()
{
- QString tempFileName = createToolbarTarball();
+ TQString tempFileName = createToolbarTarball();
if (tempFileName.isNull())
return;
if (!m_newToolbarStuff)
@@ -2786,8 +2786,8 @@ void QuantaApp::slotRenameToolbar()
{
ToolbarTabWidget *tb = ToolbarTabWidget::ref();
- QStringList lst;
- QStringList idLst;
+ TQStringList lst;
+ TQStringList idLst;
int current = 0;
for (int i = 0; i < tb->count(); i++)
{
@@ -2797,12 +2797,12 @@ void QuantaApp::slotRenameToolbar()
}
bool ok = false;
- QString res = KInputDialog::getItem(
+ TQString res = KInputDialog::getItem(
i18n( "Rename Toolbar" ),
i18n( "Please select a toolbar:" ), lst, current, false, &ok, this );
if (ok)
{
- QString id = res;
+ TQString id = res;
for (uint i = 0; i < lst.count(); i++)
{
if (lst[i] == res)
@@ -2815,22 +2815,22 @@ void QuantaApp::slotRenameToolbar()
}
}
-void QuantaApp::slotRenameToolbar(const QString& name)
+void QuantaApp::slotRenameToolbar(const TQString& name)
{
ToolbarEntry *p_toolbar = quantaApp->m_toolbarList[name];
if (p_toolbar)
{
bool ok;
- QString newName = KInputDialog::getText(i18n("Rename Toolbar"), i18n("Enter the new name:"), p_toolbar->name, &ok, this);
+ TQString newName = KInputDialog::getText(i18n("Rename Toolbar"), i18n("Enter the new name:"), p_toolbar->name, &ok, this);
if (ok && newName != p_toolbar->name)
{
m_toolbarList.take(name);
p_toolbar->name = newName;
- QDomElement el = p_toolbar->guiClient->domDocument().firstChild().firstChild().toElement();
+ TQDomElement el = p_toolbar->guiClient->domDocument().firstChild().firstChild().toElement();
el.setAttribute("tabname", p_toolbar->name);
el.removeAttribute("i18ntabname");
el.setAttribute("name", p_toolbar->name.lower());
- QDomNodeList nodeList = p_toolbar->guiClient->domDocument().elementsByTagName("text");
+ TQDomNodeList nodeList = p_toolbar->guiClient->domDocument().elementsByTagName("text");
nodeList.item(0).firstChild().setNodeValue(p_toolbar->name);
//Rename the _Separator_ tags back to Separator, so they are not treated
//as changes
@@ -2859,19 +2859,19 @@ void QuantaApp::slotRenameToolbar(const QString& name)
/** Ask for save all the modified user toolbars. */
bool QuantaApp::removeToolbars()
{
- QStringList names;
- QDictIterator<ToolbarEntry> it(m_toolbarList);
+ TQStringList names;
+ TQDictIterator<ToolbarEntry> it(m_toolbarList);
for (;it.current();++it)
{
names += it.currentKey();
}
- for (QStringList::ConstIterator iter = names.constBegin(); iter != names.constEnd(); ++iter)
+ for (TQStringList::ConstIterator iter = names.constBegin(); iter != names.constEnd(); ++iter)
{
if (!slotRemoveToolbar(*iter))
return false;
}
- QString s = "<!DOCTYPE actionsconfig>\n<actions>\n</actions>\n";
+ TQString s = "<!DOCTYPE actionsconfig>\n<actions>\n</actions>\n";
m_actions->setContent(s);
TagAction *action;
for (uint i = 0; i < actionCollection()->count(); i++)
@@ -2879,18 +2879,18 @@ bool QuantaApp::removeToolbars()
action = dynamic_cast<TagAction *>(actionCollection()->action(i));
if (action)
{
- QDomElement el = action->data();
+ TQDomElement el = action->data();
m_actions->firstChild().appendChild(el);
}
}
- QFile f(KGlobal::instance()->dirs()->saveLocation("data")+resourceDir + "actions.rc" );
+ TQFile f(KGlobal::instance()->dirs()->saveLocation("data")+resourceDir + "actions.rc" );
if (f.open( IO_ReadWrite | IO_Truncate ))
{
if (!m_actions->firstChild().firstChild().isNull())
{
- QTextStream qts(&f);
- qts.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream qts(&f);
+ qts.setEncoding(TQTextStream::UnicodeUTF8);
m_actions->save(qts,0);
f.close();
} else
@@ -2903,13 +2903,13 @@ bool QuantaApp::removeToolbars()
void QuantaApp::slotDeleteAction(KAction *action)
{
//remove all references to this action
- QDomElement el = static_cast<TagAction*>(action)->data();
- QString text = el.attribute("text");
- QString actionName = action->name();
+ TQDomElement el = static_cast<TagAction*>(action)->data();
+ TQString text = el.attribute("text");
+ TQString actionName = action->name();
- QPtrList<KXMLGUIClient> guiClients = factory()->clients();
+ TQPtrList<KXMLGUIClient> guiClients = factory()->clients();
KXMLGUIClient *guiClient = 0;
- QDomNodeList nodeList;
+ TQDomNodeList nodeList;
for (uint i = 0; i < guiClients.count(); i++)
{
guiClient = guiClients.at(i);
@@ -2932,14 +2932,14 @@ void QuantaApp::slotDeleteAction(KAction *action)
action = 0L;
}
-void QuantaApp::slotRemoveAction(const QString& toolbarName, const QString& a_actionName)
+void QuantaApp::slotRemoveAction(const TQString& toolbarName, const TQString& a_actionName)
{
KAction *action = 0L;
- QString actionName = a_actionName;
+ TQString actionName = a_actionName;
actionName.replace('&',"&&");
KActionCollection *ac = actionCollection();
uint actionCount = ac->count();
- QString str;
+ TQString str;
for (uint i = 0; i < actionCount; i++)
{
str = ac->action(i)->text();
@@ -2968,7 +2968,7 @@ void QuantaApp::slotRemoveAction(const QString& toolbarName, const QString& a_ac
ToolbarEntry *p_toolbar = quantaApp->m_toolbarList[toolbarName];
if (p_toolbar)
{
- QDomNode node = p_toolbar->guiClient->domDocument().firstChild().firstChild().firstChild();
+ TQDomNode node = p_toolbar->guiClient->domDocument().firstChild().firstChild().firstChild();
while (!node.isNull())
{
if (node.nodeName() == "Action" &&
@@ -2986,7 +2986,7 @@ void QuantaApp::slotRemoveAction(const QString& toolbarName, const QString& a_ac
}
}
-void QuantaApp::slotEditAction(const QString& actionName)
+void QuantaApp::slotEditAction(const TQString& actionName)
{
ActionConfigDialog dlg(m_toolbarList, this, "actions_config_dlg", true, 0, actionName);
dlg.exec();
@@ -2999,21 +2999,21 @@ void QuantaApp::slotNewAction()
dlg.exec();
}
-void QuantaApp::slotAssignActionToScript(const KURL& a_scriptURL, const QString& a_interpreter)
+void QuantaApp::slotAssignActionToScript(const KURL& a_scriptURL, const TQString& a_interpreter)
{
ActionConfigDialog dlg(m_toolbarList, this, "actions_config_dlg");
- QString name = a_scriptURL.fileName();
- name.truncate(name.length() - QFileInfo(name).extension().length() - 1);
+ TQString name = a_scriptURL.fileName();
+ name.truncate(name.length() - TQFileInfo(name).extension().length() - 1);
dlg.createScriptAction(name, a_interpreter + " " + a_scriptURL.path());
dlg.exec();
}
-void QuantaApp::setDtep(const QString& dtepName, bool convert)
+void QuantaApp::setDtep(const TQString& dtepName, bool convert)
{
Document *w = ViewManager::ref()->activeDocument();
if (w)
{
- QString dtep = DTDs::ref()->getDTDNameFromNickName(dtepName);
+ TQString dtep = DTDs::ref()->getDTDNameFromNickName(dtepName);
if (!DTDs::ref()->find(dtep))
return;
w->setDTDIdentifier(dtep);
@@ -3057,12 +3057,12 @@ void QuantaApp::slotChangeDTD()
int pos = -1;
int defaultIndex = 0;
- QString oldDtdName = w->getDTDIdentifier();
- QString defaultDocType = Project::ref()->defaultDTD();
- QStringList lst = DTDs::ref()->nickNameList(true);
+ TQString oldDtdName = w->getDTDIdentifier();
+ TQString defaultDocType = Project::ref()->defaultDTD();
+ TQStringList lst = DTDs::ref()->nickNameList(true);
- QString oldDtdNickName = DTDs::ref()->getDTDNickNameFromName(oldDtdName);
- QString defaultDtdNickName = DTDs::ref()->getDTDNickNameFromName(defaultDocType);
+ TQString oldDtdNickName = DTDs::ref()->getDTDNickNameFromName(oldDtdName);
+ TQString defaultDtdNickName = DTDs::ref()->getDTDNickNameFromName(defaultDocType);
for(uint i = 0; i < lst.count(); i++)
{
dtdWidget->dtdCombo->insertItem(lst[i]);
@@ -3091,19 +3091,19 @@ void QuantaApp::slotEditDTD()
Document *w = ViewManager::ref()->activeDocument();
if (w)
{
- QStringList lst(DTDs::ref()->nickNameList());
- QString nickName = DTDs::ref()->getDTDNickNameFromName(w->getDTDIdentifier());
+ TQStringList lst(DTDs::ref()->nickNameList());
+ TQString nickName = DTDs::ref()->getDTDNickNameFromName(w->getDTDIdentifier());
bool ok = false;
- QString res = KInputDialog::getItem(
+ TQString res = KInputDialog::getItem(
i18n( "Edit DTD" ),
i18n( "Please select a DTD:" ), lst, lst.findIndex(nickName), false, &ok, this );
- QString s = i18n("Create a new DTEP description");
+ TQString s = i18n("Create a new DTEP description");
s = i18n("Load DTEP description from disk");
if (!ok)
return;
- QString dtdName = DTDs::ref()->getDTDNameFromNickName(res);
+ TQString dtdName = DTDs::ref()->getDTDNameFromNickName(res);
KDialogBase editDlg(this, "edit_dtep", true, i18n("Configure DTEP"), KDialogBase::Ok | KDialogBase::Cancel);
DTEPEditDlg dtepDlg(DTDs::ref()->find(dtdName)->fileName, &editDlg);
@@ -3115,7 +3115,7 @@ void QuantaApp::slotEditDTD()
}
}
-void QuantaApp::focusInEvent(QFocusEvent* e)
+void QuantaApp::focusInEvent(TQFocusEvent* e)
{
KDockMainWindow::focusInEvent(e);
Document *w = ViewManager::ref()->activeDocument();
@@ -3144,7 +3144,7 @@ void QuantaApp::slotMakeDonation()
{
DonationDialog *dlg = new DonationDialog(this);
dlg->closeButton->setIconSet(SmallIconSet("fileclose"));
- connect(dlg->closeButton, SIGNAL(clicked()), dlg, SLOT(accept()));
+ connect(dlg->closeButton, TQT_SIGNAL(clicked()), dlg, TQT_SLOT(accept()));
dlg->exec();
delete dlg;
}
@@ -3160,7 +3160,7 @@ void QuantaApp::slotHelpUserList()
}
/** Loads the toolbars for dtd named dtdName and unload the ones belonging to oldDtdName. */
-void QuantaApp::slotLoadToolbarForDTD(const QString& dtdName)
+void QuantaApp::slotLoadToolbarForDTD(const TQString& dtdName)
{
const DTDStruct *oldDtd = 0L;
@@ -3170,7 +3170,7 @@ void QuantaApp::slotLoadToolbarForDTD(const QString& dtdName)
if (!oldDtd)
oldDtd = DTDs::ref()->find(Project::ref()->defaultDTD());
}
- QString fileName;
+ TQString fileName;
const DTDStruct *newDtd = DTDs::ref()->find(dtdName);
if (!newDtd)
{
@@ -3220,14 +3220,14 @@ void QuantaApp::slotLoadToolbarForDTD(const QString& dtdName)
for (uint i = 0; i < oldDtd->toolbars.count(); i++)
{
KURL url;
- QString fileName = qConfig.globalDataDir + resourceDir + "toolbars/"+oldDtd->toolbars[i];
+ TQString fileName = qConfig.globalDataDir + resourceDir + "toolbars/"+oldDtd->toolbars[i];
QuantaCommon::setUrl(url, fileName);
KURL urlLocal;
fileName = locateLocal("data", resourceDir + "toolbars/"+oldDtd->toolbars[i]);
QuantaCommon::setUrl(urlLocal, fileName);
if (newToolbars.contains(url) == 0)
{
- QDictIterator<ToolbarEntry> iter(m_toolbarList);
+ TQDictIterator<ToolbarEntry> iter(m_toolbarList);
for( ; iter.current(); ++iter )
{
p_toolbar = iter.current();
@@ -3260,12 +3260,12 @@ void QuantaApp::slotLoadToolbarForDTD(const QString& dtdName)
}
/** Remove the toolbar named "name". */
-bool QuantaApp::slotRemoveToolbar(const QString& a_name)
+bool QuantaApp::slotRemoveToolbar(const TQString& a_name)
{
- QString name = a_name; // increase reference counter for this string
+ TQString name = a_name; // increase reference counter for this string
ToolbarEntry *p_toolbar = m_toolbarList[name];
- QRegExp i18ntabnameRx("\\si18ntabname=\"[^\"]*\"");
- QRegExp idRx("\\sid=\"[^\"]*\"");
+ TQRegExp i18ntabnameRx("\\si18ntabname=\"[^\"]*\"");
+ TQRegExp idRx("\\sid=\"[^\"]*\"");
if (p_toolbar)
{
KXMLGUIClient* toolbarGUI = p_toolbar->guiClient;
@@ -3275,7 +3275,7 @@ bool QuantaApp::slotRemoveToolbar(const QString& a_name)
KAction *action;
//Rename the _Separator_ tags back to Separator, so they are not treated
//as changes
- QDomNodeList nodeList = toolbarGUI->domDocument().elementsByTagName("_Separator_");
+ TQDomNodeList nodeList = toolbarGUI->domDocument().elementsByTagName("_Separator_");
for (uint i = 0; i < nodeList.count(); i++)
{
nodeList.item(i).toElement().setTagName("Separator");
@@ -3295,20 +3295,20 @@ bool QuantaApp::slotRemoveToolbar(const QString& a_name)
}
//check if the toolbar's XML GUI was modified or not
- QString s1 = p_toolbar->dom->toString();
- QString s2 = toolbarGUI->domDocument().toString();
+ TQString s1 = p_toolbar->dom->toString();
+ TQString s2 = toolbarGUI->domDocument().toString();
s1.remove(i18ntabnameRx);
s2.remove(i18ntabnameRx);
s1.remove(idRx);
s2.remove(idRx);
if (p_toolbar->nameModified)
{
- QRegExp tabnameRx("\\stabname=\"[^\"]*\"");
+ TQRegExp tabnameRx("\\stabname=\"[^\"]*\"");
tabnameRx.search(s2);
- QString name1 = tabnameRx.cap();
+ TQString name1 = tabnameRx.cap();
name1.remove(" tab");
- QString name2 = name1;
- name2.remove(QRegExp("[\\s]\\([0-9]+\\)"));
+ TQString name2 = name1;
+ name2.remove(TQRegExp("[\\s]\\([0-9]+\\)"));
s2.replace(name1, name2);
s2.replace(name1.lower(), name2.lower());
}
@@ -3385,7 +3385,7 @@ bool QuantaApp::slotRemoveToolbar(const QString& a_name)
{
//take out the action from every toolbar's xmlguiclient
//this avoid a crash when removing a toolbar
- QDictIterator<ToolbarEntry> it(m_toolbarList);
+ TQDictIterator<ToolbarEntry> it(m_toolbarList);
while (it.current())
{
it.current()->guiClient->actionCollection()->take(action);
@@ -3430,7 +3430,7 @@ void QuantaApp::slotRefreshActiveWindow()
}
-void QuantaApp::slotShowGroupsForDTEP(const QString& dtepName, bool show)
+void QuantaApp::slotShowGroupsForDTEP(const TQString& dtepName, bool show)
{
Document *w = ViewManager::ref()->activeDocument();
if (w)
@@ -3475,9 +3475,9 @@ void QuantaApp::slotBuildPrjToolbarsMenu()
}
/** Returns the project (if there is one loaded) or global default encoding. */
-QString QuantaApp::defaultEncoding()
+TQString QuantaApp::defaultEncoding()
{
- QString encoding = qConfig.defaultEncoding;
+ TQString encoding = qConfig.defaultEncoding;
if (Project::ref()->hasProject())
{
encoding = Project::ref()->defaultEncoding();
@@ -3488,7 +3488,7 @@ QString QuantaApp::defaultEncoding()
void QuantaApp::slotGetUserToolbarFiles(KURL::List *list)
{
ToolbarEntry *p_toolbar;
- QDictIterator<ToolbarEntry> iter(m_toolbarList);
+ TQDictIterator<ToolbarEntry> iter(m_toolbarList);
for( ; iter.current(); ++iter )
{
p_toolbar = iter.current();
@@ -3502,7 +3502,7 @@ void QuantaApp::slotGetUserToolbarFiles(KURL::List *list)
ToolbarEntry *QuantaApp::toolbarByURL(const KURL& url)
{
ToolbarEntry *p_toolbar = 0L;
- QDictIterator<ToolbarEntry> iter(m_toolbarList);
+ TQDictIterator<ToolbarEntry> iter(m_toolbarList);
for( ; iter.current(); ++iter )
{
p_toolbar = iter.current();
@@ -3522,7 +3522,7 @@ bool QuantaApp::allToolbarsHidden() const
bool result = true;
showDTDToolbar->setEnabled(false);
ToolbarEntry *p_toolbar = 0L;
- QDictIterator<ToolbarEntry> iter(m_toolbarList);
+ TQDictIterator<ToolbarEntry> iter(m_toolbarList);
for( ; iter.current(); ++iter )
{
p_toolbar = iter.current();
@@ -3542,35 +3542,35 @@ bool QuantaApp::allToolbarsHidden() const
void QuantaApp::slotLoadDTEP()
{
- QString dirName = KFileDialog::getExistingDirectory(QString::null, 0, i18n("Select DTEP Directory"));
+ TQString dirName = KFileDialog::getExistingDirectory(TQString::null, 0, i18n("Select DTEP Directory"));
if (!dirName.isEmpty())
{
DTDs::ref()->slotLoadDTEP(dirName, true);
}
}
-QString QuantaApp::createDTEPTarball()
+TQString QuantaApp::createDTEPTarball()
{
Document *w = ViewManager::ref()->activeDocument();
if (w)
{
- QStringList lst(DTDs::ref()->nickNameList());
- QString nickName = DTDs::ref()->getDTDNickNameFromName(w->getDTDIdentifier());
+ TQStringList lst(DTDs::ref()->nickNameList());
+ TQString nickName = DTDs::ref()->getDTDNickNameFromName(w->getDTDIdentifier());
bool ok = false;
- QString res = KInputDialog::getItem(
+ TQString res = KInputDialog::getItem(
i18n( "Send DTD" ),
i18n( "Please select a DTD:" ), lst, lst.findIndex(nickName), false, &ok, this );
if (!ok)
- return QString::null;
+ return TQString::null;
- QString dtdName = DTDs::ref()->getDTDNameFromNickName(res);
+ TQString dtdName = DTDs::ref()->getDTDNameFromNickName(res);
- QString prefix="quanta";
+ TQString prefix="quanta";
KTempDir* tempDir = new KTempDir(tmpDir);
tempDir->setAutoDelete(true);
tempDirList.append(tempDir);
- QString tempFileName=tempDir->name() +"/"+ DTDs::ref()->getDTDNickNameFromName(dtdName).replace(QRegExp("\\s|\\."), "_") + ".tgz";
+ TQString tempFileName=tempDir->name() +"/"+ DTDs::ref()->getDTDNickNameFromName(dtdName).replace(TQRegExp("\\s|\\."), "_") + ".tgz";
//pack the .tag files and the description.rc into a .tgz file
KTar tar(tempFileName, "application/x-gzip");
@@ -3583,11 +3583,11 @@ QString QuantaApp::createDTEPTarball()
KURL::List files = QExtFileInfo::allFilesRelative(dirURL, "*", this);
for ( KURL::List::Iterator it_f = files.begin(); it_f != files.end(); ++it_f )
{
- QString name = (*it_f).fileName();
+ TQString name = (*it_f).fileName();
- QFile file(dirURL.path()+name);
+ TQFile file(dirURL.path()+name);
file.open(IO_ReadOnly);
- QByteArray bArray = file.readAll();
+ TQByteArray bArray = file.readAll();
tar.writeFile(dirURL.fileName()+"/"+name, "user", "group", bArray.size(), bArray.data());
file.close();
@@ -3595,7 +3595,7 @@ QString QuantaApp::createDTEPTarball()
tar.close();
return tempFileName;
}
- return QString::null;
+ return TQString::null;
}
void QuantaApp::slotEmailDTEP()
@@ -3603,22 +3603,22 @@ void QuantaApp::slotEmailDTEP()
Document *w = ViewManager::ref()->activeDocument();
if (w)
{
- QString tempFileName = createDTEPTarball();
+ TQString tempFileName = createDTEPTarball();
if (tempFileName.isNull())
return;
- QStringList dtdFile;
+ TQStringList dtdFile;
dtdFile += tempFileName;
TagMailDlg *mailDlg = new TagMailDlg( this, i18n("Send DTEP in Email"));
- QString toStr;
- QString message = i18n("Hi,\n This is a Quanta Plus [http://quanta.kdewebdev.org] DTEP definition tarball.\n\nHave fun.\n");
- QString titleStr;
- QString subjectStr;
+ TQString toStr;
+ TQString message = i18n("Hi,\n This is a Quanta Plus [http://quanta.kdewebdev.org] DTEP definition tarball.\n\nHave fun.\n");
+ TQString titleStr;
+ TQString subjectStr;
mailDlg->TitleLabel->setText(i18n("Content:"));
/* mailDlg->titleEdit->setFixedHeight(60);
- mailDlg->titleEdit->setVScrollBarMode(QTextEdit::Auto);
- mailDlg->titleEdit->setHScrollBarMode(QTextEdit::Auto);*/
+ mailDlg->titleEdit->setVScrollBarMode(TQTextEdit::Auto);
+ mailDlg->titleEdit->setHScrollBarMode(TQTextEdit::Auto);*/
if ( mailDlg->exec() )
{
if ( !mailDlg->lineEmail->text().isEmpty())
@@ -3634,7 +3634,7 @@ void QuantaApp::slotEmailDTEP()
return;
}
- kapp->invokeMailer(toStr, QString::null, QString::null, subjectStr, message, QString::null, dtdFile);
+ kapp->invokeMailer(toStr, TQString::null, TQString::null, subjectStr, message, TQString::null, dtdFile);
}
delete mailDlg;
}
@@ -3649,7 +3649,7 @@ void QuantaApp::slotDownloadDTEP()
void QuantaApp::slotUploadDTEP()
{
- QString tempFileName = createDTEPTarball();
+ TQString tempFileName = createDTEPTarball();
if (tempFileName.isNull())
return;
if (!m_newDTEPStuff)
@@ -3681,7 +3681,7 @@ void QuantaApp::slotDownloadTemplate()
m_newTemplateStuff->downloadResource();
}
-void QuantaApp::slotUploadTemplate(const QString &fileName)
+void QuantaApp::slotUploadTemplate(const TQString &fileName)
{
if (!m_newTemplateStuff)
m_newTemplateStuff = new QNewTemplateStuff("quanta/template", this);
@@ -3696,7 +3696,7 @@ void QuantaApp::slotDownloadScript()
m_newScriptStuff->downloadResource();
}
-void QuantaApp::slotUploadScript(const QString &fileName)
+void QuantaApp::slotUploadScript(const TQString &fileName)
{
if (!m_newScriptStuff)
m_newScriptStuff = new QNewScriptStuff("quanta/script", this);
@@ -3709,7 +3709,7 @@ void QuantaApp::slotDownloadDoc()
if (!m_newDocStuff)
{
m_newDocStuff = new QNewDocStuff("quanta/documentation", this);
- connect(m_newDocStuff, SIGNAL(installFinished()), dTab, SLOT(slotRefreshTree()));
+ connect(m_newDocStuff, TQT_SIGNAL(installFinished()), dTab, TQT_SLOT(slotRefreshTree()));
}
m_newDocStuff->downloadResource();
}
@@ -3764,15 +3764,15 @@ int QuantaApp::currentEditorIfNum() const
}
}
-QString QuantaApp::projectURL() const
+TQString QuantaApp::projectURL() const
{
return Project::ref()->projectBaseURL().url();
}
-QStringList QuantaApp::openedURLs() const
+TQStringList QuantaApp::openedURLs() const
{
- QStringList list;
- QPtrListIterator<KMdiChildView> childIt(*m_pDocumentViews);
+ TQStringList list;
+ TQPtrListIterator<KMdiChildView> childIt(*m_pDocumentViews);
KMdiChildView *view;
QuantaView *qView;
while ( (view = childIt.current()) != 0 )
@@ -3784,7 +3784,7 @@ QStringList QuantaApp::openedURLs() const
Document *w = qView->document();
if ( w )
{
- list.prepend( QString("%1:%2").arg(w->editIf->editInterfaceNumber()).arg(w->url().url()));
+ list.prepend( TQString("%1:%2").arg(w->editIf->editInterfaceNumber()).arg(w->url().url()));
}
}
}
@@ -3800,17 +3800,17 @@ void QuantaApp::slotExpandAbbreviation()
const DTDStruct *dtd = w->currentDTD();
uint line, col;
w->viewCursorIf->cursorPositionReal(&line, &col);
- QString text = w->text(line, 0, line, col - 1);
+ TQString text = w->text(line, 0, line, col - 1);
text = w->findWordRev(text) + " ";
- QString textToInsert;
- QMap<QString, Abbreviation>::ConstIterator it;
+ TQString textToInsert;
+ TQMap<TQString, Abbreviation>::ConstIterator it;
for (it = qConfig.abbreviations.constBegin(); it != qConfig.abbreviations.constEnd(); ++it)
{
bool found = false;
Abbreviation abbrev = it.data();
if (abbrev.dteps.contains(dtd->name))
{
- QMap<QString, QString>::ConstIterator it2;
+ TQMap<TQString, TQString>::ConstIterator it2;
for (it2 = abbrev.abbreviations.constBegin(); it2 != abbrev.abbreviations.constEnd(); ++it2)
{
if (it2.key().startsWith(text))
@@ -3886,28 +3886,28 @@ bool QuantaApp::structTreeVisible() const
return StructTreeView::ref()->isVisible();
}
-QStringList QuantaApp::tagAreas(const QString &tag, bool includeCoordinates, bool skipFoundContent) const
+TQStringList QuantaApp::tagAreas(const TQString &tag, bool includeCoordinates, bool skipFoundContent) const
{
Document *w = ViewManager::ref()->activeDocument();
if (w)
return w->tagAreas(tag, includeCoordinates, skipFoundContent);
else
- return QStringList();
+ return TQStringList();
}
-QString QuantaApp::documentFolderForURL(const QString &url)
+TQString QuantaApp::documentFolderForURL(const TQString &url)
{
KURL u = KURL::fromPathOrURL(url);
return Project::ref()->documentFolderForURL(u).url();
}
-QString QuantaApp::urlWithPreviewPrefix(const QString &url)
+TQString QuantaApp::urlWithPreviewPrefix(const TQString &url)
{
KURL u = KURL::fromPathOrURL(url);
return Project::ref()->urlWithPrefix(u).url();
}
-void QuantaApp::addFileToProject(const QString &url)
+void QuantaApp::addFileToProject(const TQString &url)
{
if (Project::ref()->hasProject())
{
@@ -3915,7 +3915,7 @@ void QuantaApp::addFileToProject(const QString &url)
}
}
-void QuantaApp::addFolderToProject(const QString &url)
+void QuantaApp::addFolderToProject(const TQString &url)
{
if (Project::ref()->hasProject())
{
@@ -3923,7 +3923,7 @@ void QuantaApp::addFolderToProject(const QString &url)
}
}
-void QuantaApp::uploadURL(const QString &url, const QString& profile, bool markOnly)
+void QuantaApp::uploadURL(const TQString &url, const TQString& profile, bool markOnly)
{
if (Project::ref()->hasProject())
{
@@ -3934,7 +3934,7 @@ void QuantaApp::uploadURL(const QString &url, const QString& profile, bool markO
void QuantaApp::slotAutosaveTimer()
{
m_config->reparseConfiguration();
- QPtrListIterator<KMdiChildView> childIt(*m_pDocumentViews);
+ TQPtrListIterator<KMdiChildView> childIt(*m_pDocumentViews);
KMdiChildView *view;
QuantaView *qView;
while ( (view = childIt.current()) != 0 )
@@ -3956,9 +3956,9 @@ void QuantaApp::slotAutosaveTimer()
/** Get script output */
void QuantaApp::slotGetScriptOutput(KProcess* ,char* buf,int buflen)
{
- QCString tmp( buf, buflen + 1 );
- m_scriptOutput = QString::null;
- m_scriptOutput = QString::fromLocal8Bit(tmp).remove(" ");
+ TQCString tmp( buf, buflen + 1 );
+ m_scriptOutput = TQString::null;
+ m_scriptOutput = TQString::fromLocal8Bit(tmp).remove(" ");
}
/** Get script error*/
@@ -3993,7 +3993,7 @@ void QuantaApp::slotActivePartChanged(KParts::Part * part)
m_oldKTextEditor = 0L;
}
createGUI(part);
- QWidget * activeWid = m_partManager->activeWidget();
+ TQWidget * activeWid = m_partManager->activeWidget();
if ( activeWid && activeWid->inherits("KTextEditor::View"))
{
m_oldKTextEditor = dynamic_cast<KTextEditor::View *>(activeWid);
@@ -4039,12 +4039,12 @@ void QuantaApp::slotReloadStructTreeView(bool groupOnly)
n = node->child;
}
Tag *commentTag = n->tag;
- QString text = commentTag->tagStr();
+ TQString text = commentTag->tagStr();
int pos = text.find("@annotation");
if (pos != -1)
{
pos += 11;
- QString receiver;
+ TQString receiver;
if (text[pos] == '(')
{
int p = pos;
@@ -4070,11 +4070,11 @@ void QuantaApp::slotReloadStructTreeView(bool groupOnly)
}
}
-QString QuantaApp::saveCurrentFile()
+TQString QuantaApp::saveCurrentFile()
{
Document *w = ViewManager::ref()->activeDocument();
if (!w)
- return QString::null;
+ return TQString::null;
if (w->isModified())
{
if ( KMessageBox::questionYesNo(this,
@@ -4094,7 +4094,7 @@ QString QuantaApp::saveCurrentFile()
}
} else
{
- return QString::null;
+ return TQString::null;
}
}
KURL url = Project::ref()->urlWithPrefix(w->url());
@@ -4122,7 +4122,7 @@ bool QuantaApp::queryClose()
if (quantaStarted)
{
m_config->setGroup("General Options");
- QStringList urlStrList;
+ TQStringList urlStrList;
KURL::List urlList = ViewManager::ref()->openedFiles();
KURL u;
for (KURL::List::Iterator it = urlList.begin(); it != urlList.end(); ++it)
@@ -4132,13 +4132,13 @@ bool QuantaApp::queryClose()
urlStrList += u.url();
}
m_config->writePathEntry("List of opened files", urlStrList);
- QStringList encodings;
- QValueList<Document*> documents = ViewManager::ref()->openedDocuments();
- for (QValueList<Document*>::ConstIterator it = documents.constBegin(); it != documents.constEnd(); ++it)
+ TQStringList encodings;
+ TQValueList<Document*> documents = ViewManager::ref()->openedDocuments();
+ for (TQValueList<Document*>::ConstIterator it = documents.constBegin(); it != documents.constEnd(); ++it)
{
if (!(*it)->isUntitled())
{
- QString encoding = defaultEncoding();
+ TQString encoding = defaultEncoding();
KTextEditor::EncodingInterface* encodingIf = dynamic_cast<KTextEditor::EncodingInterface*>((*it)->doc());
if (encodingIf)
encoding = encodingIf->encoding();
@@ -4160,7 +4160,7 @@ bool QuantaApp::queryClose()
{
saveOptions();
// kdDebug(24000) << "Quanta will exit" << endl;
- emit eventHappened("quanta_exit", QDateTime::currentDateTime().toString(Qt::ISODate), QString::null);
+ emit eventHappened("quanta_exit", TQDateTime::currentDateTime().toString(Qt::ISODate), TQString::null);
} else
slotFileNew();
return canExit;
@@ -4205,7 +4205,7 @@ void QuantaApp::saveOptions()
//If user choose the timer interval, it needs to restart the timer too
m_config->writeEntry("Autosave interval", qConfig.autosaveInterval);
m_config->writePathEntry("Top folders", fTab->topURLList.toStringList());
- QStringList aliasList;
+ TQStringList aliasList;
for (KURL::List::Iterator it2 = fTab->topURLList.begin(); it2 != fTab->topURLList.end(); ++it2)
{
aliasList.append(fTab->topURLAliases[(*it2).url()]);
@@ -4248,12 +4248,12 @@ void QuantaApp::statusBarTimeout()
statusBar()->changeItem("", IDS_STATUS);
}
-QStringList QuantaApp::selectors(const QString &tag)
+TQStringList QuantaApp::selectors(const TQString &tag)
{
return dcopQuanta->selectors(tag);
}
-QStringList QuantaApp::idSelectors()
+TQStringList QuantaApp::idSelectors()
{
return dcopQuanta->idSelectors();
}
@@ -4271,7 +4271,7 @@ void QuantaApp::slotEditCurrentTag()
w->viewCursorIf->cursorPositionReal(&line, &col);
Node *node = parser->nodeAt(line, col, false);
bool isUnknown = true;
- QString tagName;
+ TQString tagName;
if (node && node->tag)
{
Tag *tag = new Tag(*node->tag); //create a copy, as a reparse might happen meantime and that would make node (and node->tag) invalid
@@ -4279,7 +4279,7 @@ void QuantaApp::slotEditCurrentTag()
if ( QuantaCommon::isKnownTag(tag->dtd()->name,tagName) )
{
isUnknown = false;
- QString selection;
+ TQString selection;
if (w->selectionIf)
selection = w->selectionIf->selection();
TagDialog *dlg = new TagDialog( QuantaCommon::tagFromDTD(tag->dtd(),tagName), tag, selection, ViewManager::ref()->activeView()->baseURL() );
@@ -4296,7 +4296,7 @@ void QuantaApp::slotEditCurrentTag()
const DTDStruct *dtd = w->defaultDTD();
if (dtd->family == Xml)
{
- QString currentLine = w->editIf->textLine(line);
+ TQString currentLine = w->editIf->textLine(line);
int sPos = currentLine.findRev('<', col);
if (sPos != -1)
{
@@ -4308,7 +4308,7 @@ void QuantaApp::slotEditCurrentTag()
if ( QuantaCommon::isKnownTag(dtd->name, tag->name) )
{
isUnknown = false;
- QString selection;
+ TQString selection;
if (w->selectionIf)
selection = w->selectionIf->selection();
TagDialog *dlg = new TagDialog( QuantaCommon::tagFromDTD(dtd, tag->name), tag, selection, ViewManager::ref()->activeView()->baseURL() );
@@ -4327,7 +4327,7 @@ void QuantaApp::slotEditCurrentTag()
slotEnableIdleTimer(true);
if (isUnknown)
{
- QString message = i18n("Unknown tag: %1").arg(tagName);
+ TQString message = i18n("Unknown tag: %1").arg(tagName);
slotStatusMsg( message );
}
}
@@ -4378,17 +4378,17 @@ void QuantaApp::slotFrameWizard()
Document *w = ViewManager::ref()->activeDocument();
if (!w)
return;
- QStringList list = w->tagAreas("frameset", true, true);
+ TQStringList list = w->tagAreas("frameset", true, true);
bool framesetExists = !list.isEmpty();
int bl, bc, el, ec;
bl = bc = el = ec = 0;
- QStringList l;
- QStringList l2;
+ TQStringList l;
+ TQStringList l2;
QuantaCommon::normalizeStructure(list[0],l2);
if (framesetExists)
{
- l = QStringList::split('\n',list[0],true);
- QStringList coordList = QStringList::split(',', l[0], true);
+ l = TQStringList::split('\n',list[0],true);
+ TQStringList coordList = TQStringList::split(',', l[0], true);
bl = coordList[0].toInt();
bc = coordList[1].toInt();
el = coordList[2].toInt();
@@ -4407,8 +4407,8 @@ void QuantaApp::slotFrameWizard()
if ( dlg.exec() )
{
- QString tag =
-QString("\n")+dlg.generateFramesetStructure()+QString("\n");
+ TQString tag =
+TQString("\n")+dlg.generateFramesetStructure()+TQString("\n");
if (framesetExists)
{
w->activateParser(false);
@@ -4452,7 +4452,7 @@ void QuantaApp::slotInsertCSS()
while (parentNode && parentNode->parent &&
parentNode->tag->type != Tag::XmlTag)
parentNode = parentNode->parent;
- QString fullDocument = w->editIf->text().stripWhiteSpace();
+ TQString fullDocument = w->editIf->text().stripWhiteSpace();
if (styleNode->tag->name.lower() == "comment block" && styleNode->parent) {
if (styleNode->parent->tag->name.lower() == "style") {
@@ -4463,17 +4463,17 @@ void QuantaApp::slotInsertCSS()
if (styleNode && styleNode->tag->name.lower() == "style" && styleNode->next) //inside <style> invoke the selector editor
{
styleNode->tag->endPos(bLine, bCol);
- QString header(w->text(0, 0, bLine, bCol));// beginning part of the file
+ TQString header(w->text(0, 0, bLine, bCol));// beginning part of the file
styleNode->next->tag->endPos(eLine, eCol);
- QString footer("</style>" + w->text(eLine, eCol+1, lastLine, lastCol)); // ending part of the file
+ TQString footer("</style>" + w->text(eLine, eCol+1, lastLine, lastCol)); // ending part of the file
styleNode->next->tag->beginPos(eLine, eCol);
- QString styleTagContent(w->text(bLine, bCol+1, eLine, eCol-1).remove("<!--").remove("-->"));// <style></style> block content
+ TQString styleTagContent(w->text(bLine, bCol+1, eLine, eCol-1).remove("<!--").remove("-->"));// <style></style> block content
kdDebug(24000) << "Style tag contains: " << endl << styleTagContent << endl;
CSSSelector *dlg = new CSSSelector;
dlg->setCallingFrom("XHTML");
- QFileInfo fi(ViewManager::ref()->currentURL());
+ TQFileInfo fi(ViewManager::ref()->currentURL());
dlg->setFileToPreview(projectBaseURL().path() + fi.baseName());
@@ -4517,7 +4517,7 @@ void QuantaApp::slotInsertCSS()
{
kdDebug(24000) << "[CSS editor] We will add a style attribute to: " << parentNode->tag->name << endl;
CSSEditor *dlg = new CSSEditor(this);
- QFileInfo fi(ViewManager::ref()->currentURL());
+ TQFileInfo fi(ViewManager::ref()->currentURL());
dlg->setFileToPreview(projectBaseURL().path() + fi.baseName(),false);
@@ -4525,7 +4525,7 @@ void QuantaApp::slotInsertCSS()
parentNode->tag->endPos(eLine, eCol);
dlg->setFooter(">" + w->text(eLine, eCol + 1, lastLine, lastCol));
- QString temp;
+ TQString temp;
if (parentNode->tag->hasAttribute("style"))
{
dlg->setInlineStyleContent(parentNode->tag->attributeValue("style"));
@@ -4534,10 +4534,10 @@ void QuantaApp::slotInsertCSS()
temp = tempTag.toString();
} else {
- dlg->setInlineStyleContent(QString::null);
+ dlg->setInlineStyleContent(TQString::null);
temp = parentNode->tag->toString();
}
- //using QString::mid sometimes generates strange results; maybe this is due to a (random) blank in temp
+ //using TQString::mid sometimes generates strange results; maybe this is due to a (random) blank in temp
temp = temp.left(temp.length()-1);//remove >
temp = temp.right(temp.length()-1);//remove <
dlg->setHeader(w->text(0, 0, bLine, bCol) + temp);
@@ -4561,19 +4561,19 @@ void QuantaApp::slotTagMail()
TagMailDlg *mailDlg = new TagMailDlg( this, i18n("Email Link (mailto)"));
if ( mailDlg->exec() ) {
- QString tag = QString(QuantaCommon::tagCase("<a"));
+ TQString tag = TQString(QuantaCommon::tagCase("<a"));
- if ( !QString(mailDlg->lineEmail->text()).isEmpty())
+ if ( !TQString(mailDlg->lineEmail->text()).isEmpty())
{
tag += QuantaCommon::attrCase(" href=")+qConfig.attrValueQuotation+"mailto:"+mailDlg->lineEmail->text();
- if ( !QString(mailDlg->lineSubject->text()).isEmpty())
+ if ( !TQString(mailDlg->lineSubject->text()).isEmpty())
tag += "?subject="+KURL::encode_string(mailDlg->lineSubject->text());
tag += qConfig.attrValueQuotation;
}
- if ( !QString(mailDlg->titleEdit->text()).isEmpty())
+ if ( !TQString(mailDlg->titleEdit->text()).isEmpty())
tag += QuantaCommon::attrCase(" title=")+qConfig.attrValueQuotation+mailDlg->titleEdit->text()+qConfig.attrValueQuotation;
- tag += QString(">");
+ tag += TQString(">");
w->insertTag(tag,QuantaCommon::tagCase("</a>"));
}
delete mailDlg;
@@ -4586,14 +4586,14 @@ void QuantaApp::slotTagMisc()
Document *w = ViewManager::ref()->activeDocument();
if (!w) return;
- static QString element = "";
+ static TQString element = "";
static bool addClosingTag = true;
TagMiscDlg * miscDlg = new TagMiscDlg( this, 0L, addClosingTag, element );
if ( miscDlg->exec() )
{
- QString tag;
+ TQString tag;
element = miscDlg->elementTagName();
element.remove('<');
element.remove('>');
@@ -4616,7 +4616,7 @@ void QuantaApp::slotTagMisc()
/** do quick list */
void QuantaApp::slotTagQuickList()
{
- QString space =" " ;
+ TQString space =" " ;
Document *w = ViewManager::ref()->activeDocument();
if (!w) return;
@@ -4625,20 +4625,20 @@ void QuantaApp::slotTagQuickList()
int i;
int n = listDlg->spinBoxRows->value();
- QString tag;
+ TQString tag;
if ( listDlg->radioOrdered->isChecked())
- tag = QString("<ol>\n")+space;
- else tag = QString("<ul>\n")+space;
+ tag = TQString("<ol>\n")+space;
+ else tag = TQString("<ul>\n")+space;
for ( i=0;i<n;i++)
if ( qConfig.closeTags )
- tag += QString(" <li> </li>\n")+space;
+ tag += TQString(" <li> </li>\n")+space;
else
- tag += QString(" <li> \n")+space;
+ tag += TQString(" <li> \n")+space;
if ( listDlg->radioOrdered->isChecked())
- tag += QString("</ol>");
- else tag += QString("</ul>");
+ tag += TQString("</ol>");
+ else tag += TQString("</ul>");
w->insertTag( QuantaCommon::tagCase(tag));
}
@@ -4650,20 +4650,20 @@ void QuantaApp::slotTagEditTable()
Document *w = ViewManager::ref()->activeDocument();
if (!w) return;
baseNode = parser->rebuild(w);
- QStringList list = w->tagAreas("table", true, false);
+ TQStringList list = w->tagAreas("table", true, false);
bool tableExists = false;
uint line, col;
w->viewCursorIf->cursorPositionReal(&line, &col);
int bl, bc, el, ec;
int bLine, bCol, eLine, eCol;
bLine = bCol = eLine = eCol = 0;
- QStringList l;
- QStringList l2;
- for (QStringList::Iterator it = list.begin(); it != list.end(); ++it)
+ TQStringList l;
+ TQStringList l2;
+ for (TQStringList::Iterator it = list.begin(); it != list.end(); ++it)
{
QuantaCommon::normalizeStructure(*it, l2);
- l = QStringList::split('\n', *it, true);
- QStringList coordList = QStringList::split(',', l[0], true);
+ l = TQStringList::split('\n', *it, true);
+ TQStringList coordList = TQStringList::split(',', l[0], true);
bl = coordList[0].toInt();
bc = coordList[1].toInt();
el = coordList[2].toInt();
@@ -4703,7 +4703,7 @@ void QuantaApp::slotTagEditTable()
}
if (tableRead && editor.exec())
{
- QString tableString = editor.readModifiedTable();
+ TQString tableString = editor.readModifiedTable();
w->activateParser(false);
//#ifdef BUILD_KAFKAPART
// if(w->editIfExt)
@@ -4727,13 +4727,13 @@ void QuantaApp::slotTagColor()
{
Document *w = ViewManager::ref()->activeDocument();
if (!w) return;
- QColor color;
+ TQColor color;
if (KColorDialog::getColor( color )) {
char c[8];
sprintf(c,"#%2X%2X%2X",color.red(),color.green(),color.blue());
for (int i=0;i<7;i++) if (c[i] == ' ') c[i] = '0';
- QString scolor = (char *)c;
+ TQString scolor = (char *)c;
w->insertTag(scolor);
}
}
@@ -4745,7 +4745,7 @@ void QuantaApp::slotTagDate()
if (!w) return;
time_t tektime;
time( &tektime);
- QString stime = ctime( &tektime);
+ TQString stime = ctime( &tektime);
w->insertTag( stime);
}
@@ -4841,7 +4841,7 @@ void QuantaApp::slotPasteHTMLQuoted()
if (w)
{
QClipboard *cb = qApp->clipboard();
- QString text = cb->text();
+ TQString text = cb->text();
if ( ( !text.isNull() ) && (!text.isEmpty() ) )
{
@@ -4851,15 +4851,15 @@ void QuantaApp::slotPasteHTMLQuoted()
text.replace( ">", "&gt;" );
//TODO: Replace only the chars not present in the current encoding.
- QString encoding = defaultEncoding();
+ TQString encoding = defaultEncoding();
KTextEditor::EncodingInterface* encodingIf = dynamic_cast<KTextEditor::EncodingInterface*>(w->doc());
if (encodingIf)
encoding = encodingIf->encoding();
if (encoding != "UTF-8" && encoding != "UTF-16" && encoding != "ISO-10646-UCS-2")
{
- for ( QStringList::Iterator it = charList.begin(); it != charList.end(); ++it )
+ for ( TQStringList::Iterator it = charList.begin(); it != charList.end(); ++it )
{
- QString s = *it;
+ TQString s = *it;
int begin = s.find("(&#") + 3;
if (begin == 1)
continue;
@@ -4869,7 +4869,7 @@ void QuantaApp::slotPasteHTMLQuoted()
int code = s.toInt(&ok);
if (!ok || code < 191)
continue;
- text.replace(QChar(code), QString("&#%1;").arg(s));
+ text.replace(TQChar(code), TQString("&#%1;").arg(s));
}
}
unsigned int line, col;
@@ -4886,7 +4886,7 @@ void QuantaApp::slotPasteURLEncoded()
if (w)
{
QClipboard *cb = qApp->clipboard();
- QString text = cb->text();
+ TQString text = cb->text();
if ( ( !text.isNull() ) && (!text.isEmpty() ) )
{
@@ -4907,7 +4907,7 @@ void QuantaApp::slotUndo ()
if(ViewManager::ref()->activeView()->hadLastFocus() == QuantaView::VPLFocus && w)
{
/**MessageBox::information(this, i18n("VPL does not support this functionality yet."),
- QString::null, "show undo unavailable");*/
+ TQString::null, "show undo unavailable");*/
w->docUndoRedo->undo();
return;
}
@@ -4932,7 +4932,7 @@ void QuantaApp::slotRedo ()
if(ViewManager::ref()->activeView()->hadLastFocus() == QuantaView::VPLFocus)
{
/**KMessageBox::information(this, i18n("VPL does not support this functionality yet."),
- QString::null, "show redo unavailable");*/
+ TQString::null, "show redo unavailable");*/
w->docUndoRedo->redo();
return;
}
@@ -4971,7 +4971,7 @@ void QuantaApp::slotCut()
{
/*
KMessageBox::information(this, i18n("Sorry, VPL does not support this functionality yet."),
- QString::null, "show cut unavailable");
+ TQString::null, "show cut unavailable");
*/
KafkaDocument::ref()->slotCut();
return;
@@ -4991,7 +4991,7 @@ void QuantaApp::slotCopy()
if(view && view->hadLastFocus() == QuantaView::VPLFocus)
{
//KMessageBox::information(this, i18n("Sorry, VPL does not support this functionality yet."),
- //QString::null, "show copy unavailable");
+ //TQString::null, "show copy unavailable");
KafkaDocument::ref()->slotCopy();
return;
}
@@ -5003,15 +5003,15 @@ void QuantaApp::slotCopy()
}
if (m_htmlPart->view()->hasFocus())
{
- QString selection = m_htmlPart->selectedText();
- QClipboard *cb = QApplication::clipboard();
+ TQString selection = m_htmlPart->selectedText();
+ QClipboard *cb = TQApplication::clipboard();
cb->setText(selection, QClipboard::Clipboard);
}
else
if (m_htmlPartDoc->view()->hasFocus())
{
- QString selection = m_htmlPartDoc->selectedText();
- QClipboard *cb = QApplication::clipboard();
+ TQString selection = m_htmlPartDoc->selectedText();
+ QClipboard *cb = TQApplication::clipboard();
cb->setText(selection, QClipboard::Clipboard);
}
@@ -5024,7 +5024,7 @@ void QuantaApp::slotPaste()
if(view && view->hadLastFocus() == QuantaView::VPLFocus)
{
//KMessageBox::information(this, i18n("Sorry, VPL does not support this functionality yet."),
- //QString::null, "show paste unavailable");
+ //TQString::null, "show paste unavailable");
KafkaDocument::ref()->slotPaste();
return;
}
@@ -5036,7 +5036,7 @@ void QuantaApp::slotPaste()
}
}
-Node *QuantaApp::showTagDialogAndReturnNode(const QString &tag, const QString &attr)
+Node *QuantaApp::showTagDialogAndReturnNode(const TQString &tag, const TQString &attr)
{
Node *n = 0L;
QuantaView *view = ViewManager::ref()->activeView();
@@ -5044,7 +5044,7 @@ Node *QuantaApp::showTagDialogAndReturnNode(const QString &tag, const QString &a
{
Document *w = view->document();
- QString selection;
+ TQString selection;
if(view->hadLastFocus() == QuantaView::VPLFocus)
selection = KafkaDocument::ref()->getKafkaWidget()->selectedText();
@@ -5106,9 +5106,9 @@ void QuantaApp::initTabWidget(bool closeButtonsOnly)
if (!closeButtonsOnly)
{
tab->setTabReorderingEnabled(true);
- tab->setTabPosition(QTabWidget::Bottom);
- connect(tab, SIGNAL( contextMenu( QWidget *, const QPoint & ) ), ViewManager::ref(), SLOT(slotTabContextMenu( QWidget *, const QPoint & ) ) );
- connect(tab, SIGNAL(initiateTabMove(int, int)), this, SLOT(slotTabAboutToMove(int, int))); connect(tab, SIGNAL(movedTab(int, int)), this, SLOT(slotTabMoved(int, int))); setTabWidgetVisibility(KMdi::AlwaysShowTabs);
+ tab->setTabPosition(TQTabWidget::Bottom);
+ connect(tab, TQT_SIGNAL( contextMenu( TQWidget *, const TQPoint & ) ), ViewManager::ref(), TQT_SLOT(slotTabContextMenu( TQWidget *, const TQPoint & ) ) );
+ connect(tab, TQT_SIGNAL(initiateTabMove(int, int)), this, TQT_SLOT(slotTabAboutToMove(int, int))); connect(tab, TQT_SIGNAL(movedTab(int, int)), this, TQT_SLOT(slotTabMoved(int, int))); setTabWidgetVisibility(KMdi::AlwaysShowTabs);
}
}
if (!closeButtonsOnly)
@@ -5128,15 +5128,15 @@ void QuantaApp::slotFileClosed(Document *w)
}
}
-void QuantaApp::slotCVSCommandExecuted(const QString& command, const QStringList& files)
+void QuantaApp::slotCVSCommandExecuted(const TQString& command, const TQStringList& files)
{
- QString file;
+ TQString file;
for (uint i = 0; i < files.count(); i++)
{
file = files[i];
if (Project::ref()->contains(KURL::fromPathOrURL(file)))
{
- emit eventHappened("after_" + command, file, QString::null);
+ emit eventHappened("after_" + command, file, TQString::null);
}
}
}
@@ -5154,8 +5154,8 @@ void QuantaApp::closeAllViews()
void QuantaApp::resetDockLayout()
{
- QStringList groupList = m_config->groupList();
- for (QStringList::Iterator it = groupList.begin(); it != groupList.end(); ++it)
+ TQStringList groupList = m_config->groupList();
+ for (TQStringList::Iterator it = groupList.begin(); it != groupList.end(); ++it)
{
if ((*it).startsWith("dock_setting_default"))
{
@@ -5163,7 +5163,7 @@ void QuantaApp::resetDockLayout()
}
}
m_config->sync();
- QWidget *mainDockWidget = getMainDockWidget();
+ TQWidget *mainDockWidget = getMainDockWidget();
addToolWindow(fTab, KDockWidget::DockLeft, mainDockWidget);
addToolWindow(ProjectTreeView::ref(), KDockWidget::DockLeft, mainDockWidget);
addToolWindow(TemplatesTreeView::ref(), KDockWidget::DockLeft, mainDockWidget);
@@ -5178,9 +5178,9 @@ void QuantaApp::resetDockLayout()
m_previewToolView = addToolWindow(m_htmlPart->view(), KDockWidget::DockBottom, mainDockWidget);
if (m_documentationToolView)
m_documentationToolView= addToolWindow(m_htmlPartDoc->view(), KDockWidget::DockBottom, mainDockWidget);
- for (QMap<QWidget*,KMdiToolViewAccessor*>::Iterator it = m_pToolViews->begin(); it != m_pToolViews->end(); ++it)
+ for (TQMap<TQWidget*,KMdiToolViewAccessor*>::Iterator it = m_pToolViews->begin(); it != m_pToolViews->end(); ++it)
{
- QWidget *widget = it.key();
+ TQWidget *widget = it.key();
if (dynamic_cast<ServerTreeView*>(widget))
addToolWindow(widget, KDockWidget::DockRight, mainDockWidget);
if (dynamic_cast<VariablesListView*>(widget))
@@ -5190,11 +5190,11 @@ void QuantaApp::resetDockLayout()
}
}
-KDockWidget::DockPosition QuantaApp::prevDockPosition(QWidget* widget, KDockWidget::DockPosition def)
+KDockWidget::DockPosition QuantaApp::prevDockPosition(TQWidget* widget, KDockWidget::DockPosition def)
{
- QMap<KDockWidget::DockPosition,QString> maps;
- QMap<QString,QString> map;
- QString dock = widget->name();
+ TQMap<KDockWidget::DockPosition,TQString> maps;
+ TQMap<TQString,TQString> map;
+ TQString dock = widget->name();
// Which groups to search through
maps[KDockWidget::DockTop] = "dock_setting_default::KMdiDock::topDock";
@@ -5203,11 +5203,11 @@ KDockWidget::DockPosition QuantaApp::prevDockPosition(QWidget* widget, KDockWidg
maps[KDockWidget::DockRight] = "dock_setting_default::KMdiDock::rightDock";
// Loop the groups
- for(QMap<KDockWidget::DockPosition,QString>::Iterator itmaps = maps.begin(); itmaps != maps.end(); ++itmaps )
+ for(TQMap<KDockWidget::DockPosition,TQString>::Iterator itmaps = maps.begin(); itmaps != maps.end(); ++itmaps )
{
// Loop the items in the group
map = quantaApp->config()->entryMap(itmaps.data());
- for(QMap<QString,QString>::Iterator it = map.begin(); it != map.end(); ++it )
+ for(TQMap<TQString,TQString>::Iterator it = map.begin(); it != map.end(); ++it )
{
// If we found it, return the key of the group
if(it.data() == dock)
@@ -5258,18 +5258,18 @@ void QuantaApp::slotDockWidgetHasUndocked(KDockWidget *widget)
slotPreviewBeingClosed();
}
-void QuantaApp::slotTabDragged(QWidget *widget)
+void QuantaApp::slotTabDragged(TQWidget *widget)
{
QuantaView *view = dynamic_cast<QuantaView*>(widget);
if (view && view->document())
{
- QString url = view->document()->url().url();
- QDragObject *d = new QTextDrag( url, this );
+ TQString url = view->document()->url().url();
+ TQDragObject *d = new TQTextDrag( url, this );
d->dragCopy();
}
}
-void QuantaApp::setTabToolTip(QWidget *w, const QString &toolTipStr)
+void QuantaApp::setTabToolTip(TQWidget *w, const TQString &toolTipStr)
{
if (tabWidget())
tabWidget()->setTabToolTip(w, toolTipStr);
@@ -5282,10 +5282,10 @@ void QuantaApp::createPreviewPart()
m_htmlPart->view()->setIcon(UserIcon("preview"));
m_htmlPart->view()->setCaption(i18n("Preview"));
slotNewPart(m_htmlPart, false);
- connect(m_htmlPart, SIGNAL(previewHasFocus(bool)), this, SLOT(slotPreviewHasFocus(bool)));
- connect(m_htmlPart, SIGNAL(destroyed(QObject *)), this, SLOT(slotHTMLPartDeleted(QObject *)));
- connect(m_htmlPart, SIGNAL(openFile(const KURL&, const QString&, bool)), this, SLOT(slotFileOpen(const KURL&, const QString&, bool)));
- connect(m_htmlPart, SIGNAL(showPreview(bool)), this, SLOT(slotShowPreviewWidget(bool)));
+ connect(m_htmlPart, TQT_SIGNAL(previewHasFocus(bool)), this, TQT_SLOT(slotPreviewHasFocus(bool)));
+ connect(m_htmlPart, TQT_SIGNAL(destroyed(TQObject *)), this, TQT_SLOT(slotHTMLPartDeleted(TQObject *)));
+ connect(m_htmlPart, TQT_SIGNAL(openFile(const KURL&, const TQString&, bool)), this, TQT_SLOT(slotFileOpen(const KURL&, const TQString&, bool)));
+ connect(m_htmlPart, TQT_SIGNAL(showPreview(bool)), this, TQT_SLOT(slotShowPreviewWidget(bool)));
}
@@ -5296,21 +5296,21 @@ void QuantaApp::createDocPart()
m_htmlPartDoc->view()->setIcon(SmallIcon("contents"));
m_htmlPartDoc->view()->setCaption(i18n("Documentation"));
slotNewPart(m_htmlPartDoc, false);
- connect(m_htmlPartDoc, SIGNAL(destroyed(QObject *)), this, SLOT(slotHTMLPartDeleted(QObject *)));
+ connect(m_htmlPartDoc, TQT_SIGNAL(destroyed(TQObject *)), this, TQT_SLOT(slotHTMLPartDeleted(TQObject *)));
}
-void QuantaApp::insertTagActionPoolItem(QString const& action_item)
+void QuantaApp::insertTagActionPoolItem(TQString const& action_item)
{
- for(QStringList::Iterator it = m_tagActionPool.begin(); it != m_tagActionPool.end(); ++it)
+ for(TQStringList::Iterator it = m_tagActionPool.begin(); it != m_tagActionPool.end(); ++it)
if(action_item == *it)
return;
m_tagActionPool += action_item;
}
-void QuantaApp::removeTagActionPoolItem(QString const& action_item)
+void QuantaApp::removeTagActionPoolItem(TQString const& action_item)
{
- for(QStringList::Iterator it = m_tagActionPool.begin(); it != m_tagActionPool.end(); ++it)
+ for(TQStringList::Iterator it = m_tagActionPool.begin(); it != m_tagActionPool.end(); ++it)
{
if(action_item == *it)
{
@@ -5320,7 +5320,7 @@ void QuantaApp::removeTagActionPoolItem(QString const& action_item)
}
}
-void QuantaApp::slotHTMLPartDeleted(QObject *object)
+void QuantaApp::slotHTMLPartDeleted(TQObject *object)
{
if (object == m_htmlPart)
{
@@ -5335,17 +5335,17 @@ void QuantaApp::slotTabMoved(int from, int to)
KMdiChildView *view = m_pDocumentViews->at(from);
m_pDocumentViews->remove(from);
m_pDocumentViews->insert(to, view);
- connect(this, SIGNAL(viewActivated (KMdiChildView *)), ViewManager::ref(), SLOT(slotViewActivated(KMdiChildView*)));
+ connect(this, TQT_SIGNAL(viewActivated (KMdiChildView *)), ViewManager::ref(), TQT_SLOT(slotViewActivated(KMdiChildView*)));
}
void QuantaApp::slotTabAboutToMove(int from, int to)
{
Q_UNUSED(from);
Q_UNUSED(to);
- disconnect(this, SIGNAL(viewActivated (KMdiChildView *)), ViewManager::ref(), SLOT(slotViewActivated(KMdiChildView*)));
+ disconnect(this, TQT_SIGNAL(viewActivated (KMdiChildView *)), ViewManager::ref(), TQT_SLOT(slotViewActivated(KMdiChildView*)));
}
-QString QuantaApp::currentURL() const
+TQString QuantaApp::currentURL() const
{
return ViewManager::ref()->currentURL();
}
@@ -5368,7 +5368,7 @@ void QuantaApp::slotAnnotate()
}
}
-void QuantaApp::dropEvent(QDropEvent* event)
+void QuantaApp::dropEvent(TQDropEvent* event)
{
if (KURLDrag::canDecode(event))
{
@@ -5382,7 +5382,7 @@ void QuantaApp::dropEvent(QDropEvent* event)
}
}
-void QuantaApp::dragEnterEvent( QDragEnterEvent *e)
+void QuantaApp::dragEnterEvent( TQDragEnterEvent *e)
{
e->accept();
}
diff --git a/quanta/src/quanta.h b/quanta/src/quanta.h
index 5cee4c1f..a29ba1f4 100644
--- a/quanta/src/quanta.h
+++ b/quanta/src/quanta.h
@@ -31,11 +31,11 @@
#define IDS_DEFAULT "Ready."
// include files for Qt
-#include <qmap.h>
-#include <qdict.h>
-#include <qvaluelist.h>
-#include <qstrlist.h>
-#include <qptrlist.h>
+#include <tqmap.h>
+#include <tqdict.h>
+#include <tqvaluelist.h>
+#include <tqstrlist.h>
+#include <tqptrlist.h>
// include files for KDE
#include <kdeversion.h>
@@ -122,7 +122,7 @@ public:
~QuantaApp();
QuantaDoc *doc() const {return m_doc; }
- QPopupMenu *tagsMenu() const {return m_tagsMenu;}
+ TQPopupMenu *tagsMenu() const {return m_tagsMenu;}
KConfig *config() const {return m_config;}
//TODO: check if we really need these "get" methods (and get rid o get)
@@ -133,39 +133,39 @@ public:
DebuggerManager *debugger() const {return m_debugger;}
KParts::PartManager *partManager() {return m_partManager;}
- QWidget* createContainer(QWidget *parent, int index, const QDomElement &element, int &id );
- void removeContainer(QWidget *container, QWidget *parent, QDomElement &element, int id );
+ TQWidget* createContainer(TQWidget *parent, int index, const TQDomElement &element, int &id );
+ void removeContainer(TQWidget *container, TQWidget *parent, TQDomElement &element, int id );
/** Returns the project's base URL if it exists, the HOME dir if there is no project and no opened document (or the current opened document was not saved yet), and the base URL of the opened document, if it is saved somewhere.
maps to the same function in Project*/
KURL projectBaseURL() const;
/** Returns the project (if there is one loaded) or global default encoding. */
- QString defaultEncoding();
+ TQString defaultEncoding();
/** Returns the interface number for the currently active editor. */
int currentEditorIfNum() const;
/** Return the URL of the currently active document */
- QString currentURL() const;
+ TQString currentURL() const;
/** Return the URL of the currently project */
- QString projectURL() const;
+ TQString projectURL() const;
/** Return the list of opened URLs and their editor interface numbers*/
- QStringList openedURLs() const;
- QString saveCurrentFile();
+ TQStringList openedURLs() const;
+ TQString saveCurrentFile();
/**
* Sets the DTEP for the current document.
* @param dtepName the name (nickname or full name) of the DTEP
* @param convert if true, converts the !DOCTYPE line to the new DTEP
*/
- void setDtep(const QString& dtepName, bool convert);
- QStringList tagAreas(const QString& name, bool includeCoordinates, bool skipFoundContent) const;
- QString documentFolderForURL(const QString &url);
- QString urlWithPreviewPrefix(const QString &url);
- void addFileToProject(const QString &url);
- void addFolderToProject(const QString &url);
- void uploadURL(const QString &url, const QString& profile, bool markOnly); /** Capture DCOP signals from KXsldbgPart or similar plugin */
- void newCursorPosition(const QString &file, int lineNumber, int columnNumber);
- void newDebuggerPosition(const QString &file, int lineNumber);
- void openFile(const QString &file, int lineNumber, int columnNumber);
+ void setDtep(const TQString& dtepName, bool convert);
+ TQStringList tagAreas(const TQString& name, bool includeCoordinates, bool skipFoundContent) const;
+ TQString documentFolderForURL(const TQString &url);
+ TQString urlWithPreviewPrefix(const TQString &url);
+ void addFileToProject(const TQString &url);
+ void addFolderToProject(const TQString &url);
+ void uploadURL(const TQString &url, const TQString& profile, bool markOnly); /** Capture DCOP signals from KXsldbgPart or similar plugin */
+ void newCursorPosition(const TQString &file, int lineNumber, int columnNumber);
+ void newDebuggerPosition(const TQString &file, int lineNumber);
+ void openFile(const TQString &file, int lineNumber, int columnNumber);
/** reparse current document and initialize node. */
void reparse(bool force);
@@ -176,8 +176,8 @@ public:
//return the old Cursor position
void oldCursorPos(uint &line, uint &col) {line = oldCursorLine; col = oldCursorCol;}
- QStringList selectors(const QString& tag);
- QStringList idSelectors();
+ TQStringList selectors(const TQString& tag);
+ TQStringList idSelectors();
WHTMLPart *documentationPart() {return m_htmlPartDoc;}
/** Show the toolbar which is in url. If it was not loaded yet, it loads the
toolbar from the file */
@@ -195,7 +195,7 @@ public:
* @param attr The string containing the attrs of the new Node to create.
* @return Returns a new Node created according to the contents of the TagDialog.
*/
- Node *showTagDialogAndReturnNode(const QString &tag, const QString &attr = QString::null);
+ Node *showTagDialogAndReturnNode(const TQString &tag, const TQString &attr = TQString::null);
/** Returns the baseURL of the document. */
KURL baseURL();
@@ -203,7 +203,7 @@ public:
/** Called when a document was closed. Resets some variables. */
void slotFileClosed(Document *w);
- void setTabToolTip(QWidget *w, const QString& toolTipStr);
+ void setTabToolTip(TQWidget *w, const TQString& toolTipStr);
void createPreviewPart();
void createDocPart();
@@ -214,18 +214,18 @@ public:
* If the user presses a key right away the character is inserted inside the tags for the queued actions.
* If the user changes the place of the cursor, the actions waiting for being inserted are removed.
*/
- QStringList const& tagActionPool() const {return m_tagActionPool;}
- void insertTagActionPoolItem(QString const& action_item);
- void removeTagActionPoolItem(QString const& action_item);
+ TQStringList const& tagActionPool() const {return m_tagActionPool;}
+ void insertTagActionPoolItem(TQString const& action_item);
+ void removeTagActionPoolItem(TQString const& action_item);
void removeAllTagActionPoolItems() {m_tagActionPool.clear();}
/** Updates the structure and attribute treeview. */
void updateTreeViews();
- void setTitle(const QString&);
+ void setTitle(const TQString&);
- QPtrList<TagAction> const& tagActions() const {return m_tagActions;}
+ TQPtrList<TagAction> const& tagActions() const {return m_tagActions;}
/** Clicked word or selected text for context sensitive menu in editor */
- QString popupWord;
+ TQString popupWord;
signals: // Signals
/** signal used to hide the splash screen */
@@ -234,20 +234,20 @@ signals: // Signals
void reloadAllTrees();
/** Emitted when some kind of event that can have associated actions has happened. */
- void eventHappened(const QString&, const QString&, const QString& );
+ void eventHappened(const TQString&, const TQString&, const TQString& );
- void toolbarRemoved(const QString&);
+ void toolbarRemoved(const TQString&);
- void showMessage(const QString&, bool);
+ void showMessage(const TQString&, bool);
void clearMessages();
public slots:
void slotFileNew();
void slotFileOpen();
void slotFileOpen(const KURL &url);
- void slotFileOpen(const KURL &url, const QString &encoding);
- void slotFileOpen(const KURL &url, const QString &encoding, bool readOnly);
- void slotFileOpen(const KURL::List &urls, const QString& encoding);
+ void slotFileOpen(const KURL &url, const TQString &encoding);
+ void slotFileOpen(const KURL &url, const TQString &encoding, bool readOnly);
+ void slotFileOpen(const KURL::List &urls, const TQString& encoding);
void slotFileSave();
bool slotFileSaveAs(QuantaView *viewToSave = 0L);
void slotFileSaveAsLocalTemplate();
@@ -269,7 +269,7 @@ public slots:
void slotEditFindInFiles();
/// open url in documentation window
- void openDoc(const QString& url);
+ void openDoc(const TQString& url);
void slotContextHelp();
@@ -281,11 +281,11 @@ public slots:
WARNING: Don't use in place where nothing should happen until the function
exits (like in startup code, DTD reading, etc.) as it calls processEvents() and
unexpected things may happen. */
- void slotStatusMsg(const QString &text);
+ void slotStatusMsg(const TQString &text);
void slotNewStatus();
void slotNewLineColumn();
-// void slotUpdateStatus(QWidget*);FIXME:
+// void slotUpdateStatus(TQWidget*);FIXME:
/** repaint preview */
void slotRepaintPreview();
@@ -317,11 +317,11 @@ public slots:
void slotOptionsConfigureToolbars();
void slotNewToolbarConfig();
/** Configure toolbars, show defaultToolbar by default */
- void slotConfigureToolbars(const QString& defaultToolbar = QString::null);
+ void slotConfigureToolbars(const TQString& defaultToolbar = TQString::null);
void slotOptionsConfigureActions();
void setCursorPosition(int row, int col );
- void gotoFileAndLine(const QString& filename, int line, int column);
+ void gotoFileAndLine(const TQString& filename, int line, int column);
void selectArea(int line1, int col1, int line2, int col2);
@@ -338,7 +338,7 @@ public slots:
/** Saves a toolbar as project specific. */
void slotSaveProjectToolbar();
/** Loads the toolbars for dtd named dtdName and unload the ones belonging to oldDtdName. */
- void slotLoadToolbarForDTD(const QString& dtdName);
+ void slotLoadToolbarForDTD(const TQString& dtdName);
/** Load an user toolbar from the disk. */
void slotLoadToolbarFile(const KURL& url);
/** Load an user toolbar from the disk. */
@@ -346,22 +346,22 @@ public slots:
/** Load a global toolbar from the disk. */
void slotLoadGlobalToolbar();
/** Remove the toolbar named "name". */
- bool slotRemoveToolbar(const QString& name);
+ bool slotRemoveToolbar(const TQString& name);
/** Rename the toolbar named "name". */
- void slotRenameToolbar(const QString& name);
+ void slotRenameToolbar(const TQString& name);
/** Rename the toolbar. */
void slotRenameToolbar();
/** Delete an action */
void slotDeleteAction(KAction *action);
/** Remove the action from toolbar*/
- void slotRemoveAction(const QString&, const QString& actionName);
+ void slotRemoveAction(const TQString&, const TQString& actionName);
/** Edit the action */
- void slotEditAction(const QString&);
+ void slotEditAction(const TQString&);
/** Creates a new, empty action */
void slotNewAction();
/** Creates a script action for a_scriptURL using the a_interpreter as the script
interpreter application */
- void slotAssignActionToScript(const KURL&a_scriptURL, const QString& a_interpreter);
+ void slotAssignActionToScript(const KURL&a_scriptURL, const TQString& a_interpreter);
/** Change the DTD/DTEP of the current document. */
void slotChangeDTD();
@@ -374,7 +374,7 @@ public slots:
/** Show or hide the groups for dtepName in the structure tree.
The special value of "clear" for dtepName means show groups
for all DTEPs found in the document.*/
- void slotShowGroupsForDTEP(const QString& dtepName, bool show);
+ void slotShowGroupsForDTEP(const TQString& dtepName, bool show);
/** Build the project specific toolbar menu. */
void slotBuildPrjToolbarsMenu();
@@ -410,10 +410,10 @@ public slots:
void slotDeleteFile(QuantaView *view=0L);
/** Called when the CVS command working on files was executed successfully. */
- void slotCVSCommandExecuted(const QString &command, const QStringList &files);
+ void slotCVSCommandExecuted(const TQString &command, const TQStringList &files);
/** Called when the preview or documentation part is deleted. */
- void slotHTMLPartDeleted(QObject *object);
+ void slotHTMLPartDeleted(TQObject *object);
void slotRefreshActiveWindow();
@@ -430,7 +430,7 @@ public slots:
void slotGetUserToolbarFiles(KURL::List *list);
// Get saved position of dock
- KDockWidget::DockPosition prevDockPosition(QWidget* dock, KDockWidget::DockPosition def);
+ KDockWidget::DockPosition prevDockPosition(TQWidget* dock, KDockWidget::DockPosition def);
protected slots:
void slotDockWidgetHasUndocked(KDockWidget *widget);
@@ -458,11 +458,11 @@ protected slots:
/** Downloads a template from the main server */
void slotDownloadTemplate();
/** Uploads a template to the main server */
- void slotUploadTemplate(const QString &fileName);
+ void slotUploadTemplate(const TQString &fileName);
/** Downloads a script from the main server */
void slotDownloadScript();
/** Uploads a script to the main server */
- void slotUploadScript(const QString &fileName);
+ void slotUploadScript(const TQString &fileName);
/** Downloads a documentation from the main server */
void slotDownloadDoc();
/** Shows tip of the day */
@@ -518,42 +518,42 @@ protected slots:
void slotShowSourceEditor();
void slotShowVPLAndSourceEditor();
void slotShowVPLOnly();
- void slotTabDragged(QWidget *widget);
+ void slotTabDragged(TQWidget *widget);
void slotTabMoved(int from, int to);
void slotTabAboutToMove(int from, int to);
void slotAnnotate();
protected:
/** Create a DTEP tarball which can be uploaded or sent in email. Returns
- * the name of the created file or QString::null if creation has failed.
+ * the name of the created file or TQString::null if creation has failed.
*/
- QString createDTEPTarball();
+ TQString createDTEPTarball();
/** Create a toolbar tarball which can be uploaded or sent in email. Returns
- * the name of the created file or QString::null if creation has failed.
+ * the name of the created file or TQString::null if creation has failed.
*/
- QString createToolbarTarball();
+ TQString createToolbarTarball();
/** Ask for save all the modified user toolbars. */
bool removeToolbars();
/** Returns true if all toolbars are hidden, false otherwise. */
bool allToolbarsHidden() const;
/** No descriptions */
- virtual void focusInEvent(QFocusEvent*);
+ virtual void focusInEvent(TQFocusEvent*);
void saveOptions();
virtual bool queryClose();
void saveAsTemplate (bool projectTemplate, bool selectionOnly = false);
/** Saves a toolbar as local or project specific. */
- bool saveToolbar(bool localToolbar = true, const QString& toolbarToSave = QString::null, const KURL& destURL = KURL());
+ bool saveToolbar(bool localToolbar = true, const TQString& toolbarToSave = TQString::null, const KURL& destURL = KURL());
/** Saves the toolbar and the actions. Returns the name of the actions file*/
- KURL saveToolbarToFile(const QString& toolbarName,const KURL& destFile);
+ KURL saveToolbarToFile(const TQString& toolbarName,const KURL& destFile);
/** Makes the tabwidget look and behave like we want. If closeButtonsOnly is true,
only the close button behavior is changed. */
void initTabWidget(bool closeButtonsOnly = false);
- void dropEvent(QDropEvent *ev);
- void dragEnterEvent ( QDragEnterEvent * );
+ void dropEvent(TQDropEvent *ev);
+ void dragEnterEvent ( TQDragEnterEvent * );
void resetDockLayout();
@@ -578,7 +578,7 @@ private:
QuantaPluginInterface *m_pluginInterface;
- QPopupMenu *m_tagsMenu;
+ TQPopupMenu *m_tagsMenu;
// config
KConfig *m_config;
@@ -591,7 +591,7 @@ private:
QuantaDoc *m_doc;
/** parsered tree of document */
- QTimer *statusbarTimer;
+ TQTimer *statusbarTimer;
// ACTIONS
KRecentFilesAction *projectToolbarFiles;
@@ -603,9 +603,9 @@ private:
KAction *editTagAction, *selectTagAreaAction;
- QDomDocument* m_actions;
+ TQDomDocument* m_actions;
- QPtrList<KTextEditor::Mark> markList;
+ TQPtrList<KTextEditor::Mark> markList;
int currentPageIndex;
uint userToolbarsCount;
@@ -620,37 +620,37 @@ private:
bool m_noFramesPreview;
bool m_parserEnabled; ///< enables/disables reparsing. If false, even a forced reparse is ignored (used when opening multiple files)
- QString m_scriptOutput;
+ TQString m_scriptOutput;
- QStringList m_tagActionPool;
- QPtrList<TagAction> m_tagActions;
+ TQStringList m_tagActionPool;
+ TQPtrList<TagAction> m_tagActions;
protected: // Protected attributes
/** Timer to refresh the structure tree. */
- QTimer *refreshTimer;
+ TQTimer *refreshTimer;
/** Timer to detect idle periods. Every time the cursor moves the timer is
restarted.*/
- QTimer *idleTimer;
+ TQTimer *idleTimer;
/** The toolbars for this DTD are currently shown to the user. */
- QString currentToolbarDTD;
+ TQString currentToolbarDTD;
KDockWidget *m_oldTreeViewWidget;
/** The ids of the widgets visible before doing the preview/documentation browsing */
- QValueList<int> previousWidgetList;
+ TQValueList<int> previousWidgetList;
/* Store the old shortcuts from the local quantaui.rc */
- QMap<QString, QString> oldShortcuts;
+ TQMap<TQString, TQString> oldShortcuts;
KURL urlUnderCursor;
- QTimer *autosaveTimer;
+ TQTimer *autosaveTimer;
DCOPSettings *dcopSettings;
DCOPQuanta *dcopQuanta;
KParts::PartManager *m_partManager; ///< the pointer to the part manager
- QGuardedPtr<KTextEditor::View> m_oldKTextEditor; ///< remembers the last activated GUI
+ TQGuardedPtr<KTextEditor::View> m_oldKTextEditor; ///< remembers the last activated GUI
QNewDTEPStuff *m_newDTEPStuff;
QNewToolbarStuff *m_newToolbarStuff;
QNewTemplateStuff *m_newTemplateStuff;
QNewScriptStuff *m_newScriptStuff;
QNewDocStuff *m_newDocStuff;
- QDict<ToolbarEntry> m_toolbarList;
+ TQDict<ToolbarEntry> m_toolbarList;
public: //TODO: check if it's worth to make a read method for them
KRecentFilesAction *fileRecent;
diff --git a/quanta/src/quanta_init.cpp b/quanta/src/quanta_init.cpp
index 91f9f043..3a752299 100644
--- a/quanta/src/quanta_init.cpp
+++ b/quanta/src/quanta_init.cpp
@@ -17,21 +17,21 @@
***************************************************************************/
// include files for QT
-#include <qdir.h>
-#include <qprinter.h>
-#include <qpainter.h>
-#include <qtabwidget.h>
-#include <qwidgetstack.h>
-#include <qlayout.h>
-#include <qeventloop.h>
-#include <qtimer.h>
-#include <qdom.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qtextcodec.h>
-#include <qpopupmenu.h>
-#include <qdatetime.h>
-#include <qradiobutton.h>
+#include <tqdir.h>
+#include <tqprinter.h>
+#include <tqpainter.h>
+#include <tqtabwidget.h>
+#include <tqwidgetstack.h>
+#include <tqlayout.h>
+#include <tqeventloop.h>
+#include <tqtimer.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqtextcodec.h>
+#include <tqpopupmenu.h>
+#include <tqdatetime.h>
+#include <tqradiobutton.h>
// include files for KDE
#include <dcopclient.h>
@@ -113,13 +113,13 @@
#include "tagactionmanager.h"
#include "tagactionset.h"
-extern QMap<int, QString> replacementMap;
+extern TQMap<int, TQString> replacementMap;
QuantaInit::QuantaInit(QuantaApp * quantaApp)
- : QObject()
+ : TQObject()
{
m_quanta = quantaApp;
- connect(this, SIGNAL(hideSplash()), m_quanta, SLOT(slotHideSplash()));
+ connect(this, TQT_SIGNAL(hideSplash()), m_quanta, TQT_SLOT(slotHideSplash()));
}
QuantaInit::~QuantaInit()
@@ -133,8 +133,8 @@ void QuantaInit::initQuanta()
m_config = quantaApp->m_config;
parser = new Parser();
- QStringList tmpDirs = KGlobal::dirs()->resourceDirs("tmp");
- QDir dir;
+ TQStringList tmpDirs = KGlobal::dirs()->resourceDirs("tmp");
+ TQDir dir;
tmpDir = tmpDirs[0];
for (uint i = 0; i < tmpDirs.count(); i++)
{
@@ -171,13 +171,13 @@ void QuantaInit::initQuanta()
// Initialize debugger
m_quanta->m_debugger = new DebuggerManager(m_quanta);
- connect(Project::ref(), SIGNAL(newProjectLoaded(const QString &, const KURL &, const KURL &)),
- m_quanta->m_debugger, SLOT(slotNewProjectLoaded(const QString &, const KURL &, const KURL &)));
- connect(Project::ref(), SIGNAL(eventHappened(const QString &, const QString &, const QString &)),
- m_quanta->m_debugger, SLOT(slotHandleEvent(const QString &, const QString &, const QString &)));
- connect(m_quanta->m_debugger, SIGNAL(hideSplash()), m_quanta, SLOT(slotHideSplash()));
+ connect(Project::ref(), TQT_SIGNAL(newProjectLoaded(const TQString &, const KURL &, const KURL &)),
+ m_quanta->m_debugger, TQT_SLOT(slotNewProjectLoaded(const TQString &, const KURL &, const KURL &)));
+ connect(Project::ref(), TQT_SIGNAL(eventHappened(const TQString &, const TQString &, const TQString &)),
+ m_quanta->m_debugger, TQT_SLOT(slotHandleEvent(const TQString &, const TQString &, const TQString &)));
+ connect(m_quanta->m_debugger, TQT_SIGNAL(hideSplash()), m_quanta, TQT_SLOT(slotHideSplash()));
- //m_quanta->KDockMainWindow::createGUI( QString::null, false /* conserveMemory */ );
+ //m_quanta->KDockMainWindow::createGUI( TQString::null, false /* conserveMemory */ );
m_quanta->createShellGUI(true);
addToolTreeView(m_quanta->fTab, i18n("Files"), UserIcon("ftab"), KDockWidget::DockLeft);
@@ -193,7 +193,7 @@ void QuantaInit::initQuanta()
// Restore the dock layout
m_config->setGroup ("General Options");
- QString layout = m_config->readEntry("Window layout", "Default");
+ TQString layout = m_config->readEntry("Window layout", "Default");
int mdiMode = m_config->readNumEntry("MDI mode", -1);
if (mdiMode != -1 && layout != "Default")
{
@@ -209,24 +209,24 @@ void QuantaInit::initQuanta()
if (mdiMode == KMdi::ToplevelMode)
{
m_quanta->switchToChildframeMode();
- QTimer::singleShot(0, m_quanta, SLOT(switchToToplevelMode()));
+ TQTimer::singleShot(0, m_quanta, TQT_SLOT(switchToToplevelMode()));
}
// Always hide debugger toolbar at this point
m_quanta->toolBar("debugger_toolbar")->hide();
- m_quanta->m_pluginInterface->setPluginMenu(static_cast<QPopupMenu*>(m_quanta->factory()->container("plugins", m_quanta)));
+ m_quanta->m_pluginInterface->setPluginMenu(static_cast<TQPopupMenu*>(m_quanta->factory()->container("plugins", m_quanta)));
m_quanta->m_pluginInterface->buildPluginMenu();
//TODO: Remove after upgrade from 3.1 is not supported
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent(KXMLGUIFactory::readConfigFile(m_quanta->xmlFile(), m_quanta->instance()));
- QDomNodeList nodeList = doc.elementsByTagName("ActionProperties");
- QDomNode node = nodeList.item(0).firstChild();
+ TQDomNodeList nodeList = doc.elementsByTagName("ActionProperties");
+ TQDomNode node = nodeList.item(0).firstChild();
while (!node.isNull())
{
if (node.nodeName() == "Action")
{
- QDomElement el = node.toElement();
+ TQDomElement el = node.toElement();
m_quanta->oldShortcuts.insert(el.attribute("name"), el.attribute("shortcut"));
node = node.nextSibling();
el.parentNode().removeChild(el);
@@ -238,7 +238,7 @@ void QuantaInit::initQuanta()
m_quanta->applyMainWindowSettings(m_config);
- m_quanta->m_tagsMenu = static_cast<QPopupMenu*>(m_quanta->factory()->container("tags", m_quanta));
+ m_quanta->m_tagsMenu = static_cast<TQPopupMenu*>(m_quanta->factory()->container("tags", m_quanta));
KMenuBar *mb = m_quanta->menuBar();
for (uint i = 0 ; i < mb->count(); i++)
{
@@ -252,20 +252,20 @@ void QuantaInit::initQuanta()
if (toolviewMenu)
toolviewMenu->plug(m_quanta->windowMenu());
- QPopupMenu *toolbarsMenu = (QPopupMenu*)(m_quanta->guiFactory())->container("toolbars_load", m_quanta);
- connect(toolbarsMenu, SIGNAL(aboutToShow()), m_quanta, SLOT(slotBuildPrjToolbarsMenu()));
+ TQPopupMenu *toolbarsMenu = (TQPopupMenu*)(m_quanta->guiFactory())->container("toolbars_load", m_quanta);
+ connect(toolbarsMenu, TQT_SIGNAL(aboutToShow()), m_quanta, TQT_SLOT(slotBuildPrjToolbarsMenu()));
- QPopupMenu *contextMenu = (QPopupMenu*)(m_quanta->guiFactory())->container("popup_editor", m_quanta);
- connect(contextMenu, SIGNAL(aboutToShow()), m_quanta, SLOT(slotContextMenuAboutToShow()));
+ TQPopupMenu *contextMenu = (TQPopupMenu*)(m_quanta->guiFactory())->container("popup_editor", m_quanta);
+ connect(contextMenu, TQT_SIGNAL(aboutToShow()), m_quanta, TQT_SLOT(slotContextMenuAboutToShow()));
- connect(m_quanta->m_messageOutput, SIGNAL(clicked(const QString&, int, int)),
- m_quanta, SLOT(gotoFileAndLine(const QString&, int, int)));
- connect(m_quanta->m_problemOutput, SIGNAL(clicked(const QString&, int, int)),
- m_quanta, SLOT(gotoFileAndLine(const QString&, int, int)));
- connect(m_quanta->m_annotationOutput->currentFileAnnotations(), SIGNAL(clicked(const QString&, int, int)),
- m_quanta, SLOT(gotoFileAndLine(const QString&, int, int)));
- connect(m_quanta->m_annotationOutput, SIGNAL(clicked(const QString&, int, int)),
- m_quanta, SLOT(gotoFileAndLine(const QString&, int, int)));
+ connect(m_quanta->m_messageOutput, TQT_SIGNAL(clicked(const TQString&, int, int)),
+ m_quanta, TQT_SLOT(gotoFileAndLine(const TQString&, int, int)));
+ connect(m_quanta->m_problemOutput, TQT_SIGNAL(clicked(const TQString&, int, int)),
+ m_quanta, TQT_SLOT(gotoFileAndLine(const TQString&, int, int)));
+ connect(m_quanta->m_annotationOutput->currentFileAnnotations(), TQT_SIGNAL(clicked(const TQString&, int, int)),
+ m_quanta, TQT_SLOT(gotoFileAndLine(const TQString&, int, int)));
+ connect(m_quanta->m_annotationOutput, TQT_SIGNAL(clicked(const TQString&, int, int)),
+ m_quanta, TQT_SLOT(gotoFileAndLine(const TQString&, int, int)));
m_quanta->slotFileNew();
m_quanta->slotNewStatus();
@@ -275,23 +275,23 @@ void QuantaInit::initQuanta()
KTipDialog::showTip(m_quanta);
//get the PID of this running instance
- qConfig.quantaPID = QString::number(int(getpid()), 10);
+ qConfig.quantaPID = TQString::number(int(getpid()), 10);
qConfig.backupDirPath = KGlobal::instance()->dirs()->saveLocation("data", resourceDir + "backups/");
- m_quanta->autosaveTimer = new QTimer(m_quanta);
- connect(m_quanta->autosaveTimer, SIGNAL(timeout()), m_quanta, SLOT(slotAutosaveTimer()));
+ m_quanta->autosaveTimer = new TQTimer(m_quanta);
+ connect(m_quanta->autosaveTimer, TQT_SIGNAL(timeout()), m_quanta, TQT_SLOT(slotAutosaveTimer()));
m_quanta->autosaveTimer->start(qConfig.autosaveInterval * 60000, false);
- connect(m_quanta->m_doc, SIGNAL(hideSplash()), m_quanta, SLOT(slotHideSplash()));
- connect(parser, SIGNAL(rebuildStructureTree(bool)),
- m_quanta, SLOT(slotReloadStructTreeView(bool)));
+ connect(m_quanta->m_doc, TQT_SIGNAL(hideSplash()), m_quanta, TQT_SLOT(slotHideSplash()));
+ connect(parser, TQT_SIGNAL(rebuildStructureTree(bool)),
+ m_quanta, TQT_SLOT(slotReloadStructTreeView(bool)));
// Read list of characters
- QFile file(locate("appdata","chars"));
+ TQFile file(locate("appdata","chars"));
if ( file.open(IO_ReadOnly) ) { // file opened successfully
- QTextStream t( &file ); // use a text stream
- t.setEncoding(QTextStream::UnicodeUTF8);
- QString s;
+ TQTextStream t( &file ); // use a text stream
+ t.setEncoding(TQTextStream::UnicodeUTF8);
+ TQString s;
while (!t.eof())
{
s = t.readLine();
@@ -300,22 +300,22 @@ void QuantaInit::initQuanta()
if (begin == 1)
continue;
int length = s.find(";)") - begin + 1;
- QString s2 = s.mid(begin, length - 1);
+ TQString s2 = s.mid(begin, length - 1);
replacementMap[s[0].unicode()] = s2;
}
file.close();
}
- QString infoCss = tmpDir;
- infoCss.replace(QRegExp("/quanta$"),"");
+ TQString infoCss = tmpDir;
+ infoCss.replace(TQRegExp("/quanta$"),"");
infoCss += "/info.css";
QExtFileInfo::copy(KURL().fromPathOrURL(qConfig.globalDataDir + resourceDir + "scripts/info.css"), KURL().fromPathOrURL(infoCss));
checkRuntimeDependencies();
ViewManager::ref()->activeDocument()->view()->setFocus();
- m_quanta->refreshTimer = new QTimer(m_quanta);
- connect(m_quanta->refreshTimer, SIGNAL(timeout()), m_quanta, SLOT(slotReparse()));
+ m_quanta->refreshTimer = new TQTimer(m_quanta);
+ connect(m_quanta->refreshTimer, TQT_SIGNAL(timeout()), m_quanta, TQT_SLOT(slotReparse()));
m_quanta->refreshTimer->start( qConfig.refreshFrequency*1000, false ); //update the structure tree every 5 seconds
if (qConfig.instantUpdate || qConfig.refreshFrequency == 0)
{
@@ -332,9 +332,9 @@ void QuantaInit::initToolBars()
void QuantaInit::initStatusBar()
{
- m_quanta->statusbarTimer = new QTimer(m_quanta);
- connect(m_quanta->statusbarTimer,SIGNAL(timeout()),
- m_quanta, SLOT(statusBarTimeout()));
+ m_quanta->statusbarTimer = new TQTimer(m_quanta);
+ connect(m_quanta->statusbarTimer,TQT_SIGNAL(timeout()),
+ m_quanta, TQT_SLOT(statusBarTimeout()));
progressBar = new KProgress(m_quanta->statusBar());
progressBar->setTextEnabled(false);
@@ -356,111 +356,111 @@ void QuantaInit::initStatusBar()
void QuantaInit::initDocument()
{
m_quanta->m_doc = new QuantaDoc(0L);
- connect(m_quanta->m_doc, SIGNAL(newStatus()),
- m_quanta, SLOT(slotNewStatus()));
+ connect(m_quanta->m_doc, TQT_SIGNAL(newStatus()),
+ m_quanta, TQT_SLOT(slotNewStatus()));
}
void QuantaInit::initProject()
{
Project *m_project = Project::ref(m_quanta);
- connect(m_project, SIGNAL(getTreeStatus(QStringList *)),
- pTab, SLOT(slotGetTreeStatus(QStringList *)));
- connect(m_project, SIGNAL(loadToolbarFile(const KURL &)),
- m_quanta, SLOT(slotLoadToolbarFile(const KURL &)));
- connect(m_project, SIGNAL(getUserToolbarFiles(KURL::List *)),
- m_quanta, SLOT(slotGetUserToolbarFiles(KURL::List *)));
- connect(m_project, SIGNAL(openFiles(const KURL::List &, const QString&)),
- m_quanta, SLOT(slotFileOpen(const KURL::List &, const QString&)));
- connect(m_project, SIGNAL(openFile(const KURL &, const QString&)),
- m_quanta, SLOT(slotFileOpen(const KURL &, const QString&)));
- connect(m_project, SIGNAL(closeFile(const KURL &)),
- m_quanta, SLOT(slotFileClose(const KURL &)));
- connect(m_project, SIGNAL(reloadTree(ProjectList *, bool, const QStringList &)),
- pTab, SLOT(slotReloadTree(ProjectList *, bool, const QStringList &)));
- connect(m_project, SIGNAL(closeFiles()), ViewManager::ref(), SLOT(closeAll()));
- connect(m_project, SIGNAL(eventHappened(const QString&, const QString&, const QString& )), QPEvents::ref(m_quanta), SLOT(slotEventHappened(const QString&, const QString&, const QString& )));
-
- connect(m_quanta->fTab, SIGNAL(insertDirInProject(const KURL&)),
- m_project, SLOT(slotAddDirectory(const KURL&)));
-
- connect(m_quanta->fTab, SIGNAL(insertFileInProject(const KURL&)),
- m_project, SLOT(slotInsertFile(const KURL&)));
-
- connect(TemplatesTreeView::ref(), SIGNAL(insertDirInProject(const KURL&)),
- m_project, SLOT(slotAddDirectory(const KURL&)));
-
- connect(TemplatesTreeView::ref(), SIGNAL(insertFileInProject(const KURL&)),
- m_project, SLOT(slotInsertFile(const KURL&)));
- connect(TemplatesTreeView::ref(), SIGNAL(downloadTemplate()),
- m_quanta, SLOT(slotDownloadTemplate()));
- connect(TemplatesTreeView::ref(), SIGNAL(uploadTemplate(const QString&)), m_quanta, SLOT(slotUploadTemplate(const QString&)));
+ connect(m_project, TQT_SIGNAL(getTreeStatus(TQStringList *)),
+ pTab, TQT_SLOT(slotGetTreeStatus(TQStringList *)));
+ connect(m_project, TQT_SIGNAL(loadToolbarFile(const KURL &)),
+ m_quanta, TQT_SLOT(slotLoadToolbarFile(const KURL &)));
+ connect(m_project, TQT_SIGNAL(getUserToolbarFiles(KURL::List *)),
+ m_quanta, TQT_SLOT(slotGetUserToolbarFiles(KURL::List *)));
+ connect(m_project, TQT_SIGNAL(openFiles(const KURL::List &, const TQString&)),
+ m_quanta, TQT_SLOT(slotFileOpen(const KURL::List &, const TQString&)));
+ connect(m_project, TQT_SIGNAL(openFile(const KURL &, const TQString&)),
+ m_quanta, TQT_SLOT(slotFileOpen(const KURL &, const TQString&)));
+ connect(m_project, TQT_SIGNAL(closeFile(const KURL &)),
+ m_quanta, TQT_SLOT(slotFileClose(const KURL &)));
+ connect(m_project, TQT_SIGNAL(reloadTree(ProjectList *, bool, const TQStringList &)),
+ pTab, TQT_SLOT(slotReloadTree(ProjectList *, bool, const TQStringList &)));
+ connect(m_project, TQT_SIGNAL(closeFiles()), ViewManager::ref(), TQT_SLOT(closeAll()));
+ connect(m_project, TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), QPEvents::ref(m_quanta), TQT_SLOT(slotEventHappened(const TQString&, const TQString&, const TQString& )));
+
+ connect(m_quanta->fTab, TQT_SIGNAL(insertDirInProject(const KURL&)),
+ m_project, TQT_SLOT(slotAddDirectory(const KURL&)));
+
+ connect(m_quanta->fTab, TQT_SIGNAL(insertFileInProject(const KURL&)),
+ m_project, TQT_SLOT(slotInsertFile(const KURL&)));
+
+ connect(TemplatesTreeView::ref(), TQT_SIGNAL(insertDirInProject(const KURL&)),
+ m_project, TQT_SLOT(slotAddDirectory(const KURL&)));
+
+ connect(TemplatesTreeView::ref(), TQT_SIGNAL(insertFileInProject(const KURL&)),
+ m_project, TQT_SLOT(slotInsertFile(const KURL&)));
+ connect(TemplatesTreeView::ref(), TQT_SIGNAL(downloadTemplate()),
+ m_quanta, TQT_SLOT(slotDownloadTemplate()));
+ connect(TemplatesTreeView::ref(), TQT_SIGNAL(uploadTemplate(const TQString&)), m_quanta, TQT_SLOT(slotUploadTemplate(const TQString&)));
// inform project if something was renamed
- connect(pTab, SIGNAL(renamed(const KURL&, const KURL&)),
- m_project, SLOT(slotRenamed(const KURL&, const KURL&)));
- connect(m_quanta->fTab, SIGNAL(renamed(const KURL&, const KURL&)),
- m_project, SLOT(slotRenamed(const KURL&, const KURL&)));
- connect(tTab, SIGNAL(renamed(const KURL&, const KURL&)),
- m_project, SLOT(slotRenamed(const KURL&, const KURL&)));
-
- connect(pTab, SIGNAL(insertToProject(const KURL&)),
- m_project, SLOT(slotInsertFile(const KURL&)));
- connect(pTab, SIGNAL(removeFromProject(const KURL&)),
- m_project, SLOT(slotRemove(const KURL&)));
- connect(pTab, SIGNAL(uploadSingleURL(const KURL&, const QString&, bool, bool)),
- m_project, SLOT(slotUploadURL(const KURL&, const QString&, bool, bool)));
- connect(pTab, SIGNAL(rescanProjectDir()), m_project, SLOT(slotRescanPrjDir()));
- connect(pTab, SIGNAL(showProjectOptions()), m_project, SLOT(slotOptions()));
- connect(pTab, SIGNAL(uploadProject()), m_project, SLOT(slotUpload()));
-
- connect(m_quanta->dTab, SIGNAL(reloadProjectDocs()), m_project, SLOT(slotReloadProjectDocs()));
- connect(m_project, SIGNAL(reloadProjectDocs()), m_quanta->dTab, SLOT(slotReloadProjectDocs()));
- connect(m_project, SIGNAL(addProjectDoc(const KURL&)), m_quanta->dTab, SLOT(slotAddProjectDoc(const KURL&)));
-
- connect(m_project, SIGNAL(enableMessageWidget()),
- m_quanta, SLOT(slotShowMessagesView()));
-
- connect(m_project, SIGNAL(messages(const QString&)),
- m_quanta->m_messageOutput, SLOT(showMessage(const QString&)));
-
- connect(m_project, SIGNAL(newStatus()),
- m_quanta, SLOT(slotNewStatus()));
-
- connect(m_project, SIGNAL(newProjectLoaded(const QString &, const KURL &, const KURL &)),
- TemplatesTreeView::ref(), SLOT(slotNewProjectLoaded(const QString &, const KURL &, const KURL &)));
- connect(m_project, SIGNAL(newProjectLoaded(const QString &, const KURL &, const KURL &)),
- pTab, SLOT(slotNewProjectLoaded(const QString &, const KURL &, const KURL &)));
- connect(m_project, SIGNAL(newProjectLoaded(const QString &, const KURL &, const KURL &)),
- m_quanta->fTab, SLOT(slotNewProjectLoaded(const QString &, const KURL &, const KURL &)));
- connect(m_project, SIGNAL(newProjectLoaded(const QString &, const KURL &, const KURL &)),
- m_quanta->annotationOutput(), SLOT(updateAnnotations()));
-
- connect(pTab, SIGNAL(changeFileDescription(const KURL&, const QString&)),
- m_project, SLOT(slotFileDescChanged(const KURL&, const QString&)));
- connect(pTab, SIGNAL(changeUploadStatus(const KURL&, int)),
- m_project, SLOT(slotUploadStatusChanged(const KURL&, int)));
- connect(pTab, SIGNAL(changeDocumentFolderStatus(const KURL&, bool)),
- m_project, SLOT(slotChangeDocumentFolderStatus(const KURL&, bool)));
-
- connect(m_project, SIGNAL(hideSplash()), m_quanta, SLOT(slotHideSplash()));
-
- connect(m_project, SIGNAL(statusMsg(const QString &)),
- m_quanta, SLOT(slotStatusMsg(const QString & )));
+ connect(pTab, TQT_SIGNAL(renamed(const KURL&, const KURL&)),
+ m_project, TQT_SLOT(slotRenamed(const KURL&, const KURL&)));
+ connect(m_quanta->fTab, TQT_SIGNAL(renamed(const KURL&, const KURL&)),
+ m_project, TQT_SLOT(slotRenamed(const KURL&, const KURL&)));
+ connect(tTab, TQT_SIGNAL(renamed(const KURL&, const KURL&)),
+ m_project, TQT_SLOT(slotRenamed(const KURL&, const KURL&)));
+
+ connect(pTab, TQT_SIGNAL(insertToProject(const KURL&)),
+ m_project, TQT_SLOT(slotInsertFile(const KURL&)));
+ connect(pTab, TQT_SIGNAL(removeFromProject(const KURL&)),
+ m_project, TQT_SLOT(slotRemove(const KURL&)));
+ connect(pTab, TQT_SIGNAL(uploadSingleURL(const KURL&, const TQString&, bool, bool)),
+ m_project, TQT_SLOT(slotUploadURL(const KURL&, const TQString&, bool, bool)));
+ connect(pTab, TQT_SIGNAL(rescanProjectDir()), m_project, TQT_SLOT(slotRescanPrjDir()));
+ connect(pTab, TQT_SIGNAL(showProjectOptions()), m_project, TQT_SLOT(slotOptions()));
+ connect(pTab, TQT_SIGNAL(uploadProject()), m_project, TQT_SLOT(slotUpload()));
+
+ connect(m_quanta->dTab, TQT_SIGNAL(reloadProjectDocs()), m_project, TQT_SLOT(slotReloadProjectDocs()));
+ connect(m_project, TQT_SIGNAL(reloadProjectDocs()), m_quanta->dTab, TQT_SLOT(slotReloadProjectDocs()));
+ connect(m_project, TQT_SIGNAL(addProjectDoc(const KURL&)), m_quanta->dTab, TQT_SLOT(slotAddProjectDoc(const KURL&)));
+
+ connect(m_project, TQT_SIGNAL(enableMessageWidget()),
+ m_quanta, TQT_SLOT(slotShowMessagesView()));
+
+ connect(m_project, TQT_SIGNAL(messages(const TQString&)),
+ m_quanta->m_messageOutput, TQT_SLOT(showMessage(const TQString&)));
+
+ connect(m_project, TQT_SIGNAL(newStatus()),
+ m_quanta, TQT_SLOT(slotNewStatus()));
+
+ connect(m_project, TQT_SIGNAL(newProjectLoaded(const TQString &, const KURL &, const KURL &)),
+ TemplatesTreeView::ref(), TQT_SLOT(slotNewProjectLoaded(const TQString &, const KURL &, const KURL &)));
+ connect(m_project, TQT_SIGNAL(newProjectLoaded(const TQString &, const KURL &, const KURL &)),
+ pTab, TQT_SLOT(slotNewProjectLoaded(const TQString &, const KURL &, const KURL &)));
+ connect(m_project, TQT_SIGNAL(newProjectLoaded(const TQString &, const KURL &, const KURL &)),
+ m_quanta->fTab, TQT_SLOT(slotNewProjectLoaded(const TQString &, const KURL &, const KURL &)));
+ connect(m_project, TQT_SIGNAL(newProjectLoaded(const TQString &, const KURL &, const KURL &)),
+ m_quanta->annotationOutput(), TQT_SLOT(updateAnnotations()));
+
+ connect(pTab, TQT_SIGNAL(changeFileDescription(const KURL&, const TQString&)),
+ m_project, TQT_SLOT(slotFileDescChanged(const KURL&, const TQString&)));
+ connect(pTab, TQT_SIGNAL(changeUploadStatus(const KURL&, int)),
+ m_project, TQT_SLOT(slotUploadStatusChanged(const KURL&, int)));
+ connect(pTab, TQT_SIGNAL(changeDocumentFolderStatus(const KURL&, bool)),
+ m_project, TQT_SLOT(slotChangeDocumentFolderStatus(const KURL&, bool)));
+
+ connect(m_project, TQT_SIGNAL(hideSplash()), m_quanta, TQT_SLOT(slotHideSplash()));
+
+ connect(m_project, TQT_SIGNAL(statusMsg(const TQString &)),
+ m_quanta, TQT_SLOT(slotStatusMsg(const TQString & )));
}
void QuantaInit::initView()
{
ViewManager *m_viewManager = ViewManager::ref(m_quanta);
- connect(m_quanta, SIGNAL(viewActivated (KMdiChildView *)), m_viewManager, SLOT(slotViewActivated(KMdiChildView*)));
- connect(m_quanta, SIGNAL(lastChildViewClosed()), m_viewManager, SLOT(slotLastViewClosed()));
-// connect(m_quanta, SIGNAL(viewDeactivated(KMdiChildView *)), m_viewManager, SLOT(slotViewDeactivated(KMdiChildView*)));
+ connect(m_quanta, TQT_SIGNAL(viewActivated (KMdiChildView *)), m_viewManager, TQT_SLOT(slotViewActivated(KMdiChildView*)));
+ connect(m_quanta, TQT_SIGNAL(lastChildViewClosed()), m_viewManager, TQT_SLOT(slotLastViewClosed()));
+// connect(m_quanta, TQT_SIGNAL(viewDeactivated(KMdiChildView *)), m_viewManager, TQT_SLOT(slotViewDeactivated(KMdiChildView*)));
KafkaDocument *m_kafkaDocument = KafkaDocument::ref(0, 0, "KafkaPart");
m_kafkaDocument->getKafkaWidget()->view()->setMinimumHeight(50);
m_kafkaDocument->readConfig(quantaApp->config());
loadVPLConfig();
ToolbarTabWidget *toolBarTab = ToolbarTabWidget::ref(quantaApp);
- connect(toolBarTab, SIGNAL(iconTextModeChanged()), quantaApp, SLOT(slotRefreshActiveWindow()));
+ connect(toolBarTab, TQT_SIGNAL(iconTextModeChanged()), quantaApp, TQT_SLOT(slotRefreshActiveWindow()));
//set the toolview and close button style before the GUI is created
m_config->setGroup("General Options");
@@ -481,77 +481,77 @@ void QuantaInit::initView()
m_quanta->scriptTab = new ScriptTreeView(m_quanta, "Scripts");
m_quanta->m_messageOutput = new MessageOutput(m_quanta, "Messages");
- m_quanta->m_messageOutput->setFocusPolicy(QWidget::NoFocus);
+ m_quanta->m_messageOutput->setFocusPolicy(TQWidget::NoFocus);
m_quanta->m_messageOutput->showMessage(i18n("Message Window..."));
- connect(m_quanta, SIGNAL(showMessage(const QString&, bool)), m_quanta->m_messageOutput, SLOT(showMessage(const QString&, bool)));
- connect(m_quanta, SIGNAL(clearMessages()), m_quanta->m_messageOutput, SLOT(clear()));
+ connect(m_quanta, TQT_SIGNAL(showMessage(const TQString&, bool)), m_quanta->m_messageOutput, TQT_SLOT(showMessage(const TQString&, bool)));
+ connect(m_quanta, TQT_SIGNAL(clearMessages()), m_quanta->m_messageOutput, TQT_SLOT(clear()));
m_quanta->m_problemOutput = new MessageOutput(m_quanta, "Problems");
- m_quanta->m_problemOutput->setFocusPolicy(QWidget::NoFocus);
+ m_quanta->m_problemOutput->setFocusPolicy(TQWidget::NoFocus);
m_quanta->m_annotationOutput = new AnnotationOutput(m_quanta, "Annotations");
- m_quanta->m_annotationOutput->setFocusPolicy(QWidget::NoFocus);
+ m_quanta->m_annotationOutput->setFocusPolicy(TQWidget::NoFocus);
m_quanta->createPreviewPart();
m_quanta->createDocPart();
- connect(m_quanta, SIGNAL(reloadAllTrees()),
- m_quanta->fTab, SLOT(slotReloadAllTrees()));
-
- connect(pTab, SIGNAL(loadToolbarFile (const KURL&)),
- m_quanta, SLOT(slotLoadToolbarFile(const KURL&)));
- connect(m_viewManager, SIGNAL(viewActivated(const KURL&)),
- pTab, SLOT(slotViewActivated(const KURL&)));
-
- connect(m_viewManager, SIGNAL(documentClosed(const KURL&)),
- pTab, SLOT(slotDocumentClosed(const KURL&)));
- connect(m_viewManager, SIGNAL(documentClosed(const KURL&)),
- tTab, SLOT(slotDocumentClosed(const KURL&)));
- connect(m_viewManager, SIGNAL(documentClosed(const KURL&)),
- m_quanta->scriptTab, SLOT(slotDocumentClosed(const KURL&)));
- connect(m_viewManager, SIGNAL(documentClosed(const KURL&)),
- m_quanta->fTab, SLOT(slotDocumentClosed(const KURL&)));
-
- connect(tTab, SIGNAL(insertFile (const KURL &)),
- m_quanta, SLOT(slotInsertFile(const KURL &)));
-
- connect(m_quanta->scriptTab, SIGNAL(openFileInPreview(const KURL &)),
- m_quanta, SLOT(slotOpenFileInPreview(const KURL &)));
- connect(m_quanta->scriptTab, SIGNAL(showPreviewWidget(bool)),
- m_quanta, SLOT(slotShowPreviewWidget(bool)));
- connect(m_quanta->scriptTab, SIGNAL(assignActionToScript(const KURL &, const QString&)),
- m_quanta, SLOT(slotAssignActionToScript(const KURL &, const QString&)));
- connect(m_quanta->scriptTab, SIGNAL(downloadScript()), m_quanta, SLOT(slotDownloadScript()));
- connect(m_quanta->scriptTab, SIGNAL(uploadScript(const QString&)), m_quanta, SLOT(slotUploadScript(const QString&)));
- connect(m_quanta->dTab, SIGNAL(downloadDoc()), m_quanta, SLOT(slotDownloadDoc()));
-
- connect(m_quanta->m_htmlPart, SIGNAL(onURL(const QString&)),
- m_quanta, SLOT(slotStatusMsg(const QString&)));
- connect(m_quanta->m_htmlPartDoc, SIGNAL(onURL(const QString&)),
- m_quanta, SLOT(slotStatusMsg(const QString&)));
-
- connect(sTab, SIGNAL(newCursorPosition(int,int)), m_quanta, SLOT(setCursorPosition(int,int)));
- connect(sTab, SIGNAL(selectArea(int,int,int,int)), m_quanta, SLOT( selectArea(int,int,int,int)));
- connect(sTab, SIGNAL(selectTagArea(Node*)), m_quanta, SLOT(slotSelectTagArea(Node*)));
- connect(sTab, SIGNAL(needReparse()), m_quanta, SLOT(slotForceReparse()));
- connect(sTab, SIGNAL(showGroupsForDTEP(const QString&, bool)), m_quanta, SLOT(slotShowGroupsForDTEP(const QString&, bool)));
- connect(sTab, SIGNAL(openFile(const KURL &)),
- m_quanta, SLOT (slotFileOpen(const KURL &)));
- connect(sTab, SIGNAL(openImage (const KURL&)),
- m_quanta, SLOT(slotImageOpen(const KURL&)));
- connect(sTab, SIGNAL(showProblemMessage(const QString&)),
- m_quanta->m_problemOutput, SLOT(showMessage(const QString&)));
- connect(sTab, SIGNAL(clearProblemOutput()),
- m_quanta->m_problemOutput, SLOT(clear()));
- connect(parser, SIGNAL(nodeTreeChanged()), sTab, SLOT(slotNodeTreeChanged()));
-
- connect(m_quanta->dTab, SIGNAL(openURL(const QString&)), m_quanta, SLOT(openDoc(const QString&)));
-
- connect(m_viewManager, SIGNAL(dragInsert(QDropEvent *)), tTab, SLOT(slotDragInsert(QDropEvent *)));
+ connect(m_quanta, TQT_SIGNAL(reloadAllTrees()),
+ m_quanta->fTab, TQT_SLOT(slotReloadAllTrees()));
+
+ connect(pTab, TQT_SIGNAL(loadToolbarFile (const KURL&)),
+ m_quanta, TQT_SLOT(slotLoadToolbarFile(const KURL&)));
+ connect(m_viewManager, TQT_SIGNAL(viewActivated(const KURL&)),
+ pTab, TQT_SLOT(slotViewActivated(const KURL&)));
+
+ connect(m_viewManager, TQT_SIGNAL(documentClosed(const KURL&)),
+ pTab, TQT_SLOT(slotDocumentClosed(const KURL&)));
+ connect(m_viewManager, TQT_SIGNAL(documentClosed(const KURL&)),
+ tTab, TQT_SLOT(slotDocumentClosed(const KURL&)));
+ connect(m_viewManager, TQT_SIGNAL(documentClosed(const KURL&)),
+ m_quanta->scriptTab, TQT_SLOT(slotDocumentClosed(const KURL&)));
+ connect(m_viewManager, TQT_SIGNAL(documentClosed(const KURL&)),
+ m_quanta->fTab, TQT_SLOT(slotDocumentClosed(const KURL&)));
+
+ connect(tTab, TQT_SIGNAL(insertFile (const KURL &)),
+ m_quanta, TQT_SLOT(slotInsertFile(const KURL &)));
+
+ connect(m_quanta->scriptTab, TQT_SIGNAL(openFileInPreview(const KURL &)),
+ m_quanta, TQT_SLOT(slotOpenFileInPreview(const KURL &)));
+ connect(m_quanta->scriptTab, TQT_SIGNAL(showPreviewWidget(bool)),
+ m_quanta, TQT_SLOT(slotShowPreviewWidget(bool)));
+ connect(m_quanta->scriptTab, TQT_SIGNAL(assignActionToScript(const KURL &, const TQString&)),
+ m_quanta, TQT_SLOT(slotAssignActionToScript(const KURL &, const TQString&)));
+ connect(m_quanta->scriptTab, TQT_SIGNAL(downloadScript()), m_quanta, TQT_SLOT(slotDownloadScript()));
+ connect(m_quanta->scriptTab, TQT_SIGNAL(uploadScript(const TQString&)), m_quanta, TQT_SLOT(slotUploadScript(const TQString&)));
+ connect(m_quanta->dTab, TQT_SIGNAL(downloadDoc()), m_quanta, TQT_SLOT(slotDownloadDoc()));
+
+ connect(m_quanta->m_htmlPart, TQT_SIGNAL(onURL(const TQString&)),
+ m_quanta, TQT_SLOT(slotStatusMsg(const TQString&)));
+ connect(m_quanta->m_htmlPartDoc, TQT_SIGNAL(onURL(const TQString&)),
+ m_quanta, TQT_SLOT(slotStatusMsg(const TQString&)));
+
+ connect(sTab, TQT_SIGNAL(newCursorPosition(int,int)), m_quanta, TQT_SLOT(setCursorPosition(int,int)));
+ connect(sTab, TQT_SIGNAL(selectArea(int,int,int,int)), m_quanta, TQT_SLOT( selectArea(int,int,int,int)));
+ connect(sTab, TQT_SIGNAL(selectTagArea(Node*)), m_quanta, TQT_SLOT(slotSelectTagArea(Node*)));
+ connect(sTab, TQT_SIGNAL(needReparse()), m_quanta, TQT_SLOT(slotForceReparse()));
+ connect(sTab, TQT_SIGNAL(showGroupsForDTEP(const TQString&, bool)), m_quanta, TQT_SLOT(slotShowGroupsForDTEP(const TQString&, bool)));
+ connect(sTab, TQT_SIGNAL(openFile(const KURL &)),
+ m_quanta, TQT_SLOT (slotFileOpen(const KURL &)));
+ connect(sTab, TQT_SIGNAL(openImage (const KURL&)),
+ m_quanta, TQT_SLOT(slotImageOpen(const KURL&)));
+ connect(sTab, TQT_SIGNAL(showProblemMessage(const TQString&)),
+ m_quanta->m_problemOutput, TQT_SLOT(showMessage(const TQString&)));
+ connect(sTab, TQT_SIGNAL(clearProblemOutput()),
+ m_quanta->m_problemOutput, TQT_SLOT(clear()));
+ connect(parser, TQT_SIGNAL(nodeTreeChanged()), sTab, TQT_SLOT(slotNodeTreeChanged()));
+
+ connect(m_quanta->dTab, TQT_SIGNAL(openURL(const TQString&)), m_quanta, TQT_SLOT(openDoc(const TQString&)));
+
+ connect(m_viewManager, TQT_SIGNAL(dragInsert(TQDropEvent *)), tTab, TQT_SLOT(slotDragInsert(TQDropEvent *)));
qConfig.windowLayout = "Default";
}
-KMdiToolViewAccessor* QuantaInit::addToolTreeView(QWidget *widget, const QString &name, const QPixmap &icon, KDockWidget::DockPosition position)
+KMdiToolViewAccessor* QuantaInit::addToolTreeView(TQWidget *widget, const TQString &name, const TQPixmap &icon, KDockWidget::DockPosition position)
{
widget->setIcon(icon);
widget->setCaption(name);
@@ -589,7 +589,7 @@ void QuantaInit::readOptions()
KAction *action = quantaApp->actionCollection()->action("smart_tag_insertion");
(static_cast<KToggleAction* >(action))->setChecked(qConfig.smartTagInsertion);
- QSize s(800,580);
+ TQSize s(800,580);
m_quanta->resize( m_config->readSizeEntry("Geometry", &s));
qConfig.autosaveInterval = m_config->readNumEntry("Autosave interval", 1);
@@ -619,7 +619,7 @@ void QuantaInit::readOptions()
//KNewStuff config
m_config->setGroup("KNewStuff");
- QString str = m_config->readEntry("ProvidersUrl");
+ TQString str = m_config->readEntry("ProvidersUrl");
if (str.isEmpty())
{
m_config->writeEntry( "ProvidersUrl", "http://quanta.kdewebdev.org/newstuff/providers.xml" );
@@ -645,7 +645,7 @@ void QuantaInit::openLastFiles()
// because project now can be
// in load stage ( remote prj )
m_config->setGroup("Projects");
- QString pu = QuantaCommon::readPathEntry(m_config, "Last Project");
+ TQString pu = QuantaCommon::readPathEntry(m_config, "Last Project");
KURL u;
QuantaCommon::setUrl(u, pu);
@@ -657,12 +657,12 @@ void QuantaInit::openLastFiles()
m_config->setGroup("General Options");
- QStringList urls = QuantaCommon::readPathListEntry(m_config, "List of opened files");
- QStringList encodings = QuantaCommon::readPathListEntry(m_config, "Encoding of opened files");
+ TQStringList urls = QuantaCommon::readPathListEntry(m_config, "List of opened files");
+ TQStringList encodings = QuantaCommon::readPathListEntry(m_config, "Encoding of opened files");
m_quanta->m_doc->blockSignals(true);
m_quanta->setParserEnabled(false);
uint i = 0;
- for ( QStringList::Iterator it = urls.begin(); it != urls.end(); ++it )
+ for ( TQStringList::Iterator it = urls.begin(); it != urls.end(); ++it )
{
KURL fu;
QuantaCommon::setUrl(fu, *it);
@@ -684,7 +684,7 @@ void QuantaInit::openLastFiles()
}
/** Loads the initial project */
-void QuantaInit::loadInitialProject(const QString& url)
+void QuantaInit::loadInitialProject(const TQString& url)
{
if(url.isNull())
{
@@ -706,74 +706,74 @@ void QuantaInit::loadInitialProject(const QString& url)
void QuantaInit::initActions()
{
KActionCollection *ac = m_quanta->actionCollection();
- new KAction(i18n("Annotate..."), 0, m_quanta, SLOT(slotAnnotate()),ac, "annotate");
+ new KAction(i18n("Annotate..."), 0, m_quanta, TQT_SLOT(slotAnnotate()),ac, "annotate");
m_quanta->editTagAction = new KAction( i18n( "&Edit Current Tag..." ), CTRL+Key_E,
- m_quanta, SLOT( slotEditCurrentTag() ),
+ m_quanta, TQT_SLOT( slotEditCurrentTag() ),
ac, "edit_current_tag" );
m_quanta->selectTagAreaAction = new KAction( i18n( "&Select Current Tag Area" ), 0,
- m_quanta, SLOT( slotSelectTagArea() ),
+ m_quanta, TQT_SLOT( slotSelectTagArea() ),
ac, "select_tag_area" );
new KAction( i18n( "E&xpand Abbreviation" ), CTRL+SHIFT+Key_J,
- m_quanta, SLOT( slotExpandAbbreviation() ),
+ m_quanta, TQT_SLOT( slotExpandAbbreviation() ),
ac, "expand_abbreviation" );
- new KAction(i18n("&Report Bug..."), 0, m_quanta, SLOT(slotReportBug()), ac, "help_reportbug"); //needed, because quanta_be bugs should be reported for quanta
+ new KAction(i18n("&Report Bug..."), 0, m_quanta, TQT_SLOT(slotReportBug()), ac, "help_reportbug"); //needed, because quanta_be bugs should be reported for quanta
//Kate actions
//Edit menu
- KStdAction::undo(m_quanta, SLOT(slotUndo()), ac);
- KStdAction::redo(m_quanta, SLOT(slotRedo()), ac);
- KStdAction::cut(m_quanta, SLOT(slotCut()), ac);
- KStdAction::copy(m_quanta, SLOT(slotCopy()), ac) ;
- KStdAction::pasteText(m_quanta, SLOT(slotPaste()), ac);
+ KStdAction::undo(m_quanta, TQT_SLOT(slotUndo()), ac);
+ KStdAction::redo(m_quanta, TQT_SLOT(slotRedo()), ac);
+ KStdAction::cut(m_quanta, TQT_SLOT(slotCut()), ac);
+ KStdAction::copy(m_quanta, TQT_SLOT(slotCopy()), ac) ;
+ KStdAction::pasteText(m_quanta, TQT_SLOT(slotPaste()), ac);
//help
(void) new KAction(i18n("Ti&p of the Day"), "idea", "", m_quanta,
- SLOT(slotHelpTip()), ac, "help_tip");
+ TQT_SLOT(slotHelpTip()), ac, "help_tip");
// File actions
//
- KStdAction::openNew( m_quanta, SLOT( slotFileNew() ), ac);
- KStdAction::open ( m_quanta, SLOT( slotFileOpen() ), ac, "file_open");
- (void) new KAction(i18n("Close Other Tabs"), 0, ViewManager::ref(), SLOT(slotCloseOtherTabs()), ac, "close_other_tabs");
+ KStdAction::openNew( m_quanta, TQT_SLOT( slotFileNew() ), ac);
+ KStdAction::open ( m_quanta, TQT_SLOT( slotFileOpen() ), ac, "file_open");
+ (void) new KAction(i18n("Close Other Tabs"), 0, ViewManager::ref(), TQT_SLOT(slotCloseOtherTabs()), ac, "close_other_tabs");
- m_quanta->fileRecent = KStdAction::openRecent(m_quanta, SLOT(slotFileOpenRecent(const KURL&)),
+ m_quanta->fileRecent = KStdAction::openRecent(m_quanta, TQT_SLOT(slotFileOpenRecent(const KURL&)),
ac, "file_open_recent");
m_quanta->fileRecent->setToolTip(i18n("Open / Open Recent"));
- connect(m_quanta->fileRecent, SIGNAL(activated()), m_quanta, SLOT(slotFileOpen()));
+ connect(m_quanta->fileRecent, TQT_SIGNAL(activated()), m_quanta, TQT_SLOT(slotFileOpen()));
(void) new KAction( i18n( "Close All" ), 0, m_quanta,
- SLOT( slotFileCloseAll() ),
+ TQT_SLOT( slotFileCloseAll() ),
ac, "file_close_all" );
- m_quanta->saveAction = KStdAction::save(m_quanta, SLOT( slotFileSave() ), ac);
+ m_quanta->saveAction = KStdAction::save(m_quanta, TQT_SLOT( slotFileSave() ), ac);
- KStdAction::saveAs( m_quanta, SLOT( slotFileSaveAs() ), ac );
+ KStdAction::saveAs( m_quanta, TQT_SLOT( slotFileSaveAs() ), ac );
m_quanta->saveAllAction = new KAction( i18n( "Save All..." ), "save_all", SHIFT+KStdAccel::shortcut(KStdAccel::Save).keyCodeQt(),
- m_quanta, SLOT( slotFileSaveAll() ),
+ m_quanta, TQT_SLOT( slotFileSaveAll() ),
ac, "file_save_all" );
(void) new KAction(i18n("Reloa&d"), "revert", SHIFT+Key_F5, m_quanta,
- SLOT(slotFileReload()), ac, "file_reload");
+ TQT_SLOT(slotFileReload()), ac, "file_reload");
// (void) new KAction(i18n("Reload All "), 0, 0, m_quanta,
-// SLOT(slotFileReloadAll()), ac, "file_reload_all");
+// TQT_SLOT(slotFileReloadAll()), ac, "file_reload_all");
(void) new KAction( i18n( "Save as Local Template..." ), 0,
- m_quanta, SLOT( slotFileSaveAsLocalTemplate() ),
+ m_quanta, TQT_SLOT( slotFileSaveAsLocalTemplate() ),
ac, "save_local_template" );
(void) new KAction( i18n( "Save Selection to Local Template File..." ), 0,
- m_quanta, SLOT( slotFileSaveSelectionAsLocalTemplate() ),
+ m_quanta, TQT_SLOT( slotFileSaveSelectionAsLocalTemplate() ),
ac, "save_selection_local_template" );
- KStdAction::quit( m_quanta, SLOT( slotFileQuit() ), ac );
+ KStdAction::quit( m_quanta, TQT_SLOT( slotFileQuit() ), ac );
// Edit actions
(void) new KAction( i18n( "Find in Files..." ),
SmallIcon("filefind"), CTRL+ALT+Key_F,
- m_quanta, SLOT( slotEditFindInFiles() ),
+ m_quanta, TQT_SLOT( slotEditFindInFiles() ),
ac, "find_in_files" );
KAction* aux = TagActionManager::self()->actionCollection()->action("apply_source_indentation");
@@ -783,69 +783,69 @@ void QuantaInit::initActions()
// Tool actions
(void) new KAction( i18n( "&Context Help..." ), CTRL+Key_H,
- m_quanta, SLOT( slotContextHelp() ),
+ m_quanta, TQT_SLOT( slotContextHelp() ),
ac, "context_help" );
(void) new KAction( i18n( "&Quanta Homepage" ), 0,
- m_quanta, SLOT( slotHelpHomepage() ),
+ m_quanta, TQT_SLOT( slotHelpHomepage() ),
ac, "help_homepage" );
(void) new KAction( i18n( "&User Mailing List" ), 0,
- m_quanta, SLOT( slotHelpUserList() ),
+ m_quanta, TQT_SLOT( slotHelpUserList() ),
ac, "help_userlist" );
(void) new KAction( i18n( "Make &Donation" ), 0,
- m_quanta, SLOT( slotMakeDonation() ),
+ m_quanta, TQT_SLOT( slotMakeDonation() ),
ac, "help_donation" );
(void) new KAction( i18n( "Tag &Attributes..." ), ALT+Key_Down,
- m_quanta->m_doc, SLOT( slotAttribPopup() ),
+ m_quanta->m_doc, TQT_SLOT( slotAttribPopup() ),
ac, "tag_attributes" );
(void) new KAction( i18n( "&Change the DTD..." ), 0,
- m_quanta, SLOT( slotChangeDTD() ),
+ m_quanta, TQT_SLOT( slotChangeDTD() ),
ac, "change_dtd" );
(void) new KAction( i18n( "&Edit DTD Settings..." ), 0,
- m_quanta, SLOT( slotEditDTD() ),
+ m_quanta, TQT_SLOT( slotEditDTD() ),
ac, "edit_dtd" );
(void) new KAction( i18n( "&Load && Convert DTD..." ), 0,
- DTDs::ref(), SLOT( slotLoadDTD() ),
+ DTDs::ref(), TQT_SLOT( slotLoadDTD() ),
ac, "load_dtd" );
(void) new KAction( i18n( "Load DTD E&ntities..." ), 0,
- DTDs::ref(), SLOT( slotLoadEntities() ),
+ DTDs::ref(), TQT_SLOT( slotLoadEntities() ),
ac, "load_entities" );
(void) new KAction( i18n( "Load DTD &Package (DTEP)..." ), 0,
- m_quanta, SLOT( slotLoadDTEP() ),
+ m_quanta, TQT_SLOT( slotLoadDTEP() ),
ac, "load_dtep" );
(void) new KAction( i18n( "Send DTD Package (DTEP) in E&mail..." ), "mail_send", 0,
- m_quanta, SLOT( slotEmailDTEP() ),
+ m_quanta, TQT_SLOT( slotEmailDTEP() ),
ac, "send_dtep" );
(void) new KAction( i18n( "&Download DTD Package (DTEP)..." ), "network", 0,
- m_quanta, SLOT( slotDownloadDTEP() ),
+ m_quanta, TQT_SLOT( slotDownloadDTEP() ),
ac, "download_dtep" );
(void) new KAction( i18n( "&Upload DTD Package (DTEP)..." ), "network", 0,
- m_quanta, SLOT( slotUploadDTEP() ),
+ m_quanta, TQT_SLOT( slotUploadDTEP() ),
ac, "upload_dtep" );
/*
(void) new KAction( i18n( "&Upload DTD Package (DTEP)..." ), 0,
- m_quanta, SLOT( slotUploadDTEP() ),
+ m_quanta, TQT_SLOT( slotUploadDTEP() ),
ac, "send_dtep" );
*/
(void) new KAction( i18n( "&Document Properties" ), 0,
- m_quanta, SLOT( slotDocumentProperties() ),
+ m_quanta, TQT_SLOT( slotDocumentProperties() ),
ac, "tools_document_properties" );
(void) new KAction ( i18n ("F&ormat XML Code"), 0,
- m_quanta, SLOT( slotCodeFormatting() ),
+ m_quanta, TQT_SLOT( slotCodeFormatting() ),
ac, "tools_code_formatting");
(void) new KAction( i18n( "&Convert Tag && Attribute Case..."), 0,
- m_quanta, SLOT(slotConvertCase()),
+ m_quanta, TQT_SLOT(slotConvertCase()),
ac, "tools_change_case");
// View actions
@@ -853,109 +853,109 @@ void QuantaInit::initActions()
m_quanta->showSourceAction =
new KToggleAction( i18n( "&Source Editor"), UserIcon ("view_text"), ALT+Key_F9,
- m_quanta, SLOT( slotShowSourceEditor()),
+ m_quanta, TQT_SLOT( slotShowSourceEditor()),
ac, "show_quanta_editor");
m_quanta->showSourceAction->setExclusiveGroup("view");
m_quanta->showVPLAction =
new KToggleAction( i18n( "&VPL Editor"), UserIcon ("vpl"), CTRL+SHIFT+Key_F9,
- m_quanta, SLOT( slotShowVPLOnly() ),
+ m_quanta, TQT_SLOT( slotShowVPLOnly() ),
ac, "show_kafka_view");
m_quanta->showVPLAction->setExclusiveGroup("view");
m_quanta->showVPLSourceAction =
new KToggleAction( i18n("VPL && So&urce Editors"), UserIcon ("vpl_text"), Key_F9,
- m_quanta, SLOT( slotShowVPLAndSourceEditor() ),
+ m_quanta, TQT_SLOT( slotShowVPLAndSourceEditor() ),
ac, "show_kafka_and_quanta");
m_quanta->showVPLSourceAction->setExclusiveGroup("view");
/**kafkaSelectAction = new KSelectAction(i18n("Main &View"), 0, ac,"show_kafka");
- QStringList list2;
+ TQStringList list2;
list2.append(i18n("&Source Editor"));
list2.append(i18n("&VPL Editor (experimental)"));
list2.append(i18n("&Both Editors"));
kafkaSelectAction->setItems(list2);
- connect(kafkaSelectAction, SIGNAL(activated(int)), m_quanta, SLOT(slotShowKafkaPartl(int)));*/
+ connect(kafkaSelectAction, TQT_SIGNAL(activated(int)), m_quanta, TQT_SLOT(slotShowKafkaPartl(int)));*/
(void) new KAction( i18n( "&Reload Preview" ), "reload",
KStdAccel::shortcut(KStdAccel::Reload).keyCodeQt(),
- m_quanta, SLOT(slotRepaintPreview()),
+ m_quanta, TQT_SLOT(slotRepaintPreview()),
ac, "reload" );
(void) new KAction( i18n( "&Previous File" ), "1leftarrow", KStdAccel::back(),
- m_quanta, SLOT( slotBack() ),
+ m_quanta, TQT_SLOT( slotBack() ),
ac, "previous_file" );
(void) new KAction( i18n( "&Next File" ), "1rightarrow", KStdAccel::forward(),
- m_quanta, SLOT( slotForward() ),
+ m_quanta, TQT_SLOT( slotForward() ),
ac, "next_file" );
// Options actions
//
(void) new KAction( i18n( "Configure &Actions..." ), UserIcon("ball"),0,
- m_quanta, SLOT( slotOptionsConfigureActions() ),
+ m_quanta, TQT_SLOT( slotOptionsConfigureActions() ),
ac, "configure_actions" );
- KStdAction::showMenubar(m_quanta, SLOT(slotShowMenuBar()), ac, "options_show_menubar");
- KStdAction::keyBindings(m_quanta, SLOT( slotOptionsConfigureKeys() ), ac, "configure_shortcuts");
- KStdAction::configureToolbars( m_quanta, SLOT( slotOptionsConfigureToolbars() ), ac, "options_configure_toolbars");
- KStdAction::preferences(m_quanta, SLOT( slotOptions() ), ac, "general_options");
- new KAction(i18n("Configure Pre&view..."), SmallIcon("konqueror"), 0, m_quanta, SLOT(slotPreviewOptions()), ac, "preview_options");
+ KStdAction::showMenubar(m_quanta, TQT_SLOT(slotShowMenuBar()), ac, "options_show_menubar");
+ KStdAction::keyBindings(m_quanta, TQT_SLOT( slotOptionsConfigureKeys() ), ac, "configure_shortcuts");
+ KStdAction::configureToolbars( m_quanta, TQT_SLOT( slotOptionsConfigureToolbars() ), ac, "options_configure_toolbars");
+ KStdAction::preferences(m_quanta, TQT_SLOT( slotOptions() ), ac, "general_options");
+ new KAction(i18n("Configure Pre&view..."), SmallIcon("konqueror"), 0, m_quanta, TQT_SLOT(slotPreviewOptions()), ac, "preview_options");
// Toolbars actions
m_quanta->projectToolbarFiles = new KRecentFilesAction(i18n("Load &Project Toolbar"),0,
- m_quanta, SLOT(slotLoadToolbarFile(const KURL&)),
+ m_quanta, TQT_SLOT(slotLoadToolbarFile(const KURL&)),
ac, "toolbars_load_project");
- new KAction(i18n("Load &Global Toolbar..."), 0, m_quanta, SLOT(slotLoadGlobalToolbar()), ac, "toolbars_load_global");
- new KAction(i18n("Load &Local Toolbar..."), 0, m_quanta, SLOT(slotLoadToolbar()), ac, "toolbars_load_user");
- new KAction(i18n("Save as &Local Toolbar..."), 0, m_quanta, SLOT(slotSaveLocalToolbar()), ac, "toolbars_save_local");
- new KAction(i18n("Save as &Project Toolbar..."), 0, m_quanta, SLOT(slotSaveProjectToolbar()), ac, "toolbars_save_project");
- new KAction(i18n("&New User Toolbar..."), 0, m_quanta, SLOT(slotAddToolbar()), ac, "toolbars_add");
- new KAction(i18n("&Remove User Toolbar..."), 0, m_quanta, SLOT(slotRemoveToolbar()), ac, "toolbars_remove");
- new KAction(i18n("Re&name User Toolbar..."), 0, m_quanta, SLOT(slotRenameToolbar()), ac, "toolbars_rename");
- new KAction(i18n("Send Toolbar in E&mail..."), "mail_send", 0, m_quanta, SLOT(slotSendToolbar()), ac, "toolbars_send");
- new KAction(i18n("&Upload Toolbar..." ), "network", 0, m_quanta, SLOT(slotUploadToolbar()), ac, "toolbars_upload" );
- new KAction(i18n("&Download Toolbar..." ), "network", 0, m_quanta, SLOT(slotDownloadToolbar()), ac, "toolbars_download" );
+ new KAction(i18n("Load &Global Toolbar..."), 0, m_quanta, TQT_SLOT(slotLoadGlobalToolbar()), ac, "toolbars_load_global");
+ new KAction(i18n("Load &Local Toolbar..."), 0, m_quanta, TQT_SLOT(slotLoadToolbar()), ac, "toolbars_load_user");
+ new KAction(i18n("Save as &Local Toolbar..."), 0, m_quanta, TQT_SLOT(slotSaveLocalToolbar()), ac, "toolbars_save_local");
+ new KAction(i18n("Save as &Project Toolbar..."), 0, m_quanta, TQT_SLOT(slotSaveProjectToolbar()), ac, "toolbars_save_project");
+ new KAction(i18n("&New User Toolbar..."), 0, m_quanta, TQT_SLOT(slotAddToolbar()), ac, "toolbars_add");
+ new KAction(i18n("&Remove User Toolbar..."), 0, m_quanta, TQT_SLOT(slotRemoveToolbar()), ac, "toolbars_remove");
+ new KAction(i18n("Re&name User Toolbar..."), 0, m_quanta, TQT_SLOT(slotRenameToolbar()), ac, "toolbars_rename");
+ new KAction(i18n("Send Toolbar in E&mail..."), "mail_send", 0, m_quanta, TQT_SLOT(slotSendToolbar()), ac, "toolbars_send");
+ new KAction(i18n("&Upload Toolbar..." ), "network", 0, m_quanta, TQT_SLOT(slotUploadToolbar()), ac, "toolbars_upload" );
+ new KAction(i18n("&Download Toolbar..." ), "network", 0, m_quanta, TQT_SLOT(slotDownloadToolbar()), ac, "toolbars_download" );
KToggleAction *toggle = new KToggleAction( i18n("Smart Tag Insertion"), 0, ac, "smart_tag_insertion");
- connect(toggle, SIGNAL(toggled(bool)), m_quanta, SLOT(slotSmartTagInsertion()));
+ connect(toggle, TQT_SIGNAL(toggled(bool)), m_quanta, TQT_SLOT(slotSmartTagInsertion()));
m_quanta->showDTDToolbar=new KToggleAction(i18n("Show DTD Toolbar"), 0, ac, "view_dtd_toolbar");
- connect(m_quanta->showDTDToolbar, SIGNAL(toggled(bool)), m_quanta, SLOT(slotToggleDTDToolbar(bool)));
+ connect(m_quanta->showDTDToolbar, TQT_SIGNAL(toggled(bool)), m_quanta, TQT_SLOT(slotToggleDTDToolbar(bool)));
m_quanta->showDTDToolbar->setCheckedState(i18n("Hide DTD Toolbar"));
new KAction(i18n("Complete Text"), CTRL+Key_Space,
- m_quanta, SLOT(slotShowCompletion()), ac,"show_completion");
+ m_quanta, TQT_SLOT(slotShowCompletion()), ac,"show_completion");
new KAction(i18n("Completion Hints"), CTRL+SHIFT+Key_Space,
- m_quanta, SLOT(slotShowCompletionHint()), ac,"show_completion_hint");
+ m_quanta, TQT_SLOT(slotShowCompletionHint()), ac,"show_completion_hint");
- KStdAction::back(m_quanta, SLOT( slotBack() ), ac, "w_back");
- KStdAction::forward(m_quanta, SLOT( slotForward() ), ac, "w_forward");
+ KStdAction::back(m_quanta, TQT_SLOT( slotBack() ), ac, "w_back");
+ KStdAction::forward(m_quanta, TQT_SLOT( slotForward() ), ac, "w_forward");
- new KAction(i18n("Open File: none"), 0, m_quanta, SLOT(slotOpenFileUnderCursor()), ac, "open_file_under_cursor");
- new KAction(i18n("Upload..."), 0, m_quanta, SLOT(slotUploadFile()), ac, "upload_file");
- new KAction(i18n("Delete File"), 0, m_quanta, SLOT(slotDeleteFile()), ac, "delete_file");
+ new KAction(i18n("Open File: none"), 0, m_quanta, TQT_SLOT(slotOpenFileUnderCursor()), ac, "open_file_under_cursor");
+ new KAction(i18n("Upload..."), 0, m_quanta, TQT_SLOT(slotUploadFile()), ac, "upload_file");
+ new KAction(i18n("Delete File"), 0, m_quanta, TQT_SLOT(slotDeleteFile()), ac, "delete_file");
- QString ss = i18n("Upload Opened Project Files...");
-/* new KAction(i18n("Upload Opened Project Files"), 0, m_quanta, SLOT(slotUploadOpenedFiles()), ac, "upload_opened_files"); */
+ TQString ss = i18n("Upload Opened Project Files...");
+/* new KAction(i18n("Upload Opened Project Files"), 0, m_quanta, TQT_SLOT(slotUploadOpenedFiles()), ac, "upload_opened_files"); */
- QString error;
+ TQString error;
int el, ec;
- m_quanta->m_actions = new QDomDocument();
+ m_quanta->m_actions = new TQDomDocument();
//load the global actions
- QFile f(qConfig.globalDataDir + resourceDir + "actions.rc");
+ TQFile f(qConfig.globalDataDir + resourceDir + "actions.rc");
if ( f.open( IO_ReadOnly ))
{
if (m_quanta->m_actions->setContent(&f, &error, &el, &ec))
{
- QDomElement docElem = m_quanta->m_actions->documentElement();
+ TQDomElement docElem = m_quanta->m_actions->documentElement();
- QDomNode n = docElem.firstChild();
+ TQDomNode n = docElem.firstChild();
while( !n.isNull() ) {
- QDomElement e = n.toElement(); // try to convert the node to an element.
+ TQDomElement e = n.toElement(); // try to convert the node to an element.
if( !e.isNull() ) { // the node was really an element.
bool toggable = (e.attribute("toggable", "") == "true");
new TagAction(&e, m_quanta, toggable);
@@ -963,12 +963,12 @@ void QuantaInit::initActions()
n = n.nextSibling();
}
} else
- kdError(24000) << QString("Error %1 at (%2, %3) in %4").arg(error).arg(el).arg(ec).arg(f.name()) << endl;
+ kdError(24000) << TQString("Error %1 at (%2, %3) in %4").arg(error).arg(el).arg(ec).arg(f.name()) << endl;
f.close();
}
m_quanta->m_actions->clear();
//read the user defined actions
- QString s = locateLocal("appdata","actions.rc");
+ TQString s = locateLocal("appdata","actions.rc");
if (!s.isEmpty())
{
f.setName(s);
@@ -976,11 +976,11 @@ void QuantaInit::initActions()
{
if (m_quanta->m_actions->setContent(&f, &error, &el, &ec))
{
- QDomElement docElem = m_quanta->m_actions->documentElement();
+ TQDomElement docElem = m_quanta->m_actions->documentElement();
- QDomNode n = docElem.firstChild();
+ TQDomNode n = docElem.firstChild();
while( !n.isNull() ) {
- QDomElement e = n.toElement(); // try to convert the node to an element.
+ TQDomElement e = n.toElement(); // try to convert the node to an element.
if( !e.isNull())
{ // the node was really an element.
delete ac->action(e.attribute("name"));
@@ -990,7 +990,7 @@ void QuantaInit::initActions()
n = n.nextSibling();
}
} else
- kdError(24000) << QString("Error %1 at (%2, %3) in %4").arg(error).arg(el).arg(ec).arg(f.name()) << endl;
+ kdError(24000) << TQString("Error %1 at (%2, %3) in %4").arg(error).arg(el).arg(ec).arg(f.name()) << endl;
f.close();
}
} else
@@ -1001,16 +1001,16 @@ void QuantaInit::initActions()
// create the preview action
m_quanta->showPreviewAction =
new KToolBarPopupAction( i18n( "&Preview" ), "preview", Key_F6,
- m_quanta, SLOT( slotToggleShowPreview() ),
+ m_quanta, TQT_SLOT( slotToggleShowPreview() ),
ac, "show_preview" );
KAction *act = new KAction( i18n( "Preview Without Frames" ), "", 0,
- m_quanta, SLOT(slotShowNoFramesPreview()),
+ m_quanta, TQT_SLOT(slotShowNoFramesPreview()),
ac, "show_preview_no_frames" );
act->plug(m_quanta->showPreviewAction->popupMenu());
act = new KAction( i18n( "View with &Konqueror" ), "konqueror", Key_F12,
- m_quanta, SLOT( slotViewInKFM() ),
+ m_quanta, TQT_SLOT( slotViewInKFM() ),
ac, "view_with_konqueror" );
act->plug(m_quanta->showPreviewAction->popupMenu());
@@ -1032,62 +1032,62 @@ void QuantaInit::initActions()
act->plug(m_quanta->showPreviewAction->popupMenu());
act = new KAction( i18n( "View with L&ynx" ), "terminal", 0,
- m_quanta, SLOT( slotViewInLynx() ),
+ m_quanta, TQT_SLOT( slotViewInLynx() ),
ac, "view_with_lynx" );
act->plug(m_quanta->showPreviewAction->popupMenu());
(void) new KAction( i18n( "Table Editor..." ), "quick_table", 0,
- m_quanta, SLOT( slotTagEditTable() ),
+ m_quanta, TQT_SLOT( slotTagEditTable() ),
ac, "tag_edit_table" );
(void) new KAction( i18n( "Quick List..." ), "quick_list", 0,
- m_quanta, SLOT( slotTagQuickList() ),
+ m_quanta, TQT_SLOT( slotTagQuickList() ),
ac, "tag_quick_list" );
(void) new KAction( i18n( "Color..." ), "colorize", CTRL+SHIFT+Key_C,
- m_quanta, SLOT( slotTagColor() ),
+ m_quanta, TQT_SLOT( slotTagColor() ),
ac, "tag_color" );
(void) new KAction( i18n( "Email..." ), "tag_mail", 0,
- m_quanta, SLOT( slotTagMail() ),
+ m_quanta, TQT_SLOT( slotTagMail() ),
ac, "tag_mail" );
(void) new KAction( i18n( "Misc. Tag..." ), "tag_misc", CTRL+SHIFT+Key_T,
- m_quanta, SLOT( slotTagMisc() ),
+ m_quanta, TQT_SLOT( slotTagMisc() ),
ac, "tag_misc" );
(void) new KAction( i18n( "Frame Wizard..." ), "frame", 0,
- m_quanta, SLOT( slotFrameWizard() ),
+ m_quanta, TQT_SLOT( slotFrameWizard() ),
ac, "tag_frame_wizard" );
(void) new KAction( i18n( "Paste &HTML Quoted" ), "editpaste", 0,
- m_quanta, SLOT( slotPasteHTMLQuoted() ),
+ m_quanta, TQT_SLOT( slotPasteHTMLQuoted() ),
ac, "edit_paste_html_quoted" );
(void) new KAction( i18n( "Paste &URL Encoded" ), "editpaste", 0,
- m_quanta, SLOT( slotPasteURLEncoded() ),
+ m_quanta, TQT_SLOT( slotPasteURLEncoded() ),
ac, "edit_paste_url_encoded" );
(void) new KAction( i18n( "Insert CSS..." ),"css", 0,
- m_quanta, SLOT( slotInsertCSS() ),
+ m_quanta, TQT_SLOT( slotInsertCSS() ),
ac, "insert_css" );
// special-character combo
KAction* char_action = new KAction(
i18n( "Insert Special Character" ), "charset", 0,
ac, "insert_char" );
- connect( char_action, SIGNAL(activated()),
- m_quanta, SLOT(slotInsertChar()) );
+ connect( char_action, TQT_SIGNAL(activated()),
+ m_quanta, TQT_SLOT(slotInsertChar()) );
- connect(m_quanta, SIGNAL(eventHappened(const QString&, const QString&, const QString& )), QPEvents::ref(m_quanta), SLOT(slotEventHappened(const QString&, const QString&, const QString& )));
- connect(m_quanta->doc(), SIGNAL(eventHappened(const QString&, const QString&, const QString& )), QPEvents::ref(m_quanta), SLOT(slotEventHappened(const QString&, const QString&, const QString& )));
- connect(ViewManager::ref(), SIGNAL(eventHappened(const QString&, const QString&, const QString& )), QPEvents::ref(m_quanta), SLOT(slotEventHappened(const QString&, const QString&, const QString& )));
+ connect(m_quanta, TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), QPEvents::ref(m_quanta), TQT_SLOT(slotEventHappened(const TQString&, const TQString&, const TQString& )));
+ connect(m_quanta->doc(), TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), QPEvents::ref(m_quanta), TQT_SLOT(slotEventHappened(const TQString&, const TQString&, const TQString& )));
+ connect(ViewManager::ref(), TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), QPEvents::ref(m_quanta), TQT_SLOT(slotEventHappened(const TQString&, const TQString&, const TQString& )));
QuantaBookmarks *m_bookmarks = new QuantaBookmarks(ViewManager::ref(m_quanta));
m_bookmarks->createActions(ac);
- connect(m_bookmarks, SIGNAL(gotoFileAndLine(const QString&, int, int)), m_quanta, SLOT(gotoFileAndLine(const QString&, int, int)));
+ connect(m_bookmarks, TQT_SIGNAL(gotoFileAndLine(const TQString&, int, int)), m_quanta, TQT_SLOT(gotoFileAndLine(const TQString&, int, int)));
}
/** Initialize the plugin architecture. */
@@ -1097,10 +1097,10 @@ void QuantaInit::initPlugins()
m_quanta->m_pluginInterface = QuantaPluginInterface::ref(m_quanta);
- connect(m_quanta->m_pluginInterface, SIGNAL(hideSplash()),
- m_quanta, SLOT(slotHideSplash()));
- connect(m_quanta->m_pluginInterface, SIGNAL(statusMsg(const QString &)),
- m_quanta, SLOT(slotStatusMsg(const QString & )));
+ connect(m_quanta->m_pluginInterface, TQT_SIGNAL(hideSplash()),
+ m_quanta, TQT_SLOT(slotHideSplash()));
+ connect(m_quanta->m_pluginInterface, TQT_SIGNAL(statusMsg(const TQString &)),
+ m_quanta, TQT_SLOT(slotStatusMsg(const TQString & )));
m_quanta->m_pluginInterface->readConfig();
if (!m_quanta->m_pluginInterface->pluginAvailable("KFileReplace"))
@@ -1110,15 +1110,15 @@ void QuantaInit::initPlugins()
}
-void QuantaInit::recoverCrashed(QStringList& recoveredFileNameList)
+void QuantaInit::recoverCrashed(TQStringList& recoveredFileNameList)
{
m_quanta->m_doc->blockSignals(true);
execCommandPS("ps -C quanta -C quanta_be -o pid --no-headers");
- m_PIDlist = QStringList::split("\n", m_quanta->m_scriptOutput);
+ m_PIDlist = TQStringList::split("\n", m_quanta->m_scriptOutput);
m_config->setGroup("Projects");
- QString pu = QuantaCommon::readPathEntry(m_config, "Last Project");
+ TQString pu = QuantaCommon::readPathEntry(m_config, "Last Project");
KURL u;
QuantaCommon::setUrl(u, pu);
@@ -1131,18 +1131,18 @@ void QuantaInit::recoverCrashed(QStringList& recoveredFileNameList)
m_config->reparseConfiguration();
m_config->setGroup("General Options");
- QStringList backedUpUrlsList = QuantaCommon::readPathListEntry(m_config, "List of backedup files");
- QStringList autosavedUrlsList = QuantaCommon::readPathListEntry(m_config, "List of autosaved files");
+ TQStringList backedUpUrlsList = QuantaCommon::readPathListEntry(m_config, "List of backedup files");
+ TQStringList autosavedUrlsList = QuantaCommon::readPathListEntry(m_config, "List of autosaved files");
- QStringList::ConstIterator backedUpUrlsEndIt = backedUpUrlsList.constEnd();
- for (QStringList::ConstIterator backedUpUrlsIt = backedUpUrlsList.constBegin();
+ TQStringList::ConstIterator backedUpUrlsEndIt = backedUpUrlsList.constEnd();
+ for (TQStringList::ConstIterator backedUpUrlsIt = backedUpUrlsList.constBegin();
backedUpUrlsIt != backedUpUrlsEndIt; ++backedUpUrlsIt )
{
// when quanta crashes and file autoreloading option is on
// then if user restarts quanta, the backup copies will reload
- QString backedUpFileName = (*backedUpUrlsIt).left((*backedUpUrlsIt).findRev(".")); //the filename without the PID
+ TQString backedUpFileName = (*backedUpUrlsIt).left((*backedUpUrlsIt).findRev(".")); //the filename without the PID
bool notFound;
- QString autosavedPath = searchPathListEntry(backedUpFileName, autosavedUrlsList, notFound);
+ TQString autosavedPath = searchPathListEntry(backedUpFileName, autosavedUrlsList, notFound);
if (!autosavedPath.isEmpty()) //the current item was autosaved and is not in use by another Quanta
{
KURL originalVersion;
@@ -1158,16 +1158,16 @@ void QuantaInit::recoverCrashed(QStringList& recoveredFileNameList)
KIO::UDSEntry entry;
KIO::NetAccess::stat(originalVersion, entry, m_quanta);
KFileItem* item= new KFileItem(entry, originalVersion, false, true);
- QString origTime = item->timeString();
+ TQString origTime = item->timeString();
KIO::filesize_t origSize = item->size();
delete item;
KIO::NetAccess::stat(autosavedVersion, entry, m_quanta);
item= new KFileItem(entry, autosavedVersion, false, true);
- QString backupTime = item->timeString();
+ TQString backupTime = item->timeString();
KIO::filesize_t backupSize = item->size();
delete item;
- if (QFileInfo(autosavedPath).exists()) //if the backup file exists
+ if (TQFileInfo(autosavedPath).exists()) //if the backup file exists
{
emit hideSplash();
DirtyDlg *dlg = new DirtyDlg(autosavedVersion.path(), originalVersion.path(), false, m_quanta);
@@ -1198,7 +1198,7 @@ void QuantaInit::recoverCrashed(QStringList& recoveredFileNameList)
{
//backup the current version and restore it from the autosaved backup
KURL backupURL = originalVersion;
- backupURL.setPath(backupURL.path() + "." + QString::number(getpid(),10) + ".backup");
+ backupURL.setPath(backupURL.path() + "." + TQString::number(getpid(),10) + ".backup");
QExtFileInfo::copy(originalVersion, backupURL, -1, true, false, m_quanta);
QExtFileInfo::copy(autosavedVersion, originalVersion, -1, true, false, m_quanta);
//we save a list of autosaved file names so "KQApplicationPrivate::init()"
@@ -1211,13 +1211,13 @@ void QuantaInit::recoverCrashed(QStringList& recoveredFileNameList)
recoveredFileNameList += backedUpFileName;
}
delete dlg;
- QFile::remove(autosavedPath); //we don't need the backup anymore
+ TQFile::remove(autosavedPath); //we don't need the backup anymore
}
}
//remove the auto-backup file from the list
m_config->setGroup("General Options");
- QStringList autosavedFilesEntryList = QuantaCommon::readPathListEntry(m_config, "List of autosaved files");
- QStringList::Iterator entryIt = autosavedFilesEntryList.begin();
+ TQStringList autosavedFilesEntryList = QuantaCommon::readPathListEntry(m_config, "List of autosaved files");
+ TQStringList::Iterator entryIt = autosavedFilesEntryList.begin();
while(entryIt != autosavedFilesEntryList.end())
{
if ((*entryIt) == KURL::fromPathOrURL(autosavedPath).url())
@@ -1235,8 +1235,8 @@ void QuantaInit::recoverCrashed(QStringList& recoveredFileNameList)
//remove processed items
m_config->setGroup("General Options");
- QStringList backedupFilesEntryList = QuantaCommon::readPathListEntry(m_config, "List of backedup files");
- QStringList::Iterator entryIt = backedupFilesEntryList.begin();
+ TQStringList backedupFilesEntryList = QuantaCommon::readPathListEntry(m_config, "List of backedup files");
+ TQStringList::Iterator entryIt = backedupFilesEntryList.begin();
while (entryIt != backedupFilesEntryList.end())
{
if ((*entryIt) == (*backedUpUrlsIt))
@@ -1249,15 +1249,15 @@ void QuantaInit::recoverCrashed(QStringList& recoveredFileNameList)
}
//clean up auto-backup list, just in case of an old Quanta was used before
- QStringList::Iterator entryIt = autosavedUrlsList.begin();
+ TQStringList::Iterator entryIt = autosavedUrlsList.begin();
while (entryIt != autosavedUrlsList.end())
{
- QString quPID = retrievePID((*entryIt));
+ TQString quPID = retrievePID((*entryIt));
//check if the file is opened by another running Quanta or not
bool isOrphan = true;
- QStringList::ConstIterator PIDEndIt = m_PIDlist.constEnd();
- for (QStringList::ConstIterator PIDIt = m_PIDlist.constBegin(); PIDIt != PIDEndIt; ++PIDIt )
+ TQStringList::ConstIterator PIDEndIt = m_PIDlist.constEnd();
+ for (TQStringList::ConstIterator PIDIt = m_PIDlist.constBegin(); PIDIt != PIDEndIt; ++PIDIt )
{
if ((*PIDIt) == quPID && qConfig.quantaPID != quPID)
{
@@ -1276,20 +1276,20 @@ void QuantaInit::recoverCrashed(QStringList& recoveredFileNameList)
}
- void QuantaInit::execCommandPS(const QString& cmd)
+ void QuantaInit::execCommandPS(const TQString& cmd)
{
//We create a KProcess that executes the "ps" *nix command to get the PIDs of the
//other instances of quanta actually running
KProcess *execCommand = new KProcess();
- *(execCommand) << QStringList::split(" ",cmd);
+ *(execCommand) << TQStringList::split(" ",cmd);
- connect(execCommand, SIGNAL(receivedStdout(KProcess*,char*,int)),
- m_quanta, SLOT(slotGetScriptOutput(KProcess*,char*,int)));
- connect(execCommand, SIGNAL(receivedStderr(KProcess*,char*,int)),
- m_quanta, SLOT(slotGetScriptError(KProcess*,char*,int)));
- connect(execCommand, SIGNAL(processExited(KProcess*)),
- m_quanta, SLOT(slotProcessExited(KProcess*)));
+ connect(execCommand, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),
+ m_quanta, TQT_SLOT(slotGetScriptOutput(KProcess*,char*,int)));
+ connect(execCommand, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)),
+ m_quanta, TQT_SLOT(slotGetScriptError(KProcess*,char*,int)));
+ connect(execCommand, TQT_SIGNAL(processExited(KProcess*)),
+ m_quanta, TQT_SLOT(slotProcessExited(KProcess*)));
if (!execCommand->start(KProcess::NotifyOnExit,KProcess::All))
{
@@ -1298,9 +1298,9 @@ void QuantaInit::recoverCrashed(QStringList& recoveredFileNameList)
else
{
//To avoid lock-ups, start a timer.
- QTimer *timer = new QTimer(m_quanta);
- connect(timer, SIGNAL(timeout()),
- m_quanta, SLOT(slotProcessTimeout()));
+ TQTimer *timer = new TQTimer(m_quanta);
+ connect(timer, TQT_SIGNAL(timeout()),
+ m_quanta, TQT_SLOT(slotProcessTimeout()));
timer->start(180*1000, true);
QExtFileInfo internalFileInfo;
m_quanta->m_loopStarted = true;
@@ -1310,21 +1310,21 @@ void QuantaInit::recoverCrashed(QStringList& recoveredFileNameList)
}
- QString QuantaInit::searchPathListEntry(const QString& url, const QStringList& autosavedUrlsList, bool &notFound)
+ TQString QuantaInit::searchPathListEntry(const TQString& url, const TQStringList& autosavedUrlsList, bool &notFound)
{
- QString backedUpUrlHashedPath = retrieveHashedPath('.' + Document::hashFilePath(url));
+ TQString backedUpUrlHashedPath = retrieveHashedPath('.' + Document::hashFilePath(url));
notFound = true;
- QStringList::ConstIterator autosavedUrlsEndIt = autosavedUrlsList.constEnd();
- for (QStringList::ConstIterator autosavedUrlsIt = autosavedUrlsList.constBegin();
+ TQStringList::ConstIterator autosavedUrlsEndIt = autosavedUrlsList.constEnd();
+ for (TQStringList::ConstIterator autosavedUrlsIt = autosavedUrlsList.constBegin();
autosavedUrlsIt != autosavedUrlsEndIt;
++autosavedUrlsIt)
{
- QString quPID = retrievePID((*autosavedUrlsIt));
+ TQString quPID = retrievePID((*autosavedUrlsIt));
//check if the file is opened by another running Quanta or not
bool isOrphan = true;
- QStringList::ConstIterator PIDEndIt = m_PIDlist.constEnd();
- for (QStringList::ConstIterator PIDIt = m_PIDlist.constBegin(); PIDIt != PIDEndIt; ++PIDIt )
+ TQStringList::ConstIterator PIDEndIt = m_PIDlist.constEnd();
+ for (TQStringList::ConstIterator PIDIt = m_PIDlist.constBegin(); PIDIt != PIDEndIt; ++PIDIt )
{
if ((*PIDIt) == quPID && qConfig.quantaPID != quPID)
{
@@ -1341,11 +1341,11 @@ void QuantaInit::recoverCrashed(QStringList& recoveredFileNameList)
}
}
- return QString::null;
+ return TQString::null;
}
/** Retrieves hashed path from the name of a backup file */
-QString QuantaInit::retrieveHashedPath(const QString& filename)
+TQString QuantaInit::retrieveHashedPath(const TQString& filename)
{
int lastPoint = filename.findRev(".");
int Ppos = filename.find("P", lastPoint);
@@ -1355,9 +1355,9 @@ QString QuantaInit::retrieveHashedPath(const QString& filename)
/** Retrieves PID from the name of a backup file */
-QString QuantaInit::retrievePID(const QString& filename)
+TQString QuantaInit::retrievePID(const TQString& filename)
{
- QString strPID = QString::null;
+ TQString strPID = TQString::null;
strPID = filename.mid(filename.findRev("P") + 1);
if (strPID.isEmpty())
@@ -1385,10 +1385,10 @@ void QuantaInit::loadVPLConfig()
}
struct Dependency{
- QString name;
- QString execName;
- QString url;
- QString description;
+ TQString name;
+ TQString execName;
+ TQString url;
+ TQString description;
enum Type{
Executable = 0,
Plugin
@@ -1399,7 +1399,7 @@ struct Dependency{
void QuantaInit::checkRuntimeDependencies()
{
- QValueList<Dependency> dependencies;
+ TQValueList<Dependency> dependencies;
Dependency dependency;
dependency.name = "Kommander";
dependency.execName = "kmdr-executor";
@@ -1474,40 +1474,40 @@ void QuantaInit::checkRuntimeDependencies()
dependency.type = Dependency::Plugin;
dependencies.append(dependency);
- QString errorStr;
- QString stdErrorMsg = i18n("<br><b>- %1</b> [<i>%2</i>] - %3 will not be available;");
- for (QValueList<Dependency>::ConstIterator it = dependencies.constBegin(); it != dependencies.constEnd(); ++it)
+ TQString errorStr;
+ TQString stdErrorMsg = i18n("<br><b>- %1</b> [<i>%2</i>] - %3 will not be available;");
+ for (TQValueList<Dependency>::ConstIterator it = dependencies.constBegin(); it != dependencies.constEnd(); ++it)
{
dependency = *it;
if (dependency.type == Dependency::Executable)
{
if (KStandardDirs::findExe(dependency.execName).isNull())
- errorStr += QString(stdErrorMsg).arg(dependency.name).arg(dependency.url).arg(dependency.description);
+ errorStr += TQString(stdErrorMsg).arg(dependency.name).arg(dependency.url).arg(dependency.description);
} else
if (dependency.type == Dependency::Plugin)
{
if (!QuantaPlugin::validatePlugin(m_quanta->m_pluginInterface->plugin(dependency.execName)))
- errorStr += QString(stdErrorMsg).arg(dependency.name).arg(dependency.url).arg(dependency.description);
+ errorStr += TQString(stdErrorMsg).arg(dependency.name).arg(dependency.url).arg(dependency.description);
}
}
#ifdef ENABLE_CVSSERVICE
- QString error;
- QCString appId;
+ TQString error;
+ TQCString appId;
- KApplication::startServiceByDesktopName("cvsservice", QStringList(), &error,
+ KApplication::startServiceByDesktopName("cvsservice", TQStringList(), &error,
&appId);
if (appId.isEmpty())
{
- errorStr += QString(stdErrorMsg).arg("Cervisia (cvsservice)").arg("http://www.kde.org/apps/cervisia").arg(i18n("integrated CVS management"));
+ errorStr += TQString(stdErrorMsg).arg("Cervisia (cvsservice)").arg("http://www.kde.org/apps/cervisia").arg(i18n("integrated CVS management"));
} else
{
CVSService::ref(m_quanta->actionCollection())->setAppId(appId);
- connect(CVSService::ref(), SIGNAL(clearMessages()), m_quanta->m_messageOutput, SLOT(clear()));
- connect(CVSService::ref(), SIGNAL(showMessage(const QString&, bool)), m_quanta->m_messageOutput, SLOT(showMessage(const QString&, bool)));
- connect(CVSService::ref(), SIGNAL(commandExecuted(const QString&, const QStringList&)), m_quanta, SLOT(slotCVSCommandExecuted(const QString&, const QStringList&)));
- //connect(CVSService::ref(), SIGNAL(statusMsg(const QString &)), m_quanta, SLOT(slotStatusMsg(const QString & )));
+ connect(CVSService::ref(), TQT_SIGNAL(clearMessages()), m_quanta->m_messageOutput, TQT_SLOT(clear()));
+ connect(CVSService::ref(), TQT_SIGNAL(showMessage(const TQString&, bool)), m_quanta->m_messageOutput, TQT_SLOT(showMessage(const TQString&, bool)));
+ connect(CVSService::ref(), TQT_SIGNAL(commandExecuted(const TQString&, const TQStringList&)), m_quanta, TQT_SLOT(slotCVSCommandExecuted(const TQString&, const TQStringList&)));
+ //connect(CVSService::ref(), TQT_SIGNAL(statusMsg(const TQString &)), m_quanta, TQT_SLOT(slotStatusMsg(const TQString & )));
m_quanta->fTab->plugCVSMenu();
pTab->plugCVSMenu();
}
@@ -1523,36 +1523,36 @@ void QuantaInit::checkRuntimeDependencies()
void QuantaInit::readAbbreviations()
{
- QDomDocument doc;
- QString groupName;
+ TQDomDocument doc;
+ TQString groupName;
bool mainAbbrevFileFound = false;
- QStringList mainFileList;
+ TQStringList mainFileList;
mainFileList << qConfig.globalDataDir + resourceDir + "abbreviations.xml";
mainFileList << KGlobal::dirs()->saveLocation("data") + resourceDir + "abbreviations.xml";
for (uint i = 0; i < mainFileList.count(); i++)
{
- if (!QFile::exists(mainFileList[i]))
+ if (!TQFile::exists(mainFileList[i]))
continue;
- QFile file(mainFileList[i]);
+ TQFile file(mainFileList[i]);
if (file.open(IO_ReadOnly))
{
if (doc.setContent(&file))
{
- QDomNodeList groupList = doc.elementsByTagName("Group");
+ TQDomNodeList groupList = doc.elementsByTagName("Group");
for (uint groupIdx = 0; groupIdx < groupList.count(); groupIdx++)
{
Abbreviation abbrev;
- QDomElement el = groupList.item(groupIdx).toElement();
+ TQDomElement el = groupList.item(groupIdx).toElement();
groupName = el.attribute("name");
- QDomNodeList dtepList = el.elementsByTagName("DTEP");
+ TQDomNodeList dtepList = el.elementsByTagName("DTEP");
for (uint dtepListIdx = 0; dtepListIdx < dtepList.count(); dtepListIdx++)
{
abbrev.dteps.append(dtepList.item(dtepListIdx).toElement().attribute("name"));
}
- QDomNodeList nodeList = el.elementsByTagName("Template");
+ TQDomNodeList nodeList = el.elementsByTagName("Template");
for (uint nodeIdx = 0; nodeIdx < nodeList.count(); nodeIdx++)
{
- QDomElement e = nodeList.item(nodeIdx).toElement();
+ TQDomElement e = nodeList.item(nodeIdx).toElement();
abbrev.abbreviations.insert(e.attribute("name")+" "+e.attribute("description"), e.attribute("code"));
}
qConfig.abbreviations.insert(groupName, abbrev);
@@ -1565,19 +1565,19 @@ void QuantaInit::readAbbreviations()
if (mainAbbrevFileFound) return;
//Compatibility code: read the abbreviations files from the DTEP directories
//TODO: Remove when upgrade from 3.2 is not supported.
- QStringList filenameList = DTDs::ref()->fileNameList(false);
- QStringList::Iterator it;
+ TQStringList filenameList = DTDs::ref()->fileNameList(false);
+ TQStringList::Iterator it;
for (it = filenameList.begin(); it != filenameList.end(); ++it)
{
int pos =(*it).find('|');
- QString dirName = (*it).mid(pos + 1);
- QString dtepName = (*it).left(pos);
+ TQString dirName = (*it).mid(pos + 1);
+ TQString dtepName = (*it).left(pos);
KURL dirURL(dirName);
dirURL.setFileName("");
dirName = dirURL.path(1);
- QString abbrevFile = dirName;
- QString tmpStr = dirName;
- QStringList resourceDirs = KGlobal::dirs()->resourceDirs("data");
+ TQString abbrevFile = dirName;
+ TQString tmpStr = dirName;
+ TQStringList resourceDirs = KGlobal::dirs()->resourceDirs("data");
bool dirFound = false;
for (uint i = 0; i < resourceDirs.count(); i++)
{
@@ -1593,18 +1593,18 @@ void QuantaInit::readAbbreviations()
abbrevFile = KGlobal::dirs()->saveLocation("data", tmpStr) +"/";
}
abbrevFile.append("abbreviations");
- if (!QFile::exists(abbrevFile))
+ if (!TQFile::exists(abbrevFile))
abbrevFile = dirName + "abbreviations";
- QFile f(abbrevFile);
+ TQFile f(abbrevFile);
if (f.open(IO_ReadOnly))
{
if (doc.setContent(&f))
{
Abbreviation abbrev;
- QDomNodeList nodeList = doc.elementsByTagName("Template");
+ TQDomNodeList nodeList = doc.elementsByTagName("Template");
for (uint i = 0; i < nodeList.count(); i++)
{
- QDomElement e = nodeList.item(i).toElement();
+ TQDomElement e = nodeList.item(i).toElement();
abbrev.abbreviations.insert(e.attribute("name")+" "+e.attribute("description"), e.attribute("code"));
}
abbrev.dteps.append(dtepName);
@@ -1622,7 +1622,7 @@ int QuantaInit::runningQuantas()
int i = 0;
for (QCStringList::iterator it = list.begin(); it != list.end(); ++it)
{
- if (QString(*it).startsWith("quanta", false))
+ if (TQString(*it).startsWith("quanta", false))
++i;
}
return i;
diff --git a/quanta/src/quanta_init.h b/quanta/src/quanta_init.h
index 8013e0bd..0b1f6ae9 100644
--- a/quanta/src/quanta_init.h
+++ b/quanta/src/quanta_init.h
@@ -20,7 +20,7 @@
// include files for Qt
-#include <qobject.h>
+#include <tqobject.h>
// include files for KDE
#include <kparts/dockmainwindow.h>
@@ -48,12 +48,12 @@ public:
~QuantaInit();
/** Loads the initial project */
- void loadInitialProject(const QString& url);
+ void loadInitialProject(const TQString& url);
/**Executes *nix ps command */
- void execCommandPS(const QString& cmd);
+ void execCommandPS(const TQString& cmd);
/** if there are backup files, asks user whether wants to restore them or to mantain the originals instead*/
- void recoverCrashed(QStringList& recoveredFileNameList);
+ void recoverCrashed(TQStringList& recoveredFileNameList);
/** Delayed initialization. */
void initQuanta();
void openLastFiles();
@@ -76,22 +76,22 @@ private:
void checkRuntimeDependencies();
void readAbbreviations();
- KMdiToolViewAccessor* addToolTreeView(QWidget *widget, const QString &name, const QPixmap &icon, KDockWidget::DockPosition position);
+ KMdiToolViewAccessor* addToolTreeView(TQWidget *widget, const TQString &name, const TQPixmap &icon, KDockWidget::DockPosition position);
/** Initialize the plugin architecture. */
void initPlugins();
/** find where was url backed up in the list of autosaved urls*/
- QString searchPathListEntry(const QString& url, const QStringList& autosavedUrlsList, bool &notFound);
+ TQString searchPathListEntry(const TQString& url, const TQStringList& autosavedUrlsList, bool &notFound);
/** Retrieves hashed path from the name of a backup file */
- QString retrieveHashedPath(const QString& filename);
+ TQString retrieveHashedPath(const TQString& filename);
/** Obtains PID from file extension */
- QString retrievePID(const QString& filename);
+ TQString retrievePID(const TQString& filename);
ProjectTreeView *pTab;
TemplatesTreeView *tTab;
// config
KConfig *m_config;
- QStringList m_PIDlist;
+ TQStringList m_PIDlist;
/** @return number of Quanta instances registered by dcop */
int runningQuantas();
};
diff --git a/quanta/src/quantadoc.cpp b/quanta/src/quantadoc.cpp
index 9100432e..eb5c538f 100644
--- a/quanta/src/quantadoc.cpp
+++ b/quanta/src/quantadoc.cpp
@@ -16,14 +16,14 @@
***************************************************************************/
// include files for Qt
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qwidget.h>
-#include <qtabwidget.h>
-#include <qtabbar.h>
-#include <qlayout.h>
-#include <qdragobject.h>
-#include <qobject.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqwidget.h>
+#include <tqtabwidget.h>
+#include <tqtabbar.h>
+#include <tqlayout.h>
+#include <tqdragobject.h>
+#include <tqobject.h>
// include files for KDE
@@ -76,13 +76,13 @@
#include "tagactionmanager.h"
#include "tagactionset.h"
-QuantaDoc::QuantaDoc(QWidget *parent, const char *name) : QObject(parent, name)
+QuantaDoc::QuantaDoc(TQWidget *parent, const char *name) : TQObject(parent, name)
{
fileWatcher = new KDirWatch(this);
attribMenu = new KPopupMenu();
attribMenu->insertTitle(i18n("Tag"));
- connect( attribMenu, SIGNAL(activated(int)), this, SLOT(slotInsertAttrib(int)));
+ connect( attribMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotInsertAttrib(int)));
}
QuantaDoc::~QuantaDoc()
@@ -144,18 +144,18 @@ bool QuantaDoc::newDocument( const KURL& url, bool switchToExisting )
return true;
}
-void QuantaDoc::openDocument(const KURL& urlToOpen, const QString &a_encoding,
+void QuantaDoc::openDocument(const KURL& urlToOpen, const TQString &a_encoding,
bool switchToExisting, bool readOnly)
{
bool idleTimerStatus = quantaApp->slotEnableIdleTimer(false);
KURL url = urlToOpen;
if (url.isLocalFile())
{
- QString path = QDir(url.path()).canonicalPath();
+ TQString path = TQDir(url.path()).canonicalPath();
if (!path.isEmpty())
url.setPath(path);
}
- QString encoding = a_encoding;
+ TQString encoding = a_encoding;
if (!newDocument(url, switchToExisting))
{
quantaApp->slotEnableIdleTimer(idleTimerStatus);
@@ -175,10 +175,10 @@ void QuantaDoc::openDocument(const KURL& urlToOpen, const QString &a_encoding,
{
if (encoding.isEmpty())
encoding = quantaApp->defaultEncoding();
- w->disconnect(SIGNAL(openingFailed(const KURL&)));
- connect(w, SIGNAL(openingFailed(const KURL&)), this, SLOT(slotOpeningFailed(const KURL&)));
- w->disconnect(SIGNAL(openingCompleted(const KURL&)));
- connect(w, SIGNAL(openingCompleted(const KURL&)), this, SLOT(slotOpeningCompleted(const KURL&)));
+ w->disconnect(TQT_SIGNAL(openingFailed(const KURL&)));
+ connect(w, TQT_SIGNAL(openingFailed(const KURL&)), this, TQT_SLOT(slotOpeningFailed(const KURL&)));
+ w->disconnect(TQT_SIGNAL(openingCompleted(const KURL&)));
+ connect(w, TQT_SIGNAL(openingCompleted(const KURL&)), this, TQT_SLOT(slotOpeningCompleted(const KURL&)));
w->open(url, encoding);
quantaApp->setTitle(url.prettyURL(0, KURL::StripFileProtocol));
}
@@ -192,7 +192,7 @@ void QuantaDoc::openDocument(const KURL& urlToOpen, const QString &a_encoding,
KTextEditor::HighlightingInterface* highlightIf = dynamic_cast<KTextEditor::HighlightingInterface*>(w->doc());
if (highlightIf)
{
- QString hlName;
+ TQString hlName;
int htmlIdx = -1, xmlIdx = -1;
for (uint i = 0; i < highlightIf->hlModeCount(); i++)
{
@@ -243,7 +243,7 @@ void QuantaDoc::slotOpeningCompleted(const KURL &url)
quantaApp->slotNewStatus();
quantaApp->setTitle(url.prettyURL(0, KURL::StripFileProtocol));
Project::ref()->loadCursorPosition(w->url(), dynamic_cast<KTextEditor::ViewCursorInterface*>(w->view()));
- emit eventHappened("after_open", url.url(), QString::null);
+ emit eventHappened("after_open", url.url(), TQString::null);
bool flag = TagActionManager::canIndentDTD(w->defaultDTD()->name);
quantaApp->actionCollection()->action("apply_source_indentation")->setEnabled(flag);
@@ -263,16 +263,16 @@ void QuantaDoc::slotAttribPopup()
if (node && node->tag)
{
Tag *tag = node->tag;
- QString tagName = tag->name;
- QStrIList attrList = QStrIList();
- QString name;
+ TQString tagName = tag->name;
+ TQStrIList attrList = TQStrIList();
+ TQString name;
for (int i=0; i < tag->attrCount(); i++ )
attrList.append( tag->attribute(i) );
if ( QuantaCommon::isKnownTag(w->getDTDIdentifier(),tagName) )
{
- QString caption = i18n("Attributes of <%1>").arg(tagName);
+ TQString caption = i18n("Attributes of <%1>").arg(tagName);
attribMenu->insertTitle( caption );
AttributeList *list = QuantaCommon::tagAttributes(w->getDTDIdentifier(),tagName );
@@ -289,9 +289,9 @@ void QuantaDoc::slotAttribPopup()
}
QTag* qtag = QuantaCommon::tagFromDTD(w->getDTDIdentifier(), tagName);
- for (QStringList::Iterator it = qtag->commonGroups.begin(); it != qtag->commonGroups.end(); ++it)
+ for (TQStringList::Iterator it = qtag->commonGroups.begin(); it != qtag->commonGroups.end(); ++it)
{
- QPopupMenu* popUpMenu = new QPopupMenu(attribMenu, (*it).latin1());
+ TQPopupMenu* popUpMenu = new TQPopupMenu(attribMenu, (*it).latin1());
AttributeList *attrs = qtag->parentDTD->commonAttrs->find(*it);
for (uint j = 0; j < attrs->count(); j++)
{
@@ -302,7 +302,7 @@ void QuantaDoc::slotAttribPopup()
popUpMenu->setItemEnabled( menuId , false );
}
}
- connect( popUpMenu, SIGNAL(activated(int)), this, SLOT(slotInsertAttrib(int)));
+ connect( popUpMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotInsertAttrib(int)));
attribMenu->insertItem(*it, popUpMenu);
}
@@ -310,14 +310,14 @@ void QuantaDoc::slotAttribPopup()
{
attribMenu->setActiveItem( 0);
- QPoint globalPos = w->view()->mapToGlobal(w->viewCursorIf->cursorCoordinates());
- QFont font = w->view()->font();
- globalPos.setY(globalPos.y() + QFontMetrics(font).height());
+ TQPoint globalPos = w->view()->mapToGlobal(w->viewCursorIf->cursorCoordinates());
+ TQFont font = w->view()->font();
+ globalPos.setY(globalPos.y() + TQFontMetrics(font).height());
attribMenu->exec(globalPos);
}
}
else {
- QString message = i18n("Unknown tag: %1").arg(tagName);
+ TQString message = i18n("Unknown tag: %1").arg(tagName);
quantaApp->slotStatusMsg( message );
}
}
@@ -333,20 +333,20 @@ void QuantaDoc::slotInsertAttrib( int id )
if (node && node->tag)
{
Tag *tag = node->tag;
- QString tagName = tag->name;
+ TQString tagName = tag->name;
if ( QuantaCommon::isKnownTag(w->getDTDIdentifier(), tagName) )
{
int menuId;
AttributeList *list = QuantaCommon::tagAttributes(w->getDTDIdentifier(), tagName);
menuId = list->count();
- QString attrStr;
+ TQString attrStr;
if (id <= menuId)
{
attrStr = list->at(id)->name;
} else
{
QTag* qtag = QuantaCommon::tagFromDTD(w->getDTDIdentifier(), tagName);
- for (QStringList::Iterator it = qtag->commonGroups.begin(); it != qtag->commonGroups.end(); ++it)
+ for (TQStringList::Iterator it = qtag->commonGroups.begin(); it != qtag->commonGroups.end(); ++it)
{
AttributeList *attrs = qtag->parentDTD->commonAttrs->find(*it);
menuId += attrs->count();
@@ -367,7 +367,7 @@ void QuantaDoc::slotInsertAttrib( int id )
delete attribMenu;
attribMenu = new KPopupMenu();
attribMenu->insertTitle(i18n("Tag"));
- connect( attribMenu, SIGNAL(activated(int)), this, SLOT(slotInsertAttrib(int)));
+ connect( attribMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotInsertAttrib(int)));
}
}
diff --git a/quanta/src/quantadoc.h b/quanta/src/quantadoc.h
index f825d72e..37891d69 100644
--- a/quanta/src/quantadoc.h
+++ b/quanta/src/quantadoc.h
@@ -31,11 +31,11 @@ class QuantaDoc : public QObject
public:
- QuantaDoc(QWidget *parent, const char *name=0);
+ QuantaDoc(TQWidget *parent, const char *name=0);
~QuantaDoc();
bool newDocument(const KURL&, bool switchToExisting = true);
- void openDocument(const KURL&, const QString& a_encoding = QString::null, bool switchToExisting = true, bool readOnly = false);
+ void openDocument(const KURL&, const TQString& a_encoding = TQString::null, bool switchToExisting = true, bool readOnly = false);
public slots:
/** close documents. */
@@ -49,7 +49,7 @@ public slots:
signals:
void newStatus();
void hideSplash();
- void eventHappened(const QString&, const QString&, const QString& );
+ void eventHappened(const TQString&, const TQString&, const TQString& );
private:
KPopupMenu *attribMenu;
diff --git a/quanta/src/quantaview.cpp b/quanta/src/quantaview.cpp
index 39cff3bc..51f93294 100644
--- a/quanta/src/quantaview.cpp
+++ b/quanta/src/quantaview.cpp
@@ -16,20 +16,20 @@
***************************************************************************/
// include files for Qt
-#include <qprinter.h>
-#include <qpainter.h>
-#include <qtabbar.h>
-#include <qtabwidget.h>
-#include <qtimer.h>
-#include <qlayout.h>
-#include <qwidgetstack.h>
-#include <qdom.h>
-#include <qfile.h>
-#include <qevent.h>
-#include <qwidget.h>
-#include <qsplitter.h>
-#include <qpoint.h>
-#include <qscrollview.h>
+#include <tqprinter.h>
+#include <tqpainter.h>
+#include <tqtabbar.h>
+#include <tqtabwidget.h>
+#include <tqtimer.h>
+#include <tqlayout.h>
+#include <tqwidgetstack.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqevent.h>
+#include <tqwidget.h>
+#include <tqsplitter.h>
+#include <tqpoint.h>
+#include <tqscrollview.h>
// include files for KDE
#include <kaction.h>
@@ -74,9 +74,9 @@
#include "tagdialog.h"
extern int NN;
-extern QValueList<Node*> nodes;
+extern TQValueList<Node*> nodes;
-QuantaView::QuantaView(QWidget *parent, const char *name, const QString &caption )
+QuantaView::QuantaView(TQWidget *parent, const char *name, const TQString &caption )
: KMdiChildView(parent, name)
, m_document(0L)
, m_plugin(0L)
@@ -86,21 +86,21 @@ QuantaView::QuantaView(QWidget *parent, const char *name, const QString &caption
{
setMDICaption(caption);
//Connect the VPL update timers
- connect(&m_sourceUpdateTimer, SIGNAL(timeout()), this, SLOT(sourceUpdateTimerTimeout()));
- connect(&m_VPLUpdateTimer, SIGNAL(timeout()), this, SLOT(VPLUpdateTimerTimeout()));
+ connect(&m_sourceUpdateTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(sourceUpdateTimerTimeout()));
+ connect(&m_VPLUpdateTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(VPLUpdateTimerTimeout()));
//create the source and VPL holding widgets
- m_documentArea = new QWidget(this);
+ m_documentArea = new TQWidget(this);
//get the reference to the user toolbar holding widget
ToolbarTabWidget *m_toolbarTab = ToolbarTabWidget::ref();
- m_toolbarTab->reparent(this, 0, QPoint(), true);
- m_toolbarTab ->setFocusPolicy( QWidget::NoFocus );
+ m_toolbarTab->reparent(this, 0, TQPoint(), true);
+ m_toolbarTab ->setFocusPolicy( TQWidget::NoFocus );
//create a splitter to separate the VPL and document area
- m_splitter = new QSplitter(Qt::Vertical, this);
+ m_splitter = new TQSplitter(Qt::Vertical, this);
//place the widgets in a grid
- m_viewLayout = new QGridLayout(this, 2, 0);
+ m_viewLayout = new TQGridLayout(this, 2, 0);
m_viewLayout->setRowStretch(0, 0);
m_viewLayout->setRowStretch(1,1);
m_viewLayout->addWidget( m_toolbarTab, 0, 0);
@@ -118,7 +118,7 @@ QuantaView::~QuantaView()
quantaApp->slotFileClosed(m_document);
if (m_document)
{
- m_document->view()->reparent(0L, 0, QPoint(), false);
+ m_document->view()->reparent(0L, 0, TQPoint(), false);
if (quantaApp)
emit documentClosed(m_document->url());
}
@@ -138,7 +138,7 @@ bool QuantaView::mayRemove()
if (m_document && m_document->isUntitled() && !m_document->isModified())
unmodifiedUntitled = true;
if (m_customWidget)
- m_customWidget->reparent(0L, 0, QPoint(), false);
+ m_customWidget->reparent(0L, 0, TQPoint(), false);
if (!saveModified())
return false;
slotSetSourceLayout();
@@ -149,8 +149,8 @@ bool QuantaView::mayRemove()
Node::deleteNode(baseNode);
baseNode = 0L;
kdDebug(24000) << "Node objects after delete = " << NN << " ; list count = " << nodes.count() << endl;
- QValueList<Node*> nList = nodes;
-/* for (QValueList<Node*>::ConstIterator it = nList.constBegin(); it != nList.constEnd(); ++it)
+ TQValueList<Node*> nList = nodes;
+/* for (TQValueList<Node*>::ConstIterator it = nList.constBegin(); it != nList.constEnd(); ++it)
Node::deleteNode(*it);
kdDebug(24000) << "Node objects after cleanup = " << NN << " ; list count = " << nodes.count() << endl;*/
}
@@ -159,7 +159,7 @@ bool QuantaView::mayRemove()
KURL url = m_document->url();
Project::ref()->saveBookmarks(url, dynamic_cast<KTextEditor::MarkInterface*>(m_document->doc()));
if (!unmodifiedUntitled)
- emit eventHappened("before_close", url.url(), QString::null);
+ emit eventHappened("before_close", url.url(), TQString::null);
m_currentViewsLayout = -1;
// m_document->closeTempFile();
if (!m_document->isUntitled() && url.isLocalFile())
@@ -172,7 +172,7 @@ bool QuantaView::mayRemove()
quantaApp->menuBar()->activateItemAt(-1);
quantaApp->guiFactory()->removeClient(m_document->view());
if (!unmodifiedUntitled)
- emit eventHappened("after_close", url.url(), QString::null);
+ emit eventHappened("after_close", url.url(), TQString::null);
}
/* kdDebug(24000) << "Calling reparse from close " << endl;
parser->setSAParserEnabled(true);
@@ -186,18 +186,18 @@ void QuantaView::addDocument(Document *document)
if (!document)
return;
m_document = document;
- connect(m_document, SIGNAL(editorGotFocus()), this, SLOT(slotSourceGetFocus()));
- connect(m_document->view(), SIGNAL(cursorPositionChanged()), this, SIGNAL(cursorPositionChanged()));
+ connect(m_document, TQT_SIGNAL(editorGotFocus()), this, TQT_SLOT(slotSourceGetFocus()));
+ connect(m_document->view(), TQT_SIGNAL(cursorPositionChanged()), this, TQT_SIGNAL(cursorPositionChanged()));
m_kafkaDocument = KafkaDocument::ref();
- connect(m_kafkaDocument->getKafkaWidget(), SIGNAL(hasFocus(bool)),
- this, SLOT(slotVPLGetFocus(bool)));
- connect(m_kafkaDocument, SIGNAL(newCursorPosition(int,int)),
- this, SLOT(slotSetCursorPositionInSource(int, int)));
- connect(m_kafkaDocument, SIGNAL(loadingError(Node *)),
- this, SLOT(slotVPLLoadingError(Node *)));
+ connect(m_kafkaDocument->getKafkaWidget(), TQT_SIGNAL(hasFocus(bool)),
+ this, TQT_SLOT(slotVPLGetFocus(bool)));
+ connect(m_kafkaDocument, TQT_SIGNAL(newCursorPosition(int,int)),
+ this, TQT_SLOT(slotSetCursorPositionInSource(int, int)));
+ connect(m_kafkaDocument, TQT_SIGNAL(loadingError(Node *)),
+ this, TQT_SLOT(slotVPLLoadingError(Node *)));
m_kafkaReloadingEnabled = true;
m_quantaReloadingEnabled = true;
@@ -215,29 +215,29 @@ void QuantaView::addDocument(Document *document)
void QuantaView::addPlugin(QuantaPlugin *plugin)
{
ToolbarTabWidget *m_toolbarTab = ToolbarTabWidget::ref();
- m_toolbarTab->reparent(0, 0, QPoint(), false);
+ m_toolbarTab->reparent(0, 0, TQPoint(), false);
m_plugin = plugin;
m_splitter->hide();
- QWidget *w = m_plugin->widget();
+ TQWidget *w = m_plugin->widget();
if (w)
{
- w->reparent(m_documentArea, 0, QPoint(), true);
+ w->reparent(m_documentArea, 0, TQPoint(), true);
w->resize(m_documentArea->size());
}
- m_documentArea->reparent(this, 0, QPoint(), true);
+ m_documentArea->reparent(this, 0, TQPoint(), true);
m_viewLayout->addWidget(m_documentArea, 1, 0);
activated();
updateTab();
}
-void QuantaView::addCustomWidget(QWidget *widget, const QString &label)
+void QuantaView::addCustomWidget(TQWidget *widget, const TQString &label)
{
if (widget)
{
- ToolbarTabWidget::ref()->reparent(0, 0, QPoint(), false);
+ ToolbarTabWidget::ref()->reparent(0, 0, TQPoint(), false);
m_customWidget = widget;
m_splitter->hide();
- widget->reparent(m_documentArea, 0, QPoint(), true);
+ widget->reparent(m_documentArea, 0, TQPoint(), true);
widget->resize(m_documentArea->size());
if (!label.isEmpty())
{
@@ -249,7 +249,7 @@ void QuantaView::addCustomWidget(QWidget *widget, const QString &label)
} else
if (m_customWidget)
{
- ToolbarTabWidget::ref()->reparent(this, 0, QPoint(), qConfig.enableDTDToolbar);
+ ToolbarTabWidget::ref()->reparent(this, 0, TQPoint(), qConfig.enableDTDToolbar);
m_viewLayout->addWidget(ToolbarTabWidget::ref(), 0 , 0);
m_customWidget = 0L; //avoid infinite recursion
reloadLayout();
@@ -287,10 +287,10 @@ void QuantaView::updateTab()
if (m_document)
{
// try to set the icon from mimetype
- QIconSet mimeIcon (KMimeType::pixmapForURL(m_document->url(), 0, KIcon::Small));
+ TQIconSet mimeIcon (KMimeType::pixmapForURL(m_document->url(), 0, KIcon::Small));
if (mimeIcon.isNull())
- mimeIcon = QIconSet(SmallIcon("document"));
- QString urlStr = QExtFileInfo::shortName(m_document->url().path());
+ mimeIcon = TQIconSet(SmallIcon("document"));
+ TQString urlStr = QExtFileInfo::shortName(m_document->url().path());
if (m_document->isModified())
{
if (qConfig.showCloseButtons == "ShowAlways")
@@ -330,7 +330,7 @@ void QuantaView::updateTab()
}
}
-QString QuantaView::tabName()
+TQString QuantaView::tabName()
{
if (m_document)
{
@@ -371,8 +371,8 @@ void QuantaView::slotSetSourceLayout()
//show the document if full size
m_splitter->hide();
- m_kafkaDocument->getKafkaWidget()->view()->reparent(0, 0, QPoint(), false);
- m_document->view()->reparent(m_documentArea, 0, QPoint(), true);
+ m_kafkaDocument->getKafkaWidget()->view()->reparent(0, 0, TQPoint(), false);
+ m_document->view()->reparent(m_documentArea, 0, TQPoint(), true);
m_document->view()->resize(m_documentArea->size());
m_viewLayout->addWidget(m_documentArea, 1, 0);
m_document->view()->setFocus();
@@ -412,9 +412,9 @@ void QuantaView::slotSetSourceAndVPLLayout()
{
reloadSourceView();
}
- m_kafkaDocument->getKafkaWidget()->view()->reparent(m_splitter, 0, QPoint(), true);
+ m_kafkaDocument->getKafkaWidget()->view()->reparent(m_splitter, 0, TQPoint(), true);
m_splitter->moveToFirst(m_kafkaDocument->getKafkaWidget()->view());
- m_document->view()->reparent(m_splitter, 0, QPoint(), true);
+ m_document->view()->reparent(m_splitter, 0, TQPoint(), true);
m_viewLayout->addWidget(m_splitter, 1, 0);
m_splitter->setSizes(m_splitterSizes);
m_splitter->show();
@@ -458,7 +458,7 @@ void QuantaView::slotSetVPLOnlyLayout()
if (!m_kafkaDocument->isLoaded())
m_kafkaDocument->loadDocument(m_document);
- m_kafkaDocument->getKafkaWidget()->view()->reparent(m_documentArea, 0, QPoint(), true);
+ m_kafkaDocument->getKafkaWidget()->view()->reparent(m_documentArea, 0, TQPoint(), true);
m_kafkaDocument->getKafkaWidget()->view()->resize(m_documentArea->size());
m_viewLayout->addWidget(m_documentArea, 1, 0);
m_kafkaDocument->getKafkaWidget()->view()->setFocus();
@@ -672,19 +672,19 @@ void QuantaView::slotSetCursorPositionInSource(int col, int line)
m_document->viewCursorIf->setCursorPositionReal(line, col);
}
-void QuantaView::dragEnterEvent(QDragEnterEvent *e)
+void QuantaView::dragEnterEvent(TQDragEnterEvent *e)
{
e->accept(KURLDrag::canDecode(e));
}
-void QuantaView::dropEvent(QDropEvent *e)
+void QuantaView::dropEvent(TQDropEvent *e)
{
emit dragInsert(e);
}
-void QuantaView::resizeEvent(QResizeEvent *e)
+void QuantaView::resizeEvent(TQResizeEvent *e)
{
- QWidget::resizeEvent(e);
+ TQWidget::resizeEvent(e);
resize(m_documentArea->width(), m_documentArea->height());
}
@@ -719,12 +719,12 @@ void QuantaView::insertTag(const char *tag)
{
if (!m_document )
return;
- QString tagStr = QuantaCommon::tagCase(tag);
+ TQString tagStr = QuantaCommon::tagCase(tag);
const DTDStruct *dtd = m_document->currentDTD(true);
bool single = QuantaCommon::isSingleTag(dtd->name, tagStr);
bool optional = QuantaCommon::isOptionalTag(dtd->name, tagStr);
- QString startTag = tagStr;
+ TQString startTag = tagStr;
startTag.prepend("<");
if ( dtd->singleTagStyle == "xml" &&
( single || (optional && !qConfig.closeOptionalTags))
@@ -737,7 +737,7 @@ void QuantaView::insertTag(const char *tag)
if ( (qConfig.closeTags && !single && !optional) ||
(qConfig.closeOptionalTags && optional) )
{
- m_document->insertTag( startTag, QString("</")+tagStr+">");
+ m_document->insertTag( startTag, TQString("</")+tagStr+">");
}
else
{
@@ -747,7 +747,7 @@ void QuantaView::insertTag(const char *tag)
//FIXME: Move out from here??
/** Insert a new tag by bringing up the TagDialog. */
-void QuantaView::insertNewTag(const QString &tag, const QString &attr, bool insertInLine)
+void QuantaView::insertNewTag(const TQString &tag, const TQString &attr, bool insertInLine)
{
if (m_document)
{
@@ -756,7 +756,7 @@ void QuantaView::insertNewTag(const QString &tag, const QString &attr, bool inse
insertOutputInTheNodeTree("", "", quantaApp->showTagDialogAndReturnNode(tag, attr));
else
{
- QString selection;
+ TQString selection;
if (m_document->selectionIf)
selection = m_document->selectionIf->selection();
TagDialog *dlg = new TagDialog(QuantaCommon::tagFromDTD(m_document->getDTDIdentifier(), tag), selection, attr, baseURL());
@@ -770,7 +770,7 @@ void QuantaView::insertNewTag(const QString &tag, const QString &attr, bool inse
}
}
-void QuantaView::insertOutputInTheNodeTree(const QString &str1, const QString &str2, Node *node)
+void QuantaView::insertOutputInTheNodeTree(const TQString &str1, const TQString &str2, Node *node)
{
if (!m_document)
return;
@@ -785,14 +785,14 @@ void QuantaView::insertOutputInTheNodeTree(const QString &str1, const QString &s
KafkaWidget *kafkaPart = m_kafkaDocument->getKafkaWidget();
NodeModifsSet *modifs;
DOM::Node domNode, domStartContainer, domEndContainer;
- QString tagName;
+ TQString tagName;
QTag *nodeQTag, *qTag, *nodeParentQTag;
Node *nodeCursor, *startContainer, *endContainer, *nodeParent, *dummy;
- QPtrList<QTag> qTagList;
+ TQPtrList<QTag> qTagList;
int startCol, startLine, endCol, endLine;
bool specialTagInsertion = false;
long nodeOffset, startOffset, endOffset, domNodeOffset;
- QValueList<int> loc;
+ TQValueList<int> loc;
uint line, col;
bool smartTagInsertion, hasSelection, nodeTreeModified;
@@ -1018,7 +1018,7 @@ void QuantaView::activated()
refreshWindow();
return;
}
- ToolbarTabWidget::ref()->reparent(this, 0, QPoint(), qConfig.enableDTDToolbar);
+ ToolbarTabWidget::ref()->reparent(this, 0, TQPoint(), qConfig.enableDTDToolbar);
m_viewLayout->addWidget(ToolbarTabWidget::ref(), 0 , 0);
quantaApp->partManager()->setActivePart(m_document->doc(), m_document->view());
m_document->checkDirtyStatus();
@@ -1055,7 +1055,7 @@ bool QuantaView::saveModified(bool ask)
return true;
bool completed=true;
- QString fileName = m_document->url().fileName();
+ TQString fileName = m_document->url().fileName();
if (m_document->isModified() )
{
@@ -1108,7 +1108,7 @@ bool QuantaView::saveDocument(const KURL& url)
if (url.isEmpty())
return false;
- emit eventHappened("before_save", url.url(), QString::null);
+ emit eventHappened("before_save", url.url(), TQString::null);
m_saveResult = true;
KURL oldURL = m_document->url();
if (!m_document->isUntitled() && oldURL.isLocalFile())
@@ -1134,8 +1134,8 @@ bool QuantaView::saveDocument(const KURL& url)
{
KTextEditor::Document *doc = m_document->doc();
m_eventLoopStarted = false;
- connect(doc, SIGNAL(canceled(const QString &)), this, SLOT(slotSavingFailed(const QString &)));
- connect(doc, SIGNAL(completed()), this, SLOT(slotSavingCompleted()));
+ connect(doc, TQT_SIGNAL(canceled(const TQString &)), this, TQT_SLOT(slotSavingFailed(const TQString &)));
+ connect(doc, TQT_SIGNAL(completed()), this, TQT_SLOT(slotSavingCompleted()));
m_saveResult = m_document->saveAs(url);
if (m_saveResult)
{
@@ -1144,8 +1144,8 @@ bool QuantaView::saveDocument(const KURL& url)
m_eventLoopStarted = true;
internalFileInfo.enter_loop();
}
- disconnect(doc, SIGNAL(canceled(const QString &)), this, SLOT(slotSavingFailed(const QString &)));
- disconnect(doc, SIGNAL(completed()), this, SLOT(slotSavingCompleted()));
+ disconnect(doc, TQT_SIGNAL(canceled(const TQString &)), this, TQT_SLOT(slotSavingFailed(const TQString &)));
+ disconnect(doc, TQT_SIGNAL(completed()), this, TQT_SLOT(slotSavingCompleted()));
if (!m_saveResult) //there was an error while saving
{
if (oldURL.isLocalFile())
@@ -1161,11 +1161,11 @@ bool QuantaView::saveDocument(const KURL& url)
{
setCaption(m_document->url().fileName());
}
- emit eventHappened("after_save", m_document->url().url(), QString::null);
+ emit eventHappened("after_save", m_document->url().url(), TQString::null);
return true;
}
-void QuantaView::slotSavingFailed(const QString &error)
+void QuantaView::slotSavingFailed(const TQString &error)
{
Q_UNUSED(error);
m_saveResult = false;
diff --git a/quanta/src/quantaview.h b/quanta/src/quantaview.h
index 24ecd776..f8033133 100644
--- a/quanta/src/quantaview.h
+++ b/quanta/src/quantaview.h
@@ -19,11 +19,11 @@
#define QUANTAVIEW_H
// include files for Qt
-#include <qguardedptr.h>
-#include <qwidget.h>
-#include <qptrlist.h>
-#include <qvaluelist.h>
-#include <qtimer.h>
+#include <tqguardedptr.h>
+#include <tqwidget.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
+#include <tqtimer.h>
//kde includes
#include <kmdichildview.h>
@@ -53,7 +53,7 @@ class QSplitter;
class Node;
/** The QuantaView class provides the view widget for the QuantaApp
- * instance. The View instance inherits QWidget as a base class and
+ * instance. The View instance inherits TQWidget as a base class and
* represents the view object of a KTMainWindow. As QuantaView is part
* of the docuement-view model, it needs a reference to the document
* object connected with it by the QuantaApp class to manipulate and
@@ -67,7 +67,7 @@ class QuantaView : public KMdiChildView
public:
- QuantaView(QWidget *parent = 0, const char *name=0, const QString &caption = QString::null);
+ QuantaView(TQWidget *parent = 0, const char *name=0, const TQString &caption = TQString::null);
~QuantaView();
/** returns true if the view can be removed, false otherwise */
@@ -77,7 +77,7 @@ public:
void addDocument(Document *document);
/** Adds a custom widget to the view. */
- void addCustomWidget(QWidget *widget, const QString &label);
+ void addCustomWidget(TQWidget *widget, const TQString &label);
/** returns the Document object associated with this view. Returns 0L if the view holds
a non-Document object */
@@ -86,7 +86,7 @@ public:
/**Adds a QuantaPlugin object to the view.*/
void addPlugin(QuantaPlugin *plugin);
- QWidget* documentArea() {return m_documentArea;}
+ TQWidget* documentArea() {return m_documentArea;}
bool saveDocument(const KURL&);
/** Saves the document if it's modified. Ask the user if their
@@ -114,7 +114,7 @@ public:
/** Called when this view lost the active status */
void deactivated();
- void resizeEvent(QResizeEvent* e);
+ void resizeEvent(TQResizeEvent* e);
/** Resize the current view */
void resize(int width, int height);
/** Redraws the view, resizes the components to their correct size */
@@ -124,17 +124,17 @@ public:
void updateTab();
/** Returns the tab name associated with this view */
- QString tabName();
+ TQString tabName();
void insertTag( const char *tag);
/** Insert a new tag by bringing up the TagDialog. */
- void insertNewTag(const QString &tag, const QString &attr = QString::null, bool insertInLine = true);
+ void insertNewTag(const TQString &tag, const TQString &attr = TQString::null, bool insertInLine = true);
/**
* This function take the output of the TagAction, parse it into Nodes and insert it
* in the Node tree. Then kafka will take care of updating itself from the Node Tree.
*/
- void insertOutputInTheNodeTree(const QString &str1, const QString &str2 = QString::null, Node *node = 0L);
+ void insertOutputInTheNodeTree(const TQString &str1, const TQString &str2 = TQString::null, Node *node = 0L);
enum ViewFocus {
SourceFocus = 0,
@@ -180,7 +180,7 @@ public slots:
private slots:
void slotSavingCompleted();
- void slotSavingFailed(const QString& error);
+ void slotSavingFailed(const TQString& error);
/**
* Called to update VPL.
@@ -194,40 +194,40 @@ private slots:
signals:
/** emitted when a file from the template view is dropped on the view */
- void dragInsert(QDropEvent *);
+ void dragInsert(TQDropEvent *);
/** asks for hiding the preview widget */
void hidePreview();
void showProblemsView();
void cursorPositionChanged();
- void title(const QString &);
+ void title(const TQString &);
/** emitted if this view contained an editor and it is closed */
void documentClosed(const KURL&);
- void eventHappened(const QString&, const QString&, const QString& );
+ void eventHappened(const TQString&, const TQString&, const TQString& );
private:
/** Kafka stuff */
- QValueList<int> m_splitterSizes;
+ TQValueList<int> m_splitterSizes;
int m_curCol, m_curLine, m_curOffset;
DOM::Node curNode;
bool m_kafkaReloadingEnabled, m_quantaReloadingEnabled;
- QTimer m_sourceUpdateTimer, m_VPLUpdateTimer;
+ TQTimer m_sourceUpdateTimer, m_VPLUpdateTimer;
- QWidget *m_documentArea;///< the area of the view which can be used to show the source/VPL
+ TQWidget *m_documentArea;///< the area of the view which can be used to show the source/VPL
Document *m_document;
QuantaPlugin *m_plugin;
- QWidget *m_customWidget; ///<view holds a custom widget, eg. a documentation
- QGuardedPtr<KafkaDocument> m_kafkaDocument;
- QSplitter *m_splitter;
- QGridLayout *m_viewLayout;
+ TQWidget *m_customWidget; ///<view holds a custom widget, eg. a documentation
+ TQGuardedPtr<KafkaDocument> m_kafkaDocument;
+ TQSplitter *m_splitter;
+ TQGridLayout *m_viewLayout;
int m_currentViewsLayout; ///< holds the current layout, which can be SourceOnly, VPLOnly or SourceAndVPL
int m_currentFocus;
bool m_saveResult;
bool m_eventLoopStarted;
protected:
- virtual void dropEvent(QDropEvent *e);
- virtual void dragEnterEvent(QDragEnterEvent *e);
+ virtual void dropEvent(TQDropEvent *e);
+ virtual void dragEnterEvent(TQDragEnterEvent *e);
};
#endif // QUANTAVIEW_H
diff --git a/quanta/src/viewmanager.cpp b/quanta/src/viewmanager.cpp
index f02108e9..5d9ea103 100644
--- a/quanta/src/viewmanager.cpp
+++ b/quanta/src/viewmanager.cpp
@@ -13,7 +13,7 @@
***************************************************************************/
//qt includes
-#include <qdir.h>
+#include <tqdir.h>
//kde includes
#include <kdirwatch.h>
@@ -61,26 +61,26 @@
#define UPLOAD_ID 12
#define DELETE_ID 13
-ViewManager::ViewManager(QObject *parent, const char *name) : QObject(parent, name)
+ViewManager::ViewManager(TQObject *parent, const char *name) : TQObject(parent, name)
{
m_lastActiveView = 0L;
m_lastActiveEditorView = 0L;
m_documentationView = 0L;
m_tabPopup = new KPopupMenu(quantaApp);
- m_tabPopup->insertItem(SmallIcon("fileclose"), i18n("&Close"), this, SLOT(slotCloseView()));
- m_tabPopup->insertItem(i18n("Close &Other Tabs"), this, SLOT(slotCloseOtherTabs()));
- m_tabPopup->insertItem(i18n("Close &All"), this, SLOT(closeAll()));
- m_tabPopup->insertItem(SmallIcon("revert"), i18n("&Reload"), this, SLOT(slotReloadFile()), 0, RELOAD_ID);
- m_tabPopup->insertItem(SmallIcon("up"), i18n("&Upload File"), this, SLOT(slotUploadFile()), 0, UPLOAD_ID);
- m_tabPopup->insertItem(SmallIcon("editdelete"), i18n("&Delete File"), this, SLOT(slotDeleteFile()), 0, DELETE_ID);
+ m_tabPopup->insertItem(SmallIcon("fileclose"), i18n("&Close"), this, TQT_SLOT(slotCloseView()));
+ m_tabPopup->insertItem(i18n("Close &Other Tabs"), this, TQT_SLOT(slotCloseOtherTabs()));
+ m_tabPopup->insertItem(i18n("Close &All"), this, TQT_SLOT(closeAll()));
+ m_tabPopup->insertItem(SmallIcon("revert"), i18n("&Reload"), this, TQT_SLOT(slotReloadFile()), 0, RELOAD_ID);
+ m_tabPopup->insertItem(SmallIcon("up"), i18n("&Upload File"), this, TQT_SLOT(slotUploadFile()), 0, UPLOAD_ID);
+ m_tabPopup->insertItem(SmallIcon("editdelete"), i18n("&Delete File"), this, TQT_SLOT(slotDeleteFile()), 0, DELETE_ID);
m_tabPopup->insertSeparator();
m_fileListPopup = new KPopupMenu(quantaApp);
- connect(m_fileListPopup, SIGNAL(aboutToShow()), this, SLOT(slotFileListPopupAboutToShow()));
- connect(m_fileListPopup, SIGNAL(activated(int)), this, SLOT(slotFileListPopupItemActivated(int)));
+ connect(m_fileListPopup, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotFileListPopupAboutToShow()));
+ connect(m_fileListPopup, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotFileListPopupItemActivated(int)));
m_bookmarks = new QuantaBookmarks(this, QuantaBookmarks::Position, true);
m_bookmarksMenu = new KPopupMenu(quantaApp);
m_bookmarks->setBookmarksMenu(m_bookmarksMenu);
- connect(m_bookmarks, SIGNAL(gotoFileAndLine(const QString&, int, int)), quantaApp, SLOT(gotoFileAndLine(const QString&, int, int)));
+ connect(m_bookmarks, TQT_SIGNAL(gotoFileAndLine(const TQString&, int, int)), quantaApp, TQT_SLOT(gotoFileAndLine(const TQString&, int, int)));
m_bookmarksMenuId = m_tabPopup->insertItem(SmallIconSet("bookmark"), i18n("&Bookmarks"), m_bookmarksMenu);
m_tabPopup->insertItem(i18n("&Switch To"), m_fileListPopup);
m_contextView = 0L;
@@ -88,18 +88,18 @@ ViewManager::ViewManager(QObject *parent, const char *name) : QObject(parent, na
m_separatorVisible = false;
}
-QuantaView* ViewManager::createView(const QString &caption)
+QuantaView* ViewManager::createView(const TQString &caption)
{
QuantaView *view = new QuantaView(quantaApp, "", caption);
quantaApp->addWindow(view);
- connect(view, SIGNAL(cursorPositionChanged()), quantaApp, SLOT(slotNewLineColumn()));
- connect(view, SIGNAL(title(const QString &)), quantaApp, SLOT(slotNewLineColumn()));
- connect(view, SIGNAL(dragInsert(QDropEvent*)), this, SIGNAL(dragInsert(QDropEvent *)));
- connect(view, SIGNAL(hidePreview()), quantaApp, SLOT(slotChangePreviewStatus()));
- disconnect(view, SIGNAL(childWindowCloseRequest( KMdiChildView *)), 0, 0 );
- connect(view, SIGNAL(childWindowCloseRequest( KMdiChildView*)), this, SLOT(slotCloseRequest(KMdiChildView*)));
- connect(view, SIGNAL(documentClosed(const KURL&)), this, SLOT(slotDocumentClosed(const KURL&)));
- connect(view, SIGNAL(eventHappened(const QString&, const QString&, const QString& )), QPEvents::ref(), SLOT(slotEventHappened(const QString&, const QString&, const QString& )));
+ connect(view, TQT_SIGNAL(cursorPositionChanged()), quantaApp, TQT_SLOT(slotNewLineColumn()));
+ connect(view, TQT_SIGNAL(title(const TQString &)), quantaApp, TQT_SLOT(slotNewLineColumn()));
+ connect(view, TQT_SIGNAL(dragInsert(TQDropEvent*)), this, TQT_SIGNAL(dragInsert(TQDropEvent *)));
+ connect(view, TQT_SIGNAL(hidePreview()), quantaApp, TQT_SLOT(slotChangePreviewStatus()));
+ disconnect(view, TQT_SIGNAL(childWindowCloseRequest( KMdiChildView *)), 0, 0 );
+ connect(view, TQT_SIGNAL(childWindowCloseRequest( KMdiChildView*)), this, TQT_SLOT(slotCloseRequest(KMdiChildView*)));
+ connect(view, TQT_SIGNAL(documentClosed(const KURL&)), this, TQT_SLOT(slotDocumentClosed(const KURL&)));
+ connect(view, TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), QPEvents::ref(), TQT_SLOT(slotEventHappened(const TQString&, const TQString&, const TQString& )));
return view;
}
@@ -108,7 +108,7 @@ void ViewManager::createNewDocument()
{
int i = 1;
while (isOpened(KURL("file:"+i18n("Untitled%1").arg(i)))) i++;
- QString fname = i18n("Untitled%1").arg(i);
+ TQString fname = i18n("Untitled%1").arg(i);
QuantaView *view = createView(fname);
#ifdef ENABLE_EDITORS
@@ -121,8 +121,8 @@ void ViewManager::createNewDocument()
KTextEditor::Document *doc = KTextEditor::createDocument ("libkatepart", view, "KTextEditor::Document");
#endif
Document *w = new Document(doc, 0L);
- connect(w, SIGNAL(showAnnotation(uint, const QString&, const QPair<QString, QString>&)), quantaApp->annotationOutput(), SLOT(insertAnnotation(uint, const QString&, const QPair<QString, QString>&)));
- QString encoding = quantaApp->defaultEncoding();
+ connect(w, TQT_SIGNAL(showAnnotation(uint, const TQString&, const QPair<TQString, TQString>&)), quantaApp->annotationOutput(), TQT_SLOT(insertAnnotation(uint, const TQString&, const QPair<TQString, TQString>&)));
+ TQString encoding = quantaApp->defaultEncoding();
KTextEditor::EncodingInterface* encodingIf = dynamic_cast<KTextEditor::EncodingInterface*>(doc);
if (encodingIf)
encodingIf->setEncoding(encoding);
@@ -130,16 +130,16 @@ void ViewManager::createNewDocument()
KTextEditor::View * v = w->view();
//[MB02] connect all kate views for drag and drop
- connect(w->view(), SIGNAL(dropEventPass(QDropEvent *)), this, SIGNAL(dragInsert(QDropEvent *)));
+ connect(w->view(), TQT_SIGNAL(dropEventPass(TQDropEvent *)), this, TQT_SIGNAL(dragInsert(TQDropEvent *)));
w->setUntitledUrl( fname );
KTextEditor::PopupMenuInterface* popupIf = dynamic_cast<KTextEditor::PopupMenuInterface*>(w->view());
if (popupIf)
- popupIf->installPopup((QPopupMenu *)quantaApp->factory()->container("popup_editor", quantaApp));
+ popupIf->installPopup((TQPopupMenu *)quantaApp->factory()->container("popup_editor", quantaApp));
quantaApp->setFocusProxy(w->view());
- w->view()->setFocusPolicy(QWidget::WheelFocus);
- connect( v, SIGNAL(newStatus()), quantaApp, SLOT(slotNewStatus()));
+ w->view()->setFocusPolicy(TQWidget::WheelFocus);
+ connect( v, TQT_SIGNAL(newStatus()), quantaApp, TQT_SLOT(slotNewStatus()));
quantaApp->slotNewPart(doc, true); // register new part in partmanager and make active
view->addDocument(w);
@@ -154,7 +154,7 @@ bool ViewManager::removeView(QuantaView *view, bool force, bool createNew)
{
if (!view) return false;
int noOfViews = 0;
- QValueList<Document*> list;
+ TQValueList<Document*> list;
KMdiIterator<KMdiChildView*> *it = quantaApp->createIterator();
for (it->first(); !it->isDone(); it->next())
{
@@ -180,9 +180,9 @@ bool ViewManager::removeView(QuantaView *view, bool force, bool createNew)
if (view == m_lastActiveEditorView)
m_lastActiveEditorView = 0L;
if (view == activeView())
- ToolbarTabWidget::ref()->reparent(0L, 0, QPoint(), false);
+ ToolbarTabWidget::ref()->reparent(0L, 0, TQPoint(), false);
if (!createNew)
- disconnect(quantaApp, SIGNAL(lastChildViewClosed()), this, SLOT(slotLastViewClosed()));
+ disconnect(quantaApp, TQT_SIGNAL(lastChildViewClosed()), this, TQT_SLOT(slotLastViewClosed()));
quantaApp->closeWindow(view);
if (createNew)
{
@@ -191,7 +191,7 @@ bool ViewManager::removeView(QuantaView *view, bool force, bool createNew)
quantaApp->slotFileNew();
}
} else
- connect(quantaApp, SIGNAL(lastChildViewClosed()), this, SLOT(slotLastViewClosed()));
+ connect(quantaApp, TQT_SIGNAL(lastChildViewClosed()), this, TQT_SLOT(slotLastViewClosed()));
return true;
}
}
@@ -255,17 +255,17 @@ void ViewManager::slotCloseOtherTabs()
else
currentView = quantaApp->activeWindow();
if (dynamic_cast<QuantaView*>(currentView) && !static_cast<QuantaView*>(currentView)->document())
- ToolbarTabWidget::ref()->reparent(0, 0, QPoint(), false);
+ ToolbarTabWidget::ref()->reparent(0, 0, TQPoint(), false);
KMdiIterator<KMdiChildView*> *it = quantaApp->createIterator();
//save the children first to a list, as removing invalidates our iterator
- QValueList<KMdiChildView *> children;
+ TQValueList<KMdiChildView *> children;
for (it->first(); !it->isDone(); it->next())
{
children.append(it->currentItem());
}
delete it;
KURL::List modifiedList;
- QValueListIterator<KMdiChildView *> childIt;
+ TQValueListIterator<KMdiChildView *> childIt;
for (childIt = children.begin(); childIt != children.end(); ++childIt)
{
view = *childIt;
@@ -283,7 +283,7 @@ void ViewManager::slotCloseOtherTabs()
{
KURL::List filesToSave;
KSaveSelectDialog dlg(modifiedList, filesToSave /*empty ignore list */, quantaApp);
- if (dlg.exec() == QDialog::Accepted)
+ if (dlg.exec() == TQDialog::Accepted)
{
filesToSave = dlg.filesToSave();
for (childIt = children.begin(); childIt != children.end(); ++childIt)
@@ -328,7 +328,7 @@ QuantaView* ViewManager::isOpened(const KURL& url)
KURL url2 = url;
if (url2.isLocalFile() && !url.path().startsWith(i18n("Untitled")))
{
- QDir dir(url2.path());
+ TQDir dir(url2.path());
url2.setPath(dir.canonicalPath());
}
KMdiIterator<KMdiChildView*> *it = quantaApp->createIterator();
@@ -366,9 +366,9 @@ KURL::List ViewManager::openedFiles(bool noUntitled)
return list;
}
-QValueList<Document*> ViewManager::openedDocuments()
+TQValueList<Document*> ViewManager::openedDocuments()
{
- QValueList<Document*> list;
+ TQValueList<Document*> list;
KMdiIterator<KMdiChildView*> *it = quantaApp->createIterator();
QuantaView *view;
for (it->first(); !it->isDone(); it->next())
@@ -400,13 +400,13 @@ bool ViewManager::saveAll()
{
if (!w->isUntitled())
{
- emit eventHappened("before_save", w->url().url(), QString::null);
+ emit eventHappened("before_save", w->url().url(), TQString::null);
w->docUndoRedo->fileSaved();
w->save();
w->removeBackup(quantaApp->config());
if (w->isModified())
flagsave = false;
- emit eventHappened("after_save", w->url().url(), QString::null);
+ emit eventHappened("after_save", w->url().url(), TQString::null);
} else
{
if (!view->saveModified())
@@ -428,14 +428,14 @@ bool ViewManager::closeAll(bool createNew)
KMdiIterator<KMdiChildView*> *it = quantaApp->createIterator();
QuantaView *view;
//save the children first to a list, as removing invalidates our iterator
- QValueList<KMdiChildView *> children;
+ TQValueList<KMdiChildView *> children;
for (it->first(); !it->isDone(); it->next())
{
children.append(it->currentItem());
}
delete it;
KURL::List modifiedList;
- QValueListIterator<KMdiChildView *> childIt;
+ TQValueListIterator<KMdiChildView *> childIt;
for (childIt = children.begin(); childIt != children.end(); ++childIt)
{
view = dynamic_cast<QuantaView*>(*childIt);
@@ -452,7 +452,7 @@ bool ViewManager::closeAll(bool createNew)
{
KURL::List filesToSave;
KSaveSelectDialog dlg(modifiedList, filesToSave /*empty ignore list */, quantaApp);
- if (dlg.exec() == QDialog::Accepted)
+ if (dlg.exec() == TQDialog::Accepted)
{
filesToSave = dlg.filesToSave();
for (childIt = children.begin(); childIt != children.end(); ++childIt)
@@ -480,9 +480,9 @@ bool ViewManager::closeAll(bool createNew)
return false; //save aborted
}
}
- disconnect(quantaApp, SIGNAL(viewActivated (KMdiChildView *)), this, SLOT(slotViewActivated(KMdiChildView*)));
- disconnect(quantaApp, SIGNAL(lastChildViewClosed()), this, SLOT(slotLastViewClosed()));
- ToolbarTabWidget::ref()->reparent(0L, 0, QPoint(), false);
+ disconnect(quantaApp, TQT_SIGNAL(viewActivated (KMdiChildView *)), this, TQT_SLOT(slotViewActivated(KMdiChildView*)));
+ disconnect(quantaApp, TQT_SIGNAL(lastChildViewClosed()), this, TQT_SLOT(slotLastViewClosed()));
+ ToolbarTabWidget::ref()->reparent(0L, 0, TQPoint(), false);
for (childIt = children.begin(); childIt != children.end(); ++childIt)
{
@@ -508,8 +508,8 @@ bool ViewManager::closeAll(bool createNew)
} else
{
//actually this code should be never executed
- connect(quantaApp, SIGNAL(viewActivated (KMdiChildView *)), this, SLOT(slotViewActivated(KMdiChildView*)));
- connect(quantaApp, SIGNAL(lastChildViewClosed()), this, SLOT(slotLastViewClosed()));
+ connect(quantaApp, TQT_SIGNAL(viewActivated (KMdiChildView *)), this, TQT_SLOT(slotViewActivated(KMdiChildView*)));
+ connect(quantaApp, TQT_SIGNAL(lastChildViewClosed()), this, TQT_SLOT(slotLastViewClosed()));
view->activated();
emit filesClosed(false);
return false;
@@ -523,8 +523,8 @@ bool ViewManager::closeAll(bool createNew)
}
}
}
- connect(quantaApp, SIGNAL(viewActivated (KMdiChildView *)), this, SLOT(slotViewActivated(KMdiChildView*)));
- connect(quantaApp, SIGNAL(lastChildViewClosed()), this, SLOT(slotLastViewClosed()));
+ connect(quantaApp, TQT_SIGNAL(viewActivated (KMdiChildView *)), this, TQT_SLOT(slotViewActivated(KMdiChildView*)));
+ connect(quantaApp, TQT_SIGNAL(lastChildViewClosed()), this, TQT_SLOT(slotLastViewClosed()));
if (createNew)
{
createNewDocument();
@@ -561,7 +561,7 @@ QuantaView* ViewManager::documentationView(bool create)
if (!m_documentationView && create)
{
m_documentationView = createView();
- m_documentationView->addCustomWidget((QWidget*)quantaApp->documentationPart()->view(), i18n("Documentation"));
+ m_documentationView->addCustomWidget((TQWidget*)quantaApp->documentationPart()->view(), i18n("Documentation"));
}
return m_documentationView;
}
@@ -588,7 +588,7 @@ bool ViewManager::allEditorsClosed()
return true;
}
-void ViewManager::slotTabContextMenu(QWidget *widget, const QPoint& point)
+void ViewManager::slotTabContextMenu(TQWidget *widget, const TQPoint& point)
{
if (m_separatorVisible)
m_tabPopup->removeItemAt(SEPARATOR_INDEX);
@@ -627,8 +627,8 @@ void ViewManager::slotTabContextMenu(QWidget *widget, const QPoint& point)
if (w && w->markIf)
{
m_bookmarks->setDocument(w);
- QPtrList<KTextEditor::Mark> m = w->markIf->marks();
- QPtrListIterator<KTextEditor::Mark> it(m);
+ TQPtrList<KTextEditor::Mark> m = w->markIf->marks();
+ TQPtrListIterator<KTextEditor::Mark> it(m);
for(; *it; ++it)
{
if ((*it)->type & KTextEditor::MarkInterface::markType01)
@@ -667,7 +667,7 @@ void ViewManager::slotTabContextMenu(QWidget *widget, const QPoint& point)
void ViewManager::slotFileListPopupAboutToShow()
{
m_fileListPopup->clear();
- QStringList viewList;
+ TQStringList viewList;
KMdiIterator<KMdiChildView*> *it = quantaApp->createIterator();
QuantaView *view;
int id = 0;
@@ -736,7 +736,7 @@ void ViewManager::slotDocumentClosed(const KURL& url)
}
/** Return the URL of the currently active document */
-QString ViewManager::currentURL()
+TQString ViewManager::currentURL()
{
Document *w = activeDocument();
if (w)
diff --git a/quanta/src/viewmanager.h b/quanta/src/viewmanager.h
index e7a4fb31..05278901 100644
--- a/quanta/src/viewmanager.h
+++ b/quanta/src/viewmanager.h
@@ -34,7 +34,7 @@ class ViewManager : public QObject
Q_OBJECT
public:
/** Returns a reference to the viewmanager object */
- static ViewManager* const ref(QObject *parent = 0L, const char *name = 0L)
+ static ViewManager* const ref(TQObject *parent = 0L, const char *name = 0L)
{
static ViewManager *m_ref;
if (!m_ref) m_ref = new ViewManager(parent, name);
@@ -44,7 +44,7 @@ public:
virtual ~ViewManager(){};
/** Creates a QuantaView object */
- QuantaView *createView(const QString &caption = QString::null);
+ QuantaView *createView(const TQString &caption = TQString::null);
/** Removes a QuantaView object. Returns false on failure (eg. the view was not saved and it refused
the delete itself.) If force is true, the view is removed without asking for save.
*/
@@ -65,7 +65,7 @@ public:
/** Returns a list with the URLs of the opened documents */
KURL::List openedFiles(bool noUntitled=true);
/** Returns a list with the Document* object of the opened documents */
- QValueList<Document*> openedDocuments();
+ TQValueList<Document*> openedDocuments();
/** Returns the view holding the documentation widget. If create is true and there is no such view yet,
it creates one. */
@@ -75,7 +75,7 @@ public:
QuantaView *lastActiveEditorView() {return m_lastActiveEditorView;}
/** Return the URL of the currently active document */
- QString currentURL();
+ TQString currentURL();
public slots:
/**called when a new view was activated */
@@ -91,7 +91,7 @@ public slots:
void slotLastViewClosed();
/** called when the context menu was invoked on a tab */
- void slotTabContextMenu(QWidget *widget, const QPoint & point);
+ void slotTabContextMenu(TQWidget *widget, const TQPoint & point);
/** called when the user requests to close a tab with the close button */
void slotCloseRequest(KMdiChildView *widget);
/** called from the views and just emits the signal @ref documentClosed */
@@ -99,12 +99,12 @@ public slots:
signals:
/** emitted when a file from the template view is dropped on a view */
- void dragInsert(QDropEvent *);
+ void dragInsert(TQDropEvent *);
/** emitted when a view was activated */
void viewActivated(const KURL &);
/** emitted when a view was closed */
void documentClosed(const KURL&);
- void eventHappened(const QString&, const QString&, const QString& );
+ void eventHappened(const TQString&, const TQString&, const TQString& );
/** emitted when all files were closed. The argument is true if the closes
was successful, false if the unser canceled the closing */
void filesClosed(bool);
@@ -123,7 +123,7 @@ private slots:
private:
/** Private constructor for the singleton object. */
- ViewManager(QObject * parent = 0, const char * name = 0);
+ ViewManager(TQObject * parent = 0, const char * name = 0);
/** Returns true if there isn't any opened view holding an editor */
bool allEditorsClosed();