src/eric7/Plugins/VcsPlugins/vcsMercurial/HgNewProjectOptionsDialog.py

branch
eric7
changeset 10438
4cd7e5a8b3cf
parent 9653
e67609152c5e
child 10439
21c28b0f9e41
equal deleted inserted replaced
10437:2f70ca07f0af 10438:4cd7e5a8b3cf
29 def __init__(self, vcs, parent=None): 29 def __init__(self, vcs, parent=None):
30 """ 30 """
31 Constructor 31 Constructor
32 32
33 @param vcs reference to the version control object 33 @param vcs reference to the version control object
34 @param parent parent widget (QWidget) 34 @type Hg
35 @param parent parent widget
36 @type QWidget
35 """ 37 """
36 super().__init__(parent) 38 super().__init__(parent)
37 self.setupUi(self) 39 self.setupUi(self)
38 40
39 self.vcsProjectDirPicker.setMode(EricPathPickerModes.DIRECTORY_MODE) 41 self.vcsProjectDirPicker.setMode(EricPathPickerModes.DIRECTORY_MODE)
68 @pyqtSlot(str) 70 @pyqtSlot(str)
69 def on_vcsProjectDirPicker_textChanged(self, txt): 71 def on_vcsProjectDirPicker_textChanged(self, txt):
70 """ 72 """
71 Private slot to handle a change of the project directory. 73 Private slot to handle a change of the project directory.
72 74
73 @param txt name of the project directory (string) 75 @param txt name of the project directory
76 @type str
74 """ 77 """
75 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled( 78 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(
76 bool(txt) 79 bool(txt)
77 and FileSystemUtilities.fromNativeSeparators(txt) not in self.__initPaths 80 and FileSystemUtilities.fromNativeSeparators(txt) not in self.__initPaths
78 ) 81 )
80 @pyqtSlot(str) 83 @pyqtSlot(str)
81 def on_vcsUrlPicker_textChanged(self, txt): 84 def on_vcsUrlPicker_textChanged(self, txt):
82 """ 85 """
83 Private slot to handle changes of the URL. 86 Private slot to handle changes of the URL.
84 87
85 @param txt current text of the line edit (string) 88 @param txt current text of the line edit
89 @type str
86 """ 90 """
87 url = QUrl.fromUserInput(txt) 91 url = QUrl.fromUserInput(txt)
88 enable = url.isValid() and url.scheme() in ConfigHgSchemes 92 enable = url.isValid() and url.scheme() in ConfigHgSchemes
89 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(enable) 93 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(enable)
90 94
104 def getData(self): 108 def getData(self):
105 """ 109 """
106 Public slot to retrieve the data entered into the dialog and to 110 Public slot to retrieve the data entered into the dialog and to
107 save the history of entered repository URLs. 111 save the history of entered repository URLs.
108 112
109 @return a tuple of a string (project directory) and a dictionary 113 @return tuple containing the project directory and a dictionary
110 containing the data entered. 114 containing the data entered
115 @rtype tuple of (str, dict)
111 """ 116 """
112 self.__saveHistory() 117 self.__saveHistory()
113 118
114 url = QUrl.fromUserInput(self.vcsUrlPicker.text().replace("\\", "/")) 119 url = QUrl.fromUserInput(self.vcsUrlPicker.text().replace("\\", "/"))
115 vcsdatadict = { 120 vcsdatadict = {

eric ide

mercurial