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