[vlmc-devel] commit: Workspace: Use the new notification zone. ( Hugo Beauzée-Luyssen )
git at videolan.org
git at videolan.org
Mon Jul 19 22:01:49 CEST 2010
vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Mon Jul 19 22:01:06 2010 +0200| [9d3d8fda4cf564964a5d262b25c705c4db02be15] | committer: Hugo Beauzée-Luyssen
Workspace: Use the new notification zone.
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=9d3d8fda4cf564964a5d262b25c705c4db02be15
---
src/Project/Workspace.cpp | 8 +++++++-
src/Project/Workspace.h | 3 +++
2 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/src/Project/Workspace.cpp b/src/Project/Workspace.cpp
index 1f839fb..3cf06a3 100644
--- a/src/Project/Workspace.cpp
+++ b/src/Project/Workspace.cpp
@@ -31,6 +31,7 @@
#include <QtDebug>
#ifdef WITH_GUI
+# include "NotificationZone.h"
# include <QMessageBox>
#endif
@@ -39,6 +40,10 @@ const QString Workspace::workspacePrefix = "workspace://";
Workspace::Workspace() : m_copyInProgress( false )
{
m_mediasToCopyMutex = new QMutex;
+#ifdef WITH_GUI
+ connect( this, SIGNAL( notify( QString ) ),
+ NotificationZone::getInstance(), SLOT( notify( QString ) ) );
+#endif
}
Workspace::~Workspace()
@@ -115,6 +120,8 @@ Workspace::clipLoaded( Clip *clip )
void
Workspace::copyTerminated( Media *media, QString dest )
{
+ emit notify( tr( "Workspace: " ) + media->fileInfo()->fileName() + tr( " copied to " ) + dest );
+
media->setFilePath( dest );
media->disconnect( this );
@@ -177,7 +184,6 @@ Workspace::copyAllToWorkspace()
QMutexLocker lock( m_mediasToCopyMutex );
while ( it != ite )
{
- qDebug() << "Enqueuing:" << it.value()->getMedia();
m_mediasToCopy.enqueue( it.value()->getMedia() );
++it;
}
diff --git a/src/Project/Workspace.h b/src/Project/Workspace.h
index d3532f7..5320efb 100644
--- a/src/Project/Workspace.h
+++ b/src/Project/Workspace.h
@@ -64,6 +64,9 @@ class Workspace : public QObject, public Singleton<Workspace>, public ErrorHandl
private slots:
void copyTerminated( Media* media, QString dest );
+ signals:
+ void notify( QString );
+
friend class Singleton<Workspace>;
};
More information about the Vlmc-devel
mailing list