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,
{
i_runs = 0;
p_input = NULL;
need_update = true;
b_need_update = true;
setWindowTitle( qtr( "Media information" ) );
resize( 600 , 300 );
......@@ -113,8 +113,6 @@ void MediaInfoDialog::showTab( int i_tab = 0 )
IT->setCurrentIndex( i_tab );
}
/**/
void MediaInfoDialog::editMeta()
{
saveMetaButton->show();
......@@ -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 )
{
MediaInfoDialog *p_d = (MediaInfoDialog *)param;
p_d->need_update = VLC_TRUE;
p_d->b_need_update = VLC_TRUE;
return VLC_SUCCESS;
}
......@@ -166,8 +164,8 @@ void MediaInfoDialog::update()
vlc_object_yield( p_input );
update( input_GetItem(p_input), need_update, need_update );
need_update = false;
update( input_GetItem(p_input), b_need_update, b_need_update );
b_need_update = false;
vlc_object_release( p_input );
}
......
......@@ -36,12 +36,10 @@ class MediaInfoDialog : public QVLCFrame
{
Q_OBJECT;
public:
MediaInfoDialog( intf_thread_t *, bool stats = true,
bool mainInput = false );
MediaInfoDialog( intf_thread_t *, bool stats = true, bool mainInput = false );
static MediaInfoDialog * getInstance( intf_thread_t *p_intf )
{
if( !instance)
instance = new MediaInfoDialog( p_intf, true, true );
if( !instance) instance = new MediaInfoDialog( p_intf, true, true );
return instance;
}
static void killInstance()
......@@ -51,30 +49,39 @@ public:
}
virtual ~MediaInfoDialog();
void showTab( int );
bool need_update;
void showTab( int );
void setInput( input_item_t * );
QLineEdit *uriLine;
bool b_need_update;
private:
input_thread_t *p_input;
QTabWidget *IT;
static MediaInfoDialog *instance;
int i_runs;
bool mainInput;
bool stats;
QTabWidget *IT;
InputStatsPanel *ISP;
MetaPanel *MP;
InfoPanel *IP;
ExtraMetaPanel *EMP;
QPushButton *saveMetaButton;
QLineEdit *uriLine;
public slots:
void update();
void saveMeta();
void editMeta();
void update( input_item_t *, bool, bool );
void updateButtons( int i_tab );
private slots:
void close();
void clear();
void updateButtons( int i_tab );
};
#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