Skip to content

Commit a74956f

Browse files
committed
Update document
1 parent 0fef3f0 commit a74956f

26 files changed

+1088
-302
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
build
44
.idea
55
gradle
6+
.DS_Store

docs/_sources/en/howtostart.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,10 @@ Programming Guide
2020
* `Programming Guide <http://wiki.qpython.org/doc/program_guide/>`_
2121
* `QPython Hackers Howto <http://wiki.qpython.org/en/diveinto/>`_
2222
* `QEditor <http://wiki.qpython.org/en/QEdit/>`_
23+
24+
.. toctree::
25+
:maxdepth: 2
26+
27+
qeditor4web
28+
sl4aapis
29+

docs/_sources/en/qeditor4web.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Programming from phone/tablet
2+
===================================
3+
4+
How to programming from browser
5+
===================================

docs/_sources/en/sl4aapis.txt

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
SL4A APIs
2+
=============
3+
4+
.. image:: ../_static/sl4a.jpg
5+
6+
To simplify QPython SL4A development in IDEs with a
7+
"hepler" class derived from the default Android class containing
8+
SL4A facade functions & API documentation
9+
10+
11+
Structure
12+
------------
13+
14+
15+
QPython NFC json result
16+
::
17+
18+
{
19+
"role": <role>, # could be self/master/slave
20+
"stat": <stat>, # could be ok / fail / cancl
21+
"message": <message get>
22+
}
23+
24+
QPy APIs
25+
----------
26+
27+
.. py:function:: AndroidHelper.executeQPy(script)
28+
29+
Execute a qpython script by absolute path
30+
31+
:param str script: The absolute path of the qpython script
32+
:return: boolean
33+
34+
35+
NFC APIs
36+
------------
37+
NFC Message Beam APIs
38+
39+
.. py:function:: AndroidHelper.dialogCreateNFCBeamMaster()
40+
41+
Create a dialog which can send the message to NFC Beam Slave
42+
43+
:return: QPython NFC json result
44+
45+
.. py:function:: AndroidHelper.NFCBeamMessage(message)
46+
47+
Sendthe message to NFC Beam Slave without dialog
48+
49+
:return: QPython NFC json result
50+
51+
52+
.. py:function:: AndroidHelper.dialogCreateNFCBeamSlave()
53+
54+
Create a NFC Beam Slave to wait for the master's beam message
55+
56+
:return: QPython NFC json result
57+
58+
59+
Location API
60+
------------
61+
62+
.. py:function:: androidhelper.getLastKnownLocation
63+
64+
65+
::
66+
67+
Droid = androidhelper.Android()
68+
location = Droid.getLastKnownLocation().result
69+
location = location.get('network', location.get('gps'))
70+
71+
Sensor API
72+
------------
73+
74+
.. py:function:: androidhelper.sensorsReadOrientation()
75+
76+
::
77+
78+
Droid = androidhelper.Android()
79+
Droid.startSensingTimed(1, 250)
80+
sensor = Droid.sensorsReadOrientation().result
81+
Droid.stopSensing()
82+
83+
Other SL4A APIs
84+
----------------
85+
86+
.. py:function:: AndroidHelper.dialogCreateSpinnerProgress(title,message,maximum progress)
87+
88+
Create a spinner progress dialog
89+
90+
.. py:function:: AndroidHelper.webViewShow(url,wait)
91+
92+
Display a WebView with the given URL.
93+
94+
:param str url: URL
95+
:param boolean wait(Optional): block until the user exits the WebView

docs/_sources/index.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Do you want to contribute to QPython ? Please `email us <mailto:support@qpython.
5353
QPython/QPython3 的最新版本1.3.2(QPython), 1.0.2(QPython3) 已经发布,它包含了许多惊艳的特性,请从应用市场安装
5454

5555

56-
QPython 起步
56+
QPython 起步
5757
------------------------
5858
.. toctree::
5959
:maxdepth: 2

docs/_sources/zh/howtostart.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
如何开始
22
=========
33

4+
45
* `QPython - 使用说明 <http://wiki.qpython.org/zh/doc/how-to-start>`_
56
* `QPython - 快速开始 <http://wiki.qpython.org/zh/quick-start>`_
67
* `“你好,世界!” <http://wiki.qpython.org/zh/doc/hello-world>`_

docs/en/howtostart.html

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434

3535
<link rel="top" title="QPython 0.9 documentation" href="../index.html"/>
36-
<link rel="next" title="如何开始" href="../zh/howtostart.html"/>
36+
<link rel="next" title="Programming from phone/tablet" href="qeditor4web.html"/>
3737
<link rel="prev" title="Welcome to read the QPython guide!" href="../index.html"/>
3838

3939

