.TH "KPixmapSplitter" kde3 "11 Jun 2005" "Version Version 3.4.1" "kdefx Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KPixmapSplitter \- A class to split a pixmap into several items.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kpixmapsplitter.h>\fP
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKPixmapSplitter\fP ()"
.br
.ti -1c
.RI "void \fBsetPixmap\fP (const \fBQPixmap\fP &pixmap)"
.br
.ti -1c
.RI "const \fBQPixmap\fP & \fBpixmap\fP () const "
.br
.ti -1c
.RI "void \fBsetItemSize\fP (const \fBQSize\fP &size)"
.br
.ti -1c
.RI "\fBQSize\fP \fBitemSize\fP () const "
.br
.ti -1c
.RI "void \fBsetVSpacing\fP (int spacing)"
.br
.ti -1c
.RI "void \fBsetHSpacing\fP (int spacing)"
.br
.ti -1c
.RI "\fBQRect\fP \fBcoordinates\fP (int pos)"
.br
.ti -1c
.RI "\fBQRect\fP \fBcoordinates\fP (const \fBQChar\fP &ch)"
.br
.in -1c
.SH "Detailed Description"
.PP 
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.
.PP
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): 
.PP
.nf
 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 );

.fi
.PP
.PP
\fBAuthor:\fP
.RS 4
Carsten Pfeiffer <pfeiffer@kde.org> 
.RE
.PP

.PP
Definition at line 53 of file kpixmapsplitter.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KPixmapSplitter::KPixmapSplitter ()"
.PP
Constructor, does nothing but initialize some default-values. 
.PP
Definition at line 22 of file kpixmapsplitter.cpp.
.SH "Member Function Documentation"
.PP 
.SS "void KPixmapSplitter::setPixmap (const \fBQPixmap\fP & pixmap)"
.PP
Sets the pixmap to be split. 
.PP
Definition at line 36 of file kpixmapsplitter.cpp.
.PP
References pixmap().
.SS "const \fBQPixmap\fP& KPixmapSplitter::pixmap () const\fC [inline]\fP"
.PP
\fBReturns:\fP
.RS 4
the pixmap that has been set via \fBsetPixmap()\fP. 
.RE
.PP

.PP
Definition at line 70 of file kpixmapsplitter.h.
.PP
Referenced by setPixmap().
.SS "void KPixmapSplitter::setItemSize (const \fBQSize\fP & size)"
.PP
Sets the size of the items you want to get out of the given pixmap. 
.PP
The \fBQRect\fP of \fBcoordinates(int)\fP will have the width and height of exactly this \fCsize\fP. 
.PP
Definition at line 42 of file kpixmapsplitter.cpp.
.SS "\fBQSize\fP KPixmapSplitter::itemSize () const\fC [inline]\fP"
.PP
\fBReturns:\fP
.RS 4
the set size of the items (coordinates) you want to get out of the given pixmap. 
.RE
.PP

.PP
Definition at line 83 of file kpixmapsplitter.h.
.SS "void KPixmapSplitter::setVSpacing (int spacing)"
.PP
If there is space between rows in the given pixmap, you have to specify how many pixels there are. 
.PP
Definition at line 50 of file kpixmapsplitter.cpp.
.SS "void KPixmapSplitter::setHSpacing (int spacing)"
.PP
If there is space between columns in the given pixmap, you have to specify how many pixels there are. 
.PP
Definition at line 58 of file kpixmapsplitter.cpp.
.SS "\fBQRect\fP KPixmapSplitter::coordinates (int pos)"
.PP
\fBReturns:\fP
.RS 4
the coordinates of the item at position pos in the given pixmap. 
.RE
.PP

.PP
Definition at line 67 of file kpixmapsplitter.cpp.
.PP
References QSize::height(), QPixmap::height(), QPixmap::isNull(), QSize::width(), and QPixmap::width().
.PP
Referenced by coordinates().
.SS "\fBQRect\fP KPixmapSplitter::coordinates (const \fBQChar\fP & ch)"
.PP
Overloaded for convenience. 
.PP
Returns the item at the position of the given character (when using a latin1 font-pixmap) 
.PP
Definition at line 91 of file kpixmapsplitter.cpp.
.PP
References coordinates().

.SH "Author"
.PP 
Generated automatically by Doxygen for kdefx Library from the source code.
