shape-Ladefunktion Verfahrensgebiet
This commit is contained in:
@@ -232,6 +232,52 @@ def ask_detailpruefung_oder_vg_laden(
|
||||
return "abbrechen"
|
||||
|
||||
|
||||
def ask_detailpruefung_oder_abbrechen(
|
||||
parent: Any,
|
||||
title: str,
|
||||
message: str,
|
||||
) -> Literal["detailpruefung", "abbrechen"]:
|
||||
"""Zeigt Dialog mit zwei Optionen nach erkannter Flächenabweichung (Shape-Workflow).
|
||||
|
||||
Optionen:
|
||||
- **Detailprüfung starten**: Knickpunktbasierte Prüfung des Shape-VG-Umrings
|
||||
- **Abbrechen**: Vorgang beenden, Shape-Verfahrensgebiet unverändert behalten
|
||||
|
||||
Parameters
|
||||
----------
|
||||
parent :
|
||||
Eltern-Widget oder None.
|
||||
title : str
|
||||
Dialog-Titel.
|
||||
message : str
|
||||
Hauptmeldung mit Flächen-Informationen.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Literal["detailpruefung", "abbrechen"]
|
||||
Genaue Entscheidung des Nutzers.
|
||||
"""
|
||||
if QT_VERSION == 0: # Mock-Modus
|
||||
print(f"Mock-Modus: ask_detailpruefung_oder_abbrechen('{title}') → abbrechen")
|
||||
return "abbrechen"
|
||||
|
||||
msg = QMessageBox(parent)
|
||||
msg.setIcon(ICON_QUESTION)
|
||||
msg.setWindowTitle(title)
|
||||
msg.setText(message)
|
||||
|
||||
detail_btn = msg.addButton("Detailprüfung starten", QMessageBox.ButtonRole.AcceptRole)
|
||||
msg.addButton("Abbrechen", QMessageBox.ButtonRole.RejectRole)
|
||||
|
||||
exec_dialog(msg)
|
||||
|
||||
clicked = msg.clickedButton()
|
||||
if clicked == detail_btn:
|
||||
return "detailpruefung"
|
||||
else:
|
||||
return "abbrechen"
|
||||
|
||||
|
||||
class ProgressDialog:
|
||||
def __init__(self, total: int, title: str = "Fortschritt", label: str = "Verarbeite..."):
|
||||
self.total = max(total, 1)
|
||||
|
||||
Reference in New Issue
Block a user