summaryrefslogtreecommitdiffstats
path: root/src/newui/dmainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/newui/dmainwindow.cpp')
-rw-r--r--src/newui/dmainwindow.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/src/newui/dmainwindow.cpp b/src/newui/dmainwindow.cpp
index 9d3801e3..6e6a63d4 100644
--- a/src/newui/dmainwindow.cpp
+++ b/src/newui/dmainwindow.cpp
@@ -24,12 +24,12 @@
#include <kconfig.h>
#include <kiconloader.h>
-#include <qtoolbutton.h>
+#include <tqtoolbutton.h>
#include "dtabwidget.h"
#include "docksplitter.h"
-DMainWindow::DMainWindow(QWidget *parent, const char *name)
+DMainWindow::DMainWindow(TQWidget *parent, const char *name)
:KParts::MainWindow(parent, name), m_firstRemoved(false), m_currentWidget(0)
{
loadSettings();
@@ -57,7 +57,7 @@ void DMainWindow::saveSettings()
DMainWindow::~DMainWindow()
{
-/* for (QValueList<QWidget*>::iterator it = m_widgets.begin(); it != m_widgets.end(); ++it)
+/* for (TQValueList<TQWidget*>::iterator it = m_widgets.begin(); it != m_widgets.end(); ++it)
removeWidget(*it);*/
}
@@ -81,7 +81,7 @@ void DMainWindow::createToolWindows()
moveDockWindow(m_rightDock, Qt::DockRight);
}
-void DMainWindow::addWidget(QWidget *widget, const QString &title)
+void DMainWindow::addWidget(TQWidget *widget, const TQString &title)
{
// invalidateActiveTabWidget();
if (m_firstRemoved && m_activeTabWidget == m_tabs.first())
@@ -93,17 +93,17 @@ void DMainWindow::addWidget(QWidget *widget, const QString &title)
addWidget(m_activeTabWidget, widget, title);
}
-void DMainWindow::addWidget(DTabWidget *tab, QWidget *widget, const QString &title)
+void DMainWindow::addWidget(DTabWidget *tab, TQWidget *widget, const TQString &title)
{
- static QPixmap emptyPixmap;
+ static TQPixmap emptyPixmap;
int idx = -1;
if (m_openTabAfterCurrent && (tab->count() > 0))
idx = tab->currentPageIndex() + 1;
if (m_showIconsOnTabs)
{
- const QPixmap *pixmap = widget->icon();
- const QIconSet &icons = (pixmap && (pixmap->size().height() <= 16)) ? *(pixmap) : SmallIcon("kdevelop");
+ const TQPixmap *pixmap = widget->icon();
+ const TQIconSet &icons = (pixmap && (pixmap->size().height() <= 16)) ? *(pixmap) : SmallIcon("kdevelop");
tab->insertTab(widget, icons, title, idx);
}
else
@@ -114,7 +114,7 @@ void DMainWindow::addWidget(DTabWidget *tab, QWidget *widget, const QString &tit
tab->showPage(widget);
}
-void DMainWindow::removeWidget(QWidget *widget)
+void DMainWindow::removeWidget(TQWidget *widget)
{
if (!m_widgets.contains(widget))
return; //not a widget in main window
@@ -125,7 +125,7 @@ void DMainWindow::removeWidget(QWidget *widget)
if (tab->indexOf(widget) >= 0)
{
tab->removePage(widget);
- widget->reparent(0,QPoint(0,0),false);
+ widget->reparent(0,TQPoint(0,0),false);
if (tab->count() == 0)
{
if (tab->closeButton())
@@ -161,8 +161,8 @@ void DMainWindow::removeWidget(QWidget *widget)
if (m_activeTabWidget && m_activeTabWidget->currentPage())
{
//a hack to please multibuffer and actually switch the active part
- QFocusEvent ev(QEvent::FocusIn);
- QApplication::sendEvent(m_activeTabWidget->currentPage(), &ev);
+ TQFocusEvent ev(TQEvent::FocusIn);
+ TQApplication::sendEvent(m_activeTabWidget->currentPage(), &ev);
}
}
@@ -184,7 +184,7 @@ DTabWidget *DMainWindow::splitVertical()
void DMainWindow::invalidateActiveTabWidget()
{
-/* QWidget *focused = m_central->focusWidget();
+/* TQWidget *focused = m_central->focusWidget();
kdDebug(9000) << "invalidate: " << focused << endl;
if (focused == 0)
return;
@@ -208,33 +208,33 @@ DTabWidget *DMainWindow::createTab()
DTabWidget *tab = new DTabWidget(m_central);
m_tabs.append(tab);
if (tab->closeButton())
- connect(tab->closeButton(), SIGNAL(clicked()), this, SLOT(closeTab()));
- connect(tab, SIGNAL(closeRequest(QWidget*)), this, SLOT(closeTab(QWidget*)));
- connect(tab, SIGNAL(contextMenu(QWidget*,const QPoint &)),
- this, SLOT(tabContext(QWidget*,const QPoint &)));
+ connect(tab->closeButton(), TQT_SIGNAL(clicked()), this, TQT_SLOT(closeTab()));
+ connect(tab, TQT_SIGNAL(closeRequest(TQWidget*)), this, TQT_SLOT(closeTab(TQWidget*)));
+ connect(tab, TQT_SIGNAL(contextMenu(TQWidget*,const TQPoint &)),
+ this, TQT_SLOT(tabContext(TQWidget*,const TQPoint &)));
return tab;
}
-bool DMainWindow::eventFilter(QObject *obj, QEvent *ev)
+bool DMainWindow::eventFilter(TQObject *obj, TQEvent *ev)
{
- QWidget *w = (QWidget*)obj;
+ TQWidget *w = (TQWidget*)obj;
if (!m_widgets.contains(w))
return KParts::MainWindow::eventFilter(obj, ev);
- if ((m_currentWidget != w) && (ev->type() == QEvent::FocusIn))
+ if ((m_currentWidget != w) && (ev->type() == TQEvent::FocusIn))
{
m_currentWidget = w;
emit widgetChanged(w);
}
- else if (ev->type() == QEvent::IconChange)
+ else if (ev->type() == TQEvent::IconChange)
{
if (m_widgetTabs.contains(w))
{
DTabWidget *tab = m_widgetTabs[w];
- tab->setTabIconSet(w, w->icon() ? (*(w->icon())) : QPixmap());
+ tab->setTabIconSet(w, w->icon() ? (*(w->icon())) : TQPixmap());
}
}
- else if (ev->type() == QEvent::CaptionChange)
+ else if (ev->type() == TQEvent::CaptionChange)
{
kdDebug(9000) << "caption change" << endl;
DTabWidget *tab = m_widgetTabs[w];
@@ -249,17 +249,17 @@ void DMainWindow::closeTab()
//nothing to do here, should be reimplemented
}
-void DMainWindow::tabContext(QWidget *, const QPoint &)
+void DMainWindow::tabContext(TQWidget *, const TQPoint &)
{
//nothing to do here, should be reimplemented
}
-void DMainWindow::closeTab(QWidget *)
+void DMainWindow::closeTab(TQWidget *)
{
//nothing to do here, should be reimplemented
}
-void DMainWindow::moveWidget(DDockWindow::Position position, QWidget * view, const QString & title)
+void DMainWindow::moveWidget(DDockWindow::Position position, TQWidget * view, const TQString & title)
{
if (m_docks.contains(view))
{
@@ -270,32 +270,32 @@ void DMainWindow::moveWidget(DDockWindow::Position position, QWidget * view, con
}
}
-void DMainWindow::addDockWidget(DDockWindow::Position position, QWidget *view, const QString &title)
+void DMainWindow::addDockWidget(DDockWindow::Position position, TQWidget *view, const TQString &title)
{
toolWindow(position)->addWidget(title, view);
m_docks[view] = position;
- connect(view, SIGNAL(destroyed()), this, SLOT(widgetDestroyed()));
+ connect(view, TQT_SIGNAL(destroyed()), this, TQT_SLOT(widgetDestroyed()));
}
-void DMainWindow::removeDockWidget(QWidget *view)
+void DMainWindow::removeDockWidget(TQWidget *view)
{
toolWindow(m_docks[view])->removeWidget(view);
m_docks.remove(view);
}
-bool DMainWindow::hasDockWidget(QWidget *view)
+bool DMainWindow::hasDockWidget(TQWidget *view)
{
return m_docks.contains(view);
}
-DDockWindow::Position DMainWindow::dockWidgetPosition(QWidget *view)
+DDockWindow::Position DMainWindow::dockWidgetPosition(TQWidget *view)
{
return m_docks[view];
}
void DMainWindow::widgetDestroyed()
{
- QWidget *w = static_cast<QWidget*>(const_cast<QObject*>(sender()));
+ TQWidget *w = static_cast<TQWidget*>(const_cast<TQObject*>(sender()));
if (m_docks.contains(w))
{