impr: better describing ui

This commit is contained in:
283375 2023-09-24 00:30:45 +08:00
parent 7c043e89ab
commit 6a527bc1ff
Signed by: 283375
SSH Key Fingerprint: SHA256:UcX0qg6ZOSDOeieKPGokA5h7soykG61nz2uxuQgVLSk

View File

@ -1,5 +1,5 @@
from PySide6.QtCore import Qt, Signal, Slot from PySide6.QtCore import Qt, Signal, Slot
from PySide6.QtWidgets import QApplication, QWidget from PySide6.QtWidgets import QApplication, QLabel, QWidget
from project import Project from project import Project
@ -26,16 +26,31 @@ class ProjectEntry_Manage(Ui_ProjectEntry_Manage, QWidget):
self.projectDescriptionLabel.setText("-") self.projectDescriptionLabel.setText("-")
return return
blockLabel = QLabel(self)
blockLabel.setWindowModality(Qt.WindowModality.ApplicationModal)
blockLabel.setWindowFlag(Qt.WindowType.Dialog, True)
blockLabel.setWindowFlag(Qt.WindowType.WindowMinimizeButtonHint, False)
blockLabel.setWindowFlag(Qt.WindowType.WindowMaximizeButtonHint, False)
blockLabel.setAlignment(Qt.AlignmentFlag.AlignCenter)
blockLabel.setText(f"Loading project<br>{self.project.name}")
blockLabel.setMargin(20)
blockLabel.show()
QApplication.processEvents()
self.projectNameLabel.setText(self.project.name) self.projectNameLabel.setText(self.project.name)
self.projectDescriptionLabel.setText( self.projectDescriptionLabel.setText(
"<br>".join( "<br>".join(
[ [
str(self.project.path.resolve()), str(self.project.path.resolve()),
f"{len(self.project.sources)} sources", f"{len(self.project.sources)} sources",
f"{len(self.project.samples)} samples ({len(self.project.samplesUnclassified)} unclassified)", f"{len(self.project.samples)} samples",
f"- {len(self.project.samplesClassified)} classified",
f"- {len(self.project.samplesIgnored)} ignored",
f"- {len(self.project.samplesUnclassified)} unclassified",
] ]
) )
) )
blockLabel.close()
blockLabel.deleteLater()
@Slot() @Slot()
def on_updateButton_clicked(self): def on_updateButton_clicked(self):