summaryrefslogtreecommitdiffstats
path: root/quanta/src/quanta.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'quanta/src/quanta.cpp')
-rw-r--r--quanta/src/quanta.cpp960
1 files changed, 480 insertions, 480 deletions
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();
}