src/eric7/Documentation/Source/eric7.Project.ProjectBrowserModel.html

Wed, 20 Dec 2023 19:28:22 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 20 Dec 2023 19:28:22 +0100
branch
eric7
changeset 10430
e440aaf179ce
parent 10399
48014775ad31
child 10472
3aecfec97f7c
permissions
-rw-r--r--

Converted some source code documentation to the new style.

<!DOCTYPE html>
<html><head>
<title>eric7.Project.ProjectBrowserModel</title>
<meta charset="UTF-8">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<a NAME="top" ID="top"></a>
<h1>eric7.Project.ProjectBrowserModel</h1>

<p>
Module implementing the browser model.
</p>
<h3>Global Attributes</h3>

<table>
<tr><td>ProjectBrowserItemDirectory</td></tr><tr><td>ProjectBrowserItemFile</td></tr><tr><td>ProjectBrowserItemSimpleDirectory</td></tr>
</table>
<h3>Classes</h3>

<table>

<tr>
<td><a href="#ProjectBrowserDirectoryItem">ProjectBrowserDirectoryItem</a></td>
<td>Class implementing the data structure for project browser directory items.</td>
</tr>
<tr>
<td><a href="#ProjectBrowserFileItem">ProjectBrowserFileItem</a></td>
<td>Class implementing the data structure for project browser file items.</td>
</tr>
<tr>
<td><a href="#ProjectBrowserItemMixin">ProjectBrowserItemMixin</a></td>
<td>Class implementing common methods of project browser items.</td>
</tr>
<tr>
<td><a href="#ProjectBrowserModel">ProjectBrowserModel</a></td>
<td>Class implementing the project browser model.</td>
</tr>
<tr>
<td><a href="#ProjectBrowserSimpleDirectoryItem">ProjectBrowserSimpleDirectoryItem</a></td>
<td>Class implementing the data structure for project browser simple directory items.</td>
</tr>
</table>
<h3>Functions</h3>

<table>
<tr><td>None</td></tr>
</table>
<hr />
<hr />
<a NAME="ProjectBrowserDirectoryItem" ID="ProjectBrowserDirectoryItem"></a>
<h2>ProjectBrowserDirectoryItem</h2>

<p>
    Class implementing the data structure for project browser directory items.
</p>
<h3>Derived from</h3>
BrowserDirectoryItem, ProjectBrowserItemMixin
<h3>Class Attributes</h3>

<table>
<tr><td>None</td></tr>
</table>
<h3>Class Methods</h3>

<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>

<table>

<tr>
<td><a href="#ProjectBrowserDirectoryItem.__init__">ProjectBrowserDirectoryItem</a></td>
<td>Constructor</td>
</tr>
</table>
<h3>Static Methods</h3>

<table>
<tr><td>None</td></tr>
</table>

<a NAME="ProjectBrowserDirectoryItem.__init__" ID="ProjectBrowserDirectoryItem.__init__"></a>
<h4>ProjectBrowserDirectoryItem (Constructor)</h4>
<b>ProjectBrowserDirectoryItem</b>(<i>parent, dinfo, projectType, full=True, bold=False</i>)

<p>
        Constructor
</p>
<dl>

<dt><i>parent</i> (BrowserItem)</dt>
<dd>
parent item
</dd>
<dt><i>dinfo</i> (str)</dt>
<dd>
dinfo is the string for the directory
</dd>
<dt><i>projectType</i> (str)</dt>
<dd>
type of file/directory in the project
</dd>
<dt><i>full</i> (bool)</dt>
<dd>
flag indicating full pathname should be displayed
</dd>
<dt><i>bold</i> (bool)</dt>
<dd>
flag indicating a highlighted font
</dd>
</dl>
<div align="right"><a href="#top">Up</a></div>
<hr />
<hr />
<a NAME="ProjectBrowserFileItem" ID="ProjectBrowserFileItem"></a>
<h2>ProjectBrowserFileItem</h2>

