diff options
Diffstat (limited to 'quanta/src/quanta_init.cpp')
-rw-r--r-- | quanta/src/quanta_init.cpp | 830 |
1 files changed, 415 insertions, 415 deletions
diff --git a/quanta/src/quanta_init.cpp b/quanta/src/quanta_init.cpp index 91f9f043..3a752299 100644 --- a/quanta/src/quanta_init.cpp +++ b/quanta/src/quanta_init.cpp @@ -17,21 +17,21 @@ ***************************************************************************/ // include files for QT -#include <qdir.h> -#include <qprinter.h> -#include <qpainter.h> -#include <qtabwidget.h> -#include <qwidgetstack.h> -#include <qlayout.h> -#include <qeventloop.h> -#include <qtimer.h> -#include <qdom.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qtextcodec.h> -#include <qpopupmenu.h> -#include <qdatetime.h> -#include <qradiobutton.h> +#include <tqdir.h> +#include <tqprinter.h> +#include <tqpainter.h> +#include <tqtabwidget.h> +#include <tqwidgetstack.h> +#include <tqlayout.h> +#include <tqeventloop.h> +#include <tqtimer.h> +#include <tqdom.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqtextcodec.h> +#include <tqpopupmenu.h> +#include <tqdatetime.h> +#include <tqradiobutton.h> // include files for KDE #include <dcopclient.h> @@ -113,13 +113,13 @@ #include "tagactionmanager.h" #include "tagactionset.h" -extern QMap<int, QString> replacementMap; +extern TQMap<int, TQString> replacementMap; QuantaInit::QuantaInit(QuantaApp * quantaApp) - : QObject() + : TQObject() { m_quanta = quantaApp; - connect(this, SIGNAL(hideSplash()), m_quanta, SLOT(slotHideSplash())); + connect(this, TQT_SIGNAL(hideSplash()), m_quanta, TQT_SLOT(slotHideSplash())); } QuantaInit::~QuantaInit() @@ -133,8 +133,8 @@ void QuantaInit::initQuanta() m_config = quantaApp->m_config; parser = new Parser(); - QStringList tmpDirs = KGlobal::dirs()->resourceDirs("tmp"); - QDir dir; + TQStringList tmpDirs = KGlobal::dirs()->resourceDirs("tmp"); + TQDir dir; tmpDir = tmpDirs[0]; for (uint i = 0; i < tmpDirs.count(); i++) { @@ -171,13 +171,13 @@ void QuantaInit::initQuanta() // Initialize debugger m_quanta->m_debugger = new DebuggerManager(m_quanta); - connect(Project::ref(), SIGNAL(newProjectLoaded(const QString &, const KURL &, const KURL &)), - m_quanta->m_debugger, SLOT(slotNewProjectLoaded(const QString &, const KURL &, const KURL &))); - connect(Project::ref(), SIGNAL(eventHappened(const QString &, const QString &, const QString &)), - m_quanta->m_debugger, SLOT(slotHandleEvent(const QString &, const QString &, const QString &))); - connect(m_quanta->m_debugger, SIGNAL(hideSplash()), m_quanta, SLOT(slotHideSplash())); + connect(Project::ref(), TQT_SIGNAL(newProjectLoaded(const TQString &, const KURL &, const KURL &)), + m_quanta->m_debugger, TQT_SLOT(slotNewProjectLoaded(const TQString &, const KURL &, const KURL &))); + connect(Project::ref(), TQT_SIGNAL(eventHappened(const TQString &, const TQString &, const TQString &)), + m_quanta->m_debugger, TQT_SLOT(slotHandleEvent(const TQString &, const TQString &, const TQString &))); + connect(m_quanta->m_debugger, TQT_SIGNAL(hideSplash()), m_quanta, TQT_SLOT(slotHideSplash())); - //m_quanta->KDockMainWindow::createGUI( QString::null, false /* conserveMemory */ ); + //m_quanta->KDockMainWindow::createGUI( TQString::null, false /* conserveMemory */ ); m_quanta->createShellGUI(true); addToolTreeView(m_quanta->fTab, i18n("Files"), UserIcon("ftab"), KDockWidget::DockLeft); @@ -193,7 +193,7 @@ void QuantaInit::initQuanta() // Restore the dock layout m_config->setGroup ("General Options"); - QString layout = m_config->readEntry("Window layout", "Default"); + TQString layout = m_config->readEntry("Window layout", "Default"); int mdiMode = m_config->readNumEntry("MDI mode", -1); if (mdiMode != -1 && layout != "Default") { @@ -209,24 +209,24 @@ void QuantaInit::initQuanta() if (mdiMode == KMdi::ToplevelMode) { m_quanta->switchToChildframeMode(); - QTimer::singleShot(0, m_quanta, SLOT(switchToToplevelMode())); + TQTimer::singleShot(0, m_quanta, TQT_SLOT(switchToToplevelMode())); } // Always hide debugger toolbar at this point m_quanta->toolBar("debugger_toolbar")->hide(); - m_quanta->m_pluginInterface->setPluginMenu(static_cast<QPopupMenu*>(m_quanta->factory()->container("plugins", m_quanta))); + m_quanta->m_pluginInterface->setPluginMenu(static_cast<TQPopupMenu*>(m_quanta->factory()->container("plugins", m_quanta))); m_quanta->m_pluginInterface->buildPluginMenu(); //TODO: Remove after upgrade from 3.1 is not supported - QDomDocument doc; + TQDomDocument doc; doc.setContent(KXMLGUIFactory::readConfigFile(m_quanta->xmlFile(), m_quanta->instance())); - QDomNodeList nodeList = doc.elementsByTagName("ActionProperties"); - QDomNode node = nodeList.item(0).firstChild(); + TQDomNodeList nodeList = doc.elementsByTagName("ActionProperties"); + TQDomNode node = nodeList.item(0).firstChild(); while (!node.isNull()) { if (node.nodeName() == "Action") { - QDomElement el = node.toElement(); + TQDomElement el = node.toElement(); m_quanta->oldShortcuts.insert(el.attribute("name"), el.attribute("shortcut")); node = node.nextSibling(); el.parentNode().removeChild(el); @@ -238,7 +238,7 @@ void QuantaInit::initQuanta() m_quanta->applyMainWindowSettings(m_config); - m_quanta->m_tagsMenu = static_cast<QPopupMenu*>(m_quanta->factory()->container("tags", m_quanta)); + m_quanta->m_tagsMenu = static_cast<TQPopupMenu*>(m_quanta->factory()->container("tags", m_quanta)); KMenuBar *mb = m_quanta->menuBar(); for (uint i = 0 ; i < mb->count(); i++) { @@ -252,20 +252,20 @@ void QuantaInit::initQuanta() if (toolviewMenu) toolviewMenu->plug(m_quanta->windowMenu()); - QPopupMenu *toolbarsMenu = (QPopupMenu*)(m_quanta->guiFactory())->container("toolbars_load", m_quanta); - connect(toolbarsMenu, SIGNAL(aboutToShow()), m_quanta, SLOT(slotBuildPrjToolbarsMenu())); + TQPopupMenu *toolbarsMenu = (TQPopupMenu*)(m_quanta->guiFactory())->container("toolbars_load", m_quanta); + connect(toolbarsMenu, TQT_SIGNAL(aboutToShow()), m_quanta, TQT_SLOT(slotBuildPrjToolbarsMenu())); - QPopupMenu *contextMenu = (QPopupMenu*)(m_quanta->guiFactory())->container("popup_editor", m_quanta); - connect(contextMenu, SIGNAL(aboutToShow()), m_quanta, SLOT(slotContextMenuAboutToShow())); + TQPopupMenu *contextMenu = (TQPopupMenu*)(m_quanta->guiFactory())->container("popup_editor", m_quanta); + connect(contextMenu, TQT_SIGNAL(aboutToShow()), m_quanta, TQT_SLOT(slotContextMenuAboutToShow())); - connect(m_quanta->m_messageOutput, SIGNAL(clicked(const QString&, int, int)), - m_quanta, SLOT(gotoFileAndLine(const QString&, int, int))); - connect(m_quanta->m_problemOutput, SIGNAL(clicked(const QString&, int, int)), - m_quanta, SLOT(gotoFileAndLine(const QString&, int, int))); - connect(m_quanta->m_annotationOutput->currentFileAnnotations(), SIGNAL(clicked(const QString&, int, int)), - m_quanta, SLOT(gotoFileAndLine(const QString&, int, int))); - connect(m_quanta->m_annotationOutput, SIGNAL(clicked(const QString&, int, int)), - m_quanta, SLOT(gotoFileAndLine(const QString&, int, int))); + connect(m_quanta->m_messageOutput, TQT_SIGNAL(clicked(const TQString&, int, int)), + m_quanta, TQT_SLOT(gotoFileAndLine(const TQString&, int, int))); + connect(m_quanta->m_problemOutput, TQT_SIGNAL(clicked(const TQString&, int, int)), + m_quanta, TQT_SLOT(gotoFileAndLine(const TQString&, int, int))); + connect(m_quanta->m_annotationOutput->currentFileAnnotations(), TQT_SIGNAL(clicked(const TQString&, int, int)), + m_quanta, TQT_SLOT(gotoFileAndLine(const TQString&, int, int))); + connect(m_quanta->m_annotationOutput, TQT_SIGNAL(clicked(const TQString&, int, int)), + m_quanta, TQT_SLOT(gotoFileAndLine(const TQString&, int, int))); m_quanta->slotFileNew(); m_quanta->slotNewStatus(); @@ -275,23 +275,23 @@ void QuantaInit::initQuanta() KTipDialog::showTip(m_quanta); //get the PID of this running instance - qConfig.quantaPID = QString::number(int(getpid()), 10); + qConfig.quantaPID = TQString::number(int(getpid()), 10); qConfig.backupDirPath = KGlobal::instance()->dirs()->saveLocation("data", resourceDir + "backups/"); - m_quanta->autosaveTimer = new QTimer(m_quanta); - connect(m_quanta->autosaveTimer, SIGNAL(timeout()), m_quanta, SLOT(slotAutosaveTimer())); + m_quanta->autosaveTimer = new TQTimer(m_quanta); + connect(m_quanta->autosaveTimer, TQT_SIGNAL(timeout()), m_quanta, TQT_SLOT(slotAutosaveTimer())); m_quanta->autosaveTimer->start(qConfig.autosaveInterval * 60000, false); - connect(m_quanta->m_doc, SIGNAL(hideSplash()), m_quanta, SLOT(slotHideSplash())); - connect(parser, SIGNAL(rebuildStructureTree(bool)), - m_quanta, SLOT(slotReloadStructTreeView(bool))); + connect(m_quanta->m_doc, TQT_SIGNAL(hideSplash()), m_quanta, TQT_SLOT(slotHideSplash())); + connect(parser, TQT_SIGNAL(rebuildStructureTree(bool)), + m_quanta, TQT_SLOT(slotReloadStructTreeView(bool))); // Read list of characters - QFile file(locate("appdata","chars")); + TQFile file(locate("appdata","chars")); if ( file.open(IO_ReadOnly) ) { // file opened successfully - QTextStream t( &file ); // use a text stream - t.setEncoding(QTextStream::UnicodeUTF8); - QString s; + TQTextStream t( &file ); // use a text stream + t.setEncoding(TQTextStream::UnicodeUTF8); + TQString s; while (!t.eof()) { s = t.readLine(); @@ -300,22 +300,22 @@ void QuantaInit::initQuanta() if (begin == 1) continue; int length = s.find(";)") - begin + 1; - QString s2 = s.mid(begin, length - 1); + TQString s2 = s.mid(begin, length - 1); replacementMap[s[0].unicode()] = s2; } file.close(); } - QString infoCss = tmpDir; - infoCss.replace(QRegExp("/quanta$"),""); + TQString infoCss = tmpDir; + infoCss.replace(TQRegExp("/quanta$"),""); infoCss += "/info.css"; QExtFileInfo::copy(KURL().fromPathOrURL(qConfig.globalDataDir + resourceDir + "scripts/info.css"), KURL().fromPathOrURL(infoCss)); checkRuntimeDependencies(); ViewManager::ref()->activeDocument()->view()->setFocus(); - m_quanta->refreshTimer = new QTimer(m_quanta); - connect(m_quanta->refreshTimer, SIGNAL(timeout()), m_quanta, SLOT(slotReparse())); + m_quanta->refreshTimer = new TQTimer(m_quanta); + connect(m_quanta->refreshTimer, TQT_SIGNAL(timeout()), m_quanta, TQT_SLOT(slotReparse())); m_quanta->refreshTimer->start( qConfig.refreshFrequency*1000, false ); //update the structure tree every 5 seconds if (qConfig.instantUpdate || qConfig.refreshFrequency == 0) { @@ -332,9 +332,9 @@ void QuantaInit::initToolBars() void QuantaInit::initStatusBar() { - m_quanta->statusbarTimer = new QTimer(m_quanta); - connect(m_quanta->statusbarTimer,SIGNAL(timeout()), - m_quanta, SLOT(statusBarTimeout())); + m_quanta->statusbarTimer = new TQTimer(m_quanta); + connect(m_quanta->statusbarTimer,TQT_SIGNAL(timeout()), + m_quanta, TQT_SLOT(statusBarTimeout())); progressBar = new KProgress(m_quanta->statusBar()); progressBar->setTextEnabled(false); @@ -356,111 +356,111 @@ void QuantaInit::initStatusBar() void QuantaInit::initDocument() { m_quanta->m_doc = new QuantaDoc(0L); - connect(m_quanta->m_doc, SIGNAL(newStatus()), - m_quanta, SLOT(slotNewStatus())); + connect(m_quanta->m_doc, TQT_SIGNAL(newStatus()), + m_quanta, TQT_SLOT(slotNewStatus())); } void QuantaInit::initProject() { Project *m_project = Project::ref(m_quanta); - connect(m_project, SIGNAL(getTreeStatus(QStringList *)), - pTab, SLOT(slotGetTreeStatus(QStringList *))); - connect(m_project, SIGNAL(loadToolbarFile(const KURL &)), - m_quanta, SLOT(slotLoadToolbarFile(const KURL &))); - connect(m_project, SIGNAL(getUserToolbarFiles(KURL::List *)), - m_quanta, SLOT(slotGetUserToolbarFiles(KURL::List *))); - connect(m_project, SIGNAL(openFiles(const KURL::List &, const QString&)), - m_quanta, SLOT(slotFileOpen(const KURL::List &, const QString&))); - connect(m_project, SIGNAL(openFile(const KURL &, const QString&)), - m_quanta, SLOT(slotFileOpen(const KURL &, const QString&))); - connect(m_project, SIGNAL(closeFile(const KURL &)), - m_quanta, SLOT(slotFileClose(const KURL &))); - connect(m_project, SIGNAL(reloadTree(ProjectList *, bool, const QStringList &)), - pTab, SLOT(slotReloadTree(ProjectList *, bool, const QStringList &))); - connect(m_project, SIGNAL(closeFiles()), ViewManager::ref(), SLOT(closeAll())); - connect(m_project, SIGNAL(eventHappened(const QString&, const QString&, const QString& )), QPEvents::ref(m_quanta), SLOT(slotEventHappened(const QString&, const QString&, const QString& ))); - - connect(m_quanta->fTab, SIGNAL(insertDirInProject(const KURL&)), - m_project, SLOT(slotAddDirectory(const KURL&))); - - connect(m_quanta->fTab, SIGNAL(insertFileInProject(const KURL&)), - m_project, SLOT(slotInsertFile(const KURL&))); - - connect(TemplatesTreeView::ref(), SIGNAL(insertDirInProject(const KURL&)), - m_project, SLOT(slotAddDirectory(const KURL&))); - - connect(TemplatesTreeView::ref(), SIGNAL(insertFileInProject(const KURL&)), - m_project, SLOT(slotInsertFile(const KURL&))); - connect(TemplatesTreeView::ref(), SIGNAL(downloadTemplate()), - m_quanta, SLOT(slotDownloadTemplate())); - connect(TemplatesTreeView::ref(), SIGNAL(uploadTemplate(const QString&)), m_quanta, SLOT(slotUploadTemplate(const QString&))); + connect(m_project, TQT_SIGNAL(getTreeStatus(TQStringList *)), + pTab, TQT_SLOT(slotGetTreeStatus(TQStringList *))); + connect(m_project, TQT_SIGNAL(loadToolbarFile(const KURL &)), + m_quanta, TQT_SLOT(slotLoadToolbarFile(const KURL &))); + connect(m_project, TQT_SIGNAL(getUserToolbarFiles(KURL::List *)), + m_quanta, TQT_SLOT(slotGetUserToolbarFiles(KURL::List *))); + connect(m_project, TQT_SIGNAL(openFiles(const KURL::List &, const TQString&)), + m_quanta, TQT_SLOT(slotFileOpen(const KURL::List &, const TQString&))); + connect(m_project, TQT_SIGNAL(openFile(const KURL &, const TQString&)), + m_quanta, TQT_SLOT(slotFileOpen(const KURL &, const TQString&))); + connect(m_project, TQT_SIGNAL(closeFile(const KURL &)), + m_quanta, TQT_SLOT(slotFileClose(const KURL &))); + connect(m_project, TQT_SIGNAL(reloadTree(ProjectList *, bool, const TQStringList &)), + pTab, TQT_SLOT(slotReloadTree(ProjectList *, bool, const TQStringList &))); + connect(m_project, TQT_SIGNAL(closeFiles()), ViewManager::ref(), TQT_SLOT(closeAll())); + connect(m_project, TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), QPEvents::ref(m_quanta), TQT_SLOT(slotEventHappened(const TQString&, const TQString&, const TQString& ))); + + connect(m_quanta->fTab, TQT_SIGNAL(insertDirInProject(const KURL&)), + m_project, TQT_SLOT(slotAddDirectory(const KURL&))); + + connect(m_quanta->fTab, TQT_SIGNAL(insertFileInProject(const KURL&)), + m_project, TQT_SLOT(slotInsertFile(const KURL&))); + + connect(TemplatesTreeView::ref(), TQT_SIGNAL(insertDirInProject(const KURL&)), + m_project, TQT_SLOT(slotAddDirectory(const KURL&))); + + connect(TemplatesTreeView::ref(), TQT_SIGNAL(insertFileInProject(const KURL&)), + m_project, TQT_SLOT(slotInsertFile(const KURL&))); + connect(TemplatesTreeView::ref(), TQT_SIGNAL(downloadTemplate()), + m_quanta, TQT_SLOT(slotDownloadTemplate())); + connect(TemplatesTreeView::ref(), TQT_SIGNAL(uploadTemplate(const TQString&)), m_quanta, TQT_SLOT(slotUploadTemplate(const TQString&))); // inform project if something was renamed - connect(pTab, SIGNAL(renamed(const KURL&, const KURL&)), - m_project, SLOT(slotRenamed(const KURL&, const KURL&))); - connect(m_quanta->fTab, SIGNAL(renamed(const KURL&, const KURL&)), - m_project, SLOT(slotRenamed(const KURL&, const KURL&))); - connect(tTab, SIGNAL(renamed(const KURL&, const KURL&)), - m_project, SLOT(slotRenamed(const KURL&, const KURL&))); - - connect(pTab, SIGNAL(insertToProject(const KURL&)), - m_project, SLOT(slotInsertFile(const KURL&))); - connect(pTab, SIGNAL(removeFromProject(const KURL&)), - m_project, SLOT(slotRemove(const KURL&))); - connect(pTab, SIGNAL(uploadSingleURL(const KURL&, const QString&, bool, bool)), - m_project, SLOT(slotUploadURL(const KURL&, const QString&, bool, bool))); - connect(pTab, SIGNAL(rescanProjectDir()), m_project, SLOT(slotRescanPrjDir())); - connect(pTab, SIGNAL(showProjectOptions()), m_project, SLOT(slotOptions())); - connect(pTab, SIGNAL(uploadProject()), m_project, SLOT(slotUpload())); - - connect(m_quanta->dTab, SIGNAL(reloadProjectDocs()), m_project, SLOT(slotReloadProjectDocs())); - connect(m_project, SIGNAL(reloadProjectDocs()), m_quanta->dTab, SLOT(slotReloadProjectDocs())); - connect(m_project, SIGNAL(addProjectDoc(const KURL&)), m_quanta->dTab, SLOT(slotAddProjectDoc(const KURL&))); - - connect(m_project, SIGNAL(enableMessageWidget()), - m_quanta, SLOT(slotShowMessagesView())); - - connect(m_project, SIGNAL(messages(const QString&)), - m_quanta->m_messageOutput, SLOT(showMessage(const QString&))); - - connect(m_project, SIGNAL(newStatus()), - m_quanta, SLOT(slotNewStatus())); - - connect(m_project, SIGNAL(newProjectLoaded(const QString &, const KURL &, const KURL &)), - TemplatesTreeView::ref(), SLOT(slotNewProjectLoaded(const QString &, const KURL &, const KURL &))); - connect(m_project, SIGNAL(newProjectLoaded(const QString &, const KURL &, const KURL &)), - pTab, SLOT(slotNewProjectLoaded(const QString &, const KURL &, const KURL &))); - connect(m_project, SIGNAL(newProjectLoaded(const QString &, const KURL &, const KURL &)), - m_quanta->fTab, SLOT(slotNewProjectLoaded(const QString &, const KURL &, const KURL &))); - connect(m_project, SIGNAL(newProjectLoaded(const QString &, const KURL &, const KURL &)), - m_quanta->annotationOutput(), SLOT(updateAnnotations())); - - connect(pTab, SIGNAL(changeFileDescription(const KURL&, const QString&)), - m_project, SLOT(slotFileDescChanged(const KURL&, const QString&))); - connect(pTab, SIGNAL(changeUploadStatus(const KURL&, int)), - m_project, SLOT(slotUploadStatusChanged(const KURL&, int))); - connect(pTab, SIGNAL(changeDocumentFolderStatus(const KURL&, bool)), - m_project, SLOT(slotChangeDocumentFolderStatus(const KURL&, bool))); - - connect(m_project, SIGNAL(hideSplash()), m_quanta, SLOT(slotHideSplash())); - - connect(m_project, SIGNAL(statusMsg(const QString &)), - m_quanta, SLOT(slotStatusMsg(const QString & ))); + connect(pTab, TQT_SIGNAL(renamed(const KURL&, const KURL&)), + m_project, TQT_SLOT(slotRenamed(const KURL&, const KURL&))); + connect(m_quanta->fTab, TQT_SIGNAL(renamed(const KURL&, const KURL&)), + m_project, TQT_SLOT(slotRenamed(const KURL&, const KURL&))); + connect(tTab, TQT_SIGNAL(renamed(const KURL&, const KURL&)), + m_project, TQT_SLOT(slotRenamed(const KURL&, const KURL&))); + + connect(pTab, TQT_SIGNAL(insertToProject(const KURL&)), + m_project, TQT_SLOT(slotInsertFile(const KURL&))); + connect(pTab, TQT_SIGNAL(removeFromProject(const KURL&)), + m_project, TQT_SLOT(slotRemove(const KURL&))); + connect(pTab, TQT_SIGNAL(uploadSingleURL(const KURL&, const TQString&, bool, bool)), + m_project, TQT_SLOT(slotUploadURL(const KURL&, const TQString&, bool, bool))); + connect(pTab, TQT_SIGNAL(rescanProjectDir()), m_project, TQT_SLOT(slotRescanPrjDir())); + connect(pTab, TQT_SIGNAL(showProjectOptions()), m_project, TQT_SLOT(slotOptions())); + connect(pTab, TQT_SIGNAL(uploadProject()), m_project, TQT_SLOT(slotUpload())); + + connect(m_quanta->dTab, TQT_SIGNAL(reloadProjectDocs()), m_project, TQT_SLOT(slotReloadProjectDocs())); + connect(m_project, TQT_SIGNAL(reloadProjectDocs()), m_quanta->dTab, TQT_SLOT(slotReloadProjectDocs())); + connect(m_project, TQT_SIGNAL(addProjectDoc(const KURL&)), m_quanta->dTab, TQT_SLOT(slotAddProjectDoc(const KURL&))); + + connect(m_project, TQT_SIGNAL(enableMessageWidget()), + m_quanta, TQT_SLOT(slotShowMessagesView())); + + connect(m_project, TQT_SIGNAL(messages(const TQString&)), + m_quanta->m_messageOutput, TQT_SLOT(showMessage(const TQString&))); + + connect(m_project, TQT_SIGNAL(newStatus()), + m_quanta, TQT_SLOT(slotNewStatus())); + + connect(m_project, TQT_SIGNAL(newProjectLoaded(const TQString &, const KURL &, const KURL &)), + TemplatesTreeView::ref(), TQT_SLOT(slotNewProjectLoaded(const TQString &, const KURL &, const KURL &))); + connect(m_project, TQT_SIGNAL(newProjectLoaded(const TQString &, const KURL &, const KURL &)), + pTab, TQT_SLOT(slotNewProjectLoaded(const TQString &, const KURL &, const KURL &))); + connect(m_project, TQT_SIGNAL(newProjectLoaded(const TQString &, const KURL &, const KURL &)), + m_quanta->fTab, TQT_SLOT(slotNewProjectLoaded(const TQString &, const KURL &, const KURL &))); + connect(m_project, TQT_SIGNAL(newProjectLoaded(const TQString &, const KURL &, const KURL &)), + m_quanta->annotationOutput(), TQT_SLOT(updateAnnotations())); + + connect(pTab, TQT_SIGNAL(changeFileDescription(const KURL&, const TQString&)), + m_project, TQT_SLOT(slotFileDescChanged(const KURL&, const TQString&))); + connect(pTab, TQT_SIGNAL(changeUploadStatus(const KURL&, int)), + m_project, TQT_SLOT(slotUploadStatusChanged(const KURL&, int))); + connect(pTab, TQT_SIGNAL(changeDocumentFolderStatus(const KURL&, bool)), + m_project, TQT_SLOT(slotChangeDocumentFolderStatus(const KURL&, bool))); + + connect(m_project, TQT_SIGNAL(hideSplash()), m_quanta, TQT_SLOT(slotHideSplash())); + + connect(m_project, TQT_SIGNAL(statusMsg(const TQString &)), + m_quanta, TQT_SLOT(slotStatusMsg(const TQString & ))); } void QuantaInit::initView() { ViewManager *m_viewManager = ViewManager::ref(m_quanta); - connect(m_quanta, SIGNAL(viewActivated (KMdiChildView *)), m_viewManager, SLOT(slotViewActivated(KMdiChildView*))); - connect(m_quanta, SIGNAL(lastChildViewClosed()), m_viewManager, SLOT(slotLastViewClosed())); -// connect(m_quanta, SIGNAL(viewDeactivated(KMdiChildView *)), m_viewManager, SLOT(slotViewDeactivated(KMdiChildView*))); + connect(m_quanta, TQT_SIGNAL(viewActivated (KMdiChildView *)), m_viewManager, TQT_SLOT(slotViewActivated(KMdiChildView*))); + connect(m_quanta, TQT_SIGNAL(lastChildViewClosed()), m_viewManager, TQT_SLOT(slotLastViewClosed())); +// connect(m_quanta, TQT_SIGNAL(viewDeactivated(KMdiChildView *)), m_viewManager, TQT_SLOT(slotViewDeactivated(KMdiChildView*))); KafkaDocument *m_kafkaDocument = KafkaDocument::ref(0, 0, "KafkaPart"); m_kafkaDocument->getKafkaWidget()->view()->setMinimumHeight(50); m_kafkaDocument->readConfig(quantaApp->config()); loadVPLConfig(); ToolbarTabWidget *toolBarTab = ToolbarTabWidget::ref(quantaApp); - connect(toolBarTab, SIGNAL(iconTextModeChanged()), quantaApp, SLOT(slotRefreshActiveWindow())); + connect(toolBarTab, TQT_SIGNAL(iconTextModeChanged()), quantaApp, TQT_SLOT(slotRefreshActiveWindow())); //set the toolview and close button style before the GUI is created m_config->setGroup("General Options"); @@ -481,77 +481,77 @@ void QuantaInit::initView() m_quanta->scriptTab = new ScriptTreeView(m_quanta, "Scripts"); m_quanta->m_messageOutput = new MessageOutput(m_quanta, "Messages"); - m_quanta->m_messageOutput->setFocusPolicy(QWidget::NoFocus); + m_quanta->m_messageOutput->setFocusPolicy(TQWidget::NoFocus); m_quanta->m_messageOutput->showMessage(i18n("Message Window...")); - connect(m_quanta, SIGNAL(showMessage(const QString&, bool)), m_quanta->m_messageOutput, SLOT(showMessage(const QString&, bool))); - connect(m_quanta, SIGNAL(clearMessages()), m_quanta->m_messageOutput, SLOT(clear())); + connect(m_quanta, TQT_SIGNAL(showMessage(const TQString&, bool)), m_quanta->m_messageOutput, TQT_SLOT(showMessage(const TQString&, bool))); + connect(m_quanta, TQT_SIGNAL(clearMessages()), m_quanta->m_messageOutput, TQT_SLOT(clear())); m_quanta->m_problemOutput = new MessageOutput(m_quanta, "Problems"); - m_quanta->m_problemOutput->setFocusPolicy(QWidget::NoFocus); + m_quanta->m_problemOutput->setFocusPolicy(TQWidget::NoFocus); m_quanta->m_annotationOutput = new AnnotationOutput(m_quanta, "Annotations"); - m_quanta->m_annotationOutput->setFocusPolicy(QWidget::NoFocus); + m_quanta->m_annotationOutput->setFocusPolicy(TQWidget::NoFocus); m_quanta->createPreviewPart(); m_quanta->createDocPart(); - connect(m_quanta, SIGNAL(reloadAllTrees()), - m_quanta->fTab, SLOT(slotReloadAllTrees())); - - connect(pTab, SIGNAL(loadToolbarFile (const KURL&)), - m_quanta, SLOT(slotLoadToolbarFile(const KURL&))); - connect(m_viewManager, SIGNAL(viewActivated(const KURL&)), - pTab, SLOT(slotViewActivated(const KURL&))); - - connect(m_viewManager, SIGNAL(documentClosed(const KURL&)), - pTab, SLOT(slotDocumentClosed(const KURL&))); - connect(m_viewManager, SIGNAL(documentClosed(const KURL&)), - tTab, SLOT(slotDocumentClosed(const KURL&))); - connect(m_viewManager, SIGNAL(documentClosed(const KURL&)), - m_quanta->scriptTab, SLOT(slotDocumentClosed(const KURL&))); - connect(m_viewManager, SIGNAL(documentClosed(const KURL&)), - m_quanta->fTab, SLOT(slotDocumentClosed(const KURL&))); - - connect(tTab, SIGNAL(insertFile (const KURL &)), - m_quanta, SLOT(slotInsertFile(const KURL &))); - - connect(m_quanta->scriptTab, SIGNAL(openFileInPreview(const KURL &)), - m_quanta, SLOT(slotOpenFileInPreview(const KURL &))); - connect(m_quanta->scriptTab, SIGNAL(showPreviewWidget(bool)), - m_quanta, SLOT(slotShowPreviewWidget(bool))); - connect(m_quanta->scriptTab, SIGNAL(assignActionToScript(const KURL &, const QString&)), - m_quanta, SLOT(slotAssignActionToScript(const KURL &, const QString&))); - connect(m_quanta->scriptTab, SIGNAL(downloadScript()), m_quanta, SLOT(slotDownloadScript())); - connect(m_quanta->scriptTab, SIGNAL(uploadScript(const QString&)), m_quanta, SLOT(slotUploadScript(const QString&))); - connect(m_quanta->dTab, SIGNAL(downloadDoc()), m_quanta, SLOT(slotDownloadDoc())); - - connect(m_quanta->m_htmlPart, SIGNAL(onURL(const QString&)), - m_quanta, SLOT(slotStatusMsg(const QString&))); - connect(m_quanta->m_htmlPartDoc, SIGNAL(onURL(const QString&)), - m_quanta, SLOT(slotStatusMsg(const QString&))); - - connect(sTab, SIGNAL(newCursorPosition(int,int)), m_quanta, SLOT(setCursorPosition(int,int))); - connect(sTab, SIGNAL(selectArea(int,int,int,int)), m_quanta, SLOT( selectArea(int,int,int,int))); - connect(sTab, SIGNAL(selectTagArea(Node*)), m_quanta, SLOT(slotSelectTagArea(Node*))); - connect(sTab, SIGNAL(needReparse()), m_quanta, SLOT(slotForceReparse())); - connect(sTab, SIGNAL(showGroupsForDTEP(const QString&, bool)), m_quanta, SLOT(slotShowGroupsForDTEP(const QString&, bool))); - connect(sTab, SIGNAL(openFile(const KURL &)), - m_quanta, SLOT (slotFileOpen(const KURL &))); - connect(sTab, SIGNAL(openImage (const KURL&)), - m_quanta, SLOT(slotImageOpen(const KURL&))); - connect(sTab, SIGNAL(showProblemMessage(const QString&)), - m_quanta->m_problemOutput, SLOT(showMessage(const QString&))); - connect(sTab, SIGNAL(clearProblemOutput()), - m_quanta->m_problemOutput, SLOT(clear())); - connect(parser, SIGNAL(nodeTreeChanged()), sTab, SLOT(slotNodeTreeChanged())); - - connect(m_quanta->dTab, SIGNAL(openURL(const QString&)), m_quanta, SLOT(openDoc(const QString&))); - - connect(m_viewManager, SIGNAL(dragInsert(QDropEvent *)), tTab, SLOT(slotDragInsert(QDropEvent *))); + connect(m_quanta, TQT_SIGNAL(reloadAllTrees()), + m_quanta->fTab, TQT_SLOT(slotReloadAllTrees())); + + connect(pTab, TQT_SIGNAL(loadToolbarFile (const KURL&)), + m_quanta, TQT_SLOT(slotLoadToolbarFile(const KURL&))); + connect(m_viewManager, TQT_SIGNAL(viewActivated(const KURL&)), + pTab, TQT_SLOT(slotViewActivated(const KURL&))); + + connect(m_viewManager, TQT_SIGNAL(documentClosed(const KURL&)), + pTab, TQT_SLOT(slotDocumentClosed(const KURL&))); + connect(m_viewManager, TQT_SIGNAL(documentClosed(const KURL&)), + tTab, TQT_SLOT(slotDocumentClosed(const KURL&))); + connect(m_viewManager, TQT_SIGNAL(documentClosed(const KURL&)), + m_quanta->scriptTab, TQT_SLOT(slotDocumentClosed(const KURL&))); + connect(m_viewManager, TQT_SIGNAL(documentClosed(const KURL&)), + m_quanta->fTab, TQT_SLOT(slotDocumentClosed(const KURL&))); + + connect(tTab, TQT_SIGNAL(insertFile (const KURL &)), + m_quanta, TQT_SLOT(slotInsertFile(const KURL &))); + + connect(m_quanta->scriptTab, TQT_SIGNAL(openFileInPreview(const KURL &)), + m_quanta, TQT_SLOT(slotOpenFileInPreview(const KURL &))); + connect(m_quanta->scriptTab, TQT_SIGNAL(showPreviewWidget(bool)), + m_quanta, TQT_SLOT(slotShowPreviewWidget(bool))); + connect(m_quanta->scriptTab, TQT_SIGNAL(assignActionToScript(const KURL &, const TQString&)), + m_quanta, TQT_SLOT(slotAssignActionToScript(const KURL &, const TQString&))); + connect(m_quanta->scriptTab, TQT_SIGNAL(downloadScript()), m_quanta, TQT_SLOT(slotDownloadScript())); + connect(m_quanta->scriptTab, TQT_SIGNAL(uploadScript(const TQString&)), m_quanta, TQT_SLOT(slotUploadScript(const TQString&))); + connect(m_quanta->dTab, TQT_SIGNAL(downloadDoc()), m_quanta, TQT_SLOT(slotDownloadDoc())); + + connect(m_quanta->m_htmlPart, TQT_SIGNAL(onURL(const TQString&)), + m_quanta, TQT_SLOT(slotStatusMsg(const TQString&))); + connect(m_quanta->m_htmlPartDoc, TQT_SIGNAL(onURL(const TQString&)), + m_quanta, TQT_SLOT(slotStatusMsg(const TQString&))); + + connect(sTab, TQT_SIGNAL(newCursorPosition(int,int)), m_quanta, TQT_SLOT(setCursorPosition(int,int))); + connect(sTab, TQT_SIGNAL(selectArea(int,int,int,int)), m_quanta, TQT_SLOT( selectArea(int,int,int,int))); + connect(sTab, TQT_SIGNAL(selectTagArea(Node*)), m_quanta, TQT_SLOT(slotSelectTagArea(Node*))); + connect(sTab, TQT_SIGNAL(needReparse()), m_quanta, TQT_SLOT(slotForceReparse())); + connect(sTab, TQT_SIGNAL(showGroupsForDTEP(const TQString&, bool)), m_quanta, TQT_SLOT(slotShowGroupsForDTEP(const TQString&, bool))); + connect(sTab, TQT_SIGNAL(openFile(const KURL &)), + m_quanta, TQT_SLOT (slotFileOpen(const KURL &))); + connect(sTab, TQT_SIGNAL(openImage (const KURL&)), + m_quanta, TQT_SLOT(slotImageOpen(const KURL&))); + connect(sTab, TQT_SIGNAL(showProblemMessage(const TQString&)), + m_quanta->m_problemOutput, TQT_SLOT(showMessage(const TQString&))); + connect(sTab, TQT_SIGNAL(clearProblemOutput()), + m_quanta->m_problemOutput, TQT_SLOT(clear())); + connect(parser, TQT_SIGNAL(nodeTreeChanged()), sTab, TQT_SLOT(slotNodeTreeChanged())); + + connect(m_quanta->dTab, TQT_SIGNAL(openURL(const TQString&)), m_quanta, TQT_SLOT(openDoc(const TQString&))); + + connect(m_viewManager, TQT_SIGNAL(dragInsert(TQDropEvent *)), tTab, TQT_SLOT(slotDragInsert(TQDropEvent *))); qConfig.windowLayout = "Default"; } -KMdiToolViewAccessor* QuantaInit::addToolTreeView(QWidget *widget, const QString &name, const QPixmap &icon, KDockWidget::DockPosition position) +KMdiToolViewAccessor* QuantaInit::addToolTreeView(TQWidget *widget, const TQString &name, const TQPixmap &icon, KDockWidget::DockPosition position) { widget->setIcon(icon); widget->setCaption(name); @@ -589,7 +589,7 @@ void QuantaInit::readOptions() KAction *action = quantaApp->actionCollection()->action("smart_tag_insertion"); (static_cast<KToggleAction* >(action))->setChecked(qConfig.smartTagInsertion); - QSize s(800,580); + TQSize s(800,580); m_quanta->resize( m_config->readSizeEntry("Geometry", &s)); qConfig.autosaveInterval = m_config->readNumEntry("Autosave interval", 1); @@ -619,7 +619,7 @@ void QuantaInit::readOptions() //KNewStuff config m_config->setGroup("KNewStuff"); - QString str = m_config->readEntry("ProvidersUrl"); + TQString str = m_config->readEntry("ProvidersUrl"); if (str.isEmpty()) { m_config->writeEntry( "ProvidersUrl", "http://quanta.kdewebdev.org/newstuff/providers.xml" ); @@ -645,7 +645,7 @@ void QuantaInit::openLastFiles() // because project now can be // in load stage ( remote prj ) m_config->setGroup("Projects"); - QString pu = QuantaCommon::readPathEntry(m_config, "Last Project"); + TQString pu = QuantaCommon::readPathEntry(m_config, "Last Project"); KURL u; QuantaCommon::setUrl(u, pu); @@ -657,12 +657,12 @@ void QuantaInit::openLastFiles() m_config->setGroup("General Options"); - QStringList urls = QuantaCommon::readPathListEntry(m_config, "List of opened files"); - QStringList encodings = QuantaCommon::readPathListEntry(m_config, "Encoding of opened files"); + TQStringList urls = QuantaCommon::readPathListEntry(m_config, "List of opened files"); + TQStringList encodings = QuantaCommon::readPathListEntry(m_config, "Encoding of opened files"); m_quanta->m_doc->blockSignals(true); m_quanta->setParserEnabled(false); uint i = 0; - for ( QStringList::Iterator it = urls.begin(); it != urls.end(); ++it ) + for ( TQStringList::Iterator it = urls.begin(); it != urls.end(); ++it ) { KURL fu; QuantaCommon::setUrl(fu, *it); @@ -684,7 +684,7 @@ void QuantaInit::openLastFiles() } /** Loads the initial project */ -void QuantaInit::loadInitialProject(const QString& url) +void QuantaInit::loadInitialProject(const TQString& url) { if(url.isNull()) { @@ -706,74 +706,74 @@ void QuantaInit::loadInitialProject(const QString& url) void QuantaInit::initActions() { KActionCollection *ac = m_quanta->actionCollection(); - new KAction(i18n("Annotate..."), 0, m_quanta, SLOT(slotAnnotate()),ac, "annotate"); + new KAction(i18n("Annotate..."), 0, m_quanta, TQT_SLOT(slotAnnotate()),ac, "annotate"); m_quanta->editTagAction = new KAction( i18n( "&Edit Current Tag..." ), CTRL+Key_E, - m_quanta, SLOT( slotEditCurrentTag() ), + m_quanta, TQT_SLOT( slotEditCurrentTag() ), ac, "edit_current_tag" ); m_quanta->selectTagAreaAction = new KAction( i18n( "&Select Current Tag Area" ), 0, - m_quanta, SLOT( slotSelectTagArea() ), + m_quanta, TQT_SLOT( slotSelectTagArea() ), ac, "select_tag_area" ); new KAction( i18n( "E&xpand Abbreviation" ), CTRL+SHIFT+Key_J, - m_quanta, SLOT( slotExpandAbbreviation() ), + m_quanta, TQT_SLOT( slotExpandAbbreviation() ), ac, "expand_abbreviation" ); - new KAction(i18n("&Report Bug..."), 0, m_quanta, SLOT(slotReportBug()), ac, "help_reportbug"); //needed, because quanta_be bugs should be reported for quanta + new KAction(i18n("&Report Bug..."), 0, m_quanta, TQT_SLOT(slotReportBug()), ac, "help_reportbug"); //needed, because quanta_be bugs should be reported for quanta //Kate actions //Edit menu - KStdAction::undo(m_quanta, SLOT(slotUndo()), ac); - KStdAction::redo(m_quanta, SLOT(slotRedo()), ac); - KStdAction::cut(m_quanta, SLOT(slotCut()), ac); - KStdAction::copy(m_quanta, SLOT(slotCopy()), ac) ; - KStdAction::pasteText(m_quanta, SLOT(slotPaste()), ac); + KStdAction::undo(m_quanta, TQT_SLOT(slotUndo()), ac); + KStdAction::redo(m_quanta, TQT_SLOT(slotRedo()), ac); + KStdAction::cut(m_quanta, TQT_SLOT(slotCut()), ac); + KStdAction::copy(m_quanta, TQT_SLOT(slotCopy()), ac) ; + KStdAction::pasteText(m_quanta, TQT_SLOT(slotPaste()), ac); //help (void) new KAction(i18n("Ti&p of the Day"), "idea", "", m_quanta, - SLOT(slotHelpTip()), ac, "help_tip"); + TQT_SLOT(slotHelpTip()), ac, "help_tip"); // File actions // - KStdAction::openNew( m_quanta, SLOT( slotFileNew() ), ac); - KStdAction::open ( m_quanta, SLOT( slotFileOpen() ), ac, "file_open"); - (void) new KAction(i18n("Close Other Tabs"), 0, ViewManager::ref(), SLOT(slotCloseOtherTabs()), ac, "close_other_tabs"); + KStdAction::openNew( m_quanta, TQT_SLOT( slotFileNew() ), ac); + KStdAction::open ( m_quanta, TQT_SLOT( slotFileOpen() ), ac, "file_open"); + (void) new KAction(i18n("Close Other Tabs"), 0, ViewManager::ref(), TQT_SLOT(slotCloseOtherTabs()), ac, "close_other_tabs"); - m_quanta->fileRecent = KStdAction::openRecent(m_quanta, SLOT(slotFileOpenRecent(const KURL&)), + m_quanta->fileRecent = KStdAction::openRecent(m_quanta, TQT_SLOT(slotFileOpenRecent(const KURL&)), ac, "file_open_recent"); m_quanta->fileRecent->setToolTip(i18n("Open / Open Recent")); - connect(m_quanta->fileRecent, SIGNAL(activated()), m_quanta, SLOT(slotFileOpen())); + connect(m_quanta->fileRecent, TQT_SIGNAL(activated()), m_quanta, TQT_SLOT(slotFileOpen())); (void) new KAction( i18n( "Close All" ), 0, m_quanta, - SLOT( slotFileCloseAll() ), + TQT_SLOT( slotFileCloseAll() ), ac, "file_close_all" ); - m_quanta->saveAction = KStdAction::save(m_quanta, SLOT( slotFileSave() ), ac); + m_quanta->saveAction = KStdAction::save(m_quanta, TQT_SLOT( slotFileSave() ), ac); - KStdAction::saveAs( m_quanta, SLOT( slotFileSaveAs() ), ac ); + KStdAction::saveAs( m_quanta, TQT_SLOT( slotFileSaveAs() ), ac ); m_quanta->saveAllAction = new KAction( i18n( "Save All..." ), "save_all", SHIFT+KStdAccel::shortcut(KStdAccel::Save).keyCodeQt(), - m_quanta, SLOT( slotFileSaveAll() ), + m_quanta, TQT_SLOT( slotFileSaveAll() ), ac, "file_save_all" ); (void) new KAction(i18n("Reloa&d"), "revert", SHIFT+Key_F5, m_quanta, - SLOT(slotFileReload()), ac, "file_reload"); + TQT_SLOT(slotFileReload()), ac, "file_reload"); // (void) new KAction(i18n("Reload All "), 0, 0, m_quanta, -// SLOT(slotFileReloadAll()), ac, "file_reload_all"); +// TQT_SLOT(slotFileReloadAll()), ac, "file_reload_all"); (void) new KAction( i18n( "Save as Local Template..." ), 0, - m_quanta, SLOT( slotFileSaveAsLocalTemplate() ), + m_quanta, TQT_SLOT( slotFileSaveAsLocalTemplate() ), ac, "save_local_template" ); (void) new KAction( i18n( "Save Selection to Local Template File..." ), 0, - m_quanta, SLOT( slotFileSaveSelectionAsLocalTemplate() ), + m_quanta, TQT_SLOT( slotFileSaveSelectionAsLocalTemplate() ), ac, "save_selection_local_template" ); - KStdAction::quit( m_quanta, SLOT( slotFileQuit() ), ac ); + KStdAction::quit( m_quanta, TQT_SLOT( slotFileQuit() ), ac ); // Edit actions (void) new KAction( i18n( "Find in Files..." ), SmallIcon("filefind"), CTRL+ALT+Key_F, - m_quanta, SLOT( slotEditFindInFiles() ), + m_quanta, TQT_SLOT( slotEditFindInFiles() ), ac, "find_in_files" ); KAction* aux = TagActionManager::self()->actionCollection()->action("apply_source_indentation"); @@ -783,69 +783,69 @@ void QuantaInit::initActions() // Tool actions (void) new KAction( i18n( "&Context Help..." ), CTRL+Key_H, - m_quanta, SLOT( slotContextHelp() ), + m_quanta, TQT_SLOT( slotContextHelp() ), ac, "context_help" ); (void) new KAction( i18n( "&Quanta Homepage" ), 0, - m_quanta, SLOT( slotHelpHomepage() ), + m_quanta, TQT_SLOT( slotHelpHomepage() ), ac, "help_homepage" ); (void) new KAction( i18n( "&User Mailing List" ), 0, - m_quanta, SLOT( slotHelpUserList() ), + m_quanta, TQT_SLOT( slotHelpUserList() ), ac, "help_userlist" ); (void) new KAction( i18n( "Make &Donation" ), 0, - m_quanta, SLOT( slotMakeDonation() ), + m_quanta, TQT_SLOT( slotMakeDonation() ), ac, "help_donation" ); (void) new KAction( i18n( "Tag &Attributes..." ), ALT+Key_Down, - m_quanta->m_doc, SLOT( slotAttribPopup() ), + m_quanta->m_doc, TQT_SLOT( slotAttribPopup() ), ac, "tag_attributes" ); (void) new KAction( i18n( "&Change the DTD..." ), 0, - m_quanta, SLOT( slotChangeDTD() ), + m_quanta, TQT_SLOT( slotChangeDTD() ), ac, "change_dtd" ); (void) new KAction( i18n( "&Edit DTD Settings..." ), 0, - m_quanta, SLOT( slotEditDTD() ), + m_quanta, TQT_SLOT( slotEditDTD() ), ac, "edit_dtd" ); (void) new KAction( i18n( "&Load && Convert DTD..." ), 0, - DTDs::ref(), SLOT( slotLoadDTD() ), + DTDs::ref(), TQT_SLOT( slotLoadDTD() ), ac, "load_dtd" ); (void) new KAction( i18n( "Load DTD E&ntities..." ), 0, - DTDs::ref(), SLOT( slotLoadEntities() ), + DTDs::ref(), TQT_SLOT( slotLoadEntities() ), ac, "load_entities" ); (void) new KAction( i18n( "Load DTD &Package (DTEP)..." ), 0, - m_quanta, SLOT( slotLoadDTEP() ), + m_quanta, TQT_SLOT( slotLoadDTEP() ), ac, "load_dtep" ); (void) new KAction( i18n( "Send DTD Package (DTEP) in E&mail..." ), "mail_send", 0, - m_quanta, SLOT( slotEmailDTEP() ), + m_quanta, TQT_SLOT( slotEmailDTEP() ), ac, "send_dtep" ); (void) new KAction( i18n( "&Download DTD Package (DTEP)..." ), "network", 0, - m_quanta, SLOT( slotDownloadDTEP() ), + m_quanta, TQT_SLOT( slotDownloadDTEP() ), ac, "download_dtep" ); (void) new KAction( i18n( "&Upload DTD Package (DTEP)..." ), "network", 0, - m_quanta, SLOT( slotUploadDTEP() ), + m_quanta, TQT_SLOT( slotUploadDTEP() ), ac, "upload_dtep" ); /* (void) new KAction( i18n( "&Upload DTD Package (DTEP)..." ), 0, - m_quanta, SLOT( slotUploadDTEP() ), + m_quanta, TQT_SLOT( slotUploadDTEP() ), ac, "send_dtep" ); */ (void) new KAction( i18n( "&Document Properties" ), 0, - m_quanta, SLOT( slotDocumentProperties() ), + m_quanta, TQT_SLOT( slotDocumentProperties() ), ac, "tools_document_properties" ); (void) new KAction ( i18n ("F&ormat XML Code"), 0, - m_quanta, SLOT( slotCodeFormatting() ), + m_quanta, TQT_SLOT( slotCodeFormatting() ), ac, "tools_code_formatting"); (void) new KAction( i18n( "&Convert Tag && Attribute Case..."), 0, - m_quanta, SLOT(slotConvertCase()), + m_quanta, TQT_SLOT(slotConvertCase()), ac, "tools_change_case"); // View actions @@ -853,109 +853,109 @@ void QuantaInit::initActions() m_quanta->showSourceAction = new KToggleAction( i18n( "&Source Editor"), UserIcon ("view_text"), ALT+Key_F9, - m_quanta, SLOT( slotShowSourceEditor()), + m_quanta, TQT_SLOT( slotShowSourceEditor()), ac, "show_quanta_editor"); m_quanta->showSourceAction->setExclusiveGroup("view"); m_quanta->showVPLAction = new KToggleAction( i18n( "&VPL Editor"), UserIcon ("vpl"), CTRL+SHIFT+Key_F9, - m_quanta, SLOT( slotShowVPLOnly() ), + m_quanta, TQT_SLOT( slotShowVPLOnly() ), ac, "show_kafka_view"); m_quanta->showVPLAction->setExclusiveGroup("view"); m_quanta->showVPLSourceAction = new KToggleAction( i18n("VPL && So&urce Editors"), UserIcon ("vpl_text"), Key_F9, - m_quanta, SLOT( slotShowVPLAndSourceEditor() ), + m_quanta, TQT_SLOT( slotShowVPLAndSourceEditor() ), ac, "show_kafka_and_quanta"); m_quanta->showVPLSourceAction->setExclusiveGroup("view"); /**kafkaSelectAction = new KSelectAction(i18n("Main &View"), 0, ac,"show_kafka"); - QStringList list2; + TQStringList list2; list2.append(i18n("&Source Editor")); list2.append(i18n("&VPL Editor (experimental)")); list2.append(i18n("&Both Editors")); kafkaSelectAction->setItems(list2); - connect(kafkaSelectAction, SIGNAL(activated(int)), m_quanta, SLOT(slotShowKafkaPartl(int)));*/ + connect(kafkaSelectAction, TQT_SIGNAL(activated(int)), m_quanta, TQT_SLOT(slotShowKafkaPartl(int)));*/ (void) new KAction( i18n( "&Reload Preview" ), "reload", KStdAccel::shortcut(KStdAccel::Reload).keyCodeQt(), - m_quanta, SLOT(slotRepaintPreview()), + m_quanta, TQT_SLOT(slotRepaintPreview()), ac, "reload" ); (void) new KAction( i18n( "&Previous File" ), "1leftarrow", KStdAccel::back(), - m_quanta, SLOT( slotBack() ), + m_quanta, TQT_SLOT( slotBack() ), ac, "previous_file" ); (void) new KAction( i18n( "&Next File" ), "1rightarrow", KStdAccel::forward(), - m_quanta, SLOT( slotForward() ), + m_quanta, TQT_SLOT( slotForward() ), ac, "next_file" ); // Options actions // (void) new KAction( i18n( "Configure &Actions..." ), UserIcon("ball"),0, - m_quanta, SLOT( slotOptionsConfigureActions() ), + m_quanta, TQT_SLOT( slotOptionsConfigureActions() ), ac, "configure_actions" ); - KStdAction::showMenubar(m_quanta, SLOT(slotShowMenuBar()), ac, "options_show_menubar"); - KStdAction::keyBindings(m_quanta, SLOT( slotOptionsConfigureKeys() ), ac, "configure_shortcuts"); - KStdAction::configureToolbars( m_quanta, SLOT( slotOptionsConfigureToolbars() ), ac, "options_configure_toolbars"); - KStdAction::preferences(m_quanta, SLOT( slotOptions() ), ac, "general_options"); - new KAction(i18n("Configure Pre&view..."), SmallIcon("konqueror"), 0, m_quanta, SLOT(slotPreviewOptions()), ac, "preview_options"); + KStdAction::showMenubar(m_quanta, TQT_SLOT(slotShowMenuBar()), ac, "options_show_menubar"); + KStdAction::keyBindings(m_quanta, TQT_SLOT( slotOptionsConfigureKeys() ), ac, "configure_shortcuts"); + KStdAction::configureToolbars( m_quanta, TQT_SLOT( slotOptionsConfigureToolbars() ), ac, "options_configure_toolbars"); + KStdAction::preferences(m_quanta, TQT_SLOT( slotOptions() ), ac, "general_options"); + new KAction(i18n("Configure Pre&view..."), SmallIcon("konqueror"), 0, m_quanta, TQT_SLOT(slotPreviewOptions()), ac, "preview_options"); // Toolbars actions m_quanta->projectToolbarFiles = new KRecentFilesAction(i18n("Load &Project Toolbar"),0, - m_quanta, SLOT(slotLoadToolbarFile(const KURL&)), + m_quanta, TQT_SLOT(slotLoadToolbarFile(const KURL&)), ac, "toolbars_load_project"); - new KAction(i18n("Load &Global Toolbar..."), 0, m_quanta, SLOT(slotLoadGlobalToolbar()), ac, "toolbars_load_global"); - new KAction(i18n("Load &Local Toolbar..."), 0, m_quanta, SLOT(slotLoadToolbar()), ac, "toolbars_load_user"); - new KAction(i18n("Save as &Local Toolbar..."), 0, m_quanta, SLOT(slotSaveLocalToolbar()), ac, "toolbars_save_local"); - new KAction(i18n("Save as &Project Toolbar..."), 0, m_quanta, SLOT(slotSaveProjectToolbar()), ac, "toolbars_save_project"); - new KAction(i18n("&New User Toolbar..."), 0, m_quanta, SLOT(slotAddToolbar()), ac, "toolbars_add"); - new KAction(i18n("&Remove User Toolbar..."), 0, m_quanta, SLOT(slotRemoveToolbar()), ac, "toolbars_remove"); - new KAction(i18n("Re&name User Toolbar..."), 0, m_quanta, SLOT(slotRenameToolbar()), ac, "toolbars_rename"); - new KAction(i18n("Send Toolbar in E&mail..."), "mail_send", 0, m_quanta, SLOT(slotSendToolbar()), ac, "toolbars_send"); - new KAction(i18n("&Upload Toolbar..." ), "network", 0, m_quanta, SLOT(slotUploadToolbar()), ac, "toolbars_upload" ); - new KAction(i18n("&Download Toolbar..." ), "network", 0, m_quanta, SLOT(slotDownloadToolbar()), ac, "toolbars_download" ); + new KAction(i18n("Load &Global Toolbar..."), 0, m_quanta, TQT_SLOT(slotLoadGlobalToolbar()), ac, "toolbars_load_global"); + new KAction(i18n("Load &Local Toolbar..."), 0, m_quanta, TQT_SLOT(slotLoadToolbar()), ac, "toolbars_load_user"); + new KAction(i18n("Save as &Local Toolbar..."), 0, m_quanta, TQT_SLOT(slotSaveLocalToolbar()), ac, "toolbars_save_local"); + new KAction(i18n("Save as &Project Toolbar..."), 0, m_quanta, TQT_SLOT(slotSaveProjectToolbar()), ac, "toolbars_save_project"); + new KAction(i18n("&New User Toolbar..."), 0, m_quanta, TQT_SLOT(slotAddToolbar()), ac, "toolbars_add"); + new KAction(i18n("&Remove User Toolbar..."), 0, m_quanta, TQT_SLOT(slotRemoveToolbar()), ac, "toolbars_remove"); + new KAction(i18n("Re&name User Toolbar..."), 0, m_quanta, TQT_SLOT(slotRenameToolbar()), ac, "toolbars_rename"); + new KAction(i18n("Send Toolbar in E&mail..."), "mail_send", 0, m_quanta, TQT_SLOT(slotSendToolbar()), ac, "toolbars_send"); + new KAction(i18n("&Upload Toolbar..." ), "network", 0, m_quanta, TQT_SLOT(slotUploadToolbar()), ac, "toolbars_upload" ); + new KAction(i18n("&Download Toolbar..." ), "network", 0, m_quanta, TQT_SLOT(slotDownloadToolbar()), ac, "toolbars_download" ); KToggleAction *toggle = new KToggleAction( i18n("Smart Tag Insertion"), 0, ac, "smart_tag_insertion"); - connect(toggle, SIGNAL(toggled(bool)), m_quanta, SLOT(slotSmartTagInsertion())); + connect(toggle, TQT_SIGNAL(toggled(bool)), m_quanta, TQT_SLOT(slotSmartTagInsertion())); m_quanta->showDTDToolbar=new KToggleAction(i18n("Show DTD Toolbar"), 0, ac, "view_dtd_toolbar"); - connect(m_quanta->showDTDToolbar, SIGNAL(toggled(bool)), m_quanta, SLOT(slotToggleDTDToolbar(bool))); + connect(m_quanta->showDTDToolbar, TQT_SIGNAL(toggled(bool)), m_quanta, TQT_SLOT(slotToggleDTDToolbar(bool))); m_quanta->showDTDToolbar->setCheckedState(i18n("Hide DTD Toolbar")); new KAction(i18n("Complete Text"), CTRL+Key_Space, - m_quanta, SLOT(slotShowCompletion()), ac,"show_completion"); + m_quanta, TQT_SLOT(slotShowCompletion()), ac,"show_completion"); new KAction(i18n("Completion Hints"), CTRL+SHIFT+Key_Space, - m_quanta, SLOT(slotShowCompletionHint()), ac,"show_completion_hint"); + m_quanta, TQT_SLOT(slotShowCompletionHint()), ac,"show_completion_hint"); - KStdAction::back(m_quanta, SLOT( slotBack() ), ac, "w_back"); - KStdAction::forward(m_quanta, SLOT( slotForward() ), ac, "w_forward"); + KStdAction::back(m_quanta, TQT_SLOT( slotBack() ), ac, "w_back"); + KStdAction::forward(m_quanta, TQT_SLOT( slotForward() ), ac, "w_forward"); - new KAction(i18n("Open File: none"), 0, m_quanta, SLOT(slotOpenFileUnderCursor()), ac, "open_file_under_cursor"); - new KAction(i18n("Upload..."), 0, m_quanta, SLOT(slotUploadFile()), ac, "upload_file"); - new KAction(i18n("Delete File"), 0, m_quanta, SLOT(slotDeleteFile()), ac, "delete_file"); + new KAction(i18n("Open File: none"), 0, m_quanta, TQT_SLOT(slotOpenFileUnderCursor()), ac, "open_file_under_cursor"); + new KAction(i18n("Upload..."), 0, m_quanta, TQT_SLOT(slotUploadFile()), ac, "upload_file"); + new KAction(i18n("Delete File"), 0, m_quanta, TQT_SLOT(slotDeleteFile()), ac, "delete_file"); - QString ss = i18n("Upload Opened Project Files..."); -/* new KAction(i18n("Upload Opened Project Files"), 0, m_quanta, SLOT(slotUploadOpenedFiles()), ac, "upload_opened_files"); */ + TQString ss = i18n("Upload Opened Project Files..."); +/* new KAction(i18n("Upload Opened Project Files"), 0, m_quanta, TQT_SLOT(slotUploadOpenedFiles()), ac, "upload_opened_files"); */ - QString error; + TQString error; int el, ec; - m_quanta->m_actions = new QDomDocument(); + m_quanta->m_actions = new TQDomDocument(); //load the global actions - QFile f(qConfig.globalDataDir + resourceDir + "actions.rc"); + TQFile f(qConfig.globalDataDir + resourceDir + "actions.rc"); if ( f.open( IO_ReadOnly )) { if (m_quanta->m_actions->setContent(&f, &error, &el, &ec)) { - QDomElement docElem = m_quanta->m_actions->documentElement(); + TQDomElement docElem = m_quanta->m_actions->documentElement(); - QDomNode n = docElem.firstChild(); + TQDomNode n = docElem.firstChild(); while( !n.isNull() ) { - QDomElement e = n.toElement(); // try to convert the node to an element. + TQDomElement e = n.toElement(); // try to convert the node to an element. if( !e.isNull() ) { // the node was really an element. bool toggable = (e.attribute("toggable", "") == "true"); new TagAction(&e, m_quanta, toggable); @@ -963,12 +963,12 @@ void QuantaInit::initActions() n = n.nextSibling(); } } else - kdError(24000) << QString("Error %1 at (%2, %3) in %4").arg(error).arg(el).arg(ec).arg(f.name()) << endl; + kdError(24000) << TQString("Error %1 at (%2, %3) in %4").arg(error).arg(el).arg(ec).arg(f.name()) << endl; f.close(); } m_quanta->m_actions->clear(); //read the user defined actions - QString s = locateLocal("appdata","actions.rc"); + TQString s = locateLocal("appdata","actions.rc"); if (!s.isEmpty()) { f.setName(s); @@ -976,11 +976,11 @@ void QuantaInit::initActions() { if (m_quanta->m_actions->setContent(&f, &error, &el, &ec)) { - QDomElement docElem = m_quanta->m_actions->documentElement(); + TQDomElement docElem = m_quanta->m_actions->documentElement(); - QDomNode n = docElem.firstChild(); + TQDomNode n = docElem.firstChild(); while( !n.isNull() ) { - QDomElement e = n.toElement(); // try to convert the node to an element. + TQDomElement e = n.toElement(); // try to convert the node to an element. if( !e.isNull()) { // the node was really an element. delete ac->action(e.attribute("name")); @@ -990,7 +990,7 @@ void QuantaInit::initActions() n = n.nextSibling(); } } else - kdError(24000) << QString("Error %1 at (%2, %3) in %4").arg(error).arg(el).arg(ec).arg(f.name()) << endl; + kdError(24000) << TQString("Error %1 at (%2, %3) in %4").arg(error).arg(el).arg(ec).arg(f.name()) << endl; f.close(); } } else @@ -1001,16 +1001,16 @@ void QuantaInit::initActions() // create the preview action m_quanta->showPreviewAction = new KToolBarPopupAction( i18n( "&Preview" ), "preview", Key_F6, - m_quanta, SLOT( slotToggleShowPreview() ), + m_quanta, TQT_SLOT( slotToggleShowPreview() ), ac, "show_preview" ); KAction *act = new KAction( i18n( "Preview Without Frames" ), "", 0, - m_quanta, SLOT(slotShowNoFramesPreview()), + m_quanta, TQT_SLOT(slotShowNoFramesPreview()), ac, "show_preview_no_frames" ); act->plug(m_quanta->showPreviewAction->popupMenu()); act = new KAction( i18n( "View with &Konqueror" ), "konqueror", Key_F12, - m_quanta, SLOT( slotViewInKFM() ), + m_quanta, TQT_SLOT( slotViewInKFM() ), ac, "view_with_konqueror" ); act->plug(m_quanta->showPreviewAction->popupMenu()); @@ -1032,62 +1032,62 @@ void QuantaInit::initActions() act->plug(m_quanta->showPreviewAction->popupMenu()); act = new KAction( i18n( "View with L&ynx" ), "terminal", 0, - m_quanta, SLOT( slotViewInLynx() ), + m_quanta, TQT_SLOT( slotViewInLynx() ), ac, "view_with_lynx" ); act->plug(m_quanta->showPreviewAction->popupMenu()); (void) new KAction( i18n( "Table Editor..." ), "quick_table", 0, - m_quanta, SLOT( slotTagEditTable() ), + m_quanta, TQT_SLOT( slotTagEditTable() ), ac, "tag_edit_table" ); (void) new KAction( i18n( "Quick List..." ), "quick_list", 0, - m_quanta, SLOT( slotTagQuickList() ), + m_quanta, TQT_SLOT( slotTagQuickList() ), ac, "tag_quick_list" ); (void) new KAction( i18n( "Color..." ), "colorize", CTRL+SHIFT+Key_C, - m_quanta, SLOT( slotTagColor() ), + m_quanta, TQT_SLOT( slotTagColor() ), ac, "tag_color" ); (void) new KAction( i18n( "Email..." ), "tag_mail", 0, - m_quanta, SLOT( slotTagMail() ), + m_quanta, TQT_SLOT( slotTagMail() ), ac, "tag_mail" ); (void) new KAction( i18n( "Misc. Tag..." ), "tag_misc", CTRL+SHIFT+Key_T, - m_quanta, SLOT( slotTagMisc() ), + m_quanta, TQT_SLOT( slotTagMisc() ), ac, "tag_misc" ); (void) new KAction( i18n( "Frame Wizard..." ), "frame", 0, - m_quanta, SLOT( slotFrameWizard() ), + m_quanta, TQT_SLOT( slotFrameWizard() ), ac, "tag_frame_wizard" ); (void) new KAction( i18n( "Paste &HTML Quoted" ), "editpaste", 0, - m_quanta, SLOT( slotPasteHTMLQuoted() ), + m_quanta, TQT_SLOT( slotPasteHTMLQuoted() ), ac, "edit_paste_html_quoted" ); (void) new KAction( i18n( "Paste &URL Encoded" ), "editpaste", 0, - m_quanta, SLOT( slotPasteURLEncoded() ), + m_quanta, TQT_SLOT( slotPasteURLEncoded() ), ac, "edit_paste_url_encoded" ); (void) new KAction( i18n( "Insert CSS..." ),"css", 0, - m_quanta, SLOT( slotInsertCSS() ), + m_quanta, TQT_SLOT( slotInsertCSS() ), ac, "insert_css" ); // special-character combo KAction* char_action = new KAction( i18n( "Insert Special Character" ), "charset", 0, ac, "insert_char" ); - connect( char_action, SIGNAL(activated()), - m_quanta, SLOT(slotInsertChar()) ); + connect( char_action, TQT_SIGNAL(activated()), + m_quanta, TQT_SLOT(slotInsertChar()) ); - connect(m_quanta, SIGNAL(eventHappened(const QString&, const QString&, const QString& )), QPEvents::ref(m_quanta), SLOT(slotEventHappened(const QString&, const QString&, const QString& ))); - connect(m_quanta->doc(), SIGNAL(eventHappened(const QString&, const QString&, const QString& )), QPEvents::ref(m_quanta), SLOT(slotEventHappened(const QString&, const QString&, const QString& ))); - connect(ViewManager::ref(), SIGNAL(eventHappened(const QString&, const QString&, const QString& )), QPEvents::ref(m_quanta), SLOT(slotEventHappened(const QString&, const QString&, const QString& ))); + connect(m_quanta, TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), QPEvents::ref(m_quanta), TQT_SLOT(slotEventHappened(const TQString&, const TQString&, const TQString& ))); + connect(m_quanta->doc(), TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), QPEvents::ref(m_quanta), TQT_SLOT(slotEventHappened(const TQString&, const TQString&, const TQString& ))); + connect(ViewManager::ref(), TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), QPEvents::ref(m_quanta), TQT_SLOT(slotEventHappened(const TQString&, const TQString&, const TQString& ))); QuantaBookmarks *m_bookmarks = new QuantaBookmarks(ViewManager::ref(m_quanta)); m_bookmarks->createActions(ac); - connect(m_bookmarks, SIGNAL(gotoFileAndLine(const QString&, int, int)), m_quanta, SLOT(gotoFileAndLine(const QString&, int, int))); + connect(m_bookmarks, TQT_SIGNAL(gotoFileAndLine(const TQString&, int, int)), m_quanta, TQT_SLOT(gotoFileAndLine(const TQString&, int, int))); } /** Initialize the plugin architecture. */ @@ -1097,10 +1097,10 @@ void QuantaInit::initPlugins() m_quanta->m_pluginInterface = QuantaPluginInterface::ref(m_quanta); - connect(m_quanta->m_pluginInterface, SIGNAL(hideSplash()), - m_quanta, SLOT(slotHideSplash())); - connect(m_quanta->m_pluginInterface, SIGNAL(statusMsg(const QString &)), - m_quanta, SLOT(slotStatusMsg(const QString & ))); + connect(m_quanta->m_pluginInterface, TQT_SIGNAL(hideSplash()), + m_quanta, TQT_SLOT(slotHideSplash())); + connect(m_quanta->m_pluginInterface, TQT_SIGNAL(statusMsg(const TQString &)), + m_quanta, TQT_SLOT(slotStatusMsg(const TQString & ))); m_quanta->m_pluginInterface->readConfig(); if (!m_quanta->m_pluginInterface->pluginAvailable("KFileReplace")) @@ -1110,15 +1110,15 @@ void QuantaInit::initPlugins() } -void QuantaInit::recoverCrashed(QStringList& recoveredFileNameList) +void QuantaInit::recoverCrashed(TQStringList& recoveredFileNameList) { m_quanta->m_doc->blockSignals(true); execCommandPS("ps -C quanta -C quanta_be -o pid --no-headers"); - m_PIDlist = QStringList::split("\n", m_quanta->m_scriptOutput); + m_PIDlist = TQStringList::split("\n", m_quanta->m_scriptOutput); m_config->setGroup("Projects"); - QString pu = QuantaCommon::readPathEntry(m_config, "Last Project"); + TQString pu = QuantaCommon::readPathEntry(m_config, "Last Project"); KURL u; QuantaCommon::setUrl(u, pu); @@ -1131,18 +1131,18 @@ void QuantaInit::recoverCrashed(QStringList& recoveredFileNameList) m_config->reparseConfiguration(); m_config->setGroup("General Options"); - QStringList backedUpUrlsList = QuantaCommon::readPathListEntry(m_config, "List of backedup files"); - QStringList autosavedUrlsList = QuantaCommon::readPathListEntry(m_config, "List of autosaved files"); + TQStringList backedUpUrlsList = QuantaCommon::readPathListEntry(m_config, "List of backedup files"); + TQStringList autosavedUrlsList = QuantaCommon::readPathListEntry(m_config, "List of autosaved files"); - QStringList::ConstIterator backedUpUrlsEndIt = backedUpUrlsList.constEnd(); - for (QStringList::ConstIterator backedUpUrlsIt = backedUpUrlsList.constBegin(); + TQStringList::ConstIterator backedUpUrlsEndIt = backedUpUrlsList.constEnd(); + for (TQStringList::ConstIterator backedUpUrlsIt = backedUpUrlsList.constBegin(); backedUpUrlsIt != backedUpUrlsEndIt; ++backedUpUrlsIt ) { // when quanta crashes and file autoreloading option is on // then if user restarts quanta, the backup copies will reload - QString backedUpFileName = (*backedUpUrlsIt).left((*backedUpUrlsIt).findRev(".")); //the filename without the PID + TQString backedUpFileName = (*backedUpUrlsIt).left((*backedUpUrlsIt).findRev(".")); //the filename without the PID bool notFound; - QString autosavedPath = searchPathListEntry(backedUpFileName, autosavedUrlsList, notFound); + TQString autosavedPath = searchPathListEntry(backedUpFileName, autosavedUrlsList, notFound); if (!autosavedPath.isEmpty()) //the current item was autosaved and is not in use by another Quanta { KURL originalVersion; @@ -1158,16 +1158,16 @@ void QuantaInit::recoverCrashed(QStringList& recoveredFileNameList) KIO::UDSEntry entry; KIO::NetAccess::stat(originalVersion, entry, m_quanta); KFileItem* item= new KFileItem(entry, originalVersion, false, true); - QString origTime = item->timeString(); + TQString origTime = item->timeString(); KIO::filesize_t origSize = item->size(); delete item; KIO::NetAccess::stat(autosavedVersion, entry, m_quanta); item= new KFileItem(entry, autosavedVersion, false, true); - QString backupTime = item->timeString(); + TQString backupTime = item->timeString(); KIO::filesize_t backupSize = item->size(); delete item; - if (QFileInfo(autosavedPath).exists()) //if the backup file exists + if (TQFileInfo(autosavedPath).exists()) //if the backup file exists { emit hideSplash(); DirtyDlg *dlg = new DirtyDlg(autosavedVersion.path(), originalVersion.path(), false, m_quanta); @@ -1198,7 +1198,7 @@ void QuantaInit::recoverCrashed(QStringList& recoveredFileNameList) { //backup the current version and restore it from the autosaved backup KURL backupURL = originalVersion; - backupURL.setPath(backupURL.path() + "." + QString::number(getpid(),10) + ".backup"); + backupURL.setPath(backupURL.path() + "." + TQString::number(getpid(),10) + ".backup"); QExtFileInfo::copy(originalVersion, backupURL, -1, true, false, m_quanta); QExtFileInfo::copy(autosavedVersion, originalVersion, -1, true, false, m_quanta); //we save a list of autosaved file names so "KQApplicationPrivate::init()" @@ -1211,13 +1211,13 @@ void QuantaInit::recoverCrashed(QStringList& recoveredFileNameList) recoveredFileNameList += backedUpFileName; } delete dlg; - QFile::remove(autosavedPath); //we don't need the backup anymore + TQFile::remove(autosavedPath); //we don't need the backup anymore } } //remove the auto-backup file from the list m_config->setGroup("General Options"); - QStringList autosavedFilesEntryList = QuantaCommon::readPathListEntry(m_config, "List of autosaved files"); - QStringList::Iterator entryIt = autosavedFilesEntryList.begin(); + TQStringList autosavedFilesEntryList = QuantaCommon::readPathListEntry(m_config, "List of autosaved files"); + TQStringList::Iterator entryIt = autosavedFilesEntryList.begin(); while(entryIt != autosavedFilesEntryList.end()) { if ((*entryIt) == KURL::fromPathOrURL(autosavedPath).url()) @@ -1235,8 +1235,8 @@ void QuantaInit::recoverCrashed(QStringList& recoveredFileNameList) //remove processed items m_config->setGroup("General Options"); - QStringList backedupFilesEntryList = QuantaCommon::readPathListEntry(m_config, "List of backedup files"); - QStringList::Iterator entryIt = backedupFilesEntryList.begin(); + TQStringList backedupFilesEntryList = QuantaCommon::readPathListEntry(m_config, "List of backedup files"); + TQStringList::Iterator entryIt = backedupFilesEntryList.begin(); while (entryIt != backedupFilesEntryList.end()) { if ((*entryIt) == (*backedUpUrlsIt)) @@ -1249,15 +1249,15 @@ void QuantaInit::recoverCrashed(QStringList& recoveredFileNameList) } //clean up auto-backup list, just in case of an old Quanta was used before - QStringList::Iterator entryIt = autosavedUrlsList.begin(); + TQStringList::Iterator entryIt = autosavedUrlsList.begin(); while (entryIt != autosavedUrlsList.end()) { - QString quPID = retrievePID((*entryIt)); + TQString quPID = retrievePID((*entryIt)); //check if the file is opened by another running Quanta or not bool isOrphan = true; - QStringList::ConstIterator PIDEndIt = m_PIDlist.constEnd(); - for (QStringList::ConstIterator PIDIt = m_PIDlist.constBegin(); PIDIt != PIDEndIt; ++PIDIt ) + TQStringList::ConstIterator PIDEndIt = m_PIDlist.constEnd(); + for (TQStringList::ConstIterator PIDIt = m_PIDlist.constBegin(); PIDIt != PIDEndIt; ++PIDIt ) { if ((*PIDIt) == quPID && qConfig.quantaPID != quPID) { @@ -1276,20 +1276,20 @@ void QuantaInit::recoverCrashed(QStringList& recoveredFileNameList) } - void QuantaInit::execCommandPS(const QString& cmd) + void QuantaInit::execCommandPS(const TQString& cmd) { //We create a KProcess that executes the "ps" *nix command to get the PIDs of the //other instances of quanta actually running KProcess *execCommand = new KProcess(); - *(execCommand) << QStringList::split(" ",cmd); + *(execCommand) << TQStringList::split(" ",cmd); - connect(execCommand, SIGNAL(receivedStdout(KProcess*,char*,int)), - m_quanta, SLOT(slotGetScriptOutput(KProcess*,char*,int))); - connect(execCommand, SIGNAL(receivedStderr(KProcess*,char*,int)), - m_quanta, SLOT(slotGetScriptError(KProcess*,char*,int))); - connect(execCommand, SIGNAL(processExited(KProcess*)), - m_quanta, SLOT(slotProcessExited(KProcess*))); + connect(execCommand, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)), + m_quanta, TQT_SLOT(slotGetScriptOutput(KProcess*,char*,int))); + connect(execCommand, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)), + m_quanta, TQT_SLOT(slotGetScriptError(KProcess*,char*,int))); + connect(execCommand, TQT_SIGNAL(processExited(KProcess*)), + m_quanta, TQT_SLOT(slotProcessExited(KProcess*))); if (!execCommand->start(KProcess::NotifyOnExit,KProcess::All)) { @@ -1298,9 +1298,9 @@ void QuantaInit::recoverCrashed(QStringList& recoveredFileNameList) else { //To avoid lock-ups, start a timer. - QTimer *timer = new QTimer(m_quanta); - connect(timer, SIGNAL(timeout()), - m_quanta, SLOT(slotProcessTimeout())); + TQTimer *timer = new TQTimer(m_quanta); + connect(timer, TQT_SIGNAL(timeout()), + m_quanta, TQT_SLOT(slotProcessTimeout())); timer->start(180*1000, true); QExtFileInfo internalFileInfo; m_quanta->m_loopStarted = true; @@ -1310,21 +1310,21 @@ void QuantaInit::recoverCrashed(QStringList& recoveredFileNameList) } - QString QuantaInit::searchPathListEntry(const QString& url, const QStringList& autosavedUrlsList, bool ¬Found) + TQString QuantaInit::searchPathListEntry(const TQString& url, const TQStringList& autosavedUrlsList, bool ¬Found) { - QString backedUpUrlHashedPath = retrieveHashedPath('.' + Document::hashFilePath(url)); + TQString backedUpUrlHashedPath = retrieveHashedPath('.' + Document::hashFilePath(url)); notFound = true; - QStringList::ConstIterator autosavedUrlsEndIt = autosavedUrlsList.constEnd(); - for (QStringList::ConstIterator autosavedUrlsIt = autosavedUrlsList.constBegin(); + TQStringList::ConstIterator autosavedUrlsEndIt = autosavedUrlsList.constEnd(); + for (TQStringList::ConstIterator autosavedUrlsIt = autosavedUrlsList.constBegin(); autosavedUrlsIt != autosavedUrlsEndIt; ++autosavedUrlsIt) { - QString quPID = retrievePID((*autosavedUrlsIt)); + TQString quPID = retrievePID((*autosavedUrlsIt)); //check if the file is opened by another running Quanta or not bool isOrphan = true; - QStringList::ConstIterator PIDEndIt = m_PIDlist.constEnd(); - for (QStringList::ConstIterator PIDIt = m_PIDlist.constBegin(); PIDIt != PIDEndIt; ++PIDIt ) + TQStringList::ConstIterator PIDEndIt = m_PIDlist.constEnd(); + for (TQStringList::ConstIterator PIDIt = m_PIDlist.constBegin(); PIDIt != PIDEndIt; ++PIDIt ) { if ((*PIDIt) == quPID && qConfig.quantaPID != quPID) { @@ -1341,11 +1341,11 @@ void QuantaInit::recoverCrashed(QStringList& recoveredFileNameList) } } - return QString::null; + return TQString::null; } /** Retrieves hashed path from the name of a backup file */ -QString QuantaInit::retrieveHashedPath(const QString& filename) +TQString QuantaInit::retrieveHashedPath(const TQString& filename) { int lastPoint = filename.findRev("."); int Ppos = filename.find("P", lastPoint); @@ -1355,9 +1355,9 @@ QString QuantaInit::retrieveHashedPath(const QString& filename) /** Retrieves PID from the name of a backup file */ -QString QuantaInit::retrievePID(const QString& filename) +TQString QuantaInit::retrievePID(const TQString& filename) { - QString strPID = QString::null; + TQString strPID = TQString::null; strPID = filename.mid(filename.findRev("P") + 1); if (strPID.isEmpty()) @@ -1385,10 +1385,10 @@ void QuantaInit::loadVPLConfig() } struct Dependency{ - QString name; - QString execName; - QString url; - QString description; + TQString name; + TQString execName; + TQString url; + TQString description; enum Type{ Executable = 0, Plugin @@ -1399,7 +1399,7 @@ struct Dependency{ void QuantaInit::checkRuntimeDependencies() { - QValueList<Dependency> dependencies; + TQValueList<Dependency> dependencies; Dependency dependency; dependency.name = "Kommander"; dependency.execName = "kmdr-executor"; @@ -1474,40 +1474,40 @@ void QuantaInit::checkRuntimeDependencies() dependency.type = Dependency::Plugin; dependencies.append(dependency); - QString errorStr; - QString stdErrorMsg = i18n("<br><b>- %1</b> [<i>%2</i>] - %3 will not be available;"); - for (QValueList<Dependency>::ConstIterator it = dependencies.constBegin(); it != dependencies.constEnd(); ++it) + TQString errorStr; + TQString stdErrorMsg = i18n("<br><b>- %1</b> [<i>%2</i>] - %3 will not be available;"); + for (TQValueList<Dependency>::ConstIterator it = dependencies.constBegin(); it != dependencies.constEnd(); ++it) { dependency = *it; if (dependency.type == Dependency::Executable) { if (KStandardDirs::findExe(dependency.execName).isNull()) - errorStr += QString(stdErrorMsg).arg(dependency.name).arg(dependency.url).arg(dependency.description); + errorStr += TQString(stdErrorMsg).arg(dependency.name).arg(dependency.url).arg(dependency.description); } else if (dependency.type == Dependency::Plugin) { if (!QuantaPlugin::validatePlugin(m_quanta->m_pluginInterface->plugin(dependency.execName))) - errorStr += QString(stdErrorMsg).arg(dependency.name).arg(dependency.url).arg(dependency.description); + errorStr += TQString(stdErrorMsg).arg(dependency.name).arg(dependency.url).arg(dependency.description); } } #ifdef ENABLE_CVSSERVICE - QString error; - QCString appId; + TQString error; + TQCString appId; - KApplication::startServiceByDesktopName("cvsservice", QStringList(), &error, + KApplication::startServiceByDesktopName("cvsservice", TQStringList(), &error, &appId); if (appId.isEmpty()) { - errorStr += QString(stdErrorMsg).arg("Cervisia (cvsservice)").arg("http://www.kde.org/apps/cervisia").arg(i18n("integrated CVS management")); + errorStr += TQString(stdErrorMsg).arg("Cervisia (cvsservice)").arg("http://www.kde.org/apps/cervisia").arg(i18n("integrated CVS management")); } else { CVSService::ref(m_quanta->actionCollection())->setAppId(appId); - connect(CVSService::ref(), SIGNAL(clearMessages()), m_quanta->m_messageOutput, SLOT(clear())); - connect(CVSService::ref(), SIGNAL(showMessage(const QString&, bool)), m_quanta->m_messageOutput, SLOT(showMessage(const QString&, bool))); - connect(CVSService::ref(), SIGNAL(commandExecuted(const QString&, const QStringList&)), m_quanta, SLOT(slotCVSCommandExecuted(const QString&, const QStringList&))); - //connect(CVSService::ref(), SIGNAL(statusMsg(const QString &)), m_quanta, SLOT(slotStatusMsg(const QString & ))); + connect(CVSService::ref(), TQT_SIGNAL(clearMessages()), m_quanta->m_messageOutput, TQT_SLOT(clear())); + connect(CVSService::ref(), TQT_SIGNAL(showMessage(const TQString&, bool)), m_quanta->m_messageOutput, TQT_SLOT(showMessage(const TQString&, bool))); + connect(CVSService::ref(), TQT_SIGNAL(commandExecuted(const TQString&, const TQStringList&)), m_quanta, TQT_SLOT(slotCVSCommandExecuted(const TQString&, const TQStringList&))); + //connect(CVSService::ref(), TQT_SIGNAL(statusMsg(const TQString &)), m_quanta, TQT_SLOT(slotStatusMsg(const TQString & ))); m_quanta->fTab->plugCVSMenu(); pTab->plugCVSMenu(); } @@ -1523,36 +1523,36 @@ void QuantaInit::checkRuntimeDependencies() void QuantaInit::readAbbreviations() { - QDomDocument doc; - QString groupName; + TQDomDocument doc; + TQString groupName; bool mainAbbrevFileFound = false; - QStringList mainFileList; + TQStringList mainFileList; mainFileList << qConfig.globalDataDir + resourceDir + "abbreviations.xml"; mainFileList << KGlobal::dirs()->saveLocation("data") + resourceDir + "abbreviations.xml"; for (uint i = 0; i < mainFileList.count(); i++) { - if (!QFile::exists(mainFileList[i])) + if (!TQFile::exists(mainFileList[i])) continue; - QFile file(mainFileList[i]); + TQFile file(mainFileList[i]); if (file.open(IO_ReadOnly)) { if (doc.setContent(&file)) { - QDomNodeList groupList = doc.elementsByTagName("Group"); + TQDomNodeList groupList = doc.elementsByTagName("Group"); for (uint groupIdx = 0; groupIdx < groupList.count(); groupIdx++) { Abbreviation abbrev; - QDomElement el = groupList.item(groupIdx).toElement(); + TQDomElement el = groupList.item(groupIdx).toElement(); groupName = el.attribute("name"); - QDomNodeList dtepList = el.elementsByTagName("DTEP"); + TQDomNodeList dtepList = el.elementsByTagName("DTEP"); for (uint dtepListIdx = 0; dtepListIdx < dtepList.count(); dtepListIdx++) { abbrev.dteps.append(dtepList.item(dtepListIdx).toElement().attribute("name")); } - QDomNodeList nodeList = el.elementsByTagName("Template"); + TQDomNodeList nodeList = el.elementsByTagName("Template"); for (uint nodeIdx = 0; nodeIdx < nodeList.count(); nodeIdx++) { - QDomElement e = nodeList.item(nodeIdx).toElement(); + TQDomElement e = nodeList.item(nodeIdx).toElement(); abbrev.abbreviations.insert(e.attribute("name")+" "+e.attribute("description"), e.attribute("code")); } qConfig.abbreviations.insert(groupName, abbrev); @@ -1565,19 +1565,19 @@ void QuantaInit::readAbbreviations() if (mainAbbrevFileFound) return; //Compatibility code: read the abbreviations files from the DTEP directories //TODO: Remove when upgrade from 3.2 is not supported. - QStringList filenameList = DTDs::ref()->fileNameList(false); - QStringList::Iterator it; + TQStringList filenameList = DTDs::ref()->fileNameList(false); + TQStringList::Iterator it; for (it = filenameList.begin(); it != filenameList.end(); ++it) { int pos =(*it).find('|'); - QString dirName = (*it).mid(pos + 1); - QString dtepName = (*it).left(pos); + TQString dirName = (*it).mid(pos + 1); + TQString dtepName = (*it).left(pos); KURL dirURL(dirName); dirURL.setFileName(""); dirName = dirURL.path(1); - QString abbrevFile = dirName; - QString tmpStr = dirName; - QStringList resourceDirs = KGlobal::dirs()->resourceDirs("data"); + TQString abbrevFile = dirName; + TQString tmpStr = dirName; + TQStringList resourceDirs = KGlobal::dirs()->resourceDirs("data"); bool dirFound = false; for (uint i = 0; i < resourceDirs.count(); i++) { @@ -1593,18 +1593,18 @@ void QuantaInit::readAbbreviations() abbrevFile = KGlobal::dirs()->saveLocation("data", tmpStr) +"/"; } abbrevFile.append("abbreviations"); - if (!QFile::exists(abbrevFile)) + if (!TQFile::exists(abbrevFile)) abbrevFile = dirName + "abbreviations"; - QFile f(abbrevFile); + TQFile f(abbrevFile); if (f.open(IO_ReadOnly)) { if (doc.setContent(&f)) { Abbreviation abbrev; - QDomNodeList nodeList = doc.elementsByTagName("Template"); + TQDomNodeList nodeList = doc.elementsByTagName("Template"); for (uint i = 0; i < nodeList.count(); i++) { - QDomElement e = nodeList.item(i).toElement(); + TQDomElement e = nodeList.item(i).toElement(); abbrev.abbreviations.insert(e.attribute("name")+" "+e.attribute("description"), e.attribute("code")); } abbrev.dteps.append(dtepName); @@ -1622,7 +1622,7 @@ int QuantaInit::runningQuantas() int i = 0; for (QCStringList::iterator it = list.begin(); it != list.end(); ++it) { - if (QString(*it).startsWith("quanta", false)) + if (TQString(*it).startsWith("quanta", false)) ++i; } return i; |