Commit 9dbd75a1 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Document SDL API

parent a0fe9fb8
......@@ -5,7 +5,24 @@
This module is a free SDL editor.
It allows to graphically design state machines, using a formal, well-
defined language, and generate Ada code from the models.
Opengeode also offers an API to manipulate the SDL model and diagrams
from other Qt applications
Example of use - to display a statechart independently from the editor
import opengeode
app = opengeode.init_qt() # If you don't already have a QApplication
ast = opengeode.parse(['orchestrator.pr', 'system_structure.pr'])
scene = opengeode.SDL_Scene('statechart')
view = opengeode.SDL_View(scene)
root_ast = ast[0]
proc = root_ast.processes[0]
opengeode.Helper.flatten(proc)
graph = opengeode.Statechart.create_dot_graph(proc)
opengeode.Statechart.render_statechart(scene, graph)
view.refresh()
view.show()
app.exec_()
"""
from opengeode import opengeode, __version__
from opengeode import opengeode, __version__, SDL_Scene, SDL_View, parse, init_qt
......@@ -2,7 +2,7 @@
 
# Resource object code
#
# Created: Wed Nov 26 14:11:57 2014
# Created: Fri Dec 12 17:04:05 2014
# by: The Resource Compiler for PySide (Qt v4.8.6)
#
# WARNING! All changes made in this file will be lost!
......@@ -99,7 +99,7 @@ except ImportError:
LlvmGenerator = None
print 'LLVM is not available'
__all__ = ['opengeode']
__all__ = ['opengeode', 'SDL_Scene', 'SDL_View', 'parse']
__version__ = '1.0RC'
if hasattr(sys, 'frozen'):
......
# $ANTLR 3.1.3 Mar 17, 2009 19:23:44 sdl92.g 2014-11-26 14:12:01
# $ANTLR 3.1.3 Mar 17, 2009 19:23:44 sdl92.g 2014-12-12 17:04:07
import sys
from antlr3 import *
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment