GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
variable_editor Class Reference

#include "variable-editor.h"

Inheritance diagram for variable_editor:
Collaboration diagram for variable_editor:

Public Slots

virtual void activate (void)
 
void callUpdate (const QModelIndex &, const QModelIndex &)
 
void default_dock (bool not_used=false)
 
void edit_variable (const QString &name, const octave_value &val)
 
void handle_active_dock_changed (octave_dock_widget *, octave_dock_widget *)
 
void handle_settings (const gui_settings *)
 
virtual void handle_visibility (bool visible)
 
void init_window_menu_entry (void)
 
void make_widget (bool not_used=false)
 
void make_window (bool widget_was_dragged=false)
 
void moveEvent (QMoveEvent *event)
 
void notice_settings (const gui_settings *)
 
void record_hovered_focus_variable (void)
 
void resizeEvent (QResizeEvent *event)
 
void restore_hovered_focus_variable (void)
 
virtual void save_settings (void)
 
void variable_destroyed (QObject *obj)
 
void variable_focused (const QString &name)
 

Signals

void active_changed (bool active)
 Custom signal that tells whether a user has clicked away that dock widget, i.e. More...
 
void clear_content_signal (void)
 
void command_signal (const QString &cmd)
 
void copy_clipboard_signal (void)
 
void delete_selected_signal (void)
 
void finished (void)
 
void interpreter_event (const fcn_callback &fcn)
 
void interpreter_event (const meth_callback &meth)
 
void level_up_signal (void)
 
void paste_clipboard_signal (void)
 
void queue_make_widget (void)
 
void queue_make_window (bool widget_was_dragged)
 
void refresh_signal (void)
 
void save_signal (void)
 
void updated (void)
 

Public Member Functions

 variable_editor (const variable_editor &)=delete
 
 variable_editor (QWidget *parent, base_qobject &oct_qobj)
 
 ~variable_editor (void)
 
bool adopted (void) const
 
variable_editoroperator= (const variable_editor &)=delete
 
void refresh (void)
 
void set_adopted (bool adopted=true)
 
void set_main_window (main_window *mw)
 
void set_predecessor_widget (octave_dock_widget *prev_widget)
 
void set_title (const QString &)
 
void tab_to_front (void)
 

Protected Slots

void closeEvent (QCloseEvent *)
 
void copyClipboard (void)
 
void cutClipboard (void)
 
virtual void do_undo (void)
 Slot to handle undo. More...
 
bool eventFilter (QObject *obj, QEvent *e)
 Event filter for double clicks into the window decoration elements. More...
 
void levelUp (void)
 
void pasteClipboard (void)
 
void save (void)
 
virtual void toplevel_change (bool)
 
virtual void selectAll (void)
 Slots to handle copy & paste. More...
 

Protected Member Functions

bool event (QEvent *event)
 
void focusInEvent (QFocusEvent *ev)
 
QWidgetfocusWidget (void)
 

Protected Attributes

QAction * m_close_action
 
QToolButtonm_close_button
 
QAbstractButton * m_default_close_button
 
QAbstractButton * m_default_float_button
 
QAction * m_dock_action
 
QToolButtonm_dock_button
 
int m_icon_size
 
base_qobjectm_octave_qobj
 
QWidgetm_title_widget
 

Private Slots

void change_visibility (bool)
 

Private Member Functions

QAction * add_tool_bar_button (const QIcon &icon, const QString &text, const QObject *receiver, const char *member)
 
void construct_tool_bar (void)
 
void set_focus_predecessor (void)
 
void set_style (bool active)
 
void store_geometry (void)
 
void update_colors (void)
 

Private Attributes

int m_add_font_height
 
bool m_adopted
 
bool m_alternate_rows
 
QColor m_bg_color
 
QColor m_bg_color_active
 
QString m_current_focus_vname
 
bool m_custom_style
 
int m_default_height
 
int m_default_width
 
QColor m_fg_color
 
QColor m_fg_color_active
 
bool m_focus_follows_mouse
 
QWidgetm_focus_widget
 
variable_dock_widgetm_focus_widget_vdw
 
QFont m_font
 
QString m_hovered_focus_vname
 
QString m_icon_color
 
QString m_icon_color_active
 
dw_main_windowm_main
 
main_windowm_main_window
 Stores the parent, since we are reparenting to 0. More...
 
QSignalMapper * m_plot_mapper
 
octave_dock_widgetm_predecessor_widget
 
QRect m_recent_dock_geom
 
QRect m_recent_float_geom
 
QAction * m_save_action
 
QSignalMapper * m_save_mapper
 
QFont m_sel_font
 
