gmlfileformat.h 1.67 KB
Newer Older
1
2
/*
    This file is part of Rocs.
3
4
5
    Copyright 2010       Tomaz Canabrava <tomaz.canabrava@gmail.com>
    Copyright 2010       Wagner Reck <wagner.reck@gmail.com>
    Copyright 2012-2014  Andreas Cord-Landwehr <cordlandwehr@kde.org>
6
7
8
9
10
11
12
13
14
15
16
17

    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License as
    published by the Free Software Foundation; either version 2 of
    the License, or (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
18
    along with this program.  If not, see <https://www.gnu.org/licenses/>.
19
20
*/

21
22
#ifndef GMLFILEFORMAT_H
#define GMLFILEFORMAT_H
23
24

#include <QObject>
25
26
27
28
#include "fileformats/fileformatinterface.h"

namespace GraphTheory
{
29

30
class GmlFileFormat : public FileFormatInterface
31
32
33
{
    Q_OBJECT
public:
34
35
    explicit GmlFileFormat(QObject *parent, const QList< QVariant >&);
    ~GmlFileFormat();
36
37
38
39

    /**
     * File extensions that are common for this file type.
     */
Laurent Montel's avatar
Laurent Montel committed
40
    const QStringList extensions() const Q_DECL_OVERRIDE;
41
42
43
44
45

    /**
     * Writes given graph document to formerly specified file \see setFile().
     * \param graph is graphDocument to be serialized
     */
Laurent Montel's avatar
Laurent Montel committed
46
    void writeFile(GraphDocumentPtr graph) Q_DECL_OVERRIDE;
47
48
49

    /**
     * Open given file and imports it into internal format.
50
     * \param file is url of a local file
51
     */
Laurent Montel's avatar
Laurent Montel committed
52
    void readFile() Q_DECL_OVERRIDE;
53
};
54
}
55

56
#endif