#include "workspace-model.h"
Public Slots | |
void | clear_workspace (void) |
void | notice_settings (const QSettings *) |
void | set_workspace (bool top_level, bool debug, const symbol_scope &scope) |
Signals | |
void | model_changed (void) |
void | prompt_variable_editor (void) |
void | rename_variable (const QString &old_name, const QString &new_name) |
Public Member Functions | |
workspace_model (QObject *parent=nullptr) | |
~workspace_model (void)=default | |
int | columnCount (const QModelIndex &parent=QModelIndex()) const |
QVariant | data (const QModelIndex &index, int role) const |
Qt::ItemFlags | flags (const QModelIndex &index) const |
QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const |
bool | is_top_level (void) const |
int | rowCount (const QModelIndex &parent=QModelIndex()) const |
symbol_scope | scope (void) const |
bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) |
QColor | storage_class_color (int s_class) |
Static Public Member Functions | |
static QList< QColor > | storage_class_default_colors (void) |
static QStringList | storage_class_names (void) |
Private Member Functions | |
void | clear_data (void) |
void | update_table (void) |
Private Attributes | |
QStringList | m_class_names |
QStringList | m_columnNames |
QIntList | m_complex_flags |
QStringList | m_dimensions |
symbol_scope | m_scope |
QString | m_scopes |
QList< QColor > | m_storage_class_colors |
QStringList | m_symbols |
bool | m_top_level |
QStringList | m_values |
Definition at line 43 of file workspace-model.h.
octave::workspace_model::workspace_model | ( | QObject * | parent = nullptr | ) |
Definition at line 39 of file workspace-model.cc.
References i, m_columnNames, m_storage_class_colors, and octave::resource_manager::storage_class_chars().
|
default |
|
private |
Definition at line 268 of file workspace-model.cc.
References m_class_names, m_complex_flags, m_dimensions, m_scope, m_scopes, m_symbols, m_top_level, and m_values.
Referenced by clear_workspace(), and set_workspace().
|
slot |
Definition at line 244 of file workspace-model.cc.
References clear_data(), and update_table().
int octave::workspace_model::columnCount | ( | const QModelIndex & | parent = QModelIndex () | ) | const |
Definition at line 96 of file workspace-model.cc.
References m_columnNames.
QVariant octave::workspace_model::data | ( | const QModelIndex & | index, |
int | role | ||
) | const |
Definition at line 128 of file workspace-model.cc.
References m_class_names, m_complex_flags, m_dimensions, m_scopes, m_storage_class_colors, m_symbols, m_values, retval, octave::resource_manager::storage_class_chars(), and octave::resource_manager::storage_class_names().
Qt::ItemFlags octave::workspace_model::flags | ( | const QModelIndex & | index | ) | const |
Definition at line 102 of file workspace-model.cc.
References m_top_level, and retval.
QVariant octave::workspace_model::headerData | ( | int | section, |
Qt::Orientation | orientation, | ||
int | role = Qt::DisplayRole |
||
) | const |
Definition at line 118 of file workspace-model.cc.
References m_columnNames.
|
inline |
Definition at line 72 of file workspace-model.h.
References m_top_level.
Referenced by octave::workspace_view::contextmenu_requested().
|
signal |
Referenced by update_table().
|
slot |
Definition at line 251 of file workspace-model.cc.
References i, m_storage_class_colors, octave::resource_manager::storage_class_chars(), and octave::resource_manager::storage_class_default_colors().
Referenced by octave::workspace_view::notice_settings().
|
signal |
|
signal |
Referenced by setData().
int octave::workspace_model::rowCount | ( | const QModelIndex & | parent = QModelIndex () | ) | const |
Definition at line 90 of file workspace-model.cc.
References m_symbols.
|
inline |
Definition at line 79 of file workspace-model.h.
References m_scope.
Referenced by octave::workspace_view::handle_contextmenu_edit(), and set_workspace().
|
slot |
Definition at line 232 of file workspace-model.cc.
References clear_data(), m_scope, m_top_level, scope(), and update_table().
bool octave::workspace_model::setData | ( | const QModelIndex & | index, |
const QVariant & | value, | ||
int | role = Qt::EditRole |
||
) |
Definition at line 207 of file workspace-model.cc.
References m_symbols, rename_variable(), retval, string, valid_identifier(), and value.
|
inline |
Definition at line 74 of file workspace-model.h.
References m_storage_class_colors.
Referenced by octave::workspace_view::notice_settings().
|
static |
Definition at line 54 of file workspace-model.cc.
Referenced by octave::resource_manager::storage_class_default_colors().
|
static |
Definition at line 72 of file workspace-model.cc.
Referenced by octave::resource_manager::storage_class_names().
|
private |
Definition at line 281 of file workspace-model.cc.
References octave::symbol_scope::all_variables(), dim_vector::alloc(), octave::context, octave::symbol_scope::current_context(), dv, QtHandles::Utils::fromStdString(), i, m_class_names, m_complex_flags, m_dimensions, m_scope, m_scopes, m_symbols, m_values, model_changed(), dim_vector::ndims(), nm, dim_vector::str(), string, sz, tmp, and val.
Referenced by clear_workspace(), and set_workspace().
|
private |
Definition at line 106 of file workspace-model.h.
Referenced by clear_data(), data(), and update_table().
|
private |
Definition at line 111 of file workspace-model.h.
Referenced by columnCount(), headerData(), and workspace_model().
|
private |
Definition at line 109 of file workspace-model.h.
Referenced by clear_data(), data(), and update_table().
|
private |
Definition at line 107 of file workspace-model.h.
Referenced by clear_data(), data(), and update_table().
|
private |
Definition at line 103 of file workspace-model.h.
Referenced by clear_data(), scope(), set_workspace(), and update_table().
|
private |
Definition at line 104 of file workspace-model.h.
Referenced by clear_data(), data(), and update_table().
|
private |
Definition at line 113 of file workspace-model.h.
Referenced by data(), notice_settings(), storage_class_color(), and workspace_model().
|
private |
Definition at line 105 of file workspace-model.h.
Referenced by clear_data(), data(), rowCount(), setData(), and update_table().
|
private |
Definition at line 102 of file workspace-model.h.
Referenced by clear_data(), flags(), is_top_level(), and set_workspace().
|
private |
Definition at line 108 of file workspace-model.h.
Referenced by clear_data(), data(), and update_table().