QString m_stylesheet
 
QList< QColor > m_table_colors
 
int m_title_3d
 
QToolBar * m_tool_bar
 
bool m_use_terminal_font
 
bool m_waiting_for_mouse_button_release
 

Detailed Description

Definition at line 293 of file variable-editor.h.

Constructor & Destructor Documentation

◆ variable_editor() [1/2]

variable_editor::variable_editor ( QWidget parent,
base_qobject oct_qobj 
)

◆ ~variable_editor()

variable_editor::~variable_editor ( void  )

Definition at line 1199 of file variable-editor.cc.

References m_tool_bar.

◆ variable_editor() [2/2]

variable_editor::variable_editor ( const variable_editor )
delete

Member Function Documentation

◆ activate

void octave_dock_widget::activate ( void  )
virtualslotinherited

◆ active_changed

void octave_dock_widget::active_changed ( bool  active)
signalinherited

Custom signal that tells whether a user has clicked away that dock widget, i.e.

the active dock widget has changed.

Referenced by octave_dock_widget::change_visibility(), octave_dock_widget::closeEvent(), octave_dock_widget::handle_visibility(), and octave_dock_widget::init_window_menu_entry().

◆ add_tool_bar_button()

QAction * variable_editor::add_tool_bar_button ( const QIcon &  icon,
const QString &  text,
const QObject receiver,
const char *  member 
)
private

Definition at line 1649 of file variable-editor.cc.

References m_tool_bar.

Referenced by construct_tool_bar().

◆ adopted()

bool octave_dock_widget::adopted ( void  ) const
inlineinherited

Definition at line 102 of file octave-dock-widget.h.

References octave_dock_widget::m_adopted.

Referenced by octave_dock_widget::set_adopted().

◆ callUpdate

void variable_editor::callUpdate ( const QModelIndex &  ,
const QModelIndex &   
)
slot

Definition at line 1422 of file variable-editor.cc.

References updated().

Referenced by edit_variable().

◆ change_visibility

void octave_dock_widget::change_visibility ( bool  )
privateslotinherited

◆ clear_content_signal

void variable_editor::clear_content_signal ( void  )
signal

Referenced by cutClipboard(), and edit_variable().

◆ closeEvent

void variable_editor::closeEvent ( QCloseEvent *  e)
protectedslot

Definition at line 1489 of file variable-editor.cc.

References octave_dock_widget::closeEvent(), and finished().

◆ command_signal

void variable_editor::command_signal ( const QString &  cmd)
signal

◆ construct_tool_bar()

◆ copy_clipboard_signal

void variable_editor::copy_clipboard_signal ( void  )
signal

Referenced by copyClipboard(), and edit_variable().

◆ copyClipboard

void variable_editor::copyClipboard ( void  )
protectedslot

Definition at line 1583 of file variable-editor.cc.

References copy_clipboard_signal().

Referenced by construct_tool_bar(), and cutClipboard().

◆ cutClipboard

void variable_editor::cutClipboard ( void  )
protectedslot

Definition at line 1575 of file variable-editor.cc.

References clear_content_signal(), and copyClipboard().

Referenced by construct_tool_bar().

◆ default_dock

void octave_dock_widget::default_dock ( bool  not_used = false)
slotinherited

Definition at line 399 of file octave-dock-widget.cc.

Referenced by octave_dock_widget::toplevel_change().

◆ delete_selected_signal

void variable_editor::delete_selected_signal ( void  )
signal

Referenced by edit_variable().

◆ do_undo

virtual void label_dock_widget::do_undo ( void  )
inlineprotectedvirtualslotinherited

Slot to handle undo.

Definition at line 69 of file octave-dock-widget.h.

Referenced by octave_dock_widget::set_main_window().

◆ edit_variable

void variable_editor::edit_variable ( const QString &  name,
const octave_value val 
)
slot

Definition at line 1212 of file variable-editor.cc.

