From 778f40dae63986aae8af114a75f3696a599a628b Mon Sep 17 00:00:00 2001 From: Micke Nordin Date: Mon, 11 Jan 2010 21:54:24 +0100 Subject: [PATCH] adding communication skills to ui --- unlock/unlock.cpp | 10 +++++++--- unlock/unlock.ui | 19 ++++++++++++++++++- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/unlock/unlock.cpp b/unlock/unlock.cpp index b918e15..8bb5f0b 100644 --- a/unlock/unlock.cpp +++ b/unlock/unlock.cpp @@ -19,7 +19,9 @@ #include "unlock.hpp" - +#include +#include +#include unlock::unlock(QWidget *parent) : QMainWindow(parent) { ui.setupUi( this ); @@ -29,8 +31,10 @@ unlock::unlock(QWidget *parent) : QMainWindow(parent) void unlock::Close() { // can also add any extra closedown code here before we actually do close the GUI - - + std::string message = "0_Unlock|" + this->ui.lineEdit->text().toStdString(); + std::ofstream os("/tmp/mnencdfifo"); + os << message; + os.close(); // now close for real close(); } diff --git a/unlock/unlock.ui b/unlock/unlock.ui index 7b513b1..1b629ee 100644 --- a/unlock/unlock.ui +++ b/unlock/unlock.ui @@ -53,5 +53,22 @@ - + + + pushButton + clicked() + MainWindow + close() + + + 145 + 43 + + + 90 + 32 + + + + -- 1.7.9.5