@@ -90,7 +90,12 @@
9090
<ul class="current">
9191
<li class="toctree-l1 current"><a class="current reference internal" href="#">How to start</a></li>
9292
<li class="toctree-l1"><a class="reference internal" href="#web-app">Web App</a></li>
93-
<li class="toctree-l1"><a class="reference internal" href="#programming-guide">Programming Guide</a></li>
93+
<li class="toctree-l1"><a class="reference internal" href="#programming-guide">Programming Guide</a><ul>
94+
<li class="toctree-l2"><a class="reference internal" href="qeditor4web.html">Programming from phone/tablet</a></li>
95+
<li class="toctree-l2"><a class="reference internal" href="qeditor4web.html#how-to-programming-from-browser">How to programming from browser</a></li>
96+
<li class="toctree-l2"><a class="reference internal" href="sl4aapis.html">SL4A APIs</a></li>
97+
</ul>
98+
</li>
9499
</ul>
95100
<ul>
96101
<li class="toctree-l1"><a class="reference internal" href="../zh/howtostart.html">如何开始</a></li>
@@ -181,6 +186,21 @@ <h1>Programming Guide<a class="headerlink" href="#programming-guide" title="Perm
181186
<li><a class="reference external" href="http://wiki.qpython.org/en/diveinto/">QPython Hackers Howto</a></li>
182187
<li><a class="reference external" href="http://wiki.qpython.org/en/QEdit/">QEditor</a></li>
183188
</ul>
189+
<div class="toctree-wrapper compound">
190+
<ul>
191+
<li class="toctree-l1"><a class="reference internal" href="qeditor4web.html">Programming from phone/tablet</a></li>
192+
<li class="toctree-l1"><a class="reference internal" href="qeditor4web.html#how-to-programming-from-browser">How to programming from browser</a></li>
193+
<li class="toctree-l1"><a class="reference internal" href="sl4aapis.html">SL4A APIs</a><ul>
194+
<li class="toctree-l2"><a class="reference internal" href="sl4aapis.html#structure">Structure</a></li>
195+
<li class="toctree-l2"><a class="reference internal" href="sl4aapis.html#qpy-apis">QPy APIs</a></li>
196+
<li class="toctree-l2"><a class="reference internal" href="sl4aapis.html#nfc-apis">NFC APIs</a></li>
197+
<li class="toctree-l2"><a class="reference internal" href="sl4aapis.html#location-api">Location API</a></li>
198+
<li class="toctree-l2"><a class="reference internal" href="sl4aapis.html#sensor-api">Sensor API</a></li>
199+
<li class="toctree-l2"><a class="reference internal" href="sl4aapis.html#other-sl4a-apis">Other SL4A APIs</a></li>
200+
</ul>
201+
</li>
202+
</ul>
203+
</div>
184204
</div>
185205

186206

@@ -193,7 +213,7 @@ <h1>Programming Guide<a class="headerlink" href="#programming-guide" title="Perm
193213

194214
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
195215

196-
<a href="../zh/howtostart.html" class="btn btn-neutral float-right" title="如何开始" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
216+
<a href="qeditor4web.html" class="btn btn-neutral float-right" title="Programming from phone/tablet" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
197217

198218

199219
<a href="../index.html" class="btn btn-neutral" title="Welcome to read the QPython guide!" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
Lines changed: 29 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<meta name="viewport" content="width=device-width, initial-scale=1.0">
1010

11-
<title>How to start &mdash; QPython 0.9 documentation</title>
11+
<title>Programming from phone/tablet &mdash; QPython 0.9 documentation</title>
1212

1313

1414

@@ -26,18 +26,19 @@
2626

2727

2828

29-
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
29+
<link rel="stylesheet" href="../static/css/theme.css" type="text/css" />
3030

3131

3232

3333

3434

3535
<link rel="top" title="QPython 0.9 documentation" href="../index.html"/>
36-
<link rel="next" title="如何开始" href="../zh/howtostart.html"/>
37-
<link rel="prev" title="Welcome to read the QPython guide!" href="../index.html"/>
36+
<link rel="up" title="How to start" href="howtostart.html"/>
37+
<link rel="next" title="SL4A APIs" href="sl4aapis.html"/>
38+
<link rel="prev" title="How to start" href="howtostart.html"/>
3839

3940

40-
<script src="../_static/js/modernizr.min.js"></script>
41+
<script src="../static/js/modernizr.min.js"></script>
4142

4243
</head>
4344

@@ -88,9 +89,14 @@
8889

8990

9091
<ul class="current">
91-
<li class="toctree-l1 current"><a class="current reference internal" href="#">How to start</a></li>
92-
<li class="toctree-l1"><a class="reference internal" href="#web-app">Web App</a></li>
93-
<li class="toctree-l1"><a class="reference internal" href="#programming-guide">Programming Guide</a></li>
92+
<li class="toctree-l1"><a class="reference internal" href="howtostart.html">How to start</a></li>
93+
<li class="toctree-l1"><a class="reference internal" href="howtostart.html#web-app">Web App</a></li>
94+
<li class="toctree-l1 current"><a class="reference internal" href="howtostart.html#programming-guide">Programming Guide</a><ul class="current">
95+
<li class="toctree-l2 current"><a class="current reference internal" href="#">Programming from phone/tablet</a></li>
96+
<li class="toctree-l2"><a class="reference internal" href="#how-to-programming-from-browser">How to programming from browser</a></li>
97+
<li class="toctree-l2"><a class="reference internal" href="sl4aapis.html">SL4A APIs</a></li>
98+
</ul>
99+
</li>
94100
</ul>
95101
<ul>
96102
<li class="toctree-l1"><a class="reference internal" href="../zh/howtostart.html">如何开始</a></li>
@@ -140,13 +146,15 @@
140146

