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.cpp74
1 files changed, 39 insertions, 35 deletions
diff --git a/quanta/src/quanta.cpp b/quanta/src/quanta.cpp
index dba88f38..46a098df 100644
--- a/quanta/src/quanta.cpp
+++ b/quanta/src/quanta.cpp
@@ -15,6 +15,10 @@
* *
***************************************************************************/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <time.h>
// include files for QT
@@ -206,7 +210,7 @@ QuantaApp::QuantaApp(int mdiMode) : DCOPObject("WindowManagerIf"), KMdiMainFrm(
m_quantaInit = new QuantaInit(this);
dcopSettings = new DCOPSettings;
dcopQuanta = new DCOPQuanta;
- DTDs::ref(TQT_TQOBJECT(this));
+ DTDs::ref(this);
quantaStarted = true;
tempFileList.setAutoDelete(true);
m_toolbarList.setAutoDelete(true);
@@ -215,7 +219,7 @@ QuantaApp::QuantaApp(int mdiMode) : DCOPObject("WindowManagerIf"), KMdiMainFrm(
currentToolbarDTD = TQString();
m_config=kapp->config();
idleTimer = new TQTimer(this);
- connect(idleTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotIdleTimerExpired()));
+ connect(idleTimer, TQ_SIGNAL(timeout()), TQ_SLOT(slotIdleTimerExpired()));
m_idleTimerEnabled = true;
qConfig.globalDataDir = TDEGlobal::dirs()->findResourceDir("data",resourceDir + "toolbar/quantalogo.png");
@@ -226,7 +230,7 @@ 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 TDEDIR, TDEDIRS or PATH are not set correctly.") << endl;
kdWarning() << "***************************************************************************" << endl;
- TQTimer::singleShot(20, kapp, TQT_SLOT(quit()));
+ TQTimer::singleShot(20, kapp, TQ_SLOT(quit()));
return;
}
qConfig.enableDTDToolbar = true;
@@ -239,10 +243,10 @@ QuantaApp::QuantaApp(int mdiMode) : DCOPObject("WindowManagerIf"), KMdiMainFrm(
m_partManager = new KParts::PartManager(this);
// When the manager says the active part changes,
// the builder updates (recreates) the GUI
- 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*)));
+ connect(m_partManager, TQ_SIGNAL(activePartChanged(KParts::Part * )),
+ this, TQ_SLOT(slotActivePartChanged(KParts::Part * )));
+ connect(this, TQ_SIGNAL(dockWidgetHasUndocked(KDockWidget *)), this, TQ_SLOT(slotDockWidgetHasUndocked(KDockWidget *)));
+ connect(tabWidget(), TQ_SIGNAL(initiateDrag(TQWidget *)), this, TQ_SLOT(slotTabDragged(TQWidget*)));
m_oldKTextEditor = 0L;
m_previewToolView = 0L;
@@ -258,7 +262,7 @@ QuantaApp::QuantaApp(int mdiMode) : DCOPObject("WindowManagerIf"), KMdiMainFrm(
m_parserEnabled = true;
cursorLine = 0;
cursorCol = 0;
- emit eventHappened("quanta_start", TQDateTime::currentDateTime().toString(Qt::ISODate), TQString());
+ emit eventHappened("quanta_start", TQDateTime::currentDateTime().toString(TQt::ISODate), TQString());
setAcceptDrops(true);
tabWidget()->installEventFilter(this);
}
@@ -276,9 +280,9 @@ QuantaApp::~QuantaApp()
m_newScriptStuff = 0L;
delete m_newDTEPStuff;
m_newDocStuff = 0L;
- // disconnect(m_htmlPart, TQT_SIGNAL(destroyed(TQObject *)));
- // disconnect(m_htmlPartDoc, TQT_SIGNAL(destroyed(TQObject *)));
- disconnect(this, TQT_SIGNAL(lastChildViewClosed()), ViewManager::ref(), TQT_SLOT(slotLastViewClosed()));
+ // disconnect(m_htmlPart, TQ_SIGNAL(destroyed(TQObject *)));
+ // disconnect(m_htmlPartDoc, TQ_SIGNAL(destroyed(TQObject *)));
+ disconnect(this, TQ_SIGNAL(lastChildViewClosed()), ViewManager::ref(), TQ_SLOT(slotLastViewClosed()));
//kdDebug(24000) << "QuantaApp::~QuantaApp" << endl;
#ifdef ENABLE_CVSSERVICE
delete CVSService::ref();
@@ -320,7 +324,7 @@ QuantaApp::~QuantaApp()
tmpDir = tmpDirs[0];
for (uint i = 0; i < tmpDirs.count(); i++)
{
- if (tmpDirs[i].contains("kde-"))
+ if (tmpDirs[i].contains("tde-"))
tmpDir = tmpDirs[i];
}
TQString infoCss = tmpDir;
@@ -1077,7 +1081,7 @@ void QuantaApp::slotConfigureToolbars(const TQString& defaultToolbar)
}
}
- connect(dlg, TQT_SIGNAL(newToolbarConfig()), TQT_SLOT(slotNewToolbarConfig()));
+ connect(dlg, TQ_SIGNAL(newToolbarConfig()), TQ_SLOT(slotNewToolbarConfig()));
dlg->exec();
delete dlg;
TQPopupMenu *menu = 0L;
@@ -1385,8 +1389,8 @@ void QuantaApp::slotShowPreviewWidget(bool show)
if (!m_previewToolView)
{
m_previewToolView= addToolWindow(m_htmlPart->view(), prevDockPosition(m_htmlPart->view(), KDockWidget::DockBottom), getMainDockWidget());
- connect(m_previewToolView->wrapperWidget(), TQT_SIGNAL(iMBeingClosed
-()), this, TQT_SLOT(slotPreviewBeingClosed()));
+ connect(m_previewToolView->wrapperWidget(), TQ_SIGNAL(iMBeingClosed
+()), this, TQ_SLOT(slotPreviewBeingClosed()));
}
m_htmlPart->view()->show();
m_previewToolView->show();
@@ -1790,7 +1794,7 @@ TQWidget* QuantaApp::createContainer( TQWidget *parent, int index, const TQDomEl
if ( element.tagName().lower() == "toolbar" && !tabname.isEmpty())
{
//avoid TQToolBar warning in the log
- TQtMsgHandler oldHandler = tqInstallMsgHandler( silenceTQToolBar );
+ TQtMsgHandler oldHandler = qInstallMsgHandler( silenceTQToolBar );
ToolbarTabWidget *toolbarTab = ToolbarTabWidget::ref();
TQWidget *w = new TQWidget(toolbarTab, TQString("ToolbarHoldingWidget" + element.attribute("name")).ascii());
QuantaToolBar *tb = new QuantaToolBar(w, element.attribute("name").ascii(), true, true);
@@ -1813,12 +1817,12 @@ TQWidget* QuantaApp::createContainer( TQWidget *parent, int index, const TQDomEl
kdDebug(24000) << "toolbarTab->tabHeight() " << toolbarTab->tabHeight() << endl;
*/
toolbarTab->insertTab(tb, tabname, idStr);
- tqInstallMsgHandler( oldHandler );
+ qInstallMsgHandler( oldHandler );
- 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&)));
+ connect(tb, TQ_SIGNAL(removeAction(const TQString&, const TQString&)),
+ TQ_SLOT(slotRemoveAction(const TQString&, const TQString&)));
+ connect(tb, TQ_SIGNAL(editAction(const TQString&)),
+ TQ_SLOT(slotEditAction(const TQString&)));
return tb;
}
@@ -3690,7 +3694,7 @@ void QuantaApp::slotDownloadDoc()
if (!m_newDocStuff)
{
m_newDocStuff = new QNewDocStuff("quanta documentation", this);
- connect(m_newDocStuff, TQT_SIGNAL(installFinished()), dTab, TQT_SLOT(slotRefreshTree()));
+ connect(m_newDocStuff, TQ_SIGNAL(installFinished()), dTab, TQ_SLOT(slotRefreshTree()));
}
m_newDocStuff->downloadResource();
}
@@ -4043,7 +4047,7 @@ void QuantaApp::slotReloadStructTreeView(bool groupOnly)
n->next->tag->beginPos(l, c);
else
n->tag->endPos(l, c);
- commentTag->write()->addAnnotation(l, tqMakePair(text, receiver));
+ commentTag->write()->addAnnotation(l, qMakePair(text, receiver));
}
}
node = node->nextSibling();
@@ -4141,7 +4145,7 @@ bool QuantaApp::queryClose()
{
saveOptions();
// kdDebug(24000) << "Quanta will exit" << endl;
- emit eventHappened("quanta_exit", TQDateTime::currentDateTime().toString(Qt::ISODate), TQString());
+ emit eventHappened("quanta_exit", TQDateTime::currentDateTime().toString(TQt::ISODate), TQString());
} else
slotFileNew();
return canExit;
@@ -4767,7 +4771,7 @@ void QuantaApp::slotViewInKFM()
}
if ( !w->isUntitled() )
{
- TDEProcess *show = new TDEProcess(TQT_TQOBJECT(this));
+ TDEProcess *show = new TDEProcess(this);
KURL url = Project::ref()->urlWithPrefix(w->url());
*show << "kfmclient" << "newTab" << url.url();
show->start( TDEProcess::DontCare );
@@ -4801,7 +4805,7 @@ void QuantaApp::slotViewInLynx()
}
if ( !w->isUntitled() )
{
- TDEProcess *show = new TDEProcess(TQT_TQOBJECT(this));
+ TDEProcess *show = new TDEProcess(this);
KURL url = Project::ref()->urlWithPrefix(w->url());
*show << "konsole"
<< "--nohist"
@@ -5088,8 +5092,8 @@ void QuantaApp::initTabWidget(bool closeButtonsOnly)
{
tab->setTabReorderingEnabled(true);
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);
+ connect(tab, TQ_SIGNAL( contextMenu( TQWidget *, const TQPoint & ) ), ViewManager::ref(), TQ_SLOT(slotTabContextMenu( TQWidget *, const TQPoint & ) ) );
+ connect(tab, TQ_SIGNAL(initiateTabMove(int, int)), this, TQ_SLOT(slotTabAboutToMove(int, int))); connect(tab, TQ_SIGNAL(movedTab(int, int)), this, TQ_SLOT(slotTabMoved(int, int))); setTabWidgetVisibility(KMdi::AlwaysShowTabs);
}
}
if (!closeButtonsOnly)
@@ -5263,10 +5267,10 @@ void QuantaApp::createPreviewPart()
m_htmlPart->view()->setIcon(UserIcon("preview"));
m_htmlPart->view()->setCaption(i18n("Preview"));
slotNewPart(m_htmlPart, false);
- 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)));
+ connect(m_htmlPart, TQ_SIGNAL(previewHasFocus(bool)), this, TQ_SLOT(slotPreviewHasFocus(bool)));
+ connect(m_htmlPart, TQ_SIGNAL(destroyed(TQObject *)), this, TQ_SLOT(slotHTMLPartDeleted(TQObject *)));
+ connect(m_htmlPart, TQ_SIGNAL(openFile(const KURL&, const TQString&, bool)), this, TQ_SLOT(slotFileOpen(const KURL&, const TQString&, bool)));
+ connect(m_htmlPart, TQ_SIGNAL(showPreview(bool)), this, TQ_SLOT(slotShowPreviewWidget(bool)));
}
@@ -5277,7 +5281,7 @@ void QuantaApp::createDocPart()
m_htmlPartDoc->view()->setIcon(SmallIcon("contents"));
m_htmlPartDoc->view()->setCaption(i18n("Documentation"));
slotNewPart(m_htmlPartDoc, false);
- connect(m_htmlPartDoc, TQT_SIGNAL(destroyed(TQObject *)), this, TQT_SLOT(slotHTMLPartDeleted(TQObject *)));
+ connect(m_htmlPartDoc, TQ_SIGNAL(destroyed(TQObject *)), this, TQ_SLOT(slotHTMLPartDeleted(TQObject *)));
}
void QuantaApp::insertTagActionPoolItem(TQString const& action_item)
@@ -5316,14 +5320,14 @@ void QuantaApp::slotTabMoved(int from, int to)
KMdiChildView *view = m_pDocumentViews->at(from);
m_pDocumentViews->remove(from);
m_pDocumentViews->insert(to, view);
- connect(this, TQT_SIGNAL(viewActivated (KMdiChildView *)), ViewManager::ref(), TQT_SLOT(slotViewActivated(KMdiChildView*)));
+ connect(this, TQ_SIGNAL(viewActivated (KMdiChildView *)), ViewManager::ref(), TQ_SLOT(slotViewActivated(KMdiChildView*)));
}
void QuantaApp::slotTabAboutToMove(int from, int to)
{
Q_UNUSED(from);
Q_UNUSED(to);
- disconnect(this, TQT_SIGNAL(viewActivated (KMdiChildView *)), ViewManager::ref(), TQT_SLOT(slotViewActivated(KMdiChildView*)));
+ disconnect(this, TQ_SIGNAL(viewActivated (KMdiChildView *)), ViewManager::ref(), TQ_SLOT(slotViewActivated(KMdiChildView*)));
}
TQString QuantaApp::currentURL() const