From: Ricardo Markiewicz Date: Sun, 25 Sep 2005 23:29:57 +0000 (+0000) Subject: Muestro mas datos del elemento seleccionado. X-Git-Tag: 1_0-pre1~102 X-Git-Url: https://git.llucax.com/z.facultad/75.52/treemulator.git/commitdiff_plain/78fcf62243366bfd66e21b25c403c3a4b770bec2 Muestro mas datos del elemento seleccionado. --- diff --git a/viewer/view_properties.cpp b/viewer/view_properties.cpp index cd48676..dff6db4 100644 --- a/viewer/view_properties.cpp +++ b/viewer/view_properties.cpp @@ -18,7 +18,7 @@ ViewProperties::ViewProperties ():Frame () set_shadow_type(Gtk::SHADOW_NONE); } -void ViewProperties::ShowItem (BTreeData *, BTreeNodeHeader &header) +void ViewProperties::ShowItem (BTreeData *data, BTreeNodeHeader &header) { std::string s1, s2, s3; std::stringstream ss1, ss2, ss3; @@ -34,5 +34,33 @@ void ViewProperties::ShowItem (BTreeData *, BTreeNodeHeader &header) ss3 << header.free_space; ss3 >> s3; node_freespace.set_label ("Libre : " + s3); + + if (dynamic_cast(data)) { + data_type.set_label ("Tipo : BTreeChildData"); + data_key.set_label (""); + + std::string s4; + std::stringstream ss4; + ss4 << data->getChild (); + ss4 >> s4; + data_child.set_label ("Hijo Izquierdo : " + s4); + } else if (dynamic_cast(data)) { + data_type.set_label ("Tipo : BTreeLeafData"); + data_child.set_label (""); + + std::string s4 = *(data->getClave ()); + data_child.set_label ("Clave : " + s4); + } else { + data_type.set_label ("Tipo : BTreeData"); + + std::string s4; + std::stringstream ss4; + ss4 << data->getChild (); + ss4 >> s4; + data_child.set_label ("Hijo Derecho : " + s4); + + std::string s5 = *(data->getClave ()); + data_key.set_label ("Clave : " + s5); + } }