[vlmc-devel] MediaLibrary: Add changeEvent() to handle translation events.
Rohit Yadav
git at videolan.org
Sat Jun 4 16:51:11 CEST 2011
vlmc | branch: master | Rohit Yadav <rohityadav89 at gmail.com> | Sat Jun 4 20:37:16 2011 +0530| [ff3dc82bedae6812149811872f1f5ceb3e9e4519] | committer: Rohit Yadav
MediaLibrary: Add changeEvent() to handle translation events.
Adds changeEvent for handling translation change events in MediaLibrary.
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=ff3dc82bedae6812149811872f1f5ceb3e9e4519
---
src/Gui/library/MediaLibrary.cpp | 14 ++++++++++++++
src/Gui/library/MediaLibrary.h | 1 +
2 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/src/Gui/library/MediaLibrary.cpp b/src/Gui/library/MediaLibrary.cpp
index e9a00a8..93ec1aa 100644
--- a/src/Gui/library/MediaLibrary.cpp
+++ b/src/Gui/library/MediaLibrary.cpp
@@ -56,6 +56,20 @@ MediaLibrary::MediaLibrary(QWidget *parent) : QWidget(parent),
}
void
+MediaLibrary::changeEvent( QEvent *e )
+{
+ QWidget::changeEvent( e );
+ switch ( e->type() )
+ {
+ case QEvent::LanguageChange:
+ m_ui->retranslateUi( this );
+ break;
+ default:
+ break;
+ }
+}
+
+void
MediaLibrary::filterUpdated( const QString &filter )
{
const MediaListView::MediaList &medias = m_mediaListView->mediaList();
diff --git a/src/Gui/library/MediaLibrary.h b/src/Gui/library/MediaLibrary.h
index f78822c..133e0f3 100644
--- a/src/Gui/library/MediaLibrary.h
+++ b/src/Gui/library/MediaLibrary.h
@@ -44,6 +44,7 @@ class MediaLibrary : public QWidget
void dragMoveEvent( QDragMoveEvent *event );
void dragLeaveEvent( QDragLeaveEvent *event );
void dropEvent( QDropEvent *event );
+ void changeEvent( QEvent *e );
private:
/**
More information about the Vlmc-devel
mailing list