<p>
    Class implementing the data structure for project browser file items.
</p>
<h3>Derived from</h3>
BrowserFileItem, ProjectBrowserItemMixin
<h3>Class Attributes</h3>

<table>
<tr><td>None</td></tr>
</table>
<h3>Class Methods</h3>

<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>

<table>

<tr>
<td><a href="#ProjectBrowserFileItem.__init__">ProjectBrowserFileItem</a></td>
<td>Constructor</td>
</tr>
</table>
<h3>Static Methods</h3>

<table>
<tr><td>None</td></tr>
</table>

<a NAME="ProjectBrowserFileItem.__init__" ID="ProjectBrowserFileItem.__init__"></a>
<h4>ProjectBrowserFileItem (Constructor)</h4>
<b>ProjectBrowserFileItem</b>(<i>parent, finfo, projectType, full=True, bold=False, sourceLanguage=""</i>)

<p>
        Constructor
</p>
<dl>

<dt><i>parent</i> (BrowserItem)</dt>
<dd>
parent item
</dd>
<dt><i>finfo</i> (str)</dt>
<dd>
the string for the file
</dd>
<dt><i>projectType</i> (str)</dt>
<dd>
type of file/directory in the project
</dd>
<dt><i>full</i> (bool)</dt>
<dd>
flag indicating full pathname should be displayed
</dd>
<dt><i>bold</i> (bool)</dt>
<dd>
flag indicating a highlighted font
</dd>
<dt><i>sourceLanguage</i> (str)</dt>
<dd>
source code language of the project
</dd>
</dl>
<div align="right"><a href="#top">Up</a></div>
<hr />
<hr />
<a NAME="ProjectBrowserItemMixin" ID="ProjectBrowserItemMixin"></a>
<h2>ProjectBrowserItemMixin</h2>

<p>
    Class implementing common methods of project browser items.
</p>
<p>
    It is meant to be used as a mixin class.
</p>
<h3>Derived from</h3>
None
<h3>Class Attributes</h3>

<table>
<tr><td>None</td></tr>
</table>
<h3>Class Methods</h3>

<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>

<table>

<tr>
<td><a href="#ProjectBrowserItemMixin.__init__">ProjectBrowserItemMixin</a></td>
<td>Constructor</td>
</tr>
<tr>
<td><a href="#ProjectBrowserItemMixin.addProjectType">addProjectType</a></td>
<td>Public method to add a type to the list.</td>
</tr>
<tr>
<td><a href="#ProjectBrowserItemMixin.addVcsStatus">addVcsStatus</a></td>
<td>Public method to add the VCS status.</td>
</tr>
<tr>
<td><a href="#ProjectBrowserItemMixin.getProjectTypes">getProjectTypes</a></td>
<td>Public method to get the project type.</td>
</tr>
<tr>
<td><a href="#ProjectBrowserItemMixin.getTextColor">getTextColor</a></td>
<td>Public method to get the items text color.</td>
</tr>
<tr>
<td><a href="#ProjectBrowserItemMixin.setVcsState">setVcsState</a></td>
<td>Public method to set the items VCS state.</td>
</tr>
<tr>
<td><a href="#ProjectBrowserItemMixin.setVcsStatus">setVcsStatus</a></td>
<td>Public method to set the VCS status.</td>
</tr>
</table>
<h3>Static Methods</h3>

<table>
<tr><td>None</td></tr>
</table>

<a NAME="ProjectBrowserItemMixin.__init__" ID="ProjectBrowserItemMixin.__init__"></a>
<h4>ProjectBrowserItemMixin (Constructor)</h4>
<b>ProjectBrowserItemMixin</b>(<i>type_, bold=False</i>)

<p>
        Constructor
</p>
<dl>

<dt><i>type_</i> (str)</dt>
<dd>
type of file/directory in the project
</dd>
<dt><i>bold</i> (bool)</dt>
<dd>
flag indicating a highlighted font
</dd>
</dl>
<a NAME="ProjectBrowserItemMixin.addProjectType" ID="ProjectBrowserItemMixin.addProjectType"></a>
<h4>ProjectBrowserItemMixin.addProjectType</h4>
<b>addProjectType</b>(<i>type_</i>)

<p>
        Public method to add a type to the list.
</p>
<dl>

<dt><i>type_</i> (str)</dt>
<dd>
type to add to the list
</dd>
</dl>
<a NAME="ProjectBrowserItemMixin.addVcsStatus" ID="ProjectBrowserItemMixin.addVcsStatus"></a>
<h4>ProjectBrowserItemMixin.addVcsStatus</h4>
<b>addVcsStatus</b>(<i>vcsStatus</i>)

<p>
        Public method to add the VCS status.
</p>
<dl>

<dt><i>vcsStatus</i> (str)</dt>
<dd>
VCS status text
</dd>
</dl>
<a NAME="ProjectBrowserItemMixin.getProjectTypes" ID="ProjectBrowserItemMixin.getProjectTypes"></a>
<h4>ProjectBrowserItemMixin.getProjectTypes</h4>
<b>getProjectTypes</b>(<i></i>)

<p>
        Public method to get the project type.
</p>
<dl>
<dt>Return:</dt>
<dd>
project type
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
str
</dd>
</dl>
<a NAME="ProjectBrowserItemMixin.getTextColor" ID="ProjectBrowserItemMixin.getTextColor"></a>
<h4>ProjectBrowserItemMixin.getTextColor</h4>
<b>getTextColor</b>(<i></i>)

<p>
        Public method to get the items text color.
</p>
<dl>
<dt>Return:</dt>
<dd>
text color
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
QColor
</dd>
</dl>
<a NAME="ProjectBrowserItemMixin.setVcsState" ID="ProjectBrowserItemMixin.setVcsState"></a>
<h4>ProjectBrowserItemMixin.setVcsState</h4>
<b>setVcsState</b>(<i>state</i>)

<p>
        Public method to set the items VCS state.
</p>
<dl>

<dt><i>state</i> (str)</dt>
<dd>
VCS state (one of A, C, M, U or " ")
</dd>
</dl>
<a NAME="ProjectBrowserItemMixin.setVcsStatus" ID="ProjectBrowserItemMixin.setVcsStatus"></a>
<h4>ProjectBrowserItemMixin.setVcsStatus</h4>
<b>setVcsStatus</b>(<i>vcsStatus</i>)

<p>
        Public method to set the VCS status.
</p>
<dl>

<dt><i>vcsStatus</i> (str)</dt>
<dd>
VCS status text
</dd>
</dl>
<div align="right"><a href="#top">Up</a></div>
<hr />
<hr />
<a NAME="ProjectBrowserModel" ID="ProjectBrowserModel"></a>
<h2>ProjectBrowserModel</h2>

<p>
    Class implementing the project browser model.
</p>
<h3>Signals</h3>
<dl>

<dt>vcsStateChanged(str)</dt>
<dd>
emitted after the VCS state has changed
</dd>
</dl>
<h3>Derived from</h3>
BrowserModel
<h3>Class Attributes</h3>

<table>
<tr><td>None</td></tr>
</table>
<h3>Class Methods</h3>

<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>

<table>

