Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
bcdcaf27
Commit
bcdcaf27
authored
Aug 06, 2008
by
Lukas Durfina
Committed by
Jean-Baptiste Kempf
Aug 07, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qt4: fix synchronization of advanced buttons in both controllers
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
4ca1e8b9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
12 deletions
+46
-12
modules/gui/qt4/components/interface_widgets.cpp
modules/gui/qt4/components/interface_widgets.cpp
+38
-10
modules/gui/qt4/components/interface_widgets.hpp
modules/gui/qt4/components/interface_widgets.hpp
+6
-2
modules/gui/qt4/input_manager.hpp
modules/gui/qt4/input_manager.hpp
+2
-0
No files found.
modules/gui/qt4/components/interface_widgets.cpp
View file @
bcdcaf27
...
...
@@ -58,6 +58,10 @@
#define I_PLAY_TOOLTIP N_("Play\nIf the playlist is empty, open a media")
/* init static variables in advanced controls */
mtime_t
AdvControlsWidget
::
timeA
=
0
;
mtime_t
AdvControlsWidget
::
timeB
=
0
;
/**********************************************************************
* Video Widget. A simple frame on which video is drawn
* This class handles resize issues
...
...
@@ -298,7 +302,7 @@ void VisualSelector::next()
aButton->setMinimumSize( QSize( 26, 26 ) ); \
aButton->setIconSize( QSize( 20, 20 ) ); }
AdvControlsWidget
::
AdvControlsWidget
(
intf_thread_t
*
_p_i
)
:
AdvControlsWidget
::
AdvControlsWidget
(
intf_thread_t
*
_p_i
,
bool
b_fsCreation
=
false
)
:
QFrame
(
NULL
),
p_intf
(
_p_i
)
{
QHBoxLayout
*
advLayout
=
new
QHBoxLayout
(
this
);
...
...
@@ -314,8 +318,15 @@ AdvControlsWidget::AdvControlsWidget( intf_thread_t *_p_i ) :
qtr
(
"Loop from point A to point B continuously.
\n
Click to set point A"
),
fromAtoB
()
);
timeA
=
timeB
=
0
;
CONNECT
(
THEMIM
->
getIM
(),
positionUpdated
(
float
,
int
,
int
),
this
,
AtoBLoop
(
float
,
int
,
int
)
);
/* in FS controller we skip this, because we dont want to have it double
controlled */
if
(
!
b_fsCreation
)
CONNECT
(
THEMIM
->
getIM
(),
positionUpdated
(
float
,
int
,
int
),
this
,
AtoBLoop
(
float
,
int
,
int
)
);
/* set up synchronization between main controller and fs controller */
CONNECT
(
THEMIM
->
getIM
(),
advControlsSetIcon
(),
this
,
setIcon
()
);
connect
(
this
,
SIGNAL
(
timeChanged
()
),
THEMIM
->
getIM
(),
SIGNAL
(
advControlsSetIcon
()));
#if 0
frameButton = new QPushButton( "Fr" );
frameButton->setMaximumSize( QSize( 26, 26 ) );
...
...
@@ -368,22 +379,39 @@ void AdvControlsWidget::fromAtoB()
if
(
!
timeA
)
{
timeA
=
var_GetTime
(
THEMIM
->
getInput
(),
"time"
);
ABButton
->
setToolTip
(
qtr
(
"Click to set point B"
)
);
ABButton
->
setIcon
(
QIcon
(
":/atob_noa"
)
);
emit
timeChanged
();
return
;
}
if
(
!
timeB
)
{
timeB
=
var_GetTime
(
THEMIM
->
getInput
(),
"time"
);
var_SetTime
(
THEMIM
->
getInput
(),
"time"
,
timeA
);
ABButton
->
setIcon
(
QIcon
(
":/atob"
)
);
ABButton
->
setToolTip
(
qtr
(
"Stop the A to B loop"
)
);
emit
timeChanged
();
return
;
}
timeA
=
0
;
timeB
=
0
;
ABButton
->
setToolTip
(
qtr
(
"Loop from point A to point B continuously
\n
Click to set point A"
)
);
ABButton
->
setIcon
(
QIcon
(
":/atob_nob"
)
);
emit
timeChanged
();
}
/* setting/synchro icons after click on main or fs controller */
void
AdvControlsWidget
::
setIcon
()
{
if
(
!
timeA
&&
!
timeB
)
{
ABButton
->
setIcon
(
QIcon
(
":/atob_nob"
)
);
ABButton
->
setToolTip
(
qtr
(
"Loop from point A to point B continuously
\n
Click to set point A"
)
);
}
else
if
(
timeA
&&
!
timeB
)
{
ABButton
->
setIcon
(
QIcon
(
":/atob_noa"
)
);
ABButton
->
setToolTip
(
qtr
(
"Click to set point B"
)
);
}
else
if
(
timeA
&&
timeB
)
{
ABButton
->
setIcon
(
QIcon
(
":/atob"
)
);
ABButton
->
setToolTip
(
qtr
(
"Stop the A to B loop"
)
);
}
}
/* Function called regularly when in an AtoB loop */
...
...
@@ -441,7 +469,7 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
/* advanced Controls handling */
b_advancedVisible
=
b_advControls
;
advControls
=
new
AdvControlsWidget
(
p_intf
);
advControls
=
new
AdvControlsWidget
(
p_intf
,
b_fsCreation
);
if
(
!
b_advancedVisible
)
advControls
->
hide
();
/** Disc and Menus handling */
...
...
modules/gui/qt4/components/interface_widgets.hpp
View file @
bcdcaf27
...
...
@@ -145,7 +145,7 @@ class AdvControlsWidget : public QFrame
{
Q_OBJECT
public:
AdvControlsWidget
(
intf_thread_t
*
);
AdvControlsWidget
(
intf_thread_t
*
,
bool
);
virtual
~
AdvControlsWidget
();
void
enableInput
(
bool
);
...
...
@@ -156,7 +156,7 @@ private:
QPushButton
*
recordButton
,
*
ABButton
;
QPushButton
*
snapshotButton
,
*
frameButton
;
mtime_t
timeA
,
timeB
;
static
mtime_t
timeA
,
timeB
;
private
slots
:
void
snapshot
();
...
...
@@ -166,6 +166,10 @@ private slots:
void
fromAtoB
();
void
record
();
void
AtoBLoop
(
float
,
int
,
int
);
void
setIcon
();
signals:
void
timeChanged
();
};
/* Button Bar */
...
...
modules/gui/qt4/input_manager.hpp
View file @
bcdcaf27
...
...
@@ -124,6 +124,8 @@ signals:
void
toggleTelexButtons
();
void
toggleTelexTransparency
();
void
setNewTelexPage
(
int
);
/// Advanced buttons
void
advControlsSetIcon
();
};
class
MainInputManager
:
public
QObject
...
...
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