Commit d156a13c authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Renamed MediaProperty class/ui to ClipProperty

parent 68a59bd1
/*****************************************************************************
* ClipProperty.cpp: Handle the clip properties and meta tags edition
*****************************************************************************
* Copyright (C) 2008-2009 the VLMC team
*
* Authors: Hugo Beauzee-Luyssen <hugo@vlmc.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include <QtDebug>
#include <QTime>
#include <QPushButton>
#include <QStringListModel>
#include <QInputDialog>
#include "MediaProperty.h"
#include "ui_MediaProperty.h"
#include "ClipProperty.h"
#include "ui_ClipProperty.h"
MediaProperty::MediaProperty( Clip* clip, QWidget *parent ) :
ClipProperty::ClipProperty( Clip* clip, QWidget *parent ) :
QDialog( parent ),
ui( new Ui::MediaProperty ),
ui( new Ui::ClipProperty ),
m_clip( clip )
{
QTime duration;
......@@ -37,12 +59,12 @@ MediaProperty::MediaProperty( Clip* clip, QWidget *parent ) :
connect( ui->deleteTagsButton, SIGNAL( clicked() ), this, SLOT( removeTagsRequired() ) );
}
MediaProperty::~MediaProperty()
ClipProperty::~ClipProperty()
{
delete ui;
}
void MediaProperty::changeEvent( QEvent *e )
void ClipProperty::changeEvent( QEvent *e )
{
QDialog::changeEvent( e );
switch ( e->type() )
......@@ -55,7 +77,7 @@ void MediaProperty::changeEvent( QEvent *e )
}
}
void MediaProperty::apply()
void ClipProperty::apply()
{
QStringListModel* model = dynamic_cast<QStringListModel*>( ui->metaTagsView->model() );
if ( model == NULL )
......@@ -63,7 +85,7 @@ void MediaProperty::apply()
m_clip->setMetaTags( model->stringList() );
}
void MediaProperty::addTagsRequired()
void ClipProperty::addTagsRequired()
{
bool ok;
QString newTags = QInputDialog::getText( this, tr( "New tags edition" ),
......@@ -81,7 +103,7 @@ void MediaProperty::addTagsRequired()
}
}
void MediaProperty::removeTagsRequired()
void ClipProperty::removeTagsRequired()
{
QStringListModel* model = dynamic_cast<QStringListModel*>( ui->metaTagsView->model() );
if ( model == NULL )
......
/*****************************************************************************
* MediaProperty.h: Handle the media property and meta tags edition
* ClipProperty.h: Handle the clip properties and meta tags edition
*****************************************************************************
* Copyright (C) 2008-2009 the VLMC team
*
......@@ -20,23 +20,23 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef MEDIAPROPERTY_H
#define MEDIAPROPERTY_H
#ifndef CLIPPROPERTY_H
#define CLIPPROPERTY_H
#include <QDialog>
#include "Clip.h"
#include <QAbstractButton>
namespace Ui {
class MediaProperty;
class ClipProperty;
}
class MediaProperty : public QDialog
class ClipProperty : public QDialog
{
Q_OBJECT
public:
MediaProperty( Clip* clip, QWidget *parent = 0 );
~MediaProperty();
ClipProperty( Clip* clip, QWidget *parent = 0 );
~ClipProperty();
protected:
void changeEvent(QEvent *e);
......@@ -47,8 +47,8 @@ private slots:
void removeTagsRequired();
private:
Ui::MediaProperty* ui;
Ui::ClipProperty* ui;
Clip* m_clip;
};
#endif // MEDIAPROPERTY_H
#endif // CLIPPROPERTY_H
......@@ -39,7 +39,7 @@
#include "WorkflowRenderer.h"
#include "ClipRenderer.h"
#include "UndoStack.h"
#include "MediaProperty.h"
#include "ClipProperty.h"
MainWindow::MainWindow( QWidget *parent ) :
QMainWindow( parent ), m_renderer( NULL )
......@@ -259,6 +259,6 @@ void MainWindow::registerWidgetInViewMenu( QDockWidget* widget )
void MainWindow::mediaListItemDoubleClicked( QListWidgetItem* qItem )
{
ListViewMediaItem* item = static_cast<ListViewMediaItem*>( qItem );
MediaProperty* mp = new MediaProperty( item->getClip(), this );
ClipProperty* mp = new ClipProperty( item->getClip(), this );
mp->show();
}
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MediaProperty</class>
<widget class="QDialog" name="MediaProperty">
<class>ClipProperty</class>
<widget class="QDialog" name="ClipProperty">
<property name="geometry">
<rect>
<x>0</x>
......@@ -239,7 +239,7 @@
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>MediaProperty</receiver>
<receiver>ClipProperty</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
......@@ -255,7 +255,7 @@
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>MediaProperty</receiver>
<receiver>ClipProperty</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
......
......@@ -48,7 +48,7 @@ SOURCES += src/main.cpp \
src/WorkflowFileRenderer.cpp \
src/UndoStack.cpp \
src/metadata/MetaDataManager.cpp \
src/gui/MediaProperty.cpp
src/gui/ClipProperty.cpp
HEADERS += src/gui/MainWindow.h \
src/gui/DockWidgetManager.h \
src/gui/LibraryWidget.h \
......@@ -95,9 +95,9 @@ HEADERS += src/gui/MainWindow.h \
src/UndoStack.h \
src/tools/WaitCondition.hpp \
src/metadata/MetaDataManager.h \
src/gui/MediaProperty.h \
src/commands/Commands.hpp \
src/tools/QSingleton.hpp
src/tools/QSingleton.hpp \
src/gui/ClipProperty.h
FORMS += src/gui/ui/MainWindow.ui \
src/gui/ui/PreviewWidget.ui \
src/gui/ui/Preferences.ui \
......@@ -107,7 +107,7 @@ FORMS += src/gui/ui/MainWindow.ui \
src/gui/ui/Transcode.ui \
src/gui/ui/FileBrowser.ui \
src/gui/ui/WorkflowFileRenderer.ui \
src/gui/ui/MediaProperty.ui
src/gui/ui/ClipProperty.ui
TRANSLATIONS = ts/vlmc_es.ts \
ts/vlmc_fr.ts \
......
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