<tr>
<td><a href="#ProjectBrowserModel.__init__">ProjectBrowserModel</a></td>
<td>Constructor</td>
</tr>
<tr>
<td><a href="#ProjectBrowserModel.__addVCSStatus">__addVCSStatus</a></td>
<td>Private method used to set the vcs status of a node.</td>
</tr>
<tr>
<td><a href="#ProjectBrowserModel.__changeParentsVCSState">__changeParentsVCSState</a></td>
<td>Private method to recursively change the parents VCS state.</td>
</tr>
<tr>
<td><a href="#ProjectBrowserModel.__updateVCSStatus">__updateVCSStatus</a></td>
<td>Private method used to update the vcs status of a node.</td>
</tr>
<tr>
<td><a href="#ProjectBrowserModel.addNewItem">addNewItem</a></td>
<td>Public method to add a new item to the model.</td>
</tr>
<tr>
<td><a href="#ProjectBrowserModel.changeVCSStates">changeVCSStates</a></td>
<td>Public slot to record the (non normal) VCS states.</td>
</tr>
<tr>
<td><a href="#ProjectBrowserModel.data">data</a></td>
<td>Public method to get data of an item.</td>
</tr>
<tr>
<td><a href="#ProjectBrowserModel.directoryChanged">directoryChanged</a></td>
<td>Public slot to handle the directoryChanged signal of the watcher.</td>
</tr>
<tr>
<td><a href="#ProjectBrowserModel.findChildItem">findChildItem</a></td>
<td>Public method to find a child item given some text.</td>
</tr>
<tr>
<td><a href="#ProjectBrowserModel.findItem">findItem</a></td>
<td>Public method to find an item given its name.</td>
</tr>
<tr>
<td><a href="#ProjectBrowserModel.findParentItemByName">findParentItemByName</a></td>
<td>Public method to find an item given its name.</td>
</tr>
<tr>
<td><a href="#ProjectBrowserModel.itemIndexByName">itemIndexByName</a></td>
<td>Public method to find an item's index given its name.</td>
</tr>
<tr>
<td><a href="#ProjectBrowserModel.itemIndexByNameAndLine">itemIndexByNameAndLine</a></td>
<td>Public method to find an item's index given its name.</td>
</tr>
<tr>
<td><a href="#ProjectBrowserModel.populateItem">populateItem</a></td>
<td>Public method to populate an item's subtree.</td>
</tr>
<tr>
<td><a href="#ProjectBrowserModel.populateProjectDirectoryItem">populateProjectDirectoryItem</a></td>
<td>Public method to populate a directory item's subtree.</td>
</tr>
<tr>
<td><a href="#ProjectBrowserModel.preferencesChanged">preferencesChanged</a></td>
<td>Public method used to handle a change in preferences.</td>
</tr>
<tr>
<td><a href="#ProjectBrowserModel.projectClosed">projectClosed</a></td>
<td>Public method called after a project has been closed.</td>
</tr>
<tr>
<td><a href="#ProjectBrowserModel.projectOpened">projectOpened</a></td>
<td>Public method used to populate the model after a project has been opened.</td>
</tr>
<tr>
<td><a href="#ProjectBrowserModel.projectPropertiesChanged">projectPropertiesChanged</a></td>
<td>Public method to react on a change of the project properties.</td>
</tr>
<tr>
<td><a href="#ProjectBrowserModel.removeItem">removeItem</a></td>
<td>Public method to remove a named item.</td>
</tr>
<tr>
<td><a href="#ProjectBrowserModel.renameItem">renameItem</a></td>
<td>Public method to rename an item.</td>
</tr>
<tr>
<td><a href="#ProjectBrowserModel.repopulateItem">repopulateItem</a></td>
<td>Public method to repopulate an item.</td>
</tr>
<tr>
<td><a href="#ProjectBrowserModel.setProjectBrowserReference">setProjectBrowserReference</a></td>
<td>Public method to set a reference to the project browser instance.</td>
</tr>
<tr>
<td><a href="#ProjectBrowserModel.startFileSystemMonitoring">startFileSystemMonitoring</a></td>
<td>Public method to (re)start monitoring the project file system.</td>
</tr>
<tr>
<td><a href="#ProjectBrowserModel.stopFileSystemMonitoring">stopFileSystemMonitoring</a></td>
<td>Public method to stop monitoring the project file system.</td>
</tr>
<tr>
<td><a href="#ProjectBrowserModel.updateVCSStatus">updateVCSStatus</a></td>
<td>Public method used to update the vcs status of a node.</td>
</tr>
</table>
<h3>Static Methods</h3>

