comparison libgui/src/octave-dock-widget.h @ 31693:88119be1f926

eliminate some unnecessary uses of base_qobject * dw-main-window.h, dw-main-window.cc (dw_main_window::m_octave_qobj): Delete unused data member. (dw_main_window::dw_main_window): Eliminate base_qobject argument. Change all uses. * octave-dock-widget.h, octave-dock-widget.cc (octave_label_widget::m_octave_qobj): Delete unused data member. (label_dock_widget::label_dock_widget): Eliminate base_qobject argument. Change all uses. (octave_dock_widget::m_octave_qobj): New data member. (octave_dock_widget::octave_dock_widget): Initialize it here instead of passing base_qobject argument to label_dock_widget base class constructor. * variable-editor.h, variable-editor.cc (variable_dock_widget::variable_dock_widget, variable_editor_stack::variable_editor_stack, variable_editor_view::variable_editor_view): Eliminate base_qobject argument. Change all uses. (variable_editor_stack::m_octave_qobj): Delete unused data member. (variable_editor_view::m_octave_qobj): Delete unused data member. * documentation.h, documentation.cc (documentation::documentation): Eliminate base_qobject argument. Change all uses. (documentation::m_octave_qobj): Delete unused data member.
author John W. Eaton <jwe@octave.org>
date Sun, 25 Dec 2022 15:19:22 -0500
parents deb553ac2c54
children 286306a9a393
comparison
equal deleted inserted replaced
31692:2422fb7f1e6c 31693:88119be1f926
44 { 44 {
45 Q_OBJECT 45 Q_OBJECT
46 46
47 public: 47 public:
48 48
49 label_dock_widget (QWidget *p, base_qobject& oct_qobj); 49 label_dock_widget (QWidget *p);
50 50
51 ~label_dock_widget (void) = default; 51 ~label_dock_widget (void) = default;
52 52
53 // set_title() uses the custom title bar while setWindowTitle() uses 53 // set_title() uses the custom title bar while setWindowTitle() uses
54 // the default title bar (with style sheets) 54 // the default title bar (with style sheets)
66 //! Slot to handle undo. 66 //! Slot to handle undo.
67 67
68 virtual void do_undo (void) { } 68 virtual void do_undo (void) { }
69 69
70 protected: 70 protected:
71
72 base_qobject& m_octave_qobj;
73 71
74 int m_icon_size; 72 int m_icon_size;
75 QWidget *m_title_widget; 73 QWidget *m_title_widget;
76 QToolButton *m_dock_button; 74 QToolButton *m_dock_button;
77 QToolButton *m_close_button; 75 QToolButton *m_close_button;
161 159
162 void set_style (bool active); 160 void set_style (bool active);
163 void set_focus_predecessor (void); 161 void set_focus_predecessor (void);
164 void store_geometry (void); 162 void store_geometry (void);
165 163
164 protected:
165
166 base_qobject& m_octave_qobj;
167
168 private:
169
166 //! Stores the parent, since we are reparenting to 0. 170 //! Stores the parent, since we are reparenting to 0.
167 171
168 main_window *m_main_window; 172 main_window *m_main_window;
169 173
170 bool m_adopted; 174 bool m_adopted;