1
// vim: set tabstop=4 shiftwidth=4 noexpandtab
3
Gwenview - A simple image viewer for KDE
4
Copyright 2000-2004 Aur�lien G�teau
6
This program is free software; you can redistribute it and/or
7
modify it under the terms of the GNU General Public License
8
as published by the Free Software Foundation; either version 2
9
of the License, or (at your option) any later version.
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.
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
28
#include <kfiletreebranch.h>
29
#include <kfiletreeview.h>
36
class FileTreeBranch : public KFileTreeBranch {
38
FileTreeBranch(KFileTreeView* tv, const KURL& url, const QString& title, const QString& icon);
41
const QString& icon() const { return mIcon; }
46
class DirView : public KFileTreeView {
49
DirView(QWidget* parent);
51
void readConfig(KConfig* config, const QString& group);
52
void writeConfig(KConfig* config, const QString& group);
55
void setURL(const KURL&);
58
void dirURLChanged(const KURL&);
59
void dirRenamed(const KURL& oldURL, const KURL& newURL);
62
void showEvent(QShowEvent*);
65
void contentsDragMoveEvent(QDragMoveEvent* event);
66
void contentsDragLeaveEvent(QDragLeaveEvent* event);
67
void contentsDropEvent(QDropEvent*);
70
void slotNewTreeViewItems(KFileTreeBranch*,const KFileTreeViewItemList&);
74
void slotItemsRefreshed(const KFileItemList& items);
76
// Do not name this slot "slotPopulateFinished", it will clash with
77
// "KFileTreeView::slotPopulateFinished".
78
void slotDirViewPopulateFinished(KFileTreeViewItem*);
81
void autoOpenDropTarget();
84
void slotContextMenu(KListView*,QListViewItem*,const QPoint&);
88
void showPropertiesDialog();
91
void showBranchPropertiesDialog();
93
void slotDirMade(KIO::Job*);
94
void slotDirRenamed(KIO::Job*);
95
void slotDirRemoved(KIO::Job*);
98
KFileTreeViewItem* findViewItem(KFileTreeViewItem*,const QString&);
99
void addBranch(const QString& url, const QString& title, const QString& icon);
100
void defaultBranches();
101
void showBranchPropertiesDialog(FileTreeBranch* editItem);
102
QPopupMenu* mPopupMenu;
103
QPopupMenu* mBranchPopupMenu;
104
int mBranchNewFolderItem;
105
QTimer* mAutoOpenTimer;
106
KFileTreeViewItem* mDropTarget;
107
QPtrList<FileTreeBranch> mBranches;
110
* Really defines the url, does not check if the wanted url is already the
113
void setURLInternal(const KURL&);
114
void refreshBranch(KFileItem* item, KFileTreeBranch* branch);