<table>
<tr><td>None</td></tr>
</table>

<a NAME="ProjectBrowserModel.__init__" ID="ProjectBrowserModel.__init__"></a>
<h4>ProjectBrowserModel (Constructor)</h4>
<b>ProjectBrowserModel</b>(<i>parent</i>)

<p>
        Constructor
</p>
<dl>

<dt><i>parent</i> (Project.Project)</dt>
<dd>
reference to parent object
</dd>
</dl>
<a NAME="ProjectBrowserModel.__addVCSStatus" ID="ProjectBrowserModel.__addVCSStatus"></a>
<h4>ProjectBrowserModel.__addVCSStatus</h4>
<b>__addVCSStatus</b>(<i>item, name</i>)

<p>
        Private method used to set the vcs status of a node.
</p>
<dl>

<dt><i>item</i> (BrowserItem)</dt>
<dd>
item to work on
</dd>
<dt><i>name</i> (str)</dt>
<dd>
filename belonging to this item
</dd>
</dl>
<a NAME="ProjectBrowserModel.__changeParentsVCSState" ID="ProjectBrowserModel.__changeParentsVCSState"></a>
<h4>ProjectBrowserModel.__changeParentsVCSState</h4>
<b>__changeParentsVCSState</b>(<i>path, itemCache</i>)

<p>
        Private method to recursively change the parents VCS state.
</p>
<dl>

<dt><i>path</i> (str)</dt>
<dd>
pathname of parent item
</dd>
<dt><i>itemCache</i> (dict)</dt>
<dd>
reference to the item cache used to store
            references to named items
</dd>
</dl>
<a NAME="ProjectBrowserModel.__updateVCSStatus" ID="ProjectBrowserModel.__updateVCSStatus"></a>
<h4>ProjectBrowserModel.__updateVCSStatus</h4>
<b>__updateVCSStatus</b>(<i>item, name, recursive=True</i>)

<p>
        Private method used to update the vcs status of a node.
</p>
<dl>

<dt><i>item</i> (BrowserItem)</dt>
<dd>
item to work on
</dd>
<dt><i>name</i> (str)</dt>
<dd>
filename belonging to this item
</dd>
<dt><i>recursive</i> (bool)</dt>
<dd>
flag indicating a recursive update
</dd>
</dl>
<a NAME="ProjectBrowserModel.addNewItem" ID="ProjectBrowserModel.addNewItem"></a>
<h4>ProjectBrowserModel.addNewItem</h4>
<b>addNewItem</b>(<i>typeString, name, additionalTypeStrings=None</i>)

<p>
        Public method to add a new item to the model.
</p>
<dl>

<dt><i>typeString</i> (str)</dt>
<dd>
string denoting the type of the new item
</dd>
<dt><i>name</i> (str)</dt>
<dd>
name of the new item
</dd>
<dt><i>additionalTypeStrings</i> (list of str)</dt>
<dd>
names of additional types
</dd>
</dl>
<a NAME="ProjectBrowserModel.changeVCSStates" ID="ProjectBrowserModel.changeVCSStates"></a>
<h4>ProjectBrowserModel.changeVCSStates</h4>
<b>changeVCSStates</b>(<i>statesList</i>)

<p>
        Public slot to record the (non normal) VCS states.
</p>
<dl>

<dt><i>statesList</i> (list of str)</dt>
<dd>
list of VCS state entries giving the states in the
            first column and the path relative to the project directory starting
            with the third column. The allowed status flags are:
            <ul>
                <li>"A" path was added but not yet comitted</li>
                <li>"M" path has local changes</li>
                <li>"O" path was removed</li>
                <li>"R" path was deleted and then re-added</li>
                <li>"U" path needs an update</li>
                <li>"Z" path contains a conflict</li>
                <li>" " path is back at normal</li>
            </ul>
