pub unsafe fn paste_as_new_row(&self, app_ui: &Rc<AppUI>, pack_file_contents_ui: &Rc<PackFileContentsUI>) {
        let mut text = QGuiApplication::clipboard().text().to_std_string();
        if text.ends_with('\n') { text.pop(); }
        let rows = text.split('\n').collect::<Vec<&str>>();
        let rows = rows.iter().map(|x| x.split('\t').collect::<Vec<&str>>()).collect::<Vec<Vec<&str>>>();

        // Then paste the data as it fits. If no indexes are provided, the data is pasted in new rows.
        self.paste_as_it_fits(&rows, &[], app_ui, pack_file_contents_ui);
    }
/// This function allow us to paste the contents of the clipboard into new rows at the end of the table, if the content is compatible with them.
This function allow us to paste the contents of the clipboard into new rows at the end of the table, if the content is compatible with them.
This function allow us to paste the contents of the clipboard into new rows at the end of the table if the content is compatible with them .
pub unsafe fn paste_as_new_row(&self, app_ui: &Rc<AppUI>, pack_file_contents_ui: &Rc<PackFileContentsUI>) {
        let mut text = QGuiApplication::clipboard().text().to_std_string();
        if text.ends_with('\n') { text.pop(); }
        let rows = text.split('\n').collect::<Vec<&str>>();
        let rows = rows.iter().map(|x| x.split('\t').collect::<Vec<&str>>()).collect::<Vec<Vec<&str>>>();
        // Then paste the data as it fits. If no indexes are provided, the data is pasted in new rows.
        self.paste_as_it_fits(&rows, &[], app_ui, pack_file_contents_ui);
    }
pub unsafe fn paste_as_new_row ( & self , app_ui : & Rc < AppUI > , pack_file_contents_ui : & Rc < PackFileContentsUI > ) { let mut text = QGuiApplication :: clipboard ( ) . text ( ) . to_std_string ( ) ; if text . ends_with ( '\n' ) { text . pop ( ) ; } let rows = text . split ( '\n' ) . collect :: < Vec < & str > > ( ) ; let rows = rows . iter ( ) . map ( | x | x . split ( '\t' ) . collect :: < Vec < & str > > ( ) ) . collect :: < Vec < Vec < & str > > > ( ) ; // Then paste the data as it fits. If no indexes are provided, the data is pasted in new rows. self . paste_as_it_fits ( & rows , & [ ] , app_ui , pack_file_contents_ui ) ; }
This function allow us to paste the contents of the clipboard into new rows at the end of the table, if the content is compatible with them.
This function allow us to paste the contents of the clipboard into new rows at the end of the table if the content is compatible with them .
&self
app_ui
&Rc<AppUI>
pack_file_contents_ui
&Rc<PackFileContentsUI>
&self
app_ui
&Rc<AppUI>
pack_file_contents_ui
&Rc<PackFileContentsUI>