AlbumShaper
1.0a3
src
gui
photoDescEdit.h
Go to the documentation of this file.
1
//Added by qt3to4:
2
#include <QPixmap>
3
#include <Q3GridLayout>
4
#include <QLabel>
5
#include <QKeyEvent>
6
#include <Q3PopupMenu>
7
#include <QFocusEvent>
8
//==============================================
9
// copyright : (C) 2003-2005 by Will Stokes
10
//==============================================
11
// This program is free software; you can redistribute it
12
// and/or modify it under the terms of the GNU General
13
// Public License as published by the Free Software
14
// Foundation; either version 2 of the License, or
15
// (at your option) any later version.
16
//==============================================
17
18
#ifndef GUI_PHOTODESCEDIT_H
19
#define GUI_PHOTODESCEDIT_H
20
21
//--------------------
22
//forward declarations
23
class
Q3GridLayout;
24
class
QLabel
;
25
class
QTimer;
26
class
QImage;
27
class
QPixmap;
28
class
Q3TextEdit
;
29
class
PhotoPreviewWidget
;
30
class
TextEdit
;
31
//--------------------
32
33
#define STATIC 0
34
#define APPEARING 1
35
#define DISAPPEARING 2
36
#define DISAPPEARED 3
37
38
#include <qwidget.h>
39
#include <qdatetime.h>
40
#include <q3textedit.h>
41
//=====================================
42
class
PhotoDescEdit
:
public
QWidget
43
{
44
Q_OBJECT
45
//----------------------
46
public
:
47
PhotoDescEdit
(
PhotoPreviewWidget
*
ppw
,
bool
useAnimation
,
QWidget
*parent=0,
const
char
* name=0);
48
~PhotoDescEdit
();
49
//----------------------
50
public
slots:
51
void
hide
();
52
//----------------------
53
private
slots:
55
void
animate
();
56
59
void
disappear
();
60
//----------------------
61
private
:
63
bool
useAnimation
;
64
66
PhotoPreviewWidget
*
ppw
;
67
69
QImage *
imageLarge
;
70
72
QImage*
textRectangle
;
73
74
//beginning and end positions of the photo
75
QPoint
initPos
,
finalPos
;
76
78
int
left
,
right
,
top
,
bottom
;
79
81
int
idealTextSize
;
82
85
QPixmap*
backgroundImage
;
86
88
int
smallWidth
,
smallHeight
;
90
//Main grid
91
Q3GridLayout*
mainGrid
;
94
96
QLabel
*
animationLabel
;
97
99
QPixmap*
buffer
;
102
104
Q3GridLayout*
staticGrid
;
105
107
QWidget
*
staticFrame
;
108
110
QLabel
*
staticPhoto
;
111
113
TextEdit
*
photoDesc
;
116
117
//timer stuff
118
int
initDelay
,
accel
,
minDelay
,
step
,
delay
;
119
120
//appearing or disappearing
121
int
mode
;
122
124
bool
dropShadowsEnabled
;
125
126
//timer and time variables for ongoing animation
127
QTimer*
timer
;
128
QTime
lastTime
,
currentTime
;
130
};
131
132
//======================
133
class
TextEdit
:
public
Q3TextEdit
134
{
135
Q_OBJECT
136
//----------------------
137
public
:
138
TextEdit
(
QWidget
*parent=0,
const
char
* name=0);
139
void
paintNow
();
140
//----------------------
141
private
:
142
Q3PopupMenu*
contextMenu
;
143
//----------------------
144
protected
:
145
void
keyPressEvent
( QKeyEvent* e );
146
void
focusOutEvent
( QFocusEvent* );
147
Q3PopupMenu*
createPopupMenu
(
const
QPoint& pos );
148
//----------------------
149
signals:
150
void
finished
();
151
//----------------------
152
private
slots:
153
void
contextMenuHiding
();
154
};
155
//======================
156
157
158
159
#endif
//GUI_PHOTODESCEDIT_H
PhotoDescEdit
Definition
photoDescEdit.h:43
PhotoDescEdit::initPos
QPoint initPos
Definition
photoDescEdit.h:75
PhotoDescEdit::disappear
void disappear()
this method is called by the acceptAndClose and rejectAndClose slots and actually initiates the closi...
Definition
photoDescEdit.cpp:525
PhotoDescEdit::animate
void animate()
this method is iteratively called and animates the opening/closing of the image
Definition
photoDescEdit.cpp:405
PhotoDescEdit::top
int top
Definition
photoDescEdit.h:78
PhotoDescEdit::mainGrid
Q3GridLayout * mainGrid
Definition
photoDescEdit.h:91
PhotoDescEdit::accel
int accel
Definition
photoDescEdit.h:118
PhotoDescEdit::initDelay
int initDelay
Definition
photoDescEdit.h:118
PhotoDescEdit::bottom
int bottom
Definition
photoDescEdit.h:78
PhotoDescEdit::lastTime
QTime lastTime
Definition
photoDescEdit.h:128
PhotoDescEdit::step
int step
Definition
photoDescEdit.h:118
PhotoDescEdit::staticPhoto
QLabel * staticPhoto
photo being displayed
Definition
photoDescEdit.h:110
PhotoDescEdit::minDelay
int minDelay
Definition
photoDescEdit.h:118
PhotoDescEdit::currentTime
QTime currentTime
Definition
photoDescEdit.h:128
PhotoDescEdit::dropShadowsEnabled
bool dropShadowsEnabled
are drop shadows enabled in windows (xp)?
Definition
photoDescEdit.h:124
PhotoDescEdit::animationLabel
QLabel * animationLabel
label which shows moving and expanding photo on background
Definition
photoDescEdit.h:96
PhotoDescEdit::staticGrid
Q3GridLayout * staticGrid
grid static widgets placed in
Definition
photoDescEdit.h:104
PhotoDescEdit::imageLarge
QImage * imageLarge
beginning and end pixmaps
Definition
photoDescEdit.h:69
PhotoDescEdit::photoDesc
TextEdit * photoDesc
photo description
Definition
photoDescEdit.h:113
PhotoDescEdit::left
int left
bounaries of entire animation
Definition
photoDescEdit.h:78
PhotoDescEdit::PhotoDescEdit
PhotoDescEdit(PhotoPreviewWidget *ppw, bool useAnimation, QWidget *parent=0, const char *name=0)
Definition
photoDescEdit.cpp:54
PhotoDescEdit::hide
void hide()
Definition
photoDescEdit.cpp:551
PhotoDescEdit::~PhotoDescEdit
~PhotoDescEdit()
Definition
photoDescEdit.cpp:396
PhotoDescEdit::smallWidth
int smallWidth
small size
Definition
photoDescEdit.h:88
PhotoDescEdit::finalPos
QPoint finalPos
Definition
photoDescEdit.h:75
PhotoDescEdit::backgroundImage
QPixmap * backgroundImage
this pixmap contains the screen contents for the entire region which we will be painting on top of
Definition
photoDescEdit.h:85
PhotoDescEdit::smallHeight
int smallHeight
Definition
photoDescEdit.h:88
PhotoDescEdit::mode
int mode
Definition
photoDescEdit.h:121
PhotoDescEdit::staticFrame
QWidget * staticFrame
frame which contains static widget
Definition
photoDescEdit.h:107
PhotoDescEdit::timer
QTimer * timer
Definition
photoDescEdit.h:127
PhotoDescEdit::delay
int delay
Definition
photoDescEdit.h:118
PhotoDescEdit::buffer
QPixmap * buffer
buffer we'll iteratively update and use for the label which shows the animation taking place
Definition
photoDescEdit.h:99
PhotoDescEdit::right
int right
Definition
photoDescEdit.h:78
PhotoDescEdit::idealTextSize
int idealTextSize
ultimate text dimension
Definition
photoDescEdit.h:81
PhotoDescEdit::textRectangle
QImage * textRectangle
text area widget used to computing painting surface
Definition
photoDescEdit.h:72
PhotoDescEdit::ppw
PhotoPreviewWidget * ppw
photo preview widget pointer
Definition
photoDescEdit.h:66
PhotoDescEdit::useAnimation
bool useAnimation
actually animate the opening/closing process?
Definition
photoDescEdit.h:63
PhotoPreviewWidget
Displays photo thumbnail and description.
Definition
photoPreviewWidget.h:35
Q3TextEdit
QLabel
QWidget
TextEdit
Definition
photoDescEdit.h:134
TextEdit::contextMenuHiding
void contextMenuHiding()
Definition
photoDescEdit.cpp:619
TextEdit::focusOutEvent
void focusOutEvent(QFocusEvent *)
Definition
photoDescEdit.cpp:603
TextEdit::TextEdit
TextEdit(QWidget *parent=0, const char *name=0)
Definition
photoDescEdit.cpp:572
TextEdit::finished
void finished()
TextEdit::contextMenu
Q3PopupMenu * contextMenu
Definition
photoDescEdit.h:142
TextEdit::keyPressEvent
void keyPressEvent(QKeyEvent *e)
Definition
photoDescEdit.cpp:585
TextEdit::createPopupMenu
Q3PopupMenu * createPopupMenu(const QPoint &pos)
Definition
photoDescEdit.cpp:610
TextEdit::paintNow
void paintNow()
Definition
photoDescEdit.cpp:579
Generated by
1.12.0