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

#include "workspace-view.h"

Inheritance diagram for workspace_view:
Collaboration diagram for workspace_view:

Public Slots

virtual void activate (void)
 
void copyClipboard (void)
 
void default_dock (bool not_used=false)
 
void handle_active_dock_changed (octave_dock_widget *, octave_dock_widget *)
 
void handle_model_changed (void)
 
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 resizeEvent (QResizeEvent *event)
 
void save_settings (void)
 
void selectAll (void)
 
void setModel (workspace_model *model)
 

Signals

void active_changed (bool active)
 Custom signal that tells whether a user has clicked away that dock widget, i.e. More...
 
void command_requested (const QString &cmd)
 Signal that user had requested a command on a variable. More...
 
void copy_variable_value_to_clipboard (const QString &)
 Signal that user wnats to copy a variable value to the clipboard. More...
 
void edit_variable_signal (const QString &)
 Signal that user wants to edit a variable. More...
 
void queue_make_widget (void)
 
void queue_make_window (bool widget_was_dragged)
 
void rename_variable_signal (const QString &, const QString &)
 Signal that user wants to rename a variable. More...
 

Public Member Functions

 workspace_view (QWidget *parent, base_qobject &oct_qobj)
 
 ~workspace_view (void)=default
 
bool adopted (void) const
 
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 &)
 

Protected Slots

void contextmenu_requested (const QPoint &pos)
 
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 filter_activate (bool enable)
 
void filter_update (const QString &expression)
 
void handle_contextmenu_clear (void)
 
void handle_contextmenu_copy (void)
 
void handle_contextmenu_copy_value (void)
 
void handle_contextmenu_disp (void)
 
void handle_contextmenu_edit (void)
 
void handle_contextmenu_filter (void)
 
void handle_contextmenu_plot (void)
 
void handle_contextmenu_rename (void)
 
void handle_contextmenu_stem (void)
 
void header_contextmenu_requested (const QPoint &mpos)
 
void toggle_header (int column)
 
virtual void toplevel_change (bool)
 
void update_filter_history (void)
 
virtual void pasteClipboard (void)
 Slots to handle copy & paste. More...
 

Protected Member Functions

virtual void closeEvent (QCloseEvent *e)
 
bool event (QEvent *event)
 
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

QString get_var_name (const QModelIndex &index)
 
void relay_contextmenu_command (const QString &cmdname, bool str=false)
 
void set_filter_focus (bool focus)
 
void set_focus_predecessor (void)
 
void set_style (bool active)
 
void store_geometry (void)
 

Private Attributes

bool m_adopted
 
QColor m_bg_color
 
QColor m_bg_color_active
 
bool m_custom_style
 
QColor m_fg_color
 
QColor m_fg_color_active
 
QComboBox * m_filter
 
QCheckBox * m_filter_checkbox
 
QSortFilterProxyModel m_filter_model
 
bool m_filter_shown
 
QWidgetm_filter_widget
 
bool m_focus_follows_mouse
 
QString m_icon_color
 
QString m_icon_color_active
 
main_windowm_main_window
 Stores the parent, since we are reparenting to 0. More...
 
workspace_modelm_model
 
octave_dock_widgetm_predecessor_widget
 
QRect m_recent_dock_geom
 
QRect m_recent_float_geom
 
int m_title_3d
 
QTableViewm_view
 
int m_view_previous_row_count
 
bool m_waiting_for_mouse_button_release
 

Detailed Description

Definition at line 44 of file workspace-view.h.

Constructor & Destructor Documentation

◆ workspace_view()

◆ ~workspace_view()

workspace_view::~workspace_view ( void  )
default

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().

◆ 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().

◆ change_visibility

void octave_dock_widget::change_visibility ( bool  )
privateslotinherited

◆ closeEvent()

void octave_dock_widget::closeEvent ( QCloseEvent *  e)
protectedvirtualinherited

◆ command_requested

void workspace_view::command_requested ( const QString &  cmd)
signal

