Baseclass implementing common functionality for the various browsers.
Methods
|
|
|
|
__init__
|
__init__ (
self,
project,
pdataKey,
parent=None,
)
Constructor
Arguments
- project
- reference to the project object
- pdataKey
- key of the filelist the browser object is handling (string)
- parent
- parent widget of this browser
|
|
addVCSMenu
|
addVCSMenu ( self, menu )
Public method used to add the VCS menu to all project browsers.
Arguments
- menu
- reference to the menu to be amended
|
|
createPopupMenus
|
createPopupMenus ( self )
Private overloaded method to generate the popup menu.
|
|
findItem
|
findItem (
self,
text,
column,
node=None,
)
Reimplemented method
It is used to find a specific item with text in column,
that is a child of node. If node is None, a child of the
QListView is searched.
Arguments
- text
- text to search for (string or QString)
- column
- index of column to search in (int)
- node
- start point of the search
Returns
the found item
|
|
findParentNode
|
findParentNode ( self, fn )
Private method used to find or create the parent node.
Arguments
- fn
- filename to use for the search
Returns
tuple of two values giving the parent node and the shortened filename
|
|
handleNewProject
|
handleNewProject ( self )
Private slot to handle the newProject signal.
|
|
handleProjectClosed
|
handleProjectClosed ( self )
Private slot to handle the projectClosed signal.
|
|
handleProjectOpened
|
handleProjectOpened ( self )
Private slot to handle the projectOpened signal.
|
|
handleShowPopupMenu
|
handleShowPopupMenu ( self, menu )
Slot called before the context menu is shown.
It enables/disables the VCS menu entries depending on the overall
VCS status and the file status.
Arguments
- menu
- reference to the menu to be shown
|
|
handleVCSAdd
|
handleVCSAdd ( self )
Private slot called by the context menu to add the selected file to the VCS repository.
|
|
handleVCSCommit
|
handleVCSCommit ( self )
Private slot called by the context menu to commit the changes to the VCS repository.
|
|
handleVCSDiff
|
handleVCSDiff ( self )
Private slot called by the context menu to show the difference of a file to the repository.
|
|
handleVCSHistory
|
handleVCSHistory ( self )
Private slot called by the context menu to show the history of a file.
|
|
handleVCSLog
|
handleVCSLog ( self )
Private slot called by the context menu to show the VCS log of a file.
|
|
handleVCSRemove
|
handleVCSRemove ( self )
Private slot called by the context menu to remove the selected file from the VCS repository.
|
|
handleVCSStatus
|
handleVCSStatus ( self )
Private slot called by the context menu to show the status of a file.
|
|
handleVCSUpdate
|
handleVCSUpdate ( self )
Private slot called by the context menu to add a file to the VCS repository.
|
|
nodeAdded
|
nodeAdded (
self,
node,
name,
)
Public method used to perform common operations on a new node.
Arguments
- node
- node to work on
- name
- filename belonging to this node
|
|
populateTree
|
populateTree ( self )
Private method used to populate the listview.
|
|
removeNode
|
removeNode ( self, node )
Private method to remove a parent (dir) node, if it doesn't have any children.
Arguments
- node
- node to remove
|
|
updateVCSStatus
|
updateVCSStatus (
self,
node,
name,
)
Private method used to set the vcs status of a node.
Arguments
- node
- node to work on
- name
- filename belonging to this node
|