mirror of
https://github.com/Fishwaldo/qt-openzwave.git
synced 2025-07-07 13:48:19 +00:00
Rename this directory to avoid binary clash
This commit is contained in:
parent
77ddc7e6ae
commit
38f0d765f9
18 changed files with 3 additions and 2 deletions
39
qt-simpleclient/startup.cpp
Normal file
39
qt-simpleclient/startup.cpp
Normal file
|
@ -0,0 +1,39 @@
|
|||
#include <QMessageBox>
|
||||
|
||||
#include "startup.h"
|
||||
#include "ui_startup.h"
|
||||
|
||||
|
||||
Startup::Startup(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::Startup)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
QObject::connect(ui->startlocal, &QPushButton::clicked, this, &Startup::localPressed);
|
||||
QObject::connect(ui->startremote, &QPushButton::clicked, this, &Startup::remotePressed);
|
||||
|
||||
}
|
||||
|
||||
Startup::~Startup()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void Startup::localPressed() {
|
||||
QString serialport = ui->serialport->text();
|
||||
if (serialport.length() == 0) {
|
||||
QMessageBox::critical(this, tr("Error"), tr("You Must Specify a Serial Port"), QMessageBox::Ok);
|
||||
}
|
||||
emit this->startLocal(serialport, ui->enableserver->isChecked());
|
||||
this->close();
|
||||
}
|
||||
void Startup::remotePressed() {
|
||||
QString remotehost = ui->remotehost->text();
|
||||
if (remotehost.length() == 0) {
|
||||
QMessageBox::critical(this, tr("Error"), tr("You Must Specify a Remote Host"), QMessageBox::Ok);
|
||||
}
|
||||
emit this->startRemote(remotehost);
|
||||
this->close();
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue