\hypertarget{a00778}{\section{Load\+Save\+Interface Class Reference}
\label{a00778}\index{Load\+Save\+Interface@{Load\+Save\+Interface}}
}


Interface for all plugins which want to Load or Save files and create Objects.  




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

Inheritance diagram for Load\+Save\+Interface\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=12.000000cm]{a00778}
\end{center}
\end{figure}
\subsection*{Signals}
\begin{DoxyCompactItemize}
\item 
virtual void \hyperlink{a00778_ab0ff1379c8613bfbac7ecd48e9456bef}{save} (int \+\_\+id, Q\+String \+\_\+filename)
\begin{DoxyCompactList}\small\item\em Save object to a file. \end{DoxyCompactList}\item 
virtual void \hyperlink{a00778_a152541b680116d103397e2c2a92d049e}{load} (Q\+String \+\_\+filename, \hyperlink{a00477}{Data\+Type} \+\_\+type, int \&\+\_\+id)
\begin{DoxyCompactList}\small\item\em Load object from file with a specific \hyperlink{a00477}{Data\+Type}. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a00778_ae1002bcd9c8b19677c560cb7834d625e}{virtual \hyperlink{a00778_ae1002bcd9c8b19677c560cb7834d625e}{$\sim$\+Load\+Save\+Interface} ()}\label{a00778_ae1002bcd9c8b19677c560cb7834d625e}

\begin{DoxyCompactList}\small\item\em Destructor. \end{DoxyCompactList}\item 
virtual void \hyperlink{a00778_a088846b57b3ed0ec478afcda31b64596}{add\+Empty\+Object} (\hyperlink{a00477}{Data\+Type} \+\_\+type, int \&\+\_\+id)
\item 
virtual void \hyperlink{a00778_a7ceb0b3f5651a3bc23ef8bc3009ff5cd}{copy\+Object} (int \+\_\+old\+Id, int \&\+\_\+new\+Id)
\item 
virtual void \hyperlink{a00778_acc1d5d24bfe7c2af461becfcdd7927f9}{empty\+Object\+Added} (int \+\_\+id)
\begin{DoxyCompactList}\small\item\em D\+E\+P\+R\+E\+C\+A\+T\+E\+D H\+E\+R\+E (Moved to Type Interface)! Emit this signal if an empty object has been created. \end{DoxyCompactList}\item 
virtual void \hyperlink{a00778_a6c5ae74820943d0a571ca6e8b85a69cc}{delete\+Object} (int \+\_\+id)
\begin{DoxyCompactList}\small\item\em Delete an object~\newline
 This signal can be called from any thread.~\newline
. \end{DoxyCompactList}\item 
virtual void \hyperlink{a00778_afb361d8553ecfb0ad373d505c2de4ba7}{delete\+All\+Objects} ()
\begin{DoxyCompactList}\small\item\em Delete all Objects. \end{DoxyCompactList}\item 
virtual void \hyperlink{a00778_a30a7bccd9c03b3442ccf86ff19ad482f}{get\+All\+File\+Filters} (Q\+String\+List \&\+\_\+filters)
\begin{DoxyCompactList}\small\item\em Get all file filters that are registered. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Slots}
\begin{DoxyCompactItemize}
\item 
virtual void \hyperlink{a00778_a715c23643892f4938aae8ea771ac6e3b}{file\+Opened} (int \+\_\+id)
\begin{DoxyCompactList}\small\item\em A file has been opened. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
virtual void \hyperlink{a00778_acb0f81b08c31541abdc572f2fa400bf1}{added\+Empty\+Object} (int \+\_\+id)
\begin{DoxyCompactList}\small\item\em An empty object has been added. \end{DoxyCompactList}\item 
virtual void \hyperlink{a00778_a0ab70c4ae3c08f298ecefa58f0bb8b2f}{object\+Deleted} (int \+\_\+id)
\begin{DoxyCompactList}\small\item\em An object was deleted. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Interface for all plugins which want to Load or Save files and create Objects. 

\hyperlink{loadSaveInterfacePage}{Detailed description} ~\newline
 Using this interface you can instruct the core to open/save objects or to create new empty objects. 

Definition at line 68 of file Load\+Save\+Interface.\+hh.



\subsection{Member Function Documentation}
\hypertarget{a00778_acb0f81b08c31541abdc572f2fa400bf1}{\index{Load\+Save\+Interface@{Load\+Save\+Interface}!added\+Empty\+Object@{added\+Empty\+Object}}
\index{added\+Empty\+Object@{added\+Empty\+Object}!Load\+Save\+Interface@{Load\+Save\+Interface}}
\subsubsection[{added\+Empty\+Object}]{\setlength{\rightskip}{0pt plus 5cm}virtual void Load\+Save\+Interface\+::added\+Empty\+Object (
\begin{DoxyParamCaption}
\item[{int}]{\+\_\+id}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [private]}, {\ttfamily [virtual]}}}\label{a00778_acb0f81b08c31541abdc572f2fa400bf1}


An empty object has been added. 

Slot is called if an empty object has been added by the core.~\newline
This slot will be executed on the main thread.~\newline

\begin{DoxyParams}{Parameters}
{\em \+\_\+id} & Id of the new object \\
\hline
\end{DoxyParams}


Reimplemented in \hyperlink{a00832_acc64aa7b9d9d0a071846f333079be37c}{Mesh\+Object\+Selection\+Plugin}, and \hyperlink{a01358_a51dd9fe9f9fc9a9bfa245349646ff4f6}{Type\+Light\+Plugin}.



Definition at line 148 of file Load\+Save\+Interface.\+hh.

