{
while (p_item < p_end)
{
- if( p_item->i_type == CONFIG_SUBCATEGORY &&
- ( data->i_type == TYPE_SUBCATEGORY &&
+ if( p_item->i_type == CONFIG_SUBCATEGORY &&
+ ( ( data->i_type == TYPE_SUBCATEGORY &&
p_item->value.i == data->i_object_id ) ||
( data->i_type == TYPE_CATSUBCAT &&
- p_item->value.i == data->i_subcat_id ) )
+ p_item->value.i == data->i_subcat_id ) ) )
break;
p_item++;
}
b_fs = b_fullscreen;
vlc_mutex_unlock( &lock );
if( b_fs )
+ {
#ifdef WIN32TRICK
if( b_fscHidden )
#else
}
else
hideFSC();
+ }
break;
case FullscreenControlShow_Type:
vlc_mutex_lock( &lock );
if( !b_mouse_over ) // Only if the mouse is not over FSC
planHideFSC();
break;
+ default:
+ break;
}
}
#if HAVE_TRANSPARENCY
p_slowHideTimer->stop();
#endif
+ event->accept();
}
/**
planHideFSC();
b_mouse_over = false;
+ event->accept();
}
/**
if( i_type == VLC_VAR_INTEGER || i_type == VLC_VAR_BOOL )
{
- int i_int = 0;
if( slider ) slider->setValue( val.i_int );
else if( checkbox ) checkbox->setCheckState( val.i_int? Qt::Checked
: Qt::Unchecked );
}
else if( i_type == VLC_VAR_FLOAT )
{
- double f_float = 0;
if( slider ) slider->setValue( ( int )( val.f_float*( double )slider->tickInterval() ) ); /* hack alert! */
else if( doublespinbox ) doublespinbox->setValue( val.f_float );
else msg_Warn( p_intf, "Oops %s %s %d", __FILE__, __func__, __LINE__ );
#include <vlc_common.h>
#include <vlc_aout.h>
-#include "../../audio_filter/equalizer_presets.h"
#include "ui/equalizer.h"
#include "ui/video_effects.h"
#include "ui/v4l2.h"
+#include "../../audio_filter/equalizer_presets.h"
#include <QTabWidget>
}
p_vout = p_nvout;
#ifndef NDEBUG
- msg_Dbg( p_intf, "embedded video ready (handle %p)", winId() );
+ msg_Dbg( p_intf, "embedded video ready (handle %p)", (void *)winId() );
#endif
return ( void* )winId();
}
void BackgroundWidget::contextMenuEvent( QContextMenuEvent *event )
{
QVLCMenu::PopupMenu( p_intf, true );
+ event->accept();
}
#if 0
void TimeLabel::setDisplayPosition( float pos, int time, int length )
{
+ VLC_UNUSED( pos );
+
char psz_length[MSTRTIME_MAX_SIZE], psz_time[MSTRTIME_MAX_SIZE];
secstotimestr( psz_length, length );
secstotimestr( psz_time, ( b_remainingTime && length ) ? length - time
virtual void mousePressEvent( QMouseEvent *event )
{
toggleTimeDisplay();
+ event->accept();
}
virtual void mouseDoubleClickEvent( QMouseEvent *event )
{
+ event->accept();
toggleTimeDisplay();
emit timeLabelDoubleClicked();
}
protected:
virtual void mouseDoubleClickEvent ( QMouseEvent * event )
{
+ event->accept();
THEMIM->getIM()->setRate( INPUT_RATE_DEFAULT );
}
private slots:
scroll->setWidget( advFrame );
/* Create the options inside the FrameLayout */
- for( int n = 0; n < i_confsize; n++ )
+ for( int n = 0; n < (int)i_confsize; n++ )
{
module_config_t *p_item = p_config + n;
ConfigControl *config = ConfigControl::createControl(
QSplitter *leftW = new QSplitter( Qt::Vertical, this );
/* Source Selector */
- selector = new PLSelector( this, p_intf, THEPL );
+ selector = new PLSelector( this, p_intf );
leftW->addWidget( selector );
/* Create a Container for the Art Label
if( p_intf->p_sys->p_mi )
p_intf->p_sys->p_mi->togglePlaylist();
}
+ event->accept();
}
public:
ArtLabel( QWidget *parent, intf_thread_t *intf )
: CoverArtLabel( parent, intf ) {};
- void mouseDoubleClickEvent( QMouseEvent *event )
+ virtual void mouseDoubleClickEvent( QMouseEvent *event )
{
THEDP->mediaInfoDialog();
+ event->accept();
}
};
*/
void PLItem::update( playlist_item_t *p_item, bool iscurrent )
{
- char psz_duration[MSTRTIME_MAX_SIZE];
- char *psz_meta;
-
assert( p_item->p_input->i_id == i_input_id );
/* Useful for the model */
assert( rootItem );
/* Recreate from root */
UpdateNodeChildren( rootItem );
- if( p_item=playlist_CurrentPlayingItem(p_playlist) )
+ if( (p_item = playlist_CurrentPlayingItem(p_playlist)) )
{
PLItem *currentItem = FindByInput( rootItem,
p_item->p_input->i_id );
#include <QHeaderView>
#include <QTreeView>
-PLSelector::PLSelector( QWidget *p, intf_thread_t *_p_intf,
- playlist_t *p_playlist ) : QWidget( p ), p_intf(_p_intf)
+PLSelector::PLSelector( QWidget *p, intf_thread_t *_p_intf ) : QWidget( p ), p_intf(_p_intf)
{
model = new PLModel( THEPL, p_intf, THEPL->p_root_category, 1, this );
view = new QTreeView( 0 );
{
Q_OBJECT;
public:
- PLSelector( QWidget *p, intf_thread_t *_p_intf, playlist_t * );
+ PLSelector( QWidget *p, intf_thread_t *_p_intf );
virtual ~PLSelector();
protected:
PLModel *model;
l, line );
break;
case CONFIG_ITEM_FILE:
- p_control = new FileConfigControl( p_this, p_item, parent, l,
- line, false );
+ p_control = new FileConfigControl( p_this, p_item, parent, l, line);
break;
case CONFIG_ITEM_DIRECTORY:
p_control = new DirectoryConfigControl( p_this, p_item, parent, l,
- line, false );
+ line );
break;
#if 0
case CONFIG_ITEM_FONT:
VStringConfigControl( _p_this, _p_item )
{
text = _text;
+ if( pwd ) text->setEchoMode( QLineEdit::Password );
label = _label;
finish( );
}
FileConfigControl::FileConfigControl( vlc_object_t *_p_this,
module_config_t *_p_item,
QWidget *_parent, QGridLayout *l,
- int &line, bool pwd ) :
+ int &line ) :
VStringConfigControl( _p_this, _p_item, _parent )
{
label = new QLabel( qtr(p_item->psz_text) );
FileConfigControl::FileConfigControl( vlc_object_t *_p_this,
module_config_t *_p_item,
QLabel *_label, QLineEdit *_text,
- QPushButton *_button, bool pwd ):
+ QPushButton *_button ):
VStringConfigControl( _p_this, _p_item )
{
browse = _button;
/********* String / Directory **********/
DirectoryConfigControl::DirectoryConfigControl( vlc_object_t *_p_this,
module_config_t *_p_item, QWidget *_p_widget,
- QGridLayout *_p_layout, int& _int, bool _pwd ) :
- FileConfigControl( _p_this, _p_item, _p_widget, _p_layout, _int, _pwd)
+ QGridLayout *_p_layout, int& _int ) :
+ FileConfigControl( _p_this, _p_item, _p_widget, _p_layout, _int )
{}
DirectoryConfigControl::DirectoryConfigControl( vlc_object_t *_p_this,
module_config_t *_p_item, QLabel *_p_label,
- QLineEdit *_p_line, QPushButton *_p_button, bool _pwd ):
- FileConfigControl( _p_this, _p_item, _p_label, _p_line, _p_button, _pwd)
+ QLineEdit *_p_line, QPushButton *_p_button ):
+ FileConfigControl( _p_this, _p_item, _p_label, _p_line, _p_button)
{}
void DirectoryConfigControl::updateField()
}
void setfillVLCConfigCombo( const char *configname, intf_thread_t *p_intf,
- QComboBox *combo, QWidget *parent )
+ QComboBox *combo )
{
module_config_t *p_config =
config_FindConfig( VLC_OBJECT(p_intf), configname );
QCheckBox *cb = new QCheckBox( qtr( module_GetLongName( p_parser ) ) );\
checkBoxListItem *cbl = new checkBoxListItem; \
\
- CONNECT( cb, stateChanged( int ), this, onUpdate( int ) );\
+ CONNECT( cb, stateChanged( int ), this, onUpdate() );\
cb->setToolTip( formatTooltip( qtr( module_get_help( p_parser ))));\
cbl->checkBox = cb; \
\
}
-void ModuleListConfigControl::onUpdate( int value )
+void ModuleListConfigControl::onUpdate()
{
text->clear();
bool first = true;
VIntConfigControl( _p_this, _p_item )
{
checkbox = _checkbox;
+ label = _label;
finish();
}
checkbox->setCheckState( p_item->value.i == true ? Qt::Checked
: Qt::Unchecked );
checkbox->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) );
+ if( label )
+ label->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) );
}
int BoolConfigControl::getValue()
virtual int getType() { return CONFIG_ITEM_BOOL; }
private:
QCheckBox *checkbox;
+ QLabel *label;
void finish();
};
Q_OBJECT;
public:
FileConfigControl( vlc_object_t *, module_config_t *, QWidget *,
- QGridLayout *, int&, bool pwd );
+ QGridLayout *, int& );
FileConfigControl( vlc_object_t *, module_config_t *, QLabel *,
- QLineEdit *, QPushButton *, bool pwd );
+ QLineEdit *, QPushButton * );
virtual ~FileConfigControl() {};
virtual QString getValue() { return text->text(); };
virtual void show() { text->show(); if( label ) label->show(); browse->show(); }
Q_OBJECT;
public:
DirectoryConfigControl( vlc_object_t *, module_config_t *, QWidget *,
- QGridLayout *, int&, bool pwd );
+ QGridLayout *, int& );
DirectoryConfigControl( vlc_object_t *, module_config_t *, QLabel *,
- QLineEdit *, QPushButton *, bool pwd );
+ QLineEdit *, QPushButton * );
virtual ~DirectoryConfigControl() {};
public slots:
virtual void updateField();
virtual void hide();
virtual void show();
public slots:
- void onUpdate( int value );
+ void onUpdate();
private:
void finish( bool );
QVector<checkBoxListItem*> modules;
};
void setfillVLCConfigCombo(const char *configname, intf_thread_t *p_intf,
- QComboBox *combo, QWidget *parent = 0 );
+ QComboBox *combo );
#if 0
struct ModuleCheckBox {
if( p_config ) \
{ \
control = new type ## ConfigControl( VLC_OBJECT(p_intf), \
- p_config, label, qcontrol, qbutton, \
- false ); \
+ p_config, label, qcontrol, qbutton ); \
controls.append( control ); \
}
// We get the bookmarks list
seekpoint_t** pp_bookmarks;
- seekpoint_t* p_seekpoint;
+ seekpoint_t* p_seekpoint = NULL;
int i_bookmarks;
if( input_Control( p_input, INPUT_GET_BOOKMARKS, &pp_bookmarks,
{
public:
MsgEvent( msg_item_t *msg )
- : msg(msg), QEvent( (QEvent::Type)MsgEvent_Type )
+ : QEvent( (QEvent::Type)MsgEvent_Type ), msg(msg)
{
msg_Hold( msg );
}
if( i_action_flag != SELECT )
{
QStringList tempMRL = SeparateEntries( mrl );
- for( size_t i = 0; i < tempMRL.size(); i++ )
+ for( int i = 0; i < tempMRL.size(); i++ )
{
bool b_start = !i && !b_enqueue;
input_item_t *p_input;
SoutMrl smrl( ":sout=#" );
- if ( ui.transcodeVideo->isChecked() || ui.transcodeAudio->isChecked()
+ if ( ( ui.transcodeVideo->isChecked() || ui.transcodeAudio->isChecked() )
&& !ui.rawInput->isChecked() /*demuxdump speciality*/ )
{
smrl.begin( "transcode" );
void DroppingController::dragLeaveEvent ( QDragLeaveEvent * event )
{
if( rubberband ) rubberband->hide();
+ event->accept();
}
/**
* Overloading doAction to block any action
**/
-void DroppingController::doAction( int i ){}
+void DroppingController::doAction( int i )
+{
+ VLC_UNUSED( i );
+}
{
vlm_message_t *message;
QString command = "setup \"" + name + ( b_enable ? " enable" : " disable" );
+ vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
+ vlm_MessageDelete( message );
}
void VLMWrapper::ControlBroadcast( const QString name, int BroadcastStatus,
QString file = qfd->selectedFiles().first();
QString filter = qfd->selectedFilter();
- const char* filt = filter.toAscii();
if( file.contains( ".xsp" ) || filter.contains( "XSPF" ) )
{
void DialogsProvider::menuAction( QObject *data )
{
- QVLCMenu::DoAction( p_intf, data );
+ QVLCMenu::DoAction( data );
}
void DialogsProvider::menuUpdateAction( QObject *data )
switch( reason )
{
case QSystemTrayIcon::Trigger:
+ case QSystemTrayIcon::DoubleClick:
toggleUpdateSystrayMenu();
break;
case QSystemTrayIcon::MiddleClick:
+ case QSystemTrayIcon::Context:
sysTray->showMessage( qtr( "VLC media player" ),
qtr( "Control menu for the player" ),
QSystemTrayIcon::Information, 3000 );
break;
+ default:
+ break;
}
}
void MainInterface::closeEvent( QCloseEvent *e )
{
+ e->accept();
hide();
THEDP->quit();
}
void QVLCMenu::createMenuBar( MainInterface *mi,
intf_thread_t *p_intf,
bool visual_selector_enabled )
+/* FIXME remove this visual dependency */
{
/* QMainWindows->menuBar()
gives the QProcess::destroyed timeout issue on Cleanlooks style with
/* Playlist/MediaLibrary Control */
QMenu *QVLCMenu::ToolsMenu( intf_thread_t *p_intf )
{
+ VLC_UNUSED( p_intf ); //TODO remove
QMenu *menu = new QMenu();
addDPStaticEntry( menu, qtr( I_MENU_EXT ), ":/settings",
{
vlc_object_release( p_object );
}
- return Populate( p_intf, menu, varnames, objects, true );
+ return Populate( p_intf, menu, varnames, objects );
}
/**
":/next", SLOT( next() ) );
}
-void QVLCMenu::PopupMenuStaticEntries( intf_thread_t *p_intf, QMenu *menu )
+void QVLCMenu::PopupMenuStaticEntries( QMenu *menu )
{
#if 0
QMenu *toolsmenu = ToolsMenu( p_intf, menu, false, true );
/* Navigation stuff, and general menus ( open ) */
void QVLCMenu::MiscPopupMenu( intf_thread_t *p_intf )
{
- vlc_value_t val;
POPUP_BOILERPLATE;
if( p_input )
PopupMenuControlEntries( menu, p_intf, p_input );
menu->addSeparator();
- PopupMenuStaticEntries( p_intf, menu );
+ PopupMenuStaticEntries( menu );
p_intf->p_sys->p_popup_menu = menu;
menu->popup( QCursor::pos() );
menu->addMenu( submenu );
}
- PopupMenuStaticEntries( p_intf, menu );
+ PopupMenuStaticEntries( menu );
p_intf->p_sys->p_popup_menu = menu;
p_intf->p_sys->p_popup_menu->popup( QCursor::pos() );
QMenu * QVLCMenu::Populate( intf_thread_t *p_intf,
QMenu *current,
vector< const char *> & varnames,
- vector<vlc_object_t *> & objects,
- bool append )
+ vector<vlc_object_t *> & objects )
{
QMenu *menu = current;
if( !menu ) menu = new QMenu();
menu->addAction( action );
}
-void QVLCMenu::DoAction( intf_thread_t *p_intf, QObject *data )
+void QVLCMenu::DoAction( QObject *data )
{
MenuItemData *itemData = qobject_cast<MenuItemData *>( data );
vlc_object_t *p_object = itemData->p_obj;
bool b_force_visible = false);
/* Actions */
- static void DoAction( intf_thread_t *, QObject * );
+ static void DoAction( QObject * );
/* HACK for minimalView */
static QAction *minimalViewAction;
static QMenu *HelpMenu( QMenu * );
/* Popups Menus */
- static void PopupMenuStaticEntries( intf_thread_t *p_intf, QMenu *menu );
+ static void PopupMenuStaticEntries( QMenu *menu );
static void PopupMenuControlEntries( QMenu *menu, intf_thread_t *p_intf,
input_thread_t *p_input );
/* Generic automenu methods */
static QMenu * Populate( intf_thread_t *, QMenu *current,
- vector<const char*>&, vector<vlc_object_t *>&,
- bool append = false );
+ vector<const char*>&, vector<vlc_object_t *>& );
static void CreateAndConnect( QMenu *, const char *, QString, QString,
int, vlc_object_t *, vlc_value_t, int, bool c = false );
static int OpenDialogs ( vlc_object_t * );
static int WindowOpen ( vlc_object_t * );
static void WindowClose ( vlc_object_t * );
-static void Run ( intf_thread_t * );
static void *Thread ( void * );
static void ShowDialog ( intf_thread_t *, int, int, intf_dialog_args_t * );
{
intf_thread_t *p_intf = (intf_thread_t *)obj;
MainInterface *p_mi;
- vlc_value_t val;
char dummy[] = "";
char *argv[] = { dummy };
int argc = 1;
void InputSlider::mouseReleaseEvent( QMouseEvent *event )
{
b_isSliding = false;
+ event->accept();
}
void InputSlider::mousePressEvent(QMouseEvent* event)
QString::number( value() ) + '%' );
painter.end();
+ e->accept();
}