[vlc-commits] Qt: MediaInfo: name panels for public method usage
Francois Cartegnie
git at videolan.org
Mon Aug 13 12:50:25 CEST 2012
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Aug 13 12:49:38 2012 +0200| [1b978bf8a0b996b7fd49683924deb0ca88f33141] | committer: Francois Cartegnie
Qt: MediaInfo: name panels for public method usage
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1b978bf8a0b996b7fd49683924deb0ca88f33141
---
modules/gui/qt4/dialogs/mediainfo.cpp | 10 +++++-----
modules/gui/qt4/dialogs/mediainfo.hpp | 10 +++++++++-
modules/gui/qt4/dialogs_provider.cpp | 4 ++--
3 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/modules/gui/qt4/dialogs/mediainfo.cpp b/modules/gui/qt4/dialogs/mediainfo.cpp
index 4ad5db9..23db280 100644
--- a/modules/gui/qt4/dialogs/mediainfo.cpp
+++ b/modules/gui/qt4/dialogs/mediainfo.cpp
@@ -60,15 +60,15 @@ MediaInfoDialog::MediaInfoDialog( intf_thread_t *_p_intf,
infoTabW = new QTabWidget;
MP = new MetaPanel( infoTabW, p_intf );
- infoTabW->addTab( MP, qtr( "&General" ) );
+ infoTabW->insertTab( META_PANEL, MP, qtr( "&General" ) );
EMP = new ExtraMetaPanel( infoTabW );
- infoTabW->addTab( EMP, qtr( "&Metadata" ) );
+ infoTabW->insertTab( EXTRAMETA_PANEL, EMP, qtr( "&Metadata" ) );
IP = new InfoPanel( infoTabW );
- infoTabW->addTab( IP, qtr( "Co&dec" ) );
+ infoTabW->insertTab( INFO_PANEL, IP, qtr( "Co&dec" ) );
if( isMainInputInfo )
{
ISP = new InputStatsPanel( infoTabW );
- infoTabW->addTab( ISP, qtr( "S&tatistics" ) );
+ infoTabW->insertTab( INPUTSTATS_PANEL, ISP, qtr( "S&tatistics" ) );
}
QGridLayout *layout = new QGridLayout( this );
@@ -136,7 +136,7 @@ MediaInfoDialog::~MediaInfoDialog()
saveWidgetPosition( "Mediainfo" );
}
-void MediaInfoDialog::showTab( int i_tab = 0 )
+void MediaInfoDialog::showTab( panel i_tab = META_PANEL )
{
infoTabW->setCurrentIndex( i_tab );
show();
diff --git a/modules/gui/qt4/dialogs/mediainfo.hpp b/modules/gui/qt4/dialogs/mediainfo.hpp
index 49c1f18..f6f9af7 100644
--- a/modules/gui/qt4/dialogs/mediainfo.hpp
+++ b/modules/gui/qt4/dialogs/mediainfo.hpp
@@ -38,7 +38,15 @@ public:
MediaInfoDialog( intf_thread_t *,
input_item_t * input = NULL );
- void showTab( int );
+ enum panel
+ {
+ META_PANEL = 0,
+ EXTRAMETA_PANEL,
+ INFO_PANEL,
+ INPUTSTATS_PANEL
+ };
+
+ void showTab( panel );
#if 0
void setInput( input_item_t * );
#endif
diff --git a/modules/gui/qt4/dialogs_provider.cpp b/modules/gui/qt4/dialogs_provider.cpp
index f34cb03..978b23d 100644
--- a/modules/gui/qt4/dialogs_provider.cpp
+++ b/modules/gui/qt4/dialogs_provider.cpp
@@ -247,12 +247,12 @@ void DialogsProvider::aboutDialog()
void DialogsProvider::mediaInfoDialog()
{
- MediaInfoDialog::getInstance( p_intf )->showTab( 0 );
+ MediaInfoDialog::getInstance( p_intf )->showTab( MediaInfoDialog::META_PANEL );
}
void DialogsProvider::mediaCodecDialog()
{
- MediaInfoDialog::getInstance( p_intf )->showTab( 2 );
+ MediaInfoDialog::getInstance( p_intf )->showTab( MediaInfoDialog::INFO_PANEL );
}
void DialogsProvider::bookmarksDialog()
More information about the vlc-commits
mailing list