Commit 4044fe3b authored by Pierre Lamot's avatar Pierre Lamot Committed by Pierre Lamot
Browse files

qt: alias intf_thread_t as qt_intf_t

  This is a preparatory commit
parent 3b833f09
......@@ -34,7 +34,7 @@
#include <QDialogButtonBox>
#include <QModelIndexList>
BookmarksDialog::BookmarksDialog( intf_thread_t *_p_intf ):QVLCFrame( _p_intf )
BookmarksDialog::BookmarksDialog( qt_intf_t *_p_intf ):QVLCFrame( _p_intf )
{
setWindowFlags( Qt::Tool );
setWindowOpacity( var_InheritFloat( p_intf, "qt-opacity" ) );
......
......@@ -38,7 +38,7 @@ class BookmarksDialog : public QVLCFrame, public Singleton<BookmarksDialog>
public:
void toggleVisible();
private:
BookmarksDialog( intf_thread_t * );
BookmarksDialog( qt_intf_t * );
virtual ~BookmarksDialog();
QTreeView *bookmarksList;
......
......@@ -100,7 +100,7 @@ int DialogErrorModel::count() const
// DialogModel
//=================================================================================================
/* explicit */ DialogModel::DialogModel(intf_thread_t * intf, QObject * parent)
/* explicit */ DialogModel::DialogModel(qt_intf_t * intf, QObject * parent)
: QObject(parent), m_intf(intf)
{
m_model = new DialogErrorModel(this);
......
......@@ -32,9 +32,12 @@
// Qt includes
#include <QAbstractListModel>
#include "qt.hpp"
// Forward declarations
class DialogModel;
//-------------------------------------------------------------------------------------------------
// DialogId
//-------------------------------------------------------------------------------------------------
......@@ -130,7 +133,7 @@ public: // Enums
enum QuestionType { QUESTION_NORMAL, QUESTION_WARNING, QUESTION_CRITICAL };
public:
explicit DialogModel(intf_thread_t * intf, QObject * parent = nullptr);
explicit DialogModel(qt_intf_t * intf, QObject * parent = nullptr);
public: // Interface
Q_INVOKABLE void post_login(DialogId dialogId, const QString & username,
......@@ -187,7 +190,7 @@ public: // Properties
private: // Variables
DialogErrorModel * m_model;
intf_thread_t * m_intf;
qt_intf_t * m_intf;
};
#endif // DIALOGMODEL_HPP
......@@ -67,7 +67,7 @@
DialogsProvider* DialogsProvider::instance = NULL;
DialogsProvider::DialogsProvider( intf_thread_t *_p_intf ) :
DialogsProvider::DialogsProvider( qt_intf_t *_p_intf ) :
QObject( NULL ), p_intf( _p_intf ),
popupMenu( NULL ),
videoPopupMenu( NULL ),
......@@ -586,7 +586,7 @@ void DialogsProvider::openUrlDialog()
* pl helps you to choose from playlist or media library,
* go to start or enqueue
**/
static void openDirectory( intf_thread_t *p_intf, bool go )
static void openDirectory( qt_intf_t *p_intf, bool go )
{
QString uri = DialogsProvider::getDirectoryDialog( p_intf );
if( !uri.isEmpty() )
......@@ -596,7 +596,7 @@ static void openDirectory( intf_thread_t *p_intf, bool go )
}
}
QString DialogsProvider::getDirectoryDialog( intf_thread_t *p_intf )
QString DialogsProvider::getDirectoryDialog( qt_intf_t *p_intf )
{
const QStringList schemes = QStringList(QStringLiteral("file"));
QUrl dirurl = QFileDialog::getExistingDirectoryUrl( NULL,
......
......@@ -75,7 +75,7 @@ public:
assert( instance );
return instance;
}
static DialogsProvider *getInstance( intf_thread_t *p_intf )
static DialogsProvider *getInstance( qt_intf_t *p_intf )
{
if( !instance )
instance = new DialogsProvider( p_intf );
......@@ -93,7 +93,7 @@ public:
EXT_FILTER_PLAYLIST,
const QUrl& path = QUrl() );
bool isDying() { return b_isDying; }
static QString getDirectoryDialog( intf_thread_t *p_intf);
static QString getDirectoryDialog( qt_intf_t *p_intf);
static QString getSaveFileName(QWidget *parent = NULL,
const QString &caption = QString(),
......@@ -110,13 +110,13 @@ protected:
void customEvent( QEvent *);
private:
DialogsProvider( intf_thread_t *);
DialogsProvider( qt_intf_t *);
virtual ~DialogsProvider();
static DialogsProvider *instance;
void loadMediaFile( es_format_category_e category, int filter, const QString& dialogTitle );
intf_thread_t *p_intf;
qt_intf_t *p_intf;
QMenu* popupMenu;
QMenu* videoPopupMenu;
......
......@@ -43,7 +43,7 @@
#include "qt.hpp"
#include "player/player_controller.hpp"
EpgDialog::EpgDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf )
EpgDialog::EpgDialog( qt_intf_t *_p_intf ): QVLCFrame( _p_intf )
{
setWindowTitle( qtr( "Program Guide" ) );
......
......@@ -40,7 +40,7 @@ protected:
virtual void showEvent(QShowEvent * event) Q_DECL_OVERRIDE;
private:
EpgDialog( intf_thread_t * );
EpgDialog( qt_intf_t * );
virtual ~EpgDialog();
EPGWidget *epg;
......
......@@ -33,7 +33,7 @@
#include <QDialogButtonBox>
#include <QPushButton>
ErrorsDialog::ErrorsDialog( intf_thread_t *_p_intf )
ErrorsDialog::ErrorsDialog( qt_intf_t *_p_intf )
: QVLCDialog( (QWidget*)_p_intf->p_sys->p_mi, _p_intf )
{
setWindowTitle( qtr( "Errors" ) );
......
......@@ -38,7 +38,7 @@ public:
/*void addWarning( QString, QString );*/
private:
virtual ~ErrorsDialog() {}
ErrorsDialog( intf_thread_t * );
ErrorsDialog( qt_intf_t * );
void add( bool, const QString&, const QString& );
QCheckBox *stopShowing;
......
......@@ -37,7 +37,7 @@
#include <QPushButton>
#include <vlc_modules.h>
ExtendedDialog::ExtendedDialog( intf_thread_t *_p_intf )
ExtendedDialog::ExtendedDialog( qt_intf_t *_p_intf )
: QVLCDialog( (QWidget*)_p_intf->p_sys->p_mi, _p_intf )
{
#ifdef __APPLE__
......
......@@ -45,7 +45,7 @@ public:
void showTab( int i );
int currentTab();
private:
ExtendedDialog( intf_thread_t * );
ExtendedDialog( qt_intf_t * );
virtual ~ExtendedDialog();
SyncControls *syncW;
......
......@@ -75,7 +75,7 @@ static bool filterIsPresent( const QString &filters, const QString &filter )
return false;
}
static const char* GetVFilterType( struct intf_thread_t *p_intf, const char *psz_name )
static const char* GetVFilterType( qt_intf_t *p_intf, const char *psz_name )
{
module_t *p_obj = module_find( psz_name );
if( !p_obj )
......@@ -113,7 +113,7 @@ static QString OptionFromWidgetName( QObject *obj )
.toLower();
}
static inline void setup_vfilter( intf_thread_t *p_intf, const char* psz_name, QWidget *widget )
static inline void setup_vfilter( qt_intf_t *p_intf, const char* psz_name, QWidget *widget )
{
const char *psz_filter_type = GetVFilterType( p_intf, psz_name );
if( psz_filter_type == NULL )
......@@ -147,7 +147,7 @@ static inline void setup_vfilter( intf_thread_t *p_intf, const char* psz_name, Q
setWidgetValue( ui.widget ); \
CONNECT( ui.widget, signal, this, updateFilterOptions() );
ExtVideo::ExtVideo( intf_thread_t *_p_intf, QTabWidget *_parent ) :
ExtVideo::ExtVideo( qt_intf_t *_p_intf, QTabWidget *_parent ) :
QObject( _parent ), p_intf( _p_intf )
{
ui.setupUi( _parent );
......@@ -296,7 +296,7 @@ void ExtVideo::clean()
ui.cropRightPx->setValue( 0 );
}
static QString ChangeFiltersString( struct intf_thread_t *p_intf, const char *psz_filter_type, const char *psz_name, bool b_add )
static QString ChangeFiltersString( qt_intf_t *p_intf, const char *psz_filter_type, const char *psz_name, bool b_add )
{
char* psz_chain = var_GetString( p_intf, psz_filter_type );
......@@ -319,7 +319,7 @@ static QString ChangeFiltersString( struct intf_thread_t *p_intf, const char *ps
return list.join( ":" );
}
static void UpdateVFiltersString( struct intf_thread_t *p_intf,
static void UpdateVFiltersString( qt_intf_t *p_intf,
const char *psz_filter_type, const char *value )
{
/* Try to set non splitter filters on the fly */
......@@ -601,7 +601,7 @@ void ExtVideo::updateFilterOptions()
* v4l2 controls
**********************************************************************/
ExtV4l2::ExtV4l2( intf_thread_t *_p_intf, QWidget *_parent )
ExtV4l2::ExtV4l2( qt_intf_t *_p_intf, QWidget *_parent )
: QWidget( _parent ), p_intf( _p_intf ), box( NULL )
{
QVBoxLayout *layout = new QVBoxLayout( this );
......@@ -828,7 +828,7 @@ FilterSliderData::FilterSliderData( QObject *parent, QSlider *_slider ) :
}
FilterSliderData::FilterSliderData( QObject *parent,
intf_thread_t *_p_intf,
qt_intf_t *_p_intf,
QSlider *_slider,
QLabel *_label, QLabel *_nameLabel,
const slider_data_t *_p_data ):
......@@ -896,7 +896,7 @@ void FilterSliderData::writeToConfig()
}
AudioFilterControlWidget::AudioFilterControlWidget
( intf_thread_t *_p_intf, QWidget *parent, const char *_name ) :
( qt_intf_t *_p_intf, QWidget *parent, const char *_name ) :
QWidget( parent ), slidersBox( NULL ), p_intf( _p_intf ), name( _name ),
i_smallfont(0)
{}
......@@ -970,7 +970,7 @@ void AudioFilterControlWidget::enable( bool b_enable )
* Equalizer
**********************************************************************/
EqualizerSliderData::EqualizerSliderData( QObject *parent, intf_thread_t *_p_intf,
EqualizerSliderData::EqualizerSliderData( QObject *parent, qt_intf_t *_p_intf,
QSlider *slider, QLabel *_label,
QLabel *_nameLabel, const slider_data_t *_p_data,
int _index )
......@@ -1073,7 +1073,7 @@ void EqualizerSliderData::writeToConfig()
}
}
Equalizer::Equalizer( intf_thread_t *p_intf, QWidget *parent )
Equalizer::Equalizer( qt_intf_t *p_intf, QWidget *parent )
: AudioFilterControlWidget( p_intf, parent, "equalizer" )
{
i_smallfont = -3;
......@@ -1255,7 +1255,7 @@ void Equalizer::enable2Pass( bool b_enable )
* Dynamic range compressor
**********************************************************************/
Compressor::Compressor( intf_thread_t *p_intf, QWidget *parent )
Compressor::Compressor( qt_intf_t *p_intf, QWidget *parent )
: AudioFilterControlWidget( p_intf, parent, "compressor" )
{
i_smallfont = -2;
......@@ -1277,7 +1277,7 @@ Compressor::Compressor( intf_thread_t *p_intf, QWidget *parent )
* Spatializer
**********************************************************************/
Spatializer::Spatializer( intf_thread_t *p_intf, QWidget *parent )
Spatializer::Spatializer( qt_intf_t *p_intf, QWidget *parent )
: AudioFilterControlWidget( p_intf, parent, "spatializer" )
{
i_smallfont = -1;
......@@ -1297,7 +1297,7 @@ Spatializer::Spatializer( intf_thread_t *p_intf, QWidget *parent )
* Spatializer
**********************************************************************/
StereoWidener::StereoWidener( intf_thread_t *p_intf, QWidget *parent )
StereoWidener::StereoWidener( qt_intf_t *p_intf, QWidget *parent )
: AudioFilterControlWidget( p_intf, parent, "stereo_widen" )
{
i_smallfont = -1;
......@@ -1316,7 +1316,7 @@ StereoWidener::StereoWidener( intf_thread_t *p_intf, QWidget *parent )
* Advanced
**********************************************************************/
PitchShifter::PitchShifter( intf_thread_t *p_intf, QWidget *parent )
PitchShifter::PitchShifter( qt_intf_t *p_intf, QWidget *parent )
: AudioFilterControlWidget( p_intf, parent, "scaletempo_pitch" )
{
i_smallfont = -1;
......@@ -1367,7 +1367,7 @@ void SyncWidget::setValue( double d )
spinBox.setValue( d );
}
SyncControls::SyncControls( intf_thread_t *_p_intf, QWidget *_parent )
SyncControls::SyncControls( qt_intf_t *_p_intf, QWidget *_parent )
: QWidget( _parent )
, p_intf( _p_intf )
, m_SubsDelayCfgFactor(p_intf, SUBSDELAY_CFG_FACTOR)
......
......@@ -48,11 +48,11 @@ class ExtVideo: public QObject
Q_OBJECT
friend class ExtendedDialog;
public:
ExtVideo( struct intf_thread_t *, QTabWidget * );
ExtVideo( qt_intf_t *, QTabWidget * );
private:
Ui::ExtVideoWidget ui;
QSignalMapper* filterMapper;
intf_thread_t *p_intf;
qt_intf_t *p_intf;
void initComboBoxItems( QObject* );
void setWidgetValue( QObject* );
void clean();
......@@ -74,12 +74,12 @@ class ExtV4l2 : public QWidget
{
Q_OBJECT
public:
ExtV4l2( intf_thread_t *, QWidget * );
ExtV4l2( qt_intf_t *, QWidget * );
void showEvent( QShowEvent *event ) Q_DECL_OVERRIDE;
private:
intf_thread_t *p_intf;
qt_intf_t *p_intf;
QGroupBox *box;
QLabel *help;
......@@ -105,7 +105,7 @@ public:
float f_resolution; // resolution
float f_visual_multiplier; // only for display (f_value *)
} slider_data_t;
FilterSliderData( QObject *parent, intf_thread_t *p_intf,
FilterSliderData( QObject *parent, qt_intf_t *p_intf,
QSlider *slider,
QLabel *valueLabel, QLabel *nameLabel,
const slider_data_t *p_data );
......@@ -119,7 +119,7 @@ protected:
QLabel *valueLabel;
QLabel *nameLabel;
const slider_data_t *p_data;
intf_thread_t *p_intf;
qt_intf_t *p_intf;
public slots:
virtual void onValueChanged( int i );
......@@ -134,7 +134,7 @@ class AudioFilterControlWidget : public QWidget
Q_OBJECT
public:
AudioFilterControlWidget( intf_thread_t *, QWidget *, const char *name );
AudioFilterControlWidget( qt_intf_t *, QWidget *, const char *name );
protected:
virtual void build();
......@@ -142,7 +142,7 @@ protected:
QVector<FilterSliderData::slider_data_t> controls;
QVector<FilterSliderData *> sliderDatas;
QGroupBox *slidersBox;
intf_thread_t *p_intf;
qt_intf_t *p_intf;
QString name; // filter's module name
int i_smallfont;
......@@ -158,7 +158,7 @@ class EqualizerSliderData : public FilterSliderData
Q_OBJECT
public:
EqualizerSliderData( QObject *parent, intf_thread_t *p_intf,
EqualizerSliderData( QObject *parent, qt_intf_t *p_intf,
QSlider *slider,
QLabel *valueLabel, QLabel *nameLabel,
const slider_data_t *p_data, int index );
......@@ -178,7 +178,7 @@ class Equalizer: public AudioFilterControlWidget
Q_OBJECT
public:
Equalizer( intf_thread_t *, QWidget * );
Equalizer( qt_intf_t *, QWidget * );
protected:
void build() Q_DECL_OVERRIDE;
......@@ -197,7 +197,7 @@ class Compressor: public AudioFilterControlWidget
Q_OBJECT
public:
Compressor( intf_thread_t *, QWidget * );
Compressor( qt_intf_t *, QWidget * );
};
class Spatializer: public AudioFilterControlWidget
......@@ -205,7 +205,7 @@ class Spatializer: public AudioFilterControlWidget
Q_OBJECT
public:
Spatializer( intf_thread_t *, QWidget * );
Spatializer( qt_intf_t *, QWidget * );
};
class StereoWidener: public AudioFilterControlWidget
......@@ -213,7 +213,7 @@ class StereoWidener: public AudioFilterControlWidget
Q_OBJECT
public:
StereoWidener( intf_thread_t *, QWidget * );
StereoWidener( qt_intf_t *, QWidget * );
};
class PitchShifter: public AudioFilterControlWidget
......@@ -221,7 +221,7 @@ class PitchShifter: public AudioFilterControlWidget
Q_OBJECT
public:
PitchShifter( intf_thread_t *, QWidget * );
PitchShifter( qt_intf_t *, QWidget * );
};
class SyncWidget : public QWidget
......@@ -244,10 +244,10 @@ class SyncControls : public QWidget
Q_OBJECT
friend class ExtendedDialog;
public:
SyncControls( intf_thread_t *, QWidget * );
SyncControls( qt_intf_t *, QWidget * );
virtual ~SyncControls();
private:
intf_thread_t *p_intf;
qt_intf_t *p_intf;
SyncWidget *AVSpin;
SyncWidget *subsSpin;
SyncWidget *secondarySubsSpin;
......
......@@ -46,7 +46,7 @@ static void DialogCallback( extension_dialog_t *p_ext_dialog,
void *p_data );
ExtensionsDialogProvider::ExtensionsDialogProvider( intf_thread_t *_p_intf,
ExtensionsDialogProvider::ExtensionsDialogProvider( qt_intf_t *_p_intf,
extensions_manager_t *p_mgr )
: QObject( NULL ), p_intf( _p_intf ), p_extensions_manager( p_mgr )
{
......@@ -160,7 +160,7 @@ static void DialogCallback( extension_dialog_t *p_ext_dialog,
}
ExtensionDialog::ExtensionDialog( intf_thread_t *_p_intf,
ExtensionDialog::ExtensionDialog( qt_intf_t *_p_intf,
extensions_manager_t *p_mgr,
extension_dialog_t *_p_dialog )
: QDialog( NULL ), p_intf( _p_intf ), p_extensions_manager( p_mgr )
......
......@@ -49,7 +49,7 @@ class ExtensionsDialogProvider : public QObject
private:
static ExtensionsDialogProvider *instance;
intf_thread_t *p_intf;
qt_intf_t *p_intf;
extensions_manager_t *p_extensions_manager;
private slots:
......@@ -58,11 +58,11 @@ private slots:
ExtensionDialog* UpdateExtDialog( extension_dialog_t *p_dialog );
public:
ExtensionsDialogProvider( intf_thread_t *p_intf,
ExtensionsDialogProvider( qt_intf_t *p_intf,
extensions_manager_t *p_mgr );
virtual ~ExtensionsDialogProvider();
static ExtensionsDialogProvider* getInstance( intf_thread_t *p_intf = NULL,
static ExtensionsDialogProvider* getInstance( qt_intf_t *p_intf = NULL,
extensions_manager_t *p_mgr = NULL )
{
if( !instance )
......@@ -89,7 +89,7 @@ class ExtensionDialog : public QDialog
{
Q_OBJECT
private:
intf_thread_t *p_intf;
qt_intf_t *p_intf;
extensions_manager_t *p_extensions_manager;
extension_t *p_extension;
extension_dialog_t *p_dialog;
......@@ -117,7 +117,7 @@ signals:
void destroyDialog( extension_dialog_t *p_dialog );
public:
ExtensionDialog( intf_thread_t *p_intf,
ExtensionDialog( qt_intf_t *p_intf,
extensions_manager_t *p_mgr,
extension_dialog_t *p_dialog );
virtual ~ExtensionDialog();
......
......@@ -38,7 +38,7 @@
ExtensionsManager* ExtensionsManager::instance = NULL;
ExtensionsManager::ExtensionsManager( intf_thread_t *_p_intf, QObject *parent )
ExtensionsManager::ExtensionsManager( qt_intf_t *_p_intf, QObject *parent )
: QObject( parent ), p_intf( _p_intf ), p_extensions_manager( NULL )
, p_edp( NULL )
{
......
......@@ -42,7 +42,7 @@ class ExtensionsManager : public QObject
{
Q_OBJECT
public:
static ExtensionsManager *getInstance( intf_thread_t *_p_intf,
static ExtensionsManager *getInstance( qt_intf_t *_p_intf,
QObject *_parent = 0 )
{
if( !instance )
......@@ -55,7 +55,7 @@ public:
instance = NULL;
}
ExtensionsManager( intf_thread_t *p_intf, QObject *parent );
ExtensionsManager( qt_intf_t *p_intf, QObject *parent );
virtual ~ExtensionsManager();
inline bool isLoaded() { return p_extensions_manager != NULL; }
......@@ -84,7 +84,7 @@ private slots:
private:
static ExtensionsManager* instance;
intf_thread_t *p_intf;
qt_intf_t *p_intf;
extensions_manager_t *p_extensions_manager;
ExtensionsDialogProvider *p_edp;
......
......@@ -26,7 +26,7 @@
#include <vlc_fingerprinter.h>
#include <vlc_modules.h>
Chromaprint::Chromaprint( intf_thread_t *_p_intf ) : p_intf( _p_intf )
Chromaprint::Chromaprint( qt_intf_t *_p_intf ) : p_intf( _p_intf )
{
Q_ASSERT( p_intf );
p_fingerprinter = fingerprinter_Create( VLC_OBJECT( p_intf ) );
......
......@@ -28,13 +28,14 @@
#include <QString>
#include <vlc_fingerprinter.h>
#include <vlc_interface.h>
#include "qt.hpp"
class Chromaprint : public QObject
{
Q_OBJECT
public:
Chromaprint( intf_thread_t *p_intf = NULL );
Chromaprint( qt_intf_t *p_intf = NULL );
virtual ~Chromaprint();
bool enqueue( input_item_t *p_item );
static int results_available( vlc_object_t *p_this, const char *,
......@@ -48,7 +49,7 @@ signals:
private:
void finish() { emit finished(); }
intf_thread_t *p_intf;
qt_intf_t *p_intf;
fingerprinter_thread_t *p_fingerprinter;
};
......
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