References callUpdate(), clear_content_signal(), variable_editor_view::clearContent(), variable_editor_view::command_signal(), command_signal(), copy_clipboard_signal(), variable_editor_view::copyClipboard(), variable_editor_view::createColumnMenu(), variable_editor_view::createContextMenu(), variable_editor_view::createRowMenu(), variable_editor_view::delete_selected(), delete_selected_signal(), variable_editor_model::double_click(), variable_editor_model::edit_variable_signal(), variable_editor_stack::edit_variable_signal(), variable_editor_stack::edit_view(), octave_dock_widget::event(), base_qobject::get_resource_manager(), resource_manager::get_settings(), variable_editor_view::handle_horizontal_scroll_action(), variable_editor_view::handle_vertical_scroll_action(), variable_editor_model::interpreter_event(), variable_editor_stack::interpreter_event(), interpreter_event(), level_up_signal(), variable_editor_stack::levelUp(), m_add_font_height, m_alternate_rows, m_default_height, m_font, m_main, label_dock_widget::m_octave_qobj, m_plot_mapper, m_save_mapper, m_stylesheet, m_tool_bar, notice_settings(), paste_clipboard_signal(), variable_editor_view::pasteClipboard(), refresh_signal(), variable_editor_stack::save(), save(), save_signal(), variable_editor_stack::set_editable(), variable_editor_model::set_editable_signal(), label_dock_widget::set_title(), tab_to_front(), variable_editor_model::update_data(), variable_editor_model::update_data_cache(), variable_destroyed(), variable_focused(), and variable_dock_widget::variable_focused_signal().

Referenced by base_qobject::show_variable_editor_window().

◆ event()

bool octave_dock_widget::event ( QEvent *  event)
protectedinherited

◆ eventFilter

bool octave_dock_widget::eventFilter ( QObject obj,
QEvent *  e 
)
protectedslotinherited

Event filter for double clicks into the window decoration elements.

Definition at line 611 of file octave-dock-widget.cc.

References octave_dock_widget::m_focus_follows_mouse.

◆ finished

void variable_editor::finished ( void  )
signal

Referenced by closeEvent().

◆ focusInEvent()

void variable_editor::focusInEvent ( QFocusEvent *  ev)
protected

Definition at line 1165 of file variable-editor.cc.

References m_focus_widget, m_focus_widget_vdw, and m_main.

Referenced by variable_destroyed().

◆ focusWidget()

QWidget * octave_dock_widget::focusWidget ( void  )
protectedinherited

Definition at line 445 of file octave-dock-widget.cc.

References Faddeeva::w().

Referenced by file_editor::editor_tab_has_focus().

◆ handle_active_dock_changed

void octave_dock_widget::handle_active_dock_changed ( octave_dock_widget w_old,
octave_dock_widget w_new 
)
slotinherited

◆ handle_settings

◆ handle_visibility

void octave_dock_widget::handle_visibility ( bool  visible)
virtualslotinherited

◆ init_window_menu_entry

void octave_dock_widget::init_window_menu_entry ( void  )
slotinherited

◆ interpreter_event [1/2]

void variable_editor::interpreter_event ( const fcn_callback fcn)
signal

Referenced by edit_variable().

◆ interpreter_event [2/2]

void variable_editor::interpreter_event ( const meth_callback meth)
signal

◆ level_up_signal

void variable_editor::level_up_signal ( void  )
signal

Referenced by edit_variable(), and levelUp().

◆ levelUp

void variable_editor::levelUp ( void  )
protectedslot

Definition at line 1597 of file variable-editor.cc.

References level_up_signal().

Referenced by construct_tool_bar().

◆ make_widget

◆ make_window

◆ moveEvent

void octave_dock_widget::moveEvent ( QMoveEvent *  event)
slotinherited

◆ notice_settings

◆ operator=()

variable_editor& variable_editor::operator= ( const variable_editor )
delete

◆ paste_clipboard_signal

void variable_editor::paste_clipboard_signal ( void  )
signal

Referenced by edit_variable(), and pasteClipboard().

◆ pasteClipboard

void variable_editor::pasteClipboard ( void  )
protectedslot

Definition at line 1589 of file variable-editor.cc.

References paste_clipboard_signal(), and updated().

Referenced by construct_tool_bar().

◆ queue_make_widget

void octave_dock_widget::queue_make_widget ( void  )
signalinherited

◆ queue_make_window

void octave_dock_widget::queue_make_window ( bool  widget_was_dragged)
signalinherited

◆ record_hovered_focus_variable

void variable_editor::record_hovered_focus_variable ( void  )
slot

Definition at line 1546 of file variable-editor.cc.

References m_current_focus_vname, and m_hovered_focus_vname.

Referenced by construct_tool_bar().

◆ refresh()

void variable_editor::refresh ( void  )

Definition at line 1416 of file variable-editor.cc.

References refresh_signal().

Referenced by base_qobject::variable_editor_widget().

◆ refresh_signal

void variable_editor::refresh_signal ( void  )
signal

Referenced by edit_variable(), and refresh().

◆ resizeEvent

void octave_dock_widget::resizeEvent ( QResizeEvent *  event)
slotinherited

◆ restore_hovered_focus_variable

void variable_editor::restore_hovered_focus_variable ( void  )
slot

Definition at line 1552 of file variable-editor.cc.

References m_hovered_focus_vname.

