2 * This file is part of KJots
4 * Copyright 2008 Stephen Kelly <steveire@gmail.com>
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
16 * You should have received a copy of the GNU General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22 #ifndef KNOWITIMPORTER_H
23 #define KNOWITIMPORTER_H
28 #include <QDomDocument>
37 int id
; // Only used to determine parent /child relationships. This is not the KJots Page or Book id.
40 QList
< QPair
< QString
, QString
> > links
;
46 Class for importing KNowIt notes. KNowIt is not longer maintained.
55 Create a KJotsBook from the knowit file at @p url.
57 void importFromUrl( const KUrl
& url
);
61 Builds several trees with roots at m_notes.
62 @param url The url of the knowit file.
64 void buildNoteTree( const KUrl
& url
);
67 Add a representation of note @p n to m_domDoc. If @p n has child notes, it will create a book, otherwise a page.
69 QDomElement
addNote( const KnowItNote
& n
);
72 Build a domDocument from the notes rooted at m_notes.
74 void buildDomDocument();
77 QList
<KnowItNote
> m_notes
; // Top level notes.
78 QList
<KnowItNote
> m_lastNoteAtLevel
;
79 QDomDocument m_domDoc
;
80 QHash
<int, KnowItNote
> m_noteHash
;
81 QHash
<int, QList
< int > > m_childNotes
;