\hypertarget{class_javascript_interface}{
\section{JavascriptInterface Class Reference}
\label{class_javascript_interface}\index{JavascriptInterface@{JavascriptInterface}}
}


{\ttfamily \#include $<$javascriptinterface.h$>$}

\subsection*{Public Slots}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{class_javascript_interface_a31a97a62ca25da9282892c5aa498b988}{attachToDOM} ()
\item 
void \hyperlink{class_javascript_interface_a1c694b7dea80043f98492aa79011cef8}{startDownload} (const QString \&filename)
\item 
void \hyperlink{class_javascript_interface_a191733bdc7c0a52263ee2e4512078d60}{setCallbackOnFinished} (const QString \&function)
\item 
const QString \hyperlink{class_javascript_interface_a2d230282a975bf0a6e52ca0abb3699f5}{getSysInfo} (const QString \&info)
\item 
void \hyperlink{class_javascript_interface_a6d7549013046231a486c32935a7e5199}{quit} ()
\item 
void \hyperlink{class_javascript_interface_a5c641761dee8bd022a22da1cedf00e72}{shutDown} ()
\item 
void \hyperlink{class_javascript_interface_acbc3154b7f9559fa70140f6eed83c55b}{reboot} ()
\item 
void \hyperlink{class_javascript_interface_a7080fe5a88242cad71aa6b6c30e3d452}{callbackOnFinished} ()
\item 
void \hyperlink{class_javascript_interface_aca4e27242499abf22f6f38e69ba98bf0}{updateProgressBar} (const int \&percent, const double \&speed, const QString \&unit)
\item 
void \hyperlink{class_javascript_interface_a153e4b79fd6709ea2e3e844f06cf1c98}{downloadInfo} (const QString \&filename, const double \&filesize)
\item 
void \hyperlink{class_javascript_interface_a664939fd000ac0b342841dfff8640466}{notify} (const QString \&msg)
\item 
void \hyperlink{class_javascript_interface_a89ad0da59f6494aacd62a18be21dd780}{trigger} ()
\end{DoxyCompactItemize}
\subsection*{Signals}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{class_javascript_interface_a3c7025b29fb18de496ca0cef211ef17b}{requestFile} (const QString \&filename)
\item 
void \hyperlink{class_javascript_interface_a7d14cbe58b36a24620428b1b6daa6ee4}{quitFbgui} ()
\item 
void \hyperlink{class_javascript_interface_a16dbd5474d3a356a1e92bdf9b6c6f519}{shutDownClient} ()
\item 
void \hyperlink{class_javascript_interface_a76c7813e3c89fb841d6f3bb1c38479f6}{rebootClient} ()
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_javascript_interface_acbfd4c0a48c944f2eca15ca02517f503}{JavascriptInterface} (QWebFrame $\ast$parent)
\item 
\hyperlink{class_javascript_interface_a1dfae69ba64e8c279ce57949ba92ef0c}{$\sim$JavascriptInterface} ()
\end{DoxyCompactItemize}


\subsection{Constructor \& Destructor Documentation}
\hypertarget{class_javascript_interface_acbfd4c0a48c944f2eca15ca02517f503}{
\index{JavascriptInterface@{JavascriptInterface}!JavascriptInterface@{JavascriptInterface}}
\index{JavascriptInterface@{JavascriptInterface}!JavascriptInterface@{JavascriptInterface}}
\subsubsection[{JavascriptInterface}]{\setlength{\rightskip}{0pt plus 5cm}JavascriptInterface::JavascriptInterface (
\begin{DoxyParamCaption}
\item[{QWebFrame $\ast$}]{parent}
\end{DoxyParamCaption}
)}}
\label{class_javascript_interface_acbfd4c0a48c944f2eca15ca02517f503}
A constructor.


\begin{DoxyParams}{Parameters}
{\em parent} & Is of type QWebFrame. \\
\hline
\end{DoxyParams}
\hypertarget{class_javascript_interface_a1dfae69ba64e8c279ce57949ba92ef0c}{
\index{JavascriptInterface@{JavascriptInterface}!$\sim$JavascriptInterface@{$\sim$JavascriptInterface}}
\index{$\sim$JavascriptInterface@{$\sim$JavascriptInterface}!JavascriptInterface@{JavascriptInterface}}
\subsubsection[{$\sim$JavascriptInterface}]{\setlength{\rightskip}{0pt plus 5cm}JavascriptInterface::$\sim$JavascriptInterface (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_javascript_interface_a1dfae69ba64e8c279ce57949ba92ef0c}
An empty destructor. 

\subsection{Member Function Documentation}
\hypertarget{class_javascript_interface_a31a97a62ca25da9282892c5aa498b988}{
\index{JavascriptInterface@{JavascriptInterface}!attachToDOM@{attachToDOM}}
\index{attachToDOM@{attachToDOM}!JavascriptInterface@{JavascriptInterface}}
\subsubsection[{attachToDOM}]{\setlength{\rightskip}{0pt plus 5cm}void JavascriptInterface::attachToDOM (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}slot\mbox{]}}}}
\label{class_javascript_interface_a31a97a62ca25da9282892c5aa498b988}
Attaches an instance of this class to the DOM of the HTML page.

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.

\begin{DoxySeeAlso}{See also}
JavascriptInterface::loadJQuery() 
\end{DoxySeeAlso}
\hypertarget{class_javascript_interface_a7080fe5a88242cad71aa6b6c30e3d452}{
\index{JavascriptInterface@{JavascriptInterface}!callbackOnFinished@{callbackOnFinished}}
\index{callbackOnFinished@{callbackOnFinished}!JavascriptInterface@{JavascriptInterface}}
\subsubsection[{callbackOnFinished}]{\setlength{\rightskip}{0pt plus 5cm}void JavascriptInterface::callbackOnFinished (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}slot\mbox{]}}}}
\label{class_javascript_interface_a7080fe5a88242cad71aa6b6c30e3d452}
Sets a callback function for when downloads are finished (will be called when the queue is empty). \hypertarget{class_javascript_interface_a153e4b79fd6709ea2e3e844f06cf1c98}{
\index{JavascriptInterface@{JavascriptInterface}!downloadInfo@{downloadInfo}}
\index{downloadInfo@{downloadInfo}!JavascriptInterface@{JavascriptInterface}}
\subsubsection[{downloadInfo}]{\setlength{\rightskip}{0pt plus 5cm}void JavascriptInterface::downloadInfo (
\begin{DoxyParamCaption}
\item[{const QString \&}]{filename, }
\item[{const double \&}]{filesize}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}slot\mbox{]}}}}
\label{class_javascript_interface_a153e4b79fd6709ea2e3e844f06cf1c98}
This method delivers some informations about the downloading file.

This method delivers some informations about the downloading file.

\begin{Desc}
\item[\hyperlink{todo__todo000002}{Todo}]add some more informations \end{Desc}
\hypertarget{class_javascript_interface_a2d230282a975bf0a6e52ca0abb3699f5}{
\index{JavascriptInterface@{JavascriptInterface}!getSysInfo@{getSysInfo}}
\index{getSysInfo@{getSysInfo}!JavascriptInterface@{JavascriptInterface}}
\subsubsection[{getSysInfo}]{\setlength{\rightskip}{0pt plus 5cm}const QString JavascriptInterface::getSysInfo (
\begin{DoxyParamCaption}
\item[{const QString \&}]{info}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}slot\mbox{]}}}}
\label{class_javascript_interface_a2d230282a975bf0a6e52ca0abb3699f5}
This method delivers system informations.

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.


\begin{DoxyParams}{Parameters}
{\em infoName} & Is of type QString. Defines which method will be called. Possible values are:
\begin{DoxyItemize}
\item mac
\item ip
\item mbserial
\item usb
\end{DoxyItemize}\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
QString the output of the called method or \char`\"{}info\_\-error\char`\"{} if an error occurred (e. g. invalid parameter).
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\hyperlink{class_sys_info_a0309806bf95c06b6744cbd367a038ccb}{SysInfo::getInfo(const QString\& infoName)} 
\end{DoxySeeAlso}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=356pt]{class_javascript_interface_a2d230282a975bf0a6e52ca0abb3699f5_cgraph}
\end{center}
\end{figure}


\hypertarget{class_javascript_interface_a664939fd000ac0b342841dfff8640466}{
\index{JavascriptInterface@{JavascriptInterface}!notify@{notify}}
\index{notify@{notify}!JavascriptInterface@{JavascriptInterface}}
\subsubsection[{notify}]{\setlength{\rightskip}{0pt plus 5cm}void JavascriptInterface::notify (
\begin{DoxyParamCaption}
\item[{const QString \&}]{msg}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}slot\mbox{]}}}}
\label{class_javascript_interface_a664939fd000ac0b342841dfff8640466}
This method sends out messages to Javascript. A corresponding function must be implemented on the webpage to receive these. \hypertarget{class_javascript_interface_a6d7549013046231a486c32935a7e5199}{
\index{JavascriptInterface@{JavascriptInterface}!quit@{quit}}
\index{quit@{quit}!JavascriptInterface@{JavascriptInterface}}
\subsubsection[{quit}]{\setlength{\rightskip}{0pt plus 5cm}void JavascriptInterface::quit (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}slot\mbox{]}}}}
\label{class_javascript_interface_a6d7549013046231a486c32935a7e5199}
This method quits the whole program.

This method quits the whole program. Can be called from inside a JavaScript function of the HTML page. Emits \hyperlink{class_javascript_interface_a7d14cbe58b36a24620428b1b6daa6ee4}{JavascriptInterface::quitFbgui()} signal 

Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=384pt]{class_javascript_interface_a6d7549013046231a486c32935a7e5199_cgraph}
\end{center}
\end{figure}


\hypertarget{class_javascript_interface_a7d14cbe58b36a24620428b1b6daa6ee4}{
\index{JavascriptInterface@{JavascriptInterface}!quitFbgui@{quitFbgui}}
\index{quitFbgui@{quitFbgui}!JavascriptInterface@{JavascriptInterface}}
\subsubsection[{quitFbgui}]{\setlength{\rightskip}{0pt plus 5cm}void JavascriptInterface::quitFbgui (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}signal\mbox{]}}}}
\label{class_javascript_interface_a7d14cbe58b36a24620428b1b6daa6ee4}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=384pt]{class_javascript_interface_a7d14cbe58b36a24620428b1b6daa6ee4_icgraph}
\end{center}
\end{figure}


\hypertarget{class_javascript_interface_acbc3154b7f9559fa70140f6eed83c55b}{
\index{JavascriptInterface@{JavascriptInterface}!reboot@{reboot}}
\index{reboot@{reboot}!JavascriptInterface@{JavascriptInterface}}
\subsubsection[{reboot}]{\setlength{\rightskip}{0pt plus 5cm}void JavascriptInterface::reboot (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}slot\mbox{]}}}}
\label{class_javascript_interface_acbc3154b7f9559fa70140f6eed83c55b}
This method performs a reboot of the client.

This method performs a reboot of the client. Emits the \hyperlink{class_javascript_interface_a76c7813e3c89fb841d6f3bb1c38479f6}{JavascriptInterface::rebootClient()} signal. It is connected with the fbgui::performReboot() method.

\begin{DoxySeeAlso}{See also}
fbgui::performReboot() 
\end{DoxySeeAlso}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_javascript_interface_acbc3154b7f9559fa70140f6eed83c55b_cgraph}
\end{center}
\end{figure}


\hypertarget{class_javascript_interface_a76c7813e3c89fb841d6f3bb1c38479f6}{
\index{JavascriptInterface@{JavascriptInterface}!rebootClient@{rebootClient}}
\index{rebootClient@{rebootClient}!JavascriptInterface@{JavascriptInterface}}
\subsubsection[{rebootClient}]{\setlength{\rightskip}{0pt plus 5cm}void JavascriptInterface::rebootClient (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}signal\mbox{]}}}}
\label{class_javascript_interface_a76c7813e3c89fb841d6f3bb1c38479f6}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_javascript_interface_a76c7813e3c89fb841d6f3bb1c38479f6_icgraph}
\end{center}
\end{figure}


\hypertarget{class_javascript_interface_a3c7025b29fb18de496ca0cef211ef17b}{
\index{JavascriptInterface@{JavascriptInterface}!requestFile@{requestFile}}
\index{requestFile@{requestFile}!JavascriptInterface@{JavascriptInterface}}
\subsubsection[{requestFile}]{\setlength{\rightskip}{0pt plus 5cm}void JavascriptInterface::requestFile (
\begin{DoxyParamCaption}
\item[{const QString \&}]{filename}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}signal\mbox{]}}}}
\label{class_javascript_interface_a3c7025b29fb18de496ca0cef211ef17b}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_javascript_interface_a3c7025b29fb18de496ca0cef211ef17b_icgraph}
\end{center}
\end{figure}


\hypertarget{class_javascript_interface_a191733bdc7c0a52263ee2e4512078d60}{
\index{JavascriptInterface@{JavascriptInterface}!setCallbackOnFinished@{setCallbackOnFinished}}
\index{setCallbackOnFinished@{setCallbackOnFinished}!JavascriptInterface@{JavascriptInterface}}
\subsubsection[{setCallbackOnFinished}]{\setlength{\rightskip}{0pt plus 5cm}void JavascriptInterface::setCallbackOnFinished (
\begin{DoxyParamCaption}
\item[{const QString \&}]{function}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}slot\mbox{]}}}}
\label{class_javascript_interface_a191733bdc7c0a52263ee2e4512078d60}
This method start a download.

This method start a download. Can be called from inside a JavaScript function of the HTML page.

