--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ProjectPyramid/Documentation/source/Plugin_Project_Pyramid.ProjectPyramid.Project.html Thu Aug 30 14:27:35 2012 +0200 @@ -0,0 +1,569 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' +'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> +<html><head> +<title>Plugin_Project_Pyramid.ProjectPyramid.Project</title> +<style> +body { + background: #EDECE6; + margin: 0em 1em 10em 1em; + color: black; +} + +h1 { color: white; background: #85774A; } +h2 { color: white; background: #85774A; } +h3 { color: white; background: #9D936E; } +h4 { color: white; background: #9D936E; } + +a { color: #BA6D36; } + +</style> +</head> +<body><a NAME="top" ID="top"></a> +<h1>Plugin_Project_Pyramid.ProjectPyramid.Project</h1> +<p> +Module implementing the Pyramid project support. +</p> +<h3>Global Attributes</h3> +<table> +<tr><td>None</td></tr> +</table> +<h3>Classes</h3> +<table> +<tr> +<td><a href="#Project">Project</a></td> +<td>Class implementing the Pyramid project support.</td> +</tr><tr> +<td><a href="#PyramidNoProjectSelectedException">PyramidNoProjectSelectedException</a></td> +<td>Exception thrown to signal, that there is no current Pyramid project.</td> +</tr> +</table> +<h3>Functions</h3> +<table> +<tr><td>None</td></tr> +</table> +<hr /><hr /> +<a NAME="Project" ID="Project"></a> +<h2>Project</h2> +<p> + Class implementing the Pyramid project support. +</p> +<h3>Derived from</h3> +QObject +<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="#Project.__init__">Project</a></td> +<td>Constructor</td> +</tr><tr> +<td><a href="#Project.__buildDistribution">__buildDistribution</a></td> +<td>Private slot to build a distribution file for the current Pyramid project.</td> +</tr><tr> +<td><a href="#Project.__createProject">__createProject</a></td> +<td>Private slot to create a new Pyramid project.</td> +</tr><tr> +<td><a href="#Project.__findProjects">__findProjects</a></td> +<td>Private method to determine the relative path of all Pyramid projects (= top level dirs).</td> +</tr><tr> +<td><a href="#Project.__getInitDbCommand">__getInitDbCommand</a></td> +<td>Private method to create the path to the initialization script.</td> +</tr><tr> +<td><a href="#Project.__getLocale">__getLocale</a></td> +<td>Private method to extract the locale out of a file name.</td> +</tr><tr> +<td><a href="#Project.__getVirtualEnvironment">__getVirtualEnvironment</a></td> +<td>Private method to get the path of the virtual environment.</td> +</tr><tr> +<td><a href="#Project.__initializeDatabase">__initializeDatabase</a></td> +<td>Private slot to initialize the database of the Pyramid project.</td> +</tr><tr> +<td><a href="#Project.__normalizeList">__normalizeList</a></td> +<td>Private method to normalize a list of file names.</td> +</tr><tr> +<td><a href="#Project.__project">__project</a></td> +<td>Private method to get the name of the current Pyramid project.</td> +</tr><tr> +<td><a href="#Project.__projectFilteredList">__projectFilteredList</a></td> +<td>Private method to filter a list of file names by Pyramid project.</td> +</tr><tr> +<td><a href="#Project.__projectLanguageAdded">__projectLanguageAdded</a></td> +<td>Private slot handling the addition of a new language.</td> +</tr><tr> +<td><a href="#Project.__projectPath">__projectPath</a></td> +<td>Private method to calculate the full path of the Pyramid project.</td> +</tr><tr> +<td><a href="#Project.__pyramidInfo">__pyramidInfo</a></td> +<td>Private slot to show some info about Pyramid.</td> +</tr><tr> +<td><a href="#Project.__runBrowser">__runBrowser</a></td> +<td>Private slot to start the default web browser with the server URL.</td> +</tr><tr> +<td><a href="#Project.__runLoggingServer">__runLoggingServer</a></td> +<td>Private slot to start the Pyramid Web server with logging.</td> +</tr><tr> +<td><a href="#Project.__runPythonShell">__runPythonShell</a></td> +<td>Private slot to start a Python console for a Pyramid project.</td> +</tr><tr> +<td><a href="#Project.__runServer">__runServer</a></td> +<td>Private slot to start the Pyramid Web server.</td> +</tr><tr> +<td><a href="#Project.__selectProject">__selectProject</a></td> +<td>Private method to select a Pyramid project to work with.</td> +</tr><tr> +<td><a href="#Project.__serverProcFinished">__serverProcFinished</a></td> +<td>Private slot connected to the finished signal.</td> +</tr><tr> +<td><a href="#Project.__setCurrentProject">__setCurrentProject</a></td> +<td>Private slot to set the current project.</td> +</tr><tr> +<td><a href="#Project.__setupDevelop">__setupDevelop</a></td> +<td>Private slot to set up the development environment for the current project.</td> +</tr><tr> +<td><a href="#Project.__showDocumentation">__showDocumentation</a></td> +<td>Private slot to show the helpviewer with the Pyramid documentation.</td> +</tr><tr> +<td><a href="#Project.__showMatchingViews">__showMatchingViews</a></td> +<td>Private slot showing all views that would match a given URL.</td> +</tr><tr> +<td><a href="#Project.__showRoutes">__showRoutes</a></td> +<td>Private slot showing all URL dispatch routes.</td> +</tr><tr> +<td><a href="#Project.__showTweens">__showTweens</a></td> +<td>Private slot showing all implicit and explicit tween objects.</td> +</tr><tr> +<td><a href="#Project.compileCatalogs">compileCatalogs</a></td> +<td>Public method to compile the message catalogs.</td> +</tr><tr> +<td><a href="#Project.compileSelectedCatalogs">compileSelectedCatalogs</a></td> +<td>Public method to update the message catalogs.</td> +</tr><tr> +<td><a href="#Project.extractMessages">extractMessages</a></td> +<td>Public method to extract the messages catalog template file.</td> +</tr><tr> +<td><a href="#Project.getPyramidCommand">getPyramidCommand</a></td> +<td>Public method to build a Pyramid command.</td> +</tr><tr> +<td><a href="#Project.getPythonCommand">getPythonCommand</a></td> +<td>Public method to build the Python command.</td> +</tr><tr> +<td><a href="#Project.initActions">initActions</a></td> +<td>Public method to define the Pyramid actions.</td> +</tr><tr> +<td><a href="#Project.initMenu">initMenu</a></td> +<td>Public slot to initialize the Pyramid menu.</td> +</tr><tr> +<td><a href="#Project.isSpawningConsole">isSpawningConsole</a></td> +<td>Public method to check, if the given console is a spawning console.</td> +</tr><tr> +<td><a href="#Project.newForm">newForm</a></td> +<td>Public method to create a new form.</td> +</tr><tr> +<td><a href="#Project.projectClosed">projectClosed</a></td> +<td>Public method to handle the closing of a project.</td> +</tr><tr> +<td><a href="#Project.projectClosedHooks">projectClosedHooks</a></td> +<td>Public method to remove our hook methods.</td> +</tr><tr> +<td><a href="#Project.projectOpenedHooks">projectOpenedHooks</a></td> +<td>Public method to add our hook methods.</td> +</tr><tr> +<td><a href="#Project.updateCatalogs">updateCatalogs</a></td> +<td>Public method to update the message catalogs.</td> +</tr><tr> +<td><a href="#Project.updateSelectedCatalogs">updateSelectedCatalogs</a></td> +<td>Public method to update the message catalogs.</td> +</tr> +</table> +<h3>Static Methods</h3> +<table> +<tr><td>None</td></tr> +</table> +<a NAME="Project.__init__" ID="Project.__init__"></a> +<h4>Project (Constructor)</h4> +<b>Project</b>(<i>plugin, parent = None</i>) +<p> + Constructor +</p><dl> +<dt><i>plugin</i></dt> +<dd> +reference to the plugin object +</dd><dt><i>parent</i></dt> +<dd> +parent (QObject) +</dd> +</dl><a NAME="Project.__buildDistribution" ID="Project.__buildDistribution"></a> +<h4>Project.__buildDistribution</h4> +<b>__buildDistribution</b>(<i></i>) +<p> + Private slot to build a distribution file for the current Pyramid project. +</p><a NAME="Project.__createProject" ID="Project.__createProject"></a> +<h4>Project.__createProject</h4> +<b>__createProject</b>(<i></i>) +<p> + Private slot to create a new Pyramid project. +</p><a NAME="Project.__findProjects" ID="Project.__findProjects"></a> +<h4>Project.__findProjects</h4> +<b>__findProjects</b>(<i></i>) +<p> + Private method to determine the relative path of all Pyramid + projects (= top level dirs). +</p><dl> +<dt>Returns:</dt> +<dd> +list of projects (list of string) +</dd> +</dl><a NAME="Project.__getInitDbCommand" ID="Project.__getInitDbCommand"></a> +<h4>Project.__getInitDbCommand</h4> +<b>__getInitDbCommand</b>(<i></i>) +<p> + Private method to create the path to the initialization script. +</p><dl> +<dt>Returns:</dt> +<dd> +path to the initialization script (string) +</dd> +</dl><a NAME="Project.__getLocale" ID="Project.__getLocale"></a> +<h4>Project.__getLocale</h4> +<b>__getLocale</b>(<i>filename</i>) +<p> + Private method to extract the locale out of a file name. +</p><dl> +<dt><i>filename</i></dt> +<dd> +name of the file used for extraction (string) +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +extracted locale (string) or None +</dd> +</dl><a NAME="Project.__getVirtualEnvironment" ID="Project.__getVirtualEnvironment"></a> +<h4>Project.__getVirtualEnvironment</h4> +<b>__getVirtualEnvironment</b>(<i></i>) +<p> + Private method to get the path of the virtual environment. +</p><dl> +<dt>Returns:</dt> +<dd> +path of the virtual environment (string) +</dd> +</dl><a NAME="Project.__initializeDatabase" ID="Project.__initializeDatabase"></a> +<h4>Project.__initializeDatabase</h4> +<b>__initializeDatabase</b>(<i></i>) +<p> + Private slot to initialize the database of the Pyramid project. +</p><a NAME="Project.__normalizeList" ID="Project.__normalizeList"></a> +<h4>Project.__normalizeList</h4> +<b>__normalizeList</b>(<i>filenames</i>) +<p> + Private method to normalize a list of file names. +</p><dl> +<dt><i>filenames</i></dt> +<dd> +list of file names to normalize (list of string) +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +normalized file names (list of string) +</dd> +</dl><a NAME="Project.__project" ID="Project.__project"></a> +<h4>Project.__project</h4> +<b>__project</b>(<i></i>) +<p> + Private method to get the name of the current Pyramid project. +</p><dl> +<dt>Returns:</dt> +<dd> +name of the project (string) +</dd> +</dl><dl> +<dt>Raises <b>PyramidNoProjectSelectedException</b>:</dt> +<dd> +raised, if no project is selected +</dd> +</dl><a NAME="Project.__projectFilteredList" ID="Project.__projectFilteredList"></a> +<h4>Project.__projectFilteredList</h4> +<b>__projectFilteredList</b>(<i>filenames</i>) +<p> + Private method to filter a list of file names by Pyramid project. +</p><dl> +<dt><i>filenames</i></dt> +<dd> +list of file names to be filtered (list of string) +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +file names belonging to the current site (list of string) +</dd> +</dl><a NAME="Project.__projectLanguageAdded" ID="Project.__projectLanguageAdded"></a> +<h4>Project.__projectLanguageAdded</h4> +<b>__projectLanguageAdded</b>(<i>code</i>) +<p> + Private slot handling the addition of a new language. +</p><dl> +<dt><i>code</i></dt> +<dd> +language code of the new language (string) +</dd> +</dl><a NAME="Project.__projectPath" ID="Project.__projectPath"></a> +<h4>Project.__projectPath</h4> +<b>__projectPath</b>(<i></i>) +<p> + Private method to calculate the full path of the Pyramid project. +</p><dl> +<dt>Returns:</dt> +<dd> +path of the project (string) +</dd> +</dl><dl> +<dt>Raises <b>PyramidNoProjectSelectedException</b>:</dt> +<dd> +raised, if no project is selected +</dd> +</dl><a NAME="Project.__pyramidInfo" ID="Project.__pyramidInfo"></a> +<h4>Project.__pyramidInfo</h4> +<b>__pyramidInfo</b>(<i></i>) +<p> + Private slot to show some info about Pyramid. +</p><a NAME="Project.__runBrowser" ID="Project.__runBrowser"></a> +<h4>Project.__runBrowser</h4> +<b>__runBrowser</b>(<i></i>) +<p> + Private slot to start the default web browser with the server URL. +</p><a NAME="Project.__runLoggingServer" ID="Project.__runLoggingServer"></a> +<h4>Project.__runLoggingServer</h4> +<b>__runLoggingServer</b>(<i></i>) +<p> + Private slot to start the Pyramid Web server with logging. +</p><a NAME="Project.__runPythonShell" ID="Project.__runPythonShell"></a> +<h4>Project.__runPythonShell</h4> +<b>__runPythonShell</b>(<i></i>) +<p> + Private slot to start a Python console for a Pyramid project. +</p><a NAME="Project.__runServer" ID="Project.__runServer"></a> +<h4>Project.__runServer</h4> +<b>__runServer</b>(<i>logging = False</i>) +<p> + Private slot to start the Pyramid Web server. +</p><dl> +<dt><i>logging</i></dt> +<dd> +flag indicating to enable logging (boolean) +</dd> +</dl><a NAME="Project.__selectProject" ID="Project.__selectProject"></a> +<h4>Project.__selectProject</h4> +<b>__selectProject</b>(<i></i>) +<p> + Private method to select a Pyramid project to work with. +</p><dl> +<dt>Returns:</dt> +<dd> +selected project (string) +</dd> +</dl><a NAME="Project.__serverProcFinished" ID="Project.__serverProcFinished"></a> +<h4>Project.__serverProcFinished</h4> +<b>__serverProcFinished</b>(<i></i>) +<p> + Private slot connected to the finished signal. +</p><a NAME="Project.__setCurrentProject" ID="Project.__setCurrentProject"></a> +<h4>Project.__setCurrentProject</h4> +<b>__setCurrentProject</b>(<i>project</i>) +<p> + Private slot to set the current project. +</p><dl> +<dt><i>project</i></dt> +<dd> +name of the project (string) +</dd> +</dl><a NAME="Project.__setupDevelop" ID="Project.__setupDevelop"></a> +<h4>Project.__setupDevelop</h4> +<b>__setupDevelop</b>(<i></i>) +<p> + Private slot to set up the development environment for the current project. +</p><a NAME="Project.__showDocumentation" ID="Project.__showDocumentation"></a> +<h4>Project.__showDocumentation</h4> +<b>__showDocumentation</b>(<i></i>) +<p> + Private slot to show the helpviewer with the Pyramid documentation. +</p><a NAME="Project.__showMatchingViews" ID="Project.__showMatchingViews"></a> +<h4>Project.__showMatchingViews</h4> +<b>__showMatchingViews</b>(<i></i>) +<p> + Private slot showing all views that would match a given URL. +</p><a NAME="Project.__showRoutes" ID="Project.__showRoutes"></a> +<h4>Project.__showRoutes</h4> +<b>__showRoutes</b>(<i></i>) +<p> + Private slot showing all URL dispatch routes. +</p><a NAME="Project.__showTweens" ID="Project.__showTweens"></a> +<h4>Project.__showTweens</h4> +<b>__showTweens</b>(<i></i>) +<p> + Private slot showing all implicit and explicit tween objects. +</p><a NAME="Project.compileCatalogs" ID="Project.compileCatalogs"></a> +<h4>Project.compileCatalogs</h4> +<b>compileCatalogs</b>(<i>filenames</i>) +<p> + Public method to compile the message catalogs. +</p><dl> +<dt><i>filenames</i></dt> +<dd> +list of filenames (not used) +</dd> +</dl><a NAME="Project.compileSelectedCatalogs" ID="Project.compileSelectedCatalogs"></a> +<h4>Project.compileSelectedCatalogs</h4> +<b>compileSelectedCatalogs</b>(<i>filenames</i>) +<p> + Public method to update the message catalogs. +</p><dl> +<dt><i>filenames</i></dt> +<dd> +list of file names (list of string) +</dd> +</dl><a NAME="Project.extractMessages" ID="Project.extractMessages"></a> +<h4>Project.extractMessages</h4> +<b>extractMessages</b>(<i></i>) +<p> + Public method to extract the messages catalog template file. +</p><a NAME="Project.getPyramidCommand" ID="Project.getPyramidCommand"></a> +<h4>Project.getPyramidCommand</h4> +<b>getPyramidCommand</b>(<i>cmd</i>) +<p> + Public method to build a Pyramid command. +</p><dl> +<dt><i>cmd</i></dt> +<dd> +command (string) +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +full pyramid command (string) +</dd> +</dl><a NAME="Project.getPythonCommand" ID="Project.getPythonCommand"></a> +<h4>Project.getPythonCommand</h4> +<b>getPythonCommand</b>(<i></i>) +<p> + Public method to build the Python command. +</p><dl> +<dt>Returns:</dt> +<dd> +python command (string) +</dd> +</dl><a NAME="Project.initActions" ID="Project.initActions"></a> +<h4>Project.initActions</h4> +<b>initActions</b>(<i></i>) +<p> + Public method to define the Pyramid actions. +</p><a NAME="Project.initMenu" ID="Project.initMenu"></a> +<h4>Project.initMenu</h4> +<b>initMenu</b>(<i></i>) +<p> + Public slot to initialize the Pyramid menu. +</p><dl> +<dt>Returns:</dt> +<dd> +the menu generated (QMenu) +</dd> +</dl><a NAME="Project.isSpawningConsole" ID="Project.isSpawningConsole"></a> +<h4>Project.isSpawningConsole</h4> +<b>isSpawningConsole</b>(<i>consoleCmd</i>) +<p> + Public method to check, if the given console is a spawning console. +</p><dl> +<dt><i>consoleCmd</i></dt> +<dd> +console command (string) +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +tuple of two entries giving an indication, if the console + is spawning (boolean) and the (possibly) cleaned console command + (string) +</dd> +</dl><a NAME="Project.newForm" ID="Project.newForm"></a> +<h4>Project.newForm</h4> +<b>newForm</b>(<i>path</i>) +<p> + Public method to create a new form. +</p><dl> +<dt><i>path</i></dt> +<dd> +full directory path for the new form file (string) +</dd> +</dl><a NAME="Project.projectClosed" ID="Project.projectClosed"></a> +<h4>Project.projectClosed</h4> +<b>projectClosed</b>(<i></i>) +<p> + Public method to handle the closing of a project. +</p><a NAME="Project.projectClosedHooks" ID="Project.projectClosedHooks"></a> +<h4>Project.projectClosedHooks</h4> +<b>projectClosedHooks</b>(<i></i>) +<p> + Public method to remove our hook methods. +</p><a NAME="Project.projectOpenedHooks" ID="Project.projectOpenedHooks"></a> +<h4>Project.projectOpenedHooks</h4> +<b>projectOpenedHooks</b>(<i></i>) +<p> + Public method to add our hook methods. +</p><a NAME="Project.updateCatalogs" ID="Project.updateCatalogs"></a> +<h4>Project.updateCatalogs</h4> +<b>updateCatalogs</b>(<i>filenames</i>) +<p> + Public method to update the message catalogs. +</p><dl> +<dt><i>filenames</i></dt> +<dd> +list of filenames (not used) +</dd> +</dl><a NAME="Project.updateSelectedCatalogs" ID="Project.updateSelectedCatalogs"></a> +<h4>Project.updateSelectedCatalogs</h4> +<b>updateSelectedCatalogs</b>(<i>filenames</i>) +<p> + Public method to update the message catalogs. +</p><dl> +<dt><i>filenames</i></dt> +<dd> +list of filenames +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> +<a NAME="PyramidNoProjectSelectedException" ID="PyramidNoProjectSelectedException"></a> +<h2>PyramidNoProjectSelectedException</h2> +<p> + Exception thrown to signal, that there is no current Pyramid project. +</p> +<h3>Derived from</h3> +Exception +<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>None</td></tr> +</table> +<h3>Static Methods</h3> +<table> +<tr><td>None</td></tr> +</table> + +<div align="right"><a href="#top">Up</a></div> +<hr /> +</body></html> \ No newline at end of file