2
* Copyright (c) 2012 Mark Liversedge (liversedge@gmail.com)
4
* This program is free software; you can redistribute it and/or modify it
5
* under the terms of the GNU General Public License as published by the Free
6
* Software Foundation; either version 2 of the License, or (at your option)
9
* This program is distributed in the hope that it will be useful, but WITHOUT
10
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14
* You should have received a copy of the GNU General Public License along
15
* with this program; if not, write to the Free Software Foundation, Inc., 51
16
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
#ifndef _LibraryParser_h
20
#define _LibraryParser_h
21
#include "GoldenCheetah.h"
23
#include <QXmlDefaultHandler>
26
class LibraryParser : public QXmlDefaultHandler
31
static bool serialize(QDir);
35
bool endElement(const QString&, const QString&, const QString &qName);
36
bool startElement(const QString&, const QString&, const QString &name, const QXmlAttributes &attrs);
37
bool characters(const QString& str);
39
QList<Library*> &getLibraries() { return libraries; }
43
// state whilst parsing
45
Library *library; // the one being currently processed
48
QList<Library *> libraries;
51
#endif //LibraryParser