VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtMovieUrlLabel.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2011 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCoreQt/vrvCoreQt.h>
13 
14 #include <vrvCoreQt/DtUrlLabel.h>
15 #include <boost/unordered_map.hpp>
16 
17 class QMovie;
18 
19 namespace makVrv
20 {
25  {
26  Q_OBJECT
27 
28  public:
30  DtMovieUrlLabel( QWidget* parent=0, Qt::WindowFlags f=0 );
31 
33  virtual ~DtMovieUrlLabel();
34 
38  virtual void setMovie(QMovie* movie);
39 
42  virtual void addUrl( const QString& url, int startFrame, int endFrame );
43 
46  virtual void setUrl( const QString& url);
47 
50  virtual QString url() const;
51 
53  virtual QString url(int frame) const;
54 
56  virtual void removeUrl( const QString& url );
57 
62  virtual void setInfiniteLoop( bool b );
63 
64  protected slots:
67  void onMovieFinished();
68 
70  void updateTooltip(int frame);
71 
72  protected:
73  // Utility structure to hold start and end frame as one item
74  // (for use in a map)
75  struct FrameRange
76  {
78  int endFrame;
79  };
80 
81  // Map type for maintaining url to animation frames relationships
82  typedef boost::unordered_map<std::string, FrameRange> UrlFramesMap;
83 
84  // Pointer to the movie set by the user. Deleted when class is
85  // destructed
86  QMovie* myMovie;
87 
88  // Map of Url to frame number relationships
90 
91  // Indicate whether this class should force animation looping
93  };
94 }
int endFrame
Definition: DtMovieUrlLabel.h:78
QLabel that can act as a hyperlink, independent of its content.
Definition: DtUrlLabel.h:21
int startFrame
Definition: DtMovieUrlLabel.h:77
#define DT_DLL_VRVCOREQT
Definition: vrvCoreQt.h:20
Contains DLL export macros.
UrlFramesMap myUrlFramesMap
Definition: DtMovieUrlLabel.h:89
Contains makVrv::DtUrlLabel class.
boost::unordered_map< std::string, FrameRange > UrlFramesMap
Definition: DtMovieUrlLabel.h:82
QMovie * myMovie
Definition: DtMovieUrlLabel.h:86
DtUrlLabel that can display a movie and act as a hyperlink with url(s) conditioned on the current mov...
Definition: DtMovieUrlLabel.h:24
Definition: DtMovieUrlLabel.h:75
bool myInfiniteLoop
Definition: DtMovieUrlLabel.h:92

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)