diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 4aed2c8219774f5d797760606b8489a92ddc5163 (patch) | |
tree | 3f8c130f7d269626bf6a9447407ef6c35954426a /khelpcenter/docentry.h | |
download | tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.tar.gz tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'khelpcenter/docentry.h')
-rw-r--r-- | khelpcenter/docentry.h | 117 |
1 files changed, 117 insertions, 0 deletions
diff --git a/khelpcenter/docentry.h b/khelpcenter/docentry.h new file mode 100644 index 000000000..a2ba6b9c4 --- /dev/null +++ b/khelpcenter/docentry.h @@ -0,0 +1,117 @@ +#ifndef DOCENTRY_H +#define DOCENTRY_H + +#include <qstring.h> +#include <qvaluelist.h> + +namespace KHC { + +class DocEntry +{ + public: + typedef QValueList<DocEntry *> List; + + DocEntry(); + + DocEntry( const QString &name, const QString &url = QString::null, + const QString &icon = QString::null ); + + void setName( const QString & ); + QString name() const; + + void setSearch( const QString & ); + QString search() const; + + void setIcon( const QString & ); + QString icon() const; + + void setUrl( const QString & ); + QString url() const; + + void setInfo( const QString & ); + QString info() const; + + void setLang( const QString & ); + QString lang() const; + + void setIdentifier( const QString & ); + QString identifier() const; + + void setIndexer( const QString & ); + QString indexer() const; + + void setIndexTestFile( const QString & ); + QString indexTestFile() const; + + void setWeight( int ); + int weight() const; + + void setSearchMethod( const QString & ); + QString searchMethod() const; + + void enableSearch( bool enabled ); + bool searchEnabled() const; + + void setSearchEnabledDefault( bool enabled ); + bool searchEnabledDefault() const; + + void setDocumentType( const QString & ); + QString documentType() const; + + void setDirectory( bool ); + bool isDirectory() const; + + bool readFromFile( const QString &fileName ); + + bool indexExists( const QString &indexDir ); + + bool docExists() const; + + void addChild( DocEntry * ); + bool hasChildren(); + DocEntry *firstChild(); + List children(); + + void setParent( DocEntry * ); + DocEntry *parent(); + + void setNextSibling( DocEntry * ); + DocEntry *nextSibling(); + + QString khelpcenterSpecial() const; + + bool isSearchable(); + + void dump() const; + + protected: + void init(); + + private: + QString mName; + QString mSearch; + QString mIcon; + QString mUrl; + QString mInfo; + QString mLang; + mutable QString mIdentifier; + QString mIndexer; + QString mIndexTestFile; + int mWeight; + QString mSearchMethod; + bool mSearchEnabled; + bool mSearchEnabledDefault; + QString mDocumentType; + bool mDirectory; + + QString mKhelpcenterSpecial; + + List mChildren; + DocEntry *mParent; + DocEntry *mNextSibling; +}; + +} + +#endif +// vim:ts=2:sw=2:et |