|
1 # -*- coding: utf-8 -*- |
|
2 |
|
3 # Copyright (c) 2008 - 2019 Detlev Offenbach <detlev@die-offenbachs.de> |
|
4 # |
|
5 |
|
6 """ |
|
7 Module implementing the multi project properties dialog. |
|
8 """ |
|
9 |
|
10 from __future__ import unicode_literals |
|
11 |
|
12 from PyQt5.QtWidgets import QDialog |
|
13 |
|
14 from .Ui_PropertiesDialog import Ui_PropertiesDialog |
|
15 |
|
16 |
|
17 class PropertiesDialog(QDialog, Ui_PropertiesDialog): |
|
18 """ |
|
19 Class implementing the multi project properties dialog. |
|
20 """ |
|
21 def __init__(self, multiProject, new=True, parent=None): |
|
22 """ |
|
23 Constructor |
|
24 |
|
25 @param multiProject reference to the multi project object |
|
26 @param new flag indicating the generation of a new multi project |
|
27 @param parent parent widget of this dialog (QWidget) |
|
28 """ |
|
29 super(PropertiesDialog, self).__init__(parent) |
|
30 self.setupUi(self) |
|
31 |
|
32 self.multiProject = multiProject |
|
33 self.newMultiProject = new |
|
34 |
|
35 if not new: |
|
36 self.descriptionEdit.setPlainText(self.multiProject.description) |
|
37 |
|
38 def storeData(self): |
|
39 """ |
|
40 Public method to store the entered/modified data. |
|
41 """ |
|
42 self.multiProject.description = self.descriptionEdit.toPlainText() |