1.1.13
by Jonathan Riddell
Import upstream version 4.0.80 |
1 |
/* This file is part of the KDE project
|
2 |
Copyright (C) 2005 Daniel Teske <teske@squorn.de>
|
|
3 |
||
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.
|
|
8 |
||
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.
|
|
13 |
||
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/>
|
|
16 |
*/
|
|
17 |
||
18 |
#ifndef __treeitem_h
|
|
19 |
#define __treeitem_h
|
|
20 |
||
21 |
#include <QtCore/QList> |
|
22 |
#include <kbookmark.h> |
|
23 |
||
24 |
class TreeItem |
|
25 |
{
|
|
26 |
public: |
|
27 |
TreeItem(const KBookmark& bk, TreeItem * parent); |
|
28 |
~TreeItem(); |
|
29 |
TreeItem * child(int row); |
|
30 |
TreeItem * parent() const; |
|
31 |
||
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; |
|
44 |
};
|
|
45 |
#endif
|