From 09cb0a60849364774efb49a15afc6fbd854e3d28 Mon Sep 17 00:00:00 2001 From: WorldTeacher <41587052+WorldTeacher@users.noreply.github.com> Date: Tue, 11 Jun 2024 09:50:56 +0200 Subject: [PATCH] add about ui --- src/ui/dialogs/about.py | 46 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 src/ui/dialogs/about.py diff --git a/src/ui/dialogs/about.py b/src/ui/dialogs/about.py new file mode 100644 index 0000000..49feff8 --- /dev/null +++ b/src/ui/dialogs/about.py @@ -0,0 +1,46 @@ +from .dialog_sources.Ui_about import Ui_about +from PyQt6 import QtWidgets +from PyQt6.QtCore import PYQT_VERSION_STR +from src import ( + Icon, + __version__, + __author__ + ) +from omegaconf import OmegaConf +class About(QtWidgets.QDialog, Ui_about): + def __init__(self, parent=None): + super().__init__(parent) + self.setupUi(self) + self.setWindowIcon(Icon("info").icon) + self.setWindowTitle("About") + self.setInfo() + + def test(self): + pass + def setInfo(self): + #add left most column to columnview + data = { + "Version": __version__, + "Author": __author__, + "PyQt6 Version": PYQT_VERSION_STR, + "License": "MIT License", + "Icons":"""Google Material Design Icons (https://fonts.google.com/icons) +StableDiffusion (logo) +svgrepo (https://www.svgrepo.com)""" + } + description = "" + for key, value in data.items(): + description += f"{key}: {value}\n" + self.description.setText(description) + + pass + +def launch_about(): + app = QtWidgets.QApplication([]) + window = About() + window.show() + app.exec() + +if __name__ == "__main__": + + pass \ No newline at end of file