Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
745c83a0
Commit
745c83a0
authored
Nov 29, 2009
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: allow loop/repeat button to be in a toolbar (part 1)
parent
c5f0506c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
3 deletions
+40
-3
modules/gui/qt4/actions_manager.hpp
modules/gui/qt4/actions_manager.hpp
+1
-0
modules/gui/qt4/components/controller.cpp
modules/gui/qt4/components/controller.cpp
+7
-0
modules/gui/qt4/components/controller.hpp
modules/gui/qt4/components/controller.hpp
+6
-3
modules/gui/qt4/components/controller_widget.cpp
modules/gui/qt4/components/controller_widget.cpp
+19
-0
modules/gui/qt4/components/controller_widget.hpp
modules/gui/qt4/components/controller_widget.hpp
+7
-0
No files found.
modules/gui/qt4/actions_manager.hpp
View file @
745c83a0
...
@@ -52,6 +52,7 @@ typedef enum actionType_e
...
@@ -52,6 +52,7 @@ typedef enum actionType_e
SKIP_FW_ACTION
,
SKIP_FW_ACTION
,
QUIT_ACTION
,
QUIT_ACTION
,
RANDOM_ACTION
,
RANDOM_ACTION
,
LOOP_ACTION
,
}
actionType_e
;
}
actionType_e
;
class
ActionsManager
:
public
QObject
class
ActionsManager
:
public
QObject
...
...
modules/gui/qt4/components/controller.cpp
View file @
745c83a0
...
@@ -367,6 +367,13 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options )
...
@@ -367,6 +367,13 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options )
RANDOMButton
,
setChecked
(
bool
)
);
RANDOMButton
,
setChecked
(
bool
)
);
}
}
break
;
break
;
case
LOOP_BUTTON
:{
LoopButton
*
loopButton
=
new
LoopButton
;
setupButton
(
loopButton
);
loopButton
->
setToolTip
(
qtr
(
"Click to toggle between loop one, loop all"
)
);
loopButton
->
setCheckable
(
true
);
}
break
;
default:
default:
msg_Warn
(
p_intf
,
"This should not happen %i"
,
button
);
msg_Warn
(
p_intf
,
"This should not happen %i"
,
button
);
break
;
break
;
...
...
modules/gui/qt4/components/controller.hpp
View file @
745c83a0
...
@@ -81,6 +81,7 @@ typedef enum buttonType_e
...
@@ -81,6 +81,7 @@ typedef enum buttonType_e
SKIP_FW_BUTTON
,
SKIP_FW_BUTTON
,
QUIT_BUTTON
,
QUIT_BUTTON
,
RANDOM_BUTTON
,
RANDOM_BUTTON
,
LOOP_BUTTON
,
BUTTON_MAX
,
BUTTON_MAX
,
SPLITTER
=
0x20
,
SPLITTER
=
0x20
,
...
@@ -103,7 +104,8 @@ static const char* const nameL[BUTTON_MAX] = { N_("Play"), N_("Stop"), N_("Open"
...
@@ -103,7 +104,8 @@ static const char* const nameL[BUTTON_MAX] = { N_("Play"), N_("Stop"), N_("Open"
N_
(
"Previous"
),
N_
(
"Next"
),
N_
(
"Slower"
),
N_
(
"Faster"
),
N_
(
"Fullscreen"
),
N_
(
"Previous"
),
N_
(
"Next"
),
N_
(
"Slower"
),
N_
(
"Faster"
),
N_
(
"Fullscreen"
),
N_
(
"De-Fullscreen"
),
N_
(
"Extended panel"
),
N_
(
"Playlist"
),
N_
(
"Snapshot"
),
N_
(
"De-Fullscreen"
),
N_
(
"Extended panel"
),
N_
(
"Playlist"
),
N_
(
"Snapshot"
),
N_
(
"Record"
),
N_
(
"A->B Loop"
),
N_
(
"Frame By Frame"
),
N_
(
"Trickplay Reverse"
),
N_
(
"Record"
),
N_
(
"A->B Loop"
),
N_
(
"Frame By Frame"
),
N_
(
"Trickplay Reverse"
),
N_
(
"Step backward"
),
N_
(
"Step forward"
),
N_
(
"Quit"
),
N_
(
"Random"
)
};
N_
(
"Step backward"
),
N_
(
"Step forward"
),
N_
(
"Quit"
),
N_
(
"Random"
),
N_
(
"Loop/Repeat mode"
)
};
static
const
char
*
const
tooltipL
[
BUTTON_MAX
]
=
{
I_PLAY_TOOLTIP
,
static
const
char
*
const
tooltipL
[
BUTTON_MAX
]
=
{
I_PLAY_TOOLTIP
,
N_
(
"Stop playback"
),
N_
(
"Open a medium"
),
N_
(
"Stop playback"
),
N_
(
"Open a medium"
),
N_
(
"Previous media in the playlist"
),
N_
(
"Previous media in the playlist"
),
...
@@ -113,14 +115,15 @@ static const char* const tooltipL[BUTTON_MAX] = { I_PLAY_TOOLTIP,
...
@@ -113,14 +115,15 @@ static const char* const tooltipL[BUTTON_MAX] = { I_PLAY_TOOLTIP,
N_
(
"Take a snapshot"
),
N_
(
"Record"
),
N_
(
"Take a snapshot"
),
N_
(
"Record"
),
N_
(
"Loop from point A to point B continuously."
),
N_
(
"Frame by frame"
),
N_
(
"Loop from point A to point B continuously."
),
N_
(
"Frame by frame"
),
N_
(
"Reverse"
),
N_
(
"Step backward"
),
N_
(
"Step forward"
),
N_
(
"Quit"
),
N_
(
"Reverse"
),
N_
(
"Step backward"
),
N_
(
"Step forward"
),
N_
(
"Quit"
),
N_
(
"Random"
)
};
N_
(
"Random"
)
,
N_
(
"Change the loop and repeat modes"
)
};
static
const
QString
iconL
[
BUTTON_MAX
]
=
{
":/toolbar/play_b"
,
":/toolbar/stop_b"
,
static
const
QString
iconL
[
BUTTON_MAX
]
=
{
":/toolbar/play_b"
,
":/toolbar/stop_b"
,
":/toolbar/eject"
,
":/toolbar/previous_b"
,
":/toolbar/next_b"
,
":/toolbar/eject"
,
":/toolbar/previous_b"
,
":/toolbar/next_b"
,
":/toolbar/slower"
,
":/toolbar/faster"
,
":/toolbar/fullscreen"
,
":/toolbar/slower"
,
":/toolbar/faster"
,
":/toolbar/fullscreen"
,
":/toolbar/defullscreen"
,
":/toolbar/extended"
,
":/toolbar/playlist"
,
":/toolbar/defullscreen"
,
":/toolbar/extended"
,
":/toolbar/playlist"
,
":/toolbar/snapshot"
,
":/toolbar/record"
,
":/toolbar/atob_nob"
,
":/toolbar/snapshot"
,
":/toolbar/record"
,
":/toolbar/atob_nob"
,
":/toolbar/frame"
,
":/toolbar/reverse"
,
":/toolbar/skip_back"
,
":/toolbar/frame"
,
":/toolbar/reverse"
,
":/toolbar/skip_back"
,
":/toolbar/skip_fw"
,
":/toolbar/clear"
,
":/buttons/playlist/shuffle_on"
};
":/toolbar/skip_fw"
,
":/toolbar/clear"
,
":/buttons/playlist/shuffle_on"
,
":/buttons/playlist/repeat_all"
};
enum
enum
{
{
...
...
modules/gui/qt4/components/controller_widget.cpp
View file @
745c83a0
...
@@ -235,3 +235,22 @@ void AtoB_Button::setIcons( bool timeA, bool timeB )
...
@@ -235,3 +235,22 @@ void AtoB_Button::setIcons( bool timeA, bool timeB )
}
}
}
}
void
LoopButton
::
update
()
{
/* if( model->hasRepeat() )
{
repeatButton->setIcon( QIcon( ":/buttons/playlist/repeat_one" ) );
repeatButton->setChecked( true );
}
else if( model->hasLoop() )
{
repeatButton->setIcon( QIcon( ":/buttons/playlist/repeat_all" ) );
repeatButton->setChecked( true );
}
else
{
repeatButton->setIcon( QIcon( ":/buttons/playlist/repeat_one" ) );
repeatButton->setChecked( false );
}*/
//BUTTONACT( repeatButton, toggleRepeat() );
}
modules/gui/qt4/components/controller_widget.hpp
View file @
745c83a0
...
@@ -53,6 +53,13 @@ private slots:
...
@@ -53,6 +53,13 @@ private slots:
void
updateButton
(
bool
);
void
updateButton
(
bool
);
};
};
class
LoopButton
:
public
QToolButton
{
Q_OBJECT
private
slots
:
void
update
();
};
class
AtoB_Button
:
public
QToolButton
class
AtoB_Button
:
public
QToolButton
{
{
Q_OBJECT
Q_OBJECT
...
...
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