# eric6.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.
__procFinished | Private slot connected to the finished signal.
__processBuffer | Private method to process the buffered output of the hg shelve command.
__readStderr | Private slot to handle the readyReadStandardError signal.
__readStdout | Private slot to handle the readyReadStandardOutput signal.
__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.
keyPressEvent | Protected slot to handle a key press event.
on_buttonBox_clicked | Private slot called by a button of the button box clicked.
on_input_returnPressed | Private slot to handle the press of the return key in the input field.
on_passwordCheckBox_toggled | Private slot to handle the password checkbox toggled.
on_refreshButton_clicked | Private slot to refresh the list of shelves.
on_sendButton_clicked | Private slot to send the input to the mercurial process.
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.__procFinished

__procFinished(exitCode, exitStatus)

Private slot connected to the finished signal.

exitCode
  exit code of the process (integer)
exitStatus
  exit status of the process (QProcess.ExitStatus)

#### HgShelveBrowserDialog.__processBuffer

__processBuffer()

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

#### HgShelveBrowserDialog.__readStderr

__readStderr()

Private slot to handle the readyReadStandardError signal.

It reads the error output of the process and inserts it into the error pane.

#### HgShelveBrowserDialog.__readStdout

__readStdout()

Private slot to handle the readyReadStandardOutput signal.

It reads the output of the process and inserts it into a buffer.

#### 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.keyPressEvent

keyPressEvent(evt)

Protected slot to handle a key press event.

evt
  the key press event (QKeyEvent)

#### 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_input_returnPressed

on_input_returnPressed()

Private slot to handle the press of the return key in the input field.

#### HgShelveBrowserDialog.on_passwordCheckBox_toggled

on_passwordCheckBox_toggled(isOn)

Private slot to handle the password checkbox toggled.

isOn
  flag indicating the status of the check box (boolean)

#### HgShelveBrowserDialog.on_refreshButton_clicked

on_refreshButton_clicked()

Private slot to refresh the list of shelves.

#### HgShelveBrowserDialog.on_sendButton_clicked

on_sendButton_clicked()

Private slot to send the input to the mercurial process.

#### 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(projectDir)

Public slot to start the hg shelve command.

projectDir
  name of the project directory (string)

Up