~ubuntu-branches/ubuntu/trusty/ktorrent/trusty

« back to all changes in this revision

Viewing changes to .pc/kubuntu_01_fix_videowidget_include.diff/plugins/mediaplayer/videowidget.h

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2010-02-28 23:22:08 UTC
  • mfrom: (0.7.15 sid)
  • Revision ID: james.westby@ubuntu.com-20100228232208-6g2xwvd02kfv6lxf
Tags: 3.3.4+dfsg.1-1ubuntu1
* Merge with Debian, remaining changes:
  - Used versioned boost build-depend
  - Include /usr/lib/kubuntu-desktop-i18n/debhelper/kubuntu.mk in
    debian/rules for translations support
  - Add kubuntu_01_fix_videowidget_include.diff to fix FTBS

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
 *   Copyright (C) 2008 by Joris Guisson and Ivan Vasic                    *
 
3
 *   joris.guisson@gmail.com                                               *
 
4
 *   ivasic@gmail.com                                                      *
 
5
 *                                                                         *
 
6
 *   This program is free software; you can redistribute it and/or modify  *
 
7
 *   it under the terms of the GNU General Public License as published by  *
 
8
 *   the Free Software Foundation; either version 2 of the License, or     *
 
9
 *   (at your option) any later version.                                   *
 
10
 *                                                                         *
 
11
 *   This program is distributed in the hope that it will be useful,       *
 
12
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 
13
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 
14
 *   GNU General Public License for more details.                          *
 
15
 *                                                                         *
 
16
 *   You should have received a copy of the GNU General Public License     *
 
17
 *   along with this program; if not, write to the                         *
 
18
 *   Free Software Foundation, Inc.,                                       *
 
19
 *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.          *
 
20
 ***************************************************************************/
 
21
#ifndef KTVIDEOWIDGET_H
 
22
#define KTVIDEOWIDGET_H
 
23
 
 
24
#include <QWidget>
 
25
#include <Phonon/VideoWidget>
 
26
#include <Phonon/MediaObject>
 
27
#include <Phonon/SeekSlider>
 
28
#include <Phonon/VolumeSlider>
 
29
 
 
30
class QAction;
 
31
class KToolBar;
 
32
 
 
33
namespace kt
 
34
{
 
35
        class MediaPlayer;
 
36
 
 
37
        /**
 
38
         * Widget to display a video
 
39
         * @author Joris Guisson
 
40
        */
 
41
        class VideoWidget : public QWidget
 
42
        {
 
43
                Q_OBJECT
 
44
        public:
 
45
                VideoWidget(MediaPlayer* player,QWidget* parent);
 
46
                virtual ~VideoWidget();
 
47
                
 
48
                virtual void mouseMoveEvent(QMouseEvent* event);
 
49
                
 
50
                /**
 
51
                 * Make the widget full screen or not.
 
52
                 * @param on 
 
53
                 */
 
54
                void setFullScreen(bool on);
 
55
                
 
56
        private slots:
 
57
                void play();
 
58
                void pause();
 
59
                void stop();
 
60
                void setControlsVisible(bool on);
 
61
                void onStateChanged(Phonon::State cur,Phonon::State old);
 
62
                
 
63
        signals:
 
64
                void toggleFullScreen(bool on);
 
65
                
 
66
        private:
 
67
                void inhibitScreenSaver(bool on);
 
68
 
 
69
        private:
 
70
                Phonon::VideoWidget* video;
 
71
                MediaPlayer* player;
 
72
                Phonon::SeekSlider* slider;
 
73
                KToolBar* tb;
 
74
                QAction* play_act;
 
75
                QAction* pause_act;
 
76
                QAction* stop_act;
 
77
                Phonon::VolumeSlider* volume;
 
78
                bool fullscreen;
 
79
                uint screensaver_cookie;
 
80
                int powermanagement_cookie;
 
81
        };
 
82
 
 
83
}
 
84
 
 
85
#endif