141147
<li><a href="../index.html">Docs</a> &raquo;</li>
142148

143-
<li>How to start</li>
149+
<li><a href="howtostart.html">How to start</a> &raquo;</li>
150+
151+
<li>Programming from phone/tablet</li>
144152

145153

146154
<li class="wy-breadcrumbs-aside">
147155

148156

149-
<a href="../_sources/en/howtostart.txt" rel="nofollow"> View page source</a>
157+
<a href="../_sources/en/qeditor4web.txt" rel="nofollow"> View page source</a>
150158

151159

152160
</li>
@@ -159,28 +167,11 @@
159167
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
160168
<div itemprop="articleBody">
161169

162-
<div class="section" id="how-to-start">
163-
<h1>How to start<a class="headerlink" href="#how-to-start" title="Permalink to this headline">¶</a></h1>
164-
<ul class="simple">
165-
<li><a class="reference external" href="http://wiki.qpython.org/doc/how-to-start">QPython: How To Start</a></li>
166-
<li><a class="reference external" href="http://wiki.qpython.org/doc/quick-start">QPython - Quick Start</a></li>
167-
<li><a class="reference external" href="http://wiki.qpython.org/doc/hello-world">Writing &#8220;Hello World&#8221;</a></li>
168-
</ul>
170+
<div class="section" id="programming-from-phone-tablet">
171+
<h1>Programming from phone/tablet<a class="headerlink" href="#programming-from-phone-tablet" title="Permalink to this headline"></a></h1>
169172
</div>
170-
<div class="section" id="web-app">
171-
<h1>Web App<a class="headerlink" href="#web-app" title="Permalink to this headline">¶</a></h1>
172-
<ul class="simple">
173-
<li><a class="reference external" href="http://wiki.qpython.org/en/webapp/">QPython Web App</a></li>
174-
<li><a class="reference external" href="http://wiki.qpython.org/en/webapp/sample">Develop a WEB APP with QPython</a></li>
175-
</ul>
176-
</div>
177-
<div class="section" id="programming-guide">
178-
<h1>Programming Guide<a class="headerlink" href="#programming-guide" title="Permalink to this headline">¶</a></h1>
179-
<ul class="simple">
180-
<li><a class="reference external" href="http://wiki.qpython.org/doc/program_guide/">Programming Guide</a></li>
181-
<li><a class="reference external" href="http://wiki.qpython.org/en/diveinto/">QPython Hackers Howto</a></li>
182-
<li><a class="reference external" href="http://wiki.qpython.org/en/QEdit/">QEditor</a></li>
183-
</ul>
173+
<div class="section" id="how-to-programming-from-browser">
174+
<h1>How to programming from browser<a class="headerlink" href="#how-to-programming-from-browser" title="Permalink to this headline"></a></h1>
184175
</div>
185176

186177

@@ -193,10 +184,10 @@ <h1>Programming Guide<a class="headerlink" href="#programming-guide" title="Perm
193184

194185
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
195186

196-
<a href="../zh/howtostart.html" class="btn btn-neutral float-right" title="如何开始" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
187+
<a href="sl4aapis.html" class="btn btn-neutral float-right" title="SL4A APIs" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
197188

198189

199-
<a href="../index.html" class="btn btn-neutral" title="Welcome to read the QPython guide!" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
190+
<a href="howtostart.html" class="btn btn-neutral" title="How to start" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
200191

201192
</div>
202193

@@ -234,15 +225,15 @@ <h1>Programming Guide<a class="headerlink" href="#programming-guide" title="Perm
234225
SOURCELINK_SUFFIX: ''
235226
};
236227
</script>
237-
<script type="text/javascript" src="../_static/jquery.js"></script>
238-
<script type="text/javascript" src="../_static/underscore.js"></script>
239-
<script type="text/javascript" src="../_static/doctools.js"></script>
228+
<script type="text/javascript" src="../static/jquery.js"></script>
229+
<script type="text/javascript" src="../static/underscore.js"></script>
230+
<script type="text/javascript" src="../static/doctools.js"></script>
240231

241232

242233

243234

244235

245-
<script type="text/javascript" src="../_static/js/theme.js"></script>
236+
<script type="text/javascript" src="../static/js/theme.js"></script>
246237

247238

248239

@@ -255,4 +246,4 @@ <h1>Programming Guide<a class="headerlink" href="#programming-guide" title="Perm
255246

256247

257248
</body>
258-
</html>
249+
</html>

0 commit comments

Comments
 (0)