Exemplo n.º 1
0
    def on_doubleclick(self, item: QTreeWidgetItem, column: int) -> None:
        if self.permit_edit(item, column):
            super(HistoryList, self).on_doubleclick(item, column)
        else:
            account_id = item.data(Columns.STATUS, self.ACCOUNT_ROLE)
            tx_hash = item.data(Columns.STATUS, self.TX_ROLE)

            account = self._wallet.get_account(account_id)
            tx = account.get_transaction(tx_hash)
            if tx is not None:
                self._main_window.show_transaction(account, tx)
            else:
                MessageBox.show_error(
                    _("The full transaction is not yet present in your wallet."
                      +
                      " Please try again when it has been obtained from the network."
                      ))
Exemplo n.º 2
0
    def parameter_updater(self, item: QTreeWidgetItem, col=None, save=True):
        """Handles updating the options for a parameter."""
        if 'Custom' != self.tab1.profile_dropdown.currentText():
            self.tab1.profile_dropdown.addItem('Custom')
            self.tab1.profile_dropdown.setCurrentText('Custom')
            self.settings.user_options['current_profile'] = ''

        if item.data(0, 33) == 0:
            if item.data(0, 32) in self.settings.need_parameters:
                result = self.alert_message(
                    'Warning!', 'This parameter needs an option!',
                    'There are no options!\n'
                    'Would you make one?', True)
                if result == QMessageBox.Yes:
                    self.add_option(item)
                else:
                    item.treeWidget().blockSignals(True)
                    item.setCheckState(0, Qt.Unchecked)
                    item.treeWidget().blockSignals(False)
                    item.treeWidget().check_dependency(item)

            if item.checkState(0) == Qt.Checked:
                self.settings[item.data(0, 32)]['state'] = True
                if item.data(0, 32) == 'Download location':
                    for i in range(item.childCount()):
                        self.parameter_updater(item.child(i), save=False)

            else:
                self.settings[item.data(0, 32)]['state'] = False
                if item.data(0, 32) == 'Download location':
                    self.tab2.download_lineedit.setText(
                        path_shortener(self.local_dl_path))
                    self.tab2.download_lineedit.setToolTip(self.local_dl_path)

        elif item.data(0, 33) == 1:
            # Settings['Settings'][Name of setting]['active option']] = index of child
            self.settings[item.parent().data(0,
                                             32)]['active option'] = item.data(
                                                 0, 35)
            if item.parent().data(0, 32) == 'Download location':
                if item.checkState(0) == Qt.Checked:
                    self.tab2.download_lineedit.setText(item.data(0, 0))
                    self.tab2.download_lineedit.setToolTip(item.data(0, 32))

        if save:
            self.file_handler.save_settings(self.settings.get_settings_data)
Exemplo n.º 3
0
 def getTreeWidgetItemJsonData(treeWidgetItem: QTreeWidgetItem):
     """
     从TreeWidgetItem解析出json数据
     :param treeWidgetItem: treeWidgetItem
     :return: json数据
     """
     text = treeWidgetItem.text(0)
     if text == "[]":
         jsonData = []
         for i in range(0, treeWidgetItem.childCount()):
             res = WidgetUtil.getTreeWidgetItemJsonData(
                 treeWidgetItem.child(i))
             jsonData.append(res)
         print(jsonData)
         return jsonData
     elif text == "{}":
         jsonData = {}
         for i in range(0, treeWidgetItem.childCount()):
             child = treeWidgetItem.child(i)
             res = WidgetUtil.getTreeWidgetItemJsonData(child)
             print("root key: " + child.text(0) + " value: " + str(res))
             jsonData = {**jsonData, **res}
         print(jsonData)
         return jsonData
     elif treeWidgetItem.data(0, Qt.UserRole):
         # 末端节点
         dataType = treeWidgetItem.data(1, Qt.UserRole)
         print(DataTypeUtil.parseByType(text, dataType))
         res = DataTypeUtil.parseByType(text, dataType)
         print("末端节点 -> %s dataType -> %d parse res -> %s" %
               (text, dataType, str(res)))
         return res
     else:
         jsonData = {}
         list = []
         for i in range(0, treeWidgetItem.childCount()):
             child = treeWidgetItem.child(i)
             res = WidgetUtil.getTreeWidgetItemJsonData(child)
             list.append(res)
         if len(list) == 1:
             jsonData[text] = list[0]
         else:
             jsonData[text] = list
         print(jsonData)
         return jsonData
