src/gui/graph_manager/graph_graphics_widget.cpp
void graph_graphics_widget::handle_add_gates_to_new_module_triggered()
{
    auto dialog = new input_dialog(nullptr, "Name:");
    if (dialog->exec() == QDialog::Accepted)
    {
        auto sub = g_netlist->create_module(g_netlist->get_unique_module_id(), dialog->get_text().toStdString(), g_netlist->get_top_module());
        for (const auto& gate : currently_selected_gates)
            sub->assign_gate(gate->get_ref_gate());
    }
    delete dialog;
}
//this function could be integrated in the "handle_add_to_new_module_triggered" function by checking if the currently_selected_gates.size() is
//greater than 1 and then connecting the signals and slots accordingly (to either create_new_module or handle_name_for_new_module_for_multiple_gates)
this function could be integrated in the "handle_add_to_new_module_triggered" function by checking if the currently_selected_gates.size() is
greater than 1 and then connecting the signals and slots accordingly (to either create_new_module or handle_name_for_new_module_for_multiple_gates)
this function could be integrated in the " handle_add_to_new_module_triggered " function by checking if the currently_selected_gates . size () is greater than 1 and then connecting the signals and slots accordingly ( to either create_new_module or handle_name_for_new_module_for_multiple_gates )
void graph_graphics_widget::handle_add_gates_to_new_module_triggered()
{
    auto dialog = new input_dialog(nullptr, "Name:");
    if (dialog->exec() == QDialog::Accepted)
    {
        auto sub = g_netlist->create_module(g_netlist->get_unique_module_id(), dialog->get_text().toStdString(), g_netlist->get_top_module());
        for (const auto& gate : currently_selected_gates)
            sub->assign_gate(gate->get_ref_gate());
    }
    delete dialog;
}
void graph_graphics_widget :: handle_add_gates_to_new_module_triggered ( ) { auto dialog = new input_dialog ( nullptr , " " ) ; if ( dialog -> exec ( ) == QDialog :: Accepted ) { auto sub = g_netlist -> create_module ( g_netlist -> get_unique_module_id ( ) , dialog -> get_text ( ) . toStdString ( ) , g_netlist -> get_top_module ( ) ) ; for ( const auto & gate : currently_selected_gates ) sub -> assign_gate ( gate -> get_ref_gate ( ) ) ; } delete dialog ; }
this function could be integrated in the "handle_add_to_new_module_triggered" function by checking if the currently_selected_gates.size() is
greater than 1 and then connecting the signals and slots accordingly (to either create_new_module or handle_name_for_new_module_for_multiple_gates)
this function could be integrated in the " handle_add_to_new_module_triggered " function by checking if the currently_selected_gates . size () is greater than 1 and then connecting the signals and slots accordingly ( to either create_new_module or handle_name_for_new_module_for_multiple_gates )