• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

kjots

  • sources
  • kde-4.14
  • kdepim
  • kjots
knowitimporter.h
Go to the documentation of this file.
1 /*
2  * This file is part of KJots
3  *
4  * Copyright 2008 Stephen Kelly <steveire@gmail.com>
5  *
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.
10  *
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.
15  *
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
19  * 02110-1301 USA
20  */
21 
22 #ifndef KNOWITIMPORTER_H
23 #define KNOWITIMPORTER_H
24 
25 class QDomElement;
26 
27 #include <QHash>
28 #include <QDomDocument>
29 
30 class KUrl;
31 
32 struct KnowItNote
33 {
34  QString title;
35  int depth;
36  QString content;
37  int id; // Only used to determine parent /child relationships. This is not the KJots Page or Book id.
38  int parent;
39 
40  QList< QPair< QString, QString > > links;
41 
42 
43 };
44 
49 class KnowItImporter
50 {
51 public:
52  KnowItImporter();
53 
57  void importFromUrl( const KUrl& url );
58 
59  private:
64  void buildNoteTree( const KUrl& url );
65 
69  QDomElement addNote( const KnowItNote& n );
70 
74  void buildDomDocument();
75 
76 
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;
82 };
83 
84 #endif
KnowItNote::parent
int parent
Definition: knowitimporter.h:38
KnowItNote::links
QList< QPair< QString, QString > > links
Definition: knowitimporter.h:40
KnowItImporter
Class for importing KNowIt notes.
Definition: knowitimporter.h:49
KnowItNote::id
int id
Definition: knowitimporter.h:37
KnowItNote
Definition: knowitimporter.h:32
QHash< int, KnowItNote >
QString
QList
QDomDocument
KnowItNote::content
QString content
Definition: knowitimporter.h:36
KnowItImporter::importFromUrl
void importFromUrl(const KUrl &url)
Create a KJotsBook from the knowit file at url.
Definition: knowitimporter.cpp:40
KnowItNote::depth
int depth
Definition: knowitimporter.h:35
QDomElement
KnowItNote::title
QString title
Definition: knowitimporter.h:34
KnowItImporter::KnowItImporter
KnowItImporter()
Definition: knowitimporter.cpp:36
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:32:12 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kjots

Skip menu "kjots"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer
  • pimprint

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal