Commit 2399aee5 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Metatags edition is functional

parent 8b3d2b6d
......@@ -54,7 +54,7 @@ LibraryWidget::~LibraryWidget()
}
}
ListViewMediaItem* LibraryWidget::addMedia( const Media* media )
ListViewMediaItem* LibraryWidget::addMedia( Media* media )
{
Media::FileType fileType = media->getFileType();
ListViewMediaItem* item = new ListViewMediaItem( media, fileType );
......
......@@ -48,7 +48,7 @@ public:
explicit LibraryWidget( QWidget *parent = 0 );
virtual ~LibraryWidget();
ListViewMediaItem* addMedia( const Media* clip );
ListViewMediaItem* addMedia( Media* clip );
void removeMedia( const QUuid& uuid );
int getIndex( ListViewMediaItem* media );
const MediaListWidget* getVideoListWidget() const;
......
......@@ -27,7 +27,7 @@
#define MAX_NAME_LENGTH 10
ListViewMediaItem::ListViewMediaItem( const Media* media, Media::FileType fType, QListWidget* parent, int type ) :
ListViewMediaItem::ListViewMediaItem( Media* media, Media::FileType fType, QListWidget* parent, int type ) :
QListWidgetItem( parent, type ), m_media ( media )
{
m_fileType = fType;
......@@ -62,7 +62,7 @@ void ListViewMediaItem::snapshotChanged()
"Length: " + length.toString() );
}
const Media* ListViewMediaItem::getMedia() const
Media* ListViewMediaItem::getMedia()
{
return m_media;
}
......
......@@ -47,7 +47,7 @@ public:
* \param parent parent widget
* \param type
*/
ListViewMediaItem( const Media* media, Media::FileType fType, QListWidget* parent = 0, int type = Type );
ListViewMediaItem( Media* media, Media::FileType fType, QListWidget* parent = 0, int type = Type );
/**
* \brief Destructor
......@@ -60,7 +60,7 @@ public:
*/
Media::FileType getFileType() const { return m_fileType; }
const Media* getMedia() const;
Media* getMedia();
//void setInputMedia( InputMedia* inputMedia ) { m_inputMedia = inputMedia; }
......@@ -73,7 +73,7 @@ private:
/**
* \Instance of the InputMedia
*/
const Media* m_media;
Media* m_media;
/**
* The truncated name of the media
......
......@@ -6,7 +6,7 @@
#include "MediaProperty.h"
#include "ui_MediaProperty.h"
MediaProperty::MediaProperty( const Media* media, QWidget *parent ) :
MediaProperty::MediaProperty( Media* media, QWidget *parent ) :
QDialog( parent ),
ui( new Ui::MediaProperty ),
m_media( media )
......@@ -53,5 +53,6 @@ void MediaProperty::changeEvent( QEvent *e )
void MediaProperty::apply()
{
QStringListModel* model = dynamic_cast<QStringListModel*>( ui->metaTagsView->model() );
m_media->setMetaTags( model->stringList() );
}
......@@ -35,7 +35,7 @@ class MediaProperty : public QDialog
{
Q_OBJECT
public:
MediaProperty( const Media* media, QWidget *parent = 0 );
MediaProperty( Media* media, QWidget *parent = 0 );
~MediaProperty();
protected:
......@@ -46,7 +46,7 @@ private slots:
private:
Ui::MediaProperty* ui;
const Media* m_media;
Media* m_media;
};
#endif // MEDIAPROPERTY_H
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment