# eric6.Plugins.VcsPlugins.vcsMercurial.QueuesExtension.HgQueuesDefineGuardsDialog

Module implementing a dialog to define guards for patches.

### Global Attributes

None

### Classes

HgQueuesDefineGuardsDialog | Class implementing a dialog to define guards for patches.

### Functions

None

## HgQueuesDefineGuardsDialog

Class implementing a dialog to define guards for patches.

### Derived from

QDialog, Ui_HgQueuesDefineGuardsDialog

### Class Attributes

None

### Class Methods

None

### Methods

HgQueuesDefineGuardsDialog | Constructor
__applyGuards | Private slot to apply the defined guards to the current patch.
__getGuard | Private method to get a reference to a named guard.
closeEvent | Protected slot implementing a close event handler.
on_addButton_clicked | Private slot to add a guard definition to the list or change it.
on_buttonBox_clicked | Private slot called by a button of the button box clicked.
on_guardCombo_editTextChanged | Private slot to handle changes of the text of the guard combo.
on_guardsList_itemSelectionChanged | Private slot to handle changes of the selection of guards.
on_patchSelector_activated | Private slot to get the list of guards defined for the given patch name.
on_removeButton_clicked | Private slot to remove guard definitions from the list.
start | Public slot to start the list command.

### Static Methods

None

#### HgQueuesDefineGuardsDialog (Constructor)

HgQueuesDefineGuardsDialog(vcs, extension, patchesList, parent=None)

Constructor

vcs
  reference to the vcs object
extension
  reference to the extension module (Queues)
patchesList
  list of patches (list of strings)
parent
  reference to the parent widget (QWidget)

#### HgQueuesDefineGuardsDialog.__applyGuards

__applyGuards()

Private slot to apply the defined guards to the current patch.

#### HgQueuesDefineGuardsDialog.__getGuard

__getGuard(guard)

Private method to get a reference to a named guard.

guard
  name of the guard (string)

Returns:
  reference to the guard item (QListWidgetItem)

#### HgQueuesDefineGuardsDialog.closeEvent

closeEvent(e)

Protected slot implementing a close event handler.

e
  close event (QCloseEvent)

#### HgQueuesDefineGuardsDialog.on_addButton_clicked

on_addButton_clicked()

Private slot to add a guard definition to the list or change it.

#### HgQueuesDefineGuardsDialog.on_buttonBox_clicked

on_buttonBox_clicked(button)

Private slot called by a button of the button box clicked.

button
  button that was clicked (QAbstractButton)

#### HgQueuesDefineGuardsDialog.on_guardCombo_editTextChanged

on_guardCombo_editTextChanged(txt)

Private slot to handle changes of the text of the guard combo.

txt
  contents of the guard combo line edit (string)

#### HgQueuesDefineGuardsDialog.on_guardsList_itemSelectionChanged

on_guardsList_itemSelectionChanged()

Private slot to handle changes of the selection of guards.

#### HgQueuesDefineGuardsDialog.on_patchSelector_activated

on_patchSelector_activated(patch)

Private slot to get the list of guards defined for the given patch name.

patch
  selected patch name (empty for current patch)

#### HgQueuesDefineGuardsDialog.on_removeButton_clicked

on_removeButton_clicked()

Private slot to remove guard definitions from the list.

#### HgQueuesDefineGuardsDialog.start

start(path)

Public slot to start the list command.

path
  name of directory to be listed (string)

Up