1 /***************************************************************************
2 * Copyright (C) 2009 by Frank Reininghaus (frank78ac@googlemail.com) *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
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, write to the *
16 * Free Software Foundation, Inc., *
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
18 ***************************************************************************/
20 #ifndef DOLPHINDETAILSVIEWEXPANDER_H
21 #define DOLPHINDETAILSVIEWEXPANDER_H
27 class DolphinDetailsView
;
31 class DolphinSortFilterProxyModel
;
34 * @brief Expands a given set of subfolders in collaboration with the dir lister and the dir model.
36 * Note that only one subfolder can be expanded at a time. Each expansion triggers KDirLister::openUrl(...),
37 * and further expansions can only be done the next time the dir lister emits its completed() signal.
39 class DolphinDetailsViewExpander
: public QObject
44 explicit DolphinDetailsViewExpander(DolphinDetailsView
* parent
,
45 const QSet
<KUrl
>& urlsToExpand
);
47 virtual ~DolphinDetailsViewExpander();
50 * Stops the expansion and deletes the object via deleteLater().
56 * This slot is invoked every time the dir lister has completed a listing.
57 * It expands the first URL from the list m_urlsToExpand that can be found in the dir model.
58 * If the list is empty, stop() is called.
60 void slotDirListerCompleted();
64 * Is emitted when the expander has finished expanding URLs in the details view.
69 QList
<KUrl
> m_urlsToExpand
;
71 DolphinDetailsView
* m_detailsView
;
72 const KDirLister
* m_dirLister
;
73 const DolphinModel
* m_dolphinModel
;
74 const DolphinSortFilterProxyModel
* m_proxyModel
;