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
20 class Subalbum;
21 class QPixmap;
22 class QString;
23 class SubalbumsIconView;
24 //--------------------
25 
26 #include <q3iconview.h>
27 #include <qobject.h>
28 
29 //=====================================
32 //=====================================
34 {
35 public:
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 //----------------------
55 protected:
56  void calcRect ( const QString & text_ = QString::null );
57  void paintItem( QPainter* p,
58  const QColorGroup& cg);
59 //----------------------
60 private:
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 
78  bool mousedOver;
79 
80  //initializes item rect size
81  void initializeItemRect();
82 //----------------------
83 };
84 //======================
85 
86 #endif //GUI_SUBALBUMPREVIEWWIDGET_H
Subalbum * getSubalbum()
Returns subalbum pointer.
Extension of iconview, used to list all subalbums in album. Supports drag-n-drop within iconview such...
long b
Definition: jpegInternal.h:125
void paintFocus(QPainter *p, const QColorGroup &cg)
int compare(Q3IconViewItem *i) const
A subalbum contains photos.
Definition: subalbum.h:48
Subalbum * subalbum
Pointer to subalbum backend object.
QColor blendColors(QColor a, QColor b, double alpha)
Displays subalbum icon and name.
SubalbumsIconView * parent
parent icon view
static QPixmap * createSubalbumPixmap(QString imageName)
bool acceptDrop(const QMimeSource *e) const
void calcRect(const QString &text_=QString::null)
bool mousedOver
is the mouse over the widget
QString * subalbumName
Subalbum&#39;s Name.
SubalbumPreviewWidget(SubalbumsIconView *parent, Subalbum *salbum)
Sets subalbum pointer.
void dropped(QDropEvent *e, const Q3ValueList< Q3IconDragItem > &lst)
void paintItem(QPainter *p, const QColorGroup &cg)
QPixmap * subalbumPreviewImage
Representative Image for Subalbum.
void setText(const QString &text)