Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
6523dc21
Commit
6523dc21
authored
Sep 13, 2006
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some more cleanup and macros
parent
897144d1
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
59 additions
and
85 deletions
+59
-85
modules/gui/qt4/components/playlist/selector.cpp
modules/gui/qt4/components/playlist/selector.cpp
+4
-4
modules/gui/qt4/components/playlist/standardpanel.cpp
modules/gui/qt4/components/playlist/standardpanel.cpp
+4
-5
modules/gui/qt4/components/video_widget.cpp
modules/gui/qt4/components/video_widget.cpp
+4
-7
modules/gui/qt4/dialogs/errors.cpp
modules/gui/qt4/dialogs/errors.cpp
+5
-5
modules/gui/qt4/dialogs/errors.hpp
modules/gui/qt4/dialogs/errors.hpp
+2
-2
modules/gui/qt4/dialogs/interaction.cpp
modules/gui/qt4/dialogs/interaction.cpp
+3
-4
modules/gui/qt4/dialogs/messages.cpp
modules/gui/qt4/dialogs/messages.cpp
+4
-14
modules/gui/qt4/dialogs/playlist.cpp
modules/gui/qt4/dialogs/playlist.cpp
+3
-5
modules/gui/qt4/dialogs/prefs_dialog.cpp
modules/gui/qt4/dialogs/prefs_dialog.cpp
+7
-7
modules/gui/qt4/dialogs/streaminfo.cpp
modules/gui/qt4/dialogs/streaminfo.cpp
+1
-2
modules/gui/qt4/input_manager.cpp
modules/gui/qt4/input_manager.cpp
+2
-3
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.cpp
+15
-24
modules/gui/qt4/menus.cpp
modules/gui/qt4/menus.cpp
+1
-2
modules/gui/qt4/qt4.hpp
modules/gui/qt4/qt4.hpp
+2
-0
modules/gui/qt4/util/input_slider.cpp
modules/gui/qt4/util/input_slider.cpp
+2
-1
No files found.
modules/gui/qt4/components/playlist/selector.cpp
View file @
6523dc21
...
...
@@ -38,10 +38,10 @@ PLSelector::PLSelector( QWidget *p, intf_thread_t *_p_intf,
view
->
header
()
->
hide
();
view
->
setModel
(
model
);
connect
(
view
,
SIGNAL
(
activated
(
const
QModelIndex
&
)
),
this
,
SLOT
(
setSource
(
const
QModelIndex
&
)
)
);
connect
(
view
,
SIGNAL
(
clicked
(
const
QModelIndex
&
)
),
this
,
SLOT
(
setSource
(
const
QModelIndex
&
)
)
);
CONNECT
(
view
,
activated
(
const
QModelIndex
&
),
this
,
setSource
(
const
QModelIndex
&
)
);
CONNECT
(
view
,
clicked
(
const
QModelIndex
&
),
this
,
setSource
(
const
QModelIndex
&
)
);
QVBoxLayout
*
layout
=
new
QVBoxLayout
();
layout
->
setSpacing
(
0
);
layout
->
setMargin
(
0
);
...
...
modules/gui/qt4/components/playlist/standardpanel.cpp
View file @
6523dc21
...
...
@@ -70,25 +70,24 @@ StandardPLPanel::StandardPLPanel( QWidget *_parent, intf_thread_t *_p_intf,
if
(
model
->
hasRepeat
()
)
repeatButton
->
setText
(
qtr
(
"Repeat One"
)
);
else
if
(
model
->
hasLoop
()
)
repeatButton
->
setText
(
qtr
(
"Repeat All"
)
);
else
repeatButton
->
setText
(
qtr
(
"No Repeat"
)
);
connect
(
repeatButton
,
SIGNAL
(
clicked
()
),
this
,
SLOT
(
toggleRepeat
()
)
);
BUTTONACT
(
repeatButton
,
toggleRepeat
()
);
randomButton
=
new
QPushButton
(
0
);
buttons
->
addWidget
(
randomButton
);
if
(
model
->
hasRandom
()
)
randomButton
->
setText
(
qtr
(
"Random"
)
);
else
randomButton
->
setText
(
qtr
(
"No random"
)
);
connect
(
randomButton
,
SIGNAL
(
clicked
()
),
this
,
SLOT
(
toggleRandom
()
)
);
BUTTONACT
(
randomButton
,
toggleRandom
()
);
QSpacerItem
*
spacer
=
new
QSpacerItem
(
10
,
20
);
buttons
->
addItem
(
spacer
);
QLabel
*
filter
=
new
QLabel
(
qfu
(
"&Search:"
)
+
" "
);
buttons
->
addWidget
(
filter
);
searchLine
=
new
ClickLineEdit
(
qfu
(
"Playlist filter"
),
0
);
connect
(
searchLine
,
SIGNAL
(
textChanged
(
QString
)
),
this
,
SLOT
(
search
(
QString
))
);
CONNECT
(
searchLine
,
textChanged
(
QString
),
this
,
search
(
QString
));
buttons
->
addWidget
(
searchLine
);
filter
->
setBuddy
(
searchLine
);
QPushButton
*
clear
=
new
QPushButton
(
qfu
(
"CL"
)
);
buttons
->
addWidget
(
clear
);
connect
(
clear
,
SIGNAL
(
clicked
()
),
this
,
SLOT
(
clearFilter
()
)
);
BUTTONACT
(
clear
,
clearFilter
(
)
);
layout
->
addWidget
(
view
);
layout
->
addLayout
(
buttons
);
...
...
modules/gui/qt4/components/video_widget.cpp
View file @
6523dc21
...
...
@@ -52,16 +52,13 @@ VideoWidget::VideoWidget( intf_thread_t *_p_i, bool _always ) : QFrame( NULL ),
setSizePolicy
(
QSizePolicy
::
Preferred
,
QSizePolicy
::
Preferred
);
connect
(
DialogsProvider
::
getInstance
(
NULL
)
->
fixed_timer
,
SIGNAL
(
timeout
()
),
this
,
SLOT
(
update
()
)
);
ON_TIMEOUT
(
update
()
);
if
(
always
)
{
DrawBackground
();
connect
(
THEMIM
->
getIM
(),
SIGNAL
(
audioStarted
()
),
this
,
SLOT
(
hasAudio
()
)
);
connect
(
THEMIM
->
getIM
(),
SIGNAL
(
audioStarted
()
),
this
,
SLOT
(
hasVideo
()
)
);
DrawBackground
();
CONNECT
(
THEMIM
->
getIM
(),
audioStarted
(),
this
,
hasAudio
()
);
CONNECT
(
THEMIM
->
getIM
(),
audioStarted
(),
this
,
hasVideo
()
);
}
need_update
=
false
;
}
...
...
modules/gui/qt4/dialogs/errors.cpp
View file @
6523dc21
...
...
@@ -51,9 +51,9 @@ ErrorsDialog::ErrorsDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
layout
->
addWidget
(
clearButton
,
2
,
1
);
layout
->
addWidget
(
closeButton
,
2
,
2
);
connect
(
closeButton
,
SIGNAL
(
clicked
()
),
this
,
SLOT
(
onClose
()
)
);
connect
(
clearButton
,
SIGNAL
(
clicked
()
),
this
,
SLOT
(
onClear
()
)
);
connect
(
stopShowing
,
SIGNAL
(
clicked
()
),
this
,
SLOT
(
dontShow
()
)
);
BUTTONACT
(
closeButton
,
close
()
);
BUTTONACT
(
clearButton
,
clear
()
);
BUTTONACT
(
stopShowing
,
dontShow
(
)
);
}
void
ErrorsDialog
::
addError
(
QString
title
,
QString
text
)
...
...
@@ -78,12 +78,12 @@ void ErrorsDialog::add( bool error, QString title, QString text )
show
();
}
void
ErrorsDialog
::
onC
lose
()
void
ErrorsDialog
::
c
lose
()
{
hide
();
}
void
ErrorsDialog
::
onC
lear
()
void
ErrorsDialog
::
c
lear
()
{
messages
->
clear
();
}
...
...
modules/gui/qt4/dialogs/errors.hpp
View file @
6523dc21
...
...
@@ -52,8 +52,8 @@ private:
QCheckBox
*
stopShowing
;
QTextEdit
*
messages
;
public
slots
:
void
onC
lose
();
void
onC
lear
();
void
c
lose
();
void
c
lear
();
void
dontShow
();
};
...
...
modules/gui/qt4/dialogs/interaction.cpp
View file @
6523dc21
...
...
@@ -130,12 +130,11 @@ InteractionDialog::InteractionDialog( intf_thread_t *_p_intf,
&
altButton
,
p_dialog
->
psz_alternate_button
,
&
otherButton
,
p_dialog
->
psz_other_button
);
if
(
p_dialog
->
psz_default_button
)
connect
(
defaultButton
,
SIGNAL
(
clicked
()
),
this
,
SLOT
(
defaultB
()
)
);
BUTTONACT
(
defaultButton
,
defaultB
);
if
(
p_dialog
->
psz_alternate_button
)
connect
(
altButton
,
SIGNAL
(
clicked
()
),
this
,
SLOT
(
altB
()
)
);
BUTTONACT
(
altButton
,
altB
);
if
(
p_dialog
->
psz_other_button
)
connect
(
otherButton
,
SIGNAL
(
clicked
()
),
this
,
SLOT
(
otherB
()
)
);
BUTTONACT
(
otherButton
,
otherB
);
setLayout
(
layout
);
setWindowTitle
(
qfu
(
p_dialog
->
psz_title
)
);
}
...
...
modules/gui/qt4/dialogs/messages.cpp
View file @
6523dc21
...
...
@@ -64,10 +64,10 @@ MessagesDialog::MessagesDialog( intf_thread_t *_p_intf) : QVLCFrame( _p_intf )
layout
->
addWidget
(
clearButton
,
1
,
4
);
layout
->
addWidget
(
closeButton
,
1
,
5
);
CONNECT
(
closeButton
,
clicked
(),
this
,
close
()
);
CONNECT
(
clearButton
,
clicked
(),
this
,
clear
()
);
CONNECT
(
saveLogButton
,
clicked
(),
this
,
save
()
);
CONNECT
(
THEDP
->
fixed_timer
,
timeout
(),
this
,
updateLog
()
);
BUTTONACT
(
closeButton
,
close
()
);
BUTTONACT
(
clearButton
,
clear
()
);
BUTTONACT
(
saveLogButton
,
save
()
);
ON_TIMEOUT
(
updateLog
()
);
}
MessagesDialog
::~
MessagesDialog
()
...
...
@@ -90,16 +90,6 @@ void MessagesDialog::updateLog()
i_start
!=
i_stop
;
i_start
=
(
i_start
+
1
)
%
VLC_MSG_QSIZE
)
{
// [FIXME] Does not work as the old one
// Outputs too much data ?
// if (p_sub->p_msg[i_start].i_type = VLC_MSG_ERR)
// continue;
// if( !b_verbose &&
// VLC_MSG_ERR != p_sub->p_msg[i_start].i_type )
// continue;
/* Append all messages to log window */
if
(
p_sub
->
p_msg
[
i_start
].
i_type
==
VLC_MSG_INFO
||
p_sub
->
p_msg
[
i_start
].
i_type
==
VLC_MSG_ERR
||
p_sub
->
p_msg
[
i_start
].
i_type
==
VLC_MSG_WARN
&&
...
...
modules/gui/qt4/dialogs/playlist.cpp
View file @
6523dc21
...
...
@@ -42,8 +42,7 @@ PlaylistDialog::PlaylistDialog( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
setWindowTitle
(
qtr
(
"Playlist"
)
);
SDMapper
=
new
QSignalMapper
();
connect
(
SDMapper
,
SIGNAL
(
mapped
(
QString
)),
this
,
SLOT
(
SDMenuAction
(
QString
)
)
);
CONNECT
(
SDMapper
,
mapped
(
QString
),
this
,
SDMenuAction
(
QString
)
);
createPlMenuBar
(
menuBar
(),
p_intf
);
selector
=
new
PLSelector
(
centralWidget
(),
p_intf
,
THEPL
);
...
...
@@ -54,8 +53,7 @@ PlaylistDialog::PlaylistDialog( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
rightPanel
=
qobject_cast
<
PLPanel
*>
(
new
StandardPLPanel
(
centralWidget
(),
p_intf
,
THEPL
,
p_root
)
);
connect
(
selector
,
SIGNAL
(
activated
(
int
)
),
rightPanel
,
SLOT
(
setRoot
(
int
)
)
);
CONNECT
(
selector
,
activated
(
int
),
rightPanel
,
setRoot
(
int
)
);
QHBoxLayout
*
layout
=
new
QHBoxLayout
();
layout
->
addWidget
(
selector
,
0
);
...
...
@@ -126,7 +124,7 @@ QMenu *PlaylistDialog::SDMenu()
{
a
->
setChecked
(
true
);
}
connect
(
a
,
SIGNAL
(
triggered
()
),
SDMapper
,
SLOT
(
map
()
)
);
CONNECT
(
a
,
trigerred
(),
SDMapper
,
map
(
)
);
SDMapper
->
setMapping
(
a
,
i
>=
0
?
p_parser
->
pp_shortcuts
[
i
]
:
p_parser
->
psz_object_name
);
menu
->
addAction
(
a
);
...
...
modules/gui/qt4/dialogs/prefs_dialog.cpp
View file @
6523dc21
...
...
@@ -82,10 +82,10 @@ PrefsDialog::PrefsDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
main_layout
->
addLayout
(
buttonsLayout
,
2
,
0
,
1
,
3
);
setLayout
(
main_layout
);
CONNECT
(
save
,
clicked
(),
this
,
save
()
);
CONNECT
(
cancel
,
clicked
(),
this
,
cancel
()
);
CONNECT
(
small
,
clicked
(),
this
,
setSmall
()
);
CONNECT
(
all
,
clicked
(),
this
,
setAll
()
);
BUTTONACT
(
save
,
save
()
);
BUTTONACT
(
cancel
,
cancel
()
);
BUTTONACT
(
small
,
setSmall
()
);
BUTTONACT
(
all
,
setAll
()
);
for
(
int
i
=
0
;
i
<
SPrefsMax
;
i
++
)
simple_panels
[
i
]
=
NULL
;
}
...
...
@@ -101,9 +101,9 @@ void PrefsDialog::setAll()
if
(
!
advanced_tree
)
{
advanced_tree
=
new
PrefsTree
(
p_intf
,
tree_panel
);
connect
(
advanced_tree
,
SIGNAL
(
currentItemChanged
(
QTreeWidgetItem
*
,
QTreeWidgetItem
*
)
),
this
,
SLOT
(
changePanel
(
QTreeWidgetItem
*
)
)
);
CONNECT
(
advanced_tree
,
currentItemChanged
(
QTreeWidgetItem
*
,
QTreeWidgetItem
*
),
this
,
changePanel
(
QTreeWidgetItem
*
)
);
}
tree_panel_l
->
addWidget
(
advanced_tree
);
advanced_tree
->
show
();
...
...
modules/gui/qt4/dialogs/streaminfo.cpp
View file @
6523dc21
...
...
@@ -34,8 +34,7 @@ StreamInfoDialog::StreamInfoDialog( intf_thread_t *_p_intf, bool _main_input ) :
{
setWindowTitle
(
_
(
"Stream information"
)
);
ISP
=
new
InputStatsPanel
(
this
,
p_intf
);
connect
(
DialogsProvider
::
getInstance
(
NULL
)
->
fixed_timer
,
SIGNAL
(
timeout
()
),
this
,
SLOT
(
update
()
)
);
ON_TIMEOUT
(
update
()
);
p_input
=
NULL
;
}
...
...
modules/gui/qt4/input_manager.cpp
View file @
6523dc21
...
...
@@ -41,7 +41,7 @@ InputManager::InputManager( QObject *parent, intf_thread_t *_p_intf) :
{
i_old_playing_status
=
END_S
;
p_input
=
NULL
;
CONNECT
(
THEDP
->
fixed_timer
,
timeout
(),
this
,
update
()
);
ON_TIMEOUT
(
update
()
);
}
InputManager
::~
InputManager
()
...
...
@@ -172,8 +172,7 @@ MainInputManager::MainInputManager( intf_thread_t *_p_intf ) : QObject(NULL),
{
p_input
=
NULL
;
im
=
new
InputManager
(
this
,
p_intf
);
/* Get timer updates */
CONNECT
(
THEDP
->
fixed_timer
,
timeout
(),
this
,
updateInput
()
);
ON_TIMEOUT
(
updateInput
()
);
/* Warn our embedded IM about input changes */
CONNECT
(
this
,
inputChanged
(
input_thread_t
*
),
im
,
setInput
(
input_thread_t
*
)
);
...
...
modules/gui/qt4/main_interface.cpp
View file @
6523dc21
...
...
@@ -114,35 +114,26 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
/* Init input manager */
MainInputManager
::
getInstance
(
p_intf
);
ON_TIMEOUT
(
updateOnTimer
()
);
/* Volume control */
connect
(
ui
.
volumeSlider
,
SIGNAL
(
valueChanged
(
int
)
),
this
,
SLOT
(
updateVolume
(
int
)
)
);
/* Get timer updates */
connect
(
THEDP
->
fixed_timer
,
SIGNAL
(
timeout
()
),
this
,
SLOT
(
updateOnTimer
()
)
);
CONNECT
(
ui
.
volumeSlider
,
valueChanged
(
int
),
this
,
updateVolume
(
int
)
);
/* Connect the input manager to the GUI elements it manages */
connect
(
THEMIM
->
getIM
(),
SIGNAL
(
positionUpdated
(
float
,
int
,
int
)
),
slider
,
SLOT
(
setPosition
(
float
,
int
,
int
)
)
);
connect
(
THEMIM
->
getIM
(),
SIGNAL
(
positionUpdated
(
float
,
int
,
int
)
),
this
,
SLOT
(
setDisplay
(
float
,
int
,
int
)
)
);
connect
(
THEMIM
->
getIM
(),
SIGNAL
(
nameChanged
(
QString
)
),
this
,
SLOT
(
setName
(
QString
)
)
);
connect
(
THEMIM
->
getIM
(),
SIGNAL
(
statusChanged
(
int
)
),
this
,
SLOT
(
setStatus
(
int
)
)
);
connect
(
slider
,
SIGNAL
(
sliderDragged
(
float
)
),
THEMIM
->
getIM
(),
SLOT
(
sliderUpdate
(
float
)
)
);
CONNECT
(
THEMIM
->
getIM
(),
positionUpdated
(
float
,
int
,
int
),
slider
,
setPosition
(
float
,
int
,
int
)
);
CONNECT
(
THEMIM
->
getIM
(),
positionUpdated
(
float
,
int
,
int
),
this
,
setDisplay
(
float
,
int
,
int
)
);
CONNECT
(
THEMIM
->
getIM
(),
nameChanged
(
QString
),
this
,
setName
(
QString
)
);
CONNECT
(
THEMIM
->
getIM
(),
statusChanged
(
int
),
this
,
setStatus
(
int
)
);
CONNECT
(
slider
,
sliderDragged
(
float
),
THEMIM
->
getIM
(),
sliderUpdate
(
float
)
);
/* Actions */
connect
(
ui
.
playButton
,
SIGNAL
(
clicked
()
),
this
,
SLOT
(
play
()
)
);
connect
(
ui
.
stopButton
,
SIGNAL
(
clicked
()
),
this
,
SLOT
(
stop
()
)
);
connect
(
ui
.
nextButton
,
SIGNAL
(
clicked
()
),
this
,
SLOT
(
next
()
)
);
connect
(
ui
.
prevButton
,
SIGNAL
(
clicked
()
),
this
,
SLOT
(
prev
()
)
);
connect
(
ui
.
playlistButton
,
SIGNAL
(
clicked
()),
THEDP
,
SLOT
(
playlistDialog
()
)
);
BUTTONACT
(
ui
.
playButton
,
play
()
);
BUTTONACT
(
ui
.
stopButton
,
stop
()
);
BUTTONACT
(
ui
.
nextButton
,
next
()
);
BUTTONACT
(
ui
.
prevButton
,
prev
()
);
CONNECT
(
ui
.
playlistButton
,
clicked
(),
THEDP
,
playlistDialog
()
);
var_Create
(
p_intf
,
"interaction"
,
VLC_VAR_ADDRESS
);
var_AddCallback
(
p_intf
,
"interaction"
,
InteractCallback
,
this
);
...
...
modules/gui/qt4/menus.cpp
View file @
6523dc21
...
...
@@ -114,8 +114,7 @@ static int AudioAutoMenuBuilder( vlc_object_t *p_object,
#define BAR_DADD( func, title, id ) { \
QMenu *menu = func; menu->setTitle( title ); bar->addMenu( menu ); \
MenuFunc *f = new MenuFunc( menu, id ); \
connect( menu, SIGNAL( aboutToShow() ), \
THEDP->menusUpdateMapper, SLOT(map()) ); \
CONNECT( menu, aboutToShow(), THEDP->menusUpdateMapper, map() ); \
THEDP->menusUpdateMapper->setMapping( menu, f ); }
void
QVLCMenu
::
createMenuBar
(
QMenuBar
*
bar
,
intf_thread_t
*
p_intf
)
...
...
modules/gui/qt4/qt4.hpp
View file @
6523dc21
...
...
@@ -56,6 +56,8 @@ struct intf_sys_t
#define qta( i ) i.toAscii().data()
#define CONNECT( a, b, c, d ) connect( a, SIGNAL( b ), c, SLOT(d) )
#define BUTTONACT( b, a ) connect( b, SIGNAL( clicked() ), this, SLOT(a) )
#define ON_TIMEOUT( act ) CONNECT( THEDP->fixed_timer, timeout, this, act )
static
int
DialogEvent_Type
=
QEvent
::
User
+
1
;
...
...
modules/gui/qt4/util/input_slider.cpp
View file @
6523dc21
...
...
@@ -21,6 +21,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include "qt4.hpp"
#include "util/input_slider.hpp"
InputSlider
::
InputSlider
(
QWidget
*
_parent
)
:
DirectSlider
(
_parent
)
...
...
@@ -37,7 +38,7 @@ InputSlider::InputSlider( Qt::Orientation q,QWidget *_parent ) :
setSingleStep
(
2
);
setPageStep
(
10
);
setTracking
(
true
);
connect
(
this
,
SIGNAL
(
valueChanged
(
int
)
),
this
,
SLOT
(
userDrag
(
int
)
)
);
CONNECT
(
this
,
valueChanged
(
int
),
this
,
userDrag
(
int
)
);
}
void
InputSlider
::
setPosition
(
float
pos
,
int
a
,
int
b
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment