Added logic for Qt PPU Viewer scanline entry box.
This commit is contained in:
parent
b19c86bc10
commit
59d726230d
|
@ -69,6 +69,7 @@ ppuViewerDialog_t::ppuViewerDialog_t(QWidget *parent)
|
|||
QVBoxLayout *patternVbox[2];
|
||||
QHBoxLayout *hbox;
|
||||
QGridLayout *grid;
|
||||
char stmp[64];
|
||||
|
||||
ppuViewWindow = this;
|
||||
|
||||
|
@ -150,6 +151,13 @@ ppuViewerDialog_t::ppuViewerDialog_t(QWidget *parent)
|
|||
patternView[0]->setTileLabel( tileLabel[0] );
|
||||
patternView[1]->setTileLabel( tileLabel[1] );
|
||||
|
||||
scanLineEdit->setMaxLength( 3 );
|
||||
scanLineEdit->setInputMask( ">900;" );
|
||||
sprintf( stmp, "%i", PPUViewScanline );
|
||||
scanLineEdit->setText( tr(stmp) );
|
||||
|
||||
connect( scanLineEdit, SIGNAL(textEdited(const QString &)), this, SLOT(scanLineChanged(const QString &)));
|
||||
|
||||
refreshSlider->setMinimum( 0);
|
||||
refreshSlider->setMaximum(25);
|
||||
refreshSlider->setValue(PPUViewRefresh);
|
||||
|
@ -182,6 +190,19 @@ void ppuViewerDialog_t::closeWindow(void)
|
|||
deleteLater();
|
||||
}
|
||||
//----------------------------------------------------
|
||||
void ppuViewerDialog_t::scanLineChanged( const QString &txt )
|
||||
{
|
||||
std::string s;
|
||||
|
||||
s = txt.toStdString();
|
||||
|
||||
if ( s.size() > 0 )
|
||||
{
|
||||
PPUViewScanline = strtoul( s.c_str(), NULL, 10 );
|
||||
}
|
||||
//printf("ScanLine: '%s' %i\n", s.c_str(), PPUViewScanline );
|
||||
}
|
||||
//----------------------------------------------------
|
||||
void ppuViewerDialog_t::sprite8x16Changed0(int state)
|
||||
{
|
||||
PPUView_sprite16Mode[0] = (state == Qt::Unchecked) ? 0 : 1;
|
||||
|
|
|
@ -107,7 +107,7 @@ class ppuViewerDialog_t : public QDialog
|
|||
void sprite8x16Changed0(int state);
|
||||
void sprite8x16Changed1(int state);
|
||||
void refreshSliderChanged(int value);
|
||||
|
||||
void scanLineChanged( const QString &s );
|
||||
};
|
||||
|
||||
int openPPUViewWindow( QWidget *parent );
|
||||
|
|
Loading…
Reference in New Issue