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