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.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/newui/dmainwindow.cpp b/src/newui/dmainwindow.cpp
index 6e6a63d4..fb7dd14a 100644
--- a/src/newui/dmainwindow.cpp
+++ b/src/newui/dmainwindow.cpp
@@ -29,8 +29,8 @@
#include "dtabwidget.h"
#include "docksplitter.h"
-DMainWindow::DMainWindow(TQWidget *parent, const char *name)
- :KParts::MainWindow(parent, name), m_firstRemoved(false), m_currentWidget(0)
+DMainWindow::DMainWindow(TQWidget *tqparent, const char *name)
+ :KParts::MainWindow(tqparent, name), m_firstRemoved(false), m_currentWidget(0)
{
loadSettings();
createToolWindows();
@@ -74,16 +74,16 @@ DDockWindow *DMainWindow::toolWindow(DDockWindow::Position position) const
void DMainWindow::createToolWindows()
{
m_bottomDock = new DDockWindow(this, DDockWindow::Bottom);
- moveDockWindow(m_bottomDock, Qt::DockBottom);
+ moveDockWindow(m_bottomDock, TQt::DockBottom);
m_leftDock = new DDockWindow(this, DDockWindow::Left);
- moveDockWindow(m_leftDock, Qt::DockLeft);
+ moveDockWindow(m_leftDock, TQt::DockLeft);
m_rightDock = new DDockWindow(this, DDockWindow::Right);
- moveDockWindow(m_rightDock, Qt::DockRight);
+ moveDockWindow(m_rightDock, TQt::DockRight);
}
void DMainWindow::addWidget(TQWidget *widget, const TQString &title)
{
-// invalidateActiveTabWidget();
+// tqinvalidateActiveTabWidget();
if (m_firstRemoved && m_activeTabWidget == m_tabs.first())
{
m_central->addDock(0, 0, m_activeTabWidget);
@@ -116,10 +116,10 @@ void DMainWindow::addWidget(DTabWidget *tab, TQWidget *widget, const TQString &t
void DMainWindow::removeWidget(TQWidget *widget)
{
- if (!m_widgets.contains(widget))
+ if (!m_widgets.tqcontains(widget))
return; //not a widget in main window
- if (m_widgetTabs.contains(widget))
+ if (m_widgetTabs.tqcontains(widget))
{
DTabWidget *tab = m_widgetTabs[widget];
if (tab->indexOf(widget) >= 0)
@@ -133,7 +133,7 @@ void DMainWindow::removeWidget(TQWidget *widget)
//remove and delete tabwidget if it is not the first one
if (tab != m_tabs.first())
{
- QPair<uint, uint> idx = m_central->indexOf(tab);
+ TQPair<uint, uint> idx = m_central->indexOf(tab);
m_tabs.remove(tab);
m_activeTabWidget = m_tabs.first();
m_central->removeDock(idx.first, idx.second, true);
@@ -175,25 +175,25 @@ DTabWidget *DMainWindow::splitHorizontal()
DTabWidget *DMainWindow::splitVertical()
{
-// invalidateActiveTabWidget();
+// tqinvalidateActiveTabWidget();
int row = m_central->indexOf(m_activeTabWidget).first;
m_activeTabWidget = createTab();
m_central->addDock(row, m_central->numCols(row), m_activeTabWidget);
return m_activeTabWidget;
}
-void DMainWindow::invalidateActiveTabWidget()
+void DMainWindow::tqinvalidateActiveTabWidget()
{
-/* TQWidget *focused = m_central->focusWidget();
- kdDebug(9000) << "invalidate: " << focused << endl;
+/* TQWidget *focused = m_central->tqfocusWidget();
+ kdDebug(9000) << "tqinvalidate: " << focused << endl;
if (focused == 0)
return;
- if (!m_widgets.contains(focused))
+ if (!m_widgets.tqcontains(focused))
{
kdDebug(9000) << " focused is not in m_widgets" << endl;
return;
}
- if (m_widgetTabs.contains(focused))
+ if (m_widgetTabs.tqcontains(focused))
{
kdDebug(9000) << " focused is in m_widgets and m_widgetTabs" << endl;
DTabWidget *tab = m_widgetTabs[focused];
@@ -218,7 +218,7 @@ DTabWidget *DMainWindow::createTab()
bool DMainWindow::eventFilter(TQObject *obj, TQEvent *ev)
{
TQWidget *w = (TQWidget*)obj;
- if (!m_widgets.contains(w))
+ if (!m_widgets.tqcontains(w))
return KParts::MainWindow::eventFilter(obj, ev);
if ((m_currentWidget != w) && (ev->type() == TQEvent::FocusIn))
@@ -228,7 +228,7 @@ bool DMainWindow::eventFilter(TQObject *obj, TQEvent *ev)
}
else if (ev->type() == TQEvent::IconChange)
{
- if (m_widgetTabs.contains(w))
+ if (m_widgetTabs.tqcontains(w))
{
DTabWidget *tab = m_widgetTabs[w];
tab->setTabIconSet(w, w->icon() ? (*(w->icon())) : TQPixmap());
@@ -261,7 +261,7 @@ void DMainWindow::closeTab(TQWidget *)
void DMainWindow::moveWidget(DDockWindow::Position position, TQWidget * view, const TQString & title)
{
- if (m_docks.contains(view))
+ if (m_docks.tqcontains(view))
{
toolWindow(m_docks[view])->removeWidget(view);
@@ -285,7 +285,7 @@ void DMainWindow::removeDockWidget(TQWidget *view)
bool DMainWindow::hasDockWidget(TQWidget *view)
{
- return m_docks.contains(view);
+ return m_docks.tqcontains(view);
}
DDockWindow::Position DMainWindow::dockWidgetPosition(TQWidget *view)
@@ -295,9 +295,9 @@ DDockWindow::Position DMainWindow::dockWidgetPosition(TQWidget *view)
void DMainWindow::widgetDestroyed()
{
- TQWidget *w = static_cast<TQWidget*>(const_cast<TQObject*>(sender()));
+ TQWidget *w = TQT_TQWIDGET(const_cast<TQT_BASE_OBJECT_NAME*>(sender()));
- if (m_docks.contains(w))
+ if (m_docks.tqcontains(w))
{
kdError() << "Widget destroyed before being removed from UI!" << endl;
m_docks.remove(w);
@@ -306,4 +306,4 @@ void DMainWindow::widgetDestroyed()
#include "dmainwindow.moc"
-// kate: space-indent on; indent-width 4; tab-width 4; replace-tabs on
+// kate: space-indent on; indent-width 4; tab-width 4; tqreplace-tabs on