#include <photosIconView.h>
Inheritance diagram for PhotosIconView:
Definition at line 32 of file photosIconView.h.
Signals | |
| void | itemHasMoved () |
Public Member Functions | |
| PhotosIconView (QWidget *parent) | |
| int | numSelected () |
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 |
|
|
Definition at line 24 of file photosIconView.cpp.
00024 : QIconView( parent ) 00025 { 00026 } |
|
|
Definition at line 28 of file photosIconView.cpp. References itemHasMoved().
00029 {
00030 QIconView::contentsDropEvent( e );
00031
00032 //get iconviewitem that was dropped
00033 QIconViewItem *item = findItem( e->pos() );
00034
00035 //if item exists and drop item was originally in this viewport then
00036 //user has dragged item within iconview, emit item has moved signal
00037 if( item != NULL && e->source() == viewport())
00038 emit itemHasMoved();
00039 }
|
|
||||||||||||||||||||||||
|
Definition at line 41 of file photosIconView.cpp. References bufferPixmap.
00042 {
00043 if( bufferPixmap.size() != size())
00044 { bufferPixmap.resize( size() ); }
00045 QPainter bufferPainter( &bufferPixmap, viewport() );
00046 int xOffset = clipx - contentsX();
00047 int yOffset = clipy - contentsY();
00048
00049 bufferPainter.translate( -contentsX(), -contentsY() );
00050 QIconView::drawContents( &bufferPainter, clipx, clipy, clipw, cliph );
00051 bitBlt(p->device(), xOffset, yOffset, &bufferPixmap, xOffset, yOffset, clipw, cliph );
00052 }
|
|
|
Referenced by contentsDropEvent(). |
|
|
Definition at line 54 of file photosIconView.cpp. Referenced by SubalbumWidget::flipHorizontallyImageAction(), SubalbumWidget::flipVerticallyImageAction(), SubalbumWidget::rotate270ImageAction(), and SubalbumWidget::rotate90ImageAction().
00055 {
00056 int num = 0;
00057 QIconViewItem* current = firstItem();
00058 while(current != NULL)
00059 {
00060 if(current->isSelected())
00061 num++;
00062 current = current->nextItem();
00063 }
00064 return num;
00065 }
|
|
|
Definition at line 50 of file photosIconView.h. Referenced by drawContents(). |
1.3.4