GNU Octave  3.8.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
workspace-view.h
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 2013 John W. Eaton
4 Copyright (C) 2011-2013 Jacob Dawid
5 
6 This file is part of Octave.
7 
8 Octave is free software; you can redistribute it and/or modify it
9 under the terms of the GNU General Public License as published by the
10 Free Software Foundation; either version 3 of the License, or (at your
11 option) any later version.
12 
13 Octave is distributed in the hope that it will be useful, but WITHOUT
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 for more details.
17 
18 You should have received a copy of the GNU General Public License
19 along with Octave; see the file COPYING. If not, see
20 <http://www.gnu.org/licenses/>.
21 
22 */
23 
24 #if !defined (octave_workspace_view_h)
25 #define octave_workspace_view_h 1
26 
27 #include <QItemDelegate>
28 #include <QTableView>
29 #include <QSemaphore>
30 
31 #include "octave-dock-widget.h"
32 #include "workspace-model.h"
33 
35 {
36  Q_OBJECT
37 
38 public:
39 
40  workspace_view (QWidget *parent = 0);
41 
42  ~workspace_view (void);
43 
44 public slots:
45 
46  void notice_settings (const QSettings *);
47 
48  void setModel (workspace_model *model);
49 
50 signals:
51 
52  /** signal that user had requested a command on a variable */
53  void command_requested (const QString& cmd);
54 
55 protected:
56 
57  void closeEvent (QCloseEvent *event);
58 
59 protected slots:
60 
61  void contextmenu_requested (const QPoint& pos);
62 
63  // context menu slots
64  void handle_contextmenu_copy (void);
65  void handle_contextmenu_rename (void);
66  void handle_contextmenu_disp (void);
67  void handle_contextmenu_plot (void);
68  void handle_contextmenu_stem (void);
69 
70  void handle_model_changed (void);
71 
72  void copyClipboard ();
73 
74 private:
75 
76  void relay_contextmenu_command (const QString& cmdname);
77 
78  QTableView *view;
81 };
82 
83 #endif