int GPD_PrimMetaSQuad::savePrivate(ostream &os, int binary) const { if (binary) { if (!UTwrite(os, &xyExp)) return -1; if (!UTwrite(os, &zExp)) return -1; } else { os << " " << xyExp << " " << zExp; if (!os) return -1; } if (saveMeta(os, binary) < 0) return -1; return GPD_PrimSphere::savePrivate(os, binary); }
MediaInfoDialog::MediaInfoDialog( intf_thread_t *_p_intf, input_item_t *p_item ) : QVLCFrame( _p_intf ) { isMainInputInfo = ( p_item == NULL ); setWindowTitle( qtr( "Media Information" ) ); /* TabWidgets and Tabs creation */ infoTabW = new QTabWidget; MP = new MetaPanel( infoTabW, p_intf ); infoTabW->addTab( MP, qtr( "&General" ) ); EMP = new ExtraMetaPanel( infoTabW, p_intf ); infoTabW->addTab( EMP, qtr( "&Extra Metadata" ) ); IP = new InfoPanel( infoTabW, p_intf ); infoTabW->addTab( IP, qtr( "&Codec Details" ) ); if( isMainInputInfo ) { ISP = new InputStatsPanel( infoTabW, p_intf ); infoTabW->addTab( ISP, qtr( "&Statistics" ) ); } QGridLayout *layout = new QGridLayout( this ); /* No need to use a QDialogButtonBox here */ saveMetaButton = new QPushButton( qtr( "&Save Metadata" ) ); saveMetaButton->hide(); QPushButton *closeButton = new QPushButton( qtr( "&Close" ) ); closeButton->setDefault( true ); QLabel *uriLabel = new QLabel( qtr( "Location:" ) ); QLineEdit *uriLine = new QLineEdit; layout->addWidget( infoTabW, 0, 0, 1, 8 ); layout->addWidget( uriLabel, 1, 0, 1, 1 ); layout->addWidget( uriLine, 1, 1, 1, 7 ); layout->addWidget( saveMetaButton, 2, 6 ); layout->addWidget( closeButton, 2, 7 ); BUTTONACT( closeButton, close() ); /* The tabs buttons are shown in the main dialog for space and cosmetics */ BUTTONACT( saveMetaButton, saveMeta() ); /* Let the MetaData Panel update the URI */ CONNECT( MP, uriSet( const QString& ), uriLine, setText( const QString& ) ); CONNECT( MP, editing(), saveMetaButton, show() ); /* Display the buttonBar according to the Tab selected */ CONNECT( infoTabW, currentChanged( int ), this, updateButtons( int ) ); /* If using the General Mode */ if( isMainInputInfo ) { msg_Dbg( p_intf, "Using a general info windows" ); /** * Connects on the various signals of input_Manager * For the currently playing element **/ CONNECT( THEMIM->getIM(), infoChanged( input_item_t* ), IP, update( input_item_t* ) ); CONNECT( THEMIM->getIM(), currentMetaChanged( input_item_t* ), MP, update( input_item_t* ) ); CONNECT( THEMIM->getIM(), currentMetaChanged( input_item_t* ), EMP, update( input_item_t* ) ); CONNECT( THEMIM->getIM(), statisticsUpdated( input_item_t* ), ISP, update( input_item_t* ) ); if( THEMIM->getInput() ) p_item = input_GetItem( THEMIM->getInput() ); } else