Hooked up logic for NT View attribute and hide palette functionality in Qt GUI

This commit is contained in:
Matthew Budd 2020-10-06 21:08:10 -04:00
parent 2d403fac3e
commit a79400720b
3 changed files with 20 additions and 1 deletions

View File

@ -44,7 +44,7 @@ Memory Watch Window | NO | NO
TAS Editor | NO | NO |
6502 Debugger Window | YES | YES |
PPU Viewer | YES | NO |
Name Table Viewer | NO | NO |
Name Table Viewer | YES | NO |
Memory Hex Editor | YES | YES |
Trace Logger | YES | NO |
Code/Data Logger | YES | NO |

View File

@ -110,10 +110,17 @@ ppuNameTableViewerDialog_t::ppuNameTableViewerDialog_t(QWidget *parent)
showAttrbCbox = new QCheckBox( tr("Show Attributes") );
ignorePaletteCbox = new QCheckBox( tr("Ignore Palette") );
//showScrollLineCbox->setChecked( attview );
showAttrbCbox->setChecked( attview );
ignorePaletteCbox->setChecked( hidepal );
grid->addWidget( showScrollLineCbox, 0, 0, Qt::AlignLeft );
grid->addWidget( showAttrbCbox , 1, 0, Qt::AlignLeft );
grid->addWidget( ignorePaletteCbox , 2, 0, Qt::AlignLeft );
connect( showAttrbCbox , SIGNAL(stateChanged(int)), this, SLOT(showAttrbChanged(int)));
connect( ignorePaletteCbox, SIGNAL(stateChanged(int)), this, SLOT(ignorePaletteChanged(int)));
hbox = new QHBoxLayout();
refreshSlider = new QSlider( Qt::Horizontal );
hbox->addWidget( new QLabel( tr("Refresh: More") ) );
@ -337,6 +344,16 @@ void ppuNameTableViewerDialog_t::scanLineChanged( const QString &txt )
//printf("ScanLine: '%s' %i\n", s.c_str(), PPUViewScanline );
}
//----------------------------------------------------
void ppuNameTableViewerDialog_t::showAttrbChanged(int state)
{
attview = (state != Qt::Unchecked);
}
//----------------------------------------------------
void ppuNameTableViewerDialog_t::ignorePaletteChanged(int state)
{
hidepal = (state != Qt::Unchecked);
}
//----------------------------------------------------
void ppuNameTableViewerDialog_t::refreshSliderChanged(int value)
{
NTViewRefresh = value;

View File

@ -103,6 +103,8 @@ class ppuNameTableViewerDialog_t : public QDialog
void singleScreen1Clicked(void);
void singleScreen2Clicked(void);
void singleScreen3Clicked(void);
void showAttrbChanged(int state);
void ignorePaletteChanged(int state);
void refreshSliderChanged(int value);
void scanLineChanged( const QString &txt );
};