summaryrefslogtreecommitdiffstats
path: root/quanta/src/viewmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'quanta/src/viewmanager.cpp')
-rw-r--r--quanta/src/viewmanager.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/quanta/src/viewmanager.cpp b/quanta/src/viewmanager.cpp
index 5d9ea103..152063c8 100644
--- a/quanta/src/viewmanager.cpp
+++ b/quanta/src/viewmanager.cpp
@@ -61,7 +61,7 @@
#define UPLOAD_ID 12
#define DELETE_ID 13
-ViewManager::ViewManager(TQObject *parent, const char *name) : TQObject(parent, name)
+ViewManager::ViewManager(TQObject *tqparent, const char *name) : TQObject(tqparent, name)
{
m_lastActiveView = 0L;
m_lastActiveEditorView = 0L;
@@ -95,11 +95,11 @@ QuantaView* ViewManager::createView(const TQString &caption)
connect(view, TQT_SIGNAL(cursorPositionChanged()), quantaApp, TQT_SLOT(slotNewLineColumn()));
connect(view, TQT_SIGNAL(title(const TQString &)), quantaApp, TQT_SLOT(slotNewLineColumn()));
connect(view, TQT_SIGNAL(dragInsert(TQDropEvent*)), this, TQT_SIGNAL(dragInsert(TQDropEvent *)));
- connect(view, TQT_SIGNAL(hidePreview()), quantaApp, TQT_SLOT(slotChangePreviewStatus()));
+ connect(view, TQT_SIGNAL(hidePreview()), quantaApp, TQT_SLOT(slotChangePreviewtqStatus()));
disconnect(view, TQT_SIGNAL(childWindowCloseRequest( KMdiChildView *)), 0, 0 );
connect(view, TQT_SIGNAL(childWindowCloseRequest( KMdiChildView*)), this, TQT_SLOT(slotCloseRequest(KMdiChildView*)));
connect(view, TQT_SIGNAL(documentClosed(const KURL&)), this, TQT_SLOT(slotDocumentClosed(const KURL&)));
- connect(view, TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), QPEvents::ref(), TQT_SLOT(slotEventHappened(const TQString&, const TQString&, const TQString& )));
+ connect(view, TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), TQPEvents::ref(), TQT_SLOT(slotEventHappened(const TQString&, const TQString&, const TQString& )));
return view;
}
@@ -107,8 +107,8 @@ QuantaView* ViewManager::createView(const TQString &caption)
void ViewManager::createNewDocument()
{
int i = 1;
- while (isOpened(KURL("file:"+i18n("Untitled%1").arg(i)))) i++;
- TQString fname = i18n("Untitled%1").arg(i);
+ while (isOpened(KURL("file:"+i18n("Untitled%1").tqarg(i)))) i++;
+ TQString fname = i18n("Untitled%1").tqarg(i);
QuantaView *view = createView(fname);
#ifdef ENABLE_EDITORS
@@ -118,10 +118,10 @@ void ViewManager::createNewDocument()
"KTextEditor::Document"
);
#else
- KTextEditor::Document *doc = KTextEditor::createDocument ("libkatepart", view, "KTextEditor::Document");
+ KTextEditor::Document *doc = KTextEditor::createDocument ("libkatepart", TQT_TQOBJECT(view), "KTextEditor::Document");
#endif
Document *w = new Document(doc, 0L);
- connect(w, TQT_SIGNAL(showAnnotation(uint, const TQString&, const QPair<TQString, TQString>&)), quantaApp->annotationOutput(), TQT_SLOT(insertAnnotation(uint, const TQString&, const QPair<TQString, TQString>&)));
+ connect(w, TQT_SIGNAL(showAnnotation(uint, const TQString&, const TQPair<TQString, TQString>&)), quantaApp->annotationOutput(), TQT_SLOT(insertAnnotation(uint, const TQString&, const TQPair<TQString, TQString>&)));
TQString encoding = quantaApp->defaultEncoding();
KTextEditor::EncodingInterface* encodingIf = dynamic_cast<KTextEditor::EncodingInterface*>(doc);
if (encodingIf)
@@ -138,8 +138,8 @@ void ViewManager::createNewDocument()
popupIf->installPopup((TQPopupMenu *)quantaApp->factory()->container("popup_editor", quantaApp));
quantaApp->setFocusProxy(w->view());
- w->view()->setFocusPolicy(TQWidget::WheelFocus);
- connect( v, TQT_SIGNAL(newStatus()), quantaApp, TQT_SLOT(slotNewStatus()));
+ w->view()->setFocusPolicy(TQ_WheelFocus);
+ connect( v, TQT_SIGNAL(newtqStatus()), quantaApp, TQT_SLOT(slotNewtqStatus()));
quantaApp->slotNewPart(doc, true); // register new part in partmanager and make active
view->addDocument(w);
@@ -226,7 +226,7 @@ void ViewManager::slotViewActivated(KMdiChildView *view)
parser->clearGroups();
parser->setSAParserEnabled(true);
quantaApp->reparse(true); //FIXME
- quantaApp->slotNewStatus();
+ quantaApp->slotNewtqStatus();
quantaApp->slotNewLineColumn();
typingInProgress = false; //need to reset, as it's set to true in the above slots
m_lastActiveView = qView;
@@ -257,16 +257,16 @@ void ViewManager::slotCloseOtherTabs()
if (dynamic_cast<QuantaView*>(currentView) && !static_cast<QuantaView*>(currentView)->document())
ToolbarTabWidget::ref()->reparent(0, 0, TQPoint(), false);
KMdiIterator<KMdiChildView*> *it = quantaApp->createIterator();
- //save the children first to a list, as removing invalidates our iterator
- TQValueList<KMdiChildView *> children;
+ //save the tqchildren first to a list, as removing tqinvalidates our iterator
+ TQValueList<KMdiChildView *> tqchildren;
for (it->first(); !it->isDone(); it->next())
{
- children.append(it->currentItem());
+ tqchildren.append(it->currentItem());
}
delete it;
KURL::List modifiedList;
TQValueListIterator<KMdiChildView *> childIt;
- for (childIt = children.begin(); childIt != children.end(); ++childIt)
+ for (childIt = tqchildren.begin(); childIt != tqchildren.end(); ++childIt)
{
view = *childIt;
qView = dynamic_cast<QuantaView*>(view);
@@ -286,7 +286,7 @@ void ViewManager::slotCloseOtherTabs()
if (dlg.exec() == TQDialog::Accepted)
{
filesToSave = dlg.filesToSave();
- for (childIt = children.begin(); childIt != children.end(); ++childIt)
+ for (childIt = tqchildren.begin(); childIt != tqchildren.end(); ++childIt)
{
view = *childIt;
qView = dynamic_cast<QuantaView*>(view);
@@ -295,7 +295,7 @@ void ViewManager::slotCloseOtherTabs()
Document *w = qView->document();
if (w)
{
- if (filesToSave.contains(w->url()))
+ if (filesToSave.tqcontains(w->url()))
if (!qView->saveModified(false))
{
return; //save aborted
@@ -311,7 +311,7 @@ void ViewManager::slotCloseOtherTabs()
}
}
- for (childIt = children.begin(); childIt != children.end(); ++childIt)
+ for (childIt = tqchildren.begin(); childIt != tqchildren.end(); ++childIt)
{
view = *childIt;
if (view != currentView)
@@ -400,13 +400,13 @@ bool ViewManager::saveAll()
{
if (!w->isUntitled())
{
- emit eventHappened("before_save", w->url().url(), TQString::null);
+ emit eventHappened("before_save", w->url().url(), TQString());
w->docUndoRedo->fileSaved();
w->save();
w->removeBackup(quantaApp->config());
if (w->isModified())
flagsave = false;
- emit eventHappened("after_save", w->url().url(), TQString::null);
+ emit eventHappened("after_save", w->url().url(), TQString());
} else
{
if (!view->saveModified())
@@ -427,16 +427,16 @@ bool ViewManager::closeAll(bool createNew)
parser->setSAParserEnabled(false);
KMdiIterator<KMdiChildView*> *it = quantaApp->createIterator();
QuantaView *view;
- //save the children first to a list, as removing invalidates our iterator
- TQValueList<KMdiChildView *> children;
+ //save the tqchildren first to a list, as removing tqinvalidates our iterator
+ TQValueList<KMdiChildView *> tqchildren;
for (it->first(); !it->isDone(); it->next())
{
- children.append(it->currentItem());
+ tqchildren.append(it->currentItem());
}
delete it;
KURL::List modifiedList;
TQValueListIterator<KMdiChildView *> childIt;
- for (childIt = children.begin(); childIt != children.end(); ++childIt)
+ for (childIt = tqchildren.begin(); childIt != tqchildren.end(); ++childIt)
{
view = dynamic_cast<QuantaView*>(*childIt);
if (view)
@@ -455,7 +455,7 @@ bool ViewManager::closeAll(bool createNew)
if (dlg.exec() == TQDialog::Accepted)
{
filesToSave = dlg.filesToSave();
- for (childIt = children.begin(); childIt != children.end(); ++childIt)
+ for (childIt = tqchildren.begin(); childIt != tqchildren.end(); ++childIt)
{
view = dynamic_cast<QuantaView*>(*childIt);
if (view)
@@ -463,7 +463,7 @@ bool ViewManager::closeAll(bool createNew)
Document *w = view->document();
if (w)
{
- if (filesToSave.contains(w->url()))
+ if (filesToSave.tqcontains(w->url()))
if (!view->saveModified(false))
{
emit filesClosed(false);
@@ -484,7 +484,7 @@ bool ViewManager::closeAll(bool createNew)
disconnect(quantaApp, TQT_SIGNAL(lastChildViewClosed()), this, TQT_SLOT(slotLastViewClosed()));
ToolbarTabWidget::ref()->reparent(0L, 0, TQPoint(), false);
- for (childIt = children.begin(); childIt != children.end(); ++childIt)
+ for (childIt = tqchildren.begin(); childIt != tqchildren.end(); ++childIt)
{
view = dynamic_cast<QuantaView*>(*childIt);
if (view)
@@ -528,7 +528,7 @@ bool ViewManager::closeAll(bool createNew)
if (createNew)
{
createNewDocument();
- quantaApp->slotNewStatus();
+ quantaApp->slotNewtqStatus();
}
emit filesClosed(true);
return true;
@@ -604,7 +604,7 @@ void ViewManager::slotTabContextMenu(TQWidget *widget, const TQPoint& point)
m_separatorVisible = true;
m_tabPopup->insertSeparator(SEPARATOR_INDEX);
}
- if (Project::ref()->hasProject() && Project::ref()->contains(w->url()))
+ if (Project::ref()->hasProject() && Project::ref()->tqcontains(w->url()))
m_tabPopup->setItemVisible(UPLOAD_ID, true);
else
m_tabPopup->setItemVisible(UPLOAD_ID, false);
@@ -647,7 +647,7 @@ void ViewManager::slotTabContextMenu(TQWidget *widget, const TQPoint& point)
m_tabPopup->insertSeparator();
m_cvsMenuId = m_tabPopup->insertItem(SmallIcon("cervisia"), i18n("CVS"), CVSService::ref()->menu());
}
- if (Project::ref()->contains(w->url()))
+ if (Project::ref()->tqcontains(w->url()))
CVSService::ref()->setRepository(Project::ref()->projectBaseURL().path());
else
CVSService::ref()->setRepository(w->url().directory());