PEBL 2.2
Psychology Experiment Building Language - Cross-platform psychological experiment development system
PMovie.h
Go to the documentation of this file.
1//* -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*- */
3// Name: src/objects/PMovie.h
4// Purpose: Contains generic specs for a movie file player.
5// Author: Shane T. Mueller, Ph.D.
6// Copyright: (c) 2012 Shane T. Mueller <smueller@obereed.net>
7// License: GPL 2
8//
9//
10//
11// This file is part of the PEBL project.
12//
13// PEBL is free software; you can redistribute it and/or modify
14// it under the terms of the GNU General Public License as published by
15// the Free Software Foundation; either version 2 of the License, or
16// (at your option) any later version.
17//
18// PEBL is distributed in the hope that it will be useful,
19// but WITHOUT ANY WARRANTY; without even the implied warranty of
20// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21// GNU General Public License for more details.
22//
23// You should have received a copy of the GNU General Public License
24// along with PEBL; if not, write to the Free Software
25// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27#ifndef __PMOVIE_H__
28#define __PMOVIE_H__
29
30
31#include "PWidget.h"
32#include "../devices/PDevice.h"
33#include <string>
34
38
39
40class PMovie: virtual public PWidget, virtual public PDevice
41{
42public:
43
44 PMovie();
45 virtual ~PMovie(){};
46
47
48
49 //overloaded generic PEBLObjectBase methods
50 virtual bool SetProperty(std::string, Variant v);
51 virtual Variant GetProperty(std::string)const;
52 virtual ObjectValidationError ValidateProperty(std::string, Variant v)const;
53 virtual ObjectValidationError ValidateProperty(std::string)const;
54
55
58
59 virtual long int GetLength(){return mLength;};
60 virtual void SetPosition(int x, int y);
61 virtual void SetSize(int width, int height);
62 virtual std::string ObjectName() const{return "PMovie";};
63
64 virtual void SetPlaybackPosition(unsigned long int x);
65 virtual void SetVolume(long double vol);
66
67protected:
68
69 //These are inherited by child PlatformImageBox class.
70
71 virtual std::ostream & SendToStream(std::ostream& out) const {return out;};
72 long int mLength; //Size of movie in ms?
73 double mPlaybackPosition; //Current playback position.
74 double mVolume; // 0...; with 1.0 being normal.
75private:
76
77 int mState;//playing vs stopped (unused)
78
79
80
81 void __SetProps__();
82};
83
84
85
86#endif
ObjectValidationError
Definition PEBLObject.h:37
virtual ObjectValidationError ValidateProperty(std::string, Variant v) const
Definition PMovie.cpp:122
virtual std::string ObjectName() const
Definition PMovie.h:62
virtual bool SetProperty(std::string, Variant v)
Definition PMovie.cpp:85
virtual ~PMovie()
Definition PMovie.h:45
virtual std::ostream & SendToStream(std::ostream &out) const
An inheritable printing class used by PEBLObjectBase::operator<<.
Definition PMovie.h:71
virtual void SetSize(int width, int height)
Definition PMovie.cpp:59
virtual Variant GetProperty(std::string) const
Definition PMovie.cpp:115
virtual long int GetLength()
Definition PMovie.h:59
PMovie()
Definition PMovie.cpp:35
double mVolume
Definition PMovie.h:74
long int mLength
Definition PMovie.h:72
virtual void SetPlaybackPosition(unsigned long int x)
Definition PMovie.cpp:70
virtual void SetVolume(long double vol)
Definition PMovie.cpp:78
virtual void SetPosition(int x, int y)
Definition PMovie.cpp:50
double mPlaybackPosition
Definition PMovie.h:73