Exemplo n.º 1
0
SerialConnector::SerialConnector(QWidget *parent)
    : QWidget(parent)
{
	ui.setupUi(this);
	connect( ui.serialTypeComboBox, SIGNAL( activated(int) ), this, SLOT( typeChanged(int) ) );
	connect( ui.tcpServerCheckBox, SIGNAL( stateChanged(int) ), this, SLOT( tcpServerCheckBox(int) ) );
	connect( ui.donePushButton, SIGNAL( clicked() ), this, SLOT( done() ) );
	connect( ui.cancelPushButton, SIGNAL( clicked() ), this, SLOT( cancel() ) );

	connect( ui.pipePushButton, SIGNAL( clicked() ), this, SLOT( pipeChoose() ) );
	connect( ui.filePushButton, SIGNAL( clicked() ), this, SLOT( fileChoose() ) );
	connect( ui.unixPushButton, SIGNAL( clicked() ), this, SLOT( unixChoose() ) );

	this->typeChanged(ui.serialTypeComboBox->currentIndex());
	this->tcpServerCheckBox(ui.tcpServerCheckBox->isChecked());
}
Exemplo n.º 2
0
Entry::Entry(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::Entry)
{
    ui->setupUi(this);
    _fileChoose = ui->chooseFile;
    _filePath = ui->filePath;
    _fileCommit = ui->fileCommit;

    _randomNumber = ui->randomNubmer;
    _randomCommit = ui->randomGenerate;

    _handText = ui->handText;
    _handCommit = ui->handCommit;

    connect(_fileCommit,SIGNAL(clicked()),this,SLOT(fileCommitSlot()));
    connect(_fileChoose,SIGNAL(clicked()),this,SLOT(fileChoose()));
    connect(_randomCommit,SIGNAL(clicked()), this, SLOT(randomCommitSlot()));
    connect(_handCommit,SIGNAL(clicked()),this, SLOT(handCommitSlot()));
    ui->filePath->setDisabled(true);
}