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