Commit 1600fb1a authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Renamed PreviewWidget to ClipPreviewWidget including filenames

parent bf2fbd11
/*****************************************************************************
* PreviewWidget: Preview widget
* ClipPreviewWidget: Preview widget
*****************************************************************************
* Copyright (C) 2008-2009 the VLMC team
*
......@@ -23,15 +23,15 @@
#include <QtDebug>
#include <QUrl>
#include "PreviewWidget.h"
#include "ui_PreviewWidget.h"
#include "ClipPreviewWidget.h"
#include "ui_ClipPreviewWidget.h"
#include "MediaListWidget.h"
#include "Library.h"
PreviewWidget::PreviewWidget( QWidget *parent ) :
ClipPreviewWidget::ClipPreviewWidget( QWidget *parent ) :
QDialog( parent ),
m_ui( new Ui::PreviewWidget ), m_clipLoaded( false ), m_videoStopped( true )
m_ui( new Ui::ClipPreviewWidget ), m_clipLoaded( false ), m_videoStopped( true )
{
m_ui->setupUi( this );
m_ui->groupBoxButton->hide();
......@@ -53,13 +53,13 @@ PreviewWidget::PreviewWidget( QWidget *parent ) :
// m_mediaList->setMediaPlayer( m_mediaPlayer );
}
PreviewWidget::~PreviewWidget()
ClipPreviewWidget::~ClipPreviewWidget()
{
delete m_mediaPlayer;
delete m_ui;
}
void PreviewWidget::changeEvent( QEvent *e )
void ClipPreviewWidget::changeEvent( QEvent *e )
{
switch ( e->type() )
{
......@@ -71,7 +71,7 @@ void PreviewWidget::changeEvent( QEvent *e )
}
}
void PreviewWidget::dragEnterEvent( QDragEnterEvent* event )
void ClipPreviewWidget::dragEnterEvent( QDragEnterEvent* event )
{
if ( event->mimeData()->hasFormat( "vlmc/uuid" ) )
event->acceptProposedAction();
......@@ -79,7 +79,7 @@ void PreviewWidget::dragEnterEvent( QDragEnterEvent* event )
event->acceptProposedAction();
}
void PreviewWidget::dropEvent( QDropEvent* event )
void ClipPreviewWidget::dropEvent( QDropEvent* event )
{
Media* media;
if ( event->mimeData()->urls().count() == 1 )
......@@ -106,7 +106,7 @@ void PreviewWidget::dropEvent( QDropEvent* event )
event->acceptProposedAction();
}
void PreviewWidget::positionChanged()
void ClipPreviewWidget::positionChanged()
{
if ( m_clipLoaded == false)
return ;
......@@ -114,12 +114,12 @@ void PreviewWidget::positionChanged()
}
void PreviewWidget::seekSliderPressed()
void ClipPreviewWidget::seekSliderPressed()
{
disconnect( m_mediaPlayer, SIGNAL( positionChanged() ), this, SLOT( positionChanged() ) );
}
void PreviewWidget::seekSliderMoved( int )
void ClipPreviewWidget::seekSliderMoved( int )
{
if ( m_clipLoaded == false || m_videoStopped == true )
return ;
......@@ -132,7 +132,7 @@ void PreviewWidget::seekSliderMoved( int )
m_mediaPlayer->setPosition( (float)m_ui->seekSlider->value() / 1000.0 );
}
void PreviewWidget::seekSliderReleased()
void ClipPreviewWidget::seekSliderReleased()
{
if ( m_endReached == true && m_videoStopped == false )
{
......@@ -146,7 +146,7 @@ void PreviewWidget::seekSliderReleased()
connect( m_mediaPlayer, SIGNAL( positionChanged() ), this, SLOT( positionChanged() ) );
}
void PreviewWidget::on_pushButtonPlay_clicked()
void ClipPreviewWidget::on_pushButtonPlay_clicked()
{
if ( m_clipLoaded == false)
return ;
......@@ -159,17 +159,17 @@ void PreviewWidget::on_pushButtonPlay_clicked()
m_mediaPlayer->play();
}
void PreviewWidget::videoPaused()
void ClipPreviewWidget::videoPaused()
{
m_ui->pushButtonPlay->setIcon( QIcon( ":/images/play" ) );
}
void PreviewWidget::videoPlaying()
void ClipPreviewWidget::videoPlaying()
{
m_ui->pushButtonPlay->setIcon( QIcon( ":/images/pause" ) );
}
void PreviewWidget::endReached()
void ClipPreviewWidget::endReached()
{
//Media player part :
m_mediaPlayer->stop();
......
......@@ -31,16 +31,16 @@
#include "VLCMediaList.h"
namespace Ui {
class PreviewWidget;
class ClipPreviewWidget;
}
class PreviewWidget : public QDialog
class ClipPreviewWidget : public QDialog
{
Q_OBJECT
Q_DISABLE_COPY( PreviewWidget )
Q_DISABLE_COPY( ClipPreviewWidget )
public:
explicit PreviewWidget( QWidget *parent = 0 );
virtual ~PreviewWidget();
explicit ClipPreviewWidget( QWidget *parent = 0 );
virtual ~ClipPreviewWidget();
protected:
virtual void changeEvent( QEvent *e );
......@@ -58,7 +58,7 @@ private slots:
void endReached();
private:
Ui::PreviewWidget* m_ui;
Ui::ClipPreviewWidget* m_ui;
LibVLCpp::MediaPlayer* m_mediaPlayer;
// LibVLCpp::MediaList* m_mediaList;
bool m_clipLoaded;
......
......@@ -140,7 +140,7 @@ void MainWindow::m_initializeDockWidgets( void )
setupLibrary();
dockManager->addDockedWidget( new PreviewWidget( this ),
dockManager->addDockedWidget( new ClipPreviewWidget( this ),
tr( "Preview" ),
Qt::AllDockWidgetAreas,
QDockWidget::AllDockWidgetFeatures,
......
......@@ -26,7 +26,7 @@
#include <QApplication>
#include <QSlider>
#include "ui_MainWindow.h"
#include "PreviewWidget.h"
#include "ClipPreviewWidget.h"
#include "DockWidgetManager.h"
#include "Preferences.h"
#include "MetaDataManager.h"
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>PreviewWidget</class>
<widget class="QDialog" name="PreviewWidget">
<class>ClipPreviewWidget</class>
<widget class="QDialog" name="ClipPreviewWidget">
<property name="windowModality">
<enum>Qt::ApplicationModal</enum>
</property>
......
......@@ -21,7 +21,7 @@ SOURCES += src/main.cpp \
src/LibVLCpp/VLCMedia.cpp \
src/gui/TracksView.cpp \
src/gui/TracksScene.cpp \
src/gui/PreviewWidget.cpp \
src/gui/ClipPreviewWidget.cpp \
src/gui/TracksRuler.cpp \
src/gui/Preferences.cpp \
src/gui/ListViewMediaItem.cpp \
......@@ -54,7 +54,7 @@ HEADERS += src/gui/MainWindow.h \
src/LibVLCpp/VLCMedia.h \
src/gui/TracksView.h \
src/gui/TracksScene.h \
src/gui/PreviewWidget.h \
src/gui/ClipPreviewWidget.h \
src/gui/TracksRuler.h \
src/gui/Preferences.h \
src/gui/ListViewMediaItem.h \
......@@ -79,7 +79,7 @@ HEADERS += src/gui/MainWindow.h \
src/Workflow/TrackWorkflow.h \
src/Workflow/MainWorkflow.h
FORMS += src/gui/ui/MainWindow.ui \
src/gui/ui/PreviewWidget.ui \
src/gui/ui/ClipPreviewWidget.ui \
src/gui/ui/Preferences.ui \
src/gui/ui/Timeline.ui \
src/gui/ui/LibraryWidget.ui \
......
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