summaryrefslogtreecommitdiffstats
path: root/src/libgui/breakpoint_view.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-30 00:15:53 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-30 00:15:53 +0000
commit0aaa8e3fc8f8a1481333b564f0922277c8d8ad59 (patch)
treeb95c0ca86c4876dd139af376b9f4afd8917cf0cd /src/libgui/breakpoint_view.cpp
parentb79a2c28534cf09987eeeba3077fff9236df182a (diff)
downloadpiklab-0aaa8e3fc8f8a1481333b564f0922277c8d8ad59.tar.gz
piklab-0aaa8e3fc8f8a1481333b564f0922277c8d8ad59.zip
TQt4 port piklab
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/piklab@1238822 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/libgui/breakpoint_view.cpp')
-rw-r--r--src/libgui/breakpoint_view.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/libgui/breakpoint_view.cpp b/src/libgui/breakpoint_view.cpp
index 6f49aac..99f711f 100644
--- a/src/libgui/breakpoint_view.cpp
+++ b/src/libgui/breakpoint_view.cpp
@@ -8,9 +8,9 @@
***************************************************************************/
#include "breakpoint_view.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include "main_global.h"
#include "editor_manager.h"
@@ -20,7 +20,7 @@
//----------------------------------------------------------------------------
void Breakpoint::updateActions(const Data *data)
{
- bool hasBreakpoint = (data ? Breakpoint::list().contains(*data) : false);
+ bool hasBreakpoint = (data ? Breakpoint::list().tqcontains(*data) : false);
Main::action("toggle_breakpoint")->setText(hasBreakpoint ? i18n("Remove breakpoint") : i18n("Set breakpoint"));
Main::action("toggle_breakpoint")->setEnabled(data);
bool isActive = (hasBreakpoint ? Breakpoint::list().state(*data)==Breakpoint::Active : false);
@@ -29,22 +29,22 @@ void Breakpoint::updateActions(const Data *data)
}
//----------------------------------------------------------------------------
-Breakpoint::ListViewItem::ListViewItem(ListView *parent, const Data &data)
- : KListViewItem(parent), _data(data)
+Breakpoint::ListViewItem::ListViewItem(ListView *tqparent, const Data &data)
+ : KListViewItem(tqparent), _data(data)
{}
//----------------------------------------------------------------------------
-Breakpoint::View::View(QWidget *parent)
- : QWidget(parent, "breakpoints_view"), GenericView(Breakpoint::list()),
+Breakpoint::View::View(TQWidget *tqparent)
+ : TQWidget(tqparent, "breakpoints_view"), GenericView(Breakpoint::list()),
_currentData(0)
{
- QVBoxLayout *top = new QVBoxLayout(this);
+ TQVBoxLayout *top = new TQVBoxLayout(this);
_listview = new ListView(this);
- connect(_listview, SIGNAL(clicked(QListViewItem *)), SLOT(itemClicked(QListViewItem *)));
- connect(_listview, SIGNAL(contextMenuRequested(QListViewItem *, const QPoint &, int)),
- SLOT(contextMenu(QListViewItem *, const QPoint &, int)));
+ connect(_listview, TQT_SIGNAL(clicked(TQListViewItem *)), TQT_SLOT(itemClicked(TQListViewItem *)));
+ connect(_listview, TQT_SIGNAL(contextMenuRequested(TQListViewItem *, const TQPoint &, int)),
+ TQT_SLOT(contextMenu(TQListViewItem *, const TQPoint &, int)));
_listview->setAllColumnsShowFocus(true);
- _listview->addColumn(i18n("Status"));
+ _listview->addColumn(i18n("tqStatus"));
_listview->addColumn(i18n("Location"));
_listview->addColumn(i18n("Address"));
top->addWidget(_listview);
@@ -58,7 +58,7 @@ void Breakpoint::View::updateView()
const Data &data = Breakpoint::list().data(i);
KListViewItem *item = new ListViewItem(_listview, data);
item->setPixmap(0, TextEditor::pixmap(Debugger::manager->breakpointType(data)));
- item->setText(1, data.url.filename() + ":" + QString::number(data.line));
+ item->setText(1, data.url.filename() + ":" + TQString::number(data.line));
Address address = Breakpoint::list().address(data);
if ( address.isValid() ) item->setText(2, toHexLabelAbs(address));
else if ( Debugger::manager->coff() ) item->setText(2, i18n("Non-code breakpoint"));
@@ -66,18 +66,18 @@ void Breakpoint::View::updateView()
}
}
-void Breakpoint::View::itemClicked(QListViewItem *item)
+void Breakpoint::View::itemClicked(TQListViewItem *item)
{
if ( item==0 ) return;
const Data &data = static_cast<ListViewItem *>(item)->data();
Address address = Breakpoint::list().address(data);
- TextEditor *editor = ::qt_cast<TextEditor *>(Main::currentEditor());
+ TextEditor *editor = ::tqqt_cast<TextEditor *>(Main::currentEditor());
const Coff::TextObject *coff = Debugger::manager->coff();
int line = -1;
if ( coff && editor && editor->fileType()==PURL::Coff && address.isValid() )
line = coff->lineForAddress(editor->url(), address);
if ( line==-1 ) {
- editor = ::qt_cast<TextEditor *>(Main::editorManager().openEditor(data.url));
+ editor = ::tqqt_cast<TextEditor *>(Main::editorManager().openEditor(data.url));
line = data.line;
}
if ( editor==0 ) return;
@@ -85,7 +85,7 @@ void Breakpoint::View::itemClicked(QListViewItem *item)
editor->setCursor(line, 0);
}
-void Breakpoint::View::contextMenu(QListViewItem *item, const QPoint &pos, int)
+void Breakpoint::View::contextMenu(TQListViewItem *item, const TQPoint &pos, int)
{
_currentData = (item ? &static_cast<ListViewItem *>(item)->data() : 0);
updateActions(_currentData);