GNU Octave  4.4.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
octave::workspace_model Class Reference

#include "workspace-model.h"

Inheritance diagram for octave::workspace_model:
Collaboration diagram for octave::workspace_model:

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
 

Detailed Description

Definition at line 43 of file workspace-model.h.

Constructor & Destructor Documentation

◆ workspace_model()

octave::workspace_model::workspace_model ( QObject parent = nullptr)

◆ ~workspace_model()

octave::workspace_model::~workspace_model ( void  )
default

Member Function Documentation

◆ clear_data()

void octave::workspace_model::clear_data ( void  )
private

◆ clear_workspace

void octave::workspace_model::clear_workspace ( void  )
slot

Definition at line 244 of file workspace-model.cc.

References clear_data(), and update_table().

◆ columnCount()

int octave::workspace_model::columnCount ( const QModelIndex &  parent = QModelIndex ()) const

Definition at line 96 of file workspace-model.cc.

References m_columnNames.

◆ data()

QVariant octave::workspace_model::data ( const QModelIndex &  index,
int  role 
) const

◆ flags()

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.

◆ headerData()

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.

◆ is_top_level()

bool octave::workspace_model::is_top_level ( void  ) const
inline

Definition at line 72 of file workspace-model.h.

References m_top_level.

Referenced by octave::workspace_view::contextmenu_requested().

◆ model_changed

void octave::workspace_model::model_changed ( void  )
signal

Referenced by update_table().

◆ notice_settings

void octave::workspace_model::notice_settings ( const QSettings *  settings)
slot

◆ prompt_variable_editor

void octave::workspace_model::prompt_variable_editor ( void  )
signal

◆ rename_variable

void octave::workspace_model::rename_variable ( const QString &  old_name,
const QString &  new_name 
)
signal

Referenced by setData().

◆ rowCount()

int octave::workspace_model::rowCount ( const QModelIndex &  parent = QModelIndex ()) const

Definition at line 90 of file workspace-model.cc.

References m_symbols.

◆ scope()

symbol_scope octave::workspace_model::scope ( void  ) const
inline

Definition at line 79 of file workspace-model.h.

References m_scope.

Referenced by octave::workspace_view::handle_contextmenu_edit(), and set_workspace().

◆ set_workspace

void octave::workspace_model::set_workspace ( bool  top_level,
bool  debug,
const symbol_scope scope 
)
slot

Definition at line 232 of file workspace-model.cc.

References clear_data(), m_scope, m_top_level, scope(), and update_table().

◆ setData()

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.

◆ storage_class_color()

QColor octave::workspace_model::storage_class_color ( int  s_class)
inline

Definition at line 74 of file workspace-model.h.

References m_storage_class_colors.

Referenced by octave::workspace_view::notice_settings().

◆ storage_class_default_colors()

QList< QColor > octave::workspace_model::storage_class_default_colors ( void  )
static

◆ storage_class_names()

QStringList octave::workspace_model::storage_class_names ( void  )
static

Definition at line 72 of file workspace-model.cc.

Referenced by octave::resource_manager::storage_class_names().

◆ update_table()

Member Data Documentation

◆ m_class_names

QStringList octave::workspace_model::m_class_names
private

Definition at line 106 of file workspace-model.h.

Referenced by clear_data(), data(), and update_table().

◆ m_columnNames

QStringList octave::workspace_model::m_columnNames
private

Definition at line 111 of file workspace-model.h.

Referenced by columnCount(), headerData(), and workspace_model().

◆ m_complex_flags

QIntList octave::workspace_model::m_complex_flags
private

Definition at line 109 of file workspace-model.h.

Referenced by clear_data(), data(), and update_table().

◆ m_dimensions

QStringList octave::workspace_model::m_dimensions
private

Definition at line 107 of file workspace-model.h.

Referenced by clear_data(), data(), and update_table().

◆ m_scope

symbol_scope octave::workspace_model::m_scope
private

Definition at line 103 of file workspace-model.h.

Referenced by clear_data(), scope(), set_workspace(), and update_table().

◆ m_scopes

QString octave::workspace_model::m_scopes
private

Definition at line 104 of file workspace-model.h.

Referenced by clear_data(), data(), and update_table().

◆ m_storage_class_colors

QList<QColor> octave::workspace_model::m_storage_class_colors
private

Definition at line 113 of file workspace-model.h.

Referenced by data(), notice_settings(), storage_class_color(), and workspace_model().

◆ m_symbols

QStringList octave::workspace_model::m_symbols
private

Definition at line 105 of file workspace-model.h.

Referenced by clear_data(), data(), rowCount(), setData(), and update_table().

◆ m_top_level

bool octave::workspace_model::m_top_level
private

Definition at line 102 of file workspace-model.h.

Referenced by clear_data(), flags(), is_top_level(), and set_workspace().

◆ m_values

QStringList octave::workspace_model::m_values
private

Definition at line 108 of file workspace-model.h.

Referenced by clear_data(), data(), and update_table().


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