VR-Forces 4.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
include
vrvCoreQt
DtMovieUrlLabel.h
Go to the documentation of this file.
1
/*******************************************************************************
2
** Copyright (c) 2011 MAK Technologies, Inc.
3
** All rights reserved.
4
*******************************************************************************/
5
/*******************************************************************************
6
** $RCSfile: DtMovieUrlLabel.h,v $ $Revision: 1.22 $ $State: Exp $
7
*******************************************************************************/
8
12
13
#pragma once
14
15
#include <
vrvCoreQt/vrvCoreQt.h
>
16
17
#include <
vrvCoreQt/DtUrlLabel.h
>
18
#include <boost/unordered_map.hpp>
19
20
class
QMovie;
21
22
namespace
makVrv
23
{
27
class
DT_DLL_VRVCOREQT
DtMovieUrlLabel
:
public
DtUrlLabel
28
{
29
Q_OBJECT
30
31
public
:
33
DtMovieUrlLabel
(
QWidget
* parent=0, Qt::WindowFlags f=0 );
34
36
virtual
~
DtMovieUrlLabel
();
37
41
virtual
void
setMovie(QMovie* movie);
42
45
virtual
void
addUrl(
const
QString& url,
int
startFrame,
int
endFrame );
46
49
virtual
void
setUrl(
const
QString& url);
50
53
virtual
QString url()
const
;
54
56
virtual
QString url(
int
frame)
const
;
57
59
virtual
void
removeUrl(
const
QString& url );
60
65
virtual
void
setInfiniteLoop(
bool
b );
66
67
protected
slots:
70
void
onMovieFinished();
71
73
void
updateTooltip(
int
frame);
74
75
protected
:
76
// Utility structure to hold start and end frame as one item
77
// (for use in a map)
78
struct
FrameRange
79
{
80
int
startFrame
;
81
int
endFrame
;
82
};
83
84
// Map type for maintaining url to animation frames relationships
85
typedef
boost::unordered_map<std::string, FrameRange>
UrlFramesMap
;
86
87
// Pointer to the movie set by the user. Deleted when class is
88
// destructed
89
QMovie*
myMovie
;
90
91
// Map of Url to frame number relationships
92
UrlFramesMap
myUrlFramesMap
;
93
94
// Indicate whether this class should force animation looping
95
bool
myInfiniteLoop
;
96
};
97
}
Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (
www.mak.com
)