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);
bool is_valid(void) const
QString update_pending_data(const QModelIndex &idx) const
base_ve_model & operator=(const base_ve_model &)=delete
bool index_ok(const QModelIndex &idx, int &row, int &col) const
virtual char quote_char(const QModelIndex &idx) const
int column_width(void) const
virtual octave_value value_at(const QModelIndex &idx) const
QString edit_display_sub(const octave_value &elt, int role) const
virtual void maybe_resize_rows(int)
int display_rows(void) const
virtual QString make_description_text(void) const
octave_idx_type data_columns(void) const
base_ve_model(const QString &expr, const octave_value &val)
octave_idx_type data_rows(void) const
void clear_update_pending(void)
QVariant data(const QModelIndex &idx, int role=Qt::DisplayRole) const
octave_idx_type m_data_cols
base_ve_model(const base_ve_model &)=delete
int display_columns(void) const
virtual void maybe_resize_columns(int)
float_display_format m_display_fmt
virtual bool is_editable(void) const
virtual bool requires_sub_editor(const QModelIndex &idx) const
virtual ~base_ve_model(void)=default
int rowCount(const QModelIndex &=QModelIndex()) const
virtual QVariant header_data(int section, Qt::Orientation orientation, int role) const
bool update_pending(const QModelIndex &idx) const
void set_update_pending(const QModelIndex &idx, const QString &str)
octave_idx_type m_data_rows
void reset(const octave_value &val)
std::string name(void) const
virtual QString subscript_expression(const QModelIndex &idx) const
virtual QVariant edit_display(const QModelIndex &idx, int role) const
int columnCount(const QModelIndex &=QModelIndex()) const
QMap< QModelIndex, QString > m_update_pending
int display_rows(void) const
void user_error_signal(const QString &title, const QString &msg) const
int display_columns(void) const
bool is_editable(void) const
bool insertRows(int row, int count, const QModelIndex &parent=QModelIndex())
~variable_editor_model(void)
octave_value value_at(const QModelIndex &idx) const
void init_from_oct(interpreter &interp)
QString subscript_expression(const QModelIndex &idx) const
Qt::ItemFlags flags(const QModelIndex &idx) const
void set_update_pending(const QModelIndex &idx, const QString &str)
bool insertColumns(int column, int count, const QModelIndex &parent=QModelIndex())
bool setData(const QModelIndex &idx, const QVariant &v, int role=Qt::EditRole)
octave_idx_type data_rows(void) const
bool update_pending(const QModelIndex &idx) const
void set_editable_signal(bool)
void evaluation_error(const std::string &expr) const
void data_error(const QString &msg)
QVariant data(const QModelIndex &idx=QModelIndex(), int role=Qt::DisplayRole) const
int column_width(void) const
void data_error_signal(const QString &name) const
int columnCount(const QModelIndex &idx=QModelIndex()) const
variable_editor_model(const QString &expr, const octave_value &val, QObject *parent=nullptr)
void maybe_resize_rows(int rows)
void edit_variable_signal(const QString &name, const octave_value &val)
bool is_valid(void) const
int rowCount(const QModelIndex &idx=QModelIndex()) const
std::string name(void) const
void interpreter_event(const meth_callback &meth)
bool removeRows(int row, int count, const QModelIndex &parent=QModelIndex())
octave_value retrieve_variable(interpreter &, const std::string &name)
variable_editor_model & operator=(const variable_editor_model &)=delete
void interpreter_event(const fcn_callback &fcn)
void update_data_cache(void)
void eval_expr_event(const QString &expr)
void update_data(const octave_value &val)
void double_click(const QModelIndex &idx)
octave_idx_type data_columns(void) const
QString make_description_text(void) const
bool clear_content(const QModelIndex &idx)
bool removeColumns(int column, int count, const QModelIndex &parent=QModelIndex())
void clear_update_pending(void)
static base_ve_model * create(const QString &expr, const octave_value &val)
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)
void description_changed(const QString &description)
void reset(const octave_value &val)
bool requires_sub_editor(const QModelIndex &idx) const
void user_error(const QString &title, const QString &msg)
QString update_pending_data(const QModelIndex &idx) const
void maybe_resize_columns(int cols)
void update_data_signal(const octave_value &val)
variable_editor_model(const variable_editor_model &)=delete
void update_description(const QString &description=QString())
char quote_char(const QModelIndex &idx) const
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
std::function< void(void)> fcn_callback
std::function< void(interpreter &)> meth_callback