1/*
2 * navigatoritem.h - part of the KDE Help Center
3 *
4 * Copyright (C) 1999 Matthias Elter (me@kde.org)
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 */
20#ifndef KHC_NAVIGATORITEM_H
21#define KHC_NAVIGATORITEM_H
22
23#include <QTreeWidget>
24#include <QTreeWidgetItem>
25
26namespace KHC {
27
28class TOC;
29class DocEntry;
30
31class NavigatorItem : public QTreeWidgetItem
32{
33 public:
34 NavigatorItem( DocEntry *entry, QTreeWidget *parent );
35 NavigatorItem( DocEntry *entry, QTreeWidgetItem *parent );
36
37 NavigatorItem( DocEntry *entry, QTreeWidget *parent,
38 QTreeWidgetItem *after );
39 NavigatorItem( DocEntry *entry, QTreeWidgetItem *parent,
40 QTreeWidgetItem *after );
41
42 ~NavigatorItem();
43
44 DocEntry *entry() const;
45
46 void setAutoDeleteDocEntry( bool );
47
48 void updateItem();
49
50 TOC *toc() const { return mToc; }
51
52 void setExpanded( bool open );
53
54 private:
55 void init( DocEntry * );
56 void scheduleTOCBuild();
57
58 TOC *mToc;
59
60 DocEntry *mEntry;
61 bool mAutoDeleteDocEntry;
62};
63
64}
65
66#endif // KHC_NAVIGATORITEM_H
67
68// vim:ts=2:sw=2:et
69