1 /***************************************************************************
2 * Copyright (C) 2005 by David Cuadrado *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ***************************************************************************/
21 #ifndef YAMFMODELPROJECT_H
22 #define YAMFMODELPROJECT_H
24 #include <yamf/common/abstractserializable.h>
25 #include <yamf/common/inthash.h>
26 #include <yamf/common/yamf_exports.h>
35 namespace Command
{ class Manager
; }
44 typedef Common::IntHash
<Scene
*> Scenes
;
49 * Esta clase maneja el proyecto, además contiene las diferentes escenas que componen todo el proyecto.
51 * @brief Project manager
52 * @author David Cuadrado \<krawek@gmail.com\>
55 class YAMF_EXPORT Project
: public QObject
, public Common::AbstractSerializable
59 Project(QObject
*parent
= 0);
63 Command::Manager
*commandManager() const;
65 void setProjectName(const QString
&name
);
66 void setAuthor(const QString
&author
);
67 void setDescription(const QString
& description
);
69 QString
projectName() const;
70 QString
author() const;
71 QString
description() const;
74 QString
dataDir() const;
76 Scene
*scene(int logicalIndex
) const;
78 int visualIndexOf(Scene
*scene
) const;
79 int logicalIndexOf(Scene
*scene
) const;
81 Scenes
scenes() const;
83 Model::Scene
*createScene(int logicalIndex
= -1, const QString
&name
= QString());
85 void insertScene(Scene
*scene
, int logicalIndex
);
86 void addScene(Scene
*scene
);
87 void removeScene(Scene
*scene
);
88 bool moveScene(int logicalIndex
, int newPosition
);
91 void loadLibrary(const QString
&filename
);
93 Model::Library
*library() const;
95 virtual void fromXml(const QString
&xml
);
96 virtual QDomElement
toXml(QDomDocument
&doc
) const;
98 void setOpen(bool open
);