From d6f8bbb45b267065a6907e71ff9c98bb6d161241 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:56:07 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/editorproxy.cpp | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'src/editorproxy.cpp') diff --git a/src/editorproxy.cpp b/src/editorproxy.cpp index b256491d..a0c42da3 100644 --- a/src/editorproxy.cpp +++ b/src/editorproxy.cpp @@ -1,6 +1,6 @@ -#include -#include -#include +#include +#include +#include #include #include @@ -37,16 +37,16 @@ EditorProxy *EditorProxy::s_instance = 0; EditorProxy::EditorProxy() - : QObject() + : TQObject() { - m_delayedLineTimer = new QTimer( this ); - connect( m_delayedLineTimer, SIGNAL( timeout() ), this, SLOT(setLineNumberDelayed()) ); + m_delayedLineTimer = new TQTimer( this ); + connect( m_delayedLineTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT(setLineNumberDelayed()) ); KConfig *config = kapp->config(); m_delayedViewCreationCompatibleUI = true; KAction *ac = new KAction( i18n("Show Context Menu"), 0, this, - SLOT(showPopup()), TopLevel::getInstance()->main()->actionCollection(), "show_popup" ); + TQT_SLOT(showPopup()), TopLevel::getInstance()->main()->actionCollection(), "show_popup" ); KShortcut cut ;/*= KStdAccel::shortcut(KStdAccel::PopupMenuContext);*/ cut.append(KKey(CTRL+Key_Return)); ac->setShortcut(cut); @@ -94,7 +94,7 @@ void EditorProxy::setLineNumber(KParts::Part *part, int lineNum, int col) } else { // Save the position for a rainy day (or when the view gets activated and wants its position) - for (QValueList::ConstIterator it = m_editorParts.begin(); it != m_editorParts.end(); ++it) + for (TQValueList::ConstIterator it = m_editorParts.begin(); it != m_editorParts.end(); ++it) if ((*it)->hasURL( url )) { (*it)->registerDelayedActivation( part, lineNum, col ); return; @@ -115,7 +115,7 @@ void EditorProxy::installPopup( KParts::Part * part ) { KTextEditor::View * view = static_cast( part->widget() ); - QPopupMenu * popup = static_cast( part->factory()->container("ktexteditor_popup", view ) ); + TQPopupMenu * popup = static_cast( part->factory()->container("ktexteditor_popup", view ) ); if (!popup) { @@ -143,7 +143,7 @@ void EditorProxy::installPopup( KParts::Part * part ) iface->installPopup( popup ); - connect(popup, SIGNAL(aboutToShow()), this, SLOT(popupAboutToShow())); + connect(popup, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(popupAboutToShow())); // ugly hack: mark the "original" items m_popupIds.resize(popup->count()); @@ -155,7 +155,7 @@ void EditorProxy::installPopup( KParts::Part * part ) void EditorProxy::popupAboutToShow() { - QPopupMenu *popup = (QPopupMenu*)sender(); + TQPopupMenu *popup = (TQPopupMenu*)sender(); if (!popup) return; @@ -165,7 +165,7 @@ void EditorProxy::popupAboutToShow() int id = popup->idAt(index); if (m_popupIds.contains(id) == 0) { - QMenuItem *item = popup->findItem(id); + TQMenuItem *item = popup->findItem(id); if ( item && item->popup() ) delete item->popup(); else @@ -180,8 +180,8 @@ void EditorProxy::popupAboutToShow() unsigned int col; if ( !KDevEditorUtil::currentPositionReal( &line, &col, doc ) ) return; - QString wordstr; - QString selection = KDevEditorUtil::currentSelection( doc ); + TQString wordstr; + TQString selection = KDevEditorUtil::currentSelection( doc ); if ( !selection.isEmpty() && selection.contains('\n') != 0 ) { wordstr = selection; @@ -191,7 +191,7 @@ void EditorProxy::popupAboutToShow() wordstr = KDevEditorUtil::currentWord( doc ); } - QString linestr = KDevEditorUtil::currentLine( doc ); + TQString linestr = KDevEditorUtil::currentLine( doc ); EditorContext context( doc->url(), line, col, linestr, wordstr ); Core::getInstance()->fillContextMenu( popup, &context ); @@ -225,7 +225,7 @@ void EditorProxy::showPopup( ) if ( iface ) { KTextEditor::View * view = static_cast( part->widget() ); - QPopupMenu * popup = static_cast( view->factory()->container("ktexteditor_popup", view ) ); + TQPopupMenu * popup = static_cast( view->factory()->container("ktexteditor_popup", view ) ); if ( popup ) { @@ -245,7 +245,7 @@ void EditorProxy::deregisterEditor(MultiBuffer* wrapper) m_editorParts.remove(wrapper); } -QWidget * EditorProxy::widgetForPart( KParts::Part * part ) +TQWidget * EditorProxy::widgetForPart( KParts::Part * part ) { if ( !part ) return 0; @@ -254,20 +254,20 @@ QWidget * EditorProxy::widgetForPart( KParts::Part * part ) KURL url = dynamic_cast( part )->url(); - for (QValueList::ConstIterator it = m_editorParts.begin(); it != m_editorParts.end(); ++it) + for (TQValueList::ConstIterator it = m_editorParts.begin(); it != m_editorParts.end(); ++it) if ((*it)->hasURL( url )) return *it; return 0L; } -QWidget * EditorProxy::topWidgetForPart( KParts::Part * part ) +TQWidget * EditorProxy::topWidgetForPart( KParts::Part * part ) { if ( !part ) return 0; KURL url = dynamic_cast( part )->url(); - for (QValueList::ConstIterator it = m_editorParts.begin(); it != m_editorParts.end(); ++it) + for (TQValueList::ConstIterator it = m_editorParts.begin(); it != m_editorParts.end(); ++it) if ((*it)->hasURL( url )) return *it; @@ -282,9 +282,9 @@ bool EditorProxy::isDelayedViewCapable( ) return m_delayedViewCreationCompatibleUI; } -QWidget *EditorProxy::findPartWidget(KParts::Part *part) +TQWidget *EditorProxy::findPartWidget(KParts::Part *part) { - for (QValueList::ConstIterator it = m_editorParts.begin(); it != m_editorParts.end(); ++it) + for (TQValueList::ConstIterator it = m_editorParts.begin(); it != m_editorParts.end(); ++it) if ((*it)->hasPart(part)) return *it; -- cgit v1.2.1