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
23 class QPixmap;
24 class QPainter;
25 class PhotoPreviewWidget;
26 class QPaintEvent;
27 class PhotoDescEdit;
28 //--------------------
29 
30 #include <q3iconview.h>
31 
32 //=====================================
35 //=====================================
36 class PhotosIconView : public Q3IconView
37 {
38 Q_OBJECT
39 
40 public:
41  PhotosIconView( QWidget *parent );
42 
43  //returns the number of selected items
44  int numSelected();
45 public slots:
46  void clearPseudoSelection();
47  void repaintGroup( Q3IconViewItem* pseudoSelection);
48  //----------------------
49 signals:
50  void itemHasMoved();
51  void addPhotos(QStringList);
52 
53  //the following signals are emitted in response to key events
54  void removeSelectedPhotos();
57  void editSelectedPhoto();
58 //----------------------
59 protected:
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 //----------------------
68 private slots:
69  void setAlbumImage( );
70  void setSubalbumImage( );
71  void captureClick(Q3IconViewItem*, const QPoint&);
72 //--
73 private:
74  void contentsDropEvent( QDropEvent *e );
75 
76  bool findNearestUnselectedPhoto( const QPoint &pos, Q3IconViewItem** nearestItem, bool &posIsleftOfItem );
77 
79  QPixmap* backgroundImage;
80  QPixmap bufferPixmap;
81  QPixmap* dragIcon;
84  QPoint dragStartPos;
85 
87 //----------------------
88 };
89 //======================
90 
91 #endif //GUI_PHOTOSICONVIEW_H
void contentsMouseMoveEvent(QMouseEvent *e)
void contentsMousePressEvent(QMouseEvent *e)
void contentsDropEvent(QDropEvent *e)
void addPhotos(QStringList)
QPixmap * backgroundImage
PhotoDescEdit * curPhotoDescEdit
void rotate270SelectedPhotos()
Displays photo thumbnail and description.
void repaintGroup(Q3IconViewItem *pseudoSelection)
void contextMenuEvent(QContextMenuEvent *e)
PhotosIconView(QWidget *parent)
Q3DragObject * dragObject()
void keyPressEvent(QKeyEvent *e)
Extension of iconview, used to list all photos in a subalbum. supports drag-n-drop within iconview...
QPixmap * dragIcon
void drawBackground(QPainter *p, const QRect &r)
void clearPseudoSelection()
QPixmap bufferPixmap
bool findNearestUnselectedPhoto(const QPoint &pos, Q3IconViewItem **nearestItem, bool &posIsleftOfItem)
void editSelectedPhoto()
void rotate90SelectedPhotos()
void captureClick(Q3IconViewItem *, const QPoint &)
void itemHasMoved()
void removeSelectedPhotos()
PhotoPreviewWidget * currentPseudoSelection
void drawContents(QPainter *p, int clipx, int clipy, int clipw, int cliph)
PhotoPreviewWidget * rightClickedPhoto