24 #if defined (HAVE_CONFIG_H)
28 #include <QTreeWidget>
54 if (colors.isEmpty ())
56 colors << QColor (190,255,255)
57 << QColor (220,255,220)
58 << QColor (220,220,255)
59 << QColor (255,255,190)
60 << QColor (255,220,220)
61 << QColor (255,190,255);
74 names << QObject::tr (
"automatic")
75 << QObject::tr (
"function")
76 << QObject::tr (
"global")
77 << QObject::tr (
"hidden")
78 << QObject::tr (
"inherited")
79 << QObject::tr (
"persistent");
104 retval |= Qt::ItemIsEnabled;
107 retval |= Qt::ItemIsSelectable;
117 if (orientation == Qt::Horizontal && role == Qt::DisplayRole)
130 if (role == Qt::BackgroundColorRole)
134 = class_chars.indexOf (
_scopes[idx.row ()].toLatin1 ());
135 if (actual_class >= 0)
141 if (role == Qt::DisplayRole
142 || (idx.column () == 0 && role == Qt::EditRole)
143 || (idx.column () == 0 && role == Qt::ToolTipRole))
145 switch (idx.column ())
148 if (role == Qt::ToolTipRole)
150 = QVariant (tr (
"Right click to copy, rename, or display"));
152 retval = QVariant (
_symbols[idx.row ()]);
164 retval = QVariant (
_values[idx.row ()]);
174 = class_chars.indexOf (
_scopes[idx.row ()].toLatin1 ());
176 if (actual_class >= 0)
178 QStringList class_names
181 sclass = class_names.at (actual_class);
186 if (sclass.isEmpty ())
187 sclass = tr (
"complex");
189 sclass +=
", " + tr (
"complex");
192 retval = QVariant (sclass);
208 if (idx.column () == 0 && role == Qt::EditRole)
210 QString qold_name =
_symbols[idx.row ()];
212 QString qnew_name = value.toString ();
230 const QString& scopes,
231 const QStringList& symbols,
232 const QStringList& class_names,
233 const QStringList& dimensions,
234 const QStringList&
values,
286 for (
int i = 0;
i < class_chars.length ();
i++)
288 QVariant default_var = default_colors.at (
i);
289 QColor setting_color = settings->value (
"workspaceview/color_"
290 + class_chars.mid (
i,1),
291 default_var).value<QColor> ();
static QStringList storage_class_names(void)
QList< QColor > _storage_class_colors
void rename_variable(const QString &old_name, const QString &new_name)
Qt::ItemFlags flags(const QModelIndex &index) const
int rowCount(const QModelIndex &parent=QModelIndex()) const
cell array If invoked with two or more scalar integer or a vector of integer values
static QList< QColor > storage_class_default_colors(void)
static QList< QColor > storage_class_default_colors(void)
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
bool valid_identifier(const char *s)
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
void notice_settings(const QSettings *)
void set_workspace(bool top_level, bool debug, const QString &scopes, const QStringList &symbols, const QStringList &class_names, const QStringList &dimensions, const QStringList &values, const QIntList &complex_flags)
workspace_model(QObject *parent=0)
QVariant data(const QModelIndex &index, int role) const
=val(i)}if ode{val(i)}occurs in table i
OCTAVE_EXPORT octave_value_list or N dimensional array whose elements are all equal to the IEEE symbol zero divided by nd tex zero divided by nd ifnottex and any operation involving another NaN value(5+NaN).Note that NaN always compares not equal to NaN(NaN!
static QString storage_class_chars(void)
static QStringList storage_class_names(void)
int columnCount(const QModelIndex &parent=QModelIndex()) const
void clear_workspace(void)
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