Exemplo n.º 4
0
 def on_edited(self, item: QTreeWidgetItem, column: int,
               prior_text: str) -> None:
     '''Called only when the text actually changes'''
     text = item.text(column).strip()
     if text == "":
         text = None
     tx_hash = item.data(Columns.STATUS, self.TX_ROLE)
     self._main_window._wallet.set_transaction_label(tx_hash, text)
     self._main_window.history_view.update_tx_labels()
Exemplo n.º 5
0
 def on_edited(self, item: QTreeWidgetItem, column: int,
               prior: str) -> None:
     '''Called only when the text actually changes'''
     text = item.text(column).strip()
     if text == "":
         text = None
     invoice_id = item.data(COL_RECEIVED, Qt.UserRole)
     self._send_view._account.invoices.set_invoice_description(
         invoice_id, text)
Exemplo n.º 6
0
 def on_geog_data_tree_doubleclick(self, item: QTreeWidgetItem, column: int) -> None:
     if item.childCount() > 0:
         # clicked on a group
         return
     abs_path = item.data(0, Qt.UserRole)
     if not os.path.exists(abs_path):
         # dataset doesn't exist
         return
     load_wps_binary_layer(abs_path)
Exemplo n.º 7
0
    def data(self, col, role):

        if self._istop:
            if role == Qt.CheckStateRole:
                return Qt.Checked
            if role == Qt.BackgroundRole:
                return self.highlightBrush[1]
            if role == Qt.ForegroundRole:
                return QTreeWidgetItem.data(self, col, role)
        return super().data(col, role)
