summaryrefslogtreecommitdiffstats
path: root/src/newui/ddockwindow.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
commit48d4a26399959121f33d2bc3bfe51c7827b654fc (patch)
tree5ae5e6e00d3ba330b7b8be9bc097154b6bc739e8 /src/newui/ddockwindow.cpp
parent7e701ace6592d09e1f2c0cf28c7d6d872d78f4f5 (diff)
downloadtdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.tar.gz
tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.zip
TQt4 port kdevelop
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1236710 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/newui/ddockwindow.cpp')
-rw-r--r--src/newui/ddockwindow.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/newui/ddockwindow.cpp b/src/newui/ddockwindow.cpp
index 5f11425d..95b36eab 100644
--- a/src/newui/ddockwindow.cpp
+++ b/src/newui/ddockwindow.cpp
@@ -39,9 +39,9 @@
#include "button.h"
#include "dmainwindow.h"
-DDockWindow::DDockWindow(DMainWindow *parent, Position position)
- :TQDockWindow(TQDockWindow::InDock, parent), m_position(position), m_visible(false),
- m_mainWindow(parent), m_doNotCloseActiveWidget(false), m_toggledButton(0), m_lastContextMenuButton(0)
+DDockWindow::DDockWindow(DMainWindow *tqparent, Position position)
+ :TQDockWindow(TQDockWindow::InDock, tqparent), m_position(position), m_visible(false),
+ m_mainWindow(tqparent), m_doNotCloseActiveWidget(false), m_toggledButton(0), m_lastContextMenuButton(0)
{
setMovingEnabled(false);
setResizeEnabled(true);
@@ -85,9 +85,9 @@ DDockWindow::DDockWindow(DMainWindow *parent, Position position)
m_widgetStack = new TQWidgetStack(this);
m_internalLayout->addWidget(m_widgetStack);
- m_moveToDockLeft = new KAction( i18n("Move to left dock"), 0, this, TQT_SLOT(moveToDockLeft()), this );
- m_moveToDockRight = new KAction( i18n("Move to right dock"), 0, this, TQT_SLOT(moveToDockRight()), this );
- m_moveToDockBottom = new KAction( i18n("Move to bottom dock"), 0, this, TQT_SLOT(moveToDockBottom()), this );
+ m_moveToDockLeft = new KAction( i18n("Move to left dock"), 0, TQT_TQOBJECT(this), TQT_SLOT(moveToDockLeft()), TQT_TQOBJECT(this) );
+ m_moveToDockRight = new KAction( i18n("Move to right dock"), 0, TQT_TQOBJECT(this), TQT_SLOT(moveToDockRight()), TQT_TQOBJECT(this) );
+ m_moveToDockBottom = new KAction( i18n("Move to bottom dock"), 0, TQT_TQOBJECT(this), TQT_SLOT(moveToDockBottom()), TQT_TQOBJECT(this) );
setVisible(m_visible);
@@ -104,7 +104,7 @@ void DDockWindow::setVisible(bool v)
{
//write dock width to the config file
KConfig *config = kapp->config();
- TQString group = TQString("%1").arg(m_name);
+ TQString group = TQString("%1").tqarg(m_name);
config->setGroup(group);
if (m_visible)
@@ -115,13 +115,13 @@ void DDockWindow::setVisible(bool v)
v ? m_widgetStack->show() : m_widgetStack->hide();
m_visible = v;
- m_internalLayout->invalidate();
+ m_internalLayout->tqinvalidate();
if (!m_visible)
{
if (m_position == DDockWindow::Bottom)
- setFixedExtentHeight(m_internalLayout->sizeHint().height());
+ setFixedExtentHeight(m_internalLayout->tqsizeHint().height());
else
- setFixedExtentWidth(m_internalLayout->sizeHint().width());
+ setFixedExtentWidth(m_internalLayout->tqsizeHint().width());
emit hidden();
}
else
@@ -130,12 +130,12 @@ void DDockWindow::setVisible(bool v)
int size = 0;
if (m_position == DDockWindow::Bottom)
{
- size = config->readNumEntry("ViewWidth", m_internalLayout->sizeHint().height());
+ size = config->readNumEntry("ViewWidth", m_internalLayout->tqsizeHint().height());
setFixedExtentHeight(size);
}
else
{
- size = config->readNumEntry("ViewWidth", m_internalLayout->sizeHint().width());
+ size = config->readNumEntry("ViewWidth", m_internalLayout->tqsizeHint().width());
setFixedExtentWidth(size);
}
}
@@ -148,7 +148,7 @@ void DDockWindow::loadSettings()
void DDockWindow::saveSettings()
{
KConfig *config = kapp->config();
- TQString group = TQString("%1").arg(m_name);
+ TQString group = TQString("%1").tqarg(m_name);
int invisibleWidth = 0;
config->setGroup(group);
if (config->hasKey("ViewWidth"))
@@ -200,7 +200,7 @@ void DDockWindow::addWidget(const TQString &title, TQWidget *widget, bool skipAc
//if the widget was selected last time the dock is deleted
//we need to show it
KConfig *config = kapp->config();
- TQString group = TQString("%1").arg(m_name);
+ TQString group = TQString("%1").tqarg(m_name);
config->setGroup(group);
if (config->readEntry("ViewLastWidget") == title)
{
@@ -338,7 +338,7 @@ bool DDockWindow::isActive()
{
if (m_toggledButton)
{
- TQWidget *w = qApp->focusWidget();
+ TQWidget *w = tqApp->tqfocusWidget();
if (!w)
return false;
TQWidget *toolWidget = m_widgets[m_toggledButton];
@@ -347,7 +347,7 @@ bool DDockWindow::isActive()
else
{
do {
- w = (TQWidget*)w->parent();
+ w = (TQWidget*)w->tqparent();
if (w && (w == toolWidget)) return true;
} while (w);
}
@@ -375,7 +375,7 @@ void DDockWindow::selectPrevWidget()
void DDockWindow::contextMenu(TQPopupMenu * menu)
{
- m_lastContextMenuButton = static_cast<Ideal::Button*>( const_cast<TQObject*>( sender() ) );
+ m_lastContextMenuButton = static_cast<Ideal::Button*>( TQT_TQWIDGET(const_cast<TQT_BASE_OBJECT_NAME*>( sender() )) );
menu->insertSeparator();
@@ -404,7 +404,7 @@ void DDockWindow::moveToDockBottom()
void DDockWindow::moveToDock(DDockWindow::Position position )
{
- if ( m_widgets.contains( m_lastContextMenuButton ) )
+ if ( m_widgets.tqcontains( m_lastContextMenuButton ) )
{
mainWindow()->moveWidget( position, m_widgets[ m_lastContextMenuButton ], m_lastContextMenuButton->realTextWithoutAccel() );
}