\section{KPixmap\-Splitter Class Reference}
\label{classKPixmapSplitter}\index{KPixmapSplitter@{KPixmapSplitter}}
A class to split a pixmap into several items.  


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

Collaboration diagram for KPixmap\-Splitter:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=99pt]{classKPixmapSplitter__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KPixmap\-Splitter} ()
\item 
void {\bf set\-Pixmap} (const {\bf QPixmap} \&pixmap)
\item 
const {\bf QPixmap} \& {\bf pixmap} () const 
\item 
void {\bf set\-Item\-Size} (const {\bf QSize} \&size)
\item 
{\bf QSize} {\bf item\-Size} () const 
\item 
void {\bf set\-VSpacing} (int spacing)
\item 
void {\bf set\-HSpacing} (int spacing)
\item 
{\bf QRect} {\bf coordinates} (int pos)
\item 
{\bf QRect} {\bf coordinates} (const {\bf QChar} \&ch)
\end{CompactItemize}


\subsection{Detailed Description}
A class to split a pixmap into several items. 

If you have a pixmap containing several items (icons), you can use this class to get the coordinates of each item.

For example, if you have a pixmap with 25 items and you want to get the 4th item as a pixmap (every item being 20x10 pixels): 

\footnotesize\begin{verbatim} KPixmapSplitter splitter;
 splitter.setPixmap( somePixmap );
 splitter.setItemSize( QSize( 20, 10 ));

 QPixmap item( 20, 10 );
 item.fill( Qt::white );
 QRect rect = splitter.coordinates( 4 );
 if ( !rect.isEmpty() )
     bitBlt( &item, QPoint(0,0), &somePixmap, rect, CopyROP );
\end{verbatim}
\normalsize


\begin{Desc}
\item[Author:]Carsten Pfeiffer $<${\tt pfeiffer@kde.org}$>$ \end{Desc}




Definition at line 53 of file kpixmapsplitter.h.

\subsection{Constructor \& Destructor Documentation}
\index{KPixmapSplitter@{KPixmap\-Splitter}!KPixmapSplitter@{KPixmapSplitter}}
\index{KPixmapSplitter@{KPixmapSplitter}!KPixmapSplitter@{KPixmap\-Splitter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KPixmap\-Splitter::KPixmap\-Splitter ()}\label{classKPixmapSplitter_a0}


Constructor, does nothing but initialize some default-values. 



Definition at line 22 of file kpixmapsplitter.cpp.

\subsection{Member Function Documentation}
\index{KPixmapSplitter@{KPixmap\-Splitter}!setPixmap@{setPixmap}}
\index{setPixmap@{setPixmap}!KPixmapSplitter@{KPixmap\-Splitter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KPixmap\-Splitter::set\-Pixmap (const {\bf QPixmap} \& {\em pixmap})}\label{classKPixmapSplitter_a2}


Sets the pixmap to be split. 



Definition at line 36 of file kpixmapsplitter.cpp.

References pixmap().\index{KPixmapSplitter@{KPixmap\-Splitter}!pixmap@{pixmap}}
\index{pixmap@{pixmap}!KPixmapSplitter@{KPixmap\-Splitter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const {\bf QPixmap}\& KPixmap\-Splitter::pixmap () const\hspace{0.3cm}{\tt  [inline]}}\label{classKPixmapSplitter_a3}


\begin{Desc}
\item[Returns:]the pixmap that has been set via {\bf set\-Pixmap()}{\rm (p.\,\pageref{classKPixmapSplitter_a2})}. \end{Desc}


Definition at line 70 of file kpixmapsplitter.h.

Referenced by set\-Pixmap().\index{KPixmapSplitter@{KPixmap\-Splitter}!setItemSize@{setItemSize}}
\index{setItemSize@{setItemSize}!KPixmapSplitter@{KPixmap\-Splitter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KPixmap\-Splitter::set\-Item\-Size (const {\bf QSize} \& {\em size})}\label{classKPixmapSplitter_a4}


Sets the size of the items you want to get out of the given pixmap. 

The {\bf QRect} of {\bf coordinates(int)}{\rm (p.\,\pageref{classKPixmapSplitter_a8})} will have the width and height of exactly this {\tt size}. 

Definition at line 42 of file kpixmapsplitter.cpp.\index{KPixmapSplitter@{KPixmap\-Splitter}!itemSize@{itemSize}}
\index{itemSize@{itemSize}!KPixmapSplitter@{KPixmap\-Splitter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QSize} KPixmap\-Splitter::item\-Size () const\hspace{0.3cm}{\tt  [inline]}}\label{classKPixmapSplitter_a5}


\begin{Desc}
\item[Returns:]the set size of the items (coordinates) you want to get out of the given pixmap. \end{Desc}


Definition at line 83 of file kpixmapsplitter.h.\index{KPixmapSplitter@{KPixmap\-Splitter}!setVSpacing@{setVSpacing}}
\index{setVSpacing@{setVSpacing}!KPixmapSplitter@{KPixmap\-Splitter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KPixmap\-Splitter::set\-VSpacing (int {\em spacing})}\label{classKPixmapSplitter_a6}


If there is space between rows in the given pixmap, you have to specify how many pixels there are. 



Definition at line 50 of file kpixmapsplitter.cpp.\index{KPixmapSplitter@{KPixmap\-Splitter}!setHSpacing@{setHSpacing}}
\index{setHSpacing@{setHSpacing}!KPixmapSplitter@{KPixmap\-Splitter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KPixmap\-Splitter::set\-HSpacing (int {\em spacing})}\label{classKPixmapSplitter_a7}


If there is space between columns in the given pixmap, you have to specify how many pixels there are. 



Definition at line 58 of file kpixmapsplitter.cpp.\index{KPixmapSplitter@{KPixmap\-Splitter}!coordinates@{coordinates}}
\index{coordinates@{coordinates}!KPixmapSplitter@{KPixmap\-Splitter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QRect} KPixmap\-Splitter::coordinates (int {\em pos})}\label{classKPixmapSplitter_a8}


\begin{Desc}
\item[Returns:]the coordinates of the item at position pos in the given pixmap. \end{Desc}


Definition at line 67 of file kpixmapsplitter.cpp.

References QSize::height(), QPixmap::height(), QPixmap::is\-Null(), QSize::width(), and QPixmap::width().

Referenced by coordinates().\index{KPixmapSplitter@{KPixmap\-Splitter}!coordinates@{coordinates}}
\index{coordinates@{coordinates}!KPixmapSplitter@{KPixmap\-Splitter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QRect} KPixmap\-Splitter::coordinates (const {\bf QChar} \& {\em ch})}\label{classKPixmapSplitter_a9}


Overloaded for convenience. 

Returns the item at the position of the given character (when using a latin1 font-pixmap) 

Definition at line 91 of file kpixmapsplitter.cpp.

References coordinates().

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