Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Amarok
Commits
fc3d68a9
Commit
fc3d68a9
authored
May 08, 2012
by
Sam Lade
Browse files
Remove context view video applet
Unmaintained and broken for quite some time. BUG:242793 FIXED-IN:2.6
parent
8dcfb77d
Changes
20
Expand all
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
fc3d68a9
...
...
@@ -46,6 +46,7 @@ VERSION 2.6-Beta 1
vice versa. (BR 142579)
CHANGES:
* Remove context view video applet. Unmaintained and broken. (BR 242793)
* Album cover images are written in background to prevent freezes. (BR 298332)
* Make keyboard & mouse behaviour of saved playlists browser same as of the
collection browser, including the delete key.
...
...
src/context/applets/CMakeLists.txt
View file @
fc3d68a9
...
...
@@ -3,7 +3,6 @@ add_subdirectory( currenttrack )
add_subdirectory
(
lyrics
)
add_subdirectory
(
info
)
add_subdirectory
(
wikipedia
)
add_subdirectory
(
videoclip
)
add_subdirectory
(
photos
)
add_subdirectory
(
labels
)
add_subdirectory
(
tabs
)
...
...
src/context/applets/videoclip/CMakeLists.txt
deleted
100644 → 0
View file @
8dcfb77d
project
(
context-videoclip
)
set
(
videoclip_applet_SRCS
VideoclipApplet.cpp
VideoItemButton.cpp
CustomVideoWidget.cpp
${
Amarok_SOURCE_DIR
}
/src/widgets/kratingwidget.cpp
${
Amarok_SOURCE_DIR
}
/src/widgets/kratingpainter.cpp
)
include_directories
(
${
Amarok_SOURCE_DIR
}
/src
${
Amarok_SOURCE_DIR
}
/src/context
${
Amarok_SOURCE_DIR
}
/src/context/applets
${
Amarok_SOURCE_DIR
}
/src/context/applets/videoclip
${
Amarok_SOURCE_DIR
}
/src/context/engines/videoclip
)
kde4_add_ui_files
(
videoclip_applet_SRCS videoclipSettings.ui
)
kde4_add_plugin
(
amarok_context_applet_videoclip
${
videoclip_applet_SRCS
}
)
target_link_libraries
(
amarok_context_applet_videoclip
amarokcore
amaroklib
${
KDE4_PLASMA_LIBS
}
${
KDE4_PHONON_LIBS
}
)
install
(
TARGETS amarok_context_applet_videoclip DESTINATION
${
PLUGIN_INSTALL_DIR
}
)
install
(
FILES amarok-context-applet-videoclip.desktop DESTINATION
${
SERVICES_INSTALL_DIR
}
)
install
(
FILES amarok-videoclip-youtube.png DESTINATION
${
DATA_INSTALL_DIR
}
/amarok/images/
)
install
(
FILES amarok-videoclip-dailymotion.png DESTINATION
${
DATA_INSTALL_DIR
}
/amarok/images/
)
install
(
FILES amarok-videoclip-vimeo.png DESTINATION
${
DATA_INSTALL_DIR
}
/amarok/images/
)
src/context/applets/videoclip/CustomVideoWidget.cpp
deleted
100644 → 0
View file @
8dcfb77d
/****************************************************************************************
* Copyright (c) 2009 Simon Esneault <simon.esneault@gmail.com> *
* *
* This program is free software; you can redistribute it and/or modify it under *
* the terms of the GNU General Public License as published by the Free Software *
* Foundation; either version 2 of the License, or (at your option) any later *
* version. *
* *
* This program is distributed in the hope that it will be useful, but WITHOUT ANY *
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A *
* PARTICULAR PURPOSE. See the GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along with *
* this program. If not, see <http://www.gnu.org/licenses/>. *
****************************************************************************************/
#include
"CustomVideoWidget.h"
#include
<KAction>
#include
<KLocale>
#include
<KMenu>
#include
<QKeyEvent>
#define DEBUG_PREFIX "CustomVideoWidget"
using
namespace
Phonon
;
void
CustomVideoWidget
::
mouseDoubleClickEvent
(
QMouseEvent
*
)
{
// If we already are in full screen
if
(
!
isFullScreen
()
)
{
enableFullscreen
();
}
else
{
disableFullscreen
();
}
}
void
CustomVideoWidget
::
keyPressEvent
(
QKeyEvent
*
e
)
{
if
(
!
isFullScreen
()
)
{
Phonon
::
VideoWidget
::
keyPressEvent
(
e
);
}
else
{
if
(
e
->
key
()
==
Qt
::
Key_Escape
)
{
disableFullscreen
();
}
}
}
void
CustomVideoWidget
::
mousePressEvent
(
QMouseEvent
*
e
)
{
switch
(
e
->
button
()
)
{
case
Qt
::
RightButton
:
videoMenu
(
e
->
globalPos
()
);
break
;
case
Qt
::
LeftButton
:
case
Qt
::
MidButton
:
case
Qt
::
MouseButtonMask
:
case
Qt
::
NoButton
:
case
Qt
::
XButton1
:
case
Qt
::
XButton2
:
break
;
}
}
void
CustomVideoWidget
::
videoMenu
(
QPoint
point
)
{
KMenu
*
men
=
new
KMenu
(
this
);
if
(
!
isFullScreen
()
)
{
KAction
*
toggle
=
new
KAction
(
KIcon
(
"view-fullscreen"
),
i18n
(
"Enter &fullscreen"
),
this
);
men
->
addAction
(
toggle
);
connect
(
toggle
,
SIGNAL
(
triggered
(
bool
)
),
this
,
SLOT
(
enableFullscreen
()
)
);
}
else
{
KAction
*
toggle
=
new
KAction
(
KIcon
(
"edit-undo"
),
i18n
(
"E&xit fullscreen"
),
this
);
men
->
addAction
(
toggle
);
connect
(
toggle
,
SIGNAL
(
triggered
(
bool
)
),
this
,
SLOT
(
disableFullscreen
()
)
);
}
men
->
exec
(
point
);
}
void
CustomVideoWidget
::
enableFullscreen
()
{
m_parent
=
parentWidget
();
m_rect
=
geometry
();
setWindowFlags
(
Qt
::
Window
);
setFullScreen
(
true
);
}
void
CustomVideoWidget
::
disableFullscreen
()
{
setFullScreen
(
false
);
setParent
(
m_parent
,
Qt
::
SubWindow
|
Qt
::
FramelessWindowHint
);
setGeometry
(
m_rect
);
show
();
}
src/context/applets/videoclip/CustomVideoWidget.h
deleted
100644 → 0
View file @
8dcfb77d
/****************************************************************************************
* Copyright (c) 2009 Simon Esneault <simon.esneault@gmail.com> *
* *
* This program is free software; you can redistribute it and/or modify it under *
* the terms of the GNU General Public License as published by the Free Software *
* Foundation; either version 2 of the License, or (at your option) any later *
* version. *
* *
* This program is distributed in the hope that it will be useful, but WITHOUT ANY *
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A *
* PARTICULAR PURPOSE. See the GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along with *
* this program. If not, see <http://www.gnu.org/licenses/>. *
****************************************************************************************/
#ifndef CUSTOMVIDEOWIDGET_H
#define CUSTOMVIDEOWIDGET_H
#include
"amarok_export.h"
#include
<phonon/videowidget.h>
/**
* \brief A custom interactive Phonon VideoWidget
* Interactivity :
* - Double click toggle full screen
* \sa Phonon::VideoWidget
*
* \author Simon Esneault <simon.esneault@gmail.com>
*/
class
CustomVideoWidget
:
public
Phonon
::
VideoWidget
{
Q_OBJECT
protected:
virtual
void
mouseDoubleClickEvent
(
QMouseEvent
*
);
virtual
void
keyPressEvent
(
QKeyEvent
*
e
);
virtual
void
mousePressEvent
(
QMouseEvent
*
e
);
private
slots
:
void
enableFullscreen
();
void
disableFullscreen
();
private:
void
videoMenu
(
QPoint
);
QWidget
*
m_parent
;
QRect
m_rect
;
};
#endif // CUSTOMVIDEOWIDGET_H
src/context/applets/videoclip/VideoItemButton.cpp
deleted
100644 → 0
View file @
8dcfb77d
/****************************************************************************************
* Copyright (c) 2009 Simon Esneault <simon.esneault@gmail.com> *
* *
* This program is free software; you can redistribute it and/or modify it under *
* the terms of the GNU General Public License as published by the Free Software *
* Foundation; either version 2 of the License, or (at your option) any later *
* version. *
* *
* This program is distributed in the hope that it will be useful, but WITHOUT ANY *
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A *
* PARTICULAR PURPOSE. See the GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along with *
* this program. If not, see <http://www.gnu.org/licenses/>. *
****************************************************************************************/
#define DEBUG_PREFIX "VideoItemButton"
#include
"VideoItemButton.h"
#include
"SvgHandler.h"
#include
"core/support/Debug.h"
#include
<KAction>
#include
<KIcon>
#include
<KMenu>
#include
<QPixmapCache>
VideoItemButton
::
VideoItemButton
()
:
QToolButton
()
,
m_videoInfo
(
0
)
{}
VideoItemButton
::~
VideoItemButton
()
{
}
void
VideoItemButton
::
setVideoInfo
(
VideoInfo
*
info
)
{
// save the video Info
m_videoInfo
=
info
;
// Create a pixmap with nice border
QPixmap
pix
;
QString
key
=
QString
(
"%1_%2"
).
arg
(
info
->
url
,
QString
::
number
(
100
)
);
if
(
!
QPixmapCache
::
find
(
key
,
&
pix
)
)
{
pix
=
info
->
cover
.
scaledToHeight
(
100
,
Qt
::
SmoothTransformation
);
pix
=
The
::
svgHandler
()
->
addBordersToPixmap
(
pix
,
5
,
QString
(),
true
);
QPixmapCache
::
insert
(
key
,
pix
);
}
// then add info
setToolButtonStyle
(
Qt
::
ToolButtonIconOnly
);
setAutoRaise
(
true
);
setIcon
(
QIcon
(
pix
)
);
setSizePolicy
(
QSizePolicy
::
Fixed
,
QSizePolicy
::
Fixed
);
setIconSize
(
pix
.
size
()
)
;
setToolTip
(
info
->
title
);
setContextMenuPolicy
(
Qt
::
CustomContextMenu
);
connect
(
this
,
SIGNAL
(
customContextMenuRequested
(
QPoint
)
),
this
,
SLOT
(
myMenu
(
QPoint
)
)
);
}
VideoInfo
*
VideoItemButton
::
getVideoInfo
()
{
return
m_videoInfo
;
}
void
VideoItemButton
::
mousePressEvent
(
QMouseEvent
*
event
)
{
if
(
event
->
button
()
==
Qt
::
LeftButton
)
appendPlay
();
if
(
event
->
button
()
==
Qt
::
MidButton
)
queue
();
}
void
VideoItemButton
::
mouseDoubleClickEvent
(
QMouseEvent
*
)
{
DEBUG_BLOCK
appendPlay
();
}
void
VideoItemButton
::
enterEvent
(
QEvent
*
)
{
setCursor
(
Qt
::
PointingHandCursor
);
}
void
VideoItemButton
::
leaveEvent
(
QEvent
*
)
{
setCursor
(
Qt
::
ArrowCursor
);
}
void
VideoItemButton
::
myMenu
(
QPoint
point
)
{
DEBUG_BLOCK
KAction
*
appendAction
=
new
KAction
(
KIcon
(
"media-track-add-amarok"
),
i18n
(
"&Add to playlist"
),
this
);
KAction
*
queueAction
=
new
KAction
(
KIcon
(
"media-track-queue-amarok"
),
i18n
(
"&Queue"
),
this
);
KAction
*
appendPlayAction
=
new
KAction
(
KIcon
(
"music-amarok"
),
i18n
(
"Append and &Play"
),
this
);
KMenu
*
men
=
new
KMenu
(
this
);
men
->
addAction
(
appendAction
);
men
->
addAction
(
queueAction
);
men
->
addAction
(
appendPlayAction
);
connect
(
appendAction
,
SIGNAL
(
triggered
(
bool
)
),
this
,
SLOT
(
append
()
)
);
connect
(
queueAction
,
SIGNAL
(
triggered
(
bool
)
),
this
,
SLOT
(
queue
()
)
);
connect
(
appendPlayAction
,
SIGNAL
(
triggered
(
bool
)
),
this
,
SLOT
(
appendPlay
()
)
);
men
->
exec
(
mapToGlobal
(
point
)
);
}
void
VideoItemButton
::
append
()
{
emit
appendRequested
(
m_videoInfo
);
}
void
VideoItemButton
::
queue
()
{
emit
queueRequested
(
m_videoInfo
);
}
void
VideoItemButton
::
appendPlay
()
{
emit
appendPlayRequested
(
m_videoInfo
);
}
#include
"VideoItemButton.moc"
src/context/applets/videoclip/VideoItemButton.h
deleted
100644 → 0
View file @
8dcfb77d
/****************************************************************************************
* Copyright (c) 2009 Simon Esneault <simon.esneault@gmail.com> *
* *
* This program is free software; you can redistribute it and/or modify it under *
* the terms of the GNU General Public License as published by the Free Software *
* Foundation; either version 2 of the License, or (at your option) any later *
* version. *
* *
* This program is distributed in the hope that it will be useful, but WITHOUT ANY *
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A *
* PARTICULAR PURPOSE. See the GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along with *
* this program. If not, see <http://www.gnu.org/licenses/>. *
****************************************************************************************/
#ifndef VIDEOITEMBUTTON_H
#define VIDEOITEMBUTTON_H
#include
"VideoclipApplet.h"
#include
<QToolButton>
/** VideoItemButton specialized widget for interaction
* - middle click will queue the track
* - double click will append and play the track
* - right click opens a popup menu with options.
*/
class
VideoItemButton
:
public
QToolButton
{
public:
Q_OBJECT
public:
VideoItemButton
();
virtual
~
VideoItemButton
();
void
setVideoInfo
(
VideoInfo
*
);
VideoInfo
*
getVideoInfo
();
protected:
virtual
void
mousePressEvent
(
QMouseEvent
*
);
virtual
void
mouseDoubleClickEvent
(
QMouseEvent
*
);
virtual
void
enterEvent
(
QEvent
*
);
virtual
void
leaveEvent
(
QEvent
*
);
public
slots
:
void
append
();
void
queue
();
void
appendPlay
();
void
myMenu
(
QPoint
point
);
signals:
void
appendRequested
(
VideoInfo
*
);
void
appendPlayRequested
(
VideoInfo
*
);
void
queueRequested
(
VideoInfo
*
);
private
:
VideoInfo
*
m_videoInfo
;
};
#endif // VIDEOITEMBUTTON_H
src/context/applets/videoclip/VideoclipApplet.cpp
deleted
100644 → 0
View file @
8dcfb77d
This diff is collapsed.
Click to expand it.
src/context/applets/videoclip/VideoclipApplet.h
deleted
100644 → 0
View file @
8dcfb77d
/****************************************************************************************
* Copyright (c) 2009 Simon Esneault <simon.esneault@gmail.com> *
* *
* This program is free software; you can redistribute it and/or modify it under *
* the terms of the GNU General Public License as published by the Free Software *
* Foundation; either version 2 of the License, or (at your option) any later *
* version. *
* *
* This program is distributed in the hope that it will be useful, but WITHOUT ANY *
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A *
* PARTICULAR PURPOSE. See the GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along with *
* this program. If not, see <http://www.gnu.org/licenses/>. *
****************************************************************************************/
//Plasma applet for showing video from youtube dailymotion and vimeo in the CV
#ifndef VIDEOCLIP_APPLET_H
#define VIDEOCLIP_APPLET_H
#include
"context/Applet.h"
#include
"context/DataEngine.h"
#include
"core/support/SmartPointerList.h"
#include
"VideoclipInfo.h"
#include
"ui_videoclipSettings.h"
#include
<Phonon/Path>
#include
<Phonon/MediaObject>
#include
<QWeakPointer>
// Forward declarations
namespace
Phonon
{
class
MediaObject
;
class
Path
;
class
VideoWidget
;
}
namespace
Plasma
{
class
IconWidget
;
class
ScrollWidget
;
}
class
KConfigDialog
;
class
QGraphicsWidget
;
class
QGraphicsLinearLayout
;
class
QGraphicsSceneResizeEvent
;
class
CustomVideoWidget
;
class
VideoItemButton
;
/** VideoclipApplet will display videoclip from the Internet, relative to the current playing song
* If a video is detected in the playlist, it will also play the video inside the VideoWidget.
*/
class
VideoclipApplet
:
public
Context
::
Applet
{
Q_OBJECT
public:
VideoclipApplet
(
QObject
*
parent
,
const
QVariantList
&
args
);
~
VideoclipApplet
();
virtual
void
constraintsEvent
(
Plasma
::
Constraints
constraints
=
Plasma
::
AllConstraints
);
public
slots
:
virtual
void
init
();
virtual
void
dataUpdated
(
const
QString
&
name
,
const
Plasma
::
DataEngine
::
Data
&
data
);
void
connectSource
(
const
QString
&
source
);
// right click context menu
void
appendVideoClip
(
VideoInfo
*
info
);
void
queueVideoClip
(
VideoInfo
*
info
);
void
appendPlayVideoClip
(
VideoInfo
*
info
);
void
saveSettings
();
protected:
void
createConfigurationInterface
(
KConfigDialog
*
parent
);
virtual
void
resizeEvent
(
QGraphicsSceneResizeEvent
*
event
);
private
slots
:
void
trackPlaying
();
void
stateChanged
(
Phonon
::
State
,
Phonon
::
State
);
void
stopped
();
private:
QWeakPointer
<
CustomVideoWidget
>
m_videoWidget
;
SmartPointerList
<
VideoItemButton
>
m_videoItemButtons
;
// The two big container, only one who need a resize
Plasma
::
ScrollWidget
*
m_scroll
;
QGraphicsLinearLayout
*
m_scrollLayout
;
QGraphicsLinearLayout
*
m_layout
;
QPixmap
m_pixYoutube
;
QPixmap
m_pixDailymotion
;
QPixmap
m_pixVimeo
;
Plasma
::
IconWidget
*
m_settingsIcon
;
Ui
::
videoclipSettings
ui_Settings
;
bool
m_youtubeHQ
;
};
#endif
/* VIDEOCLIP_APPLET_H */
src/context/applets/videoclip/amarok-context-applet-videoclip.desktop
deleted
100644 → 0
View file @
8dcfb77d
[Desktop Entry]
Name=Videoclip
Name[bg]=Видеоклип
Name[bs]=Video isječak
Name[ca]=Videoclip
Name[ca@valencia]=Videoclip
Name[cs]=Videoklip
Name[csb]=Teledisk
Name[da]=Videoklip
Name[de]=Videoclip
Name[el]=Βίντεο κλιπ
Name[en_GB]=Videoclip
Name[es]=Videoclip
Name[et]=Videoklipp
Name[eu]=Bideo-klipa
Name[fi]=Videoleike
Name[ga]=Gearrthóg Fhíse
Name[gl]=Videoclip
Name[hu]=Videoklip
Name[is]=Vídeóbútur
Name[it]=Filmati
Name[ja]=ビデオクリップ
Name[km]=ឈុតវីដេអូ
Name[ko]=동영상 클립
Name[lt]=Videoklipas
Name[lv]=Videoklips
Name[nb]=Videoklipp
Name[nds]=Musikvideo
Name[nl]=Videoclip
Name[nn]=Videoklipp
Name[pa]=ਵੀਡਿਓਕਲਿੱਪ
Name[pl]=Klip Wideo
Name[pt]='Clip' de Vídeo
Name[pt_BR]=Clipe de vídeo
Name[ro]=Videoclip
Name[ru]=Видеоклип
Name[sk]=Videoklip
Name[sl]=Video posnetek
Name[sq]=Videoklip
Name[sr]=Видео исечак
Name[sr@ijekavian]=Видео исјечак
Name[sr@ijekavianlatin]=Video isječak
Name[sr@latin]=Video isečak
Name[sv]=Videoklipp
Name[th]=คลิปวีดิโอ
Name[tr]=Video Klibi
Name[uk]=Відеокліп
Name[wa]=Clip videyo
Name[x-test]=xxVideoclipxx
Name[zh_CN]=视频剪辑
Name[zh_TW]=影片剪輯
Type=Service
Icon=videoclip-amarok
ServiceTypes=Plasma/Applet
X-KDE-Library=amarok_context_applet_videoclip
X-KDE-PluginInfo-Author=Simon Esneault
X-KDE-PluginInfo-Email=simon.esneault@gmail.com
X-KDE-PluginInfo-Name=videoclip
X-KDE-PluginInfo-Version=pre0.1
X-KDE-PluginInfo-Website=
X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=true
X-KDE-ParentApp=amarok
X-KDE-PluginInfo-Category=Current
src/context/applets/videoclip/amarok-videoclip-dailymotion.png
deleted
100644 → 0
View file @
8dcfb77d
2.42 KB
src/context/applets/videoclip/amarok-videoclip-vimeo.png
deleted
100644 → 0
View file @
8dcfb77d
2.69 KB
src/context/applets/videoclip/amarok-videoclip-youtube.png
deleted