2
* Copyright (C) 2012 Canonical Ltd
4
* This program is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 3 as
6
* published by the Free Software Foundation.
8
* This program 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
11
* GNU General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
* Jim Nelson <jim@yorba.org>
20
#ifndef GALLERY_EVENT_H_
21
#define GALLERY_EVENT_H_
25
#include <QDeclarativeListProperty>
27
#include <QtDeclarative>
29
#include "core/container-source.h"
30
#include "media/media-source.h"
32
class Event : public ContainerSource {
34
Q_PROPERTY(QDate date READ date NOTIFY date_altered)
35
Q_PROPERTY(QDeclarativeListProperty<MediaSource> mediaSources READ qml_media_sources
36
NOTIFY media_content_altered);
40
void media_content_altered();
44
explicit Event(const QDate &date);
46
static void RegisterType();
48
const QDate& date() const;
50
QDeclarativeListProperty<MediaSource> qml_media_sources();
53
virtual void notify_container_contents_altered(const QSet<DataObject *> *added,
54
const QSet<DataObject *> *removed);
56
virtual void DestroySource(bool destroy_backing, bool as_orphan);
60
QList<MediaSource*> all_media_;
63
QML_DECLARE_TYPE(Event);
65
#endif // GALLERY_EVENT_H_