</dd>
</dl>
<a NAME="ProjectBrowserModel.data" ID="ProjectBrowserModel.data"></a>
<h4>ProjectBrowserModel.data</h4>
<b>data</b>(<i>index, role</i>)

<p>
        Public method to get data of an item.
</p>
<dl>

<dt><i>index</i> (QModelIndex)</dt>
<dd>
index of the data to retrieve
</dd>
<dt><i>role</i> (Qt.ItemDataRole)</dt>
<dd>
role of data
</dd>
</dl>
<dl>
<dt>Return:</dt>
<dd>
requested data
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
Any
</dd>
</dl>
<a NAME="ProjectBrowserModel.directoryChanged" ID="ProjectBrowserModel.directoryChanged"></a>
<h4>ProjectBrowserModel.directoryChanged</h4>
<b>directoryChanged</b>(<i>path</i>)

<p>
        Public slot to handle the directoryChanged signal of the watcher.
</p>
<dl>

<dt><i>path</i> (str)</dt>
<dd>
path of the directory
</dd>
</dl>
<a NAME="ProjectBrowserModel.findChildItem" ID="ProjectBrowserModel.findChildItem"></a>
<h4>ProjectBrowserModel.findChildItem</h4>
<b>findChildItem</b>(<i>text, column, parentItem=None</i>)

<p>
        Public method to find a child item given some text.
</p>
<dl>

<dt><i>text</i> (str)</dt>
<dd>
text to search for
</dd>
<dt><i>column</i> (int)</dt>
<dd>
column to search in
</dd>
<dt><i>parentItem</i> (BrowserItem)</dt>
<dd>
reference to parent item
</dd>
</dl>
<dl>
<dt>Return:</dt>
<dd>
reference to the item found
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
BrowserItem
</dd>
</dl>
<a NAME="ProjectBrowserModel.findItem" ID="ProjectBrowserModel.findItem"></a>
<h4>ProjectBrowserModel.findItem</h4>
<b>findItem</b>(<i>name</i>)

<p>
        Public method to find an item given its name.
</p>
<dl>

<dt><i>name</i> (str)</dt>
<dd>
name of the item
</dd>
</dl>
<dl>
<dt>Return:</dt>
<dd>
reference to the item found
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
BrowserItem
</dd>
</dl>
<a NAME="ProjectBrowserModel.findParentItemByName" ID="ProjectBrowserModel.findParentItemByName"></a>
<h4>ProjectBrowserModel.findParentItemByName</h4>
<b>findParentItemByName</b>(<i>type_, name, dontSplit=False</i>)

<p>
        Public method to find an item given its name.
</p>
<p>
        <b>Note</b>: This method creates all necessary parent items, if they
        don't exist.
</p>
<dl>

<dt><i>type_</i> (str)</dt>
<dd>
type of the item
</dd>
<dt><i>name</i> (str)</dt>
<dd>
name of the item
</dd>
<dt><i>dontSplit</i> (bool)</dt>
<dd>
flag indicating the name should not be split
</dd>
</dl>
<dl>
<dt>Return:</dt>
<dd>
reference to the item found and the new display name
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
str
</dd>
</dl>
<a NAME="ProjectBrowserModel.itemIndexByName" ID="ProjectBrowserModel.itemIndexByName"></a>
<h4>ProjectBrowserModel.itemIndexByName</h4>
<b>itemIndexByName</b>(<i>name</i>)

<p>
        Public method to find an item's index given its name.
</p>
<dl>

<dt><i>name</i> (str)</dt>
<dd>
name of the item
</dd>
</dl>
<dl>
<dt>Return:</dt>
<dd>
index of the item found
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
QModelIndex
</dd>
</dl>
<a NAME="ProjectBrowserModel.itemIndexByNameAndLine" ID="ProjectBrowserModel.itemIndexByNameAndLine"></a>
<h4>ProjectBrowserModel.itemIndexByNameAndLine</h4>
<b>itemIndexByNameAndLine</b>(<i>name, lineno</i>)

