adding communication skills to ui
authorMicke Nordin <mickewiki@gmail.com>
Mon, 11 Jan 2010 20:54:24 +0000 (21:54 +0100)
committerMicke Nordin <mickewiki@gmail.com>
Mon, 11 Jan 2010 20:54:24 +0000 (21:54 +0100)
unlock/unlock.cpp
unlock/unlock.ui

index b918e15..8bb5f0b 100644 (file)
@@ -19,7 +19,9 @@
 
 
 #include "unlock.hpp"
-
+#include <string>
+#include <iostream>
+#include <fstream>
 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();
 }
index 7b513b1..1b629ee 100644 (file)
   </widget>
  </widget>
  <resources/>
- <connections/>
+ <connections>
+  <connection>
+   <sender>pushButton</sender>
+   <signal>clicked()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>close()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>145</x>
+     <y>43</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>90</x>
+     <y>32</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
 </ui>