\hypertarget{a00778_a088846b57b3ed0ec478afcda31b64596}{\index{Load\+Save\+Interface@{Load\+Save\+Interface}!add\+Empty\+Object@{add\+Empty\+Object}}
\index{add\+Empty\+Object@{add\+Empty\+Object}!Load\+Save\+Interface@{Load\+Save\+Interface}}
\subsubsection[{add\+Empty\+Object}]{\setlength{\rightskip}{0pt plus 5cm}virtual void Load\+Save\+Interface\+::add\+Empty\+Object (
\begin{DoxyParamCaption}
\item[{{\bf Data\+Type}}]{\+\_\+type, }
\item[{int \&}]{\+\_\+id}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{a00778_a088846b57b3ed0ec478afcda31b64596}
Add an empty object of the given type~\newline
This signal can be called from any thread.~\newline
 
\begin{DoxyParams}{Parameters}
{\em \+\_\+type} & Type to be created \\
\hline
{\em \+\_\+id} & Here the id of the loaded object is returned. id is -\/1 something went wrong \\
\hline
\end{DoxyParams}


Definition at line 98 of file Load\+Save\+Interface.\+hh.

\hypertarget{a00778_a7ceb0b3f5651a3bc23ef8bc3009ff5cd}{\index{Load\+Save\+Interface@{Load\+Save\+Interface}!copy\+Object@{copy\+Object}}
\index{copy\+Object@{copy\+Object}!Load\+Save\+Interface@{Load\+Save\+Interface}}
\subsubsection[{copy\+Object}]{\setlength{\rightskip}{0pt plus 5cm}virtual void Load\+Save\+Interface\+::copy\+Object (
\begin{DoxyParamCaption}
\item[{int}]{\+\_\+old\+Id, }
\item[{int \&}]{\+\_\+new\+Id}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{a00778_a7ceb0b3f5651a3bc23ef8bc3009ff5cd}
Create a copy of an existing object


\begin{DoxyParams}{Parameters}
{\em \+\_\+old\+Id} & id of the object to copy \\
\hline
{\em \+\_\+new\+Id} & id of the new object created \\
\hline
\end{DoxyParams}


Definition at line 105 of file Load\+Save\+Interface.\+hh.

\hypertarget{a00778_afb361d8553ecfb0ad373d505c2de4ba7}{\index{Load\+Save\+Interface@{Load\+Save\+Interface}!delete\+All\+Objects@{delete\+All\+Objects}}
\index{delete\+All\+Objects@{delete\+All\+Objects}!Load\+Save\+Interface@{Load\+Save\+Interface}}
\subsubsection[{delete\+All\+Objects}]{\setlength{\rightskip}{0pt plus 5cm}virtual void Load\+Save\+Interface\+::delete\+All\+Objects (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{a00778_afb361d8553ecfb0ad373d505c2de4ba7}


Delete all Objects. 



Definition at line 125 of file Load\+Save\+Interface.\+hh.

\hypertarget{a00778_a6c5ae74820943d0a571ca6e8b85a69cc}{\index{Load\+Save\+Interface@{Load\+Save\+Interface}!delete\+Object@{delete\+Object}}
\index{delete\+Object@{delete\+Object}!Load\+Save\+Interface@{Load\+Save\+Interface}}
\subsubsection[{delete\+Object}]{\setlength{\rightskip}{0pt plus 5cm}virtual void Load\+Save\+Interface\+::delete\+Object (
\begin{DoxyParamCaption}
\item[{int}]{\+\_\+id}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{a00778_a6c5ae74820943d0a571ca6e8b85a69cc}


Delete an object~\newline
 This signal can be called from any thread.~\newline
. 


\begin{DoxyParams}{Parameters}
{\em \+\_\+id} & Id of the object \\
\hline
\end{DoxyParams}


Definition at line 120 of file Load\+Save\+Interface.\+hh.

\hypertarget{a00778_acc1d5d24bfe7c2af461becfcdd7927f9}{\index{Load\+Save\+Interface@{Load\+Save\+Interface}!empty\+Object\+Added@{empty\+Object\+Added}}
\index{empty\+Object\+Added@{empty\+Object\+Added}!Load\+Save\+Interface@{Load\+Save\+Interface}}
\subsubsection[{empty\+Object\+Added}]{\setlength{\rightskip}{0pt plus 5cm}virtual void Load\+Save\+Interface\+::empty\+Object\+Added (
\begin{DoxyParamCaption}
\item[{int}]{\+\_\+id}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{a00778_acc1d5d24bfe7c2af461becfcdd7927f9}


D\+E\+P\+R\+E\+C\+A\+T\+E\+D H\+E\+R\+E (Moved to Type Interface)! Emit this signal if an empty object has been created. 

Deprecated! Objects are added by the Type Plugins and this is signal is in the \hyperlink{a01357}{Type\+Interface} now


\begin{DoxyParams}{Parameters}
{\em \+\_\+id} & Id of the added object \\
\hline
\end{DoxyParams}


Definition at line 114 of file Load\+Save\+Interface.\+hh.

\hypertarget{a00778_a715c23643892f4938aae8ea771ac6e3b}{\index{Load\+Save\+Interface@{Load\+Save\+Interface}!file\+Opened@{file\+Opened}}
\index{file\+Opened@{file\+Opened}!Load\+Save\+Interface@{Load\+Save\+Interface}}
\subsubsection[{file\+Opened}]{\setlength{\rightskip}{0pt plus 5cm}virtual void Load\+Save\+Interface\+::file\+Opened (
\begin{DoxyParamCaption}
\item[{int}]{\+\_\+id}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [private]}, {\ttfamily [virtual]}, {\ttfamily [slot]}}}\label{a00778_a715c23643892f4938aae8ea771ac6e3b}


A file has been opened. 

This slot is called if a file has been opened by the core.~\newline
This slot will be executed in the main thread.~\newline

\begin{DoxyParams}{Parameters}
{\em \+\_\+id} & Id of the new object \\
\hline
\end{DoxyParams}


Definition at line 140 of file Load\+Save\+Interface.\+hh.

\hypertarget{a00778_a30a7bccd9c03b3442ccf86ff19ad482f}{\index{Load\+Save\+Interface@{Load\+Save\+Interface}!get\+All\+File\+Filters@{get\+All\+File\+Filters}}
\index{get\+All\+File\+Filters@{get\+All\+File\+Filters}!Load\+Save\+Interface@{Load\+Save\+Interface}}
\subsubsection[{get\+All\+File\+Filters}]{\setlength{\rightskip}{0pt plus 5cm}virtual void Load\+Save\+Interface\+::get\+All\+File\+Filters (
\begin{DoxyParamCaption}
\item[{Q\+String\+List \&}]{\+\_\+filters}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{a00778_a30a7bccd9c03b3442ccf86ff19ad482f}


Get all file filters that are registered. 



Definition at line 130 of file Load\+Save\+Interface.\+hh.

\hypertarget{a00778_a152541b680116d103397e2c2a92d049e}{\index{Load\+Save\+Interface@{Load\+Save\+Interface}!load@{load}}
\index{load@{load}!Load\+Save\+Interface@{Load\+Save\+Interface}}
\subsubsection[{load}]{\setlength{\rightskip}{0pt plus 5cm}virtual void Load\+Save\+Interface\+::load (
\begin{DoxyParamCaption}
\item[{Q\+String}]{\+\_\+filename, }
\item[{{\bf Data\+Type}}]{\+\_\+type, }
\item[{int \&}]{\+\_\+id}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}, {\ttfamily [signal]}}}\label{a00778_a152541b680116d103397e2c2a92d049e}


Load object from file with a specific \hyperlink{a00477}{Data\+Type}. 


\begin{DoxyParams}{Parameters}
{\em \+\_\+filename} & Filename of the File to load \\
\hline
{\em \+\_\+type} & Type to be loaded \\
\hline
{\em \+\_\+id} & Here the id of the loaded object is returned. id is -\/1 something went wrong \\
\hline
\end{DoxyParams}


Definition at line 89 of file Load\+Save\+Interface.\+hh.

\hypertarget{a00778_a0ab70c4ae3c08f298ecefa58f0bb8b2f}{\index{Load\+Save\+Interface@{Load\+Save\+Interface}!object\+Deleted@{object\+Deleted}}
\index{object\+Deleted@{object\+Deleted}!Load\+Save\+Interface@{Load\+Save\+Interface}}
\subsubsection[{object\+Deleted}]{\setlength{\rightskip}{0pt plus 5cm}virtual void Load\+Save\+Interface\+::object\+Deleted (
\begin{DoxyParamCaption}
\item[{int}]{\+\_\+id}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [private]}, {\ttfamily [virtual]}}}\label{a00778_a0ab70c4ae3c08f298ecefa58f0bb8b2f}


An object was deleted. 

This function is called by the core if an object gets deleted. It is called immediately before the object is removed from the scenegraph. So if this function is invoked, the object still exists. All plugins get informed via this slot.\textbackslash{}

After this function got called for all plugins, the object is removed from the scene with all nodes attached to it and all \hyperlink{a00953}{Per\+Object\+Data} attached to it.~\newline
 This slot will be executed on the main thread.


\begin{DoxyParams}{Parameters}
{\em \+\_\+id} & Id of the object that is deleted. \\
\hline
\end{DoxyParams}


Reimplemented in \hyperlink{a01358_ac84ec76e6e79eab1cd45d10f9db37987}{Type\+Light\+Plugin}, and \hyperlink{a01366_ac207dfa91f9af432462bd489bf2bec09}{Type\+Qt\+Widget\+Plugin}.



Definition at line 163 of file Load\+Save\+Interface.\+hh.

\hypertarget{a00778_ab0ff1379c8613bfbac7ecd48e9456bef}{\index{Load\+Save\+Interface@{Load\+Save\+Interface}!save@{save}}
\index{save@{save}!Load\+Save\+Interface@{Load\+Save\+Interface}}
\subsubsection[{save}]{\setlength{\rightskip}{0pt plus 5cm}virtual void Load\+Save\+Interface\+::save (
\begin{DoxyParamCaption}
\item[{int}]{\+\_\+id, }
\item[{Q\+String}]{\+\_\+filename}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}, {\ttfamily [signal]}}}\label{a00778_ab0ff1379c8613bfbac7ecd48e9456bef}


Save object to a file. 


\begin{DoxyParams}{Parameters}
{\em \+\_\+id} & Object to Save \\
\hline
{\em \+\_\+filename} & Filename to save it to (Leave as \char`\"{}\char`\"{} to automatically determine filename) \\
\hline
\end{DoxyParams}


Definition at line 81 of file Load\+Save\+Interface.\+hh.



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