unsafe fn add_item_to_tip_list(&self, tip: &Tip, is_remote: bool) {
        let item = QStandardItem::new();

        item.set_editable(false);
        item.set_text(&QString::from_std_str(tip.get_ref_message()));
        item.set_data_2a(&QVariant::from_bool(is_remote), ROLE_IS_REMOTE);
        item.set_data_2a(&QVariant::from_q_string(&QString::from_std_str(tip.get_ref_user())), ROLE_USER);
        item.set_data_2a(&QVariant::from_u64(*tip.get_ref_timestamp() as u64), ROLE_TIMESTAMP);
        item.set_data_2a(&QVariant::from_q_string(&QString::from_std_str(tip.get_ref_url())), ROLE_URL);
        item.set_data_2a(&QVariant::from_u64(*tip.get_ref_id()), ROLE_ID);
        item.set_data_2a(&QVariant::from_q_string(&QString::from_std_str(tip.get_ref_path())), ROLE_PATH);

        let mut tooltip = String::new();
        tooltip.push_str(&tr("tip_id"));
        tooltip.push_str(&tip.get_ref_id().to_string());
        tooltip.push('\n');

        if !tip.get_ref_user().is_empty() {
            tooltip.push_str(&tr("tip_author"));
            tooltip.push_str(tip.get_ref_user());
            tooltip.push('\n');
        }
        if !tip.get_ref_url().is_empty() {
            tooltip.push_str(&tr("tip_link"));
            tooltip.push_str(tip.get_ref_url());
            tooltip.push('\n');
        }
        item.set_tool_tip(&QString::from_std_str(&tooltip));

        self.model.append_row_q_standard_item(item.into_raw_ptr())
    }
/// This function adds a new tip to the tip list.
This function adds a new tip to the tip list.
This function adds a new tip to the tip list .
unsafe fn add_item_to_tip_list(&self, tip: &Tip, is_remote: bool) {
        let item = QStandardItem::new();
        item.set_editable(false);
        item.set_text(&QString::from_std_str(tip.get_ref_message()));
        item.set_data_2a(&QVariant::from_bool(is_remote), ROLE_IS_REMOTE);
        item.set_data_2a(&QVariant::from_q_string(&QString::from_std_str(tip.get_ref_user())), ROLE_USER);
        item.set_data_2a(&QVariant::from_u64(*tip.get_ref_timestamp() as u64), ROLE_TIMESTAMP);
        item.set_data_2a(&QVariant::from_q_string(&QString::from_std_str(tip.get_ref_url())), ROLE_URL);
        item.set_data_2a(&QVariant::from_u64(*tip.get_ref_id()), ROLE_ID);
        item.set_data_2a(&QVariant::from_q_string(&QString::from_std_str(tip.get_ref_path())), ROLE_PATH);
        let mut tooltip = String::new();
        tooltip.push_str(&tr("tip_id"));
        tooltip.push_str(&tip.get_ref_id().to_string());
        tooltip.push('\n');
        if !tip.get_ref_user().is_empty() {
            tooltip.push_str(&tr("tip_author"));
            tooltip.push_str(tip.get_ref_user());
            tooltip.push('\n');
        }
        if !tip.get_ref_url().is_empty() {
            tooltip.push_str(&tr("tip_link"));
            tooltip.push_str(tip.get_ref_url());
            tooltip.push('\n');
        }
        item.set_tool_tip(&QString::from_std_str(&tooltip));
        self.model.append_row_q_standard_item(item.into_raw_ptr())
    }
unsafe fn add_item_to_tip_list ( & self , tip : & Tip , is_remote : bool ) { let item = QStandardItem :: new ( ) ; item . set_editable ( false ) ; item . set_text ( & QString :: from_std_str ( tip . get_ref_message ( ) ) ) ; item . set_data_2a ( & QVariant :: from_bool ( is_remote ) , ROLE_IS_REMOTE ) ; item . set_data_2a ( & QVariant :: from_q_string ( & QString :: from_std_str ( tip . get_ref_user ( ) ) ) , ROLE_USER ) ; item . set_data_2a ( & QVariant :: from_u64 ( * tip . get_ref_timestamp ( ) as u64 ) , ROLE_TIMESTAMP ) ; item . set_data_2a ( & QVariant :: from_q_string ( & QString :: from_std_str ( tip . get_ref_url ( ) ) ) , ROLE_URL ) ; item . set_data_2a ( & QVariant :: from_u64 ( * tip . get_ref_id ( ) ) , ROLE_ID ) ; item . set_data_2a ( & QVariant :: from_q_string ( & QString :: from_std_str ( tip . get_ref_path ( ) ) ) , ROLE_PATH ) ; let mut tooltip = String :: new ( ) ; tooltip . push_str ( & tr ( " " ) ) ; tooltip . push_str ( & tip . get_ref_id ( ) . to_string ( ) ) ; tooltip . push ( '\n' ) ; if ! tip . get_ref_user ( ) . is_empty ( ) { tooltip . push_str ( & tr ( " " ) ) ; tooltip . push_str ( tip . get_ref_user ( ) ) ; tooltip . push ( '\n' ) ; } if ! tip . get_ref_url ( ) . is_empty ( ) { tooltip . push_str ( & tr ( " " ) ) ; tooltip . push_str ( tip . get_ref_url ( ) ) ; tooltip . push ( '\n' ) ; } item . set_tool_tip ( & QString :: from_std_str ( & tooltip ) ) ; self . model . append_row_q_standard_item ( item . into_raw_ptr ( ) ) }
This function adds a new tip to the tip list.
This function adds a new tip to the tip list .
&self
tip
&Tip
is_remote
bool
&self
tip
&Tip
is_remote
bool