\begin{Desc}
\item[\hyperlink{todo__todo000001}{Todo}]add some more informations \end{Desc}
\hypertarget{class_javascript_interface_a5c641761dee8bd022a22da1cedf00e72}{
\index{JavascriptInterface@{JavascriptInterface}!shutDown@{shutDown}}
\index{shutDown@{shutDown}!JavascriptInterface@{JavascriptInterface}}
\subsubsection[{shutDown}]{\setlength{\rightskip}{0pt plus 5cm}void JavascriptInterface::shutDown (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}slot\mbox{]}}}}
\label{class_javascript_interface_a5c641761dee8bd022a22da1cedf00e72}
This method performs a shutdown of the client.

This method performs a shutdown of the client. Emits the \hyperlink{class_javascript_interface_a16dbd5474d3a356a1e92bdf9b6c6f519}{JavascriptInterface::shutDownClient()} signal.It is connected with the fbgui::performShutDown() method.

\begin{DoxySeeAlso}{See also}
fbgui::performShutDown() 
\end{DoxySeeAlso}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_javascript_interface_a5c641761dee8bd022a22da1cedf00e72_cgraph}
\end{center}
\end{figure}


\hypertarget{class_javascript_interface_a16dbd5474d3a356a1e92bdf9b6c6f519}{
\index{JavascriptInterface@{JavascriptInterface}!shutDownClient@{shutDownClient}}
\index{shutDownClient@{shutDownClient}!JavascriptInterface@{JavascriptInterface}}
\subsubsection[{shutDownClient}]{\setlength{\rightskip}{0pt plus 5cm}void JavascriptInterface::shutDownClient (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}signal\mbox{]}}}}
\label{class_javascript_interface_a16dbd5474d3a356a1e92bdf9b6c6f519}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_javascript_interface_a16dbd5474d3a356a1e92bdf9b6c6f519_icgraph}
\end{center}
\end{figure}


\hypertarget{class_javascript_interface_a1c694b7dea80043f98492aa79011cef8}{
\index{JavascriptInterface@{JavascriptInterface}!startDownload@{startDownload}}
\index{startDownload@{startDownload}!JavascriptInterface@{JavascriptInterface}}
\subsubsection[{startDownload}]{\setlength{\rightskip}{0pt plus 5cm}void JavascriptInterface::startDownload (
\begin{DoxyParamCaption}
\item[{const QString \&}]{filename}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}slot\mbox{]}}}}
\label{class_javascript_interface_a1c694b7dea80043f98492aa79011cef8}
This method start a download.

This method start a download. Can be called from inside a JavaScript function of the HTML page. Emits the JavascriptInterface::requestFile(const QString) signal. 

Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_javascript_interface_a1c694b7dea80043f98492aa79011cef8_cgraph}
\end{center}
\end{figure}


\hypertarget{class_javascript_interface_a89ad0da59f6494aacd62a18be21dd780}{
\index{JavascriptInterface@{JavascriptInterface}!trigger@{trigger}}
\index{trigger@{trigger}!JavascriptInterface@{JavascriptInterface}}
\subsubsection[{trigger}]{\setlength{\rightskip}{0pt plus 5cm}void JavascriptInterface::trigger (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}slot\mbox{]}}}}
\label{class_javascript_interface_a89ad0da59f6494aacd62a18be21dd780}
This method triggers the URL load $\ast$FOR DEBUGGING/TESTING PURPOSES$\ast$ \hypertarget{class_javascript_interface_aca4e27242499abf22f6f38e69ba98bf0}{
\index{JavascriptInterface@{JavascriptInterface}!updateProgressBar@{updateProgressBar}}
\index{updateProgressBar@{updateProgressBar}!JavascriptInterface@{JavascriptInterface}}
\subsubsection[{updateProgressBar}]{\setlength{\rightskip}{0pt plus 5cm}void JavascriptInterface::updateProgressBar (
\begin{DoxyParamCaption}
\item[{const int \&}]{percent, }
\item[{const double \&}]{speed, }
\item[{const QString \&}]{unit}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}slot\mbox{]}}}}
\label{class_javascript_interface_aca4e27242499abf22f6f38e69ba98bf0}
This method updates the progress bar.

This method calls a Javascript function to update the progress bar of the download. Javascript must have a function called \char`\"{}updateProgress\char`\"{} to receive this information.

\begin{Desc}
\item[\hyperlink{todo__todo000003}{Todo}]add some more informations \end{Desc}


The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
\item 
/home/niklas/workspace/fbgui/src/\hyperlink{javascriptinterface_8h}{javascriptinterface.h}\item 
/home/niklas/workspace/fbgui/src/\hyperlink{javascriptinterface_8cpp}{javascriptinterface.cpp}\end{DoxyCompactItemize}
