summaryrefslogtreecommitdiffstats
path: root/src/kile/kileviewmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kile/kileviewmanager.cpp')
-rw-r--r--src/kile/kileviewmanager.cpp122
1 files changed, 61 insertions, 61 deletions
diff --git a/src/kile/kileviewmanager.cpp b/src/kile/kileviewmanager.cpp
index cf78294..173efc2 100644
--- a/src/kile/kileviewmanager.cpp
+++ b/src/kile/kileviewmanager.cpp
@@ -18,10 +18,10 @@
#include "kileviewmanager.h"
-#include <qpopupmenu.h>
-#include <qtimer.h> //for QTimer::singleShot trick
-#include <qpixmap.h>
-#include <qclipboard.h>
+#include <tqpopupmenu.h>
+#include <tqtimer.h> //for TQTimer::singleShot trick
+#include <tqpixmap.h>
+#include <tqclipboard.h>
#include <kdeversion.h>
#include <kglobal.h>
@@ -53,8 +53,8 @@
namespace KileView
{
-Manager::Manager(KileInfo *info, QObject *parent, const char *name) :
- QObject(parent, name),
+Manager::Manager(KileInfo *info, TQObject *tqparent, const char *name) :
+ TQObject(tqparent, name),
m_ki(info),
m_activeTextView(0L),
// m_projectview(0L),
@@ -69,46 +69,46 @@ Manager::~Manager()
{
}
-void Manager::setClient(QObject *receiver, KXMLGUIClient *client)
+void Manager::setClient(TQObject *receiver, KXMLGUIClient *client)
{
m_receiver = receiver;
m_client = client;
if(NULL == m_client->actionCollection()->action("popup_pasteaslatex"))
new KAction(i18n("Paste as LaTe&X"), 0, this,
- SLOT(pasteAsLaTeX()), m_client->actionCollection(), "popup_pasteaslatex");
+ TQT_SLOT(pasteAsLaTeX()), m_client->actionCollection(), "popup_pasteaslatex");
if(NULL == m_client->actionCollection()->action("popup_converttolatex"))
new KAction(i18n("Convert Selection to &LaTeX"), 0, this,
- SLOT(convertSelectionToLaTeX()), m_client->actionCollection(), "popup_converttolatex");
+ TQT_SLOT(convertSelectionToLaTeX()), m_client->actionCollection(), "popup_converttolatex");
if(NULL == m_client->actionCollection()->action("popup_quickpreview"))
new KAction(i18n("&QuickPreview Selection"), 0, this,
- SLOT(quickPreviewPopup()), m_client->actionCollection(), "popup_quickpreview");
+ TQT_SLOT(quickPreviewPopup()), m_client->actionCollection(), "popup_quickpreview");
}
-void Manager::createTabs(QWidget *parent)
+void Manager::createTabs(TQWidget *tqparent)
{
- m_widgetStack = new QWidgetStack(parent);
- m_emptyDropWidget = new DropWidget(parent);
+ m_widgetStack = new TQWidgetStack(tqparent);
+ m_emptyDropWidget = new DropWidget(tqparent);
m_widgetStack->addWidget(m_emptyDropWidget);
- connect(m_emptyDropWidget, SIGNAL(testCanDecode(const QDragMoveEvent *, bool &)), this, SLOT(testCanDecodeURLs(const QDragMoveEvent *, bool &)));
- connect(m_emptyDropWidget, SIGNAL(receivedDropEvent(QDropEvent *)), m_ki->docManager(), SLOT(openDroppedURLs(QDropEvent *)));
- m_tabs = new KTabWidget(parent);
+ connect(m_emptyDropWidget, TQT_SIGNAL(testCanDecode(const TQDragMoveEvent *, bool &)), this, TQT_SLOT(testCanDecodeURLs(const TQDragMoveEvent *, bool &)));
+ connect(m_emptyDropWidget, TQT_SIGNAL(receivedDropEvent(TQDropEvent *)), m_ki->docManager(), TQT_SLOT(openDroppedURLs(TQDropEvent *)));
+ m_tabs = new KTabWidget(tqparent);
m_widgetStack->addWidget(m_tabs);
- m_tabs->setFocusPolicy(QWidget::ClickFocus);
+ m_tabs->setFocusPolicy(TQ_ClickFocus);
m_tabs->setTabReorderingEnabled(true);
m_tabs->setHoverCloseButton(true);
m_tabs->setHoverCloseButtonDelayed(true);
m_tabs->setFocus();
- connect( m_tabs, SIGNAL( currentChanged( QWidget * ) ), m_receiver, SLOT(newCaption()) );
- connect( m_tabs, SIGNAL( currentChanged( QWidget * ) ), m_receiver, SLOT(activateView( QWidget * )) );
- connect( m_tabs, SIGNAL( currentChanged( QWidget * ) ), m_receiver, SLOT(updateModeStatus()) );
- connect( m_tabs, SIGNAL( closeRequest(QWidget *) ), this, SLOT(closeWidget(QWidget *)));
- connect( m_tabs, SIGNAL( testCanDecode( const QDragMoveEvent *, bool & ) ), this, SLOT(testCanDecodeURLs( const QDragMoveEvent *, bool & )) );
- connect( m_tabs, SIGNAL( receivedDropEvent( QDropEvent * ) ), m_ki->docManager(), SLOT(openDroppedURLs( QDropEvent * )) );
- connect( m_tabs, SIGNAL( receivedDropEvent( QWidget*, QDropEvent * ) ), this, SLOT(replaceLoadedURL( QWidget *, QDropEvent * )) );
+ connect( m_tabs, TQT_SIGNAL( currentChanged( TQWidget * ) ), m_receiver, TQT_SLOT(newCaption()) );
+ connect( m_tabs, TQT_SIGNAL( currentChanged( TQWidget * ) ), m_receiver, TQT_SLOT(activateView( TQWidget * )) );
+ connect( m_tabs, TQT_SIGNAL( currentChanged( TQWidget * ) ), m_receiver, TQT_SLOT(updateModetqStatus()) );
+ connect( m_tabs, TQT_SIGNAL( closeRequest(TQWidget *) ), this, TQT_SLOT(closeWidget(TQWidget *)));
+ connect( m_tabs, TQT_SIGNAL( testCanDecode( const TQDragMoveEvent *, bool & ) ), this, TQT_SLOT(testCanDecodeURLs( const TQDragMoveEvent *, bool & )) );
+ connect( m_tabs, TQT_SIGNAL( receivedDropEvent( TQDropEvent * ) ), m_ki->docManager(), TQT_SLOT(openDroppedURLs( TQDropEvent * )) );
+ connect( m_tabs, TQT_SIGNAL( receivedDropEvent( TQWidget*, TQDropEvent * ) ), this, TQT_SLOT(replaceLoadedURL( TQWidget *, TQDropEvent * )) );
m_widgetStack->raiseWidget(m_emptyDropWidget); // there are no tabs, so show the DropWidget
}
-void Manager::closeWidget(QWidget *widget)
+void Manager::closeWidget(TQWidget *widget)
{
if (widget->inherits( "Kate::View" ))
{
@@ -142,30 +142,30 @@ Kate::View* Manager::createTextView(KileDocument::TextInfo *info, int index)
m_tabs->showPage( view );
m_textViewList.insert((index < 0 || (uint)index >= m_textViewList.count()) ? m_textViewList.count() : index, view);
- connect(view, SIGNAL(viewStatusMsg(const QString&)), m_receiver, SLOT(newStatus(const QString&)));
- connect(view, SIGNAL(newStatus()), m_receiver, SLOT(newCaption()));
- connect(view, SIGNAL(dropEventPass(QDropEvent *)), m_ki->docManager(), SLOT(openDroppedURLs(QDropEvent *)));
- connect(info, SIGNAL(urlChanged(KileDocument::Info*, const KURL&)), this, SLOT(urlChanged(KileDocument::Info*, const KURL&)));
+ connect(view, TQT_SIGNAL(viewStatusMsg(const TQString&)), m_receiver, TQT_SLOT(newtqStatus(const TQString&)));
+ connect(view, TQT_SIGNAL(newtqStatus()), m_receiver, TQT_SLOT(newCaption()));
+ connect(view, TQT_SIGNAL(dropEventPass(TQDropEvent *)), m_ki->docManager(), TQT_SLOT(openDroppedURLs(TQDropEvent *)));
+ connect(info, TQT_SIGNAL(urlChanged(KileDocument::Info*, const KURL&)), this, TQT_SLOT(urlChanged(KileDocument::Info*, const KURL&)));
- connect( doc, SIGNAL(charactersInteractivelyInserted (int,int,const QString&)), m_ki->editorExtension()->complete(), SLOT(slotCharactersInserted(int,int,const QString&)) );
- connect( view, SIGNAL(completionDone(KTextEditor::CompletionEntry)), m_ki->editorExtension()->complete(), SLOT( slotCompletionDone(KTextEditor::CompletionEntry)) );
- connect( view, SIGNAL(completionAborted()), m_ki->editorExtension()->complete(), SLOT( slotCompletionAborted()) );
- connect( view, SIGNAL(filterInsertString(KTextEditor::CompletionEntry*,QString *)), m_ki->editorExtension()->complete(), SLOT(slotFilterCompletion(KTextEditor::CompletionEntry*,QString *)) );
+ connect( doc, TQT_SIGNAL(charactersInteractivelyInserted (int,int,const TQString&)), m_ki->editorExtension()->complete(), TQT_SLOT(slotCharactersInserted(int,int,const TQString&)) );
+ connect( view, TQT_SIGNAL(completionDone(KTextEditor::CompletionEntry)), m_ki->editorExtension()->complete(), TQT_SLOT( slotCompletionDone(KTextEditor::CompletionEntry)) );
+ connect( view, TQT_SIGNAL(completionAborted()), m_ki->editorExtension()->complete(), TQT_SLOT( slotCompletionAborted()) );
+ connect( view, TQT_SIGNAL(filterInsertString(KTextEditor::CompletionEntry*,TQString *)), m_ki->editorExtension()->complete(), TQT_SLOT(slotFilterCompletion(KTextEditor::CompletionEntry*,TQString *)) );
// install a working kate part popup dialog thingy
- QPopupMenu *viewPopupMenu = (QPopupMenu*)(m_client->factory()->container("ktexteditor_popup", m_client));
+ TQPopupMenu *viewPopupMenu = (TQPopupMenu*)(m_client->factory()->container("ktexteditor_popup", m_client));
if((NULL != view) && (NULL != viewPopupMenu))
view->installPopup(viewPopupMenu);
if(NULL != viewPopupMenu)
- connect(viewPopupMenu, SIGNAL(aboutToShow()), this, SLOT(onKatePopupMenuRequest()));
+ connect(viewPopupMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(onKatePopupMenuRequest()));
//activate the newly created view
emit(activateView(view, false));
- QTimer::singleShot(0, m_receiver, SLOT(newCaption())); //make sure the caption gets updated
+ TQTimer::singleShot(0, m_receiver, TQT_SLOT(newCaption())); //make sure the caption gets updated
- reflectDocumentStatus(view->getDoc(), false, 0);
+ reflectDocumenttqStatus(view->getDoc(), false, 0);
- view->setFocusPolicy(QWidget::StrongFocus);
+ view->setFocusPolicy(TQ_StrongFocus);
view->setFocus();
emit(prepareForPart("Editor"));
@@ -176,15 +176,15 @@ Kate::View* Manager::createTextView(KileDocument::TextInfo *info, int index)
if ( action )
{
KILE_DEBUG() << " reconnect action 'file_save'..." << endl;
- action->disconnect(SIGNAL(activated()));
- connect(action, SIGNAL(activated()), m_ki->docManager(), SLOT(fileSave()));
+ action->disconnect(TQT_SIGNAL(activated()));
+ connect(action, TQT_SIGNAL(activated()), m_ki->docManager(), TQT_SLOT(fileSave()));
}
action = view->actionCollection()->action(KStdAction::stdName(KStdAction::SaveAs));
if ( action )
{
KILE_DEBUG() << " reconnect action 'file_save_as'..." << endl;
- action->disconnect(SIGNAL(activated()));
- connect(action, SIGNAL(activated()), m_ki->docManager(), SLOT(fileSaveAs()));
+ action->disconnect(TQT_SIGNAL(activated()));
+ connect(action, TQT_SIGNAL(activated()), m_ki->docManager(), TQT_SLOT(fileSaveAs()));
}
m_widgetStack->raiseWidget(m_tabs); // there is at least one tab, so show the KTabWidget now
@@ -201,7 +201,7 @@ void Manager::removeView(Kate::View *view)
m_textViewList.remove(view);
delete view;
- QTimer::singleShot(0, m_receiver, SLOT(newCaption())); //make sure the caption gets updated
+ TQTimer::singleShot(0, m_receiver, TQT_SLOT(newCaption())); //make sure the caption gets updated
if (textViews().isEmpty()) {
m_ki->structureWidget()->clear();
m_widgetStack->raiseWidget(m_emptyDropWidget); // there are no tabs left, so show
@@ -304,9 +304,9 @@ void Manager::gotoPrevView()
m_tabs->setCurrentPage( cPage );
}
-void Manager::reflectDocumentStatus(Kate::Document *doc, bool isModified, unsigned char reason)
+void Manager::reflectDocumenttqStatus(Kate::Document *doc, bool isModified, unsigned char reason)
{
- QPixmap icon;
+ TQPixmap icon;
if ( reason == 0 && isModified ) //nothing
icon = SmallIcon("filesave");
else if ( reason == 1 || reason == 2 ) //dirty file
@@ -330,7 +330,7 @@ void Manager::onKatePopupMenuRequest(void)
if(NULL == view)
return;
- QPopupMenu *viewPopupMenu = (QPopupMenu*)(m_client->factory()->container("ktexteditor_popup", m_client));
+ TQPopupMenu *viewPopupMenu = (TQPopupMenu*)(m_client->factory()->container("ktexteditor_popup", m_client));
if(NULL == viewPopupMenu)
return;
@@ -361,7 +361,7 @@ void Manager::onKatePopupMenuRequest(void)
if(!pasteAsLaTeXAction->isPlugged())
pasteAsLaTeXAction->plug(viewPopupMenu);
- QClipboard *clip = KApplication::clipboard();
+ TQClipboard *clip = KApplication::tqclipboard();
if(NULL != clip)
pasteAsLaTeXAction->setEnabled(!clip->text().isNull());
}
@@ -400,24 +400,24 @@ void Manager::convertSelectionToLaTeX(void)
firstLineLength = doc->lineLength(selStartLine);
else
firstLineLength = selEndCol;
- QString firstLine = doc->text(selStartLine, selStartCol, selStartLine, firstLineLength);
- QString firstLineCvt = cvt.ConvertToLaTeX(firstLine);
+ TQString firstLine = doc->text(selStartLine, selStartCol, selStartLine, firstLineLength);
+ TQString firstLineCvt = cvt.ConvertToLaTeX(firstLine);
doc->removeText(selStartLine, selStartCol, selStartLine, firstLineLength);
doc->insertText(selStartLine, selStartCol, firstLineCvt);
newSelEndCol = selStartCol + firstLineCvt.length();
// Processing the intermediate lines
for(uint nLine = selStartLine + 1 ; nLine < selEndLine ; ++nLine) {
- QString line = doc->textLine(nLine);
- QString newLine = cvt.ConvertToLaTeX(line);
+ TQString line = doc->textLine(nLine);
+ TQString newLine = cvt.ConvertToLaTeX(line);
doc->removeLine(nLine);
doc->insertLine(nLine, newLine);
}
// Processing the final line
if(selStartLine != selEndLine) {
- QString lastLine = doc->text(selEndLine, 0, selEndLine, selEndCol);
- QString lastLineCvt = cvt.ConvertToLaTeX(lastLine);
+ TQString lastLine = doc->text(selEndLine, 0, selEndLine, selEndCol);
+ TQString lastLineCvt = cvt.ConvertToLaTeX(lastLine);
doc->removeText(selEndLine, 0, selEndLine, selEndCol);
doc->insertText(selEndLine, 0, lastLineCvt);
newSelEndCol = lastLineCvt.length();
@@ -464,7 +464,7 @@ void Manager::pasteAsLaTeX(void)
doc->removeSelectedText();
PlainToLaTeXConverter cvt;
- QString toPaste = cvt.ConvertToLaTeX(KApplication::clipboard()->text());
+ TQString toPaste = cvt.ConvertToLaTeX(KApplication::tqclipboard()->text());
doc->insertText(cursorLine, cursorCol, toPaste);
// End of the "atomic edit operation"
@@ -490,12 +490,12 @@ void Manager::quickPreviewPopup()
}
}
-void Manager::testCanDecodeURLs(const QDragMoveEvent *e, bool &accept)
+void Manager::testCanDecodeURLs(const TQDragMoveEvent *e, bool &accept)
{
accept = KURLDrag::canDecode(e); // only accept URL drops
}
-void Manager::replaceLoadedURL(QWidget *w, QDropEvent *e)
+void Manager::replaceLoadedURL(TQWidget *w, TQDropEvent *e)
{
KURL::List urls;
if(!KURLDrag::decode(e, urls)) {
@@ -511,7 +511,7 @@ void Manager::replaceLoadedURL(QWidget *w, QDropEvent *e)
}
else if(!hasReplacedTab) {
closeWidget(w);
- m_ki->docManager()->fileOpen(url, QString::null, index);
+ m_ki->docManager()->fileOpen(url, TQString(), index);
hasReplacedTab = true;
}
else {
@@ -534,7 +534,7 @@ void Manager::urlChanged(KileDocument::Info* info, const KURL& /*url*/)
}
}
-DropWidget::DropWidget(QWidget * parent, const char * name, WFlags f) : QWidget(parent, name, f)
+DropWidget::DropWidget(TQWidget * tqparent, const char * name, WFlags f) : TQWidget(tqparent, name, f)
{
setAcceptDrops(true);
}
@@ -543,14 +543,14 @@ DropWidget::~DropWidget()
{
}
-void DropWidget::dragMoveEvent(QDragMoveEvent *e)
+void DropWidget::dragMoveEvent(TQDragMoveEvent *e)
{
bool b;
emit testCanDecode(e, b);
e->accept(b);
}
-void DropWidget::dropEvent(QDropEvent *e)
+void DropWidget::dropEvent(TQDropEvent *e)
{
emit receivedDropEvent(e);
}
@@ -564,7 +564,7 @@ void Manager::unplugKatePartMenu(Kate::View* view)
{
if ( view )
{
- QStringList actionlist;
+ TQStringList actionlist;
actionlist << "set_confdlg" << "go_goto_line"; // action names from katepartui.rc
for ( uint i=0; i < actionlist.count(); ++i )