def disconnectWidgets(self): """ Disconnect the widgets that way we don't run into this problem https://stackoverflow.com/questions/3530590/qt-signals-and-slot-connected-twice-what-happens#_=_ :return: """ self.qtickle = Qtickle.Qtickle(self) self.qtickle.guiDisonnect()
def setGuiParams(self, dict): """ Overriding Modules' setGuiParams, because we are accessing a list of lists And each submodule contains it's own `setGuiParams` """ self.qt = Qtickle.Qtickle(self) self.qt.guiRestore(dict[0]) for i in range(len(dict)): self.alg[i - 1].setGuiParams(dict[i])
def getGuiParams(self): """ Return the contents from lineEdits, comboBoxes, etc. :return: """ self.qtickle = Qtickle.Qtickle(self) s = self.qtickle.guiSave() return s
def setGuiParams(self, dict): """ Using a dictionary, restore the UI :param dict: :return: """ self.qtickle = Qtickle.Qtickle(self) self.qtickle.guiRestore(dict)
def getGuiParams(self): """ Overriding Modules' getGuiParams, because I'll need to do a list of lists in order to obtain the regressionMethods' parameters """ self.qt = Qtickle.Qtickle(self) s = [] s.append(self.qt.guiSave()) for items in self.alg: s.append(items.getGuiParams()) return s
def selectiveSetGuiParams(self, dict): """ Selectively restore the UI. We don't want to lose the content we have selected but we don't want to override crucial information either :param dict: :return: """ self.qtickle = Qtickle.Qtickle(self) self.qtickle.selectiveGuiRestore(dict)
def setGuiParams(self, dict): """ Overriding Modules' setGuiParams as we are using a list of lists to :param dict: :return: """ self.qt = Qtickle.Qtickle(self) self.qt.guiRestore(dict[0]) keys = list(self.alg.keys()) for i in range(len(dict)): self.alg[keys[i - 1]].setGuiParams(dict[i])
def selectiveSetGuiParams(self, dict): """ Override Modules' selective Restore function Setup Qtickle selectively restore the UI, the data to do that will be in the 0th element of the dictionary We will then iterate through the rest of the dictionary Will now restore the parameters for the algorithms in the list, Each of the algs have their own selectiveSetGuiParams :param dict: :return: """ self.qt = Qtickle.Qtickle(self) self.qt.selectiveGuiRestore(dict[0]) for i in range(len(dict)): self.alg[i - 1].selectiveSetGuiParams(dict[i])
def setGuiParams(self, dict): self.qt = Qtickle.Qtickle(self) self.qt.guiRestore(dict[0]) keys = list(self.alg.keys()) for i in range(len(dict)): self.alg[keys[i - 1]].setGuiParams(dict[i])
def guiChanged(self): self.qtickle = Qtickle.Qtickle(self) self.qtickle.guiChanged(self.getMainWindowParent().setupModules)
def __init__(self): self.qtickle = Qtickle.Qtickle(self) self.settings = QSettings('USGS', 'PPSG')
def setGuiParams(self, dict): self.qt = Qtickle.Qtickle(self) self.qt.guiRestore(dict[0]) for i in range(len(dict)): self.alg[i - 1].setGuiParams(dict[i])