diff libgui/src/workspace-view.h @ 16463:8e2a853cdd7d

derive workspace_view from octave_dock_widget; style fixes * workspace-view.h, workspace-view.cc (workspace_view): Derive from octave_dock_widget. Delete functions that we now inherit. Style fixes.
author John W. Eaton <jwe@octave.org>
date Sun, 07 Apr 2013 16:08:15 -0400
parents 8c666c7b0e5d
children 64727ed135cb
line wrap: on
line diff
--- a/libgui/src/workspace-view.h	Sun Apr 07 15:48:11 2013 -0400
+++ b/libgui/src/workspace-view.h	Sun Apr 07 16:08:15 2013 -0400
@@ -1,5 +1,6 @@
 /*
 
+Copyright (C) 2013 John W. Eaton
 Copyright (C) 2011-2012 Jacob Dawid
 
 This file is part of Octave.
@@ -20,16 +21,16 @@
 
 */
 
-#ifndef WORKSPACEVIEW_H
-#define WORKSPACEVIEW_H
+#if !defined (workspace_view_h)
+#define workspace_view_h 1
 
-#include <QDockWidget>
 #include <QTreeView>
 #include <QSemaphore>
 
+#include "octave-dock-widget.h"
 #include "workspace-model.h"
 
-class workspace_view : public QDockWidget
+class workspace_view : public octave_dock_widget
 {
   Q_OBJECT
 
@@ -37,9 +38,7 @@
 
   workspace_view (QWidget * parent = 0);
 
-  ~workspace_view ();
-
-  void connect_visibility_changed (void);
+  ~workspace_view (void);
 
 public:
 
@@ -47,34 +46,31 @@
 
 public slots:
 
-  void model_changed ();
-
-  /** Slot when floating property changes */
-  void top_level_changed (bool floating);
-
-  void focus (void);
-
-  void handle_visibility (bool visible);
+  void model_changed (void);
 
 signals:
-  /** Custom signal that tells if a user has clicke away that dock widget. */
-  void active_changed (bool active);
+
   /** signal that user had requested a command on a variable */
   void command_requested (const QString& cmd);
 
 protected:
+
   void closeEvent (QCloseEvent *event);
 
 protected slots:
+
   void collapse_requested (QModelIndex index);
   void expand_requested (QModelIndex index);
   void item_double_clicked (QModelIndex index);
   void contextmenu_requested (const QPoint& pos);
+
   // context menu slots
-  void handle_contextmenu_disp ();
-  void handle_contextmenu_plot ();
-  void handle_contextmenu_stem ();
+  void handle_contextmenu_disp (void);
+  void handle_contextmenu_plot (void);
+  void handle_contextmenu_stem (void);
+
 private:
+
   void relay_contextmenu_command (const QString& cmdname);
 
   QTreeView *view;
@@ -87,4 +83,4 @@
   } _explicit_collapse;
 };
 
-#endif // WORKSPACEVIEW_H
+#endif