[vlmc-devel] commit: MediaLibrary: Adding some filters basics. ( Hugo Beauzée-Luyssen )
git at videolan.org
git at videolan.org
Fri May 14 18:51:24 CEST 2010
vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Thu May 13 19:01:55 2010 +0200| [04fd93c2b9b6085e0a186e0349464e953000f9e4] | committer: Hugo Beauzée-Luyssen
MediaLibrary: Adding some filters basics.
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=04fd93c2b9b6085e0a186e0349464e953000f9e4
---
src/Gui/library/MediaLibrary.cpp | 18 ++++++++++++++++
src/Gui/library/MediaLibrary.h | 4 +++
src/Gui/library/ui/MediaLibrary.ui | 40 ++++++++++++++++++++++++++++++++++++
3 files changed, 62 insertions(+), 0 deletions(-)
diff --git a/src/Gui/library/MediaLibrary.cpp b/src/Gui/library/MediaLibrary.cpp
index c1ca804..38d74d7 100644
--- a/src/Gui/library/MediaLibrary.cpp
+++ b/src/Gui/library/MediaLibrary.cpp
@@ -26,6 +26,8 @@
#include "MediaListView.h"
#include "StackViewController.h"
+#include <QtDebug>
+
MediaLibrary::MediaLibrary(QWidget *parent) : QWidget(parent),
m_ui( new Ui::MediaLibrary() )
{
@@ -38,4 +40,20 @@ MediaLibrary::MediaLibrary(QWidget *parent) : QWidget(parent),
this, SIGNAL( importRequired() ) );
connect( mediaListView, SIGNAL( clipSelected( Clip* ) ),
this, SIGNAL( clipSelected( Clip* ) ) );
+ connect( m_ui->filterInput, SIGNAL( textChanged( const QString& ) ),
+ this, SLOT( filterUpdated( const QString& ) ) );
+ connect( m_ui->clearButton, SIGNAL( clicked() ),
+ this, SLOT( clearFilter() ) );
+}
+
+void
+MediaLibrary::filterUpdated( const QString &filter )
+{
+ qDebug() << "Filter updated:" << filter;
+}
+
+void
+MediaLibrary::clearFilter()
+{
+ m_ui->filterInput->setText( "" );
}
diff --git a/src/Gui/library/MediaLibrary.h b/src/Gui/library/MediaLibrary.h
index c8dc0d4..1f7ce74 100644
--- a/src/Gui/library/MediaLibrary.h
+++ b/src/Gui/library/MediaLibrary.h
@@ -39,6 +39,10 @@ class MediaLibrary : public QWidget
private:
Ui::MediaLibrary *m_ui;
+ private slots:
+ void filterUpdated( const QString &filter );
+ void clearFilter();
+
signals:
void importRequired();
void clipSelected( Clip* );
diff --git a/src/Gui/library/ui/MediaLibrary.ui b/src/Gui/library/ui/MediaLibrary.ui
index 45de2b0..32caa6c 100644
--- a/src/Gui/library/ui/MediaLibrary.ui
+++ b/src/Gui/library/ui/MediaLibrary.ui
@@ -21,6 +21,46 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0">
+ <widget class="QLabel" name="filterLabel">
+ <property name="text">
+ <string>Filter:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLineEdit" name="filterInput"/>
+ </item>
+ <item row="0" column="2">
+ <widget class="QPushButton" name="clearButton">
+ <property name="text">
+ <string>clear</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2">
+ <widget class="QComboBox" name="filterType">
+ <item>
+ <property name="text">
+ <string>Name</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QLabel" name="filterByLabel">
+ <property name="layoutDirection">
+ <enum>Qt::RightToLeft</enum>
+ </property>
+ <property name="text">
+ <string>Filter by</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
<widget class="QWidget" name="mediaListContainer" native="true"/>
</item>
<item>
More information about the Vlmc-devel
mailing list