AlbumShaper 1.0a3
subalbumPreviewWidget.h
Go to the documentation of this file.
1//Added by qt3to4:
2#include <Q3ValueList>
3#include <QDropEvent>
4#include <QPixmap>
5//==============================================
6// copyright : (C) 2003-2005 by Will Stokes
7//==============================================
8// This program is free software; you can redistribute it
9// and/or modify it under the terms of the GNU General
10// Public License as published by the Free Software
11// Foundation; either version 2 of the License, or
12// (at your option) any later version.
13//==============================================
14
15#ifndef GUI_SUBALBUMPREVIEWWIDGET_H
16#define GUI_SUBALBUMPREVIEWWIDGET_H
17
18//--------------------
19//forward declarations
20class Subalbum;
21class QPixmap;
22class QString;
24//--------------------
25
26#include <q3iconview.h>
27#include <qobject.h>
28
29//=====================================
32//=====================================
34{
35public:
38 Subalbum* salbum );
39
42
43 void paintFocus( QPainter *p, const QColorGroup &cg );
44
45 bool acceptDrop( const QMimeSource *e) const;
46
47 int compare ( Q3IconViewItem * i ) const;
48
49 static QPixmap* createSubalbumPixmap( QString imageName );
50
51 void setText ( const QString & text );
52 void setMousedOver(bool val);
53 void paint( QPainter *p );
54//----------------------
55protected:
56 void calcRect ( const QString & text_ = QString::null );
57 void paintItem( QPainter* p,
58 const QColorGroup& cg);
59//----------------------
60private:
61 void dropped( QDropEvent *e, const Q3ValueList<Q3IconDragItem> &lst );
62
63 QColor blendColors( QColor a, QColor b, double alpha);
64
67
70
72 QString* subalbumName;
73
76
79
80 //initializes item rect size
81 void initializeItemRect();
82//----------------------
83};
84//======================
85
86#endif //GUI_SUBALBUMPREVIEWWIDGET_H
Displays subalbum icon and name.
void paintItem(QPainter *p, const QColorGroup &cg)
Subalbum * getSubalbum()
Returns subalbum pointer.
bool acceptDrop(const QMimeSource *e) const
void dropped(QDropEvent *e, const Q3ValueList< Q3IconDragItem > &lst)
QPixmap * subalbumPreviewImage
Representative Image for Subalbum.
void setText(const QString &text)
Subalbum * subalbum
Pointer to subalbum backend object.
QColor blendColors(QColor a, QColor b, double alpha)
bool mousedOver
is the mouse over the widget
static QPixmap * createSubalbumPixmap(QString imageName)
SubalbumsIconView * parent
parent icon view
int compare(Q3IconViewItem *i) const
SubalbumPreviewWidget(SubalbumsIconView *parent, Subalbum *salbum)
Sets subalbum pointer.
void paintFocus(QPainter *p, const QColorGroup &cg)
void calcRect(const QString &text_=QString::null)
QString * subalbumName
Subalbum's Name.
A subalbum contains photos.
Definition subalbum.h:49
Extension of iconview, used to list all subalbums in album. Supports drag-n-drop within iconview such...
long b