feature: added possibility to change hardware interface from GUI
This commit is contained in:
@@ -50,6 +50,21 @@ MainWindow::MainWindow(QWidget * parent)
|
||||
SLOT(WindowRennen()));
|
||||
|
||||
this->db = std::make_unique<DataBase>();
|
||||
vector<vector<QString>> interface =
|
||||
this->db->getData("select * from interface", 1);
|
||||
if (interface.size() > 0) {
|
||||
std::cout << "interface existiert" << std::endl;
|
||||
}
|
||||
else {
|
||||
std::cout << "interface existiert nicht" << std::endl;
|
||||
// create interface
|
||||
std::string statement =
|
||||
"CREATE TABLE \"Interface\" ( \"id\" INTEGER PRIMARY KEY "
|
||||
"AUTOINCREMENT, \"interface\" TEXT )";
|
||||
this->db->setData(statement);
|
||||
statement = "insert into interface (interface) values ('/dev/ttyAMC0')";
|
||||
this->db->setData(statement);
|
||||
}
|
||||
}
|
||||
void MainWindow::closeEvent(QCloseEvent * event) {
|
||||
Q_UNUSED(event);
|
||||
|
||||
Reference in New Issue
Block a user