\hypertarget{classProcessInterface}{}\section{Process\+Interface Class Reference}
\label{classProcessInterface}\index{Process\+Interface@{Process\+Interface}}


Interface class for Thread handling.  




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

Inheritance diagram for Process\+Interface\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classProcessInterface}
\end{center}
\end{figure}
\subsection*{Signals}
\begin{DoxyCompactItemize}
\item 
virtual void \hyperlink{classProcessInterface_a58c8f90b997edb9c380c53d8f590c2ab}{start\+Job} (Q\+String \+\_\+job\+Id, Q\+String \+\_\+description, int \+\_\+min, int \+\_\+max, bool \+\_\+blocking=false)
\begin{DoxyCompactList}\small\item\em announce a new job \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{classProcessInterface_ac0ff70d3ae8fa371b7118739860b1eb4}\label{classProcessInterface_ac0ff70d3ae8fa371b7118739860b1eb4}} 
virtual \hyperlink{classProcessInterface_ac0ff70d3ae8fa371b7118739860b1eb4}{$\sim$\+Process\+Interface} ()
\begin{DoxyCompactList}\small\item\em Destructor. \end{DoxyCompactList}\item 
virtual void \hyperlink{classProcessInterface_a79f38ef5bc77806e540a4b81b7bdd9e5}{set\+Job\+State} (Q\+String \+\_\+job\+Id, int \+\_\+value)
\begin{DoxyCompactList}\small\item\em update job state \end{DoxyCompactList}\item 
virtual void \hyperlink{classProcessInterface_a1ef6ffc7b1e286b700ad053654a9fb95}{set\+Job\+Name} (Q\+String \+\_\+job\+Id, Q\+String \+\_\+name)
\begin{DoxyCompactList}\small\item\em update job\textquotesingle{}s name \end{DoxyCompactList}\item 
virtual void \hyperlink{classProcessInterface_ad62db4825e2d7bd5ec7892381fce7482}{set\+Job\+Description} (Q\+String \+\_\+job\+Id, Q\+String \+\_\+text)
\begin{DoxyCompactList}\small\item\em update job\textquotesingle{}s description text \end{DoxyCompactList}\item 
virtual void \hyperlink{classProcessInterface_a27cb3b5cef76297e97ab43a4df305a9f}{cancel\+Job} (Q\+String \+\_\+job\+Id)
\begin{DoxyCompactList}\small\item\em Cancel your job. \end{DoxyCompactList}\item 
virtual void \hyperlink{classProcessInterface_a5ba06b2f07164111a47a9ea3461c3cb8}{finish\+Job} (Q\+String \+\_\+job\+Id)
\begin{DoxyCompactList}\small\item\em Finish your job. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Slots}
\begin{DoxyCompactItemize}
\item 
virtual void \hyperlink{classProcessInterface_aab4d3460c569003fd6de8f4888270ce2}{canceled\+Job} (Q\+String \+\_\+job)
\begin{DoxyCompactList}\small\item\em A job has been canceled. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Interface class for Thread handling. 

\hyperlink{processInterfacePage}{Detailed description} ~\newline
 This Interface is used to handle threads in Open\+Flipper. You can run arbitrary slots within separate threads. 

Definition at line 60 of file Process\+Interface.\+hh.



\subsection{Member Function Documentation}
\mbox{\Hypertarget{classProcessInterface_aab4d3460c569003fd6de8f4888270ce2}\label{classProcessInterface_aab4d3460c569003fd6de8f4888270ce2}} 
\index{Process\+Interface@{Process\+Interface}!canceled\+Job@{canceled\+Job}}
\index{canceled\+Job@{canceled\+Job}!Process\+Interface@{Process\+Interface}}
\subsubsection{\texorpdfstring{canceled\+Job}{canceledJob}}
{\footnotesize\ttfamily virtual void Process\+Interface\+::canceled\+Job (\begin{DoxyParamCaption}\item[{Q\+String}]{\+\_\+job }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [private]}, {\ttfamily [virtual]}, {\ttfamily [slot]}}



A job has been canceled. 

This function is called when the user cancels a job. The returned name is the name of the job which has been canceled


\begin{DoxyParams}{Parameters}
{\em \+\_\+job} & String which is used as the id of the thread \\
\hline
\end{DoxyParams}


Reimplemented in \hyperlink{classDecimaterPlugin_a1ef8e1cab88b0c2710b5dd7a6177e686}{Decimater\+Plugin}.



Definition at line 137 of file Process\+Interface.\+hh.

\mbox{\Hypertarget{classProcessInterface_a27cb3b5cef76297e97ab43a4df305a9f}\label{classProcessInterface_a27cb3b5cef76297e97ab43a4df305a9f}} 
\index{Process\+Interface@{Process\+Interface}!cancel\+Job@{cancel\+Job}}
\index{cancel\+Job@{cancel\+Job}!Process\+Interface@{Process\+Interface}}
\subsubsection{\texorpdfstring{cancel\+Job()}{cancelJob()}}
{\footnotesize\ttfamily virtual void Process\+Interface\+::cancel\+Job (\begin{DoxyParamCaption}\item[{Q\+String}]{\+\_\+job\+Id }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



Cancel your job. 


\begin{DoxyParams}{Parameters}
{\em \+\_\+job\+Id} & String which is used as the id of the thread \\
\hline
\end{DoxyParams}


Definition at line 117 of file Process\+Interface.\+hh.

\mbox{\Hypertarget{classProcessInterface_a5ba06b2f07164111a47a9ea3461c3cb8}\label{classProcessInterface_a5ba06b2f07164111a47a9ea3461c3cb8}} 
\index{Process\+Interface@{Process\+Interface}!finish\+Job@{finish\+Job}}
\index{finish\+Job@{finish\+Job}!Process\+Interface@{Process\+Interface}}
\subsubsection{\texorpdfstring{finish\+Job()}{finishJob()}}
{\footnotesize\ttfamily virtual void Process\+Interface\+::finish\+Job (\begin{DoxyParamCaption}\item[{Q\+String}]{\+\_\+job\+Id }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



Finish your job. 

This signal has to be emitted when your job has finished. You can directly connect the threads finished signal to this signal.


\begin{DoxyParams}{Parameters}
{\em \+\_\+job\+Id} & String which is used as the id of the thread \\
\hline
\end{DoxyParams}


Definition at line 126 of file Process\+Interface.\+hh.

\mbox{\Hypertarget{classProcessInterface_ad62db4825e2d7bd5ec7892381fce7482}\label{classProcessInterface_ad62db4825e2d7bd5ec7892381fce7482}} 
\index{Process\+Interface@{Process\+Interface}!set\+Job\+Description@{set\+Job\+Description}}
\index{set\+Job\+Description@{set\+Job\+Description}!Process\+Interface@{Process\+Interface}}
\subsubsection{\texorpdfstring{set\+Job\+Description()}{setJobDescription()}}
{\footnotesize\ttfamily virtual void Process\+Interface\+::set\+Job\+Description (\begin{DoxyParamCaption}\item[{Q\+String}]{\+\_\+job\+Id,  }\item[{Q\+String}]{\+\_\+text }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



update job\textquotesingle{}s description text 

Emit this signal to tell the core to change a job\textquotesingle{}s widget\textquotesingle{}s description.


\begin{DoxyParams}{Parameters}
{\em \+\_\+job\+Id} & String which is used as the id of the thread \\
\hline
{\em \+\_\+text} & The text of the job\textquotesingle{}s description \\
\hline
\end{DoxyParams}


Definition at line 111 of file Process\+Interface.\+hh.

\mbox{\Hypertarget{classProcessInterface_a1ef6ffc7b1e286b700ad053654a9fb95}\label{classProcessInterface_a1ef6ffc7b1e286b700ad053654a9fb95}} 
\index{Process\+Interface@{Process\+Interface}!set\+Job\+Name@{set\+Job\+Name}}
\index{set\+Job\+Name@{set\+Job\+Name}!Process\+Interface@{Process\+Interface}}
\subsubsection{\texorpdfstring{set\+Job\+Name()}{setJobName()}}
{\footnotesize\ttfamily virtual void Process\+Interface\+::set\+Job\+Name (\begin{DoxyParamCaption}\item[{Q\+String}]{\+\_\+job\+Id,  }\item[{Q\+String}]{\+\_\+name }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



update job\textquotesingle{}s name 

Emit this signal to tell the core to change a job\textquotesingle{}s name.


\begin{DoxyParams}{Parameters}
{\em \+\_\+job\+Id} & String which is used as the id of the thread \\
\hline
{\em \+\_\+name} & The new name of the job \\
\hline
\end{DoxyParams}


Definition at line 102 of file Process\+Interface.\+hh.

\mbox{\Hypertarget{classProcessInterface_a79f38ef5bc77806e540a4b81b7bdd9e5}\label{classProcessInterface_a79f38ef5bc77806e540a4b81b7bdd9e5}} 
\index{Process\+Interface@{Process\+Interface}!set\+Job\+State@{set\+Job\+State}}
\index{set\+Job\+State@{set\+Job\+State}!Process\+Interface@{Process\+Interface}}
\subsubsection{\texorpdfstring{set\+Job\+State()}{setJobState()}}
{\footnotesize\ttfamily virtual void Process\+Interface\+::set\+Job\+State (\begin{DoxyParamCaption}\item[{Q\+String}]{\+\_\+job\+Id,  }\item[{int}]{\+\_\+value }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



update job state 

Emit this signal to tell the core about your job status.


\begin{DoxyParams}{Parameters}
{\em \+\_\+job\+Id} & String which is used as the id of the thread \\
\hline
{\em \+\_\+value} & The status value has to be in the range you defined in \hyperlink{classProcessInterface_a58c8f90b997edb9c380c53d8f590c2ab}{Process\+Interface\+::start\+Job()} \\
\hline
\end{DoxyParams}


Definition at line 93 of file Process\+Interface.\+hh.

\mbox{\Hypertarget{classProcessInterface_a58c8f90b997edb9c380c53d8f590c2ab}\label{classProcessInterface_a58c8f90b997edb9c380c53d8f590c2ab}} 
\index{Process\+Interface@{Process\+Interface}!start\+Job@{start\+Job}}
\index{start\+Job@{start\+Job}!Process\+Interface@{Process\+Interface}}
\subsubsection{\texorpdfstring{start\+Job}{startJob}}
{\footnotesize\ttfamily virtual void Process\+Interface\+::start\+Job (\begin{DoxyParamCaption}\item[{Q\+String}]{\+\_\+job\+Id,  }\item[{Q\+String}]{\+\_\+description,  }\item[{int}]{\+\_\+min,  }\item[{int}]{\+\_\+max,  }\item[{bool}]{\+\_\+blocking = {\ttfamily false} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}, {\ttfamily [signal]}}



announce a new job 

Use this function to announce a new job. The Job Id should be a unique id for your job. Prepend your Plugin\+Name to your id to make it unique across plugins.

The range between \+\_\+min and \+\_\+max will be used to compute the progress percentage based on the \hyperlink{classProcessInterface_a79f38ef5bc77806e540a4b81b7bdd9e5}{Process\+Interface\+::set\+Job\+State()} values provided by the thread. You could for example set it to the number of steps performed in your algorithm.


\begin{DoxyParams}{Parameters}
{\em \+\_\+job\+Id} & String which is used as the id of the thread \\
\hline
{\em \+\_\+description} & The description will be the string visible to the user. \\
\hline
{\em \+\_\+min} & minimum of the status value range \\
\hline
{\em \+\_\+max} & maximum of the status range \\
\hline
{\em \+\_\+blocking} & If the thread is blocking, no other interaction will be allowed \\
\hline
\end{DoxyParams}


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



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