diff options
Diffstat (limited to 'src/simplemainwindow.cpp')
-rw-r--r-- | src/simplemainwindow.cpp | 202 |
1 files changed, 101 insertions, 101 deletions
diff --git a/src/simplemainwindow.cpp b/src/simplemainwindow.cpp index 59c4d691..df720fa0 100644 --- a/src/simplemainwindow.cpp +++ b/src/simplemainwindow.cpp @@ -19,7 +19,7 @@ ***************************************************************************/ #include "simplemainwindow.h" -#include <qtextedit.h> +#include <tqtextedit.h> #include <kaction.h> #include <kstdaction.h> @@ -57,15 +57,15 @@ #include "editorproxy.h" #include "multibuffer.h" -SimpleMainWindow::SimpleMainWindow(QWidget* parent, const char *name) +SimpleMainWindow::SimpleMainWindow(TQWidget* parent, const char *name) :DMainWindow(parent, name) { resize(800, 600); // starts kdevelop at 800x600 the first time m_mainWindowShare = new MainWindowShare(this); - connect(m_bottomDock, SIGNAL(hidden()), this, SLOT(raiseEditor())); - connect(m_leftDock, SIGNAL(hidden()), this, SLOT(raiseEditor())); - connect(m_rightDock, SIGNAL(hidden()), this, SLOT(raiseEditor())); + connect(m_bottomDock, TQT_SIGNAL(hidden()), this, TQT_SLOT(raiseEditor())); + connect(m_leftDock, TQT_SIGNAL(hidden()), this, TQT_SLOT(raiseEditor())); + connect(m_rightDock, TQT_SIGNAL(hidden()), this, TQT_SLOT(raiseEditor())); } SimpleMainWindow::~ SimpleMainWindow( ) @@ -105,34 +105,34 @@ void SimpleMainWindow::init() i18n("Could Not Find Plugins") ); } - connect(Core::getInstance(), SIGNAL(coreInitialized()), this, SLOT(slotCoreInitialized())); - connect(Core::getInstance(), SIGNAL(projectOpened()), this, SLOT(projectOpened())); - connect(Core::getInstance(), SIGNAL(projectClosed()), this, SLOT(projectClosed())); - connect(Core::getInstance(), SIGNAL(contextMenu(QPopupMenu *, const Context *)), - this, SLOT(contextMenu(QPopupMenu *, const Context *))); - connect(PartController::getInstance(), SIGNAL(partURLChanged(KParts::ReadOnlyPart *)), - this, SLOT(slotPartURLChanged(KParts::ReadOnlyPart * ))); - connect(PartController::getInstance(), SIGNAL(activePartChanged(KParts::Part*)), - this, SLOT(activePartChanged(KParts::Part*))); + connect(Core::getInstance(), TQT_SIGNAL(coreInitialized()), this, TQT_SLOT(slotCoreInitialized())); + connect(Core::getInstance(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(projectOpened())); + connect(Core::getInstance(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(projectClosed())); + connect(Core::getInstance(), TQT_SIGNAL(contextMenu(TQPopupMenu *, const Context *)), + this, TQT_SLOT(contextMenu(TQPopupMenu *, const Context *))); + connect(PartController::getInstance(), TQT_SIGNAL(partURLChanged(KParts::ReadOnlyPart *)), + this, TQT_SLOT(slotPartURLChanged(KParts::ReadOnlyPart * ))); + connect(PartController::getInstance(), TQT_SIGNAL(activePartChanged(KParts::Part*)), + this, TQT_SLOT(activePartChanged(KParts::Part*))); connect(PartController::getInstance(), - SIGNAL(documentChangedState(const KURL &, DocumentState)), - this, SLOT(documentChangedState(const KURL&, DocumentState))); + TQT_SIGNAL(documentChangedState(const KURL &, DocumentState)), + this, TQT_SLOT(documentChangedState(const KURL&, DocumentState))); loadSettings(); } -void SimpleMainWindow::dragEnterEvent( QDragEnterEvent *event ) +void SimpleMainWindow::dragEnterEvent( TQDragEnterEvent *event ) { event->accept(KURLDrag::canDecode(event)); } -void SimpleMainWindow::dropEvent( QDropEvent *event ) +void SimpleMainWindow::dropEvent( TQDropEvent *event ) { slotDropEvent(event); } -void SimpleMainWindow::slotDropEvent( QDropEvent *event ) +void SimpleMainWindow::slotDropEvent( TQDropEvent *event ) { KURL::List list; if ( !KURLDrag::decode( event, list ) ) return; @@ -146,14 +146,14 @@ void SimpleMainWindow::slotDropEvent( QDropEvent *event ) } } -void SimpleMainWindow::contextMenu(QPopupMenu *popupMenu, const Context *context) +void SimpleMainWindow::contextMenu(TQPopupMenu *popupMenu, const Context *context) { int cont = context->type(); m_splitURLs.clear(); if (cont == Context::EditorContext) { KURL url = static_cast<const EditorContext*>(context)->url(); - QWidget *w = widgetForURL(url); + TQWidget *w = widgetForURL(url); if (w && m_widgetTabs[w] && m_widgetTabs[w]->count() > 1) { m_splitURLs.append(url); @@ -210,35 +210,35 @@ void SimpleMainWindow::contextMenu(QPopupMenu *popupMenu, const Context *context } } -void SimpleMainWindow::embedPartView(QWidget *view, const QString &title, const QString &/*toolTip*/) +void SimpleMainWindow::embedPartView(TQWidget *view, const TQString &title, const TQString &/*toolTip*/) { kdDebug() << "SimpleMainWindow::embedPartView: " << view << endl; if (!view ) return; - QString shortName = title; + TQString shortName = title; shortName = shortName.right( shortName.length() - (shortName.findRev('/') +1)); addWidget(view, title); view->show(); } -void SimpleMainWindow::embedSelectView(QWidget *view, const QString &title, const QString &/*toolTip*/) +void SimpleMainWindow::embedSelectView(TQWidget *view, const TQString &title, const TQString &/*toolTip*/) { embedView( DDockWindow::Left, view, title ); } -void SimpleMainWindow::embedOutputView(QWidget *view, const QString &title, const QString &/*toolTip*/) +void SimpleMainWindow::embedOutputView(TQWidget *view, const TQString &title, const TQString &/*toolTip*/) { embedView( DDockWindow::Bottom, view, title ); } -void SimpleMainWindow::embedSelectViewRight(QWidget *view, const QString &title, const QString &/*toolTip*/) +void SimpleMainWindow::embedSelectViewRight(TQWidget *view, const TQString &title, const TQString &/*toolTip*/) { embedView( DDockWindow::Right, view, title ); } -void SimpleMainWindow::embedView( DDockWindow::Position pos, QWidget * view, const QString & title ) +void SimpleMainWindow::embedView( DDockWindow::Position pos, TQWidget * view, const TQString & title ) { if ( !hasDockWidget( view ) ) { @@ -247,12 +247,12 @@ void SimpleMainWindow::embedView( DDockWindow::Position pos, QWidget * view, con } } -DDockWindow::Position SimpleMainWindow::recallToolViewPosition( const QString & name, DDockWindow::Position defaultPos ) +DDockWindow::Position SimpleMainWindow::recallToolViewPosition( const TQString & name, DDockWindow::Position defaultPos ) { KConfig * config = kapp->config(); config->setGroup( "DToolDockPosition" ); - QString position = config->readEntry( name ); + TQString position = config->readEntry( name ); if ( name == "unknown" ) { @@ -266,12 +266,12 @@ DDockWindow::Position SimpleMainWindow::recallToolViewPosition( const QString & return defaultPos; } -void SimpleMainWindow::rememberToolViewPosition( const QString & name, DDockWindow::Position pos ) +void SimpleMainWindow::rememberToolViewPosition( const TQString & name, DDockWindow::Position pos ) { KConfig * config = kapp->config(); config->setGroup( "DToolDockPosition" ); - QString position = "unknown"; + TQString position = "unknown"; switch( pos ) { @@ -291,7 +291,7 @@ void SimpleMainWindow::rememberToolViewPosition( const QString & name, DDockWind } -void SimpleMainWindow::removeView(QWidget *view) +void SimpleMainWindow::removeView(TQWidget *view) { if (!view) return; @@ -307,7 +307,7 @@ void SimpleMainWindow::removeView(QWidget *view) removeWidget(view); } -void SimpleMainWindow::setViewAvailable(QWidget *pView, bool bEnabled) +void SimpleMainWindow::setViewAvailable(TQWidget *pView, bool bEnabled) { DDockWindow *dock; if (hasDockWidget(pView)) @@ -318,7 +318,7 @@ void SimpleMainWindow::setViewAvailable(QWidget *pView, bool bEnabled) bEnabled ? dock->showWidget(pView) : dock->hideWidget(pView); } -void SimpleMainWindow::raiseView(QWidget *view) +void SimpleMainWindow::raiseView(TQWidget *view) { //adymo: a workaround to make editor wrappers work: //editor view is passed to this function but the ui library knows only @@ -330,7 +330,7 @@ void SimpleMainWindow::raiseView(QWidget *view) { // kdDebug() << "parent is editor wrapper: " << // static_cast<EditorWrapper*>(view->parent()) << endl; - view = (QWidget*)view->parent(); + view = (TQWidget*)view->parent(); } if (hasDockWidget(view)) @@ -342,7 +342,7 @@ void SimpleMainWindow::raiseView(QWidget *view) m_widgetTabs[view]->showPage(view); } -void SimpleMainWindow::lowerView(QWidget * view) +void SimpleMainWindow::lowerView(TQWidget * view) { if (!hasDockWidget(view)) return; @@ -368,7 +368,7 @@ void SimpleMainWindow::saveSettings( ) ProjectManager::getInstance()->saveSettings(); saveMainWindowSettings(config, "SimpleMainWindow"); - QMap<QWidget*, DDockWindow::Position>::iterator it = m_docks.begin(); + TQMap<TQWidget*, DDockWindow::Position>::iterator it = m_docks.begin(); while ( it != m_docks.end() ) { if ( !strcmp(it.key()->name(), "unnamed") ) @@ -383,11 +383,11 @@ void SimpleMainWindow::saveSettings( ) DMainWindow::saveSettings(); } -void SimpleMainWindow::setCurrentDocumentCaption( const QString &caption ) +void SimpleMainWindow::setCurrentDocumentCaption( const TQString &caption ) { if( !PartController::getInstance()->activePart() ) return; - if (QWidget *widget = EditorProxy::getInstance()->topWidgetForPart(PartController::getInstance()->activePart())) + if (TQWidget *widget = EditorProxy::getInstance()->topWidgetForPart(PartController::getInstance()->activePart())) { widget->setCaption(caption); } @@ -402,65 +402,65 @@ void SimpleMainWindow::createFramework() { PartController::createInstance( this ); - connect(PartController::getInstance(), SIGNAL(activePartChanged(KParts::Part*)), - this, SLOT(createGUI(KParts::Part*))); + connect(PartController::getInstance(), TQT_SIGNAL(activePartChanged(KParts::Part*)), + this, TQT_SLOT(createGUI(KParts::Part*))); } void SimpleMainWindow::createActions() { m_raiseEditor = new KAction(i18n("Raise &Editor"), ALT+Key_C, - this, SLOT(raiseEditor()), actionCollection(), "raise_editor"); + this, TQT_SLOT(raiseEditor()), actionCollection(), "raise_editor"); m_raiseEditor->setToolTip(i18n("Raise editor")); m_raiseEditor->setWhatsThis(i18n("<b>Raise editor</b><p>Focuses the editor.")); m_lowerAllDocks = new KAction(i18n("Lower All Docks"), CTRL+SHIFT+Key_C, - this, SLOT(lowerAllDocks()), actionCollection(), "lower_all_docks"); + this, TQT_SLOT(lowerAllDocks()), actionCollection(), "lower_all_docks"); new KAction(i18n("Switch to next TabWidget"), 0, this, - SLOT(switchToNextTabWidget()), actionCollection(), "switch_to_next_tabwidget" ); + TQT_SLOT(switchToNextTabWidget()), actionCollection(), "switch_to_next_tabwidget" ); m_splitHor = new KAction(i18n("Split &Horizontal"), CTRL+SHIFT+Key_T, - this, SLOT(slotSplitHorizontalBase()), actionCollection(), "split_h"); + this, TQT_SLOT(slotSplitHorizontalBase()), actionCollection(), "split_h"); m_splitHor->setIcon("view_top_bottom"); m_splitVer = new KAction(i18n("Split &Vertical"), CTRL+SHIFT+Key_L, - this, SLOT(slotSplitVerticalBase()), actionCollection(), "split_v"); + this, TQT_SLOT(slotSplitVerticalBase()), actionCollection(), "split_v"); m_splitVer->setIcon("view_left_right"); m_splitHor1 = new KAction(i18n("Split &Horizontal"), 0, - this, SLOT(slotSplitHorizontal()), actionCollection(), "split_h1"); + this, TQT_SLOT(slotSplitHorizontal()), actionCollection(), "split_h1"); m_splitHor1->setIcon("view_top_bottom"); m_splitVer1 = new KAction(i18n("Split &Vertical"), 0, - this, SLOT(slotSplitVertical()), actionCollection(), "split_v1"); + this, TQT_SLOT(slotSplitVertical()), actionCollection(), "split_v1"); m_splitVer1->setIcon("view_left_right"); m_splitHor2 = new KAction(i18n("Split &Horizontal and Open"), 0, - this, SLOT(slotSplitHorizontal()), actionCollection(), "split_h2"); + this, TQT_SLOT(slotSplitHorizontal()), actionCollection(), "split_h2"); m_splitHor2->setIcon("view_top_bottom"); m_splitVer2 = new KAction(i18n("Split &Vertical and Open"), 0, - this, SLOT(slotSplitVertical()), actionCollection(), "split_v2"); + this, TQT_SLOT(slotSplitVertical()), actionCollection(), "split_v2"); m_splitVer2->setIcon("view_left_right"); m_raiseLeftDock = new KAction(i18n("Switch Left Dock"), CTRL+SHIFT+ALT+Key_L, - this, SLOT(raiseLeftDock()), actionCollection(), "switch_left_dock"); + this, TQT_SLOT(raiseLeftDock()), actionCollection(), "switch_left_dock"); m_raiseRightDock = new KAction(i18n("Switch Right Dock"), CTRL+SHIFT+ALT+Key_R, - this, SLOT(raiseRightDock()), actionCollection(), "switch_right_dock"); + this, TQT_SLOT(raiseRightDock()), actionCollection(), "switch_right_dock"); m_raiseBottomDock = new KAction(i18n("Switch Bottom Dock"), CTRL+SHIFT+ALT+Key_B, - this, SLOT(raiseBottomDock()), actionCollection(), "switch_bottom_dock"); + this, TQT_SLOT(raiseBottomDock()), actionCollection(), "switch_bottom_dock"); - KStdAction::configureToolbars(this, SLOT(configureToolbars()), + KStdAction::configureToolbars(this, TQT_SLOT(configureToolbars()), actionCollection(), "set_configure_toolbars"); m_mainWindowShare->createActions(); - connect(m_mainWindowShare, SIGNAL(gotoNextWindow()), this, SLOT(gotoNextWindow())); - connect(m_mainWindowShare, SIGNAL(gotoPreviousWindow()), this, SLOT(gotoPreviousWindow())); - connect(m_mainWindowShare, SIGNAL(gotoFirstWindow()), this, SLOT(gotoFirstWindow())); - connect(m_mainWindowShare, SIGNAL(gotoLastWindow()), this, SLOT(gotoLastWindow())); + connect(m_mainWindowShare, TQT_SIGNAL(gotoNextWindow()), this, TQT_SLOT(gotoNextWindow())); + connect(m_mainWindowShare, TQT_SIGNAL(gotoPreviousWindow()), this, TQT_SLOT(gotoPreviousWindow())); + connect(m_mainWindowShare, TQT_SIGNAL(gotoFirstWindow()), this, TQT_SLOT(gotoFirstWindow())); + connect(m_mainWindowShare, TQT_SIGNAL(gotoLastWindow()), this, TQT_SLOT(gotoLastWindow())); } void SimpleMainWindow::raiseEditor() @@ -522,12 +522,12 @@ void SimpleMainWindow::slotCoreInitialized() void SimpleMainWindow::projectOpened() { - setCaption(QString::null); + setCaption(TQString::null); } void SimpleMainWindow::slotPartURLChanged(KParts::ReadOnlyPart *part) { - if (QWidget *widget = EditorProxy::getInstance()->topWidgetForPart(part)) + if (TQWidget *widget = EditorProxy::getInstance()->topWidgetForPart(part)) { kdDebug() << "new caption for widget: " << part->url().fileName() << endl; widget->setCaption(part->url().fileName()); @@ -537,7 +537,7 @@ void SimpleMainWindow::slotPartURLChanged(KParts::ReadOnlyPart *part) void SimpleMainWindow::documentChangedState(const KURL &url, DocumentState state) { - QWidget * widget = EditorProxy::getInstance()->topWidgetForPart( + TQWidget * widget = EditorProxy::getInstance()->topWidgetForPart( PartController::getInstance()->partForURL(url)); kdDebug() << "SimpleMainWindow::documentChangedState: " << widget << endl; if (widget) @@ -558,7 +558,7 @@ void SimpleMainWindow::documentChangedState(const KURL &url, DocumentState state if (m_showIconsOnTabs) widget->setIcon(SmallIcon("kdevelop", isize)); else - widget->setIcon(QPixmap()); + widget->setIcon(TQPixmap()); break; case Modified: widget->setIcon(SmallIcon("filesave", isize)); @@ -577,7 +577,7 @@ void SimpleMainWindow::documentChangedState(const KURL &url, DocumentState state void SimpleMainWindow::closeTab() { // actionCollection()->action("file_close")->activate(); - if (sender()->isA("QToolButton") && sender()->parent()->isA("DTabWidget")) + if (sender()->isA("TQToolButton") && sender()->parent()->isA("DTabWidget")) { DTabWidget *tab = (DTabWidget*)sender()->parent(); if (tab && tab->currentPage()) @@ -585,9 +585,9 @@ void SimpleMainWindow::closeTab() } } -void SimpleMainWindow::tabContext(QWidget *w, const QPoint &p) +void SimpleMainWindow::tabContext(TQWidget *w, const TQPoint &p) { - DTabWidget *tabWidget = static_cast<DTabWidget*>(const_cast<QObject*>(sender())); + DTabWidget *tabWidget = static_cast<DTabWidget*>(const_cast<TQObject*>(sender())); if (!tabWidget) return; @@ -595,11 +595,11 @@ void SimpleMainWindow::tabContext(QWidget *w, const QPoint &p) tabMenu.insertTitle(tabWidget->tabLabel(w)); //Find the document on whose tab the user clicked - m_currentTabURL = QString::null; - QPtrListIterator<KParts::Part> it(*PartController::getInstance()->parts()); + m_currentTabURL = TQString::null; + TQPtrListIterator<KParts::Part> it(*PartController::getInstance()->parts()); while (KParts::Part* part = it.current()) { - QWidget *top_widget = EditorProxy::getInstance()->topWidgetForPart(part); + TQWidget *top_widget = EditorProxy::getInstance()->topWidgetForPart(part); if (top_widget == w) { if (KParts::ReadOnlyPart *ro_part = dynamic_cast<KParts::ReadOnlyPart*>(part)) @@ -633,7 +633,7 @@ void SimpleMainWindow::tabContext(QWidget *w, const QPoint &p) ++it; } - connect(&tabMenu, SIGNAL(activated(int)), this, SLOT(tabContextActivated(int))); + connect(&tabMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(tabContextActivated(int))); tabMenu.exec(p); } @@ -668,7 +668,7 @@ void SimpleMainWindow::configureToolbars() { saveMainWindowSettings(KGlobal::config(), "SimpleMainWindow"); KEditToolbar dlg(factory()); - connect(&dlg, SIGNAL(newToolbarConfig()), this, SLOT(slotNewToolbarConfig())); + connect(&dlg, TQT_SIGNAL(newToolbarConfig()), this, TQT_SLOT(slotNewToolbarConfig())); dlg.exec(); } @@ -693,13 +693,13 @@ bool SimpleMainWindow::queryExit() void SimpleMainWindow::setupWindowMenu() { // get the xmlgui created one instead - m_windowMenu = static_cast<QPopupMenu*>(main()->child("window", "KPopupMenu")); + m_windowMenu = static_cast<TQPopupMenu*>(main()->child("window", "KPopupMenu")); if (!m_windowMenu) { kdDebug(9000) << "Couldn't find the XMLGUI window menu. Creating new." << endl; - m_windowMenu = new QPopupMenu(main(), "window"); + m_windowMenu = new TQPopupMenu(main(), "window"); menuBar()->insertItem(i18n("&Window"), m_windowMenu); } @@ -707,13 +707,13 @@ void SimpleMainWindow::setupWindowMenu() actionCollection()->action("file_close_all")->plug(m_windowMenu); actionCollection()->action("file_closeother")->plug(m_windowMenu); - QObject::connect(m_windowMenu, SIGNAL(activated(int)), this, SLOT(openURL(int))); - QObject::connect(m_windowMenu, SIGNAL(aboutToShow()), this, SLOT(fillWindowMenu())); + TQObject::connect(m_windowMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(openURL(int))); + TQObject::connect(m_windowMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(fillWindowMenu())); } void SimpleMainWindow::openURL(int w) { - QValueList<QPair<int, KURL> >::ConstIterator it = m_windowList.begin(); + TQValueList<QPair<int, KURL> >::ConstIterator it = m_windowList.begin(); while (it != m_windowList.end()) { if ((*it).first == w) @@ -732,7 +732,7 @@ void SimpleMainWindow::openURL(int w) void SimpleMainWindow::fillWindowMenu() { // clear menu - QValueList< QPair< int, KURL > >::ConstIterator it = m_windowList.begin(); + TQValueList< QPair< int, KURL > >::ConstIterator it = m_windowList.begin(); while (it != m_windowList.end()) { m_windowMenu->removeItem( (*it).first ); @@ -741,8 +741,8 @@ void SimpleMainWindow::fillWindowMenu() int temp = 0; - QMap<QString, KURL> map; - QStringList string_list; + TQMap<TQString, KURL> map; + TQStringList string_list; KURL::List list = PartController::getInstance()->openURLs(); KURL::List::Iterator itt = list.begin(); while (itt != list.end()) @@ -765,7 +765,7 @@ void SimpleMainWindow::fillWindowMenu() while (itt != list.end()) { - temp = m_windowMenu->insertItem( i < 10 ? QString("&%1 %2").arg(i).arg((*itt).fileName()) : (*itt).fileName() ); + temp = m_windowMenu->insertItem( i < 10 ? TQString("&%1 %2").arg(i).arg((*itt).fileName()) : (*itt).fileName() ); m_windowList << qMakePair(temp, *itt); ++i; ++itt; @@ -824,11 +824,11 @@ void SimpleMainWindow::openDocumentsAfterSplit(DTabWidget *tab) else { PartController::getInstance()->activatePart( part ); - QWidget *inTab = widgetForURL(*it); + TQWidget *inTab = widgetForURL(*it); if (inTab) { DTabWidget *oldTab = m_widgetTabs[inTab]; - QString title = oldTab->tabLabel(inTab); + TQString title = oldTab->tabLabel(inTab); removeWidget(inTab); addWidget(tab, inTab, title); } @@ -838,34 +838,34 @@ void SimpleMainWindow::openDocumentsAfterSplit(DTabWidget *tab) } } -QWidget *SimpleMainWindow::widgetForURL(KURL url) +TQWidget *SimpleMainWindow::widgetForURL(KURL url) { KParts::ReadOnlyPart *part = PartController::getInstance()->partForURL(url); return widgetInTab( part ? part->widget() : 0 ); } -QWidget *SimpleMainWindow::widgetInTab(QWidget *w) +TQWidget *SimpleMainWindow::widgetInTab(TQWidget *w) { - QWidget *inTab = 0; + TQWidget *inTab = 0; if (w && w->parent() && w->parent()->isA("EditorProxy")) - inTab = (QWidget*)w->parent(); + inTab = (TQWidget*)w->parent(); else if (w && w->parent() && w->parent()->isA("MultiBuffer") && w->parent()->parent() && w->parent()->parent()->isA("EditorProxy")) - inTab = (QWidget*)w->parent()->parent(); + inTab = (TQWidget*)w->parent()->parent(); else if (w && w->parent() && w->parent()->isA("MultiBuffer")) - inTab = (QWidget*)w->parent(); + inTab = (TQWidget*)w->parent(); else inTab = w; return inTab; } -void SimpleMainWindow::closeTab(QWidget *w) +void SimpleMainWindow::closeTab(TQWidget *w) { - const QPtrList<KParts::Part> *partlist = PartController::getInstance()->parts(); - QPtrListIterator<KParts::Part> it(*partlist); + const TQPtrList<KParts::Part> *partlist = PartController::getInstance()->parts(); + TQPtrListIterator<KParts::Part> it(*partlist); while (KParts::Part* part = it.current()) { - QWidget *widget = EditorProxy::getInstance()->topWidgetForPart(part); + TQWidget *widget = EditorProxy::getInstance()->topWidgetForPart(part); if (widget && widget == w) { // weirdness beyond weirdness.. sometimes the active view is an embedded splitter with two files @@ -888,9 +888,9 @@ void SimpleMainWindow::activePartChanged(KParts::Part *part) { if (!part) return; - QWidget *w = part->widget(); + TQWidget *w = part->widget(); kdDebug() << "active part widget is : " << w << endl; - QWidget *inTab = widgetInTab(w); + TQWidget *inTab = widgetInTab(w); if (m_widgetTabs[inTab] != 0) { kdDebug() << " setting m_activeTabWidget " << endl; @@ -900,7 +900,7 @@ void SimpleMainWindow::activePartChanged(KParts::Part *part) void SimpleMainWindow::createGUI(KParts::Part *part) { if ( !part ) - setCaption( QString::null ); + setCaption( TQString::null ); DMainWindow::createGUI(part); m_mainWindowShare->slotGUICreated( part ); @@ -935,12 +935,12 @@ void SimpleMainWindow::lowerAllDocks() void SimpleMainWindow::switchToNextTabWidget() { - QValueList<DTabWidget*> tabWidgets = m_widgetTabs.values(); + TQValueList<DTabWidget*> tabWidgets = m_widgetTabs.values(); if ( tabWidgets.count() < 2 ) return; - QValueList<DTabWidget*> reduced; - QValueList<DTabWidget*>::iterator it = tabWidgets.begin(); + TQValueList<DTabWidget*> reduced; + TQValueList<DTabWidget*>::iterator it = tabWidgets.begin(); while ( it != tabWidgets.end() ) { if ( !reduced.contains( *it ) ) @@ -971,7 +971,7 @@ void SimpleMainWindow::switchToNextTabWidget() } } -void SimpleMainWindow::setCaption(const QString &caption) +void SimpleMainWindow::setCaption(const TQString &caption) { kdDebug(9000) << k_funcinfo << endl; @@ -986,9 +986,9 @@ void SimpleMainWindow::setCaption(const QString &caption) KDevProject *project = API::getInstance()->project(); if (project) { - QString projectname = project->projectName(); + TQString projectname = project->projectName(); - QString suffix(".kdevelop"); + TQString suffix(".kdevelop"); if (projectname.endsWith(suffix)) projectname.truncate(projectname.length() - suffix.length()); @@ -1003,7 +1003,7 @@ void SimpleMainWindow::setCaption(const QString &caption) void SimpleMainWindow::projectClosed() { - DMainWindow::setCaption(QString::null); + DMainWindow::setCaption(TQString::null); } #include "simplemainwindow.moc" |