The Capture panel is sensibly slower than all the other ones and way less used by most people. Therefore, don't build it (especially for windows) unless you need it. Better for speed and memory.
CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
OpenPanel( _parent, _p_intf )
{
CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
OpenPanel( _parent, _p_intf )
{
+ isInitialized = false;
+}
+
+void CaptureOpenPanel::initialize()
+{
+ if( isInitialized ) return;
+
+ msg_Dbg( p_intf, "Initialization of Capture device panel" );
+ isInitialized = true;
+
ui.setupUi( this );
BUTTONACT( ui.advancedButton, advancedDialog() );
ui.setupUi( this );
BUTTONACT( ui.advancedButton, advancedDialog() );
virtual void clear() ;
private:
Ui::OpenCapture ui;
virtual void clear() ;
private:
Ui::OpenCapture ui;
QString advMRL;
QDialog *adv;
#ifdef WIN32
QString advMRL;
QDialog *adv;
#ifdef WIN32
public slots:
virtual void updateMRL();
public slots:
virtual void updateMRL();
private slots:
void updateButtons();
void advancedDialog();
private slots:
void updateButtons();
void advancedDialog();
setMenuAction();
/* Force MRL update on tab change */
setMenuAction();
/* Force MRL update on tab change */
- CONNECT( ui.Tab, currentChanged( int ), this, signalCurrent() );
+ CONNECT( ui.Tab, currentChanged( int ), this, signalCurrent( int ) );
CONNECT( fileOpenPanel, mrlUpdated( QString ), this, updateMRL( QString ) );
CONNECT( netOpenPanel, mrlUpdated( QString ), this, updateMRL( QString ) );
CONNECT( fileOpenPanel, mrlUpdated( QString ), this, updateMRL( QString ) );
CONNECT( netOpenPanel, mrlUpdated( QString ), this, updateMRL( QString ) );
void OpenDialog::showTab( int i_tab )
{
void OpenDialog::showTab( int i_tab )
{
+ if( i_tab == OPEN_CAPTURE_TAB ) captureOpenPanel->initialize();
ui.Tab->setCurrentIndex( i_tab );
show();
}
/* Function called on signal currentChanged triggered */
ui.Tab->setCurrentIndex( i_tab );
show();
}
/* Function called on signal currentChanged triggered */
-void OpenDialog::signalCurrent()
+void OpenDialog::signalCurrent( int i_tab )
+ if( i_tab == OPEN_CAPTURE_TAB ) captureOpenPanel->initialize();
+
if( ui.Tab->currentWidget() != NULL )
( dynamic_cast<OpenPanel *>( ui.Tab->currentWidget() ) )->updateMRL();
}
if( ui.Tab->currentWidget() != NULL )
( dynamic_cast<OpenPanel *>( ui.Tab->currentWidget() ) )->updateMRL();
}
void updateMRL( QString );
void updateMRL();
void newCachingMethod( QString );
void updateMRL( QString );
void updateMRL();
void newCachingMethod( QString );
+ void signalCurrent( int );
void browseInputSlave();
};
void browseInputSlave();
};