\section{KNew\-Stuff\-Generic Class Reference}
\label{classKNewStuffGeneric}\index{KNewStuffGeneric@{KNewStuffGeneric}}
Basic {\bf KNew\-Stuff}{\rm (p.\,\pageref{classKNewStuff})} class with predefined actions.  


{\tt \#include $<$knewstuffgeneric.h$>$}

Inheritance diagram for KNew\-Stuff\-Generic:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=67pt]{classKNewStuffGeneric__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KNew\-Stuff\-Generic:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=67pt]{classKNewStuffGeneric__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KNew\-Stuff\-Generic} (const {\bf QString} \&type, {\bf QWidget} $\ast$parent=0)
\item 
bool {\bf install} (const {\bf QString} \&file\-Name)
\item 
bool {\bf create\-Upload\-File} (const {\bf QString} \&file\-Name)
\item 
{\bf QString} {\bf download\-Destination} ({\bf KNS::Entry} $\ast$entry)
\end{CompactItemize}


\subsection{Detailed Description}
Basic {\bf KNew\-Stuff}{\rm (p.\,\pageref{classKNewStuff})} class with predefined actions. 

This class is used for data uploads and installation. 

\footnotesize\begin{verbatim} QString payload, preview;
 KNewStuffGeneric *ns = new KNewStuffGeneric("kamikaze/level", this);
 ns->upload(payload, preview);
\end{verbatim}
\normalsize


\begin{Desc}
\item[Author:]Cornelius Schumacher ({\tt schumacher@kde.org}) \end{Desc}
\begin{Desc}
\item[Maintainer:]Josef Spillner ({\tt spillner@kde.org}) \end{Desc}




Definition at line 42 of file knewstuffgeneric.h.

\subsection{Constructor \& Destructor Documentation}
\index{KNewStuffGeneric@{KNew\-Stuff\-Generic}!KNewStuffGeneric@{KNewStuffGeneric}}
\index{KNewStuffGeneric@{KNewStuffGeneric}!KNewStuffGeneric@{KNew\-Stuff\-Generic}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KNew\-Stuff\-Generic::KNew\-Stuff\-Generic (const {\bf QString} \& {\em type}, {\bf QWidget} $\ast$ {\em parent} = {\tt 0})}\label{classKNewStuffGeneric_a0}


Constructor. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em type}]a Hotstuff data type such as \char`\"{}korganizer/calendar\char`\"{} \item[{\em parent}]the parent window. \end{description}
\end{Desc}


Definition at line 40 of file knewstuffgeneric.cpp.

\subsection{Member Function Documentation}
\index{KNewStuffGeneric@{KNew\-Stuff\-Generic}!install@{install}}
\index{install@{install}!KNewStuffGeneric@{KNew\-Stuff\-Generic}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KNew\-Stuff\-Generic::install (const {\bf QString} \& {\em file\-Name})\hspace{0.3cm}{\tt  [virtual]}}\label{classKNewStuffGeneric_a2}


Installs a downloaded file according to the application's configuration. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em file\-Name}]filename of the donwloaded file \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]{\tt true} in case of installation success, {\tt false} otherwise \end{Desc}


Implements {\bf KNew\-Stuff} {\rm (p.\,\pageref{classKNewStuff_a8})}.

Definition at line 50 of file knewstuffgeneric.cpp.

References QString::is\-Empty(), QFile::remove(), and QString\-List::split().\index{KNewStuffGeneric@{KNew\-Stuff\-Generic}!createUploadFile@{createUploadFile}}
\index{createUploadFile@{createUploadFile}!KNewStuffGeneric@{KNew\-Stuff\-Generic}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KNew\-Stuff\-Generic::create\-Upload\-File (const {\bf QString} \& {\em file\-Name})\hspace{0.3cm}{\tt  [virtual]}}\label{classKNewStuffGeneric_a3}


Creates a file suitable for upload. 

Note that this method always fails, since using KNew\-Stuff\-Generic means that the provided file must already be in a usable format.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em file\-Name}]the name of the file to upload after its creation \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]{\tt true} in case of creation success, {\tt false} otherwise \end{Desc}


Implements {\bf KNew\-Stuff} {\rm (p.\,\pageref{classKNewStuff_a9})}.

Definition at line 83 of file knewstuffgeneric.cpp.\index{KNewStuffGeneric@{KNew\-Stuff\-Generic}!downloadDestination@{downloadDestination}}
\index{downloadDestination@{downloadDestination}!KNewStuffGeneric@{KNew\-Stuff\-Generic}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KNew\-Stuff\-Generic::download\-Destination ({\bf KNS::Entry} $\ast$ {\em entry})\hspace{0.3cm}{\tt  [virtual]}}\label{classKNewStuffGeneric_a4}


Queries the preferred destination file for a download. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em entry}]a Hotstuff data entry \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]destination filename, or 0 to return directory only \end{Desc}


Reimplemented from {\bf KNew\-Stuff} {\rm (p.\,\pageref{classKNewStuff_a10})}.

Definition at line 127 of file knewstuffgeneric.cpp.

References KNew\-Stuff::parent\-Widget().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
knewstuffgeneric.h\item 
knewstuffgeneric.cpp\end{CompactItemize}
