~ubuntu-branches/ubuntu/warty/kdebase/warty

« back to all changes in this revision

Viewing changes to konqueror/sidebar/trees/dirtree_module/dirtree_module.h

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones
  • Date: 2004-09-16 04:51:45 UTC
  • Revision ID: james.westby@ubuntu.com-20040916045145-9vr63kith3k1cpza
Tags: upstream-3.2.2
ImportĀ upstreamĀ versionĀ 3.2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* This file is part of the KDE project
 
2
   Copyright (C) 2000 David Faure <faure@kde.org>
 
3
 
 
4
   This library is free software; you can redistribute it and/or
 
5
   modify it under the terms of the GNU Library General Public
 
6
   License version 2 as published by the Free Software Foundation.
 
7
 
 
8
   This library is distributed in the hope that it will be useful,
 
9
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
11
   Library General Public License for more details.
 
12
 
 
13
   You should have received a copy of the GNU Library General Public License
 
14
   along with this library; see the file COPYING.LIB.  If not, write to
 
15
   the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 
16
   Boston, MA 02111-1307, USA.
 
17
*/
 
18
 
 
19
#ifndef dirtree_module_h
 
20
#define dirtree_module_h
 
21
 
 
22
#include <konq_sidebartreemodule.h>
 
23
#include <kfileitem.h>
 
24
#include <qpixmap.h>
 
25
#include <qdict.h>
 
26
#include <qptrdict.h>
 
27
 
 
28
class KDirLister;
 
29
class KonqSidebarTree;
 
30
class KonqSidebarTreeItem;
 
31
class KonqSidebarDirTreeItem;
 
32
class KonqPropsView;
 
33
 
 
34
class KonqSidebarDirTreeModule : public QObject, public KonqSidebarTreeModule
 
35
{
 
36
    Q_OBJECT
 
37
public:
 
38
    KonqSidebarDirTreeModule( KonqSidebarTree * parentTree, bool );
 
39
    virtual ~KonqSidebarDirTreeModule();
 
40
 
 
41
    virtual void addTopLevelItem( KonqSidebarTreeTopLevelItem * item );
 
42
 
 
43
    virtual void openTopLevelItem( KonqSidebarTreeTopLevelItem * item );
 
44
 
 
45
    virtual void followURL( const KURL & url );
 
46
 
 
47
    // Called by KonqSidebarDirTreeItem
 
48
    void openSubFolder( KonqSidebarTreeItem *item );
 
49
    void addSubDir( KonqSidebarTreeItem *item );
 
50
    void removeSubDir( KonqSidebarTreeItem *item, bool childrenonly = false );
 
51
 
 
52
private slots:
 
53
    void slotNewItems( const KFileItemList & );
 
54
    void slotRefreshItems( const KFileItemList & );
 
55
    void slotDeleteItem( KFileItem *item );
 
56
    void slotRedirection( const KURL & oldUrl, const KURL & newUrl );
 
57
    void slotListingStopped( const KURL & url );
 
58
 
 
59
private:
 
60
    //KonqSidebarTreeItem * findDir( const KURL &_url );
 
61
    void listDirectory( KonqSidebarTreeItem *item );
 
62
    KURL::List selectedUrls();
 
63
 
 
64
    // URL -> item
 
65
    // Each KonqSidebarDirTreeItem is indexed on item->id() and
 
66
    // all item->alias'es
 
67
    QDict<KonqSidebarTreeItem> m_dictSubDirs;
 
68
 
 
69
    // KFileItem -> item
 
70
    QPtrDict<KonqSidebarTreeItem> m_ptrdictSubDirs;
 
71
 
 
72
    KDirLister * m_dirLister;
 
73
 
 
74
    KURL m_selectAfterOpening;
 
75
 
 
76
    KonqSidebarTreeTopLevelItem * m_topLevelItem;
 
77
};
 
78
 
 
79
 
 
80
#endif