Signal that user had requested a command on a variable.

Referenced by main_window::adopt_workspace_widget(), and relay_contextmenu_command().

◆ contextmenu_requested

◆ copy_variable_value_to_clipboard

void workspace_view::copy_variable_value_to_clipboard ( const QString &  )
signal

Signal that user wnats to copy a variable value to the clipboard.

Referenced by handle_contextmenu_copy_value(), and base_qobject::workspace_widget().

◆ copyClipboard

void workspace_view::copyClipboard ( void  )
slot

Definition at line 511 of file workspace-view.cc.

References handle_contextmenu_copy(), and m_view.

◆ 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().

◆ 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_signal

void workspace_view::edit_variable_signal ( const QString &  )
signal

Signal that user wants to edit a variable.

Referenced by handle_contextmenu_edit(), and base_qobject::workspace_widget().

◆ 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.

◆ filter_activate

void workspace_view::filter_activate ( bool  enable)
protectedslot

Definition at line 263 of file workspace-view.cc.

References filter_update(), m_filter, m_filter_model, set_filter_focus(), and state.

Referenced by workspace_view().

◆ filter_update

void workspace_view::filter_update ( const QString &  expression)
protectedslot

Definition at line 256 of file workspace-view.cc.

References handle_model_changed(), and m_filter_model.

Referenced by workspace_view(), and filter_activate().

◆ 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().

◆ get_var_name()

QString workspace_view::get_var_name ( const QModelIndex &  index)
private

◆ handle_active_dock_changed

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

◆ handle_contextmenu_clear

void workspace_view::handle_contextmenu_clear ( void  )
protectedslot

Definition at line 464 of file workspace-view.cc.

References relay_contextmenu_command().

Referenced by contextmenu_requested().

◆ handle_contextmenu_copy

void workspace_view::handle_contextmenu_copy ( void  )
protectedslot

Definition at line 407 of file workspace-view.cc.

References get_var_name(), and m_view.

Referenced by contextmenu_requested(), and copyClipboard().

◆ handle_contextmenu_copy_value

void workspace_view::handle_contextmenu_copy_value ( void  )
protectedslot

Definition at line 422 of file workspace-view.cc.

References copy_variable_value_to_clipboard(), get_var_name(), and m_view.

Referenced by contextmenu_requested().

◆ handle_contextmenu_disp

void workspace_view::handle_contextmenu_disp ( void  )
protectedslot

Definition at line 470 of file workspace-view.cc.

References relay_contextmenu_command().

Referenced by contextmenu_requested().

◆ handle_contextmenu_edit

void workspace_view::handle_contextmenu_edit ( void  )
protectedslot

Definition at line 455 of file workspace-view.cc.

References edit_variable_signal(), get_var_name(), and m_view.

Referenced by workspace_view(), and contextmenu_requested().

◆ handle_contextmenu_filter

void workspace_view::handle_contextmenu_filter ( void  )
protectedslot

◆ handle_contextmenu_plot

void workspace_view::handle_contextmenu_plot ( void  )
protectedslot

Definition at line 476 of file workspace-view.cc.

References relay_contextmenu_command().

Referenced by contextmenu_requested().

◆ handle_contextmenu_rename

void workspace_view::handle_contextmenu_rename ( void  )
protectedslot

Definition at line 431 of file workspace-view.cc.

References get_var_name(), m_view, and rename_variable_signal().

Referenced by contextmenu_requested().

◆ handle_contextmenu_stem

void workspace_view::handle_contextmenu_stem ( void  )
protectedslot

Definition at line 482 of file workspace-view.cc.

References relay_contextmenu_command().

Referenced by contextmenu_requested().

◆ handle_model_changed

void workspace_view::handle_model_changed ( void  )
slot

◆ handle_settings

◆ handle_visibility

void octave_dock_widget::handle_visibility ( bool  visible)
virtualslotinherited

◆ header_contextmenu_requested

void workspace_view::header_contextmenu_requested ( const QPoint &  mpos)
protectedslot

◆ init_window_menu_entry

void octave_dock_widget::init_window_menu_entry ( void  )
slotinherited

◆ make_widget

◆ make_window

◆ moveEvent

void octave_dock_widget::moveEvent ( QMoveEvent *  event)
slotinherited

◆ notice_settings

◆ pasteClipboard

virtual void label_dock_widget::pasteClipboard ( void  )
inlineprotectedvirtualslotinherited

Slots to handle copy & paste.

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

Referenced by octave_dock_widget::set_main_window().

◆ 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

◆ relay_contextmenu_command()

void workspace_view::relay_contextmenu_command ( const QString &  cmdname,
bool  str = false 
)
private

◆ rename_variable_signal

void workspace_view::rename_variable_signal ( const QString &  ,
const QString &   
)
signal

Signal that user wants to rename a variable.

Referenced by handle_contextmenu_rename(), and base_qobject::workspace_widget().

◆ resizeEvent

void octave_dock_widget::resizeEvent ( QResizeEvent *  event)
slotinherited

◆ save_settings

◆ selectAll

void workspace_view::selectAll ( void  )
slot

Definition at line 518 of file workspace-view.cc.

References m_view.

◆ set_adopted()

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

◆ set_filter_focus()

void workspace_view::set_filter_focus ( bool  focus)
private

Definition at line 241 of file workspace-view.cc.

References m_filter, and m_view.

Referenced by filter_activate(), and handle_contextmenu_filter().

◆ 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()

◆ setModel

◆ store_geometry()

void octave_dock_widget::store_geometry ( void  )
privateinherited

◆ toggle_header

◆ toplevel_change

◆ update_filter_history

void workspace_view::update_filter_history ( void  )
protectedslot

Definition at line 277 of file workspace-view.cc.

References m_filter.

Referenced by workspace_view().

Member Data Documentation

◆ m_adopted

bool octave_dock_widget::m_adopted
privateinherited

◆ 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_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_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_filter

QComboBox* workspace_view::m_filter
private

◆ m_filter_checkbox

QCheckBox* workspace_view::m_filter_checkbox
private

Definition at line 126 of file workspace-view.h.

Referenced by handle_contextmenu_filter(), and save_settings().

◆ m_filter_model

QSortFilterProxyModel workspace_view::m_filter_model
private

Definition at line 125 of file workspace-view.h.

Referenced by filter_activate(), filter_update(), handle_model_changed(), and setModel().

◆ m_filter_shown

bool workspace_view::m_filter_shown
private

◆ m_filter_widget

QWidget* workspace_view::m_filter_widget
private

Definition at line 128 of file workspace-view.h.

Referenced by handle_contextmenu_filter().

◆ m_focus_follows_mouse

bool octave_dock_widget::m_focus_follows_mouse
privateinherited

◆ 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_window

main_window* octave_dock_widget::m_main_window
privateinherited

◆ m_model

workspace_model* workspace_view::m_model
private

Definition at line 123 of file workspace-view.h.

Referenced by contextmenu_requested(), notice_settings(), and setModel().

◆ 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(), variable_editor::construct_tool_bar(), files_dock_widget::contextmenu_requested(), history_dock_widget::ctxMenu(), files_dock_widget::display_directory(), variable_editor::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(), 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(), variable_editor::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(), save_settings(), octave_dock_widget::set_focus_predecessor(), file_editor::set_shortcuts(), octave_dock_widget::set_style(), setModel(), files_dock_widget::toggle_header(), toggle_header(), and file_editor::toggle_preference().

◆ 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_title_3d

int octave_dock_widget::m_title_3d
privateinherited

◆ m_title_widget

QWidget* label_dock_widget::m_title_widget
protectedinherited

◆ m_view

◆ m_view_previous_row_count

int workspace_view::m_view_previous_row_count
private

Definition at line 118 of file workspace-view.h.

Referenced by handle_model_changed().

◆ 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: