Dialoge für Vorlagen-Piepeline ergänzt
This commit is contained in:
@@ -39,6 +39,20 @@ def ask_yes_no(
|
|||||||
return default
|
return default
|
||||||
|
|
||||||
|
|
||||||
|
def show_info_dialog(title: str, message: str, parent: Any = None) -> None:
|
||||||
|
"""
|
||||||
|
Zeigt einen modalen Info-Dialog mit OK-Button.
|
||||||
|
Blockiert bis der Nutzer bestätigt.
|
||||||
|
"""
|
||||||
|
try:
|
||||||
|
if QT_VERSION == 0: # Mock-Modus
|
||||||
|
print(f"Mock-Modus: show_info_dialog('{title}')")
|
||||||
|
return
|
||||||
|
QMessageBox.information(parent, title, message)
|
||||||
|
except Exception as e:
|
||||||
|
print(f"⚠️ show_info_dialog Fehler: {e}")
|
||||||
|
|
||||||
|
|
||||||
OverwriteDecision = Optional[Literal["overwrite", "append", "cancel"]]
|
OverwriteDecision = Optional[Literal["overwrite", "append", "cancel"]]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -56,6 +56,20 @@ class Pruefmanager:
|
|||||||
)
|
)
|
||||||
info("DataGrabber Zusammenfassung", message)
|
info("DataGrabber Zusammenfassung", message)
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------
|
||||||
|
# Allgemeine Nutzerinteraktionen
|
||||||
|
# ------------------------------------------------------------------
|
||||||
|
def zeige_hinweis(self, titel: str, meldung: str) -> None:
|
||||||
|
"""Zeigt eine modale Hinweismeldung mit OK-Button."""
|
||||||
|
from sn_basis.functions.dialog_wrapper import show_info_dialog
|
||||||
|
show_info_dialog(titel, meldung, parent=self.parent)
|
||||||
|
|
||||||
|
def frage_ja_nein(self, titel: str, meldung: str, default: bool = True) -> bool:
|
||||||
|
"""Stellt eine Ja/Nein-Frage. Gibt True zurück, wenn der Nutzer Ja wählt."""
|
||||||
|
if self.ui_modus != "qgis":
|
||||||
|
return default
|
||||||
|
return ask_yes_no(titel, meldung, default=default, parent=self.parent)
|
||||||
|
|
||||||
# ------------------------------------------------------------------
|
# ------------------------------------------------------------------
|
||||||
# VERFAHRENS-DB-spezifische Entscheidungen
|
# VERFAHRENS-DB-spezifische Entscheidungen
|
||||||
# ------------------------------------------------------------------
|
# ------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user