Mercurial > hg > octave-lyh
changeset 15342:67fabb3d81f4
display class of variables in workspace viewer instead of type
* symbol-information.h, symbol-information.cc
(symbol_information::_class): Rename from _type. Change all uses.
* workspace-model.cc (workspace_model::workspace_model): Display
"Class" instead of "Type".
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 10 Sep 2012 15:30:22 -0400 |
parents | 95504932d422 |
children | b565850bdce7 |
files | libgui/src/symbol-information.cc libgui/src/symbol-information.h libgui/src/workspace-model.cc |
diffstat | 3 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/src/symbol-information.cc +++ b/libgui/src/symbol-information.cc @@ -45,7 +45,7 @@ _scope = hidden; _symbol = QString (symbol_record.name ().c_str ()); - _type = QString (symbol_record.varval ().type_name ().c_str ()); + _class = QString (symbol_record.varval ().class_name ().c_str ()); octave_value ov = symbol_record.varval (); // In case we have really large matrices or strings, cut them down
--- a/libgui/src/symbol-information.h +++ b/libgui/src/symbol-information.h @@ -56,7 +56,7 @@ }; QString _symbol; - QString _type; + QString _class; QString _value; QString _dimension; Scope _scope; @@ -65,7 +65,7 @@ int hash () const { - return qHash (_symbol) + qHash (_type) + qHash (_value) + return qHash (_symbol) + qHash (_class) + qHash (_value) + qHash (_dimension) + (int)_scope; } @@ -76,7 +76,7 @@ if (hash () == other.hash ()) { return _symbol == other._symbol - && _type == other._type + && _class == other._class && _value == other._value && _scope == other._scope && _dimension == other._dimension;
--- a/libgui/src/workspace-model.cc +++ b/libgui/src/workspace-model.cc @@ -38,7 +38,7 @@ : QAbstractItemModel(parent), octave_event_observer () { QList<QVariant> rootData; - rootData << tr ("Name") << tr ("Type") << tr("Dimension") << tr ("Value"); + rootData << tr ("Name") << tr ("Class") << tr("Dimension") << tr ("Value"); _rootItem = new tree_item(rootData); insert_top_level_item(0, new tree_item ("Local")); @@ -95,7 +95,7 @@ tree_item *child = new tree_item (); child->set_data (0, s._symbol); - child->set_data (1, s._type); + child->set_data (1, s._class); child->set_data (2, s._dimension); child->set_data (3, s._value);