KDevelop API Documentation

doctreeitem.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 1999-2002 by Bernd Gehrmann                             *
00003  *   bernd@kdevelop.org                                                    *
00004  *   Copyright (C) 2002 by Sebastian Kratzert                              *
00005  *   skratzert@gmx.de                                                      *
00006  *   Copyright (C) 2003 by Alexander Dymo                                  *
00007  *   cloudtemple@mksat.net                                                 *
00008  *                                                                         *
00009  *   This program is free software; you can redistribute it and/or modify  *
00010  *   it under the terms of the GNU General Public License as published by  *
00011  *   the Free Software Foundation; either version 2 of the License, or     *
00012  *   (at your option) any later version.                                   *
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
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Mar 23 00:03:55 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003