3
3
// Linux Music Editor
4
4
// $Id: splitter.cpp,v 1.1.1.1 2003/10/27 18:54:59 wschweer Exp $
5
5
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
7
// This program is free software; you can redistribute it and/or
8
// modify it under the terms of the GNU General Public License
9
// as published by the Free Software Foundation; version 2 of
10
// the License, or (at your option) any later version.
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.
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
6
21
//=========================================================
8
23
#include "splitter.h"
26
43
// saveConfiguration
27
44
//---------------------------------------------------------
29
void Splitter::writeStatus(int level, Xml& xml)
46
void Splitter::writeStatus(int level, MusECore::Xml& xml)
31
48
QList<int> vl = sizes();
32
49
//xml.nput(level++, "<%s>", name());
33
xml.nput(level++, "<%s>", Xml::xmlString(objectName()).toLatin1().constData());
50
xml.nput(level++, "<%s>", MusECore::Xml::xmlString(objectName()).toLatin1().constData());
34
51
QList<int>::iterator ivl = vl.begin();
35
52
for (; ivl != vl.end(); ++ivl) {
36
53
xml.nput("%d ", *ivl);
38
55
//xml.nput("</%s>\n", name());
39
xml.nput("</%s>\n", Xml::xmlString(objectName()).toLatin1().constData());
56
xml.nput("</%s>\n", MusECore::Xml::xmlString(objectName()).toLatin1().constData());
42
59
//---------------------------------------------------------
43
60
// loadConfiguration
44
61
//---------------------------------------------------------
46
void Splitter::readStatus(Xml& xml)
63
void Splitter::readStatus(MusECore::Xml& xml)
51
Xml::Token token = xml.parse();
68
MusECore::Xml::Token token = xml.parse();
52
69
const QString& tag = xml.s1();
71
case MusECore::Xml::Error:
72
case MusECore::Xml::End:
74
case MusECore::Xml::TagStart:
58
75
xml.unknown("Splitter");
77
case MusECore::Xml::Text:
62
79
//QStringList sl = QStringList::split(' ', tag);
63
80
QStringList sl = tag.split(QString(" "), QString::SkipEmptyParts);