summaryrefslogtreecommitdiffstats
path: root/doxygen/man/man3/JavascriptInterface.3
blob: 2f487b711ad53c2c1100e34bb916ec1468ec2931 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
.TH "JavascriptInterface" 3 "Wed Nov 9 2011" "ndgui/NetworkDiscovery" \" -*- nroff -*-
.ad l
.nh
.SH NAME
JavascriptInterface \- 
.SH SYNOPSIS
.br
.PP
.PP
\fC#include <javascriptinterface.h>\fP
.SS "Public Slots"

.in +1c
.ti -1c
.RI "void \fBattachToDOM\fP ()"
.br
.ti -1c
.RI "void \fBstartDownload\fP (const QString &filename)"
.br
.ti -1c
.RI "void \fBsetCallbackOnFinished\fP (const QString &function)"
.br
.ti -1c
.RI "const QString \fBgetSysInfo\fP (const QString &info)"
.br
.ti -1c
.RI "void \fBquit\fP ()"
.br
.ti -1c
.RI "void \fBshutDown\fP ()"
.br
.ti -1c
.RI "void \fBreboot\fP ()"
.br
.ti -1c
.RI "void \fBcallbackOnFinished\fP ()"
.br
.ti -1c
.RI "void \fBupdateProgressBar\fP (const int &percent, const double &speed, const QString &unit)"
.br
.ti -1c
.RI "void \fBdownloadInfo\fP (const QString &filename, const double &filesize)"
.br
.ti -1c
.RI "void \fBnotify\fP (const QString &msg)"
.br
.ti -1c
.RI "void \fBtrigger\fP ()"
.br
.in -1c
.SS "Signals"

.in +1c
.ti -1c
.RI "void \fBrequestFile\fP (const QString &filename)"
.br
.ti -1c
.RI "void \fBquitFbgui\fP ()"
.br
.ti -1c
.RI "void \fBshutDownClient\fP ()"
.br
.ti -1c
.RI "void \fBrebootClient\fP ()"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBJavascriptInterface\fP (QWebFrame *parent)"
.br
.ti -1c
.RI "\fB~JavascriptInterface\fP ()"
.br
.in -1c
.SH "Constructor & Destructor Documentation"
.PP 
.SS "JavascriptInterface::JavascriptInterface (QWebFrame *parent)"A constructor.
.PP
\fBParameters:\fP
.RS 4
\fIparent\fP Is of type QWebFrame. 
.RE
.PP

.SS "JavascriptInterface::~JavascriptInterface ()"An empty destructor. 
.SH "Member Function Documentation"
.PP 
.SS "void JavascriptInterface::attachToDOM ()\fC [slot]\fP"Attaches an instance of this class to the DOM of the HTML page.
.PP
Attaches an instance of this class to the DOM of the HTML page. This enables the possibility to call slots/methods of this class in JavaScript functions of HTML page. It also calls the JavascriptInterface::loadJQuery() method.
.PP
\fBSee also:\fP
.RS 4
JavascriptInterface::loadJQuery() 
.RE
.PP

.SS "void JavascriptInterface::callbackOnFinished ()\fC [slot]\fP"Sets a callback function for when downloads are finished (will be called when the queue is empty). 
.SS "void JavascriptInterface::downloadInfo (const QString &filename, const double &filesize)\fC [slot]\fP"This method delivers some informations about the downloading file.
.PP
This method delivers some informations about the downloading file.
.PP
\fBTodo\fP
.RS 4
add some more informations 
.RE
.PP

.SS "const QString JavascriptInterface::getSysInfo (const QString &info)\fC [slot]\fP"This method delivers system informations.
.PP
This method delivers system informations. Type of informations, are defined by the parameter. The output of this method depends on the parameter. Can be called from inside a JavaScript function of the HTML page.
.PP
\fBParameters:\fP
.RS 4
\fIinfoName\fP Is of type QString. Defines which method will be called. Possible values are:
.IP "\(bu" 2
mac
.IP "\(bu" 2
ip
.IP "\(bu" 2
mbserial
.IP "\(bu" 2
usb
.PP
.RE
.PP
\fBReturns:\fP
.RS 4
QString the output of the called method or 'info_error' if an error occurred (e. g. invalid parameter).
.RE
.PP
\fBSee also:\fP
.RS 4
\fBSysInfo::getInfo(const QString& infoName)\fP 
.RE
.PP

.SS "void JavascriptInterface::notify (const QString &msg)\fC [slot]\fP"This method sends out messages to Javascript. A corresponding function must be implemented on the webpage to receive these. 
.SS "void JavascriptInterface::quit ()\fC [slot]\fP"This method quits the whole program.
.PP
This method quits the whole program. Can be called from inside a JavaScript function of the HTML page. Emits \fBJavascriptInterface::quitFbgui()\fP signal 
.SS "void JavascriptInterface::quitFbgui ()\fC [signal]\fP"
.SS "void JavascriptInterface::reboot ()\fC [slot]\fP"This method performs a reboot of the client.
.PP
This method performs a reboot of the client. Emits the \fBJavascriptInterface::rebootClient()\fP signal. It is connected with the fbgui::performReboot() method.
.PP
\fBSee also:\fP
.RS 4
fbgui::performReboot() 
.RE
.PP

.SS "void JavascriptInterface::rebootClient ()\fC [signal]\fP"
.SS "void JavascriptInterface::requestFile (const QString &filename)\fC [signal]\fP"
.SS "void JavascriptInterface::setCallbackOnFinished (const QString &function)\fC [slot]\fP"This method start a download.
.PP
This method start a download. Can be called from inside a JavaScript function of the HTML page.
.PP
\fBTodo\fP
.RS 4
add some more informations 
.RE
.PP

.SS "void JavascriptInterface::shutDown ()\fC [slot]\fP"This method performs a shutdown of the client.
.PP
This method performs a shutdown of the client. Emits the \fBJavascriptInterface::shutDownClient()\fP signal.It is connected with the fbgui::performShutDown() method.
.PP
\fBSee also:\fP
.RS 4
fbgui::performShutDown() 
.RE
.PP

.SS "void JavascriptInterface::shutDownClient ()\fC [signal]\fP"
.SS "void JavascriptInterface::startDownload (const QString &filename)\fC [slot]\fP"This method start a download.
.PP
This method start a download. Can be called from inside a JavaScript function of the HTML page. Emits the JavascriptInterface::requestFile(const QString) signal. 
.SS "void JavascriptInterface::trigger ()\fC [slot]\fP"This method triggers the URL load *FOR DEBUGGING/TESTING PURPOSES* 
.SS "void JavascriptInterface::updateProgressBar (const int &percent, const double &speed, const QString &unit)\fC [slot]\fP"This method updates the progress bar.
.PP
This method calls a Javascript function to update the progress bar of the download. Javascript must have a function called 'updateProgress' to receive this information.
.PP
\fBTodo\fP
.RS 4
add some more informations 
.RE
.PP


.SH "Author"
.PP 
Generated automatically by Doxygen for ndgui/NetworkDiscovery from the source code.