Main Page   Compound List   File List   Compound Members   File Members  

PhotosIconView Class Reference

#include <photosIconView.h>

List of all members.


Detailed Description

Extension of iconview, used to list all photos in a subalbum. supports drag-n-drop within iconview.

Definition at line 32 of file photosIconView.h.

Signals

void itemHasMoved ()

Public Member Functions

 PhotosIconView (QWidget *parent)

Protected Member Functions

void drawContents (QPainter *p, int clipx, int clipy, int clipw, int cliph)

Private Member Functions

void contentsDropEvent (QDropEvent *e)

Private Attributes

QPixmap bufferPixmap


Constructor & Destructor Documentation

PhotosIconView::PhotosIconView QWidget *  parent  ) 
 

Definition at line 27 of file photosIconView.cpp.

00027                                                 : QIconView( parent )
00028 {
00029 }


Member Function Documentation

void PhotosIconView::contentsDropEvent QDropEvent *  e  )  [private]
 

Definition at line 31 of file photosIconView.cpp.

References itemHasMoved().

00032 {
00033   QIconView::contentsDropEvent( e );
00034 
00035   //get iconviewitem that was dropped  
00036   QIconViewItem *item = findItem( e->pos() );
00037   
00038   //if item exists and drop item was originally in this viewport then
00039   //user has dragged item within iconview, emit item has moved signal
00040   if( item != NULL && e->source() == viewport())
00041     emit itemHasMoved();
00042 }

void PhotosIconView::drawContents QPainter *  p,
int  clipx,
int  clipy,
int  clipw,
int  cliph
[protected]
 

Definition at line 44 of file photosIconView.cpp.

References bufferPixmap.

00045 {
00046     if( bufferPixmap.size() != size())
00047     {  bufferPixmap.resize( size() ); }
00048     QPainter bufferPainter( &bufferPixmap, viewport() );
00049     int xOffset = clipx - contentsX();
00050     int yOffset = clipy - contentsY();
00051 
00052     bufferPainter.translate( -contentsX(), -contentsY() );
00053     QIconView::drawContents( &bufferPainter, clipx, clipy, clipw, cliph );
00054     bitBlt(p->device(), xOffset, yOffset, &bufferPixmap, xOffset, yOffset, clipw, cliph );
00055 }

void PhotosIconView::itemHasMoved  )  [signal]
 

Referenced by contentsDropEvent().


Member Data Documentation

QPixmap PhotosIconView::bufferPixmap [private]
 

Definition at line 47 of file photosIconView.h.

Referenced by drawContents().


The documentation for this class was generated from the following files:
Generated on Tue Jun 10 23:41:23 2003 for AlbumShaper by doxygen 1.3.1