diff libgui/src/main-window.h @ 19422:476032040df9 gui-release

determining the active dock from focus changes in the gui * main-window.cc (focus_changed): new slot for qApp::focusChagned signal, determining the active dock to which the new focus-widget belongs and emitting a signal indicating a change of the active dock; (constructor): connect focusChagned signal to the new slot * main-window.h: new slot, new signal, and new class variable for active dock
author Torsten <ttl@justmail.de>
date Tue, 23 Dec 2014 15:04:00 +0100
parents c6615ca0a11d
children be53bf420464
line wrap: on
line diff
--- a/libgui/src/main-window.h	Sat Dec 20 17:26:53 2014 +0100
+++ b/libgui/src/main-window.h	Tue Dec 23 15:04:00 2014 +0100
@@ -80,6 +80,9 @@
   void focus_command_window (void);
 
 signals:
+
+  void active_dock_changed (octave_dock_widget *, octave_dock_widget *);
+
   void settings_changed (const QSettings *);
   void init_terminal_size_signal (void);
   void new_file_signal (const QString&);
@@ -98,6 +101,9 @@
 
 public slots:
 
+  void focus_changed (QWidget *w_old, QWidget *w_new);
+
+
   void report_status_message (const QString& statusMessage);
   void handle_save_workspace_request (void);
   void handle_load_workspace_request (const QString& file = QString ());
@@ -311,6 +317,7 @@
     list.append (static_cast<octave_dock_widget *> (workspace_window));
     return list;
   }
+  octave_dock_widget *_active_dock;
 
   QString _release_notes_icon;