X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fgui%2Fdebug%2Fmemorybrowser.cpp;h=b2d2170f5ba308666541cccff30170a292afbce8;hb=dffa89ebdee4d328a8e166b30fcdf38a3fc54b28;hp=7acc132969f66d7efe9bf97526b73fab125ae4fa;hpb=e82391f9b8113450e84d7178b61076f54e7cfa81;p=virtualjaguar diff --git a/src/gui/debug/memorybrowser.cpp b/src/gui/debug/memorybrowser.cpp index 7acc132..b2d2170 100644 --- a/src/gui/debug/memorybrowser.cpp +++ b/src/gui/debug/memorybrowser.cpp @@ -22,10 +22,18 @@ MemoryBrowserWindow::MemoryBrowserWindow(QWidget * parent/*= 0*/): QWidget(paren // layout(new QVBoxLayout), text(new QTextBrowser), layout(new QVBoxLayout), text(new QLabel), refresh(new QPushButton(tr("Refresh"))), + address(new QLineEdit), + go(new QPushButton(tr("Go"))), memBase(0) { setWindowTitle(tr("Memory Browser")); + address->setInputMask("hhhhhh"); + QHBoxLayout * hbox1 = new QHBoxLayout; + hbox1->addWidget(refresh); + hbox1->addWidget(address); + hbox1->addWidget(go); + // Need to set the size as well... // resize(560, 480); @@ -35,9 +43,11 @@ MemoryBrowserWindow::MemoryBrowserWindow(QWidget * parent/*= 0*/): QWidget(paren setLayout(layout); layout->addWidget(text); - layout->addWidget(refresh); +// layout->addWidget(refresh); + layout->addLayout(hbox1); connect(refresh, SIGNAL(clicked()), this, SLOT(RefreshContents())); + connect(go, SIGNAL(clicked()), this, SLOT(GoToAddress())); } @@ -83,7 +93,7 @@ void MemoryBrowserWindow::RefreshContents(void) void MemoryBrowserWindow::keyPressEvent(QKeyEvent * e) { - if (e->key() == Qt::Key_Escape || e->key() == Qt::Key_Return) + if (e->key() == Qt::Key_Escape) hide(); else if (e->key() == Qt::Key_PageUp) { @@ -122,3 +132,13 @@ void MemoryBrowserWindow::keyPressEvent(QKeyEvent * e) RefreshContents(); } } + + +void MemoryBrowserWindow::GoToAddress(void) +{ + bool ok; + QString newAddress = address->text(); + memBase = newAddress.toUInt(&ok, 16); + RefreshContents(); +} +