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