AlbumShaper 1.0a3
photoPreviewWidget.h
Go to the documentation of this file.
1//Added by qt3to4:
2#include <QPixmap>
3//==============================================
4// copyright : (C) 2003-2005 by Will Stokes
5//==============================================
6// This program is free software; you can redistribute it
7// and/or modify it under the terms of the GNU General
8// Public License as published by the Free Software
9// Foundation; either version 2 of the License, or
10// (at your option) any later version.
11//==============================================
12
13#ifndef GUI_PHOTOPREVIEWWIDGET_H
14#define GUI_PHOTOPREVIEWWIDGET_H
15
16//--------------------
17//forward declarations
18class QPixmap;
19class QString;
20class Photo;
21//--------------------
22
23#define PHOTO_MARGIN 4
24#define PHOTO_SHADOW 3
25#define PHOTO_SHADOW_END_OFFSET 2
26#define PHOTO_TEXT_MARGIN 1
27
28#include <q3iconview.h>
29
30//=====================================
33//=====================================
35{
36public:
39
41 Photo* getPhoto();
42
44 void updateImage();
45
47 void updateDescription();
48
49 void paint( QPainter *p );
50
52 void paintItem( QPainter* p,
53 const QColorGroup& cg);
54
55 void paintFocus( QPainter *p, const QColorGroup &cg );
56
57 void setText ( const QString & text );
58
59 void setPixmap(const QPixmap& p, bool redraw);
60
61 bool acceptDrop( const QMimeSource *e) const;
62
63 int compare ( Q3IconViewItem * i ) const;
64
65 void setMousedOver(bool val);
66
67 QRect getPhotoInfoRect();
68
69 //returns the top left corner of the displayed image in screen coordinates
70 QPoint getPhotoPos();
71 //----------------------
72private:
73 void initializeItemRect();
74
77
79
81
83
87};
88//======================
89
90#endif //GUI_PHOTOPREVIEWWIDGET_H
Displays photo thumbnail and description.
void setPixmap(const QPixmap &p, bool redraw)
int compare(Q3IconViewItem *i) const
void updateImage()
Update photo thumbnail from background object.
Photo * phto
Pointer to photo backend object.
void paint(QPainter *p)
int pixmapXOffset
offsets used to center pixmap
PhotoPreviewWidget(Q3IconView *parent, Photo *phto)
Sets subalbum pointer.
void updateDescription()
Update photo description.
bool acceptDrop(const QMimeSource *e) const
void paintItem(QPainter *p, const QColorGroup &cg)
Repain iconview item.
void paintFocus(QPainter *p, const QColorGroup &cg)
void setText(const QString &text)
Photo * getPhoto()
Returns photo pointer.
A photo consists of a full size image, a smaller slide show image, a very small thumbnail image,...
Definition photo.h:45