pub unsafe fn load_data(&self, path: &[String]) {

        // For tables, share tips between same-type tables.
        *self.path.write().unwrap() = if path.len() > 2 && path[0].to_lowercase() == "db" { path[0..=1].to_vec() } else { path.to_vec() };
        self.model.clear();

        let receiver = CENTRAL_COMMAND.send_background(Command::GetTipsForPath(self.path.read().unwrap().to_vec()));
        let response = CentralCommand::recv(&receiver);
        let (local_tips, remote_tips) = match response {
            Response::VecTipVecTip(local_tips, remote_tips) => (local_tips, remote_tips),
            _ => panic!("{}{:?}", THREADS_COMMUNICATION_ERROR, response),
        };

        if !remote_tips.is_empty() || !local_tips.is_empty() {
            remote_tips.iter().for_each(|tip| self.add_item_to_tip_list(tip, true));
            local_tips.iter().for_each(|tip| self.add_item_to_tip_list(tip, false));

            let parent = self.list.parent().static_downcast::<QWidget>();
            let grandparent = parent.parent().static_downcast::<QWidget>();
            let layout = grandparent.layout().static_downcast::<QGridLayout>();
            parent.set_visible(true);
            layout.add_widget_5a(parent, 0, 99, layout.row_count(), 1);
        }
    }
/// This function loads data for the provided path to the view.
This function loads data for the provided path to the view.
This function loads data for the provided path to the view .
pub unsafe fn load_data(&self, path: &[String]) {
        // For tables, share tips between same-type tables.
        *self.path.write().unwrap() = if path.len() > 2 && path[0].to_lowercase() == "db" { path[0..=1].to_vec() } else { path.to_vec() };
        self.model.clear();
        let receiver = CENTRAL_COMMAND.send_background(Command::GetTipsForPath(self.path.read().unwrap().to_vec()));
        let response = CentralCommand::recv(&receiver);
        let (local_tips, remote_tips) = match response {
            Response::VecTipVecTip(local_tips, remote_tips) => (local_tips, remote_tips),
            _ => panic!("{}{:?}", THREADS_COMMUNICATION_ERROR, response),
        };
        if !remote_tips.is_empty() || !local_tips.is_empty() {
            remote_tips.iter().for_each(|tip| self.add_item_to_tip_list(tip, true));
            local_tips.iter().for_each(|tip| self.add_item_to_tip_list(tip, false));
            let parent = self.list.parent().static_downcast::<QWidget>();
            let grandparent = parent.parent().static_downcast::<QWidget>();
            let layout = grandparent.layout().static_downcast::<QGridLayout>();
            parent.set_visible(true);
            layout.add_widget_5a(parent, 0, 99, layout.row_count(), 1);
        }
    }
pub unsafe fn load_data ( & self , path : & [ String ] ) { // For tables, share tips between same-type tables. * self . path . write ( ) . unwrap ( ) = if path . len ( ) > 2 && path [ 0 ] . to_lowercase ( ) == " " { path [ 0 ..= 1 ] . to_vec ( ) } else { path . to_vec ( ) } ; self . model . clear ( ) ; let receiver = CENTRAL_COMMAND . send_background ( Command :: GetTipsForPath ( self . path . read ( ) . unwrap ( ) . to_vec ( ) ) ) ; let response = CentralCommand :: recv ( & receiver ) ; let ( local_tips , remote_tips ) = match response { Response :: VecTipVecTip ( local_tips , remote_tips ) => ( local_tips , remote_tips ) , _ => panic ! ( " " THREADS_COMMUNICATION_ERROR response ) , } ; if ! remote_tips . is_empty ( ) || ! local_tips . is_empty ( ) { remote_tips . iter ( ) . for_each ( | tip | self . add_item_to_tip_list ( tip , true ) ) ; local_tips . iter ( ) . for_each ( | tip | self . add_item_to_tip_list ( tip , false ) ) ; let parent = self . list . parent ( ) . static_downcast :: < QWidget > ( ) ; let grandparent = parent . parent ( ) . static_downcast :: < QWidget > ( ) ; let layout = grandparent . layout ( ) . static_downcast :: < QGridLayout > ( ) ; parent . set_visible ( true ) ; layout . add_widget_5a ( parent , 0 , 99 , layout . row_count ( ) , 1 ) ; } }
This function loads data for the provided path to the view.
This function loads data for the provided path to the view .
&self
path
&[String]
&self
path
&[String]