diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-03-26 17:57:05 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-03-26 17:57:05 +0100 |
commit | 292b5f607016e4b7e6854a94be26ade5deeb57be (patch) | |
tree | 5f98a2ce0d644e991203e6293566a4ac184f33bf /src/frontend/gui/sisyphus-gui.py | |
parent | 3a582f243a8294ed87f40a7f8e0453a4b0637fcc (diff) |
add license information
Diffstat (limited to 'src/frontend/gui/sisyphus-gui.py')
-rwxr-xr-x | src/frontend/gui/sisyphus-gui.py | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/frontend/gui/sisyphus-gui.py b/src/frontend/gui/sisyphus-gui.py index 0edc1be..3cf7993 100755 --- a/src/frontend/gui/sisyphus-gui.py +++ b/src/frontend/gui/sisyphus-gui.py @@ -45,6 +45,7 @@ class Sisyphus(QtWidgets.QMainWindow): self.inputBox.textEdited.connect(self.searchDatabase) self.settingsButton.clicked.connect(self.mirrorSettings) + self.licenseButton.clicked.connect(self.showLicense) self.updateWorker = UpdateWorker() self.updateThread = QtCore.QThread() @@ -304,10 +305,14 @@ class Sisyphus(QtWidgets.QMainWindow): self.window = MirrorCfg() self.window.show() + def showLicense(self): + self.window = License() + self.window.show() + def sisyphusExit(self): self.close() -# mirror config window +# mirror configuration window class MirrorCfg(QtWidgets.QMainWindow): def __init__(self): super(MirrorCfg, self).__init__() @@ -347,6 +352,17 @@ class MirrorCfg(QtWidgets.QMainWindow): def mirrorCfgExit(self): self.close() +# license information window +class License(QtWidgets.QMainWindow): + def __init__(self): + super(License, self).__init__() + uic.loadUi('ui/license.ui', self) + self.centerOnScreen() + + def centerOnScreen(self): + resolution = QtWidgets.QDesktopWidget().screenGeometry() + self.move((resolution.width() / 2) - (self.frameSize().width() / 2), + (resolution.height() / 2) - (self.frameSize().height() / 2)) # update worker class UpdateWorker(QtCore.QObject): started = QtCore.pyqtSignal() |