X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fgui%2Fdebug%2Fcpubrowser.cpp;h=331ac9059ac390f30f2536017876fa39d6a75603;hb=48dd9ba5b6742935eef61cec80964afe093139ad;hp=daabbf30be9ecb33f3c08648de8f05756e066aa6;hpb=7228359373eb7602c26f7b098d6b2271ff5727a1;p=virtualjaguar diff --git a/src/gui/debug/cpubrowser.cpp b/src/gui/debug/cpubrowser.cpp index daabbf3..331ac90 100644 --- a/src/gui/debug/cpubrowser.cpp +++ b/src/gui/debug/cpubrowser.cpp @@ -7,7 +7,7 @@ // JLH = James Hammons // // Who When What -// --- ---------- ------------------------------------------------------------- +// --- ---------- ----------------------------------------------------------- // JLH 08/14/2012 Created this file // @@ -19,30 +19,39 @@ #include "m68000/m68kinterface.h" #include "dsp.h" #include "gpu.h" +#include "jaguar.h" CPUBrowserWindow::CPUBrowserWindow(QWidget * parent/*= 0*/): QWidget(parent, Qt::Dialog), -// layout(new QVBoxLayout), text(new QTextBrowser), layout(new QVBoxLayout), text(new QLabel), refresh(new QPushButton(tr("Refresh"))), - memBase(0) + bpm(new QCheckBox(tr("BPM"))), bpmAddress(new QLineEdit) { setWindowTitle(tr("CPU Browser")); // Need to set the size as well... // resize(560, 480); -// QFont fixedFont("Lucida Console", 8, QFont::Normal); - QFont fixedFont("", 8, QFont::Normal); + // Limit input to 6 hex digits + bpmAddress->setInputMask("hhhhhh"); + QHBoxLayout * hbox1 = new QHBoxLayout; + hbox1->addWidget(bpm); + hbox1->addWidget(bpmAddress); + + QFont fixedFont("Lucida Console", 8, QFont::Normal); +// QFont fixedFont("", 8, QFont::Normal); fixedFont.setStyleHint(QFont::TypeWriter); text->setFont(fixedFont); //// layout->setSizeConstraint(QLayout::SetFixedSize); setLayout(layout); layout->addWidget(text); + layout->addLayout(hbox1); layout->addWidget(refresh); connect(refresh, SIGNAL(clicked()), this, SLOT(RefreshContents())); + connect(bpm, SIGNAL(clicked(bool)), this, SLOT(HandleBPM(bool))); + connect(bpmAddress, SIGNAL(textChanged(const QString &)), this, SLOT(HandleBPMAddress(const QString &))); } @@ -236,10 +245,26 @@ DSP Control: } +void CPUBrowserWindow::HandleBPM(bool state) +{ + bpmActive = state; +if (bpmActive) + printf("BPM Set: $%06X\n", bpmAddress1); +} + + +void CPUBrowserWindow::HandleBPMAddress(const QString & newText) +{ + bool ok; + bpmAddress1 = newText.toUInt(&ok, 16); +} + + void CPUBrowserWindow::keyPressEvent(QKeyEvent * e) { if (e->key() == Qt::Key_Escape) hide(); +#if 0 else if (e->key() == Qt::Key_PageUp) { memBase -= 480; @@ -276,4 +301,5 @@ void CPUBrowserWindow::keyPressEvent(QKeyEvent * e) RefreshContents(); } +#endif }