\hypertarget{a01017}{\section{Process\+Interface Class Reference}
\label{a01017}\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]{a01017}
\end{center}
\end{figure}
\subsection*{Signals}
\begin{DoxyCompactItemize}
\item 
virtual void \hyperlink{a01017_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 
\hypertarget{a01017_ac0ff70d3ae8fa371b7118739860b1eb4}{virtual \hyperlink{a01017_ac0ff70d3ae8fa371b7118739860b1eb4}{$\sim$\+Process\+Interface} ()}\label{a01017_ac0ff70d3ae8fa371b7118739860b1eb4}

\begin{DoxyCompactList}\small\item\em Destructor. \end{DoxyCompactList}\item 
virtual void \hyperlink{a01017_a79f38ef5bc77806e540a4b81b7bdd9e5}{set\+Job\+State} (Q\+String \+\_\+job\+Id, int \+\_\+value)
\begin{DoxyCompactList}\small\item\em update job state \end{DoxyCompactList}\item 
virtual void \hyperlink{a01017_a1ef6ffc7b1e286b700ad053654a9fb95}{set\+Job\+Name} (Q\+String \+\_\+job\+Id, Q\+String \+\_\+name)
\begin{DoxyCompactList}\small\item\em update job's name \end{DoxyCompactList}\item 
virtual void \hyperlink{a01017_ad62db4825e2d7bd5ec7892381fce7482}{set\+Job\+Description} (Q\+String \+\_\+job\+Id, Q\+String \+\_\+text)
\begin{DoxyCompactList}\small\item\em update job's description text \end{DoxyCompactList}\item 
virtual void \hyperlink{a01017_a27cb3b5cef76297e97ab43a4df305a9f}{cancel\+Job} (Q\+String \+\_\+job\+Id)
\begin{DoxyCompactList}\small\item\em Cancel your job. \end{DoxyCompactList}\item 
virtual void \hyperlink{a01017_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{a01017_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 75 of file Process\+Interface.\+hh.



\subsection{Member Function Documentation}
\hypertarget{a01017_aab4d3460c569003fd6de8f4888270ce2}{\index{Process\+Interface@{Process\+Interface}!canceled\+Job@{canceled\+Job}}
\index{canceled\+Job@{canceled\+Job}!Process\+Interface@{Process\+Interface}}
\subsubsection[{canceled\+Job}]{\setlength{\rightskip}{0pt plus 5cm}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]}}}\label{a01017_aab4d3460c569003fd6de8f4888270ce2}


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{a00481_a1ef8e1cab88b0c2710b5dd7a6177e686}{Decimater\+Plugin}.



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

\hypertarget{a01017_a27cb3b5cef76297e97ab43a4df305a9f}{\index{Process\+Interface@{Process\+Interface}!cancel\+Job@{cancel\+Job}}
\index{cancel\+Job@{cancel\+Job}!Process\+Interface@{Process\+Interface}}
\subsubsection[{cancel\+Job}]{\setlength{\rightskip}{0pt plus 5cm}virtual void Process\+Interface\+::cancel\+Job (
\begin{DoxyParamCaption}
\item[{Q\+String}]{\+\_\+job\+Id}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{a01017_a27cb3b5cef76297e97ab43a4df305a9f}


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 132 of file Process\+Interface.\+hh.

\hypertarget{a01017_a5ba06b2f07164111a47a9ea3461c3cb8}{\index{Process\+Interface@{Process\+Interface}!finish\+Job@{finish\+Job}}
\index{finish\+Job@{finish\+Job}!Process\+Interface@{Process\+Interface}}
\subsubsection[{finish\+Job}]{\setlength{\rightskip}{0pt plus 5cm}virtual void Process\+Interface\+::finish\+Job (
\begin{DoxyParamCaption}
\item[{Q\+String}]{\+\_\+job\+Id}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{a01017_a5ba06b2f07164111a47a9ea3461c3cb8}


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 141 of file Process\+Interface.\+hh.

\hypertarget{a01017_ad62db4825e2d7bd5ec7892381fce7482}{\index{Process\+Interface@{Process\+Interface}!set\+Job\+Description@{set\+Job\+Description}}
\index{set\+Job\+Description@{set\+Job\+Description}!Process\+Interface@{Process\+Interface}}
\subsubsection[{set\+Job\+Description}]{\setlength{\rightskip}{0pt plus 5cm}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]}}}\label{a01017_ad62db4825e2d7bd5ec7892381fce7482}


update job's description text 

Emit this signal to tell the core to change a job's widget'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's description \\
\hline
\end{DoxyParams}


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

\hypertarget{a01017_a1ef6ffc7b1e286b700ad053654a9fb95}{\index{Process\+Interface@{Process\+Interface}!set\+Job\+Name@{set\+Job\+Name}}
\index{set\+Job\+Name@{set\+Job\+Name}!Process\+Interface@{Process\+Interface}}
\subsubsection[{set\+Job\+Name}]{\setlength{\rightskip}{0pt plus 5cm}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]}}}\label{a01017_a1ef6ffc7b1e286b700ad053654a9fb95}


update job's name 

Emit this signal to tell the core to change a job'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 117 of file Process\+Interface.\+hh.

\hypertarget{a01017_a79f38ef5bc77806e540a4b81b7bdd9e5}{\index{Process\+Interface@{Process\+Interface}!set\+Job\+State@{set\+Job\+State}}
\index{set\+Job\+State@{set\+Job\+State}!Process\+Interface@{Process\+Interface}}
\subsubsection[{set\+Job\+State}]{\setlength{\rightskip}{0pt plus 5cm}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]}}}\label{a01017_a79f38ef5bc77806e540a4b81b7bdd9e5}


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{a01017_a58c8f90b997edb9c380c53d8f590c2ab}{Process\+Interface\+::start\+Job()} \\
\hline
\end{DoxyParams}


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

\hypertarget{a01017_a58c8f90b997edb9c380c53d8f590c2ab}{\index{Process\+Interface@{Process\+Interface}!start\+Job@{start\+Job}}
\index{start\+Job@{start\+Job}!Process\+Interface@{Process\+Interface}}
\subsubsection[{start\+Job}]{\setlength{\rightskip}{0pt plus 5cm}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]}}}\label{a01017_a58c8f90b997edb9c380c53d8f590c2ab}


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{a01017_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 99 of file Process\+Interface.\+hh.



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