\hypertarget{classScriptInterface}{}\section{Script\+Interface Class Reference}
\label{classScriptInterface}\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]{classScriptInterface}
\end{center}
\end{figure}
\subsection*{Signals}
\begin{Indent}\textbf{ Scripting History}\par
\begin{DoxyCompactItemize}
\item 
virtual void \hyperlink{classScriptInterface_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}\textbf{ Others}\par
\begin{DoxyCompactItemize}
\item 
virtual void \hyperlink{classScriptInterface_a44edc5563856d3d605d78f58c4c2e94a}{get\+Scripting\+Engine} (Q\+Script\+Engine $\ast$\&\+\_\+engine)
\end{DoxyCompactItemize}
\end{Indent}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{classScriptInterface_a0e077be7c424854cfb9e001bc35bbb38}\label{classScriptInterface_a0e077be7c424854cfb9e001bc35bbb38}} 
virtual \hyperlink{classScriptInterface_a0e077be7c424854cfb9e001bc35bbb38}{$\sim$\+Script\+Interface} ()
\begin{DoxyCompactList}\small\item\em Destructor. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Script execution}
\begin{DoxyCompactItemize}
\item 
virtual void \hyperlink{classScriptInterface_a41b04efbfba5d46592132995fc3729b7}{execute\+File\+Script} (Q\+String \+\_\+filename)
\item 
virtual void \hyperlink{classScriptInterface_a70522aa5df14916fa00e3747021d27bd}{execute\+Script} (Q\+String \+\_\+script)
\end{DoxyCompactItemize}
\subsection*{Function Information}
\begin{DoxyCompactItemize}
\item 
virtual void \hyperlink{classScriptInterface_a1678873a18e5cfb2b79cd8f1a16a01c3}{get\+Description} (Q\+String \+\_\+function, Q\+String \&\+\_\+description, Q\+String\+List \&\+\_\+parameters, Q\+String\+List \&\+\_\+descriptions)
\item 
virtual void \hyperlink{classScriptInterface_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{classScriptInterface_aa5e1539c22eb15a2a7237080debd0c8b}{slot\+Script\+Info} (Q\+String \+\_\+plugin\+Name, Q\+String \+\_\+function\+With\+Parameters)
\item 
virtual void \hyperlink{classScriptInterface_ac99bbe03eaea82d99ae6f32d13ecec96}{slot\+Execute\+Script} (Q\+String \+\_\+script)
\item 
virtual void \hyperlink{classScriptInterface_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 58 of file Script\+Interface.\+hh.



\subsection{Member Function Documentation}
\mbox{\Hypertarget{classScriptInterface_a41b04efbfba5d46592132995fc3729b7}\label{classScriptInterface_a41b04efbfba5d46592132995fc3729b7}} 
\index{Script\+Interface@{Script\+Interface}!execute\+File\+Script@{execute\+File\+Script}}
\index{execute\+File\+Script@{execute\+File\+Script}!Script\+Interface@{Script\+Interface}}
\subsubsection{\texorpdfstring{execute\+File\+Script()}{executeFileScript()}}
{\footnotesize\ttfamily virtual void Script\+Interface\+::execute\+File\+Script (\begin{DoxyParamCaption}\item[{Q\+String}]{\+\_\+filename }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}

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 80 of file Script\+Interface.\+hh.

\mbox{\Hypertarget{classScriptInterface_a70522aa5df14916fa00e3747021d27bd}\label{classScriptInterface_a70522aa5df14916fa00e3747021d27bd}} 
\index{Script\+Interface@{Script\+Interface}!execute\+Script@{execute\+Script}}
\index{execute\+Script@{execute\+Script}!Script\+Interface@{Script\+Interface}}
\subsubsection{\texorpdfstring{execute\+Script}{executeScript}}
{\footnotesize\ttfamily virtual void Script\+Interface\+::execute\+Script (\begin{DoxyParamCaption}\item[{Q\+String}]{\+\_\+script }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}, {\ttfamily [signal]}}

Emit this signal to execute a script


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


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

\mbox{\Hypertarget{classScriptInterface_a356df2d1b6bcd96b588c475d7d2d27bf}\label{classScriptInterface_a356df2d1b6bcd96b588c475d7d2d27bf}} 
\index{Script\+Interface@{Script\+Interface}!get\+Available\+Functions@{get\+Available\+Functions}}
\index{get\+Available\+Functions@{get\+Available\+Functions}!Script\+Interface@{Script\+Interface}}
\subsubsection{\texorpdfstring{get\+Available\+Functions}{getAvailableFunctions}}
{\footnotesize\ttfamily 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]}}

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 94 of file Script\+Interface.\+hh.

\mbox{\Hypertarget{classScriptInterface_a1678873a18e5cfb2b79cd8f1a16a01c3}\label{classScriptInterface_a1678873a18e5cfb2b79cd8f1a16a01c3}} 
\index{Script\+Interface@{Script\+Interface}!get\+Description@{get\+Description}}
\index{get\+Description@{get\+Description}!Script\+Interface@{Script\+Interface}}
\subsubsection{\texorpdfstring{get\+Description()}{getDescription()}}
{\footnotesize\ttfamily 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]}}

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 103 of file Script\+Interface.\+hh.

