#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.
base_ve_model::base_ve_model | ( | const QString & | expr, |
const octave_value & | val | ||
) |
Definition at line 94 of file variable-editor-model.cc.
|
virtualdefault |
|
delete |
void base_ve_model::clear_update_pending | ( | void | ) |
Definition at line 260 of file variable-editor-model.cc.
References m_update_pending.
Referenced by variable_editor_model::clear_update_pending().
int base_ve_model::column_width | ( | void | ) | const |
Definition at line 128 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 variable_editor_model::column_width().
int base_ve_model::columnCount | ( | const QModelIndex & | = QModelIndex () | ) | const |
Definition at line 159 of file variable-editor-model.cc.
References m_display_cols, and m_valid.
Referenced by variable_editor_model::columnCount().
QVariant base_ve_model::data | ( | const QModelIndex & | idx, |
int | role = Qt::DisplayRole |
||
) | const |
Definition at line 210 of file variable-editor-model.cc.
References edit_display(), Utils::fromStdString(), m_name, m_valid, update_pending(), and update_pending_data().
Referenced by variable_editor_model::data().
|
inline |
Definition at line 105 of file variable-editor-model.h.
References m_data_cols.
Referenced by variable_editor_model::data_columns(), scalar_struct_model::header_data(), 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 variable_editor_model::data_rows(), scalar_struct_model::header_data(), 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 variable_editor_model::display_columns().
|
inline |
Definition at line 107 of file variable-editor-model.h.
References m_display_rows.
Referenced by variable_editor_model::display_rows().
|
virtual |
Reimplemented in struct_model, vector_struct_model, scalar_struct_model, cell_model, numeric_model, display_only_model, and string_model.
Definition at line 190 of file variable-editor-model.cc.
References octave_value::edit_display(), Utils::fromStdString(), index_ok(), octave_value::is_single_type(), m_display_fmt, m_value, and float_display_format::set_precision().
Referenced by data().
QString base_ve_model::edit_display_sub | ( | const octave_value & | elt, |
int | role | ||
) | const |
Definition at line 165 of file variable-editor-model.cc.
References cell_is_editable(), octave_value::class_name(), octave_value::dims(), octave_value::edit_display(), Utils::fromStdString(), get_edit_display_format(), octave_value::is_single_type(), float_display_format::set_precision(), and dim_vector::str().
Referenced by cell_model::edit_display(), scalar_struct_model::edit_display(), and vector_struct_model::edit_display().
|
virtual |
Reimplemented in vector_struct_model, and scalar_struct_model.
Definition at line 272 of file variable-editor-model.cc.
Referenced by variable_editor_model::headerData().
bool base_ve_model::index_ok | ( | const QModelIndex & | idx, |
int & | row, | ||
int & | col | ||
) | const |
Definition at line 113 of file variable-editor-model.cc.
References data_columns(), and data_rows().
Referenced by numeric_model::edit_display(), cell_model::edit_display(), scalar_struct_model::edit_display(), vector_struct_model::edit_display(), edit_display(), struct_model::edit_display(), cell_model::requires_sub_editor(), scalar_struct_model::requires_sub_editor(), vector_struct_model::requires_sub_editor(), struct_model::requires_sub_editor(), scalar_struct_model::subscript_expression(), struct_model::subscript_expression(), cell_model::value_at(), scalar_struct_model::value_at(), vector_struct_model::value_at(), and struct_model::value_at().
|
inlinevirtual |
Reimplemented in display_only_model.
Definition at line 64 of file variable-editor-model.h.
Referenced by variable_editor_model::is_editable().
|
inline |
Definition at line 101 of file variable-editor-model.h.
References m_valid.
Referenced by variable_editor_model::is_valid().
|
virtual |
Reimplemented in display_only_model.
Definition at line 288 of file variable-editor-model.cc.
References octave_value::class_name(), octave_value::dims(), Utils::fromStdString(), octave_value::is_defined(), m_name, m_value, and dim_vector::str().
Referenced by display_only_model::make_description_text(), and variable_editor_model::make_description_text().
|
inlinevirtual |
Reimplemented in struct_model, cell_model, and numeric_model.
Definition at line 58 of file variable-editor-model.h.
Referenced by variable_editor_model::maybe_resize_columns().
|
inlinevirtual |
Reimplemented in struct_model, vector_struct_model, cell_model, and numeric_model.
Definition at line 56 of file variable-editor-model.h.
Referenced by variable_editor_model::maybe_resize_rows().
std::string base_ve_model::name | ( | void | ) | const |
Definition at line 107 of file variable-editor-model.cc.
References m_name.
Referenced by variable_editor_model::double_click(), and variable_editor_model::name().
|
delete |
|
virtual |
Reimplemented in struct_model, vector_struct_model, scalar_struct_model, cell_model, and string_model.
Definition at line 266 of file variable-editor-model.cc.
Referenced by variable_editor_model::quote_char().
|
virtual |
Reimplemented in struct_model, vector_struct_model, scalar_struct_model, and cell_model.
Definition at line 236 of file variable-editor-model.cc.
Referenced by variable_editor_model::requires_sub_editor().
void base_ve_model::reset | ( | const octave_value & | val | ) |
int base_ve_model::rowCount | ( | const QModelIndex & | = QModelIndex () | ) | const |
Definition at line 153 of file variable-editor-model.cc.
References m_display_rows, and m_valid.
Referenced by variable_editor_model::rowCount().
void base_ve_model::set_update_pending | ( | const QModelIndex & | idx, |
const QString & | str | ||
) |
Definition at line 242 of file variable-editor-model.cc.
References m_update_pending.
Referenced by variable_editor_model::set_update_pending().
|
virtual |
Reimplemented in struct_model, vector_struct_model, scalar_struct_model, cell_model, and numeric_model.
Definition at line 282 of file variable-editor-model.cc.
Referenced by variable_editor_model::subscript_expression().
bool base_ve_model::update_pending | ( | const QModelIndex & | idx | ) | const |
Definition at line 248 of file variable-editor-model.cc.
References m_update_pending.
Referenced by data(), and variable_editor_model::update_pending().
QString base_ve_model::update_pending_data | ( | const QModelIndex & | idx | ) | const |
Definition at line 254 of file variable-editor-model.cc.
References m_update_pending.
Referenced by data(), and variable_editor_model::update_pending_data().
|
virtual |
Reimplemented in struct_model, vector_struct_model, scalar_struct_model, and cell_model.
Definition at line 314 of file variable-editor-model.cc.
References octave_value().
Referenced by variable_editor_model::value_at().
|
protected |
Definition at line 122 of file variable-editor-model.h.
Referenced by cell_model::cell_model(), display_only_model::display_only_model(), numeric_model::numeric_model(), scalar_struct_model::scalar_struct_model(), string_model::string_model(), struct_model::struct_model(), vector_struct_model::vector_struct_model(), and data_columns().
|
protected |
Definition at line 121 of file variable-editor-model.h.
Referenced by cell_model::cell_model(), display_only_model::display_only_model(), numeric_model::numeric_model(), scalar_struct_model::scalar_struct_model(), string_model::string_model(), struct_model::struct_model(), vector_struct_model::vector_struct_model(), and data_rows().
|
protected |
Definition at line 126 of file variable-editor-model.h.
Referenced by display_only_model::display_only_model(), scalar_struct_model::scalar_struct_model(), string_model::string_model(), vector_struct_model::vector_struct_model(), columnCount(), display_columns(), numeric_model::maybe_resize_columns(), cell_model::maybe_resize_columns(), and struct_model::maybe_resize_columns().
|
protected |
Definition at line 132 of file variable-editor-model.h.
Referenced by column_width(), numeric_model::edit_display(), edit_display(), and struct_model::edit_display().
|
protected |
Definition at line 125 of file variable-editor-model.h.
Referenced by display_only_model::display_only_model(), scalar_struct_model::scalar_struct_model(), string_model::string_model(), display_rows(), numeric_model::maybe_resize_rows(), cell_model::maybe_resize_rows(), vector_struct_model::maybe_resize_rows(), struct_model::maybe_resize_rows(), and rowCount().
|
protected |
Definition at line 117 of file variable-editor-model.h.
Referenced by data(), 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(), string_model::edit_display(), display_only_model::edit_display(), numeric_model::edit_display(), cell_model::edit_display(), scalar_struct_model::edit_display(), vector_struct_model::edit_display(), edit_display(), struct_model::edit_display(), scalar_struct_model::header_data(), vector_struct_model::header_data(), make_description_text(), string_model::quote_char(), cell_model::requires_sub_editor(), scalar_struct_model::requires_sub_editor(), vector_struct_model::requires_sub_editor(), struct_model::requires_sub_editor(), scalar_struct_model::subscript_expression(), vector_struct_model::subscript_expression(), cell_model::value_at(), scalar_struct_model::value_at(), vector_struct_model::value_at(), and struct_model::value_at().