Exemplo n.º 1
0
 def _table_widget_checkbox_clicked(self, item):
     """
     Handles checkbox value change
     :param item: Clicked item or checkbox widget
     :return: None
     :rtype: None
     """
     if item.checkState() == qc.Qt.Unchecked:
         qgs_point = gpx_view.check_uncheck_item(
             self.point_row_attr, self.map_canvas, item
         )
         self._unchecked_gpx_point(qgs_point)
         self._enable_disable_load_on_checkbox_click()
     else:
         qgs_point = gpx_view.check_uncheck_item(
             self.point_row_attr, self.map_canvas, item
         )
         self._checked_gpx_point(qgs_point)
         self._enable_disable_load_on_checkbox_click()
     self._table_widget_row_selection()
Exemplo n.º 2
0
 def _clear_all_items(self):
     """
     Unchecks all items which are checked and clears the feature
     :return: None
     :rtype: None
     """
     qgs_point = gpx_view.check_uncheck_item(
         self.point_row_attr, self.map_canvas, None, 'uncheck')
     self._unchecked_gpx_point(qgs_point)
     self._enable_disable_button_widgets(None, False)
     point_list, new_point_row_attr = gpx_view.get_qgs_points(
         self.table_widget)
     self._update_feature(point_list, new_point_row_attr)
Exemplo n.º 3
0
 def _clear_all_items(self):
     """
     Unchecks all items which are checked and clears the feature
     :return: None
     :rtype: None
     """
     qgs_points = gpx_view.check_uncheck_item(
         self.point_row_attr, self.map_canvas, None, 'uncheck')
     for qgs_point in qgs_points:
         self._unchecked_gpx_point(qgs_point)
     self._enable_disable_button_widgets(None, False)
     point_list, new_point_row_attr = gpx_view.get_qgs_points(
         self.table_widget)
     self._update_feature(point_list, new_point_row_attr)
Exemplo n.º 4
0
    def _table_widget_checkbox_clicked(self, item):
        """
        Handles checkbox value change
        :param item: Clicked item or checkbox widget
        :return: None
        :rtype: None
        """
        if item.checkState() == qc.Qt.Unchecked:
            qgs_points = gpx_view.check_uncheck_item(
                self.point_row_attr, self.map_canvas, item
            )

            for qgs_point in qgs_points:
                self._unchecked_gpx_point(qgs_point)

            self._enable_disable_load_on_checkbox_click()
        else:
            qgs_points = gpx_view.check_uncheck_item(
                self.point_row_attr, self.map_canvas, item
            )
            for qgs_point in qgs_points:
                self._checked_gpx_point(qgs_point)
            self._enable_disable_load_on_checkbox_click()
        self._table_widget_row_selection()
Exemplo n.º 5
0
 def _select_all_items(self):
     """
     Checks all items which are unchecked
     :return: None
     :rtype: None
     """
     qgs_point = gpx_view.check_uncheck_item(
         self.point_row_attr, self.map_canvas, None, 'check')
     self._checked_gpx_point(qgs_point)
     self._enable_disable_button_widgets(None, True)
     if self.data_changed or self.drag_drop:
         point_list, new_point_row_attr = gpx_view.get_qgs_points(
             self.table_widget)
         self._update_feature(point_list, new_point_row_attr)
         self.drag_drop = None
Exemplo n.º 6
0
 def _select_all_items(self):
     """
     Checks all items which are unchecked
     :return: None
     :rtype: None
     """
     qgs_points = gpx_view.check_uncheck_item(
         self.point_row_attr, self.map_canvas, None, 'check')
     for qgs_point in qgs_points:
         self._checked_gpx_point(qgs_point)
     self._enable_disable_button_widgets(None, True)
     if self.data_changed or self.drag_drop:
         point_list, new_point_row_attr = gpx_view.get_qgs_points(
             self.table_widget)
         self._update_feature(point_list, new_point_row_attr)
         self.drag_drop = None