Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
blob: c9263cb0e8428eab80698ddf0906cf862d8c85f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
   properties.cc
   This file is part of the Project::OSiRiON world editor 
   and is distributed under the terms and conditions of 
   the GNU General Public License version 2
*/

#include "properties.h"

namespace editor
{

Properties::Properties()
{
}

Properties::~Properties()
{
}

void Properties::add_value(const QString &key, const QString &value, const QString &comment)
{
	if (comment.size())
		properties_values += comment;
	
	properties_values += key;
	properties_values += '=';
	properties_values += value;
	properties_values += '\n';
}

void Properties::add_info(const QString &text)
{
	properties_info += text;
	properties_info += '\n';
}

void Properties::save_comment(QTextStream &textstream, const QString &attribute)
{
	QString text = comment(attribute);
	if (text.size()) {
		textstream << text;
	}
}

} // namespace editor