Lumiera  0.pre.03
»edityourfreedom«
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
gui/model/clip.cpp
Go to the documentation of this file.
1 /*
2  clip.cpp - Implementation of the Clip object
3 
4  Copyright (C) Lumiera.org
5  2008, Joel Holdsworth <joel@airwebreathe.org.uk>
6 
7  This program is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public License as
9  published by the Free Software Foundation; either version 2 of
10  the License, or (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 
21 * *****************************************************/
22 
23 
32 #include "gui/model/clip.hpp"
33 #include "lib/time/mutation.hpp"
34 
35 using lib::time::FSecs;
37 
38 
39 namespace gui {
40 namespace model {
41 
43  : timeCoord_(Time(FSecs(1)), FSecs(3))
44  { }
45 
46 
47  void
48  Clip::setBegin (Time newStartTime)
49  {
50  timeCoord_.accept (Mutation::changeTime (newStartTime));
51  TODO("Emit A Signal");
52  }
53 
54  void
56  {
57  timeCoord_.accept (Mutation::changeDuration(newLength));
58  TODO("Emit A Signal");
59  }
60 
61  void
62  Clip::setName (string const& name)
63  {
64  this->name_ = name;
65  nameChangedSignal_.emit (name);
66  }
67 
68  sigc::signal<void, std::string>
70  {
71  return nameChangedSignal_;
72  }
73 
74 } // namespace model
75 } // namespace gui
76 
Preliminary UI-model: a Proxy Clip object to base the GUI implementation on.
void setDuration(Duration)
Sets the end time of this clip.
Modifying time and timecode values.
void accept(Mutation const &)
may change start / duration
Definition: mutation.hpp:132
Lumiera GTK UI implementation root.
Definition: guifacade.cpp:47
sigc::signal< void, string > nameChangedSignal_
fires when the name changes.
Interface: an opaque change imposed onto some time value.
Definition: mutation.hpp:100
Lumiera's internal time value datatype.
Definition: timevalue.hpp:226
boost::rational< long > FSecs
rational representation of fractional seconds
Definition: timevalue.hpp:205
void setBegin(Time)
Sets the begin time of this clip.
Duration is the internal Lumiera time metric.
Definition: timevalue.hpp:380
void setName(string const &)
Sets the name of this clip.
sigc::signal< void, std::string > signalNameChanged() const
A signal which fires when the name changes.