<p>
        Public method to find an item's index given its name.
</p>
<dl>

<dt><i>name</i> (str)</dt>
<dd>
name of the item
</dd>
<dt><i>lineno</i> (int)</dt>
<dd>
one based line number of the item
</dd>
</dl>
<dl>
<dt>Return:</dt>
<dd>
index of the item found
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
QModelIndex
</dd>
</dl>
<a NAME="ProjectBrowserModel.populateItem" ID="ProjectBrowserModel.populateItem"></a>
<h4>ProjectBrowserModel.populateItem</h4>
<b>populateItem</b>(<i>parentItem, repopulate=False</i>)

<p>
        Public method to populate an item's subtree.
</p>
<dl>

<dt><i>parentItem</i> (BrowserItem)</dt>
<dd>
reference to the item to be populated
</dd>
<dt><i>repopulate</i> (bool)</dt>
<dd>
flag indicating a repopulation
</dd>
</dl>
<a NAME="ProjectBrowserModel.populateProjectDirectoryItem" ID="ProjectBrowserModel.populateProjectDirectoryItem"></a>
<h4>ProjectBrowserModel.populateProjectDirectoryItem</h4>
<b>populateProjectDirectoryItem</b>(<i>parentItem, repopulate=False</i>)

<p>
        Public method to populate a directory item's subtree.
</p>
<dl>

<dt><i>parentItem</i> (BrowserItem)</dt>
<dd>
reference to the directory item to be populated
</dd>
<dt><i>repopulate</i> (bool)</dt>
<dd>
flag indicating a repopulation
</dd>
</dl>
<a NAME="ProjectBrowserModel.preferencesChanged" ID="ProjectBrowserModel.preferencesChanged"></a>
<h4>ProjectBrowserModel.preferencesChanged</h4>
<b>preferencesChanged</b>(<i></i>)

<p>
        Public method used to handle a change in preferences.
</p>
<a NAME="ProjectBrowserModel.projectClosed" ID="ProjectBrowserModel.projectClosed"></a>
<h4>ProjectBrowserModel.projectClosed</h4>
<b>projectClosed</b>(<i></i>)

<p>
        Public method called after a project has been closed.
</p>
<a NAME="ProjectBrowserModel.projectOpened" ID="ProjectBrowserModel.projectOpened"></a>
<h4>ProjectBrowserModel.projectOpened</h4>
<b>projectOpened</b>(<i></i>)

<p>
        Public method used to populate the model after a project has been
        opened.
</p>
<a NAME="ProjectBrowserModel.projectPropertiesChanged" ID="ProjectBrowserModel.projectPropertiesChanged"></a>
<h4>ProjectBrowserModel.projectPropertiesChanged</h4>
<b>projectPropertiesChanged</b>(<i></i>)

<p>
        Public method to react on a change of the project properties.
</p>
<a NAME="ProjectBrowserModel.removeItem" ID="ProjectBrowserModel.removeItem"></a>
<h4>ProjectBrowserModel.removeItem</h4>
<b>removeItem</b>(<i>name</i>)

<p>
        Public method to remove a named item.
</p>
<dl>

<dt><i>name</i> (str)</dt>
<dd>
file or directory name of the item
</dd>
</dl>
<a NAME="ProjectBrowserModel.renameItem" ID="ProjectBrowserModel.renameItem"></a>
<h4>ProjectBrowserModel.renameItem</h4>
<b>renameItem</b>(<i>name, newFilename</i>)

<p>
        Public method to rename an item.
</p>
<dl>

<dt><i>name</i> (str)</dt>
<dd>
the old display name
</dd>
<dt><i>newFilename</i> (str)</dt>
<dd>
new filename of the item
</dd>
</dl>
<a NAME="ProjectBrowserModel.repopulateItem" ID="ProjectBrowserModel.repopulateItem"></a>
<h4>ProjectBrowserModel.repopulateItem</h4>
<b>repopulateItem</b>(<i>name</i>)