Exemplo n.º 8
0
    def data(self, col, role):

        if self._istop:
            if role == Qt.CheckStateRole:
                return Qt.Checked
            if role == Qt.BackgroundRole:
                return self.highlightBrush[1]
            if role == Qt.ForegroundRole:
                return QTreeWidgetItem.data(self, col, role)
        return super().data(col, role)
    def highlight_rfd_extent(self, current: QTreeWidgetItem, previous: QTreeWidgetItem):
        if current:
            t0 = time.time()

            rfd: RFD = current.data(self.RFD, Qt.UserRole)
            self.rfd_subject.on_next(rfd)

            rfd_df_indexes = RFDExtent.extent_indexes(self.data_frame, rfd)

            '''self.rfd_data_set_table.clearSelection()
Exemplo n.º 10
0
 def newCategory(self, item: QtWidgets.QTreeWidgetItem):
     cat = item.data(0, Qt.UserRole)
     if item.type() != 0 or not isinstance(cat, Category):
         return
     newCat = Category(self.lineLib.validNewName('新分类'), parent=cat)
     cat.addCategory(newCat)
     item0 = QtWidgets.QTreeWidgetItem(item, (newCat.name, '0'), 0)
     item0.setData(0, Qt.UserRole, newCat)
     self.updateParentItemCount(item0, 1)
     self.setCurrentItem(item0)
Exemplo n.º 11
0
    def on_tre_connections_currentItemChanged(
            self, current: QtWidgets.QTreeWidgetItem, previous: QtWidgets.QTreeWidgetItem):

        self._edit_state()
        if current and current.type() == NodeType.CON:
            self.__current_item = current
            self.txt_name.setText(current.text(0))
            self.txt_address.setText(current.text(1))
            self.sbx_port.setValue(current.data(0, WidgetData.port))
            self.sbx_timeout.setValue(current.data(0, WidgetData.timeout))
            if current.parent() is None:
                self.cbb_folder.setCurrentIndex(0)
            else:
                self.cbb_folder.setCurrentText(current.parent().text(0))
        elif current and current.type() == NodeType.DIR:
            self.__current_item = current
            self.cbb_folder.setCurrentText(current.text(0))
        else:
            self.__current_item = QtWidgets.QTreeWidgetItem()
            self.cbb_folder.setCurrentText(current.text(0) if current else "")
Exemplo n.º 12
0
    def check_dependency(self, item: QTreeWidgetItem):
        """
        Looks for mentioned dependents, and enables/disables those depending on checkstate.

        :param item: changed item from QTreeWidget (paramTree)
        :type item: QTreeWidget
        """

        if item.data(0, 33) == 0 and item.data(0, 37):
            for i in item.data(0, 37):
                if item.checkState(0) == Qt.Unchecked:
                    self.blockSignals(True)
                    i.setDisabled(True)
                    i.setExpanded(False)
                    self.blockSignals(False)
                    i.setCheckState(0, Qt.Unchecked)
                else:
                    self.blockSignals(True)
                    i.setDisabled(False)
                    self.blockSignals(False)
Exemplo n.º 13
0
 def on_tree_item_double_clicked(self, item: QTreeWidgetItem, column: int):
     # void	itemDoubleClicked(QTreeWidgetItem * item, int column)
     # virtual QVariant	data(int column, int role) const
     item_data = item.data(0, Qt.UserRole)
     if item_data is None:
         return
     item_id = str(item_data)
     print('Double click on [{0}]'.format(item_id))
     self.opcsrv.get_item(item_id)
     if item_id not in self.watched_itemids:
         self.watched_itemids.append(item_id)
Exemplo n.º 14
0
    def _change_stacked_current(self, item: QtWidgets.QTreeWidgetItem):
        """
        2019.10.07重构
        """
        widget, inited = item.data(-1)
        if not inited:
            #已经初始化
            widget.initWidget()
            widget.setData()
            widget.btnOk.clicked.connect(lambda: self._update_line)
            item.setData(-1, (widget, True))

        self.stackedWidget.setCurrentWidget(widget)
Exemplo n.º 15
0
    def __open_item(self, item: QTreeWidgetItem):
        parent_item = item.parent()
        # if it has no parent it's a file, ignore it
        if parent_item is not None:
            result: int = QMessageBox.Yes
            descriptor: BandDescriptor = item.data(0, Qt.UserRole)
            if self.__show_bad_bands_prompt and descriptor.is_bad_band():
                result = self.__bad_band_prompt(descriptor)

            if result == QMessageBox.Yes:
                self.bandSelected.emit(item)
        else:
            self.__show_error("A band must be selected not a file.")
Exemplo n.º 16
0
 def set_default(self, item: QtWidgets.QTreeWidgetItem):
     """ 将 item 恢复为默认颜色 """
     style = self.parent().ui_config.get('main_window',
                                         'style',
                                         fallback='normal_style')
     data = item.data(0, QtCore.Qt.UserRole)
     if data is not None:
         item.setIcon(0, self.icons[0])
     if style == "dark_style":
         item.setForeground(0, QtCore.Qt.white)
     else:
         item.setForeground(0, QtCore.Qt.black)
     for i in range(item.childCount()):
         self.set_default(item.child(i))
Exemplo n.º 17
0
 def __handle_band_select(self, item: QTreeWidgetItem):
     band_descriptor: BandDescriptor = item.data(0, Qt.UserRole)
     WindowManager.__LOG.debug("Band selected for: {0}, {1}, {2}".format(
         band_descriptor.file_name(), band_descriptor.band_name(),
         band_descriptor.wavelength_label()))
     parent_item = item.parent()
     file_name = parent_item.text(0)
     if file_name in self.__file_managers:
         file_set = self.__file_managers[file_name]
         file_set.add_grey_window_set(parent_item.indexOfChild(item),
                                      band_descriptor)
     else:
         # TODO report or log?
         pass
Exemplo n.º 18
0
 def walk_dict_tree(parent, dict_, location=None):
     if not location: location = []
     location.append(0)
     for ii, childd in enumerate(dict_["_childs"]):
         childitem = QTreeWidgetItem(parent, [childd["name"]])
         childitem.setFlags(childitem.flags() | Qt.ItemIsEditable)
         location[-1] = ii
         #########childitem.setData(0, Qt.UserRole, childd["name"])
         childitem.setData(1, Qt.UserRole,
                           location)  # ref to location in dictionary
         checkdata = childitem.data(1, Qt.UserRole)
         #print(checkdata, childd, checkdata is childd)
         ####print(location, checkdata, checkdata.toPyObject())
         if "_childs" in childd:
             walk_dict_tree(childitem, childd, location=location)
 def node_type_selected(self, current: QTreeWidgetItem):
     """
     Slot that handles when another node type is selected
     :param current: the current item selected in the TreeWidget
     """
     # check for none to prevent errors when updating node types
     if not current or not self.gui.load_tree:
         return
     # check if the item is a node type
     if not current.data(1, Qt.UserRole):
         self.selected = None
         self.node_from_type_button.setEnabled(False)
     else:
         self.node_from_type_button.setEnabled(True)
         self.selected = current
Exemplo n.º 20
0
    def move_item(self, item: QTreeWidgetItem, favorite: bool):
        """ Move an time to or from the favorites tree. """

        if favorite:
            tree = self.tab2.options
            self.settings.user_options['favorites'].remove(item.data(0, 0))
        else:
            tree = self.tab2.favorites
            self.settings.user_options['favorites'].append(item.data(0, 0))

        tree.blockSignals(True)
        tree.addTopLevelItem(item)

        self.tab2.options.update_size()
        self.tab2.favorites.update_size()

        self.file_handler.save_settings(self.settings.get_settings_data)

        if item.checkState(0) == Qt.Checked:
            item.setExpanded(True)
        else:
            item.setExpanded(False)

        tree.blockSignals(False)
Exemplo n.º 21
0
    def get_item_label(item: QtW.QTreeWidgetItem,
                       keep_symbols: bool = False) -> str:
        """Returns the label for the given tree item.

        :param item: The item.
        :param keep_symbols: If True and the item represents a tag type,
            the tag type symbol will be returned along with the label.
        :return: The item’s label.
        """
        o: typ.Union[model.Tag,
                     model.TagType] = item.data(0, TagTree.DATA_OBJECT)
        if item.whatsThis(0) == TagTree.TAG_TYPE:
            if o:
                return o.label + (f' ({o.symbol})' if keep_symbols else '')
            else:
                return _t('main_window.tags_tree.type_item_unclassified')
        return o.label
Exemplo n.º 22
0
 def newLine(self, item: QtWidgets.QTreeWidgetItem) -> Line:
     """
     返回新增的线路
     """
     cat = item.data(0, Qt.UserRole)
     if item.type() != 0 or not isinstance(cat, Category):
         return None
     line = Line(self.lineLib.validNewName('新线路'))
     cat.addLine(line)
     item0 = QtWidgets.QTreeWidgetItem(
         item, (line.name, str(line.lineLength()), line.firstStationName(),
                line.lastStationName()), 1)
     item0.setData(0, Qt.UserRole, line)
     line.setItem(item0)
     self.setCurrentItem(item0)
     self.updateParentItemCount(item0, 1)
     return line
Exemplo n.º 23
0
    def itemClickedHandler(self, tree_widget_item: QTreeWidgetItem, column: int):
        # print("I'm click", tree_widget_item.__class__.__name__,
        #       tree_widget_item.isSelected())
        # print("click column", column)

        # 1. handle clicks on check marks to speed things up over using an editor
        if column == LOCKED_COL or column == VISIBLE_COL:
            self.blockSignals(True)
            if tree_widget_item.data(column, Qt.DisplayRole):
                # print("unchecking", tree_widget_item.__class__.__name__)
                tree_widget_item.setData(column, Qt.EditRole, False)
            else:
                # print("checking", tree_widget_item.__class__.__name__)
                tree_widget_item.setData(column, Qt.EditRole, True)
            self.blockSignals(False)
        # end if

        filter_set = self._document.filter_set
        if hasattr(tree_widget_item, "FILTER_NAME") and\
           tree_widget_item.FILTER_NAME not in filter_set:
            rect = self.visualItemRect(tree_widget_item)
            QToolTip.showText(self.mapToGlobal(rect.center()), "Change filter to select")
            return
        self.processSelections()
Exemplo n.º 24
0
    def itemClickedHandler(self, tree_widget_item: QTreeWidgetItem, column: int):
        # print("I'm click", tree_widget_item.__class__.__name__,
        #       tree_widget_item.isSelected())
        # print("click column", column)

        # 1. handle clicks on check marks to speed things up over using an editor
        if column == LOCKED_COL or column == VISIBLE_COL:
            self.blockSignals(True)
            if tree_widget_item.data(column, Qt.DisplayRole):
                # print("unchecking", tree_widget_item.__class__.__name__)
                tree_widget_item.setData(column, Qt.EditRole, False)
            else:
                # print("checking", tree_widget_item.__class__.__name__)
                tree_widget_item.setData(column, Qt.EditRole, True)
            self.blockSignals(False)
        # end if

        filter_set = self._document.filter_set
        if hasattr(tree_widget_item, "FILTER_NAME") and\
           tree_widget_item.FILTER_NAME not in filter_set:
            rect = self.visualItemRect(tree_widget_item)
            QToolTip.showText(self.mapToGlobal(rect.center()), "Change filter to select")
            return
        self.processSelections()
Exemplo n.º 25
0
 def on_doubleclick(self, item: QTreeWidgetItem, column: int) -> None:
     if self.permit_edit(item, column):
         super(InputTreeWidget, self).on_doubleclick(item, column)
     else:
         tx_hash = item.data(InputColumns.INDEX, Roles.TX_HASH)
         self._show_other_transaction(tx_hash)
Exemplo n.º 26
0
    def update_todo(self, list_item: QtWidgets.QTreeWidgetItem):
        todo_item: TodoItem = list_item.data(0, QtCore.Qt.UserRole)

        if list_item.checkState(0) == QtCore.Qt.Checked:
            todo_item.complete()
            self.updater_thread.start()
Exemplo n.º 27
0
 def evtMovieList_itemDoubleClicked(self, item: QTreeWidgetItem,
                                    column: int):
     w = MovieWindow(self, int(item.data(0,
                                         roles.UserRoles.MOVIE_ID.value)))
     if w.exec_() == QDialog.Accepted:
         self.populateMovieListWidget()
Exemplo n.º 28
0
 def files_tree_item_clicked(self, item: QTreeWidgetItem):
     movie, file = item.data(0, Qt.UserRole)
     self.scrollArea.show()
     movie.fill_widget(self)
     file.fill_widget(self)
Exemplo n.º 29
0
    def add_option(self, item: QTreeWidgetItem):
        """
        Check if parameter has a possible option parameter, and lets the user add on if one exist.
        """
        if item.data(0, 32) == 'Download location':
            self.alert_message(
                'Error!',
                'Please use the browse button\nto select download location!',
                None)

        if item.data(0, 33) == 2:
            self.alert_message('Error!',
                               'Custom option does not take a command!', None)

        # TODO: Standardise setting an parameter to checked, and updating to expanded state.
        elif '{}' in self.settings[item.data(0, 32)]['command']:

            item.treeWidget().blockSignals(True)
            option = self.design_option_dialog(item.text(0), item.toolTip(0))

            if option:
                if option in self.settings[item.data(0, 32)]['options']:
                    self.alert_message('Error', 'That option already exsists!',
                                       '')
                    item.treeWidget().blockSignals(False)
                    return

                new_option = ParameterTree.make_option(option.strip(), item,
                                                       True, 1, None, None, 0)

                move = item.takeChild(item.indexOfChild(new_option))
                item.insertChild(0, move)

                self.settings.add_parameter_option(item.data(0, 32), option)

                for i in range(len(self.settings[item.data(0,
                                                           32)]['options'])):
                    child = item.child(i)
                    child.setData(0, 35, i)
                    if i == 0:
                        child.setCheckState(0, Qt.Checked)
                        child.setFlags(child.flags() ^ Qt.ItemIsUserCheckable)
                    else:
                        child.setCheckState(0, Qt.Unchecked)
                        child.setFlags(child.flags() | Qt.ItemIsUserCheckable)

                item.setCheckState(0, Qt.Checked)
                item.setExpanded(True)
                item.treeWidget().update_size()
                try:
                    self.settings.need_parameters.remove(item.data(0, 32))
                except ValueError:
                    pass

                self.file_handler.save_settings(
                    self.settings.get_settings_data)

            item.treeWidget().blockSignals(False)

        else:
            self.alert_message(
                'Error!', 'The specified option does not take arguments!',
                None)
Exemplo n.º 30
0
    def rfd_selected_to_max_clique(self, current: QTreeWidgetItem, previous: QTreeWidgetItem):
        if current:
            t0 = time.time()

            rfd: RFD = current.data(self.RFD, Qt.UserRole)
            self.rfd_subject.on_next(rfd)

            # https://stackoverflow.com/questions/38987/how-to-merge-two-dictionaries-in-a-single-expression#26853961
            rfd_thresholds: dict = {**rfd.get_left_hand_side(), **rfd.get_right_hand_side()}

            lhs = rfd.get_left_hand_side()
            rhs = rfd.get_right_hand_side()

            lhs_keys = lhs.keys()
            rhs_keys = rhs.keys()

            # https://stackoverflow.com/questions/1720421/how-to-concatenate-two-lists-in-python#answer-35631185
            rfd_columns = [*lhs_keys, *rhs_keys]

            rfd_columns_index: dict = {value: position for (position, value) in enumerate(rfd_columns)}

            rows, columns = self.data_frame.shape

            # Calculate all possible differences.
            # This is an O(N^2) operation and may be costly in terms of time and memory.
            # dist: ndarray = np.abs(rfd_columns_data[:, None] - rfd_columns_data)

            full_dist = DiffDataFrame.full_diff(self.data_frame[rfd_columns])

            dist: np.ndarray = np.array(
                [[full_dist.iloc[row1 * rows + row2] for row2 in range(0, rows)] for row1 in range(0, rows)])

            # Identify the suitable pairs of rows:
            # im: ndarray = (dist[:, :, 0] <= 2) & (dist[:, :, 1] <= 0) & (dist[:, :, 2] <= 1)

            conditions_arrays: np.ndarray = [(dist[:, :, rfd_columns_index[column]] <= rfd_thresholds[column])
                                             for column in rfd_columns]

            adjacency_matrix: np.ndarray = np.array(reduce(lambda a, b: np.bitwise_and(a, b), conditions_arrays))

            # Use them as an adjacency matrix and construct a graph.
            # The graph nodes represent rows in the original dataframe.
            # The nodes are connected if the corresponding rows are in the RFD:

            graph = nx.from_numpy_matrix(adjacency_matrix)

            max_clique = max(nx.clique.find_cliques(graph), key=len)
            df: DataFrame = self.data_frame.loc[max_clique, :]
            t1 = time.time()

            seconds = t1 - t0
            current.setText(self.TIME, str(seconds) + "''")

            percentage = round((df.shape[0] / self.rows_count) * 100)
            current.setText(self.EXTENT, str(percentage) + "%")

            df_indexes = df.index.values.tolist()

            # self.pandas_model.update_data(self.data_frame)

            '''self.rfd_data_set_table.clearSelection()
