25 #if ! defined (variable_editor_model_h) 26 #define variable_editor_model_h 1 28 #include <QAbstractTableModel> 57 bool index_ok (
const QModelIndex& idx,
int&
row,
int& col)
const;
65 int rowCount (
const QModelIndex& = QModelIndex ())
const;
67 int columnCount (
const QModelIndex& = QModelIndex ())
const;
71 virtual QVariant
edit_display (
const QModelIndex& idx,
int role)
const;
73 QVariant
data (
const QModelIndex& idx,
int role = Qt::DisplayRole)
const;
85 virtual char quote_char (
const QModelIndex& idx)
const;
88 header_data (
int section, Qt::Orientation orientation,
int role)
const;
174 int rowCount (
const QModelIndex& idx = QModelIndex ())
const 184 QVariant
data (
const QModelIndex& idx = QModelIndex (),
185 int role = Qt::DisplayRole)
const 190 bool setData (
const QModelIndex& idx,
const QVariant& v,
191 int role = Qt::EditRole);
195 Qt::ItemFlags
flags (
const QModelIndex& idx)
const;
198 const QModelIndex& parent = QModelIndex());
201 const QModelIndex& parent = QModelIndex());
204 const QModelIndex& parent = QModelIndex());
207 const QModelIndex& parent = QModelIndex());
242 headerData (
int section, Qt::Orientation orientation,
int role)
const 296 void user_error (
const QString& title,
const QString& msg);
327 int new_rows,
int new_cols);
void update_data_signal(const octave_value &val)
void eval_oct(const std::string &name, const std::string &expr)
void set_editable_signal(bool)
void clear_update_pending(void)
OCTAVE_EXPORT octave_value_list column
void description_changed(const QString &description)
bool removeRows(int row, int count, const QModelIndex &parent=QModelIndex())
void update_data_cache(void)
void double_click(const QModelIndex &idx)
QString update_pending_data(const QModelIndex &idx) const
void data_error_signal(const QString &name) const
octave_idx_type data_columns(void) const
virtual QString make_description_text(void) const
bool is_editable(void) const
variable_editor_model(const QString &expr, const octave_value &val, QObject *parent=nullptr)
int columnCount(const QModelIndex &=QModelIndex()) const
identity matrix If supplied two scalar respectively For allows like xample val
bool clear_content(const QModelIndex &idx)
bool index_ok(const QModelIndex &idx, int &row, int &col) const
virtual QVariant header_data(int section, Qt::Orientation orientation, int role) const
bool setData(const QModelIndex &idx, const QVariant &v, int role=Qt::EditRole)
base_ve_model(const QString &expr, const octave_value &val)
void maybe_resize_columns(int cols)
QString edit_display_sub(const octave_value &elt, int role) const
char quote_char(const QModelIndex &idx) const
bool insertRows(int row, int count, const QModelIndex &parent=QModelIndex())
QMap< QModelIndex, QString > m_update_pending
int rowCount(const QModelIndex &idx=QModelIndex()) const
octave_idx_type m_data_rows
virtual ~base_ve_model(void)=default
QVariant data(const QModelIndex &idx=QModelIndex(), int role=Qt::DisplayRole) const
QString make_description_text(void) const
virtual void maybe_resize_columns(int)
void edit_variable_signal(const QString &name, const octave_value &val)
QString subscript_expression(const QModelIndex &idx) const
int display_columns(void) const
void clear_update_pending(void)
void reset(const octave_value &val)
void set_update_pending(const QModelIndex &idx, const QString &str)
void init_from_oct(const std::string &str)
bool update_pending(const QModelIndex &idx) const
void set_data_oct(const std::string &name, const std::string &expr, const QModelIndex &)
octave_idx_type m_data_cols
virtual char quote_char(const QModelIndex &idx) const
void user_error(const QString &title, const QString &msg)
virtual octave_value value_at(const QModelIndex &idx) const
QVariant headerData(int section, Qt::Orientation orientation, int role) const
void change_display_size(int old_rows, int old_cols, int new_rows, int new_cols)
base_ve_model & operator=(const base_ve_model &)=delete
static base_ve_model * create(const QString &expr, const octave_value &val)
float_display_format m_display_fmt
octave_idx_type data_rows(void) const
QString update_pending_data(const QModelIndex &idx) const
QVariant data(const QModelIndex &idx, int role=Qt::DisplayRole) const
virtual bool is_editable(void) const
int column_width(void) const
virtual void maybe_resize_rows(int)
Qt::ItemFlags flags(const QModelIndex &idx) const
octave_idx_type data_rows(void) const
bool is_valid(void) const
void set_update_pending(const QModelIndex &idx, const QString &str)
int display_columns(void) const
int display_rows(void) const
bool update_pending(const QModelIndex &idx) const
octave_value value_at(const QModelIndex &idx) const
void evaluation_error(const std::string &expr) const
int rowCount(const QModelIndex &=QModelIndex()) const
bool requires_sub_editor(const QModelIndex &idx) const
octave_idx_type data_columns(void) const
virtual bool requires_sub_editor(const QModelIndex &idx) const
void update_data(const octave_value &val)
std::string name(void) const
octave_value retrieve_variable(const std::string &name)
bool removeColumns(int column, int count, const QModelIndex &parent=QModelIndex())
int display_rows(void) const
void user_error_signal(const QString &title, const QString &msg) const
virtual QString subscript_expression(const QModelIndex &idx) const
bool is_valid(void) const
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string
void update_description(const QString &description=QString())
bool insertColumns(int column, int count, const QModelIndex &parent=QModelIndex())
void maybe_resize_rows(int rows)
~variable_editor_model(void)
void data_error(const QString &msg)
void reset(const octave_value &val)
where the brackets indicate optional arguments and and character or cell array For character arrays the conversion is repeated for every row
std::string name(void) const
virtual QVariant edit_display(const QModelIndex &idx, int role) const
variable_editor_model & operator=(const variable_editor_model &)=delete
int columnCount(const QModelIndex &idx=QModelIndex()) const
int column_width(void) const