26 #if ! defined (octave_variable_editor_model_h)
27 #define octave_variable_editor_model_h 1
29 #include <QAbstractTableModel>
60 std::string
name (
void)
const;
62 bool index_ok (
const QModelIndex& idx,
int& row,
int& col)
const;
70 int rowCount (
const QModelIndex& = QModelIndex ())
const;
72 int columnCount (
const QModelIndex& = QModelIndex ())
const;
76 virtual QVariant
edit_display (
const QModelIndex& idx,
int role)
const;
78 QVariant
data (
const QModelIndex& idx,
int role = Qt::DisplayRole)
const;
90 virtual char quote_char (
const QModelIndex& idx)
const;
93 header_data (
int section, Qt::Orientation orientation,
int role)
const;
179 int rowCount (
const QModelIndex& idx = QModelIndex ())
const
189 QVariant
data (
const QModelIndex& idx = QModelIndex (),
190 int role = Qt::DisplayRole)
const
195 bool setData (
const QModelIndex& idx,
const QVariant& v,
196 int role = Qt::EditRole);
200 Qt::ItemFlags
flags (
const QModelIndex& idx)
const;
203 const QModelIndex& parent = QModelIndex());
206 const QModelIndex& parent = QModelIndex());
209 const QModelIndex& parent = QModelIndex());
212 const QModelIndex& parent = QModelIndex());
247 headerData (
int section, Qt::Orientation orientation,
int role)
const
314 void user_error (
const QString& title,
const QString& msg);
332 int new_rows,
int new_cols);
QString update_pending_data(const QModelIndex &idx) const
void clear_update_pending(void)
float_display_format m_display_fmt
virtual bool requires_sub_editor(const QModelIndex &idx) const
int column_width(void) const
octave_idx_type data_columns(void) const
QVariant data(const QModelIndex &idx, int role=Qt::DisplayRole) const
virtual void maybe_resize_rows(int)
virtual QString make_description_text(void) const
int rowCount(const QModelIndex &=QModelIndex()) const
octave_idx_type m_data_cols
base_ve_model(const base_ve_model &)=delete
virtual bool is_editable(void) const
int display_columns(void) const
int display_rows(void) const
virtual char quote_char(const QModelIndex &idx) const
void set_update_pending(const QModelIndex &idx, const QString &str)
bool index_ok(const QModelIndex &idx, int &row, int &col) const
octave_idx_type data_rows(void) const
void reset(const octave_value &val)
virtual QVariant edit_display(const QModelIndex &idx, int role) const
base_ve_model & operator=(const base_ve_model &)=delete
std::string name(void) const
virtual octave_value value_at(const QModelIndex &idx) const
octave_idx_type m_data_rows
virtual ~base_ve_model(void)=default
virtual QVariant header_data(int section, Qt::Orientation orientation, int role) const
bool update_pending(const QModelIndex &idx) const
int columnCount(const QModelIndex &=QModelIndex()) const
virtual QString subscript_expression(const QModelIndex &idx) const
QMap< QModelIndex, QString > m_update_pending
virtual void maybe_resize_columns(int)
base_ve_model(const QString &expr, const octave_value &val)
QString edit_display_sub(const octave_value &elt, int role) const
bool is_valid(void) const
Qt::ItemFlags flags(const QModelIndex &idx) const
bool insertRows(int row, int count, const QModelIndex &parent=QModelIndex())
void maybe_resize_rows(int rows)
void description_changed(const QString &description)
void data_error(const QString &msg)
void init_from_oct(interpreter &interp)
octave_value value_at(const QModelIndex &idx) const
std::string name(void) const
void update_description(const QString &description=QString())
QVariant data(const QModelIndex &idx=QModelIndex(), int role=Qt::DisplayRole) const
void data_error_signal(const QString &name) const
int column_width(void) const
octave_value retrieve_variable(interpreter &, const std::string &name)
QString update_pending_data(const QModelIndex &idx) const
void interpreter_event(const meth_callback &meth)
void clear_update_pending(void)
void set_update_pending(const QModelIndex &idx, const QString &str)
variable_editor_model(const QString &expr, const octave_value &val, QObject *parent=nullptr)
void set_editable_signal(bool)
bool requires_sub_editor(const QModelIndex &idx) const
void user_error(const QString &title, const QString &msg)
void interpreter_event(const fcn_callback &fcn)
int display_columns(void) const
bool removeColumns(int column, int count, const QModelIndex &parent=QModelIndex())
bool insertColumns(int column, int count, const QModelIndex &parent=QModelIndex())
void update_data_signal(const octave_value &val)
bool is_valid(void) const
bool is_editable(void) const
void user_error_signal(const QString &title, const QString &msg) const
static base_ve_model * create(const QString &expr, const octave_value &val)
int columnCount(const QModelIndex &idx=QModelIndex()) const
~variable_editor_model(void)
void reset(const octave_value &val)
void change_display_size(int old_rows, int old_cols, int new_rows, int new_cols)
void double_click(const QModelIndex &idx)
void edit_variable_signal(const QString &name, const octave_value &val)
int rowCount(const QModelIndex &idx=QModelIndex()) const
QString subscript_expression(const QModelIndex &idx) const
void eval_expr_event(const QString &expr)
void evaluation_error(const std::string &expr) const
variable_editor_model(const variable_editor_model &)=delete
bool clear_content(const QModelIndex &idx)
variable_editor_model & operator=(const variable_editor_model &)=delete
QVariant headerData(int section, Qt::Orientation orientation, int role) const
QString make_description_text(void) const
int display_rows(void) const
void update_data_cache(void)
void update_data(const octave_value &val)
char quote_char(const QModelIndex &idx) const
octave_idx_type data_rows(void) const
bool update_pending(const QModelIndex &idx) const
bool setData(const QModelIndex &idx, const QVariant &v, int role=Qt::EditRole)
void maybe_resize_columns(int cols)
octave_idx_type data_columns(void) const
bool removeRows(int row, int count, const QModelIndex &parent=QModelIndex())
std::function< void(octave::interpreter &)> meth_callback
std::function< void(void)> fcn_callback