Commit 8ff59181 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt, logo filter should have a browse button for file selection.

Closes #4293
parent 3fe0475f
...@@ -36,11 +36,13 @@ ...@@ -36,11 +36,13 @@
#include <QSignalMapper> #include <QSignalMapper>
#include <QComboBox> #include <QComboBox>
#include <QTimer> #include <QTimer>
#include <QFileDialog>
#include "components/extended_panels.hpp" #include "components/extended_panels.hpp"
#include "dialogs/preferences.hpp" #include "dialogs/preferences.hpp"
#include "qt4.hpp" #include "qt4.hpp"
#include "input_manager.hpp" #include "input_manager.hpp"
#include "util/qt_dirs.hpp"
#include "../../audio_filter/equalizer_presets.h" #include "../../audio_filter/equalizer_presets.h"
#include <vlc_aout.h> #include <vlc_aout.h>
...@@ -204,6 +206,7 @@ ExtVideo::ExtVideo( intf_thread_t *_p_intf, QTabWidget *_parent ) : ...@@ -204,6 +206,7 @@ ExtVideo::ExtVideo( intf_thread_t *_p_intf, QTabWidget *_parent ) :
SETUP_VFILTER_OPTION( eraseMaskText, editingFinished() ) SETUP_VFILTER_OPTION( eraseMaskText, editingFinished() )
SETUP_VFILTER_OPTION( eraseYSpin, valueChanged( int ) ) SETUP_VFILTER_OPTION( eraseYSpin, valueChanged( int ) )
SETUP_VFILTER_OPTION( eraseXSpin, valueChanged( int ) ) SETUP_VFILTER_OPTION( eraseXSpin, valueChanged( int ) )
BUTTONACT( ui.eraseBrowseBtn, browseEraseFile() );
SETUP_VFILTER( marq ) SETUP_VFILTER( marq )
SETUP_VFILTER_OPTION( marqMarqueeText, textChanged( const QString& ) ) SETUP_VFILTER_OPTION( marqMarqueeText, textChanged( const QString& ) )
...@@ -214,6 +217,7 @@ ExtVideo::ExtVideo( intf_thread_t *_p_intf, QTabWidget *_parent ) : ...@@ -214,6 +217,7 @@ ExtVideo::ExtVideo( intf_thread_t *_p_intf, QTabWidget *_parent ) :
SETUP_VFILTER_OPTION( logoYSpin, valueChanged( int ) ) SETUP_VFILTER_OPTION( logoYSpin, valueChanged( int ) )
SETUP_VFILTER_OPTION( logoXSpin, valueChanged( int ) ) SETUP_VFILTER_OPTION( logoXSpin, valueChanged( int ) )
SETUP_VFILTER_OPTION( logoOpacitySlider, valueChanged( int ) ) SETUP_VFILTER_OPTION( logoOpacitySlider, valueChanged( int ) )
BUTTONACT( ui.logoBrowseBtn, browseLogo() );
SETUP_VFILTER( gradfun ) SETUP_VFILTER( gradfun )
SETUP_VFILTER_OPTION( gradfunRadiusSlider, valueChanged( int ) ) SETUP_VFILTER_OPTION( gradfunRadiusSlider, valueChanged( int ) )
...@@ -400,6 +404,20 @@ void ExtVideo::updateFilters() ...@@ -400,6 +404,20 @@ void ExtVideo::updateFilters()
: groupbox->isChecked() ); : groupbox->isChecked() );
} }
void ExtVideo::browseLogo()
{
QString file = QFileDialog::getOpenFileName( NULL, qtr( "Logo filenames" ),
p_intf->p_sys->filepath, "Images (*.png *.jpg);;All (*)" );
ui.logoFileText->setText( toNativeSeparators( file ) );
}
void ExtVideo::browseEraseFile()
{
QString file = QFileDialog::getOpenFileName( NULL, qtr( "Image mask" ),
p_intf->p_sys->filepath, "Images (*.png *.jpg);;All (*)" );
ui.eraseMaskText->setText( toNativeSeparators( file ) );
}
void ExtVideo::initComboBoxItems( QObject *widget ) void ExtVideo::initComboBoxItems( QObject *widget )
{ {
QComboBox *combobox = qobject_cast<QComboBox*>( widget ); QComboBox *combobox = qobject_cast<QComboBox*>( widget );
......
...@@ -62,6 +62,8 @@ private slots: ...@@ -62,6 +62,8 @@ private slots:
void updateFilters(); void updateFilters();
void updateFilterOptions(); void updateFilterOptions();
void cropChange(); void cropChange();
void browseLogo();
void browseEraseFile();
}; };
class ExtV4l2 : public QWidget class ExtV4l2 : public QWidget
......
This diff is collapsed.
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