Committing last patch from reviewboard http://reviewboard.kde.org/r/4167/diff/3/
[plasma-media-center:mainline.git] / applets / mediabrowser / modelpackages / localvideos / localvideospackage.h
1 /***************************************************************************
2  *   Copyright 2009 by Alessandro Diaferia <alediaferia@gmail.com>         *
3  *                                                                         *
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.                                   *
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, write to the                         *
16  *   Free Software Foundation, Inc.,                                       *
17  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA .        *
18  ***************************************************************************/
19 #ifndef LOCALVIDEOSPACKAGE_H
20 #define LOCALVIDEOSPACKAGE_H
21
22 #include <mediabrowserlibs/modelpackage.h>
23
24 #include "ui_localvideosconfig.h"
25
26 class QAbstractItemModel;
27 class KConfigDialog;
28 class KDirModel;
29
30 class LocalVideosPackage : public ModelPackage
31 {
32     Q_OBJECT
33 public:
34     LocalVideosPackage(QObject *parent, const QVariantList &args);
35     ~LocalVideosPackage();
36
37     QAbstractItemModel *model();
38     ModelPackage::BrowsingType browsingType() const;
39
40     void createConfigurationInterface(KConfigDialog *parent);
41
42     void init();
43
44 private slots:
45     void configAccepted();
46
47 private:
48     Ui::LocalVideosConfig uiLocal;
49     bool m_fromPlaces;
50     bool m_folderNavigation;
51     KUrl m_localUrl;
52     QStringList m_mimeTypes;
53
54     KDirModel *m_model;
55
56 private:
57     void setFolderNavigation();
58 };
59
60 #endif // LOCALVIDEOSPACKAGE_H