1# -*- coding: utf-8 -*-
2
3# Copyright (c) 2010 - 2021 Detlev Offenbach <detlev@die-offenbachs.de>
4#
5
6"""
7Module implementing a dialog to enter options used to start a project in
8the VCS.
9"""
10
11from PyQt5.QtWidgets import QDialog
12
13from .Ui_HgOptionsDialog import Ui_HgOptionsDialog
14
15
16class HgOptionsDialog(QDialog, Ui_HgOptionsDialog):
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
45