VR-Forces 4.1.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
include
vrfGuiCoreQt
widgetAnimator.h
Go to the documentation of this file.
1
/*******************************************************************************
2
** Copyright (c) 2009 MAK Technologies, Inc.
3
** All rights reserved.
4
*******************************************************************************/
5
/*******************************************************************************
6
** $RCSfile: DtWidgetAnimator.h,v $ $Revision: 1.1.2.2 $ $State: Exp $
7
*******************************************************************************/
8
9
#pragma once
10
11
#include <
vrvUtil/signalslib.h
>
12
#include <
vrfGuiCoreQt/vrfGuiCoreQt.h
>
13
#include <QtCore/QTimeLine>
14
#include <QtCore/QPoint>
15
#include <QtGui/QWidget>
16
#include <QtGui/QPaintEvent>
17
18
namespace
makVrf
19
{
20
enum
AnimationType
21
{
22
Move
,
23
SlideOpenLToR
,
24
SlideOpenRToL
,
25
SlideCloseLToR
,
26
SlideCloseRToL
,
27
SlideClose
28
};
29
32
35
class
RenderArea
:
public
QWidget
36
{
37
Q_OBJECT
38
39
public
:
40
41
RenderArea
(
QWidget
* parent = 0);
42
43
void
setPixmap
( QPixmap& px);
44
45
protected
:
46
47
void
paintEvent
(QPaintEvent *event);
48
49
private
:
50
51
QPixmap
myPixmap
;
52
};
53
57
class
DT_DLL_VRFGUICOREQT
DtWidgetAnimator
:
public
QObject
58
{
59
Q_OBJECT
60
61
public
:
62
64
DtWidgetAnimator
(
QObject
* parent = 0);
65
67
virtual
~
DtWidgetAnimator
();
68
71
void
move(
QWidget
* w,
int
top,
int
left,
int
time = 800);
72
74
void
reset();
75
78
void
slide(
QWidget
* w,
AnimationType
type=
SlideOpenRToL
,
int
time = 200);
79
80
protected
:
81
83
void
setup();
84
85
protected
slots:
86
88
void
slot_timeLineFrameChanged(
int
);
89
91
void
slot_timeLineStateChanged(QTimeLine::State);
92
94
void
widgetDestroyed();
95
96
protected
:
97
98
QTimeLine*
myTimeLine
;
99
AnimationType
myAnimationType
;
100
QWidget
*
myWidget
;
101
QPixmap
myPixmap
;
102
RenderArea
*
myRendering
;
103
QPoint
myOrigin
;
104
QPoint
myDestination
;
105
QPoint
myVector
;
106
};
107
}
Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (
www.mak.com
)