Commit 26f00a72 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Fixing some GUI mess.

parent 35dfb277
......@@ -57,7 +57,7 @@ ClipProperty::ClipProperty( Clip* clip, QWidget *parent ) :
connect( ui->addTagsButton, SIGNAL( clicked() ), this, SLOT( addTagsRequired() ) );
connect( ui->deleteTagsButton, SIGNAL( clicked() ), this, SLOT( removeTagsRequired() ) );
new ClipMetadataDisplayer( clip, ui->metadataContainer );
ui->metadataContainer->setWatchedClip( clip );
}
ClipProperty::~ClipProperty()
......
......@@ -59,7 +59,6 @@ ImportController::ImportController(QWidget *parent) :
m_mediaListView = new MediaListView( m_stackNav, m_temporaryMedias );
m_tag = new TagWidget( m_ui->tagContainer, 6 );
m_filesModel = new QFileSystemModel( this );
m_metadataDisplayer = new ClipMetadataDisplayer( NULL, m_ui->metadataContainer );
m_stackNav->pushViewController( m_mediaListView );
m_nameFilters << Media::AudioExtensions.split(' ', QString::SkipEmptyParts)
......@@ -134,7 +133,7 @@ ImportController::clipSelection( Clip* clip )
const QUuid& uuid = clip->uuid();
if ( m_currentUuid == uuid )
return ;
m_metadataDisplayer->setWatchedClip( clip );
m_ui->metadataContainer->setWatchedClip( clip );
m_preview->stop();
m_currentUuid = uuid;
m_tag->clipSelected( clip );
......
......@@ -86,7 +86,6 @@ class ImportController : public QDialog
quint32 m_nbMediaLoaded;
ClipRenderer* m_clipRenderer;
QStringList m_nameFilters;
ClipMetadataDisplayer *m_metadataDisplayer;
public slots:
void accept();
......
......@@ -127,7 +127,7 @@
</widget>
</item>
<item>
<widget class="QWidget" name="metadataContainer" native="true"/>
<widget class="ClipMetadataDisplayer" name="metadataContainer" native="true"/>
</item>
<item>
<widget class="QWidget" name="tagContainer" native="true"/>
......@@ -150,6 +150,14 @@
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>ClipMetadataDisplayer</class>
<extends>QWidget</extends>
<header>ClipMetadataDisplayer.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources>
<include location="../../../../ressources.qrc"/>
</resources>
......
......@@ -27,14 +27,12 @@
#include <QTime>
ClipMetadataDisplayer::ClipMetadataDisplayer( const Clip *clip, QWidget *parent /*= NULL*/ ) :
ClipMetadataDisplayer::ClipMetadataDisplayer( QWidget *parent /*= NULL*/ ) :
QWidget( parent ),
m_ui( new Ui::ClipMetadataDisplayer ),
m_watchedClip( clip )
m_watchedClip( NULL )
{
m_ui->setupUi( this );
if ( clip != NULL )
setWatchedClip( clip );
}
void
......
......@@ -36,7 +36,7 @@ class ClipMetadataDisplayer : public QWidget
Q_DISABLE_COPY(ClipMetadataDisplayer);
public:
explicit ClipMetadataDisplayer( const Clip* clip, QWidget *parent = 0 );
explicit ClipMetadataDisplayer( QWidget *parent = 0 );
void setWatchedClip( const Clip *clip );
......
......@@ -6,15 +6,15 @@
<rect>
<x>0</x>
<y>0</y>
<width>522</width>
<height>388</height>
<width>713</width>
<height>360</height>
</rect>
</property>
<property name="windowTitle">
<string/>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" colspan="4">
<item row="0" column="0" colspan="3">
<widget class="QFrame" name="frame">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
......@@ -57,19 +57,6 @@
</layout>
</widget>
</item>
<item row="0" column="4">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label">
<property name="text">
......@@ -77,48 +64,6 @@
</property>
</widget>
</item>
<item row="2" column="0" colspan="6">
<widget class="QListView" name="metaTagsView">
<property name="selectionMode">
<enum>QAbstractItemView::MultiSelection</enum>
</property>
</widget>
</item>
<item row="3" column="5">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="6">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
<property name="centerButtons">
<bool>false</bool>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QToolButton" name="addTagsButton">
<property name="text">
......@@ -141,18 +86,64 @@
</property>
</widget>
</item>
<item row="2" column="6">
<widget class="QPlainTextEdit" name="annotationInput"/>
</item>
<item row="1" column="6">
<item row="1" column="3">
<widget class="QLabel" name="annotationLabel">
<property name="text">
<string>Annotations :</string>
</property>
</widget>
</item>
<item row="0" column="6">
<widget class="QWidget" name="metadataContainer" native="true">
<item row="2" column="0" colspan="3">
<widget class="QListView" name="metaTagsView">
<property name="selectionMode">
<enum>QAbstractItemView::MultiSelection</enum>
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="QPlainTextEdit" name="annotationInput"/>
</item>
<item row="4" column="3">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
<property name="centerButtons">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="3">
<widget class="ClipMetadataDisplayer" name="metadataContainer" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
......@@ -169,6 +160,14 @@
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>ClipMetadataDisplayer</class>
<extends>QWidget</extends>
<header>ClipMetadataDisplayer.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources>
<include location="../../../ressources.qrc"/>
</resources>
......
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