add more spacing
[personal-kdebase.git] / apps / keditbookmarks / treeitem_p.h
blob1903742c9b296a4ea175e690b8f163ed4621762b
1 /* This file is part of the KDE project
2 Copyright (C) 2005 Daniel Teske <teske@squorn.de>
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License as
6 published by the Free Software Foundation; either version 2 of
7 the License, or (at your option) version 3.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>
18 #ifndef __treeitem_h
19 #define __treeitem_h
21 #include <QtCore/QList>
22 #include <kbookmark.h>
24 class TreeItem
26 public:
27 TreeItem(const KBookmark& bk, TreeItem * parent);
28 ~TreeItem();
29 TreeItem * child(int row);
30 TreeItem * parent() const;
32 void insertChildren(int first, int last);
33 void deleteChildren(int first, int last);
34 void moveChildren(int first, int last, TreeItem * newParent, int position);
35 KBookmark bookmark() const;
36 int childCount();
37 TreeItem * treeItemForBookmark(const KBookmark& bk);
38 private:
39 void initChildren();
40 bool init;
41 QList<TreeItem *> children;
42 TreeItem * mparent;
43 KBookmark mbk;
45 #endif