#include "variable-editor-model.h"
Public Member Functions | |
base_ve_model (const base_ve_model &)=delete | |
base_ve_model (const QString &expr, const octave_value &val) | |
virtual | ~base_ve_model (void)=default |
void | clear_update_pending (void) |
int | column_width (void) const |
int | columnCount (const QModelIndex &=QModelIndex()) const |
QVariant | data (const QModelIndex &idx, int role=Qt::DisplayRole) const |
octave_idx_type | data_columns (void) const |
octave_idx_type | data_rows (void) const |
int | display_columns (void) const |
int | display_rows (void) const |
virtual QVariant | edit_display (const QModelIndex &idx, int role) const |
QString | edit_display_sub (const octave_value &elt, int role) const |
virtual QVariant | header_data (int section, Qt::Orientation orientation, int role) const |
bool | index_ok (const QModelIndex &idx, int &row, int &col) const |
virtual bool | is_editable (void) const |
bool | is_valid (void) const |
virtual QString | make_description_text (void) const |
virtual void | maybe_resize_columns (int) |
virtual void | maybe_resize_rows (int) |
std::string | name (void) const |
base_ve_model & | operator= (const base_ve_model &)=delete |
virtual char | quote_char (const QModelIndex &idx) const |
virtual bool | requires_sub_editor (const QModelIndex &idx) const |
void | reset (const octave_value &val) |
int | rowCount (const QModelIndex &=QModelIndex()) const |
void | set_update_pending (const QModelIndex &idx, const QString &str) |
virtual QString | subscript_expression (const QModelIndex &idx) const |
bool | update_pending (const QModelIndex &idx) const |
QString | update_pending_data (const QModelIndex &idx) const |
virtual octave_value | value_at (const QModelIndex &idx) const |
Protected Attributes | |
octave_idx_type | m_data_cols |
octave_idx_type | m_data_rows |
int | m_display_cols |
float_display_format | m_display_fmt |
int | m_display_rows |
std::string | m_name |
QMap< QModelIndex, QString > | m_update_pending |
bool | m_valid |
octave_value | m_value |
Definition at line 42 of file variable-editor-model.h.
octave::base_ve_model::base_ve_model | ( | const QString & | expr, |
const octave_value & | val | ||
) |
Definition at line 93 of file variable-editor-model.cc.
|
virtualdefault |
|
delete |
void octave::base_ve_model::clear_update_pending | ( | void | ) |
Definition at line 259 of file variable-editor-model.cc.
References m_update_pending.
Referenced by octave::variable_editor_model::clear_update_pending().
int octave::base_ve_model::column_width | ( | void | ) | const |
Definition at line 127 of file variable-editor-model.cc.
References float_display_format::imag_format(), octave_value::iscomplex(), m_display_fmt, m_value, float_display_format::real_format(), and float_format::width().
Referenced by octave::variable_editor_model::column_width().
int octave::base_ve_model::columnCount | ( | const QModelIndex & | = QModelIndex () | ) | const |
Definition at line 158 of file variable-editor-model.cc.
References m_display_cols, and m_valid.
Referenced by octave::variable_editor_model::columnCount().
QVariant octave::base_ve_model::data | ( | const QModelIndex & | idx, |
int | role = Qt::DisplayRole |
||
) | const |
Definition at line 209 of file variable-editor-model.cc.
References edit_display(), QtHandles::Utils::fromStdString(), m_name, m_valid, update_pending(), and update_pending_data().
Referenced by octave::variable_editor_model::data().
|
inline |
Definition at line 105 of file variable-editor-model.h.
References m_data_cols.
Referenced by octave::variable_editor_model::data_columns(), octave::scalar_struct_model::header_data(), octave::vector_struct_model::header_data(), and index_ok().
|
inline |
Definition at line 103 of file variable-editor-model.h.
References m_data_rows.
Referenced by octave::variable_editor_model::data_rows(), octave::scalar_struct_model::header_data(), octave::vector_struct_model::header_data(), and index_ok().
|
inline |
Definition at line 109 of file variable-editor-model.h.
References m_display_cols.
Referenced by octave::variable_editor_model::display_columns().
|
inline |
Definition at line 107 of file variable-editor-model.h.
References m_display_rows.
Referenced by octave::variable_editor_model::display_rows().
|
virtual |
Reimplemented in octave::struct_model, octave::vector_struct_model, octave::scalar_struct_model, octave::cell_model, octave::numeric_model, octave::display_only_model, and octave::string_model.
Definition at line 189 of file variable-editor-model.cc.
References octave_value::edit_display(), QtHandles::Utils::fromStdString(), index_ok(), octave_value::is_single_type(), m_display_fmt, m_value, and float_display_format::set_precision().
Referenced by data().
QString octave::base_ve_model::edit_display_sub | ( | const octave_value & | elt, |
int | role | ||
) | const |
Definition at line 164 of file variable-editor-model.cc.
References octave::cell_is_editable(), octave_value::class_name(), octave_value::dims(), octave_value::edit_display(), QtHandles::Utils::fromStdString(), octave::get_edit_display_format(), octave_value::is_single_type(), float_display_format::set_precision(), and dim_vector::str().
Referenced by octave::cell_model::edit_display(), octave::scalar_struct_model::edit_display(), and octave::vector_struct_model::edit_display().
|
virtual |
Reimplemented in octave::vector_struct_model, and octave::scalar_struct_model.
Definition at line 271 of file variable-editor-model.cc.
Referenced by octave::variable_editor_model::headerData().
bool octave::base_ve_model::index_ok | ( | const QModelIndex & | idx, |
int & | row, | ||
int & | col | ||
) | const |
Definition at line 112 of file variable-editor-model.cc.
References data_columns(), and data_rows().
Referenced by octave::numeric_model::edit_display(), octave::cell_model::edit_display(), octave::scalar_struct_model::edit_display(), octave::vector_struct_model::edit_display(), edit_display(), octave::struct_model::edit_display(), octave::cell_model::requires_sub_editor(), octave::scalar_struct_model::requires_sub_editor(), octave::vector_struct_model::requires_sub_editor(), octave::struct_model::requires_sub_editor(), octave::scalar_struct_model::subscript_expression(), octave::struct_model::subscript_expression(), octave::cell_model::value_at(), octave::scalar_struct_model::value_at(), octave::vector_struct_model::value_at(), and octave::struct_model::value_at().
|
inlinevirtual |
Reimplemented in octave::display_only_model.
Definition at line 64 of file variable-editor-model.h.
Referenced by octave::variable_editor_model::is_editable().
|
inline |
Definition at line 101 of file variable-editor-model.h.
References m_valid.
Referenced by octave::variable_editor_model::is_valid().
|
virtual |
Reimplemented in octave::display_only_model.
Definition at line 287 of file variable-editor-model.cc.
References octave_value::class_name(), octave_value::dims(), QtHandles::Utils::fromStdString(), octave_value::is_defined(), m_name, m_value, and dim_vector::str().
Referenced by octave::display_only_model::make_description_text(), and octave::variable_editor_model::make_description_text().
|
inlinevirtual |
Reimplemented in octave::struct_model, octave::cell_model, and octave::numeric_model.
Definition at line 58 of file variable-editor-model.h.
Referenced by octave::variable_editor_model::maybe_resize_columns().
|
inlinevirtual |
Reimplemented in octave::struct_model, octave::vector_struct_model, octave::cell_model, and octave::numeric_model.
Definition at line 56 of file variable-editor-model.h.
Referenced by octave::variable_editor_model::maybe_resize_rows().
std::string octave::base_ve_model::name | ( | void | ) | const |
Definition at line 106 of file variable-editor-model.cc.
References m_name.
Referenced by octave::variable_editor_model::double_click(), and octave::variable_editor_model::name().
|
delete |
|
virtual |
Reimplemented in octave::struct_model, octave::vector_struct_model, octave::scalar_struct_model, octave::cell_model, and octave::string_model.
Definition at line 265 of file variable-editor-model.cc.
Referenced by octave::variable_editor_model::quote_char().
|
virtual |
Reimplemented in octave::struct_model, octave::vector_struct_model, octave::scalar_struct_model, and octave::cell_model.
Definition at line 235 of file variable-editor-model.cc.
Referenced by octave::variable_editor_model::requires_sub_editor().
void octave::base_ve_model::reset | ( | const octave_value & | val | ) |
int octave::base_ve_model::rowCount | ( | const QModelIndex & | = QModelIndex () | ) | const |
Definition at line 152 of file variable-editor-model.cc.
References m_display_rows, and m_valid.
Referenced by octave::variable_editor_model::rowCount().
void octave::base_ve_model::set_update_pending | ( | const QModelIndex & | idx, |
const QString & | str | ||
) |
Definition at line 241 of file variable-editor-model.cc.
References m_update_pending.
Referenced by octave::variable_editor_model::set_update_pending().
|
virtual |
Reimplemented in octave::struct_model, octave::vector_struct_model, octave::scalar_struct_model, octave::cell_model, and octave::numeric_model.
Definition at line 281 of file variable-editor-model.cc.
Referenced by octave::variable_editor_model::subscript_expression().
bool octave::base_ve_model::update_pending | ( | const QModelIndex & | idx | ) | const |
Definition at line 247 of file variable-editor-model.cc.
References m_update_pending.
Referenced by data(), and octave::variable_editor_model::update_pending().
QString octave::base_ve_model::update_pending_data | ( | const QModelIndex & | idx | ) | const |
Definition at line 253 of file variable-editor-model.cc.
References m_update_pending.
Referenced by data(), and octave::variable_editor_model::update_pending_data().
|
virtual |
Reimplemented in octave::struct_model, octave::vector_struct_model, octave::scalar_struct_model, and octave::cell_model.
Definition at line 313 of file variable-editor-model.cc.
References octave_value().
Referenced by octave::variable_editor_model::value_at().
|
protected |
Definition at line 122 of file variable-editor-model.h.
Referenced by octave::cell_model::cell_model(), octave::display_only_model::display_only_model(), octave::numeric_model::numeric_model(), octave::scalar_struct_model::scalar_struct_model(), octave::string_model::string_model(), octave::struct_model::struct_model(), octave::vector_struct_model::vector_struct_model(), and data_columns().
|
protected |
Definition at line 121 of file variable-editor-model.h.
Referenced by octave::cell_model::cell_model(), octave::display_only_model::display_only_model(), octave::numeric_model::numeric_model(), octave::scalar_struct_model::scalar_struct_model(), octave::string_model::string_model(), octave::struct_model::struct_model(), octave::vector_struct_model::vector_struct_model(), and data_rows().
|
protected |
Definition at line 126 of file variable-editor-model.h.
Referenced by octave::display_only_model::display_only_model(), octave::scalar_struct_model::scalar_struct_model(), octave::string_model::string_model(), octave::vector_struct_model::vector_struct_model(), columnCount(), display_columns(), octave::numeric_model::maybe_resize_columns(), octave::cell_model::maybe_resize_columns(), and octave::struct_model::maybe_resize_columns().
|
protected |
Definition at line 132 of file variable-editor-model.h.
Referenced by column_width(), octave::numeric_model::edit_display(), edit_display(), and octave::struct_model::edit_display().
|
protected |
Definition at line 125 of file variable-editor-model.h.
Referenced by octave::display_only_model::display_only_model(), octave::scalar_struct_model::scalar_struct_model(), octave::string_model::string_model(), display_rows(), octave::numeric_model::maybe_resize_rows(), octave::cell_model::maybe_resize_rows(), octave::vector_struct_model::maybe_resize_rows(), octave::struct_model::maybe_resize_rows(), and rowCount().
|
protected |
Definition at line 117 of file variable-editor-model.h.
Referenced by data(), octave::display_only_model::edit_display(), make_description_text(), and name().
|
protected |
Definition at line 128 of file variable-editor-model.h.
Referenced by clear_update_pending(), set_update_pending(), update_pending(), and update_pending_data().
|
protected |
Definition at line 130 of file variable-editor-model.h.
Referenced by columnCount(), data(), is_valid(), and rowCount().
|
protected |
Definition at line 119 of file variable-editor-model.h.
Referenced by column_width(), octave::string_model::edit_display(), octave::display_only_model::edit_display(), octave::numeric_model::edit_display(), octave::cell_model::edit_display(), octave::scalar_struct_model::edit_display(), octave::vector_struct_model::edit_display(), edit_display(), octave::struct_model::edit_display(), octave::scalar_struct_model::header_data(), octave::vector_struct_model::header_data(), make_description_text(), octave::string_model::quote_char(), octave::cell_model::requires_sub_editor(), octave::scalar_struct_model::requires_sub_editor(), octave::vector_struct_model::requires_sub_editor(), octave::struct_model::requires_sub_editor(), octave::scalar_struct_model::subscript_expression(), octave::vector_struct_model::subscript_expression(), octave::cell_model::value_at(), octave::scalar_struct_model::value_at(), octave::vector_struct_model::value_at(), and octave::struct_model::value_at().