<p>
        Public method to repopulate an item.
</p>
<dl>

<dt><i>name</i> (str)</dt>
<dd>
name of the file relative to the project root
</dd>
</dl>
<a NAME="ProjectBrowserModel.setProjectBrowserReference" ID="ProjectBrowserModel.setProjectBrowserReference"></a>
<h4>ProjectBrowserModel.setProjectBrowserReference</h4>
<b>setProjectBrowserReference</b>(<i>projectBrowser</i>)

<p>
        Public method to set a reference to the project browser instance.
</p>
<dl>

<dt><i>projectBrowser</i> (ProjectBrowser)</dt>
<dd>
reference to the project browser instance
</dd>
</dl>
<a NAME="ProjectBrowserModel.startFileSystemMonitoring" ID="ProjectBrowserModel.startFileSystemMonitoring"></a>
<h4>ProjectBrowserModel.startFileSystemMonitoring</h4>
<b>startFileSystemMonitoring</b>(<i></i>)

<p>
        Public method to (re)start monitoring the project file system.
</p>
<a NAME="ProjectBrowserModel.stopFileSystemMonitoring" ID="ProjectBrowserModel.stopFileSystemMonitoring"></a>
<h4>ProjectBrowserModel.stopFileSystemMonitoring</h4>
<b>stopFileSystemMonitoring</b>(<i></i>)

<p>
        Public method to stop monitoring the project file system.
</p>
<a NAME="ProjectBrowserModel.updateVCSStatus" ID="ProjectBrowserModel.updateVCSStatus"></a>
<h4>ProjectBrowserModel.updateVCSStatus</h4>
<b>updateVCSStatus</b>(<i>name, recursive=True</i>)

<p>
        Public method used to update the vcs status of a node.
</p>
<dl>

<dt><i>name</i> (str)</dt>
<dd>
filename belonging to this item
</dd>
<dt><i>recursive</i> (bool)</dt>
<dd>
flag indicating a recursive update
</dd>
</dl>
<div align="right"><a href="#top">Up</a></div>
<hr />
<hr />
<a NAME="ProjectBrowserSimpleDirectoryItem" ID="ProjectBrowserSimpleDirectoryItem"></a>
<h2>ProjectBrowserSimpleDirectoryItem</h2>

<p>
    Class implementing the data structure for project browser simple directory
    items.
</p>
<h3>Derived from</h3>
BrowserSimpleDirectoryItem, ProjectBrowserItemMixin
<h3>Class Attributes</h3>

<table>
<tr><td>None</td></tr>
</table>
<h3>Class Methods</h3>

<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>

<table>

<tr>
<td><a href="#ProjectBrowserSimpleDirectoryItem.__init__">ProjectBrowserSimpleDirectoryItem</a></td>
<td>Constructor</td>
</tr>
</table>
<h3>Static Methods</h3>

<table>
<tr><td>None</td></tr>
</table>

<a NAME="ProjectBrowserSimpleDirectoryItem.__init__" ID="ProjectBrowserSimpleDirectoryItem.__init__"></a>
<h4>ProjectBrowserSimpleDirectoryItem (Constructor)</h4>
<b>ProjectBrowserSimpleDirectoryItem</b>(<i>parent, projectType, text, path=""</i>)

<p>
        Constructor
</p>
<dl>

<dt><i>parent</i> (BrowserItem)</dt>
<dd>
parent item
</dd>
<dt><i>projectType</i> (str)</dt>
<dd>
type of file/directory in the project
</dd>
<dt><i>text</i> (str)</dt>
<dd>
text to be displayed
</dd>
<dt><i>path</i> (str)</dt>
<dd>
path of the directory
</dd>
</dl>
<div align="right"><a href="#top">Up</a></div>
<hr />
</body></html>

eric ide

mercurial