1 /* This file is part of the KDE project
2 Copyright 2002 Cornelius Schumacher <schumacher@kde.org>
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public
6 License version 2 or at your option version 3 as published
7 by the Free Software Foundation.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; see the file COPYING. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
32 class DocEntryTraverser
;
35 This class provides some meta information about help documents.
41 Return instance of DocMetaInfo. There can only be one instance at a time.
43 static DocMetaInfo
*self();
47 void scanMetaInfo( bool force
= false );
49 DocEntry
*addDocEntry( const QString
&fileName
);
51 void addDocEntry( DocEntry
* );
53 DocEntry::List
docEntries();
55 DocEntry::List
searchEntries();
57 void traverseEntries( DocEntryTraverser
* );
59 void startTraverseEntries( DocEntryTraverser
*traverser
);
60 void startTraverseEntry( DocEntry
*entry
, DocEntryTraverser
*traverser
);
61 void endProcess( DocEntry
*entry
, DocEntryTraverser
*traverser
);
62 void endTraverseEntries( DocEntryTraverser
* );
64 static QString
languageName( const QString
&langcode
);
67 DocEntry
*scanMetaInfoDir( const QString
&filename
, DocEntry
*parent
);
68 DocEntry
*addDirEntry( const QDir
&dir
, DocEntry
*parent
);
69 void traverseEntry( DocEntry
*, DocEntryTraverser
* );
73 DocMetaInfo is a singleton. Private constructor prevents direct
78 DocEntry::List mDocEntries
;
79 DocEntry::List mSearchEntries
;
83 QStringList mLanguages
;
85 QMap
<QString
,QString
> mLanguageNames
;
87 HTMLSearch
*mHtmlSearch
;
91 static DocMetaInfo
*mSelf
;