From d6f8bbb45b267065a6907e71ff9c98bb6d161241 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:56:07 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- languages/ruby/debugger/rdbbreakpointwidget.cpp | 178 ++++++++++++------------ 1 file changed, 89 insertions(+), 89 deletions(-) (limited to 'languages/ruby/debugger/rdbbreakpointwidget.cpp') diff --git a/languages/ruby/debugger/rdbbreakpointwidget.cpp b/languages/ruby/debugger/rdbbreakpointwidget.cpp index e31831de..b9ead060 100644 --- a/languages/ruby/debugger/rdbbreakpointwidget.cpp +++ b/languages/ruby/debugger/rdbbreakpointwidget.cpp @@ -31,16 +31,16 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -73,7 +73,7 @@ class BreakpointTableRow : public QTableItem { public: - BreakpointTableRow(QTable* table, EditType editType, Breakpoint* bp); + BreakpointTableRow(TQTable* table, EditType editType, Breakpoint* bp); ~BreakpointTableRow(); bool match (Breakpoint* bp) const; @@ -93,9 +93,9 @@ private: /***************************************************************************/ /***************************************************************************/ -BreakpointTableRow::BreakpointTableRow(QTable* parent, EditType editType, +BreakpointTableRow::BreakpointTableRow(TQTable* parent, EditType editType, Breakpoint* bp) : - QTableItem(parent, editType, ""), + TQTableItem(parent, editType, ""), m_breakpoint(bp) { appendEmptyRow(); @@ -133,7 +133,7 @@ void BreakpointTableRow::appendEmptyRow() table()->setItem(row, Control, this); - QCheckTableItem* cti = new QCheckTableItem( table(), ""); + TQCheckTableItem* cti = new TQCheckTableItem( table(), ""); table()->setItem(row, Enable, cti); } @@ -143,15 +143,15 @@ void BreakpointTableRow::setRow() { if ( m_breakpoint ) { - QTableItem *item = table()->item ( row(), Enable ); + TQTableItem *item = table()->item ( row(), Enable ); Q_ASSERT(item->rtti() == 2); - ((QCheckTableItem*)item)->setChecked(m_breakpoint->isEnabled()); + ((TQCheckTableItem*)item)->setChecked(m_breakpoint->isEnabled()); - QString status=m_breakpoint->statusDisplay(m_activeFlag); + TQString status=m_breakpoint->statusDisplay(m_activeFlag); table()->setText(row(), Status, status); - QString displayType = m_breakpoint->displayType(); + TQString displayType = m_breakpoint->displayType(); table()->setText(row(), Location, m_breakpoint->location()); if (m_breakpoint->isTemporary()) @@ -168,44 +168,44 @@ void BreakpointTableRow::setRow() /***************************************************************************/ /***************************************************************************/ -RDBBreakpointWidget::RDBBreakpointWidget(QWidget *parent, const char *name) : - QHBox(parent, name) +RDBBreakpointWidget::RDBBreakpointWidget(TQWidget *parent, const char *name) : + TQHBox(parent, name) { - QFrame* toolbar = new QFrame( this ); - QVBoxLayout *l = new QVBoxLayout(toolbar, 0, 0); + TQFrame* toolbar = new TQFrame( this ); + TQVBoxLayout *l = new TQVBoxLayout(toolbar, 0, 0); - toolbar->setFrameStyle( QFrame::ToolBarPanel | QFrame::Plain ); + toolbar->setFrameStyle( TQFrame::ToolBarPanel | TQFrame::Plain ); toolbar->setLineWidth( 0 ); - m_add = new QToolButton( toolbar, "add breakpoint" ); + m_add = new TQToolButton( toolbar, "add breakpoint" ); m_add->setPixmap ( SmallIcon ( "breakpoint_add" ) ); - QToolTip::add ( m_add, i18n ( "Add empty breakpoint" ) + I18N_NOOP(" ")); - QWhatsThis::add( m_add, i18n("Add empty breakpoint

Shows a popup menu that allows you to choose " + TQToolTip::add ( m_add, i18n ( "Add empty breakpoint" ) + I18N_NOOP(" ")); + TQWhatsThis::add( m_add, i18n("Add empty breakpoint

Shows a popup menu that allows you to choose " "the type of breakpoint, then adds a breakpoint of the selected type to the breakpoints list.")); - m_delete = new QToolButton( toolbar, "delete breakpoint" ); + m_delete = new TQToolButton( toolbar, "delete breakpoint" ); m_delete->setPixmap ( SmallIcon ( "breakpoint_delete" ) ); - QToolTip::add ( m_delete, i18n ( "Delete selected breakpoint" ) + I18N_NOOP(" ") ); - QWhatsThis::add( m_delete, i18n("Delete selected breakpoint

Deletes the selected breakpoint in the breakpoints list.")); + TQToolTip::add ( m_delete, i18n ( "Delete selected breakpoint" ) + I18N_NOOP(" ") ); + TQWhatsThis::add( m_delete, i18n("Delete selected breakpoint

Deletes the selected breakpoint in the breakpoints list.")); - m_edit = new QToolButton( toolbar, "edit breakpoint" ); + m_edit = new TQToolButton( toolbar, "edit breakpoint" ); m_edit->setPixmap ( SmallIcon ( "breakpoint_edit" ) ); - QToolTip::add ( m_edit, i18n ( "Edit selected breakpoint" ) + I18N_NOOP(" ") ); - QWhatsThis::add( m_edit, i18n("Edit selected breakpoint

Allows to edit location, condition and ignore count properties of the selected breakpoint in the breakpoints list.")); + TQToolTip::add ( m_edit, i18n ( "Edit selected breakpoint" ) + I18N_NOOP(" ") ); + TQWhatsThis::add( m_edit, i18n("Edit selected breakpoint

Allows to edit location, condition and ignore count properties of the selected breakpoint in the breakpoints list.")); - m_removeAll = new QToolButton( toolbar, "Delete all breakppoints" ); + m_removeAll = new TQToolButton( toolbar, "Delete all breakppoints" ); m_removeAll->setPixmap ( SmallIcon ( "breakpoint_delete_all" ) ); - QToolTip::add ( m_removeAll, i18n ( "Remove all breakpoints" ) ); - QWhatsThis::add( m_removeAll, i18n("Remove all breakpoints

Removes all breakpoints in the project.")); + TQToolTip::add ( m_removeAll, i18n ( "Remove all breakpoints" ) ); + TQWhatsThis::add( m_removeAll, i18n("Remove all breakpoints

Removes all breakpoints in the project.")); l->addWidget(m_add); l->addWidget(m_edit); l->addWidget(m_delete); l->addWidget(m_removeAll); - QSpacerItem* spacer = new QSpacerItem( 5, 5, QSizePolicy::Minimum, QSizePolicy::Expanding ); + TQSpacerItem* spacer = new TQSpacerItem( 5, 5, TQSizePolicy::Minimum, TQSizePolicy::Expanding ); l->addItem(spacer); - QPopupMenu *addMenu = new QPopupMenu( this ); + TQPopupMenu *addMenu = new TQPopupMenu( this ); addMenu->insertItem( i18n( "File:line" ), BP_TYPE_FilePos ); addMenu->insertItem( i18n( "Watchpoint" ), BP_TYPE_Watchpoint ); addMenu->insertItem( i18n( "Catchpoint" ), BP_TYPE_Catchpoint ); @@ -214,17 +214,17 @@ RDBBreakpointWidget::RDBBreakpointWidget(QWidget *parent, const char *name) : m_add->setPopupDelay(1); m_table = new RDBTable(0, numCols, this, name); - m_table->setSelectionMode(QTable::SingleRow); + m_table->setSelectionMode(TQTable::SingleRow); m_table->setShowGrid (false); m_table->setLeftMargin(0); - m_table->setFocusStyle(QTable::FollowStyle); + m_table->setFocusStyle(TQTable::FollowStyle); m_table->hideColumn(Control); m_table->setColumnReadOnly(Type, true); m_table->setColumnReadOnly(Status, true); m_table->setColumnWidth( Enable, 20); - QHeader *header = m_table->horizontalHeader(); + TQHeader *header = m_table->horizontalHeader(); header->setLabel( Enable, "" ); header->setLabel( Type, i18n("Type") ); @@ -233,40 +233,40 @@ RDBBreakpointWidget::RDBBreakpointWidget(QWidget *parent, const char *name) : m_table->show(); - m_ctxMenu = new QPopupMenu( this ); + m_ctxMenu = new TQPopupMenu( this ); m_ctxMenu->insertItem( i18n( "Show" ), BW_ITEM_Show ); m_ctxMenu->insertItem( i18n( "Edit" ), BW_ITEM_Edit ); m_ctxMenu->insertItem( i18n( "Disable" ), BW_ITEM_Disable ); m_ctxMenu->insertItem( i18n( "Delete" ), BW_ITEM_Delete ); - connect( addMenu, SIGNAL(activated(int)), - this, SLOT(slotAddBlankBreakpoint(int)) ); - connect( m_delete, SIGNAL(clicked()), - this, SLOT(slotRemoveBreakpoint()) ); - connect( m_edit, SIGNAL(clicked()), - this, SLOT(slotEditBreakpoint()) ); - connect( m_removeAll, SIGNAL(clicked()), - this, SLOT(slotRemoveAllBreakpoints()) ); + connect( addMenu, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotAddBlankBreakpoint(int)) ); + connect( m_delete, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotRemoveBreakpoint()) ); + connect( m_edit, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotEditBreakpoint()) ); + connect( m_removeAll, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotRemoveAllBreakpoints()) ); - connect( m_table, SIGNAL(contextMenuRequested(int, int, const QPoint &)), - this, SLOT(slotContextMenuShow(int, int, const QPoint & )) ); - connect( m_ctxMenu, SIGNAL(activated(int)), - this, SLOT(slotContextMenuSelect(int)) ); + connect( m_table, TQT_SIGNAL(contextMenuRequested(int, int, const TQPoint &)), + this, TQT_SLOT(slotContextMenuShow(int, int, const TQPoint & )) ); + connect( m_ctxMenu, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotContextMenuSelect(int)) ); - connect( m_table, SIGNAL(doubleClicked(int, int, int, const QPoint &)), - this, SLOT(slotRowDoubleClicked(int, int, int, const QPoint &))); + connect( m_table, TQT_SIGNAL(doubleClicked(int, int, int, const TQPoint &)), + this, TQT_SLOT(slotRowDoubleClicked(int, int, int, const TQPoint &))); - connect( m_table, SIGNAL(valueChanged(int, int)), - this, SLOT(slotNewValue(int, int))); + connect( m_table, TQT_SIGNAL(valueChanged(int, int)), + this, TQT_SLOT(slotNewValue(int, int))); - connect( m_table, SIGNAL(returnPressed()), - this, SLOT(slotEditBreakpoint())); -// connect( m_table, SIGNAL(f2Pressed()), -// this, SLOT(slotEditBreakpoint())); - connect( m_table, SIGNAL(deletePressed()), - this, SLOT(slotRemoveBreakpoint())); - connect( m_table, SIGNAL(insertPressed()), - this, SLOT(slotAddBreakpoint())); + connect( m_table, TQT_SIGNAL(returnPressed()), + this, TQT_SLOT(slotEditBreakpoint())); +// connect( m_table, TQT_SIGNAL(f2Pressed()), +// this, TQT_SLOT(slotEditBreakpoint())); + connect( m_table, TQT_SIGNAL(deletePressed()), + this, TQT_SLOT(slotRemoveBreakpoint())); + connect( m_table, TQT_SIGNAL(insertPressed()), + this, TQT_SLOT(slotAddBreakpoint())); } /***************************************************************************/ @@ -362,7 +362,7 @@ BreakpointTableRow* RDBBreakpointWidget::findKey(int BPKey) BreakpointTableRow* RDBBreakpointWidget::addBreakpoint(Breakpoint *bp) { BreakpointTableRow* btr = - new BreakpointTableRow( m_table, QTableItem::WhenCurrent, bp ); + new BreakpointTableRow( m_table, TQTableItem::WhenCurrent, bp ); emit publishBPState(*bp); return btr; } @@ -394,7 +394,7 @@ void RDBBreakpointWidget::removeBreakpoint(BreakpointTableRow* btr) /***************************************************************************/ -void RDBBreakpointWidget::slotToggleBreakpoint(const QString &fileName, int lineNum) +void RDBBreakpointWidget::slotToggleBreakpoint(const TQString &fileName, int lineNum) { FilePosBreakpoint *fpBP = new FilePosBreakpoint(fileName, lineNum+1); @@ -410,7 +410,7 @@ void RDBBreakpointWidget::slotToggleBreakpoint(const QString &fileName, int line /***************************************************************************/ -void RDBBreakpointWidget::slotToggleBreakpointEnabled(const QString &fileName, int lineNum) +void RDBBreakpointWidget::slotToggleBreakpointEnabled(const TQString &fileName, int lineNum) { FilePosBreakpoint *fpBP = new FilePosBreakpoint(fileName, lineNum+1); @@ -426,7 +426,7 @@ void RDBBreakpointWidget::slotToggleBreakpointEnabled(const QString &fileName, i /***************************************************************************/ -void RDBBreakpointWidget::slotToggleWatchpoint(const QString &varName) +void RDBBreakpointWidget::slotToggleWatchpoint(const TQString &varName) { Watchpoint *watchpoint = new Watchpoint(varName, false, true); BreakpointTableRow* btr = find(watchpoint); @@ -482,7 +482,7 @@ void RDBBreakpointWidget::slotParseRDBBrkptList(char *str) // breakpoint list we can trim the breakpoints that have been // removed (temporary breakpoints do this) m_activeFlag++; - QRegExp breakpoint_re("(\\d+) [^:]+:\\d+"); + TQRegExp breakpoint_re("(\\d+) [^:]+:\\d+"); int pos = 0; pos = breakpoint_re.search(str, pos); @@ -504,7 +504,7 @@ void RDBBreakpointWidget::slotParseRDBBrkptList(char *str) str = strstr(str, "Watchpoints:"); if (str != 0) { - QRegExp watchpoint_re("(\\d+) [^\n]+\n"); + TQRegExp watchpoint_re("(\\d+) [^\n]+\n"); int pos = 0; pos = watchpoint_re.search(str, pos); @@ -549,8 +549,8 @@ void RDBBreakpointWidget::slotParseRDBBreakpointSet(char *str, int BPKey) Breakpoint *bp = btr->breakpoint(); bp->setDbgProcessing(false); - QRegExp breakpoint_re("Set breakpoint (\\d+) at [^:]+:\\d+"); - QRegExp watchpoint_re("Set watchpoint (\\d+)"); + TQRegExp breakpoint_re("Set breakpoint (\\d+) at [^:]+:\\d+"); + TQRegExp watchpoint_re("Set watchpoint (\\d+)"); int id = 0; if (breakpoint_re.search(str, 0) != -1) { @@ -596,7 +596,7 @@ void RDBBreakpointWidget::slotAddBlankBreakpoint(int idx) if (btr) { - QTableSelection ts; + TQTableSelection ts; ts.init(btr->row(), 0); ts.expandTo(btr->row(), numCols ); m_table->addSelection(ts); @@ -632,7 +632,7 @@ void RDBBreakpointWidget::slotRemoveAllBreakpoints() /***************************************************************************/ -void RDBBreakpointWidget::slotRowDoubleClicked(int row, int col, int btn, const QPoint &) +void RDBBreakpointWidget::slotRowDoubleClicked(int row, int col, int btn, const TQPoint &) { if ( btn == Qt::LeftButton ) { @@ -651,7 +651,7 @@ void RDBBreakpointWidget::slotRowDoubleClicked(int row, int col, int btn, const } } -void RDBBreakpointWidget::slotContextMenuShow( int row, int /*col*/, const QPoint &mousePos ) +void RDBBreakpointWidget::slotContextMenuShow( int row, int /*col*/, const TQPoint &mousePos ) { BreakpointTableRow *btr = (BreakpointTableRow *)m_table->item( row, Control ); @@ -718,7 +718,7 @@ void RDBBreakpointWidget::slotContextMenuSelect( int item ) /***************************************************************************/ -void RDBBreakpointWidget::slotEditRow(int row, int col, const QPoint &) +void RDBBreakpointWidget::slotEditRow(int row, int col, const TQPoint &) { // kdDebug(9012) << "in slotEditRow row=" << row << endl; BreakpointTableRow* btr = (BreakpointTableRow *) m_table->item(row, Control); @@ -745,7 +745,7 @@ void RDBBreakpointWidget::slotNewValue(int row, int col) case Enable: { - QCheckTableItem *item = (QCheckTableItem*)m_table->item ( row, Enable ); + TQCheckTableItem *item = (TQCheckTableItem*)m_table->item ( row, Enable ); if ( item->isChecked() != bp->isEnabled() ) { bp->setEnabled(item->isChecked()); @@ -788,7 +788,7 @@ void RDBBreakpointWidget::slotNewValue(int row, int col) /***************************************************************************/ -void RDBBreakpointWidget::slotEditBreakpoint(const QString &fileName, int lineNum) +void RDBBreakpointWidget::slotEditBreakpoint(const TQString &fileName, int lineNum) { FilePosBreakpoint *fpBP = new FilePosBreakpoint(fileName, lineNum+1); @@ -797,7 +797,7 @@ void RDBBreakpointWidget::slotEditBreakpoint(const QString &fileName, int lineNu if (btr) { - QTableSelection ts; + TQTableSelection ts; ts.init(btr->row(), 0); ts.expandTo(btr->row(), numCols); m_table->addSelection(ts); @@ -815,21 +815,21 @@ void RDBBreakpointWidget::slotEditBreakpoint() /***************************************************************************/ -void RDBBreakpointWidget::savePartialProjectSession(QDomElement* el) +void RDBBreakpointWidget::savePartialProjectSession(TQDomElement* el) { - QDomDocument domDoc = el->ownerDocument(); + TQDomDocument domDoc = el->ownerDocument(); if (domDoc.isNull()) return; - QDomElement breakpointListEl = domDoc.createElement("breakpointList"); + TQDomElement breakpointListEl = domDoc.createElement("breakpointList"); for ( int row = 0; row < m_table->numRows(); row++ ) { BreakpointTableRow* btr = (BreakpointTableRow *) m_table->item(row, Control); Breakpoint* bp = btr->breakpoint(); - QDomElement breakpointEl = - domDoc.createElement("breakpoint"+QString::number(row)); + TQDomElement breakpointEl = + domDoc.createElement("breakpoint"+TQString::number(row)); breakpointEl.setAttribute("type", bp->type()); breakpointEl.setAttribute("location", bp->location(false)); @@ -844,12 +844,12 @@ void RDBBreakpointWidget::savePartialProjectSession(QDomElement* el) /***************************************************************************/ -void RDBBreakpointWidget::restorePartialProjectSession(const QDomElement* el) +void RDBBreakpointWidget::restorePartialProjectSession(const TQDomElement* el) { - QDomElement breakpointListEl = el->namedItem("breakpointList").toElement(); + TQDomElement breakpointListEl = el->namedItem("breakpointList").toElement(); if (!breakpointListEl.isNull()) { - QDomElement breakpointEl; + TQDomElement breakpointEl; for (breakpointEl = breakpointListEl.firstChild().toElement(); !breakpointEl.isNull(); breakpointEl = breakpointEl.nextSibling().toElement()) @@ -910,7 +910,7 @@ void RDBBreakpointWidget::slotAddBreakpoint( ) /***************************************************************************/ -void RDBBreakpointWidget::focusInEvent( QFocusEvent */* e*/ ) +void RDBBreakpointWidget::focusInEvent( TQFocusEvent */* e*/ ) { m_table->setFocus(); } -- cgit v1.2.1