Exemplo n.º 31
0
 def _i2c(item: QtWidgets.QTreeWidgetItem) -> Contact:
     return item.data(0, ContactList.DataRoles.Contact)
Exemplo n.º 32
0
        def set_settings(node: QtWidgets.QTreeWidgetItem):
            parent = node.parent()
            helper.settings.setValue("address", node.text(1))
            helper.settings.setValue("folder", parent.text(0) if parent else "")
            helper.settings.setValue("name", node.text(0))
            helper.settings.setValue("port", node.data(0, WidgetData.port))
            helper.settings.setValue("timeout", node.data(0, WidgetData.timeout))

            if node.data(0, WidgetData.last_dir_upload):
                helper.settings.setValue("last_dir_upload", node.data(0, WidgetData.last_dir_upload))
            if node.data(0, WidgetData.last_file_upload):
                helper.settings.setValue("last_file_upload", node.data(0, WidgetData.last_file_upload))
            if node.data(0, WidgetData.last_dir_pictory):
                helper.settings.setValue("last_dir_pictory", node.data(0, WidgetData.last_dir_pictory))
            if node.data(0, WidgetData.last_dir_picontrol):
                helper.settings.setValue("last_dir_picontrol", node.data(0, WidgetData.last_dir_picontrol))
            if node.data(0, WidgetData.last_dir_selected):
                helper.settings.setValue("last_dir_selected", node.data(0, WidgetData.last_dir_selected))
            if node.data(0, WidgetData.last_pictory_file):
                helper.settings.setValue("last_pictory_file", node.data(0, WidgetData.last_pictory_file))
            if node.data(0, WidgetData.last_tar_file):
                helper.settings.setValue("last_tar_file", node.data(0, WidgetData.last_tar_file))
            if node.data(0, WidgetData.last_zip_file):
                helper.settings.setValue("last_zip_file", node.data(0, WidgetData.last_zip_file))
            if node.data(0, WidgetData.watch_files):
                helper.settings.setValue("watch_files", node.data(0, WidgetData.watch_files))
            if node.data(0, WidgetData.watch_path):
                helper.settings.setValue("watch_path", node.data(0, WidgetData.watch_path))
            if node.data(0, WidgetData.debug_geos):
                helper.settings.setValue("debug_geos", node.data(0, WidgetData.debug_geos))