GUI counterpart to create/disable AdHoc connection

+ a small trick with powering WiFi to reconnect to a default WiFi after
Adhoc is no longer in use

+ extending author names

Change-Id: I972f0a54e4ccbb5c9c2582763a0f5a72a8b25407
diff --git a/gui/chronosharegui.h b/gui/chronosharegui.h
index 23f6e9d..eba4c12 100644
--- a/gui/chronosharegui.h
+++ b/gui/chronosharegui.h
@@ -16,11 +16,15 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  * Author: Jared Lindblom <lindblom@cs.ucla.edu>
+ *         Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ *         Zhenkai Zhu <zhenkai@cs.ucla.edu>
  */
 
 #ifndef CHRONOSHAREGUI_H
 #define CHRONOSHAREGUI_H
 
+#include "adhoc.h"
+
 #include <QtGui>
 #include <QWidget>
 #include <QSystemTrayIcon>
@@ -64,6 +68,10 @@
   // change chronoshare settings
   void changeSettings();
 
+  // click on adhoc button
+  void onAdHocChange (bool state); // cannot be protected with #ifdef. otherwise something fishy with QT
+
+
 private:
   // create actions that result from clicking a menu option
   void createActions();
@@ -102,6 +110,8 @@
   QAction* m_changeFolder; // change the shared folder action
   QAction* m_quitProgram; // quit program action
 
+  QAction *m_wifiAction;
+
   QString m_dirPath; // shared directory
   QString m_username; // username
   QString m_sharedFolderName; // shared folder name
@@ -119,6 +129,10 @@
   QLabel *label;
   QVBoxLayout *mainLayout;
 
+#ifdef ADHOC_SUPPORTED
+  Executor m_executor;
+#endif
+
   // QString m_settingsFilePath; // settings file path
   // QString m_settings;
 };