Referenced by construct_tool_bar().

◆ save

void variable_editor::save ( void  )
protectedslot

Definition at line 1569 of file variable-editor.cc.

References save_signal().

Referenced by construct_tool_bar(), and edit_variable().

◆ save_settings

◆ save_signal

void variable_editor::save_signal ( void  )
signal

Referenced by edit_variable(), and save().

◆ selectAll

virtual void label_dock_widget::selectAll ( void  )
inlineprotectedvirtualslotinherited

Slots to handle copy & paste.

Definition at line 64 of file octave-dock-widget.h.

Referenced by octave_dock_widget::set_main_window().

◆ set_adopted()

void octave_dock_widget::set_adopted ( bool  adopted = true)
inlineinherited

◆ set_focus_predecessor()

◆ set_main_window()

◆ set_predecessor_widget()

void octave_dock_widget::set_predecessor_widget ( octave_dock_widget prev_widget)
inherited

◆ set_style()

◆ set_title()

void label_dock_widget::set_title ( const QString &  title)
inherited

◆ store_geometry()

void octave_dock_widget::store_geometry ( void  )
privateinherited

◆ tab_to_front()

void variable_editor::tab_to_front ( void  )

Definition at line 1391 of file variable-editor.cc.

Referenced by edit_variable().

◆ toplevel_change

◆ update_colors()

void variable_editor::update_colors ( void  )
private

Definition at line 1604 of file variable-editor.cc.

References m_alternate_rows, m_font, m_stylesheet, and m_table_colors.

Referenced by notice_settings().

◆ updated

void variable_editor::updated ( void  )
signal

◆ variable_destroyed

void variable_editor::variable_destroyed ( QObject obj)
slot

Definition at line 1497 of file variable-editor.cc.

References focusInEvent(), m_focus_widget, m_focus_widget_vdw, and m_tool_bar.

Referenced by edit_variable().

◆ variable_focused

void variable_editor::variable_focused ( const QString &  name)
slot

Definition at line 1519 of file variable-editor.cc.

References m_current_focus_vname, m_focus_widget, and m_focus_widget_vdw.

Referenced by edit_variable().

Member Data Documentation

◆ m_add_font_height

int variable_editor::m_add_font_height
private

Definition at line 383 of file variable-editor.h.

Referenced by edit_variable(), and notice_settings().

◆ m_adopted

bool octave_dock_widget::m_adopted
privateinherited

◆ m_alternate_rows

bool variable_editor::m_alternate_rows
private

Definition at line 387 of file variable-editor.h.

Referenced by edit_variable(), notice_settings(), and update_colors().

◆ m_bg_color

QColor octave_dock_widget::m_bg_color
privateinherited

◆ m_bg_color_active

QColor octave_dock_widget::m_bg_color_active
privateinherited

◆ m_close_action

QAction* label_dock_widget::m_close_action
protectedinherited

◆ m_close_button

QToolButton* label_dock_widget::m_close_button
protectedinherited

Definition at line 78 of file octave-dock-widget.h.

Referenced by octave_dock_widget::set_style().

◆ m_current_focus_vname

QString variable_editor::m_current_focus_vname
private

Definition at line 406 of file variable-editor.h.

Referenced by record_hovered_focus_variable(), and variable_focused().

◆ m_custom_style

bool octave_dock_widget::m_custom_style
privateinherited

◆ m_default_close_button

QAbstractButton* label_dock_widget::m_default_close_button
protectedinherited

Definition at line 83 of file octave-dock-widget.h.

◆ m_default_float_button

QAbstractButton* label_dock_widget::m_default_float_button
protectedinherited

◆ m_default_height

int variable_editor::m_default_height
private

Definition at line 381 of file variable-editor.h.

Referenced by edit_variable(), and notice_settings().

◆ m_default_width

int variable_editor::m_default_width
private

Definition at line 379 of file variable-editor.h.

Referenced by notice_settings().

◆ m_dock_action

◆ m_dock_button

QToolButton* label_dock_widget::m_dock_button
protectedinherited

Definition at line 77 of file octave-dock-widget.h.

Referenced by octave_dock_widget::set_style().

◆ m_fg_color

QColor octave_dock_widget::m_fg_color
privateinherited

◆ m_fg_color_active

QColor octave_dock_widget::m_fg_color_active
privateinherited

◆ m_focus_follows_mouse

bool octave_dock_widget::m_focus_follows_mouse
privateinherited

◆ m_focus_widget

QWidget* variable_editor::m_focus_widget
private

Definition at line 413 of file variable-editor.h.

Referenced by focusInEvent(), variable_destroyed(), and variable_focused().

