26 #if defined (HAVE_CONFIG_H)
32 #include <QTreeWidget>
77 Qt::ItemFlags
retval = Qt::NoItemFlags;
81 retval |= Qt::ItemIsEnabled;
84 retval |= Qt::ItemIsSelectable;
94 if (orientation == Qt::Horizontal && role == Qt::DisplayRole)
107 if ((role == Qt::BackgroundColorRole || role == Qt::ForegroundRole)
112 if (actual_class >= 0)
116 if (role == Qt::ForegroundRole)
125 if (role == Qt::DisplayRole
126 || (idx.column () == 0 && role == Qt::EditRole)
127 || (idx.column () == 0 && role == Qt::ToolTipRole))
129 switch (idx.column ())
132 if (role == Qt::ToolTipRole)
134 = QVariant (tr (
"Right click to copy, rename, or display"));
158 if (actual_class >= 0)
163 if (sclass.isEmpty ())
164 sclass = tr (
"complex");
166 sclass +=
", " + tr (
"complex");
169 retval = QVariant (sclass);
208 QPalette p (setting_color);
211 QColor fg_color = p.color (QPalette::WindowText);
237 std::string nm = syminfo.name ();
248 if (syminfo.is_formal ())
250 else if (syminfo.is_global ())
252 else if (syminfo.is_persistent ())
255 std::ostringstream buf;
257 std::string short_disp_str = buf.str ();
octave_idx_type numel(void) const
Number of elements in the array.
Vector representing the dimensions (size) of an Array.
std::string str(char sep='x') const
static dim_vector alloc(int n)
octave_idx_type ndims(void) const
Number of dimensions.
Base class for Octave interfaces that use Qt.
QStringList m_columnNames
QList< QColor > m_storage_class_colors
int rowCount(const QModelIndex &parent=QModelIndex()) const
Qt::ItemFlags flags(const QModelIndex &index) const
QStringList m_class_names
void clear_workspace(void)
void notice_settings(const gui_settings *)
void set_workspace(bool top_level, bool debug, const symbol_info_list &syminfo)
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
int columnCount(const QModelIndex &parent=QModelIndex()) const
workspace_model(base_qobject &oct_qobj, QObject *parent=nullptr)
QVariant data(const QModelIndex &index, int role) const
symbol_info_list m_syminfo_list
void short_disp(std::ostream &os) const
std::string class_name(void) const
bool iscomplex(void) const
const QString ws_class_chars("agp")
const gui_pref ws_colors[ws_colors_count]
const QStringList ws_color_names(QStringList()<< QT_TRANSLATE_NOOP("octave::settings_dialog", "argument")<< QT_TRANSLATE_NOOP("octave::settings_dialog", "global")<< QT_TRANSLATE_NOOP("octave::settings_dialog", "persistent"))
const gui_pref ws_enable_colors("workspaceview/enable_colors", QVariant(false))
const int ws_colors_count
QString fromStdString(const std::string &s)
octave_value::octave_value(const Array< char > &chm, char type) return retval