/**********************************************************************
 * LeechCraft - modular cross-platform feature rich internet client.
 * Copyright (C) 2006-2014  Georg Rudoy
 *
 * Distributed under the Boost Software License, Version 1.0.
 * (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
 **********************************************************************/

#pragma once

#include <QWidget>
#include "ui_eventswidget.h"

class QStandardItemModel;
class QQuickWidget;

namespace Media
{
	class IEventsProvider;

	struct EventInfo;
	typedef QList<EventInfo> EventInfos_t;
}

namespace LC
{
namespace LMP
{
	class EventsWidget : public QWidget
	{
		Q_OBJECT

		Ui::EventsWidget Ui_;
		QQuickWidget * const View_;

		QStandardItemModel * const Model_;

		QList<Media::IEventsProvider*> Providers_;
	public:
		EventsWidget (QWidget* = 0);

		void InitializeProviders ();
	private:
		void HandleEvents (const Media::EventInfos_t&);
	private slots:
		void on_Provider__activated (int);
		void handleAttendSure (int);
		void handleAttendMaybe (int);
		void handleUnattend (int);
	};
}
}
