2008-04-19 20:15:59 +02:00
|
|
|
/*
|
2008-11-25 22:00:12 +01:00
|
|
|
project.cpp - Implementation of the Project class
|
2010-12-17 23:28:49 +01:00
|
|
|
|
2008-04-19 20:15:59 +02:00
|
|
|
Copyright (C) Lumiera.org
|
|
|
|
|
2008, Joel Holdsworth <joel@airwebreathe.org.uk>
|
2010-12-17 23:28:49 +01:00
|
|
|
|
2008-04-19 20:15:59 +02:00
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
|
modify it under the terms of the GNU General Public License as
|
2010-12-17 23:28:49 +01:00
|
|
|
published by the Free Software Foundation; either version 2 of
|
|
|
|
|
the License, or (at your option) any later version.
|
|
|
|
|
|
2008-04-19 20:15:59 +02:00
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
GNU General Public License for more details.
|
2010-12-17 23:28:49 +01:00
|
|
|
|
2008-04-19 20:15:59 +02:00
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
2010-12-17 23:28:49 +01:00
|
|
|
|
2008-04-19 20:15:59 +02:00
|
|
|
* *****************************************************/
|
|
|
|
|
|
2008-11-22 20:08:12 +01:00
|
|
|
|
2016-11-03 18:22:31 +01:00
|
|
|
/** @file project.cpp
|
2016-11-06 14:19:14 +01:00
|
|
|
** Preliminary UI-model: Implementation of Project, a class which
|
2018-11-15 21:13:52 +01:00
|
|
|
** stores project data, and wraps steam layer data.
|
2016-11-06 14:19:14 +01:00
|
|
|
** @warning as of 2016 this UI model is known to be a temporary workaround
|
|
|
|
|
** and will be replaced in entirety by UI-Bus and diff framework.
|
|
|
|
|
**
|
2016-11-03 18:20:10 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
2014-08-17 07:02:48 +02:00
|
|
|
#include "gui/model/project.hpp"
|
|
|
|
|
#include "gui/model/sequence.hpp"
|
2008-04-19 20:15:59 +02:00
|
|
|
|
2014-04-03 22:42:48 +02:00
|
|
|
#include <memory>
|
|
|
|
|
|
2008-12-05 21:17:56 +01:00
|
|
|
|
2008-04-19 20:15:59 +02:00
|
|
|
namespace gui {
|
|
|
|
|
namespace model {
|
|
|
|
|
|
|
|
|
|
Project::Project()
|
|
|
|
|
{
|
2008-11-22 17:34:49 +01:00
|
|
|
// TEST CODE
|
2008-11-22 20:08:12 +01:00
|
|
|
add_new_sequence("Sequence A");
|
|
|
|
|
add_new_sequence("Sequence B");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Project::~Project()
|
|
|
|
|
{
|
2008-12-05 21:17:56 +01:00
|
|
|
|
2008-11-22 17:34:49 +01:00
|
|
|
}
|
|
|
|
|
|
2011-10-21 09:56:10 +02:00
|
|
|
lumiera::observable_list< shared_ptr<Sequence> >&
|
2008-11-22 17:34:49 +01:00
|
|
|
Project::get_sequences()
|
|
|
|
|
{
|
|
|
|
|
return sequences;
|
2008-04-19 20:15:59 +02:00
|
|
|
}
|
|
|
|
|
|
2008-11-22 20:08:12 +01:00
|
|
|
void
|
2011-02-07 00:54:44 +01:00
|
|
|
Project::add_new_sequence(uString name)
|
2008-11-22 20:08:12 +01:00
|
|
|
{
|
2014-04-03 22:42:48 +02:00
|
|
|
std::shared_ptr<Sequence> sequence(new Sequence());
|
2008-11-22 20:08:12 +01:00
|
|
|
sequence->set_name(name);
|
|
|
|
|
sequences.push_back(sequence);
|
|
|
|
|
}
|
|
|
|
|
|
2008-04-19 20:15:59 +02:00
|
|
|
} // namespace model
|
|
|
|
|
} // namespace gui
|