Qt input preset configs in work.

This commit is contained in:
Matthew Budd 2020-11-23 16:22:01 -05:00
parent adce35cc58
commit f541822557
3 changed files with 19 additions and 1 deletions

View File

@ -106,6 +106,20 @@ InputConfDialog_t::InputConfDialog_t(QWidget *parent)
mainLayout->addLayout( hbox );
vbox = new QVBoxLayout();
hbox = new QHBoxLayout();
vbox->addLayout( hbox );
hbox->addWidget( new QLabel( tr("File:") ) );
hbox->addWidget( saveFileName = new QLineEdit() );
saveFileName->setReadOnly(true);
hbox = new QHBoxLayout();
vbox->addLayout( hbox );
hbox->addWidget( loadConfigButton = new QPushButton( tr("Load") ) );
hbox->addWidget( saveConfigButton = new QPushButton( tr("Save") ) );
presetFrame->setLayout( vbox );
vbox = new QVBoxLayout();
hbox = new QHBoxLayout();

View File

@ -10,6 +10,7 @@
#include <QComboBox>
#include <QCheckBox>
#include <QPushButton>
#include <QLineEdit>
#include <QLabel>
#include <QFrame>
#include <QGroupBox>
@ -39,6 +40,9 @@ class InputConfDialog_t : public QDialog
QLabel *expPortLabel;
QPushButton *expPortConfButton;
QComboBox *expPortComboxBox;
QPushButton *loadConfigButton;
QPushButton *saveConfigButton;
QLineEdit *saveFileName;
int curNesInput[3];
int usrNesInput[3];

View File

@ -2189,7 +2189,7 @@ int loadInputSettingsFromFile( const char *filename )
printf("Warning: No Value Specified for Token ID: '%s'\n", id );
continue;
}
printf("ID: '%s' Val: '%s' \n", id, val );
//printf("ID: '%s' Val: '%s' \n", id, val );
if ( strcmp( id, "InputTypePort1" ) == 0 )
{