Beispiel #1
0
 def __init__(self, parent):
     """Initialize ChangeWin.
     :param parent: Caller.
     """
     QDialog.__init__(self, parent)
     self.ui = Ui_changeSummary()
     self.ui.setupUi(self)
Beispiel #2
0
class ChangeWin(QDialog):
    """A QDialog that lists changes before they are commited.
    :param QDialog: Parent class.
    """

    def __init__(self, parent):
        """Initialize ChangeWin.
        :param parent: Caller.
        """
        QDialog.__init__(self, parent)
        self.ui = Ui_changeSummary()
        self.ui.setupUi(self)

    def setChanges(self, changeDict):
        """Add changes to ChangeWin.
        :param changeDict: Dictionary of changes.
        """
        installString = ""
        upgradeString = ""
        removeString = ""
        for app in changeDict["repoInstalls"]:
            installString += app + " "
        for app in changeDict["aurInstalls"]:
            installString += app + " "
        for app in changeDict["aurBuildDeps"]:
            installString += app + " "
        for app in changeDict["aurDeps"]:
            installString += app + " "
        for app in changeDict["repoUpgrades"]:
            upgradeString += app + " "
        for app in changeDict["aurUpgrades"]:
            upgradeString += app + " "
        for app in changeDict["removes"]:
            removeString += app + " "

        self.ui.toInstallEdit.setText(installString)
        self.ui.toUpgradeEdit.setText(upgradeString)
        self.ui.toRemoveEdit.setText(removeString)