◆ m_focus_widget_vdw

variable_dock_widget* variable_editor::m_focus_widget_vdw
private

Definition at line 415 of file variable-editor.h.

Referenced by focusInEvent(), variable_destroyed(), and variable_focused().

◆ m_font

QFont variable_editor::m_font
private

Definition at line 391 of file variable-editor.h.

Referenced by edit_variable(), notice_settings(), and update_colors().

◆ m_hovered_focus_vname

QString variable_editor::m_hovered_focus_vname
private

◆ m_icon_color

◆ m_icon_color_active

QString octave_dock_widget::m_icon_color_active
privateinherited

◆ m_icon_size

int label_dock_widget::m_icon_size
protectedinherited

◆ m_main

dw_main_window* variable_editor::m_main
private

Definition at line 374 of file variable-editor.h.

Referenced by variable_editor(), edit_variable(), focusInEvent(), and notice_settings().

◆ m_main_window

main_window* octave_dock_widget::m_main_window
privateinherited

◆ m_octave_qobj

base_qobject& label_dock_widget::m_octave_qobj
protectedinherited

Definition at line 73 of file octave-dock-widget.h.

Referenced by files_dock_widget::files_dock_widget(), octave_dock_widget::octave_dock_widget(), variable_dock_widget::variable_dock_widget(), file_editor::call_custom_editor(), variable_dock_widget::change_floating(), variable_dock_widget::change_fullscreen(), file_editor::closeEvent(), history_dock_widget::construct(), file_editor::construct(), construct_tool_bar(), files_dock_widget::contextmenu_requested(), history_dock_widget::ctxMenu(), files_dock_widget::display_directory(), edit_variable(), file_editor::empty_script(), file_editor::find_create(), file_editor::handle_enter_debug_mode(), file_editor::handle_exit_debug_mode(), file_editor::handle_file_name_changed(), file_editor::handle_visibility(), workspace_view::header_contextmenu_requested(), files_dock_widget::headercontextmenu_requested(), file_editor::make_file_editor_tab(), octave_dock_widget::make_widget(), octave_dock_widget::make_window(), file_editor::mru_menu_update(), notice_settings(), files_dock_widget::popdownmenu_search_dir(), file_editor::request_open_file(), file_editor::save_session(), files_dock_widget::save_settings(), history_dock_widget::save_settings(), octave_dock_widget::save_settings(), workspace_view::save_settings(), octave_dock_widget::set_focus_predecessor(), file_editor::set_shortcuts(), octave_dock_widget::set_style(), workspace_view::setModel(), files_dock_widget::toggle_header(), workspace_view::toggle_header(), and file_editor::toggle_preference().

◆ m_plot_mapper

QSignalMapper* variable_editor::m_plot_mapper
private

Definition at line 410 of file variable-editor.h.

Referenced by construct_tool_bar(), and edit_variable().

◆ m_predecessor_widget

octave_dock_widget* octave_dock_widget::m_predecessor_widget
privateinherited

◆ m_recent_dock_geom

QRect octave_dock_widget::m_recent_dock_geom
privateinherited

◆ m_recent_float_geom

QRect octave_dock_widget::m_recent_float_geom
privateinherited

◆ m_save_action

QAction* variable_editor::m_save_action
private

Definition at line 377 of file variable-editor.h.

Referenced by construct_tool_bar(), and notice_settings().

◆ m_save_mapper

QSignalMapper* variable_editor::m_save_mapper
private

Definition at line 411 of file variable-editor.h.

Referenced by construct_tool_bar(), and edit_variable().

◆ m_sel_font

QFont variable_editor::m_sel_font
private

Definition at line 395 of file variable-editor.h.

◆ m_stylesheet

QString variable_editor::m_stylesheet
private

Definition at line 389 of file variable-editor.h.

Referenced by edit_variable(), and update_colors().

◆ m_table_colors

QList<QColor> variable_editor::m_table_colors
private

Definition at line 397 of file variable-editor.h.

Referenced by variable_editor(), notice_settings(), and update_colors().

◆ m_title_3d

int octave_dock_widget::m_title_3d
privateinherited

◆ m_title_widget

QWidget* label_dock_widget::m_title_widget
protectedinherited

◆ m_tool_bar

QToolBar* variable_editor::m_tool_bar
private

◆ m_use_terminal_font

bool variable_editor::m_use_terminal_font
private

Definition at line 385 of file variable-editor.h.

Referenced by notice_settings().

◆ m_waiting_for_mouse_button_release

bool octave_dock_widget::m_waiting_for_mouse_button_release
privateinherited

The documentation for this class was generated from the following files: