X-Git-Url: https://git.llucax.com/z.facultad/75.52/treemulator.git/blobdiff_plain/01bb8597d243547afdbb673f5fad48d88a00f92b..aa158a0284c1bc32a979d50275aa1b24438d46ef:/viewer/new_tree_dialog.cpp?ds=sidebyside diff --git a/viewer/new_tree_dialog.cpp b/viewer/new_tree_dialog.cpp index edb1f5a..d3dbf5c 100644 --- a/viewer/new_tree_dialog.cpp +++ b/viewer/new_tree_dialog.cpp @@ -3,22 +3,26 @@ NewTreeDialog::NewTreeDialog(): Gtk::Dialog ("Nuevo Arbol", true, true), - fixed_key ("Clave Fija"), variable_key ("Clave Variable") + fixed_key ("Clave Fija"), variable_key ("Clave Variable"), + tree_ident ("Árbol de Indentificación"), tree_class ("Árbol de Clasificación") { - table.attach (fixed_key, 0, 1, 0, 1); - table.attach (variable_key, 1, 2, 0, 1); + table.attach (tree_ident, 0, 1, 0, 1); + table.attach (tree_class, 1, 2, 0, 1); + + table.attach (fixed_key, 0, 1, 1, 2); + table.attach (variable_key, 1, 2, 1, 2); label_block.set_label ("Tamaño de Bloque : "); - table.attach (label_block, 0, 1, 1, 2, Gtk::FILL|Gtk::SHRINK, Gtk::SHRINK, 8, 8); - table.attach (entry_block, 1, 2, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::SHRINK, 8, 8); + table.attach (label_block, 0, 1, 2, 3, Gtk::FILL|Gtk::SHRINK, Gtk::SHRINK, 8, 8); + table.attach (entry_block, 1, 2, 2, 3, Gtk::FILL|Gtk::EXPAND, Gtk::SHRINK, 8, 8); label_count.set_label ("Cantidad a insertar : "); - table.attach (label_count, 0, 1, 2, 3, Gtk::FILL|Gtk::SHRINK, Gtk::SHRINK, 8, 8); - table.attach (entry_count, 1, 2, 2, 3, Gtk::FILL|Gtk::EXPAND, Gtk::SHRINK, 8, 8); + table.attach (label_count, 0, 1, 3, 4, Gtk::FILL|Gtk::SHRINK, Gtk::SHRINK, 8, 8); + table.attach (entry_count, 1, 2, 3, 4, Gtk::FILL|Gtk::EXPAND, Gtk::SHRINK, 8, 8); label_dels.set_label ("Cantidad a eliminar : "); - table.attach (label_dels, 0, 1, 3, 4, Gtk::FILL|Gtk::SHRINK, Gtk::SHRINK, 8, 8); - table.attach (entry_dels, 1, 2, 3, 4, Gtk::FILL|Gtk::EXPAND, Gtk::SHRINK, 8, 8); + table.attach (label_dels, 0, 1, 4, 5, Gtk::FILL|Gtk::SHRINK, Gtk::SHRINK, 8, 8); + table.attach (entry_dels, 1, 2, 4, 5, Gtk::FILL|Gtk::EXPAND, Gtk::SHRINK, 8, 8); get_vbox ()->add (table); @@ -28,6 +32,10 @@ NewTreeDialog::NewTreeDialog(): Gtk::Dialog ("Nuevo Arbol", true, true), Gtk::RadioButton::Group group = fixed_key.get_group(); fixed_key.set_group (group); variable_key.set_group (group); + + Gtk::RadioButton::Group group1 = tree_ident.get_group(); + tree_ident.set_group (group1); + tree_class.set_group (group1); show_all (); } @@ -55,3 +63,11 @@ int NewTreeDialog::getKeyType () return BTree::KEY_VARIABLE; } +int NewTreeDialog::getTreeType () +{ + if (tree_ident.get_active ()) + return BTree::TYPE_IDENTIFICACION; + + return BTree::TYPE_CLASIFICACION; +} +