summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuergen Bocklage-Ryannel <juergen.bocklage-ryannel@pelagicore.com>2017-02-12 09:16:12 +0100
committerJuergen Bocklage-Ryannel <juergen.bocklage-ryannel@pelagicore.com>2017-02-12 09:16:12 +0100
commita41d19e8bdc9e12c7f1f637f6e2923d5abbd3909 (patch)
treecd2b2d26767369fa0f1938989e6c4006e8162db2
parentb47657af5ef6fa87f850fcd48b106be4ecffaced (diff)
downloadqtivi-qface-a41d19e8bdc9e12c7f1f637f6e2923d5abbd3909.tar.gz
Updated the documentation for the new watch and shell module
-rw-r--r--docs/api.rst11
-rw-r--r--docs/qtcpp.rst2
-rw-r--r--qface/shell.py7
-rw-r--r--qface/watch.py5
4 files changed, 21 insertions, 4 deletions
diff --git a/docs/api.rst b/docs/api.rst
index e200730..a9a0d16 100644
--- a/docs/api.rst
+++ b/docs/api.rst
@@ -97,14 +97,21 @@ Struct Related Classes
Base Classes
------------
-.. autoclass:: qface.idl.domain.Symbol
+.. autoclass:: qface.idl.domain.NamedElement
:members:
:show-inheritance:
-.. autoclass:: qface.idl.domain.TypedSymbol
+.. autoclass:: qface.idl.domain.Symbol
:members:
:show-inheritance:
.. autoclass:: qface.idl.domain.TypeSymbol
:members:
:show-inheritance:
+
+Utility Modules
+---------------
+
+.. autofunction:: qface.watch.monitor
+
+.. autofunction:: qface.shell.sh
diff --git a/docs/qtcpp.rst b/docs/qtcpp.rst
index 5178eac..b475ffd 100644
--- a/docs/qtcpp.rst
+++ b/docs/qtcpp.rst
@@ -68,7 +68,7 @@ Code Generation
For each module the generator creates the qmake project files, the plugin code to register the types. A module singleton which contains the enums and factory functions for creating the structures. The structure has no signals and the values are copied over.
-.. code-block:: yml
+.. code-block:: yaml
for each module:
- qmldir
diff --git a/qface/shell.py b/qface/shell.py
index 5496923..3d34d89 100644
--- a/qface/shell.py
+++ b/qface/shell.py
@@ -1,8 +1,15 @@
import click
from subprocess import call
+"""
+API for interacting with the system shell
+"""
+
def sh(cmd, **kwargs):
+ """
+ runs the given cmd as shell command
+ """
if not cmd:
return
click.echo('$ {0}'.format(cmd))
diff --git a/qface/watch.py b/qface/watch.py
index 18fe5f9..4a8512f 100644
--- a/qface/watch.py
+++ b/qface/watch.py
@@ -5,6 +5,9 @@ from path import Path
import time
from .shell import sh
+"""
+Provides an API to monitor the file system
+"""
class RunScriptChangeHandler(FileSystemEventHandler):
def __init__(self, argv):
@@ -26,7 +29,7 @@ class RunScriptChangeHandler(FileSystemEventHandler):
def monitor(src, argv):
"""
- reloads the script when src files changes
+ reloads the script given by argv when src files changes
"""
script = Path(argv[0]).expand().abspath()
src = src if isinstance(src, (list, tuple)) else [src]