delay a few things on startup, such as setting the visibility mode, which ensures...
[personal-kdebase.git] / runtime / khelpcenter / docmetainfo.h
blob3b70144ee2ee2f9a0004894fd60986a18b5a6b2a
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.
20 #ifndef DOCMETAINFO_H
21 #define DOCMETAINFO_H
24 #include <QDir>
25 #include <QMap>
27 #include "docentry.h"
29 namespace KHC {
31 class HTMLSearch;
32 class DocEntryTraverser;
34 /*!
35 This class provides some meta information about help documents.
37 class DocMetaInfo
39 public:
40 /*!
41 Return instance of DocMetaInfo. There can only be one instance at a time.
43 static DocMetaInfo *self();
45 ~DocMetaInfo();
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 );
66 protected:
67 DocEntry *scanMetaInfoDir( const QString &filename, DocEntry *parent );
68 DocEntry *addDirEntry( const QDir &dir, DocEntry *parent );
69 void traverseEntry( DocEntry *, DocEntryTraverser * );
71 private:
72 /*!
73 DocMetaInfo is a singleton. Private constructor prevents direct
74 instantisation.
76 DocMetaInfo();
78 DocEntry::List mDocEntries;
79 DocEntry::List mSearchEntries;
81 DocEntry mRootEntry;
83 QStringList mLanguages;
85 QMap<QString,QString> mLanguageNames;
87 HTMLSearch *mHtmlSearch;
89 static bool mLoaded;
91 static DocMetaInfo *mSelf;
96 #endif
97 // vim:ts=2:sw=2:et