diff gui/src/octave-adapter/octave-link.h @ 14721:ec76264adca9 gui

Removed last bits of Qt from octave_link. * main-window: Made subclass from octave_event_observer. * octave-event-listener: Added new listener method to interface. * octave-link: Removed last bits of Qt. * octave-qt-event-listener: Implemented new listener method.
author Jacob Dawid <jacob.dawid@googlemail.com>
date Mon, 04 Jun 2012 22:03:18 +0200
parents cecc7da96e2a
children 7784625acf66
line wrap: on
line diff
--- a/gui/src/octave-adapter/octave-link.h	Mon Jun 04 21:28:08 2012 +0200
+++ b/gui/src/octave-adapter/octave-link.h	Mon Jun 04 22:03:18 2012 +0200
@@ -53,6 +53,7 @@
 #include "octave/unwind-prot.h"
 #include "octave/utils.h"
 #include "octave/variables.h"
+#include "oct-mutex.h"
 
 // Standard includes
 #include <iostream>
@@ -61,9 +62,6 @@
 #include <readline/readline.h>
 #include <queue>
 
-// Qt includes
-#include <QSemaphore>
-
 #include "workspace-model.h"
 #include "octave-main-thread.h"
 #include "octave-event.h"
@@ -83,8 +81,7 @@
 {
 public:
   /** Provides a way to access the unique octave_link object. */
-  static octave_link *
-  instance () { return &_singleton; }
+  static octave_link * instance () { return &_singleton; }
 
   /** Starts octave. */
   void launch_octave ();
@@ -96,9 +93,7 @@
   void event_accepted (octave_event *e);
   void event_reject (octave_event *e);
 
-  void request_working_directory_change (std::string directory);
-  void request_octave_exit ();
-
+  void about_to_exit ();
 private:
   /** Singleton. */
   octave_link ();
@@ -110,7 +105,7 @@
   octave_main_thread *_octave_main_thread;
 
   /** Semaphore to lock access to the event queue. */
-  QSemaphore *_event_queue_semaphore;
+  octave_mutex *_event_queue_mutex;
 
   /** Buffer for queueing events until they will be processed. */
   std::queue <octave_event *> _event_queue;