\hypertarget{a01138}{\section{Script\+Interface Class Reference}
\label{a01138}\index{Script\+Interface@{Script\+Interface}}
}


Interface for all Plugins which provide scriptable Functions.  




{\ttfamily \#include $<$Open\+Flipper/\+Base\+Plugin/\+Script\+Interface.\+hh$>$}

Inheritance diagram for Script\+Interface\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=12.000000cm]{a01138}
\end{center}
\end{figure}
\subsection*{Signals}
\begin{Indent}{\bf Scripting History}\par
\begin{DoxyCompactItemize}
\item 
virtual void \hyperlink{a01138_a5065fad145b05c6c1e50fe8c4cf150f0}{script\+Info} (Q\+String \+\_\+function\+With\+Parameters)
\begin{DoxyCompactList}\small\item\em Emit this signal if a scriptable function is executed. \end{DoxyCompactList}\end{DoxyCompactItemize}
\end{Indent}
\begin{Indent}{\bf Others}\par
\begin{DoxyCompactItemize}
\item 
virtual void \hyperlink{a01138_a44edc5563856d3d605d78f58c4c2e94a}{get\+Scripting\+Engine} (Q\+Script\+Engine $\ast$\&\+\_\+engine)
\end{DoxyCompactItemize}
\end{Indent}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a01138_a0e077be7c424854cfb9e001bc35bbb38}{virtual \hyperlink{a01138_a0e077be7c424854cfb9e001bc35bbb38}{$\sim$\+Script\+Interface} ()}\label{a01138_a0e077be7c424854cfb9e001bc35bbb38}

\begin{DoxyCompactList}\small\item\em Destructor. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Script execution}
\begin{DoxyCompactItemize}
\item 
virtual void \hyperlink{a01138_a41b04efbfba5d46592132995fc3729b7}{execute\+File\+Script} (Q\+String \+\_\+filename)
\item 
virtual void \hyperlink{a01138_a70522aa5df14916fa00e3747021d27bd}{execute\+Script} (Q\+String \+\_\+script)
\end{DoxyCompactItemize}
\subsection*{Function Information}
\begin{DoxyCompactItemize}
\item 
virtual void \hyperlink{a01138_a1678873a18e5cfb2b79cd8f1a16a01c3}{get\+Description} (Q\+String \+\_\+function, Q\+String \&\+\_\+description, Q\+String\+List \&\+\_\+parameters, Q\+String\+List \&\+\_\+descriptions)
\item 
virtual void \hyperlink{a01138_a356df2d1b6bcd96b588c475d7d2d27bf}{get\+Available\+Functions} (Q\+String\+List \&\+\_\+functions)
\end{DoxyCompactItemize}
\subsection*{Slots for a scripting control plugin like Plugin-\/\+Script}
\begin{DoxyCompactItemize}
\item 
virtual void \hyperlink{a01138_aa5e1539c22eb15a2a7237080debd0c8b}{slot\+Script\+Info} (Q\+String \+\_\+plugin\+Name, Q\+String \+\_\+function\+With\+Parameters)
\item 
virtual void \hyperlink{a01138_ac99bbe03eaea82d99ae6f32d13ecec96}{slot\+Execute\+Script} (Q\+String \+\_\+script)
\item 
virtual void \hyperlink{a01138_a9eae0f44005a7e4eb49d72b83336f4eb}{slot\+Execute\+File\+Script} (Q\+String \+\_\+filename)
\end{DoxyCompactItemize}


\subsection{Detailed Description}
Interface for all Plugins which provide scriptable Functions. 

\hyperlink{scriptInterfacePage}{Detailed description} ~\newline


Definition at line 67 of file Script\+Interface.\+hh.



