\hypertarget{namespace_file_handler}{}\doxysection{File\+Handler Namespace Reference}
\label{namespace_file_handler}\index{FileHandler@{FileHandler}}


Namespace for file handling of the application.  


\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \mbox{\hyperlink{namespace_file_handler_a64f4869d04450466a0a5ffc0c460d79d}{Make\+Temp\+Dir}} (const Q\+String \&path)
\begin{DoxyCompactList}\small\item\em Creates a temporary directory. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{namespace_file_handler_acf2d1fd3c62f576a578e69a2b91bad1e}{Remove\+Temp\+Dir}} (const Q\+String \&path)
\begin{DoxyCompactList}\small\item\em Removes a temporary directory. \end{DoxyCompactList}\item 
Q\+String \mbox{\hyperlink{namespace_file_handler_afd59aafe58ecf3be631b7a744c566b78}{Make\+Svg\+Copy}} (const Q\+String \&path, size\+\_\+t \&image\+\_\+counter)
\begin{DoxyCompactList}\small\item\em Creates a copy of an Svg file. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{namespace_file_handler_a6aa96140ecba4dd88bded8d5e8921557}{Create\+Surface\+S\+VG}} (const std\+::vector$<$ double $>$ \&a\+Cutter\+\_\+area)
\begin{DoxyCompactList}\small\item\em Creates the \mbox{\hyperlink{class_laser_cutter}{Laser\+Cutter}} surface S\+VG. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{namespace_file_handler_ad981634f25fe247adc485674531f7884}{Clear\+Path\+Dir}} (const Q\+String \&a\+Path)
\begin{DoxyCompactList}\small\item\em Clears the directory. \end{DoxyCompactList}\item 
std\+::vector$<$ Q\+String $>$ \mbox{\hyperlink{namespace_file_handler_a74b90199052d0d380ae6bebf642f69a1}{Copy\+Svgs\+From\+Dir}} (size\+\_\+t \&image\+\_\+counter, const Q\+Dir \&a\+Dir)
\begin{DoxyCompactList}\small\item\em Creates copies of Svgs in the given directory. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{namespace_file_handler_a15c6ea798e215acbd757228aaac15077}{Set\+Config}} (const Q\+String \&a\+Path, const double \&a\+Width, const double \&a\+Height)
\begin{DoxyCompactList}\small\item\em Sets the path to the config file. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Namespace for file handling of the application. 

\doxysubsection{Function Documentation}
\mbox{\Hypertarget{namespace_file_handler_ad981634f25fe247adc485674531f7884}\label{namespace_file_handler_ad981634f25fe247adc485674531f7884}} 
\index{FileHandler@{FileHandler}!ClearPathDir@{ClearPathDir}}
\index{ClearPathDir@{ClearPathDir}!FileHandler@{FileHandler}}
\doxysubsubsection{\texorpdfstring{ClearPathDir()}{ClearPathDir()}}
{\footnotesize\ttfamily void File\+Handler\+::\+Clear\+Path\+Dir (\begin{DoxyParamCaption}\item[{const Q\+String \&}]{a\+Path }\end{DoxyParamCaption})}



Clears the directory. 

Clears the contents of the given directory 
\begin{DoxyParams}{Parameters}
{\em a\+Path} & Path to the directory to be cleared \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{namespace_file_handler_a74b90199052d0d380ae6bebf642f69a1}\label{namespace_file_handler_a74b90199052d0d380ae6bebf642f69a1}} 
\index{FileHandler@{FileHandler}!CopySvgsFromDir@{CopySvgsFromDir}}
\index{CopySvgsFromDir@{CopySvgsFromDir}!FileHandler@{FileHandler}}
\doxysubsubsection{\texorpdfstring{CopySvgsFromDir()}{CopySvgsFromDir()}}
{\footnotesize\ttfamily std\+::vector$<$ Q\+String $>$ File\+Handler\+::\+Copy\+Svgs\+From\+Dir (\begin{DoxyParamCaption}\item[{size\+\_\+t \&}]{image\+\_\+counter,  }\item[{const Q\+Dir \&}]{a\+Dir }\end{DoxyParamCaption})}



Creates copies of Svgs in the given directory. 

Copies all svg files from the given directory into a temporary folder, which is used as a source 
\begin{DoxyParams}{Parameters}
{\em image\+\_\+counter} & Counter that assigns the copies incremental names (0.\+svg ; 1.\+svg; ...) \\
\hline
{\em a\+Dir} & Directory to be copied from \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Returns a vector of absolute paths of each of the copied Svg files (including the names of the copies of the Svg files) 
\end{DoxyReturn}
\mbox{\Hypertarget{namespace_file_handler_a6aa96140ecba4dd88bded8d5e8921557}\label{namespace_file_handler_a6aa96140ecba4dd88bded8d5e8921557}} 
\index{FileHandler@{FileHandler}!CreateSurfaceSVG@{CreateSurfaceSVG}}
\index{CreateSurfaceSVG@{CreateSurfaceSVG}!FileHandler@{FileHandler}}
\doxysubsubsection{\texorpdfstring{CreateSurfaceSVG()}{CreateSurfaceSVG()}}
{\footnotesize\ttfamily bool File\+Handler\+::\+Create\+Surface\+S\+VG (\begin{DoxyParamCaption}\item[{const std\+::vector$<$ double $>$ \&}]{a\+Cutter\+\_\+area }\end{DoxyParamCaption})}



