doctreeitem.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef DOCTREEITEM_H
00017 #define DOCTREEITEM_H
00018
00019 #include <qlistview.h>
00020
00021 class KListView;
00022
00023 class DocTreeItem : public QListViewItem
00024 {
00025 public:
00026 enum Type { Folder, Book, Doc };
00027 DocTreeItem( KListView *parent, Type type, const QString &text, const QString &context, bool lazy = false );
00028 DocTreeItem( DocTreeItem *parent, Type type, const QString &text, const QString &context, bool lazy = false );
00029 virtual ~DocTreeItem();
00030
00031 inline void postInit() { if (!m_lazy) refresh(); }
00032
00033 virtual QString fileName();
00034 void setFileName(const QString &fn);
00035
00036 const QString& indexFileName() const;
00037
00038 virtual void clear();
00039 virtual QString context() const;
00040 virtual Type type() const;
00041
00042 bool isCurrent() const;
00043 void setDirty();
00044 virtual void setOpen(bool open);
00045
00046 protected:
00047 void setIndexFileName(const QString& fileName);
00048
00049 virtual void refresh();
00050
00051 private:
00052 void init();
00053
00054 Type m_typ;
00055 QString m_fileName, m_indexFileName, m_context;
00056 bool m_current : 1, m_lazy : 1;
00057 };
00058
00059 #endif
This file is part of the documentation for KDevelop Version 3.1.2.