\mbox{\Hypertarget{classScriptInterface_a44edc5563856d3d605d78f58c4c2e94a}\label{classScriptInterface_a44edc5563856d3d605d78f58c4c2e94a}} 
\index{Script\+Interface@{Script\+Interface}!get\+Scripting\+Engine@{get\+Scripting\+Engine}}
\index{get\+Scripting\+Engine@{get\+Scripting\+Engine}!Script\+Interface@{Script\+Interface}}
\subsubsection{\texorpdfstring{get\+Scripting\+Engine}{getScriptingEngine}}
{\footnotesize\ttfamily 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]}}

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 146 of file Script\+Interface.\+hh.

\mbox{\Hypertarget{classScriptInterface_a5065fad145b05c6c1e50fe8c4cf150f0}\label{classScriptInterface_a5065fad145b05c6c1e50fe8c4cf150f0}} 
\index{Script\+Interface@{Script\+Interface}!script\+Info@{script\+Info}}
\index{script\+Info@{script\+Info}!Script\+Interface@{Script\+Interface}}
\subsubsection{\texorpdfstring{script\+Info}{scriptInfo}}
{\footnotesize\ttfamily 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]}}



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{DataTypes_8hh_a7932a926ab17fabe9f4a0ee1b498526c}{Vector}(1 , 0 , 0 ) ) 
\end{DoxyCode}
 ) 
\begin{DoxyCode}
emit \hyperlink{classScriptInterface_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 131 of file Script\+Interface.\+hh.

\mbox{\Hypertarget{classScriptInterface_a9eae0f44005a7e4eb49d72b83336f4eb}\label{classScriptInterface_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{\texorpdfstring{slot\+Execute\+File\+Script()}{slotExecuteFileScript()}}
{\footnotesize\ttfamily 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]}}

Slot for a scripting plugin. Gets the Script as a filename, opens and executes it. 

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

\mbox{\Hypertarget{classScriptInterface_ac99bbe03eaea82d99ae6f32d13ecec96}\label{classScriptInterface_ac99bbe03eaea82d99ae6f32d13ecec96}} 
\index{Script\+Interface@{Script\+Interface}!slot\+Execute\+Script@{slot\+Execute\+Script}}
\index{slot\+Execute\+Script@{slot\+Execute\+Script}!Script\+Interface@{Script\+Interface}}
\subsubsection{\texorpdfstring{slot\+Execute\+Script()}{slotExecuteScript()}}
{\footnotesize\ttfamily virtual void Script\+Interface\+::slot\+Execute\+Script (\begin{DoxyParamCaption}\item[{Q\+String}]{\+\_\+script }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [private]}, {\ttfamily [virtual]}}

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 170 of file Script\+Interface.\+hh.

\mbox{\Hypertarget{classScriptInterface_aa5e1539c22eb15a2a7237080debd0c8b}\label{classScriptInterface_aa5e1539c22eb15a2a7237080debd0c8b}} 
\index{Script\+Interface@{Script\+Interface}!slot\+Script\+Info@{slot\+Script\+Info}}
\index{slot\+Script\+Info@{slot\+Script\+Info}!Script\+Interface@{Script\+Interface}}
\subsubsection{\texorpdfstring{slot\+Script\+Info}{slotScriptInfo}}
{\footnotesize\ttfamily 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]}}

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 163 of file Script\+Interface.\+hh.



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