Creates the \mbox{\hyperlink{class_laser_cutter}{Laser\+Cutter}} surface S\+VG. 

Creates the \mbox{\hyperlink{class_laser_cutter}{Laser\+Cutter}} surface S\+VG with all the images placed correctly placed. Function creates a copy of the reference surface file and copies all the vector properties (rect, circle etc.) of the placed images to the final S\+VG file, which is later used as a source for G-\/\+Code generation. 
\begin{DoxyParams}{Parameters}
{\em a\+Cutter\+\_\+area} & Defines the width and height of the final\+\_\+surface S\+VG file \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Returns false if the process failed, otherwise true 
\end{DoxyReturn}
\mbox{\Hypertarget{namespace_file_handler_afd59aafe58ecf3be631b7a744c566b78}\label{namespace_file_handler_afd59aafe58ecf3be631b7a744c566b78}} 
\index{FileHandler@{FileHandler}!MakeSvgCopy@{MakeSvgCopy}}
\index{MakeSvgCopy@{MakeSvgCopy}!FileHandler@{FileHandler}}
\doxysubsubsection{\texorpdfstring{MakeSvgCopy()}{MakeSvgCopy()}}
{\footnotesize\ttfamily Q\+String File\+Handler\+::\+Make\+Svg\+Copy (\begin{DoxyParamCaption}\item[{const Q\+String \&}]{path,  }\item[{size\+\_\+t \&}]{image\+\_\+counter }\end{DoxyParamCaption})}



Creates a copy of an Svg file. 

Creates a copy of an Svg file, used in the application as the image source 
\begin{DoxyParams}{Parameters}
{\em path} & Path to the image \\
\hline
{\em image\+\_\+counter} & Serves as a filename for each instance of a copied image \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Returns the path to the copied image 
\end{DoxyReturn}
\mbox{\Hypertarget{namespace_file_handler_a64f4869d04450466a0a5ffc0c460d79d}\label{namespace_file_handler_a64f4869d04450466a0a5ffc0c460d79d}} 
\index{FileHandler@{FileHandler}!MakeTempDir@{MakeTempDir}}
\index{MakeTempDir@{MakeTempDir}!FileHandler@{FileHandler}}
\doxysubsubsection{\texorpdfstring{MakeTempDir()}{MakeTempDir()}}
{\footnotesize\ttfamily void File\+Handler\+::\+Make\+Temp\+Dir (\begin{DoxyParamCaption}\item[{const Q\+String \&}]{path }\end{DoxyParamCaption})}



Creates a temporary directory. 

Creates a temporary directory, which is used temporarily for storing copies of images 
\begin{DoxyParams}{Parameters}
{\em path} & Path for the to-\/be-\/created directory \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{namespace_file_handler_acf2d1fd3c62f576a578e69a2b91bad1e}\label{namespace_file_handler_acf2d1fd3c62f576a578e69a2b91bad1e}} 
\index{FileHandler@{FileHandler}!RemoveTempDir@{RemoveTempDir}}
\index{RemoveTempDir@{RemoveTempDir}!FileHandler@{FileHandler}}
\doxysubsubsection{\texorpdfstring{RemoveTempDir()}{RemoveTempDir()}}
{\footnotesize\ttfamily void File\+Handler\+::\+Remove\+Temp\+Dir (\begin{DoxyParamCaption}\item[{const Q\+String \&}]{path }\end{DoxyParamCaption})}



Removes a temporary directory. 

Removes a temporary directory recursivaly (all children) 
\begin{DoxyParams}{Parameters}
{\em path} & Path to the to-\/be-\/destroyed directory \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{namespace_file_handler_a15c6ea798e215acbd757228aaac15077}\label{namespace_file_handler_a15c6ea798e215acbd757228aaac15077}} 
\index{FileHandler@{FileHandler}!SetConfig@{SetConfig}}
\index{SetConfig@{SetConfig}!FileHandler@{FileHandler}}
\doxysubsubsection{\texorpdfstring{SetConfig()}{SetConfig()}}
{\footnotesize\ttfamily bool File\+Handler\+::\+Set\+Config (\begin{DoxyParamCaption}\item[{const Q\+String \&}]{a\+Path,  }\item[{const double \&}]{a\+Width,  }\item[{const double \&}]{a\+Height }\end{DoxyParamCaption})}



Sets the path to the config file. 

Sets the image source path to the config.\+xml file, which is used to initialize the application. 
\begin{DoxyParams}{Parameters}
{\em a\+Path} & Path to be set \\
\hline
{\em a\+Width} & Width to be set \\
\hline
{\em a\+Height} & Height to be set \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Returns False if it has failed, otherwise true 
\end{DoxyReturn}
