AlbumShaper 1.0a3
photosIconView.h
Go to the documentation of this file.
1//Added by qt3to4:
2#include <QPixmap>
3#include <QDropEvent>
4#include <QMouseEvent>
5#include <QContextMenuEvent>
6#include <QKeyEvent>
7#include <QPaintEvent>
8//==============================================
9// copyright : (C) 2003-2005 by Will Stokes
10//==============================================
11// This program is free software; you can redistribute it
12// and/or modify it under the terms of the GNU General
13// Public License as published by the Free Software
14// Foundation; either version 2 of the License, or
15// (at your option) any later version.
16//==============================================
17
18#ifndef GUI_PHOTOSICONVIEW_H
19#define GUI_PHOTOSICONVIEW_H
20
21//--------------------
22//forward declarations
23class QPixmap;
24class QPainter;
26class QPaintEvent;
27class PhotoDescEdit;
28//--------------------
29
30#include <q3iconview.h>
31
32//=====================================
35//=====================================
37{
38Q_OBJECT
39
40public:
41 PhotosIconView( QWidget *parent );
42
43 //returns the number of selected items
44 int numSelected();
45public slots:
47 void repaintGroup( Q3IconViewItem* pseudoSelection);
48 //----------------------
49signals:
51 void addPhotos(QStringList);
52
53 //the following signals are emitted in response to key events
58//----------------------
59protected:
60 Q3DragObject *dragObject();
61 void drawContents ( QPainter * p, int clipx, int clipy, int clipw, int cliph );
62 void drawBackground( QPainter* p, const QRect& r);
63 void contextMenuEvent ( QContextMenuEvent* e );
64 void contentsMouseMoveEvent( QMouseEvent *e);
65 void contentsMousePressEvent ( QMouseEvent * e );
66 void keyPressEvent( QKeyEvent *e );
67//----------------------
68private slots:
69 void setAlbumImage( );
70 void setSubalbumImage( );
71 void captureClick(Q3IconViewItem*, const QPoint&);
72//--
73private:
74 void contentsDropEvent( QDropEvent *e );
75
76 bool findNearestUnselectedPhoto( const QPoint &pos, Q3IconViewItem** nearestItem, bool &posIsleftOfItem );
77
80 QPixmap bufferPixmap;
81 QPixmap* dragIcon;
85
87//----------------------
88};
89//======================
90
91#endif //GUI_PHOTOSICONVIEW_H
Displays photo thumbnail and description.
Extension of iconview, used to list all photos in a subalbum. supports drag-n-drop within iconview.
void contentsDropEvent(QDropEvent *e)
void rotate270SelectedPhotos()
void contentsMousePressEvent(QMouseEvent *e)
void drawContents(QPainter *p, int clipx, int clipy, int clipw, int cliph)
QPixmap * backgroundImage
QPixmap * dragIcon
PhotoPreviewWidget * currentPseudoSelection
void rotate90SelectedPhotos()
void contextMenuEvent(QContextMenuEvent *e)
PhotoPreviewWidget * rightClickedPhoto
void itemHasMoved()
PhotoDescEdit * curPhotoDescEdit
void contentsMouseMoveEvent(QMouseEvent *e)
void repaintGroup(Q3IconViewItem *pseudoSelection)
void addPhotos(QStringList)
void keyPressEvent(QKeyEvent *e)
PhotosIconView(QWidget *parent)
void drawBackground(QPainter *p, const QRect &r)
void removeSelectedPhotos()
void editSelectedPhoto()
void captureClick(Q3IconViewItem *, const QPoint &)
bool findNearestUnselectedPhoto(const QPoint &pos, Q3IconViewItem **nearestItem, bool &posIsleftOfItem)
Q3DragObject * dragObject()