X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=modules%2Fgui%2Fqt4%2Fcomponents%2Finfopanels.cpp;h=57a738a5e68fdb5642ff2d96bd6bbe0a1a3580ae;hb=6ee1e193fd896ab9a4729fde14f009d9ce629815;hp=d4026c4788daa9d071c1ebb126394e025d2e04f0;hpb=379a9a647e04e3a8deeee677f883815b6f87dc35;p=vlc diff --git a/modules/gui/qt4/components/infopanels.cpp b/modules/gui/qt4/components/infopanels.cpp index d4026c4788..57a738a5e6 100644 --- a/modules/gui/qt4/components/infopanels.cpp +++ b/modules/gui/qt4/components/infopanels.cpp @@ -50,7 +50,7 @@ MetaPanel::MetaPanel( QWidget *parent, : QWidget( parent ), p_intf( _p_intf ) { QGridLayout *metaLayout = new QGridLayout( this ); - + int line = 0; /* Counter for GridLayout */ p_input = NULL; @@ -59,7 +59,7 @@ MetaPanel::MetaPanel( QWidget *parent, widget = new QLineEdit; \ metaLayout->addWidget( widget, line, 1, 1, 9 ); \ line++; } - + /* Title, artist and album*/ ADD_META( VLC_META_TITLE, title_text ); /* OK */ ADD_META( VLC_META_ARTIST, artist_text ); /* OK */ @@ -69,15 +69,15 @@ MetaPanel::MetaPanel( QWidget *parent, /* FIXME List id3genres.h is not includable yet ? */ genre_text = new QLineEdit; metaLayout->addWidget( new QLabel( qtr( VLC_META_GENRE ) + " :" ), line, 0 ); - metaLayout->addWidget( genre_text, line, 1, 1, 5 ); + metaLayout->addWidget( genre_text, line, 1, 1, 4 ); /* Number - on the same line */ metaLayout->addWidget( new QLabel( qtr( "Track Number" ) + " :" ), - line, 6 ); + line, 5, 1, 2 ); seqnum_text = new QLineEdit; seqnum_text->setInputMask("0000"); seqnum_text->setAlignment( Qt::AlignRight ); - metaLayout->addWidget( seqnum_text, line, 7, 1, 4 ); + metaLayout->addWidget( seqnum_text, line, 7, 1, 3 ); line++; /* Date (Should be in years) */ @@ -85,17 +85,18 @@ MetaPanel::MetaPanel( QWidget *parent, date_text->setInputMask("0000"); date_text->setAlignment( Qt::AlignRight ); metaLayout->addWidget( new QLabel( qtr( VLC_META_DATE ) + " :" ), line, 0 ); - metaLayout->addWidget( date_text, line, 1, 1, 2 ); + metaLayout->addWidget( date_text, line, 1, 1, 3 ); /* Rating - on the same line */ - metaLayout->addWidget( new QLabel( qtr( VLC_META_RATING ) + " :" ), line, 3, 1, 2 ); + metaLayout->addWidget( new QLabel( qtr( VLC_META_RATING ) + " :" ), line, 4, 1, 2 ); rating_text = new QSpinBox; setSpinBounds( rating_text ); - metaLayout->addWidget( rating_text, line, 5, 1, 2 ); + metaLayout->addWidget( rating_text, line, 6, 1, 1 ); /* Language on the same line */ - metaLayout->addWidget( new QLabel( qfu( VLC_META_LANGUAGE ) + " :" ), line, 7 ); + metaLayout->addWidget( new QLabel( qfu( VLC_META_LANGUAGE ) + " :" ), line, 7, 1, 2 ); language_text = new QLineEdit; - metaLayout->addWidget( language_text, line, 8, 1, 2 ); + language_text->setReadOnly( true ); + metaLayout->addWidget( language_text, line, 9, 1, 1 ); line++; /* ART_URL */ @@ -107,7 +108,7 @@ MetaPanel::MetaPanel( QWidget *parent, art_cover->setScaledContents( true ); art_cover->setPixmap( QPixmap( ":/noart.png" ) ); metaLayout->addWidget( art_cover, line, 8, 4, 2 ); - + /* Settings is unused */ /* l->addWidget( new QLabel( qtr( VLC_META_SETTING ) + " :" ), line, 5 ); setting_text = new QLineEdit; @@ -119,13 +120,13 @@ MetaPanel::MetaPanel( QWidget *parent, widget = new QLineEdit; \ metaLayout->addWidget( widget, line, 1, 1, 7 ); \ line++; } - + /* Now Playing - Useful for live feeds (HTTP, DVB, ETC...) */ ADD_META_2( VLC_META_NOW_PLAYING, nowplaying_text ); nowplaying_text->setReadOnly( true ); ADD_META_2( VLC_META_PUBLISHER, publisher_text ); ADD_META_2( VLC_META_COPYRIGHT, copyright_text ); - ADD_META_2( "Comments:", description_text ); + ADD_META_2( "Comments", description_text ); /* useless metadata */ @@ -137,12 +138,13 @@ MetaPanel::MetaPanel( QWidget *parent, #undef ADD_META_2 CONNECT( title_text, textEdited( QString ), this, enterEditMode() ); - CONNECT( description_text, textEdited( QString ), this, enterEditMode() ); CONNECT( artist_text, textEdited( QString ), this, enterEditMode() ); CONNECT( collection_text, textEdited( QString ), this, enterEditMode() ); CONNECT( genre_text, textEdited( QString ), this, enterEditMode() ); - CONNECT( date_text, textEdited( QString ), this, enterEditMode() ); CONNECT( seqnum_text, textEdited( QString ), this, enterEditMode() ); + + CONNECT( date_text, textEdited( QString ), this, enterEditMode() ); + CONNECT( description_text, textEdited( QString ), this, enterEditMode() ); /* CONNECT( rating_text, valueChanged( QString ), this, enterEditMode( QString ) );*/ /* We are not yet in Edit Mode */ @@ -158,8 +160,8 @@ void MetaPanel::update( input_item_t *p_item ) { /* Don't update if you are in edit mode */ if( b_inEditMode ) return; - - char *psz_meta; + + char *psz_meta; #define UPDATE_META( meta, widget ) { \ psz_meta = input_item_Get##meta( p_item ); \ if( !EMPTY_STR( psz_meta ) ) \ @@ -283,7 +285,7 @@ void MetaPanel::saveMeta() module_Unneed( p_playlist, p_mod ); PL_UNLOCK; pl_Release( p_playlist ); - + /* Reset the status of the mode. No need to emit any signal */ b_inEditMode = false; } @@ -347,7 +349,7 @@ ExtraMetaPanel::ExtraMetaPanel( QWidget *parent, } /** - * Update the Extra Metadata from p_meta->i_extras + * Update the Extra Metadata from p_meta->i_extras **/ void ExtraMetaPanel::update( input_item_t *p_item ) { @@ -453,9 +455,7 @@ void InfoPanel::clear() **/ /* void InfoPanel::saveCodecsInfo() -{ - -} +{} */ /** @@ -494,10 +494,10 @@ InputStatsPanel::InputStatsPanel( QWidget *parent, catName->addChild( itemName ); } /* Create the main categories */ - CREATE_CATEGORY( input, qtr("Input") ); + CREATE_CATEGORY( audio, qtr("Audio") ); CREATE_CATEGORY( video, qtr("Video") ); + CREATE_CATEGORY( input, qtr("Input") ); CREATE_CATEGORY( streaming, qtr("Streaming") ); - CREATE_CATEGORY( audio, qtr("Audio") ); CREATE_AND_ADD_TO_CAT( read_media_stat, qtr("Read at media"), "0", input , "kB" );