|
1 # -*- coding: utf-8 -*- |
|
2 |
|
3 # Copyright (c) 2003 - 2022 Detlev Offenbach <detlev@die-offenbachs.de> |
|
4 # |
|
5 |
|
6 """ |
|
7 Module implementing a dialog to enter the data for a new property. |
|
8 """ |
|
9 |
|
10 from PyQt6.QtWidgets import QDialog |
|
11 |
|
12 from .Ui_SvnPropSetDialog import Ui_SvnPropSetDialog |
|
13 |
|
14 |
|
15 class SvnPropSetDialog(QDialog, Ui_SvnPropSetDialog): |
|
16 """ |
|
17 Class implementing a dialog to enter the data for a new property. |
|
18 """ |
|
19 def __init__(self, recursive, parent=None): |
|
20 """ |
|
21 Constructor |
|
22 |
|
23 @param recursive flag indicating a recursive set is requested |
|
24 @param parent parent widget (QWidget) |
|
25 """ |
|
26 super().__init__(parent) |
|
27 self.setupUi(self) |
|
28 |
|
29 self.recurseCheckBox.setChecked(recursive) |
|
30 |
|
31 def getData(self): |
|
32 """ |
|
33 Public slot used to retrieve the data entered into the dialog. |
|
34 |
|
35 @return tuple of three values giving the property name, the text |
|
36 of the property and a flag indicating, that this property |
|
37 should be applied recursively. (string, string, boolean) |
|
38 """ |
|
39 return (self.propNameEdit.text(), |
|
40 self.propTextEdit.toPlainText(), |
|
41 self.recurseCheckBox.isChecked()) |