summaryrefslogtreecommitdiffstats
path: root/languages/ruby/debugger/dbgtoolbar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'languages/ruby/debugger/dbgtoolbar.cpp')
-rw-r--r--languages/ruby/debugger/dbgtoolbar.cpp92
1 files changed, 46 insertions, 46 deletions
diff --git a/languages/ruby/debugger/dbgtoolbar.cpp b/languages/ruby/debugger/dbgtoolbar.cpp
index 36b42f07..706b6284 100644
--- a/languages/ruby/debugger/dbgtoolbar.cpp
+++ b/languages/ruby/debugger/dbgtoolbar.cpp
@@ -71,10 +71,10 @@ namespace RDBDebugger
// the iconify, close, etc buttons from the window title but again I kept running
// into problems. Instead, I used no decoration and this class. Also this looks
// similar to the KToolBar floating style.
-class DbgMoveHandle : public QFrame
+class DbgMoveHandle : public TQFrame
{
public:
- DbgMoveHandle(DbgToolBar *parent=0, const char * name=0, WFlags f=0);
+ DbgMoveHandle(DbgToolBar *tqparent=0, const char * name=0, WFlags f=0);
virtual ~DbgMoveHandle();
virtual void mousePressEvent(TQMouseEvent *e);
@@ -89,9 +89,9 @@ private:
// **************************************************************************
-DbgMoveHandle::DbgMoveHandle(DbgToolBar *parent, const char * name, WFlags f)
- : TQFrame(parent, name, f),
- toolBar_(parent),
+DbgMoveHandle::DbgMoveHandle(DbgToolBar *tqparent, const char * name, WFlags f)
+ : TQFrame(tqparent, name, f),
+ toolBar_(tqparent),
offset_(TQPoint(0,0)),
moving_(false)
{
@@ -113,21 +113,21 @@ void DbgMoveHandle::mousePressEvent(TQMouseEvent *e)
if (moving_)
return;
- if (e->button() == RightButton) {
+ if (e->button() == Qt::RightButton) {
KPopupMenu *menu = new KPopupMenu(this);
menu->insertTitle(i18n("Debug Toolbar"));
menu->insertItem(i18n("Dock to Panel"),
- parent(), TQT_SLOT(slotDock()));
+ tqparent(), TQT_SLOT(slotDock()));
menu->insertItem(i18n("Dock to Panel && Iconify KDevelop"),
- parent(), TQT_SLOT(slotIconifyAndDock()));
+ tqparent(), TQT_SLOT(slotIconifyAndDock()));
menu->popup(e->globalPos());
} else {
moving_ = true;
- offset_ = parentWidget()->pos() - e->globalPos();
+ offset_ = tqparentWidget()->pos() - e->globalPos();
setFrameStyle(TQFrame::Panel|TQFrame::Sunken);
TQApplication::setOverrideCursor(TQCursor(sizeAllCursor));
- setPalette(TQPalette(colorGroup().background()));
- repaint();
+ setPalette(TQPalette(tqcolorGroup().background()));
+ tqrepaint();
}
}
@@ -140,8 +140,8 @@ void DbgMoveHandle::mouseReleaseEvent(TQMouseEvent *e)
offset_ = TQPoint(0,0);
setFrameStyle(TQFrame::Panel|TQFrame::Raised);
TQApplication::restoreOverrideCursor();
- setPalette(TQPalette(colorGroup().background()));
- repaint();
+ setPalette(TQPalette(tqcolorGroup().background()));
+ tqrepaint();
}
// **************************************************************************
@@ -159,16 +159,16 @@ void DbgMoveHandle::mouseMoveEvent(TQMouseEvent *e)
// **************************************************************************
// **************************************************************************
-// This class adds text _and_ a pixmap to a button. Why doesn't QPushButton
+// This class adds text _and_ a pixmap to a button. Why doesn't TQPushButton
// support that? It only allowed text _or_ pixmap.
-class DbgButton : public QPushButton
+class DbgButton : public TQPushButton
{
public:
DbgButton(const TQPixmap &pixmap, const TQString &text,
- DbgToolBar *parent, const char *name=0);
+ DbgToolBar *tqparent, const char *name=0);
virtual ~DbgButton() {};
void drawButtonLabel(TQPainter *painter);
- TQSize sizeHint() const;
+ TQSize tqsizeHint() const;
private:
TQPixmap pixmap_;
@@ -177,8 +177,8 @@ private:
// **************************************************************************
DbgButton::DbgButton(const TQPixmap& pixmap, const TQString& text,
- DbgToolBar* parent, const char* name)
- : TQPushButton(parent, name),
+ DbgToolBar* tqparent, const char* name)
+ : TQPushButton(tqparent, name),
pixmap_(pixmap)
{
setText(text);
@@ -197,27 +197,27 @@ void DbgButton::drawButtonLabel(TQPainter *painter)
painter->drawPixmap(x, y, pixmap_);
if (hasText) {
- painter->setPen(colorGroup().text());
+ painter->setPen(tqcolorGroup().text());
painter->drawText(height()+2, 0, width()-(height()+2), height(), AlignLeft|AlignVCenter, text());
}
}
// **************************************************************************
-TQSize DbgButton::sizeHint() const
+TQSize DbgButton::tqsizeHint() const
{
if (text().isEmpty())
return pixmap_.size();
else
- return TQPushButton::sizeHint();
+ return TQPushButton::tqsizeHint();
}
// **************************************************************************
// **************************************************************************
// **************************************************************************
-DbgDocker::DbgDocker(TQWidget* parent, DbgToolBar* toolBar, const TQPixmap& pixmap) :
- KSystemTray(parent, "DbgDocker"),
+DbgDocker::DbgDocker(TQWidget* tqparent, DbgToolBar* toolBar, const TQPixmap& pixmap) :
+ KSystemTray(tqparent, "DbgDocker"),
toolBar_(toolBar)
{
setPixmap(pixmap);
@@ -228,17 +228,17 @@ DbgDocker::DbgDocker(TQWidget* parent, DbgToolBar* toolBar, const TQPixmap& pixm
void DbgDocker::mousePressEvent(TQMouseEvent *e)
{
- if (!rect().contains( e->pos()))
+ if (!TQT_TQRECT_OBJECT(rect()).tqcontains( e->pos()))
return;
switch (e->button()) {
- case LeftButton:
+ case Qt::LeftButton:
{
// Not really a click, but it'll hold for the time being !!!
emit clicked();
break;
}
- case RightButton:
+ case Qt::RightButton:
{
KPopupMenu* menu = new KPopupMenu(this);
menu->insertTitle(i18n("Debug Toolbar"));
@@ -257,7 +257,7 @@ void DbgDocker::mousePressEvent(TQMouseEvent *e)
// **************************************************************************
DbgToolBar::DbgToolBar(RubyDebuggerPart* part,
- TQWidget* parent, const char* name)
+ TQWidget* tqparent, const char* name)
: TQFrame(0, name),
part_(part),
activeWindow_(0),
@@ -267,10 +267,10 @@ DbgToolBar::DbgToolBar(RubyDebuggerPart* part,
appIsActive_(false),
docked_(false),
docker_(0),
- dockWindow_(new KSystemTray(parent))
+ dockWindow_(new KSystemTray(tqparent))
{
- winModule_ = new KWinModule(this);
- docker_ = new DbgDocker(parent, this, BarIcon("dbgnext"));
+ winModule_ = new KWinModule(TQT_TQOBJECT(this));
+ docker_ = new DbgDocker(tqparent, this, BarIcon("dbgnext"));
connect(docker_, TQT_SIGNAL(clicked()), part_, TQT_SLOT(slotStepOver()));
// Must have noFocus set so that we can see what window was active.
@@ -284,7 +284,7 @@ DbgToolBar::DbgToolBar(RubyDebuggerPart* part,
// KWin::setType(winId(), NET::Override); // So it has no decoration
KWin::setType(winId(), NET::Dock);
- setFocusPolicy(NoFocus);
+ setFocusPolicy(TQ_NoFocus);
setFrameStyle( TQFrame::Box | TQFrame::Plain );
setLineWidth(4);
setMidLineWidth(0);
@@ -303,8 +303,8 @@ DbgToolBar::DbgToolBar(RubyDebuggerPart* part,
TQPushButton* bStep = new DbgButton(BarIcon("dbgstep"), i18n("Step Into"), this);
TQPushButton* bFinish = new DbgButton(BarIcon("dbgstepout"), i18n("Step Out"), this);
TQPushButton* bRunTo = new DbgButton(BarIcon("dbgrunto"), i18n("Run to Cursor"), this);
- bPrevFocus_ = new DbgButton(BarIcon("dbgmemview"), TQString::null, this);
- bKDevFocus_ = new DbgButton(BarIcon("kdevelop"), TQString::null, this);
+ bPrevFocus_ = new DbgButton(BarIcon("dbgmemview"), TQString(), this);
+ bKDevFocus_ = new DbgButton(BarIcon("kdevelop"), TQString(), this);
connect(bRun, TQT_SIGNAL(clicked()), part_, TQT_SLOT(slotRun()));
connect(bInterrupt, TQT_SIGNAL(clicked()), part_, TQT_SLOT(slotPause()));
@@ -351,12 +351,12 @@ DbgToolBar::DbgToolBar(RubyDebuggerPart* part,
nextLayout->addWidget(bNext);
-// int w = QMAX(bRun->sizeHint().width(), bFinish->sizeHint().width());
-// w = QMAX(w, bInterrupt->sizeHint().width());
-// w = QMAX(w, bView->sizeHint().width());
+// int w = TQMAX(bRun->tqsizeHint().width(), bFinish->tqsizeHint().width());
+// w = TQMAX(w, bInterrupt->tqsizeHint().width());
+// w = TQMAX(w, bView->tqsizeHint().width());
// they should have the same height, so don't be too fussy
-// int h = bFinish->sizeHint().height();
+// int h = bFinish->tqsizeHint().height();
//
// bNext->setMinimumHeight(h);
// bNexti->setMinimumHeight(h);
@@ -390,10 +390,10 @@ void DbgToolBar::slotKdevFocus()
// If anyone has a way of determining what window the app is _actually_ running on
// then please fix and send a patch.
- if (winModule_->activeWindow() != topLevelWidget()->winId())
+ if (winModule_->activeWindow() != tqtopLevelWidget()->winId())
activeWindow_ = winModule_->activeWindow();
- KWin::activateWindow(topLevelWidget()->winId());
+ KWin::activateWindow(tqtopLevelWidget()->winId());
}
// **************************************************************************
@@ -407,7 +407,7 @@ void DbgToolBar::slotPrevFocus()
// If the app is active then the app button is highlighted, otherwise
// kdev button is highlighted.
-void DbgToolBar::slotDbgStatus(const TQString&, int state)
+void DbgToolBar::slotDbgtqStatus(const TQString&, int state)
{
bool appIndicator = state & s_appBusy;
if (appIndicator != appIsActive_) {
@@ -421,11 +421,11 @@ void DbgToolBar::slotDbgStatus(const TQString&, int state)
void DbgToolBar::setAppIndicator(bool appIndicator)
{
if (appIndicator) {
- bPrevFocus_->setPalette(TQPalette(colorGroup().mid()));
- bKDevFocus_->setPalette(TQPalette(colorGroup().background()));
+ bPrevFocus_->setPalette(TQPalette(tqcolorGroup().mid()));
+ bKDevFocus_->setPalette(TQPalette(tqcolorGroup().background()));
} else {
- bPrevFocus_->setPalette(TQPalette(colorGroup().background()));
- bKDevFocus_->setPalette(TQPalette(colorGroup().mid()));
+ bPrevFocus_->setPalette(TQPalette(tqcolorGroup().background()));
+ bKDevFocus_->setPalette(TQPalette(tqcolorGroup().mid()));
}
}
@@ -473,7 +473,7 @@ void DbgToolBar::slotActivateAndUndock()
if (!docked_)
return;
- KWin::activateWindow(topLevelWidget()->winId());
+ KWin::activateWindow(tqtopLevelWidget()->winId());
slotUndock();
}