26 #if defined (HAVE_CONFIG_H)
32 #include <QTreeWidget>
49 m_columnNames.append (tr (
"Name"));
50 m_columnNames.append (tr (
"Class"));
51 m_columnNames.append (tr (
"Dimension"));
52 m_columnNames.append (tr (
"Value"));
53 m_columnNames.append (tr (
"Attribute"));
60 m_storage_class_colors.append (QColor (Qt::white));
79 Qt::ItemFlags retval = Qt::NoItemFlags;
83 retval |= Qt::ItemIsEnabled;
86 retval |= Qt::ItemIsSelectable;
96 if (orientation == Qt::Horizontal && role == Qt::DisplayRole)
109 if ((role == Qt::BackgroundRole || role == Qt::ForegroundRole)
114 if (actual_class >= 0)
118 if (role == Qt::ForegroundRole)
127 if (role == Qt::DisplayRole
128 || (idx.column () == 0 && role == Qt::EditRole)
129 || (idx.column () == 0 && role == Qt::ToolTipRole))
131 switch (idx.column ())
134 if (role == Qt::ToolTipRole)
136 = QVariant (tr (
"Right click to copy, rename, or display"));
138 retval = QVariant (
m_symbols[idx.row ()]);
150 retval = QVariant (
m_values[idx.row ()]);
160 if (actual_class >= 0)
165 if (sclass.isEmpty ())
166 sclass = tr (
"complex");
168 sclass +=
", " + tr (
"complex");
171 retval = QVariant (sclass);
211 QPalette p (setting_color);
214 QColor fg_color = p.color (QPalette::WindowText);
240 std::string nm = syminfo.name ();
251 if (syminfo.is_formal ())
253 else if (syminfo.is_global ())
255 else if (syminfo.is_persistent ())
258 std::ostringstream buf;
260 std::string short_disp_str = buf.str ();
OCTARRAY_OVERRIDABLE_FUNC_API octave_idx_type numel(void) const
Number of elements in the array.
Vector representing the dimensions (size) of an Array.
OCTAVE_API std::string str(char sep='x') const
static dim_vector alloc(int n)
octave_idx_type ndims(void) const
Number of dimensions.
void short_disp(std::ostream &os) const
std::string class_name(void) const
bool iscomplex(void) const
int rowCount(const QModelIndex &parent=QModelIndex()) const
QStringList m_columnNames
symbol_info_list m_syminfo_list
int columnCount(const QModelIndex &parent=QModelIndex()) const
QVariant data(const QModelIndex &index, int role) const
QStringList m_class_names
void notice_settings(const gui_settings *)
QList< QColor > m_storage_class_colors
Qt::ItemFlags flags(const QModelIndex &index) const
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
void clear_workspace(void)
void set_workspace(bool top_level, bool debug, const symbol_info_list &syminfo)
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
const QString ws_class_chars("agp")
const gui_pref ws_colors[2 *ws_colors_count]
const gui_pref ws_enable_colors("workspaceview/enable_colors", QVariant(false))
const gui_pref ws_color_mode("workspaceview/color_mode", QVariant(0))
const QStringList ws_color_names
const int ws_colors_count
std::string toStdString(const QString &s)
QString fromStdString(const std::string &s)