pub unsafe fn create_generate_ids_dialog(&self, initial_value: i32) -> Option<i32> {

        // Create and configure the dialog.
        let dialog = QDialog::new_1a(&self.table_view_primary);
        dialog.set_window_title(&qtr("generate_ids_title"));
        dialog.set_modal(true);
        dialog.resize_2a(400, 50);
        let main_grid = create_grid_layout(dialog.static_upcast());

        // Create a little frame with some instructions.
        let instructions_frame = QGroupBox::from_q_string_q_widget(&qtr("generate_ids_instructions_title"), &dialog);
        let instructions_grid = create_grid_layout(instructions_frame.static_upcast());
        let instructions_label = QLabel::from_q_string_q_widget(&qtr("generate_ids_instructions"), &instructions_frame);
        instructions_grid.add_widget_5a(& instructions_label, 0, 0, 1, 1);

        let starting_id_spin_box = QSpinBox::new_1a(&dialog);
        starting_id_spin_box.set_minimum(i32::MIN);
        starting_id_spin_box.set_maximum(i32::MAX);
        starting_id_spin_box.set_value(initial_value);
        let accept_button = QPushButton::from_q_string(&qtr("generate_ids_accept"));

        main_grid.add_widget_5a(&instructions_frame, 0, 0, 1, 1);
        main_grid.add_widget_5a(&starting_id_spin_box, 1, 0, 1, 1);
        main_grid.add_widget_5a(&accept_button, 2, 0, 1, 1);

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

        if dialog.exec() == 1 {
            Some(starting_id_spin_box.value())
        } else { None }
    }
/// This function creates the entire "Generate Ids" dialog for tables. It returns the starting id, or None.
This function creates the entire "Generate Ids" dialog for tables. It returns the starting id, or None.
This function creates the entire " Generate Ids " dialog for tables . It returns the starting id or None .
pub unsafe fn create_generate_ids_dialog(&self, initial_value: i32) -> Option<i32> {
        // Create and configure the dialog.
        let dialog = QDialog::new_1a(&self.table_view_primary);
        dialog.set_window_title(&qtr("generate_ids_title"));
        dialog.set_modal(true);
        dialog.resize_2a(400, 50);
        let main_grid = create_grid_layout(dialog.static_upcast());
        // Create a little frame with some instructions.
        let instructions_frame = QGroupBox::from_q_string_q_widget(&qtr("generate_ids_instructions_title"), &dialog);
        let instructions_grid = create_grid_layout(instructions_frame.static_upcast());
        let instructions_label = QLabel::from_q_string_q_widget(&qtr("generate_ids_instructions"), &instructions_frame);
        instructions_grid.add_widget_5a(& instructions_label, 0, 0, 1, 1);
        let starting_id_spin_box = QSpinBox::new_1a(&dialog);
        starting_id_spin_box.set_minimum(i32::MIN);
        starting_id_spin_box.set_maximum(i32::MAX);
        starting_id_spin_box.set_value(initial_value);
        let accept_button = QPushButton::from_q_string(&qtr("generate_ids_accept"));
        main_grid.add_widget_5a(&instructions_frame, 0, 0, 1, 1);
        main_grid.add_widget_5a(&starting_id_spin_box, 1, 0, 1, 1);
        main_grid.add_widget_5a(&accept_button, 2, 0, 1, 1);
        accept_button.released().connect(dialog.slot_accept());
        if dialog.exec() == 1 {
            Some(starting_id_spin_box.value())
        } else { None }
    }
pub unsafe fn create_generate_ids_dialog ( & self , initial_value : i32 ) -> Option < 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 ( 400 , 50 ) ; let main_grid = create_grid_layout ( dialog . static_upcast ( ) ) ; // Create a little frame with some instructions. let instructions_frame = QGroupBox :: from_q_string_q_widget ( & qtr ( " " ) , & dialog ) ; let instructions_grid = create_grid_layout ( instructions_frame . static_upcast ( ) ) ; let instructions_label = QLabel :: from_q_string_q_widget ( & qtr ( " " ) , & instructions_frame ) ; instructions_grid . add_widget_5a ( & instructions_label , 0 , 0 , 1 , 1 ) ; let starting_id_spin_box = QSpinBox :: new_1a ( & dialog ) ; starting_id_spin_box . set_minimum ( i32 :: MIN ) ; starting_id_spin_box . set_maximum ( i32 :: MAX ) ; starting_id_spin_box . set_value ( initial_value ) ; let accept_button = QPushButton :: from_q_string ( & qtr ( " " ) ) ; main_grid . add_widget_5a ( & instructions_frame , 0 , 0 , 1 , 1 ) ; main_grid . add_widget_5a ( & starting_id_spin_box , 1 , 0 , 1 , 1 ) ; main_grid . add_widget_5a ( & accept_button , 2 , 0 , 1 , 1 ) ; accept_button . released ( ) . connect ( dialog . slot_accept ( ) ) ; if dialog . exec ( ) == 1 { Some ( starting_id_spin_box . value ( ) ) } else { None } }
This function creates the entire "Generate Ids" dialog for tables.
This function creates the entire " Generate Ids " dialog for tables .
&self
initial_value
i32
&self
initial_value
i32