VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator 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 /*******************************************************************************
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 {
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  {
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
93 
94  // Indicate whether this class should force animation looping
96  };
97 }

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)