Qt RAM search input validation in work.

This commit is contained in:
mjbudd77 2020-10-15 22:22:44 -04:00
parent 9412b850cb
commit ebfe3702f9
2 changed files with 12 additions and 0 deletions

View File

@ -343,6 +343,7 @@ ConsoleDebugger::ConsoleDebugger(QWidget *parent)
cpuCycExdVal->setInputMask( ">9000000000000000;" );
cpuCycExdVal->setAlignment(Qt::AlignLeft);
cpuCycExdVal->setMaximumWidth( 18 * fontCharWidth );
cpuCycExdVal->setCursorPosition(0);
connect( cpuCycExdVal, SIGNAL(textEdited(const QString &)), this, SLOT(cpuCycleThresChanged(const QString &)));
instrExdVal->setFont( font );
@ -350,6 +351,7 @@ ConsoleDebugger::ConsoleDebugger(QWidget *parent)
instrExdVal->setInputMask( ">9000000000000000;" );
instrExdVal->setAlignment(Qt::AlignLeft);
instrExdVal->setMaximumWidth( 18 * fontCharWidth );
instrExdVal->setCursorPosition(0);
connect( instrExdVal, SIGNAL(textEdited(const QString &)), this, SLOT(instructionsThresChanged(const QString &)));
brkCpuCycExd->setChecked( break_on_cycles );

View File

@ -220,6 +220,14 @@ RamSearchDialog_t::RamSearchDialog_t(QWidget *parent)
diffByEdit->setEnabled( cmpOp == 'd' );
moduloEdit->setEnabled( cmpOp == '%' );
diffByEdit->setMaxLength( 16 );
//diffByEdit->setInputMask( ">H000000000000000;" );
diffByEdit->setCursorPosition(0);
moduloEdit->setMaxLength( 16 );
//moduloEdit->setInputMask( ">H000000000000000;" );
moduloEdit->setCursorPosition(0);
vbox->addWidget( lt_btn );
vbox->addWidget( gt_btn );
vbox->addWidget( le_btn );
@ -900,6 +908,8 @@ void QRamSearchView::paintEvent(QPaintEvent *event)
lineOffset = vbar->value();
vbar->setMaximum( maxLineOffset );
if ( lineOffset > maxLineOffset )
{
lineOffset = maxLineOffset;