Mercurial > octave
comparison libgui/graphics/Canvas.h @ 31639:ca7d58406f82
eliminate unnecessary uses of octave_qobject in GUI classes
* BaseControl.cc, BaseControl.h, ButtonControl.cc, ButtonControl.h,
ButtonGroup.cc, ButtonGroup.h, Canvas.cc, Canvas.h,
CheckBoxControl.cc, CheckBoxControl.h, Container.cc, Container.h,
ContextMenu.cc, ContextMenu.h, EditControl.cc, EditControl.h,
Figure.cc, Figure.h, GLCanvas.cc, GLCanvas.h, ListBoxControl.cc,
ListBoxControl.h, Menu.cc, Menu.h, Object.cc, Object.h, Panel.cc,
Panel.h, PopupMenuControl.cc, PopupMenuControl.h,
PushButtonControl.cc, PushButtonControl.h, PushTool.cc, PushTool.h,
RadioButtonControl.cc, RadioButtonControl.h, SliderControl.cc,
SliderControl.h, Table.cc, Table.h, TextControl.cc, TextControl.h,
ToggleButtonControl.cc, ToggleButtonControl.h, ToggleTool.cc,
ToggleTool.h, ToolBar.cc, ToolBar.h, ToolBarButton.cc,
ToolBarButton.h, annotation-dialog.cc, annotation-dialog.h,
qt-graphics-toolkit.cc, qt-graphics-toolkit.h, command-widget.h,
community-news.cc, community-news.h, documentation-bookmarks.cc,
documentation-bookmarks.h, documentation.cc,
external-editor-interface.cc, external-editor-interface.h,
find-files-dialog.cc, find-files-dialog.h, graphics-init.cc,
graphics-init.h, interpreter-qobject.cc, file-editor.cc,
find-dialog.cc, find-dialog.h, main-window.cc, main-window.h,
news-reader.cc, news-reader.h, octave-qobject.cc, release-notes.cc,
resource-manager.cc, set-path-dialog.cc, set-path-dialog.h,
shortcut-manager.cc, shortcut-manager.h, welcome-wizard.cc,
welcome-wizard.h, workspace-model.cc:
Don't store references to octave_qobject in GUI classes where it is
no longer needed. Eliminate unnecessary octave_qobject constructor
arguments. Change all uses.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sun, 04 Dec 2022 22:57:02 -0500 |
parents | 796f54d4ddbf |
children | bd9da634f00d |
comparison
equal
deleted
inserted
replaced
31638:474e184321d3 | 31639:ca7d58406f82 |
---|---|
41 | 41 |
42 class octave_value_list; | 42 class octave_value_list; |
43 | 43 |
44 namespace octave | 44 namespace octave |
45 { | 45 { |
46 class base_qobject; | |
47 class interpreter; | 46 class interpreter; |
48 } | 47 } |
49 | 48 |
50 namespace octave | 49 namespace octave |
51 { | 50 { |
80 QImage cdata, Matrix hotspot); | 79 QImage cdata, Matrix hotspot); |
81 | 80 |
82 virtual QWidget * qWidget (void) = 0; | 81 virtual QWidget * qWidget (void) = 0; |
83 | 82 |
84 static Canvas * | 83 static Canvas * |
85 create (octave::base_qobject& oct_qobj, octave::interpreter& interp, | 84 create (octave::interpreter& interp, const graphics_handle& handle, |
86 const graphics_handle& handle, QWidget *parent, | 85 QWidget *parent, const std::string& name); |
87 const std::string& name); | |
88 | 86 |
89 virtual uint8NDArray getPixels (void) { return do_getPixels (m_handle); }; | 87 virtual uint8NDArray getPixels (void) { return do_getPixels (m_handle); }; |
90 | 88 |
91 signals: | 89 signals: |
92 | 90 |
116 virtual uint8NDArray do_getPixels (const graphics_handle& handle) = 0; | 114 virtual uint8NDArray do_getPixels (const graphics_handle& handle) = 0; |
117 virtual void do_print (const QString& file_cmd, const QString& term, | 115 virtual void do_print (const QString& file_cmd, const QString& term, |
118 const graphics_handle& handle) = 0; | 116 const graphics_handle& handle) = 0; |
119 | 117 |
120 protected: | 118 protected: |
121 Canvas (octave::base_qobject& oct_qobj, octave::interpreter& interp, | 119 Canvas (octave::interpreter& interp, const graphics_handle& handle) |
122 const graphics_handle& handle) | 120 : m_interpreter (interp), |
123 : m_octave_qobj (oct_qobj), | |
124 m_interpreter (interp), | |
125 m_handle (handle), | 121 m_handle (handle), |
126 m_redrawBlocked (false), | 122 m_redrawBlocked (false), |
127 m_mouseMode (NoMode), | 123 m_mouseMode (NoMode), |
128 m_clickMode (false), | 124 m_clickMode (false), |
129 m_eventMask (0), | 125 m_eventMask (0), |
151 graphics_object& currentObj, graphics_object& axesObj, | 147 graphics_object& currentObj, graphics_object& axesObj, |
152 bool axes_only = false, | 148 bool axes_only = false, |
153 std::vector<std::string> omit = std::vector<std::string> ()); | 149 std::vector<std::string> omit = std::vector<std::string> ()); |
154 | 150 |
155 protected: | 151 protected: |
156 octave::base_qobject& m_octave_qobj; | 152 |
157 octave::interpreter& m_interpreter; | 153 octave::interpreter& m_interpreter; |
158 | 154 |
159 private: | 155 private: |
160 | 156 |
161 QCursor make_cursor (const QString& name, int hot_x = -1, int hot_y = -1); | 157 QCursor make_cursor (const QString& name, int hot_x = -1, int hot_y = -1); |