[vlc-devel] commit: Qt: display a locker in the statusBar when encryption is set. ( Jean-Baptiste Kempf )
git version control
git at videolan.org
Sat Feb 21 14:58:46 CET 2009
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat Feb 21 14:52:22 2009 +0100| [a9d5d43afdd66d829cca40b1888709848d3b2e25] | committer: Jean-Baptiste Kempf
Qt: display a locker in the statusBar when encryption is set.
This needs the core event, of course, in order to work... (not yet done, and probably for later).
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a9d5d43afdd66d829cca40b1888709848d3b2e25
---
modules/gui/qt4/input_manager.cpp | 1 +
modules/gui/qt4/input_manager.hpp | 4 +++-
modules/gui/qt4/main_interface.cpp | 15 +++++++++++++++
modules/gui/qt4/main_interface.hpp | 3 +++
4 files changed, 22 insertions(+), 1 deletions(-)
diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp
index fed980f..d2c9310 100644
--- a/modules/gui/qt4/input_manager.cpp
+++ b/modules/gui/qt4/input_manager.cpp
@@ -129,6 +129,7 @@ void InputManager::delInput()
emit statusChanged( END_S );
emit teletextPossible( false );
+ emit encryptionChanged( false );
emit AtoBchanged( false, false );
emit voutChanged( false );
emit voutListChanged( NULL, 0 );
diff --git a/modules/gui/qt4/input_manager.hpp b/modules/gui/qt4/input_manager.hpp
index 94f84d0..f7fb204 100644
--- a/modules/gui/qt4/input_manager.hpp
+++ b/modules/gui/qt4/input_manager.hpp
@@ -187,10 +187,12 @@ signals:
void AtoBchanged( bool, bool );
/// Vout
void voutChanged( bool );
+ void voutListChanged( vout_thread_t **pp_vout, int i_vout );
+ /// Other
void synchroChanged();
void bookmarksChanged();
void cachingChanged( float );
- void voutListChanged( vout_thread_t **pp_vout, int i_vout );
+ void encryptionChanged( bool );
};
class MainInputManager : public QObject
diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
index 06aaab0..a577ae9 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -82,6 +82,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
playlistVisible = false;
input_name = "";
fullscreenControls = NULL;
+ cryptedLabel = NULL;
/* Ask for privacy */
askForPrivacy();
@@ -348,6 +349,20 @@ inline void MainInterface::createStatusBar()
- right-clicking and clicking just toggle between remaining and
elapsed time.*/
CONNECT( timeLabel, timeLabelDoubleClicked(), THEDP, gotoTimeDialog() );
+
+ CONNECT( THEMIM->getIM(), encryptionChanged( bool ) , this, showCryptedLabel( bool ) );
+}
+
+void MainInterface::showCryptedLabel( bool )
+{
+ if( cryptedLabel == NULL )
+ {
+ cryptedLabel = new QLabel;
+ cryptedLabel->setPixmap( QPixmap( ":/eject" ) );
+ statusBar()->addWidget( cryptedLabel );
+ }
+
+ cryptedLabel->show();
}
inline void MainInterface::initSystray()
diff --git a/modules/gui/qt4/main_interface.hpp b/modules/gui/qt4/main_interface.hpp
index c84df94..3f84db8 100644
--- a/modules/gui/qt4/main_interface.hpp
+++ b/modules/gui/qt4/main_interface.hpp
@@ -141,6 +141,7 @@ private:
/* Status Bar */
QLabel *nameLabel;
+ QLabel *cryptedLabel;
virtual void customEvent( QEvent *);
virtual void keyPressEvent( QKeyEvent *);
@@ -171,6 +172,8 @@ private slots:
void handleSystrayClick( QSystemTrayIcon::ActivationReason );
void updateSystrayTooltipName( QString );
void updateSystrayTooltipStatus( int );
+
+ void showCryptedLabel( bool );
signals:
void askReleaseVideo( );
void askVideoToResize( unsigned int, unsigned int );
More information about the vlc-devel
mailing list