# eric6.Plugins.VcsPlugins.vcsGit.GitSubmoduleAddDialog

Module implementing a dialog to enter the data to add a submodule.

### Global Attributes

None

### Classes

GitSubmoduleAddDialog | Class implementing a dialog to enter the data to add a submodule.

### Functions

None

## GitSubmoduleAddDialog

Class implementing a dialog to enter the data to add a submodule.

### Derived from

QDialog, Ui_GitSubmoduleAddDialog

### Class Attributes

None

### Class Methods

None

### Methods

GitSubmoduleAddDialog | Constructor
__getRelativePath | Private method to convert a file path to a relative path.
__saveHistory | Private method to save the repository URL history.
getData | Public method to get the entered data.
on_submoduleDirButton_clicked | Private slot to display a directory selection dialog.
on_submoduleUrlButton_clicked | Private slot to display a directory selection dialog.
on_submoduleUrlClearHistoryButton_clicked | Private slot to clear the history of entered repository URLs.
on_submoduleUrlCombo_editTextChanged | Private slot to handle changes of the submodule repository URL.

### Static Methods

None

#### GitSubmoduleAddDialog (Constructor)

GitSubmoduleAddDialog(vcs, repodir, parent=None)

Constructor

vcs (Git)
  reference to the version control object
repodir (str)
  directory containing the superproject
parent (QWidget)
  reference to the parent widget

#### GitSubmoduleAddDialog.__getRelativePath

__getRelativePath(path)

Private method to convert a file path to a relative path.

path (str)
  file or directory name to convert

Returns:
  relative path or unchanged path, if path doesn't belong to the project

Return Type:
  str

#### GitSubmoduleAddDialog.__saveHistory

__saveHistory()

Private method to save the repository URL history.

#### GitSubmoduleAddDialog.getData

getData()

Public method to get the entered data.

Returns:
  tuple containing the repository URL, optional branch name, optional logical name, optional submodule path and a flag indicating to enforce the operation

Return Type:
  tuple of (str, str, str, str, bool)

#### GitSubmoduleAddDialog.on_submoduleDirButton_clicked

on_submoduleDirButton_clicked()

Private slot to display a directory selection dialog.

#### GitSubmoduleAddDialog.on_submoduleUrlButton_clicked

on_submoduleUrlButton_clicked()

Private slot to display a directory selection dialog.

#### GitSubmoduleAddDialog.on_submoduleUrlClearHistoryButton_clicked

on_submoduleUrlClearHistoryButton_clicked()

Private slot to clear the history of entered repository URLs.

#### GitSubmoduleAddDialog.on_submoduleUrlCombo_editTextChanged

on_submoduleUrlCombo_editTextChanged(txt)

Private slot to handle changes of the submodule repository URL.

txt (str)
  current text of the combo box

Up