delay a few things on startup, such as setting the visibility mode, which ensures...
[personal-kdebase.git] / runtime / khelpcenter / docentry.h
blob033a388edd029690bc1f406ce29f3b7556fe5a88
1 #ifndef DOCENTRY_H
2 #define DOCENTRY_H
5 #include <QString>
6 #include <QList>
8 namespace KHC {
10 class DocEntry
12 public:
13 typedef QList<DocEntry *> List;
15 DocEntry();
17 explicit DocEntry( const QString &name, const QString &url = QString(),
18 const QString &icon = QString() );
20 void setName( const QString & );
21 QString name() const;
23 void setSearch( const QString & );
24 QString search() const;
26 void setIcon( const QString & );
27 QString icon() const;
29 void setUrl( const QString & );
30 QString url() const;
32 void setInfo( const QString & );
33 QString info() const;
35 void setLang( const QString & );
36 QString lang() const;
38 void setIdentifier( const QString & );
39 QString identifier() const;
41 void setIndexer( const QString & );
42 QString indexer() const;
44 void setIndexTestFile( const QString & );
45 QString indexTestFile() const;
47 void setWeight( int );
48 int weight() const;
50 void setSearchMethod( const QString & );
51 QString searchMethod() const;
53 void enableSearch( bool enabled );
54 bool searchEnabled() const;
56 void setSearchEnabledDefault( bool enabled );
57 bool searchEnabledDefault() const;
59 void setDocumentType( const QString & );
60 QString documentType() const;
62 void setDirectory( bool );
63 bool isDirectory() const;
65 bool readFromFile( const QString &fileName );
67 bool indexExists( const QString &indexDir );
69 bool docExists() const;
71 void addChild( DocEntry * );
72 bool hasChildren();
73 DocEntry *firstChild();
74 List children();
76 void setParent( DocEntry * );
77 DocEntry *parent();
79 void setNextSibling( DocEntry * );
80 DocEntry *nextSibling();
82 QString khelpcenterSpecial() const;
84 bool isSearchable();
86 void dump() const;
88 protected:
89 void init();
91 private:
92 QString mName;
93 QString mSearch;
94 QString mIcon;
95 QString mUrl;
96 QString mInfo;
97 QString mLang;
98 mutable QString mIdentifier;
99 QString mIndexer;
100 QString mIndexTestFile;
101 int mWeight;
102 QString mSearchMethod;
103 bool mSearchEnabled;
104 bool mSearchEnabledDefault;
105 QString mDocumentType;
106 bool mDirectory;
108 QString mKhelpcenterSpecial;
110 List mChildren;
111 DocEntry *mParent;
112 DocEntry *mNextSibling;
117 #endif
118 // vim:ts=2:sw=2:et