pub unsafe fn cascade_edition_dialog(&self, indexes: &[CppBox<QModelIndex>]) -> Option<Vec<(String, String, i32, i32)>> {

        // Create and configure the dialog.
        let dialog = QDialog::new_1a(&self.table_view_primary);
        dialog.set_window_title(&qtr("cascade_edition_dialog"));
        dialog.set_modal(true);
        dialog.resize_2a(800, 50);

        let main_grid = create_grid_layout(dialog.static_upcast());
        let mut edits = vec![];

        for (row, index) in indexes.iter().enumerate() {
            let old_name_line_edit = QLineEdit::from_q_string_q_widget(&self.table_model.data_1a(index).to_string(), &dialog);
            let new_name_line_edit = QLineEdit::from_q_string_q_widget(&self.table_model.data_1a(index).to_string(), &dialog);

            old_name_line_edit.set_enabled(false);
            main_grid.add_widget_5a(&old_name_line_edit, row as i32, 0, 1, 1);
            main_grid.add_widget_5a(&new_name_line_edit, row as i32, 1, 1, 1);

            edits.push((old_name_line_edit, new_name_line_edit, index));
        }

        let accept_button = QPushButton::from_q_string(&qtr("gen_loc_accept"));
        main_grid.add_widget_5a(&accept_button, 99999, 0, 1, 2);

        accept_button.released().connect(dialog.slot_accept());

        if dialog.exec() == 1 {

            // Filter out unchanged/empty cells.
            let real_edits = edits.into_iter()
                .filter(|(old, new, _)| !new.text().is_empty() && old.text().to_std_string() != new.text().to_std_string())
                .map(|(old, new, index)| (old.text().to_std_string(), new.text().to_std_string(), index.row(), index.column()))
                .collect::<Vec<(String, String, i32, i32)>>();
            if real_edits.is_empty() { None } else { Some(real_edits) }
        } else { None }
    }
/// This function creates the "Cascade Edition" dialog.
///
/// It returns the data for the editions, or `None` if the dialog is canceled or closed.
This function creates the "Cascade Edition" dialog.
It returns the data for the editions, or `None` if the dialog is canceled or closed.
This function creates the " Cascade Edition " dialog . It returns the data for the editions or ` None ` if the dialog is canceled or closed .
pub unsafe fn cascade_edition_dialog(&self, indexes: &[CppBox<QModelIndex>]) -> Option<Vec<(String, String, i32, i32)>> {
        // Create and configure the dialog.
        let dialog = QDialog::new_1a(&self.table_view_primary);
        dialog.set_window_title(&qtr("cascade_edition_dialog"));
        dialog.set_modal(true);
        dialog.resize_2a(800, 50);
        let main_grid = create_grid_layout(dialog.static_upcast());
        let mut edits = vec![];
        for (row, index) in indexes.iter().enumerate() {
            let old_name_line_edit = QLineEdit::from_q_string_q_widget(&self.table_model.data_1a(index).to_string(), &dialog);
            let new_name_line_edit = QLineEdit::from_q_string_q_widget(&self.table_model.data_1a(index).to_string(), &dialog);
            old_name_line_edit.set_enabled(false);
            main_grid.add_widget_5a(&old_name_line_edit, row as i32, 0, 1, 1);
            main_grid.add_widget_5a(&new_name_line_edit, row as i32, 1, 1, 1);
            edits.push((old_name_line_edit, new_name_line_edit, index));
        }
        let accept_button = QPushButton::from_q_string(&qtr("gen_loc_accept"));
        main_grid.add_widget_5a(&accept_button, 99999, 0, 1, 2);
        accept_button.released().connect(dialog.slot_accept());
        if dialog.exec() == 1 {
            // Filter out unchanged/empty cells.
            let real_edits = edits.into_iter()
                .filter(|(old, new, _)| !new.text().is_empty() && old.text().to_std_string() != new.text().to_std_string())
                .map(|(old, new, index)| (old.text().to_std_string(), new.text().to_std_string(), index.row(), index.column()))
                .collect::<Vec<(String, String, i32, i32)>>();
            if real_edits.is_empty() { None } else { Some(real_edits) }
        } else { None }
    }
pub unsafe fn cascade_edition_dialog ( & self , indexes : & [ CppBox < QModelIndex > ] ) -> Option < Vec < ( String , String , i32 , i32 ) > > { // Create and configure the dialog. let dialog = QDialog :: new_1a ( & self . table_view_primary ) ; dialog . set_window_title ( & qtr ( " " ) ) ; dialog . set_modal ( true ) ; dialog . resize_2a ( 800 , 50 ) ; let main_grid = create_grid_layout ( dialog . static_upcast ( ) ) ; let mut edits = vec ! [ ] ; for ( row , index ) in indexes . iter ( ) . enumerate ( ) { let old_name_line_edit = QLineEdit :: from_q_string_q_widget ( & self . table_model . data_1a ( index ) . to_string ( ) , & dialog ) ; let new_name_line_edit = QLineEdit :: from_q_string_q_widget ( & self . table_model . data_1a ( index ) . to_string ( ) , & dialog ) ; old_name_line_edit . set_enabled ( false ) ; main_grid . add_widget_5a ( & old_name_line_edit , row as i32 , 0 , 1 , 1 ) ; main_grid . add_widget_5a ( & new_name_line_edit , row as i32 , 1 , 1 , 1 ) ; edits . push ( ( old_name_line_edit , new_name_line_edit , index ) ) ; } let accept_button = QPushButton :: from_q_string ( & qtr ( " " ) ) ; main_grid . add_widget_5a ( & accept_button , 99999 , 0 , 1 , 2 ) ; accept_button . released ( ) . connect ( dialog . slot_accept ( ) ) ; if dialog . exec ( ) == 1 { // Filter out unchanged/empty cells. let real_edits = edits . into_iter ( ) . filter ( | ( old , new , _ ) | ! new . text ( ) . is_empty ( ) && old . text ( ) . to_std_string ( ) != new . text ( ) . to_std_string ( ) ) . map ( | ( old , new , index ) | ( old . text ( ) . to_std_string ( ) , new . text ( ) . to_std_string ( ) , index . row ( ) , index . column ( ) ) ) . collect :: < Vec < ( String , String , i32 , i32 ) > > ( ) ; if real_edits . is_empty ( ) { None } else { Some ( real_edits ) } } else { None } }
This function creates the "Cascade Edition" dialog.
This function creates the " Cascade Edition " dialog .
&self
indexes
&[CppBox<QModelIndex>]
&self
indexes
&[CppBox<QModelIndex>]