#ifndef TIMELINE_H
#define TIMELINE_H
#include <QFrame>
#include <QLabel>
#include <QUrl>
#include "audio_editor.h"

class timeline : public QFrame
{
	Q_OBJECT
	public:
		timeline(QWidget * parent);
		QWidget *myparent;
		QString wl_pathname;
		int drop_x;
		QLabel *pntinsert;
		int max_diapo;
	        QMovie *insert_movie;
		int lengthtimeline;
		int postimeline;
		int tabposition;
		int zik_number;
		audio_editor *zik_1;
		int iscomment;
		int typeimport;
		int wl_importation;
		QList<QUrl> myurl;

		QAction *removeDiapo;
		QAction *editDiapo;
		QAction *copyDiapo;
		QAction *pasteDiapo;
		QAction *addaudioDiapo;
		QAction *synaudioDiapo;
		QAction *delaudioDiapo;
		QAction *stopaudioDiapo;
		QAction *melangeDiapo;
		QAction *duplicateDiapo;
		QAction *commentDiapo;
		QAction *delcommentDiapo;
	public slots:
		void deletethis();
		void editthis();
		void copythis();
		void pastethis();
		void addaudio();
		void syncaudio();
		void delaudio();
		void stopaudio();
		void melange();
		void duplicate();
		void comment();
		void delcomment();
	private:
		void dragLeaveEvent ( QDragLeaveEvent * event );
	signals:
		void godrop();
		void prepare_drop();
		void move_left();
		void move_right();
		void dia_delete();
		void dia_edit();
		void dia_copy();
		void dia_paste();
		void dia_melange();
		void dia_duplicate();
		void dia_comment();
		void dia_delcomment();
		void slice(int);
		void s_addaudio();
		void s_syncaudio();
		void s_delaudio();
		void s_stopaudio();
	protected:
		void dragMoveEvent(QDragMoveEvent *event);
		void contextMenuEvent(QContextMenuEvent *event);
		void dragEnterEvent(QDragEnterEvent *event);
		void dropEvent(QDropEvent *event);
		void wheelEvent(QWheelEvent *event);
		Qt::DropActions supportedDropActions () const;
};
#endif
