]> git.tdb.fi Git - xinema.git/blob - remote/source/browsedirectoryitem.h
Implement seeking and play/pause controls in the remote
[xinema.git] / remote / source / browsedirectoryitem.h
1 #ifndef BROWSEDIRECTORYITEM_H_
2 #define BROWSEDIRECTORYITEM_H_
3
4 #include <QQuickItem>
5
6 class XinemaControlItem;
7
8 class BrowseDirectoryItem: public QQuickItem
9 {
10         Q_OBJECT
11
12         Q_PROPERTY(XinemaControlItem *control READ get_control WRITE set_control NOTIFY control_changed)
13         Q_PROPERTY(QString directory READ get_directory WRITE set_directory NOTIFY directory_changed)
14         Q_PROPERTY(QStringList subdirectories READ get_subdirectories NOTIFY subdirectories_changed)
15         Q_PROPERTY(QStringList files READ get_files NOTIFY files_changed)
16
17 private:
18         XinemaControlItem *control;
19         QString directory;
20         QStringList subdirectories;
21         QStringList files;
22
23 public:
24         BrowseDirectoryItem();
25
26         void set_control(XinemaControlItem *);
27         XinemaControlItem *get_control() const { return control; }
28
29         void set_directory(const QString &);
30         const QString &get_directory() const { return directory; }
31
32         const QStringList &get_subdirectories() const { return subdirectories; }
33         const QStringList &get_files() const { return files; }
34
35 signals:
36         void control_changed();
37         void directory_changed();
38         void subdirectories_changed();
39         void files_changed();
40
41 private slots:
42         void directory_started(const QString &);
43         void file_added(const QString &);
44         void subdirectory_added(const QString &);
45 };
46
47 #endif