AlbumShaper 1.0a3
presentationWidget.h
Go to the documentation of this file.
1//==============================================
2// copyright : (C) 2003-2005 by Will Stokes
3//==============================================
4// This program is free software; you can redistribute it
5// and/or modify it under the terms of the GNU General
6// Public License as published by the Free Software
7// Foundation; either version 2 of the License, or
8// (at your option) any later version.
9//==============================================
10
11#ifndef GUI_PRESENTATION_SLIDESHOWWIDGET_H
12#define GUI_PRESENTATION_SLIDESHOWWIDGET_H
13
14//--------------------
15//forward declarations
16//--------------------
17class Album;
18class Subalbum;
19class Photo;
20class QTimer;
21
22#include <qwidget.h>
23#include <qimage.h>
24#include <qpixmap.h>
25#include <qdatetime.h>
26#include <qmutex.h>
27
37
38//=====================================
40{
41Q_OBJECT
42//----------------------
43public:
44 SlideshowWidget( QWidget *parent=0, const char* name=0, WFlags f=0 );
45 void beginSlideshow(Album* albm, Subalbum* startCollection=NULL, Photo* startPhoto=NULL);
46
49
52 //----------------------
53protected:
54 void paintEvent( QPaintEvent* );
55 void keyPressEvent(QKeyEvent *e);
56 void mousePressEvent(QMouseEvent *e);
57 void mouseMoveEvent( QMouseEvent *e);
58 void contextMenuEvent ( QContextMenuEvent* e );
59
60 void showCoverPage();
61 void showCollectionPage(Subalbum* subalbum);
62 void loadPhoto();
63 void showPhoto();
64 void refreshScreen();
66 void exchangePhotos();
67//----------------------
68signals:
70//----------------------
71private slots:
72 void animate();
73
74 //advance one photo
75 void advancePhoto();
76
77 //backup one photo
78 void backupPhoto();
79
80 //skip to first photo in collection
81 void skipToFirstPhoto();
82
83 //skip to last photo in collection
84 void skipToLastPhoto();
85
86 //advance one collection
87 void advanceCollection();
88
89 //backup one collection
90 void backupCollection();
91
92 //turn off mouse cursor
93 void hideMouse();
94
95 //toggle auto play
96 void toggleAutoPlay();
97
98 //end the slideshow
99 void stop();
100
101 //speed up presentation
102 void speedUp();
103
104 //slow down presentation
105 void slowDown();
106
107 //increse text font size
108 void increaseTextSize();
109
110 //decrease text font size
111 void decreaseTextSize();
112
113 //trap context menu hiding signals and store
114 //this info in a bool which disables moving on to the next phot in
115 //respone to a mouse press
116 void contextMenuHiding();
117//----------------------
118private:
119 QString themePath;
123
125
127
129 QImage* currImage;
130 QImage* prevImage;
131
136
137 //paint buffers
140
141 //speed images
143
144 //control images
146
147 //full screen size
149
150 //specs for ongoing animation
153
154 //specs for autoplay
159
160 //timer and time variables for ongoing animation
163
164 //animating variable and mutex
168
169 //display debug messages?
171
172 //font size
174
175 //timer for turning off mouse cursor
178
179 //right click context menu
182//----------------------
183};
184//======================
185
186#endif //GUI_PRESENTATION_SLIDESHOWWIDGET_H
An album contains Subalbums.
Definition album.h:53
A photo consists of a full size image, a smaller slide show image, a very small thumbnail image,...
Definition photo.h:45
SlideshowWidget(QWidget *parent=0, const char *name=0, WFlags f=0)
void mousePressEvent(QMouseEvent *e)
void beginSlideshow(Album *albm, Subalbum *startCollection=NULL, Photo *startPhoto=NULL)
Subalbum * getCurCollection()
returns a pointer to the currently visible collection
void contextMenuEvent(QContextMenuEvent *e)
Photo * getCurPhoto()
returns a pointer to the currently visible photo
void paintEvent(QPaintEvent *)
void keyPressEvent(QKeyEvent *e)
void mouseMoveEvent(QMouseEvent *e)
ANIMATION_TYPE type
void showCollectionPage(Subalbum *subalbum)
A subalbum contains photos.
Definition subalbum.h:49
ANIMATION_TYPE
@ AUTO_PLAY
@ SCROLL_LEFT
@ IMMEDIATE
@ SCROLL_DOWN
@ SCROLL_RIGHT
@ SCROLL_UP