# eric7.Plugins.VcsPlugins.vcsMercurial.ShelveExtension.HgShelveBrowserDialog

Module implementing Mercurial shelve browser dialog.

### Global Attributes

None

### Classes

HgShelveBrowserDialog | Class implementing Mercurial shelve browser dialog.

### Functions

None

## HgShelveBrowserDialog

Class implementing Mercurial shelve browser dialog.

### Derived from

QWidget, Ui_HgShelveBrowserDialog

### Class Attributes

AgeColumn
MessageColumn
NameColumn

### Class Methods

None

### Methods

HgShelveBrowserDialog | Constructor
__cleanupShelves | Private slot to delete all shelves.
__deleteShelves | Private slot to delete the selected shelves.
__finish | Private slot called when the process finished or the user pressed the button.
__generateShelveEntry | Private method to generate the shelve items.
__getShelveEntries | Private method to retrieve the list of shelves.
__processBuffer | Private method to process the buffered output of the hg shelve command.
__resetUI | Private method to reset the user interface.
__resizeColumnsShelves | Private method to resize the shelve list columns.
__showError | Private slot to show some error.
__unshelve | Private slot to restore the selected shelve of changes.
closeEvent | Protected slot implementing a close event handler.
on_buttonBox_clicked | Private slot called by a button of the button box clicked.
on_refreshButton_clicked | Private slot to refresh the list of shelves.
on_shelveList_currentItemChanged | Private slot called, when the current item of the shelve list changes.
on_shelveList_customContextMenuRequested | Private slot to show the context menu of the shelve list.
show | Public slot to show the dialog.
start | Public slot to start the hg shelve command.

### Static Methods

None

#### HgShelveBrowserDialog (Constructor)

HgShelveBrowserDialog(vcs, parent=None)

Constructor

vcs
  reference to the vcs object
parent
  parent widget (QWidget)

#### HgShelveBrowserDialog.__cleanupShelves

__cleanupShelves()

Private slot to delete all shelves.

#### HgShelveBrowserDialog.__deleteShelves

__deleteShelves()

Private slot to delete the selected shelves.

#### HgShelveBrowserDialog.__finish

__finish()

Private slot called when the process finished or the user pressed the button.

#### HgShelveBrowserDialog.__generateShelveEntry

__generateShelveEntry(name, age, message, fileStatistics, totals)

Private method to generate the shelve items.

name
  name of the shelve (string)
age
  age of the shelve (string)
message
  shelve message (string)
fileStatistics
  per file change statistics (tuple of four strings with file name, number of changes, number of added lines and number of deleted lines)
totals
  overall statistics (tuple of three strings with number of changed files, number of added lines and number of deleted lines)

#### HgShelveBrowserDialog.__getShelveEntries

__getShelveEntries()

Private method to retrieve the list of shelves.

#### HgShelveBrowserDialog.__processBuffer

__processBuffer()

Private method to process the buffered output of the hg shelve command.

#### HgShelveBrowserDialog.__resetUI

__resetUI()

Private method to reset the user interface.

#### HgShelveBrowserDialog.__resizeColumnsShelves

__resizeColumnsShelves()

Private method to resize the shelve list columns.

#### HgShelveBrowserDialog.__showError

__showError(out)

Private slot to show some error.

out
  error to be shown (string)

#### HgShelveBrowserDialog.__unshelve

__unshelve()

Private slot to restore the selected shelve of changes.

#### HgShelveBrowserDialog.closeEvent

closeEvent(e)

Protected slot implementing a close event handler.

e
  close event (QCloseEvent)

#### HgShelveBrowserDialog.on_buttonBox_clicked

on_buttonBox_clicked(button)

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

button
  button that was clicked (QAbstractButton)

#### HgShelveBrowserDialog.on_refreshButton_clicked

on_refreshButton_clicked()

Private slot to refresh the list of shelves.

#### HgShelveBrowserDialog.on_shelveList_currentItemChanged

on_shelveList_currentItemChanged(current, previous)

Private slot called, when the current item of the shelve list changes.

current
  reference to the new current item (QTreeWidgetItem)
previous
  reference to the old current item (QTreeWidgetItem)

#### HgShelveBrowserDialog.on_shelveList_customContextMenuRequested

on_shelveList_customContextMenuRequested(pos)

Private slot to show the context menu of the shelve list.

pos
  position of the mouse pointer (QPoint)

#### HgShelveBrowserDialog.show

show()

Public slot to show the dialog.

#### HgShelveBrowserDialog.start

start()

Public slot to start the hg shelve command.

Up