2 * mmp.h - class for reading and writing multimedia-project-files
4 * Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
6 * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
18 * You should have received a copy of the GNU General Public
19 * License along with this program (see COPYING); if not, write to the
20 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301 USA.
29 #include <QtXml/QDomDocument>
32 #include "lmms_basics.h"
35 class EXPORT multimediaProject
: public QDomDocument
43 InstrumentTrackSettings
,
48 VideoProject
, // might come later...
49 BurnProject
, // might come later...
50 Playlist
, // might come later...
55 multimediaProject( const QString
& _fileName
);
56 multimediaProject( const QByteArray
& _data
);
57 multimediaProject( ProjectTypes _project_type
);
58 virtual ~multimediaProject();
60 QString
nameWithExtension( const QString
& _fn
) const;
62 bool writeFile( const QString
& _fn
);
64 inline QDomElement
& content()
68 inline QDomElement
& head()
73 inline ProjectTypes
type() const
80 static ProjectTypes
type( const QString
& _type_name
);
81 static QString
typeName( ProjectTypes _project_type
);
83 void cleanMetaNodes( QDomElement _de
);
87 void loadData( const QByteArray
& _data
, const QString
& _sourceFile
);
90 struct EXPORT typeDescStruct
95 static typeDescStruct s_types
[NumProjectTypes
];
97 QDomElement m_content
;
104 const Uint8 MMP_MAJOR_VERSION
= 1;
105 const Uint8 MMP_MINOR_VERSION
= 0;
106 const QString MMP_VERSION_STRING
= QString::number( MMP_MAJOR_VERSION
) + "." +
107 QString::number( MMP_MINOR_VERSION
);