AlbumShaper  1.0a3
subalbumsIconView.h
Go to the documentation of this file.
1 //Added by qt3to4:
2 #include <QMouseEvent>
3 #include <QDragMoveEvent>
4 #include <QDropEvent>
5 #include <QPixmap>
6 //==============================================
7 // copyright : (C) 2003-2005 by Will Stokes
8 //==============================================
9 // This program is free software; you can redistribute it
10 // and/or modify it under the terms of the GNU General
11 // Public License as published by the Free Software
12 // Foundation; either version 2 of the License, or
13 // (at your option) any later version.
14 //==============================================
15 
16 #ifndef GUI_SUBALBUMSICONVIEW_H
17 #define GUI_SUBALBUMSICONVIEW_H
18 
19 //--------------------
20 //forward declarations
21 class QPixmap;
22 class QPainter;
23 class Q3DragObject;
25 //--------------------
26 
27 #include <q3iconview.h>
28 #include <qapplication.h>
29 
30 //=====================================
35 //=====================================
37 {
38 Q_OBJECT
39 
40 public:
41  SubalbumsIconView( QWidget *parent );
42  int getTextWidth();
43 
44  QSize minimumSizeHint() const;
45  QSize sizeHint() const;
46 
47 //----------------------
48 signals:
49  void itemHasMoved();
50 //----------------------
51 protected:
52  void drawContents ( QPainter * p, int clipx, int clipy, int clipw, int cliph );
53  Q3DragObject *dragObject();
54 
55  void contentsMousePressEvent( QMouseEvent * e );
56  void contentsDragMoveEvent( QDragMoveEvent* e );
57 //----------------------
58 private slots:
59  void repaintGroup( Q3IconViewItem* pseudoSelection);
60  void clearPseudoSelection();
61 //--
62 private:
63  void contentsDropEvent( QDropEvent *e );
64  QPixmap bufferPixmap;
65  QPoint dragStartPos;
67 
68  //width allocated to iconview items text.
69  //IconViewItems will request this value when running calcRect()
70  int textWidth;
71 //----------------------
72 };
73 //======================
74 
75 
76 #endif //GUI_SUBALBUMSICONVIEW_H
SubalbumsIconView(QWidget *parent)
void contentsDropEvent(QDropEvent *e)
Extension of iconview, used to list all subalbums in album. Supports drag-n-drop within iconview such...
Q3DragObject * dragObject()
void contentsDragMoveEvent(QDragMoveEvent *e)
Displays subalbum icon and name.
void contentsMousePressEvent(QMouseEvent *e)
void repaintGroup(Q3IconViewItem *pseudoSelection)
void drawContents(QPainter *p, int clipx, int clipy, int clipw, int cliph)
SubalbumPreviewWidget * currentPseudoSelection
QSize minimumSizeHint() const