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.cpp186
1 files changed, 93 insertions, 93 deletions
diff --git a/languages/ruby/debugger/dbgtoolbar.cpp b/languages/ruby/debugger/dbgtoolbar.cpp
index 702c8e83..36b42f07 100644
--- a/languages/ruby/debugger/dbgtoolbar.cpp
+++ b/languages/ruby/debugger/dbgtoolbar.cpp
@@ -31,14 +31,14 @@
#include <kwin.h>
#include <kwinmodule.h>
-#include <qapplication.h>
-#include <qcursor.h>
-#include <qframe.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qpushbutton.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqapplication.h>
+#include <tqcursor.h>
+#include <tqframe.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqpushbutton.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
// **************************************************************************
// **************************************************************************
@@ -77,25 +77,25 @@ public:
DbgMoveHandle(DbgToolBar *parent=0, const char * name=0, WFlags f=0);
virtual ~DbgMoveHandle();
- virtual void mousePressEvent(QMouseEvent *e);
- virtual void mouseReleaseEvent(QMouseEvent *e);
- virtual void mouseMoveEvent(QMouseEvent *e);
+ virtual void mousePressEvent(TQMouseEvent *e);
+ virtual void mouseReleaseEvent(TQMouseEvent *e);
+ virtual void mouseMoveEvent(TQMouseEvent *e);
private:
DbgToolBar* toolBar_;
- QPoint offset_;
+ TQPoint offset_;
bool moving_;
};
// **************************************************************************
DbgMoveHandle::DbgMoveHandle(DbgToolBar *parent, const char * name, WFlags f)
- : QFrame(parent, name, f),
+ : TQFrame(parent, name, f),
toolBar_(parent),
- offset_(QPoint(0,0)),
+ offset_(TQPoint(0,0)),
moving_(false)
{
- setFrameStyle(QFrame::Panel|QFrame::Raised);
+ setFrameStyle(TQFrame::Panel|TQFrame::Raised);
setFixedHeight(12);
}
@@ -107,9 +107,9 @@ DbgMoveHandle::~DbgMoveHandle()
// **************************************************************************
-void DbgMoveHandle::mousePressEvent(QMouseEvent *e)
+void DbgMoveHandle::mousePressEvent(TQMouseEvent *e)
{
- QFrame::mousePressEvent(e);
+ TQFrame::mousePressEvent(e);
if (moving_)
return;
@@ -117,38 +117,38 @@ void DbgMoveHandle::mousePressEvent(QMouseEvent *e)
KPopupMenu *menu = new KPopupMenu(this);
menu->insertTitle(i18n("Debug Toolbar"));
menu->insertItem(i18n("Dock to Panel"),
- parent(), SLOT(slotDock()));
+ parent(), TQT_SLOT(slotDock()));
menu->insertItem(i18n("Dock to Panel && Iconify KDevelop"),
- parent(), SLOT(slotIconifyAndDock()));
+ parent(), TQT_SLOT(slotIconifyAndDock()));
menu->popup(e->globalPos());
} else {
moving_ = true;
offset_ = parentWidget()->pos() - e->globalPos();
- setFrameStyle(QFrame::Panel|QFrame::Sunken);
- QApplication::setOverrideCursor(QCursor(sizeAllCursor));
- setPalette(QPalette(colorGroup().background()));
+ setFrameStyle(TQFrame::Panel|TQFrame::Sunken);
+ TQApplication::setOverrideCursor(TQCursor(sizeAllCursor));
+ setPalette(TQPalette(colorGroup().background()));
repaint();
}
}
// **************************************************************************
-void DbgMoveHandle::mouseReleaseEvent(QMouseEvent *e)
+void DbgMoveHandle::mouseReleaseEvent(TQMouseEvent *e)
{
- QFrame::mouseReleaseEvent(e);
+ TQFrame::mouseReleaseEvent(e);
moving_ = false;
- offset_ = QPoint(0,0);
- setFrameStyle(QFrame::Panel|QFrame::Raised);
- QApplication::restoreOverrideCursor();
- setPalette(QPalette(colorGroup().background()));
+ offset_ = TQPoint(0,0);
+ setFrameStyle(TQFrame::Panel|TQFrame::Raised);
+ TQApplication::restoreOverrideCursor();
+ setPalette(TQPalette(colorGroup().background()));
repaint();
}
// **************************************************************************
-void DbgMoveHandle::mouseMoveEvent(QMouseEvent *e)
+void DbgMoveHandle::mouseMoveEvent(TQMouseEvent *e)
{
- QFrame::mouseMoveEvent(e);
+ TQFrame::mouseMoveEvent(e);
if (!moving_)
return;
@@ -164,21 +164,21 @@ void DbgMoveHandle::mouseMoveEvent(QMouseEvent *e)
class DbgButton : public QPushButton
{
public:
- DbgButton(const QPixmap &pixmap, const QString &text,
+ DbgButton(const TQPixmap &pixmap, const TQString &text,
DbgToolBar *parent, const char *name=0);
virtual ~DbgButton() {};
- void drawButtonLabel(QPainter *painter);
- QSize sizeHint() const;
+ void drawButtonLabel(TQPainter *painter);
+ TQSize sizeHint() const;
private:
- QPixmap pixmap_;
+ TQPixmap pixmap_;
};
// **************************************************************************
-DbgButton::DbgButton(const QPixmap& pixmap, const QString& text,
+DbgButton::DbgButton(const TQPixmap& pixmap, const TQString& text,
DbgToolBar* parent, const char* name)
- : QPushButton(parent, name),
+ : TQPushButton(parent, name),
pixmap_(pixmap)
{
setText(text);
@@ -186,7 +186,7 @@ DbgButton::DbgButton(const QPixmap& pixmap, const QString& text,
// **************************************************************************
-void DbgButton::drawButtonLabel(QPainter *painter)
+void DbgButton::drawButtonLabel(TQPainter *painter)
{
// We always have a pixmap (today...)
// Centre it if there's no text
@@ -204,29 +204,29 @@ void DbgButton::drawButtonLabel(QPainter *painter)
// **************************************************************************
-QSize DbgButton::sizeHint() const
+TQSize DbgButton::sizeHint() const
{
if (text().isEmpty())
return pixmap_.size();
else
- return QPushButton::sizeHint();
+ return TQPushButton::sizeHint();
}
// **************************************************************************
// **************************************************************************
// **************************************************************************
-DbgDocker::DbgDocker(QWidget* parent, DbgToolBar* toolBar, const QPixmap& pixmap) :
+DbgDocker::DbgDocker(TQWidget* parent, DbgToolBar* toolBar, const TQPixmap& pixmap) :
KSystemTray(parent, "DbgDocker"),
toolBar_(toolBar)
{
setPixmap(pixmap);
- QToolTip::add( this, i18n("KDevelop ruby debugger: Click to execute one line of code (\"step\")") );
+ TQToolTip::add( this, i18n("KDevelop ruby debugger: Click to execute one line of code (\"step\")") );
}
// **************************************************************************
-void DbgDocker::mousePressEvent(QMouseEvent *e)
+void DbgDocker::mousePressEvent(TQMouseEvent *e)
{
if (!rect().contains( e->pos()))
return;
@@ -242,8 +242,8 @@ void DbgDocker::mousePressEvent(QMouseEvent *e)
{
KPopupMenu* menu = new KPopupMenu(this);
menu->insertTitle(i18n("Debug Toolbar"));
- menu->insertItem(i18n("Activate"), toolBar_, SLOT(slotUndock()));
- menu->insertItem(i18n("Activate (KDevelop gets focus)"), toolBar_, SLOT(slotActivateAndUndock()));
+ menu->insertItem(i18n("Activate"), toolBar_, TQT_SLOT(slotUndock()));
+ menu->insertItem(i18n("Activate (KDevelop gets focus)"), toolBar_, TQT_SLOT(slotActivateAndUndock()));
menu->popup(e->globalPos());
break;
}
@@ -257,8 +257,8 @@ void DbgDocker::mousePressEvent(QMouseEvent *e)
// **************************************************************************
DbgToolBar::DbgToolBar(RubyDebuggerPart* part,
- QWidget* parent, const char* name)
- : QFrame(0, name),
+ TQWidget* parent, const char* name)
+ : TQFrame(0, name),
part_(part),
activeWindow_(0),
winModule_(0),
@@ -271,7 +271,7 @@ DbgToolBar::DbgToolBar(RubyDebuggerPart* part,
{
winModule_ = new KWinModule(this);
docker_ = new DbgDocker(parent, this, BarIcon("dbgnext"));
- connect(docker_, SIGNAL(clicked()), part_, SLOT(slotStepOver()));
+ connect(docker_, TQT_SIGNAL(clicked()), part_, TQT_SLOT(slotStepOver()));
// Must have noFocus set so that we can see what window was active.
// see slotDbgKdevFocus() for more comments
@@ -285,55 +285,55 @@ DbgToolBar::DbgToolBar(RubyDebuggerPart* part,
KWin::setType(winId(), NET::Dock);
setFocusPolicy(NoFocus);
- setFrameStyle( QFrame::Box | QFrame::Plain );
+ setFrameStyle( TQFrame::Box | TQFrame::Plain );
setLineWidth(4);
setMidLineWidth(0);
- QBoxLayout* topLayout = new QVBoxLayout(this);
+ TQBoxLayout* topLayout = new TQVBoxLayout(this);
- QBoxLayout* nextLayout = new QHBoxLayout();
- QBoxLayout* stepLayout = new QHBoxLayout();
- QBoxLayout* focusLayout = new QHBoxLayout();
+ TQBoxLayout* nextLayout = new TQHBoxLayout();
+ TQBoxLayout* stepLayout = new TQHBoxLayout();
+ TQBoxLayout* focusLayout = new TQHBoxLayout();
DbgMoveHandle* moveHandle= new DbgMoveHandle(this);
- QPushButton* bRun = new DbgButton(BarIcon("dbgrun"), i18n("Run"), this);
- QPushButton* bInterrupt = new DbgButton(BarIcon("player_pause"), i18n("Interrupt"), this);
- QPushButton* bNext = new DbgButton(BarIcon("dbgnext"), i18n("Step Over"), this);
- QPushButton* bStep = new DbgButton(BarIcon("dbgstep"), i18n("Step Into"), this);
- QPushButton* bFinish = new DbgButton(BarIcon("dbgstepout"), i18n("Step Out"), this);
- QPushButton* bRunTo = new DbgButton(BarIcon("dbgrunto"), i18n("Run to Cursor"), this);
- bPrevFocus_ = new DbgButton(BarIcon("dbgmemview"), QString::null, this);
- bKDevFocus_ = new DbgButton(BarIcon("kdevelop"), QString::null, this);
-
- connect(bRun, SIGNAL(clicked()), part_, SLOT(slotRun()));
- connect(bInterrupt, SIGNAL(clicked()), part_, SLOT(slotPause()));
- connect(bNext, SIGNAL(clicked()), part_, SLOT(slotStepOver()));
- connect(bStep, SIGNAL(clicked()), part_, SLOT(slotStepInto()));
- connect(bFinish, SIGNAL(clicked()), part_, SLOT(slotStepOut()));
- connect(bRunTo, SIGNAL(clicked()), part_, SLOT(slotRunToCursor()));
- connect(bKDevFocus_, SIGNAL(clicked()), this, SLOT(slotKdevFocus()));
- connect(bPrevFocus_, SIGNAL(clicked()), this, SLOT(slotPrevFocus()));
-
- QToolTip::add( bRun, i18n("Continue with application execution, may start the application") );
- QToolTip::add( bInterrupt, i18n("Interrupt the application execution") );
- QToolTip::add( bNext, i18n("Execute one line of code, but run through methods") );
- QToolTip::add( bStep, i18n("Execute one line of code, stepping into methods if appropriate") );
- QToolTip::add( bFinish, i18n("Execute to end of current stack frame") );
- QToolTip::add( bRunTo, i18n("Continues execution until the cursor position is reached.") );
- QToolTip::add( bKDevFocus_, i18n("Set focus on KDevelop") );
- QToolTip::add( bPrevFocus_, i18n("Set focus on window that had focus when KDevelop got focus") );
-
- QWhatsThis::add( bRun, i18n("Continue with application execution. May start the application.") );
- QWhatsThis::add( bInterrupt, i18n("Interrupt the application execution.") );
- QWhatsThis::add( bNext, i18n("Execute one line of code, but run through methods.") );
-
- QWhatsThis::add( bStep, i18n("Execute one line of code, stepping into methods if appropriate.") );
+ TQPushButton* bRun = new DbgButton(BarIcon("dbgrun"), i18n("Run"), this);
+ TQPushButton* bInterrupt = new DbgButton(BarIcon("player_pause"), i18n("Interrupt"), this);
+ TQPushButton* bNext = new DbgButton(BarIcon("dbgnext"), i18n("Step Over"), this);
+ 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);
+
+ connect(bRun, TQT_SIGNAL(clicked()), part_, TQT_SLOT(slotRun()));
+ connect(bInterrupt, TQT_SIGNAL(clicked()), part_, TQT_SLOT(slotPause()));
+ connect(bNext, TQT_SIGNAL(clicked()), part_, TQT_SLOT(slotStepOver()));
+ connect(bStep, TQT_SIGNAL(clicked()), part_, TQT_SLOT(slotStepInto()));
+ connect(bFinish, TQT_SIGNAL(clicked()), part_, TQT_SLOT(slotStepOut()));
+ connect(bRunTo, TQT_SIGNAL(clicked()), part_, TQT_SLOT(slotRunToCursor()));
+ connect(bKDevFocus_, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotKdevFocus()));
+ connect(bPrevFocus_, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotPrevFocus()));
+
+ TQToolTip::add( bRun, i18n("Continue with application execution, may start the application") );
+ TQToolTip::add( bInterrupt, i18n("Interrupt the application execution") );
+ TQToolTip::add( bNext, i18n("Execute one line of code, but run through methods") );
+ TQToolTip::add( bStep, i18n("Execute one line of code, stepping into methods if appropriate") );
+ TQToolTip::add( bFinish, i18n("Execute to end of current stack frame") );
+ TQToolTip::add( bRunTo, i18n("Continues execution until the cursor position is reached.") );
+ TQToolTip::add( bKDevFocus_, i18n("Set focus on KDevelop") );
+ TQToolTip::add( bPrevFocus_, i18n("Set focus on window that had focus when KDevelop got focus") );
+
+ TQWhatsThis::add( bRun, i18n("Continue with application execution. May start the application.") );
+ TQWhatsThis::add( bInterrupt, i18n("Interrupt the application execution.") );
+ TQWhatsThis::add( bNext, i18n("Execute one line of code, but run through methods.") );
+
+ TQWhatsThis::add( bStep, i18n("Execute one line of code, stepping into methods if appropriate.") );
- QWhatsThis::add( bFinish, i18n("Execute to end of current stack frame.") );
- QWhatsThis::add( bRunTo, i18n("Continues execution until the cursor position is reached.") );
- QWhatsThis::add( bKDevFocus_, i18n("Set focus on KDevelop.") );
- QWhatsThis::add( bPrevFocus_, i18n("Set focus on window that had focus when KDevelop got focus.") );
+ TQWhatsThis::add( bFinish, i18n("Execute to end of current stack frame.") );
+ TQWhatsThis::add( bRunTo, i18n("Continues execution until the cursor position is reached.") );
+ TQWhatsThis::add( bKDevFocus_, i18n("Set focus on KDevelop.") );
+ TQWhatsThis::add( bPrevFocus_, i18n("Set focus on window that had focus when KDevelop got focus.") );
topLayout->addWidget(moveHandle);
topLayout->addWidget(bRun);
@@ -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 QString&, int state)
+void DbgToolBar::slotDbgStatus(const TQString&, int state)
{
bool appIndicator = state & s_appBusy;
if (appIndicator != appIsActive_) {
@@ -421,11 +421,11 @@ void DbgToolBar::slotDbgStatus(const QString&, int state)
void DbgToolBar::setAppIndicator(bool appIndicator)
{
if (appIndicator) {
- bPrevFocus_->setPalette(QPalette(colorGroup().mid()));
- bKDevFocus_->setPalette(QPalette(colorGroup().background()));
+ bPrevFocus_->setPalette(TQPalette(colorGroup().mid()));
+ bKDevFocus_->setPalette(TQPalette(colorGroup().background()));
} else {
- bPrevFocus_->setPalette(QPalette(colorGroup().background()));
- bKDevFocus_->setPalette(QPalette(colorGroup().mid()));
+ bPrevFocus_->setPalette(TQPalette(colorGroup().background()));
+ bKDevFocus_->setPalette(TQPalette(colorGroup().mid()));
}
}