Commit 346d8b8d authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 - Media Info: cleanup, and move public => private.

parent 9b14cc45
...@@ -45,7 +45,7 @@ MediaInfoDialog::MediaInfoDialog( intf_thread_t *_p_intf, bool _mainInput, ...@@ -45,7 +45,7 @@ MediaInfoDialog::MediaInfoDialog( intf_thread_t *_p_intf, bool _mainInput,
{ {
i_runs = 0; i_runs = 0;
p_input = NULL; p_input = NULL;
need_update = true; b_need_update = true;
setWindowTitle( qtr( "Media information" ) ); setWindowTitle( qtr( "Media information" ) );
resize( 600 , 300 ); resize( 600 , 300 );
...@@ -113,8 +113,6 @@ void MediaInfoDialog::showTab( int i_tab = 0 ) ...@@ -113,8 +113,6 @@ void MediaInfoDialog::showTab( int i_tab = 0 )
IT->setCurrentIndex( i_tab ); IT->setCurrentIndex( i_tab );
} }
/**/
void MediaInfoDialog::editMeta() void MediaInfoDialog::editMeta()
{ {
saveMetaButton->show(); saveMetaButton->show();
...@@ -130,7 +128,7 @@ static int ItemChanged( vlc_object_t *p_this, const char *psz_var, ...@@ -130,7 +128,7 @@ static int ItemChanged( vlc_object_t *p_this, const char *psz_var,
vlc_value_t oldval, vlc_value_t newval, void *param ) vlc_value_t oldval, vlc_value_t newval, void *param )
{ {
MediaInfoDialog *p_d = (MediaInfoDialog *)param; MediaInfoDialog *p_d = (MediaInfoDialog *)param;
p_d->need_update = VLC_TRUE; p_d->b_need_update = VLC_TRUE;
return VLC_SUCCESS; return VLC_SUCCESS;
} }
...@@ -166,8 +164,8 @@ void MediaInfoDialog::update() ...@@ -166,8 +164,8 @@ void MediaInfoDialog::update()
vlc_object_yield( p_input ); vlc_object_yield( p_input );
update( input_GetItem(p_input), need_update, need_update ); update( input_GetItem(p_input), b_need_update, b_need_update );
need_update = false; b_need_update = false;
vlc_object_release( p_input ); vlc_object_release( p_input );
} }
......
...@@ -36,12 +36,10 @@ class MediaInfoDialog : public QVLCFrame ...@@ -36,12 +36,10 @@ class MediaInfoDialog : public QVLCFrame
{ {
Q_OBJECT; Q_OBJECT;
public: public:
MediaInfoDialog( intf_thread_t *, bool stats = true, MediaInfoDialog( intf_thread_t *, bool stats = true, bool mainInput = false );
bool mainInput = false );
static MediaInfoDialog * getInstance( intf_thread_t *p_intf ) static MediaInfoDialog * getInstance( intf_thread_t *p_intf )
{ {
if( !instance) if( !instance) instance = new MediaInfoDialog( p_intf, true, true );
instance = new MediaInfoDialog( p_intf, true, true );
return instance; return instance;
} }
static void killInstance() static void killInstance()
...@@ -51,30 +49,39 @@ public: ...@@ -51,30 +49,39 @@ public:
} }
virtual ~MediaInfoDialog(); virtual ~MediaInfoDialog();
void showTab( int ); void showTab( int );
bool need_update;
void setInput( input_item_t * ); void setInput( input_item_t * );
QLineEdit *uriLine;
bool b_need_update;
private: private:
input_thread_t *p_input; input_thread_t *p_input;
QTabWidget *IT;
static MediaInfoDialog *instance; static MediaInfoDialog *instance;
int i_runs; int i_runs;
bool mainInput; bool mainInput;
bool stats; bool stats;
QTabWidget *IT;
InputStatsPanel *ISP; InputStatsPanel *ISP;
MetaPanel *MP; MetaPanel *MP;
InfoPanel *IP; InfoPanel *IP;
ExtraMetaPanel *EMP; ExtraMetaPanel *EMP;
QPushButton *saveMetaButton; QPushButton *saveMetaButton;
QLineEdit *uriLine;
public slots: public slots:
void update(); void update();
void saveMeta(); void saveMeta();
void editMeta(); void editMeta();
void update( input_item_t *, bool, bool ); void update( input_item_t *, bool, bool );
void updateButtons( int i_tab );
private slots:
void close(); void close();
void clear(); void clear();
void updateButtons( int i_tab );
}; };
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment