|
1 # -*- coding: utf-8 -*- |
|
2 |
|
3 # Copyright (c) 2014 - 2021 Detlev Offenbach <detlev@die-offenbachs.de> |
|
4 # |
|
5 |
|
6 """ |
|
7 Module implementing a dialog to enter options used to start a project in |
|
8 the VCS. |
|
9 """ |
|
10 |
|
11 from PyQt5.QtWidgets import QDialog |
|
12 |
|
13 from .Ui_GitOptionsDialog import Ui_GitOptionsDialog |
|
14 |
|
15 |
|
16 class GitOptionsDialog(QDialog, Ui_GitOptionsDialog): |
|
17 """ |
|
18 Class implementing a dialog to enter options used to start a project in the |
|
19 repository. |
|
20 """ |
|
21 def __init__(self, vcs, project, parent=None): |
|
22 """ |
|
23 Constructor |
|
24 |
|
25 @param vcs reference to the version control object |
|
26 @param project reference to the project object |
|
27 @param parent parent widget (QWidget) |
|
28 """ |
|
29 super().__init__(parent) |
|
30 self.setupUi(self) |
|
31 |
|
32 msh = self.minimumSizeHint() |
|
33 self.resize(max(self.width(), msh.width()), msh.height()) |
|
34 |
|
35 def getData(self): |
|
36 """ |
|
37 Public slot to retrieve the data entered into the dialog. |
|
38 |
|
39 @return a dictionary containing the data entered |
|
40 """ |
|
41 vcsdatadict = { |
|
42 "message": self.vcsLogEdit.text(), |
|
43 } |
|
44 return vcsdatadict |