\subsection{Member Function Documentation}
\hypertarget{a01138_a41b04efbfba5d46592132995fc3729b7}{\index{Script\+Interface@{Script\+Interface}!execute\+File\+Script@{execute\+File\+Script}}
\index{execute\+File\+Script@{execute\+File\+Script}!Script\+Interface@{Script\+Interface}}
\subsubsection[{execute\+File\+Script}]{\setlength{\rightskip}{0pt plus 5cm}virtual void Script\+Interface\+::execute\+File\+Script (
\begin{DoxyParamCaption}
\item[{Q\+String}]{\+\_\+filename}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{a01138_a41b04efbfba5d46592132995fc3729b7}
Emit this signal to execute a script from a file 
\begin{DoxyParams}{Parameters}
{\em \+\_\+filename} & Filename of the script to execute \\
\hline
\end{DoxyParams}


Definition at line 89 of file Script\+Interface.\+hh.

\hypertarget{a01138_a70522aa5df14916fa00e3747021d27bd}{\index{Script\+Interface@{Script\+Interface}!execute\+Script@{execute\+Script}}
\index{execute\+Script@{execute\+Script}!Script\+Interface@{Script\+Interface}}
\subsubsection[{execute\+Script}]{\setlength{\rightskip}{0pt plus 5cm}virtual void Script\+Interface\+::execute\+Script (
\begin{DoxyParamCaption}
\item[{Q\+String}]{\+\_\+script}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}, {\ttfamily [signal]}}}\label{a01138_a70522aa5df14916fa00e3747021d27bd}
Emit this signal to execute a script


\begin{DoxyParams}{Parameters}
{\em \+\_\+script} & The script to execute \\
\hline
\end{DoxyParams}


Definition at line 84 of file Script\+Interface.\+hh.

\hypertarget{a01138_a356df2d1b6bcd96b588c475d7d2d27bf}{\index{Script\+Interface@{Script\+Interface}!get\+Available\+Functions@{get\+Available\+Functions}}
\index{get\+Available\+Functions@{get\+Available\+Functions}!Script\+Interface@{Script\+Interface}}
\subsubsection[{get\+Available\+Functions}]{\setlength{\rightskip}{0pt plus 5cm}virtual void Script\+Interface\+::get\+Available\+Functions (
\begin{DoxyParamCaption}
\item[{Q\+String\+List \&}]{\+\_\+functions}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}, {\ttfamily [signal]}}}\label{a01138_a356df2d1b6bcd96b588c475d7d2d27bf}
With this signal you can get a list of all available scripting functions 
\begin{DoxyParams}{Parameters}
{\em \+\_\+functions} & All available functions \\
\hline
\end{DoxyParams}


Definition at line 103 of file Script\+Interface.\+hh.

\hypertarget{a01138_a1678873a18e5cfb2b79cd8f1a16a01c3}{\index{Script\+Interface@{Script\+Interface}!get\+Description@{get\+Description}}
\index{get\+Description@{get\+Description}!Script\+Interface@{Script\+Interface}}
\subsubsection[{get\+Description}]{\setlength{\rightskip}{0pt plus 5cm}virtual void Script\+Interface\+::get\+Description (
\begin{DoxyParamCaption}
\item[{Q\+String}]{\+\_\+function, }
\item[{Q\+String \&}]{\+\_\+description, }
\item[{Q\+String\+List \&}]{\+\_\+parameters, }
\item[{Q\+String\+List \&}]{\+\_\+descriptions}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{a01138_a1678873a18e5cfb2b79cd8f1a16a01c3}
With this signal you can get descriptions about a given function if available


\begin{DoxyParams}{Parameters}
{\em \+\_\+function} & name of the function (e.\+g. plugin.\+function) \\
\hline
{\em \+\_\+description} & a description for the function \\
\hline
{\em \+\_\+parameters} & list of names for the parameters \\
\hline
{\em \+\_\+descriptions} & list of descriptions for the parameters (\+\_\+descriptions\mbox{[}i\mbox{]} corresponds to \+\_\+parameters\mbox{[}i\mbox{]}) \\
\hline
\end{DoxyParams}


Definition at line 112 of file Script\+Interface.\+hh.

\hypertarget{a01138_a44edc5563856d3d605d78f58c4c2e94a}{\index{Script\+Interface@{Script\+Interface}!get\+Scripting\+Engine@{get\+Scripting\+Engine}}
\index{get\+Scripting\+Engine@{get\+Scripting\+Engine}!Script\+Interface@{Script\+Interface}}
\subsubsection[{get\+Scripting\+Engine}]{\setlength{\rightskip}{0pt plus 5cm}virtual void Script\+Interface\+::get\+Scripting\+Engine (
\begin{DoxyParamCaption}
\item[{Q\+Script\+Engine $\ast$\&}]{\+\_\+engine}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}, {\ttfamily [signal]}}}\label{a01138_a44edc5563856d3d605d78f58c4c2e94a}
Emit this signal to get a reference to the core scripting engine


\begin{DoxyParams}{Parameters}
{\em \+\_\+engine} & The scripting Engine \\
\hline
\end{DoxyParams}


Definition at line 155 of file Script\+Interface.\+hh.

\hypertarget{a01138_a5065fad145b05c6c1e50fe8c4cf150f0}{\index{Script\+Interface@{Script\+Interface}!script\+Info@{script\+Info}}
\index{script\+Info@{script\+Info}!Script\+Interface@{Script\+Interface}}
\subsubsection[{script\+Info}]{\setlength{\rightskip}{0pt plus 5cm}virtual void Script\+Interface\+::script\+Info (
\begin{DoxyParamCaption}
\item[{Q\+String}]{\+\_\+function\+With\+Parameters}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}, {\ttfamily [signal]}}}\label{a01138_a5065fad145b05c6c1e50fe8c4cf150f0}


Emit this signal if a scriptable function is executed. 

e.\+g. select\+All\+Vertices( Object\+Id )

If you execute this function, you can append your functions to the script execution history in Open\+Flipper. In this history Open\+Flipper records operations that are scriptable. Later this list can be executed again and therefore reruns the recorded operations.

The following example code shows a function called translate in a plugin, that gets an Object\+Id as a parameter. The plugin which emits this function will automatically be added in the history ( e.\+g.
\begin{DoxyCode}
move.translate( ObjectId , \hyperlink{a02488_a7932a926ab17fabe9f4a0ee1b498526c}{Vector}(1 , 0 , 0 ) ) 
\end{DoxyCode}
 ) 
\begin{DoxyCode}
emit \hyperlink{a01138_a5065fad145b05c6c1e50fe8c4cf150f0}{scriptInfo}( \textcolor{stringliteral}{"translate( ObjectId , Vector(1 , 0 , 0 ) )"} );
\end{DoxyCode}



\begin{DoxyParams}{Parameters}
{\em \+\_\+function\+With\+Parameters} & The called function with all parameters \\
\hline
\end{DoxyParams}


Definition at line 140 of file Script\+Interface.\+hh.

\hypertarget{a01138_a9eae0f44005a7e4eb49d72b83336f4eb}{\index{Script\+Interface@{Script\+Interface}!slot\+Execute\+File\+Script@{slot\+Execute\+File\+Script}}
\index{slot\+Execute\+File\+Script@{slot\+Execute\+File\+Script}!Script\+Interface@{Script\+Interface}}
\subsubsection[{slot\+Execute\+File\+Script}]{\setlength{\rightskip}{0pt plus 5cm}virtual void Script\+Interface\+::slot\+Execute\+File\+Script (
\begin{DoxyParamCaption}
\item[{Q\+String}]{\+\_\+filename}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [private]}, {\ttfamily [virtual]}}}\label{a01138_a9eae0f44005a7e4eb49d72b83336f4eb}
Slot for a scripting plugin. Gets the Script as a filename, opens and executes it. 

Definition at line 184 of file Script\+Interface.\+hh.

\hypertarget{a01138_ac99bbe03eaea82d99ae6f32d13ecec96}{\index{Script\+Interface@{Script\+Interface}!slot\+Execute\+Script@{slot\+Execute\+Script}}
\index{slot\+Execute\+Script@{slot\+Execute\+Script}!Script\+Interface@{Script\+Interface}}
\subsubsection[{slot\+Execute\+Script}]{\setlength{\rightskip}{0pt plus 5cm}virtual void Script\+Interface\+::slot\+Execute\+Script (
\begin{DoxyParamCaption}
\item[{Q\+String}]{\+\_\+script}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [private]}, {\ttfamily [virtual]}}}\label{a01138_ac99bbe03eaea82d99ae6f32d13ecec96}
Slot for a scripting plugin. Gets the Script as Q\+String and executes it.


\begin{DoxyParams}{Parameters}
{\em \+\_\+script} & Script to execute as a Q\+String \\
\hline
\end{DoxyParams}


Definition at line 179 of file Script\+Interface.\+hh.

\hypertarget{a01138_aa5e1539c22eb15a2a7237080debd0c8b}{\index{Script\+Interface@{Script\+Interface}!slot\+Script\+Info@{slot\+Script\+Info}}
\index{slot\+Script\+Info@{slot\+Script\+Info}!Script\+Interface@{Script\+Interface}}
\subsubsection[{slot\+Script\+Info}]{\setlength{\rightskip}{0pt plus 5cm}virtual void Script\+Interface\+::slot\+Script\+Info (
\begin{DoxyParamCaption}
\item[{Q\+String}]{\+\_\+plugin\+Name, }
\item[{Q\+String}]{\+\_\+function\+With\+Parameters}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [private]}, {\ttfamily [virtual]}, {\ttfamily [slot]}}}\label{a01138_aa5e1539c22eb15a2a7237080debd0c8b}
Slot for a scripting plugin. Gets the Script and executes it.


\begin{DoxyParams}{Parameters}
{\em \+\_\+plugin\+Name} & Name of the plugin that executed a scriptable function \\
\hline
{\em \+\_\+function\+With\+Parameters} & Name with parameters (values!) of the function to call. \\
\hline
\end{DoxyParams}


Definition at line 172 of file Script\+Interface.\+hh.



The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
Open\+Flipper/\+Base\+Plugin/\hyperlink{a02466}{Script\+Interface.\+hh}\end{DoxyCompactItemize}
