summaryrefslogtreecommitdiffstats
path: root/src/editorproxy.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
commitd6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch)
treed109539636691d7b03036ca1c0ed29dbae6577cf /src/editorproxy.cpp
parent3331a47a9cad24795c7440ee8107143ce444ef34 (diff)
downloadtdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz
tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/editorproxy.cpp')
-rw-r--r--src/editorproxy.cpp44
1 files changed, 22 insertions, 22 deletions
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 <qwidget.h>
-#include <qpopupmenu.h>
-#include <qtimer.h>
+#include <tqwidget.h>
+#include <tqpopupmenu.h>
+#include <tqtimer.h>
#include <kdeversion.h>
#include <kdebug.h>
@@ -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<MultiBuffer*>::ConstIterator it = m_editorParts.begin(); it != m_editorParts.end(); ++it)
+ for (TQValueList<MultiBuffer*>::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<KTextEditor::View*>( part->widget() );
- QPopupMenu * popup = static_cast<QPopupMenu*>( part->factory()->container("ktexteditor_popup", view ) );
+ TQPopupMenu * popup = static_cast<TQPopupMenu*>( 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<KTextEditor::View*>( part->widget() );
- QPopupMenu * popup = static_cast<QPopupMenu*>( view->factory()->container("ktexteditor_popup", view ) );
+ TQPopupMenu * popup = static_cast<TQPopupMenu*>( 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<KParts::ReadOnlyPart*>( part )->url();
- for (QValueList<MultiBuffer*>::ConstIterator it = m_editorParts.begin(); it != m_editorParts.end(); ++it)
+ for (TQValueList<MultiBuffer*>::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<KParts::ReadOnlyPart*>( part )->url();
- for (QValueList<MultiBuffer*>::ConstIterator it = m_editorParts.begin(); it != m_editorParts.end(); ++it)
+ for (TQValueList<MultiBuffer*>::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<MultiBuffer*>::ConstIterator it = m_editorParts.begin(); it != m_editorParts.end(); ++it)
+ for (TQValueList<MultiBuffer*>::ConstIterator it = m_editorParts.begin(); it != m_editorParts.end(); ++it)
if ((*it)->hasPart(part))
return *it;