Diffstat (limited to 'noncore/multimedia/opieplayer2') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/main.cpp | 11 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayer.cpp | 39 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayer.h | 9 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 14 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.h | 3 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/xinecontrol.cpp | 5 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/xinecontrol.h | 6 |
7 files changed, 56 insertions, 31 deletions
diff --git a/noncore/multimedia/opieplayer2/main.cpp b/noncore/multimedia/opieplayer2/main.cpp index 7d11ca0..7fc7b94 100644 --- a/noncore/multimedia/opieplayer2/main.cpp +++ b/noncore/multimedia/opieplayer2/main.cpp | |||
@@ -4,4 +4,2 @@ | |||
4 | #include "playlistwidget.h" | 4 | #include "playlistwidget.h" |
5 | #include "audiowidget.h" | ||
6 | #include "videowidget.h" | ||
7 | #include "mediaplayer.h" | 5 | #include "mediaplayer.h" |
@@ -9,4 +7,2 @@ | |||
9 | PlayListWidget *playList; | 7 | PlayListWidget *playList; |
10 | AudioWidget *audioUI; | ||
11 | VideoWidget *videoUI; | ||
12 | 8 | ||
@@ -19,8 +15,5 @@ int main(int argc, char **argv) { | |||
19 | pl.showMaximized(); | 15 | pl.showMaximized(); |
20 | AudioWidget aw( st, 0, "audioUI" ); | ||
21 | audioUI = &aw; | ||
22 | VideoWidget vw( st, 0, "videoUI" ); | ||
23 | videoUI = &vw; | ||
24 | a.processEvents(); | ||
25 | MediaPlayer mp( st, 0, "mediaPlayer" ); | 16 | MediaPlayer mp( st, 0, "mediaPlayer" ); |
17 | QObject::connect( &pl, SIGNAL( skinSelected() ), | ||
18 | &mp, SLOT( recreateAudioAndVideoWidgets() ) ); | ||
26 | 19 | ||
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp index eccb5d9..a9c74c4 100644 --- a/noncore/multimedia/opieplayer2/mediaplayer.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp | |||
@@ -26,3 +26,2 @@ | |||
26 | 26 | ||
27 | extern AudioWidget *audioUI; | ||
28 | extern VideoWidget *videoUI; | 27 | extern VideoWidget *videoUI; |
@@ -36,2 +35,7 @@ MediaPlayer::MediaPlayer( MediaPlayerState &_mediaPlayerState, QObject *parent, | |||
36 | 35 | ||
36 | audioUI = 0; | ||
37 | videoUI = 0; | ||
38 | xineControl = 0; | ||
39 | recreateAudioAndVideoWidgets(); | ||
40 | |||
37 | fd=-1;fl=-1; | 41 | fd=-1;fl=-1; |
@@ -51,14 +55,3 @@ MediaPlayer::MediaPlayer( MediaPlayerState &_mediaPlayerState, QObject *parent, | |||
51 | 55 | ||
52 | connect( audioUI, SIGNAL( moreClicked() ), this, SLOT( startIncreasingVolume() ) ); | ||
53 | connect( audioUI, SIGNAL( lessClicked() ), this, SLOT( startDecreasingVolume() ) ); | ||
54 | connect( audioUI, SIGNAL( moreReleased() ), this, SLOT( stopChangingVolume() ) ); | ||
55 | connect( audioUI, SIGNAL( lessReleased() ), this, SLOT( stopChangingVolume() ) ); | ||
56 | |||
57 | connect( videoUI, SIGNAL( moreClicked() ), this, SLOT( startIncreasingVolume() ) ); | ||
58 | connect( videoUI, SIGNAL( lessClicked() ), this, SLOT( startDecreasingVolume() ) ); | ||
59 | connect( videoUI, SIGNAL( moreReleased() ), this, SLOT( stopChangingVolume() ) ); | ||
60 | connect( videoUI, SIGNAL( lessReleased() ), this, SLOT( stopChangingVolume() ) ); | ||
61 | |||
62 | volControl = new VolumeControl; | 56 | volControl = new VolumeControl; |
63 | xineControl = new XineControl( mediaPlayerState ); | ||
64 | Config cfg( "OpiePlayer" ); | 57 | Config cfg( "OpiePlayer" ); |
@@ -353 +346,23 @@ void MediaPlayer::cleanUp() {// this happens on closing | |||
353 | } | 346 | } |
347 | |||
348 | void MediaPlayer::recreateAudioAndVideoWidgets() | ||
349 | { | ||
350 | delete xineControl; | ||
351 | delete audioUI; | ||
352 | delete videoUI; | ||
353 | audioUI = new AudioWidget( mediaPlayerState, 0, "audioUI" ); | ||
354 | videoUI = new VideoWidget( mediaPlayerState, 0, "videoUI" ); | ||
355 | |||
356 | connect( audioUI, SIGNAL( moreClicked() ), this, SLOT( startIncreasingVolume() ) ); | ||
357 | connect( audioUI, SIGNAL( lessClicked() ), this, SLOT( startDecreasingVolume() ) ); | ||
358 | connect( audioUI, SIGNAL( moreReleased() ), this, SLOT( stopChangingVolume() ) ); | ||
359 | connect( audioUI, SIGNAL( lessReleased() ), this, SLOT( stopChangingVolume() ) ); | ||
360 | |||
361 | connect( videoUI, SIGNAL( moreClicked() ), this, SLOT( startIncreasingVolume() ) ); | ||
362 | connect( videoUI, SIGNAL( lessClicked() ), this, SLOT( startDecreasingVolume() ) ); | ||
363 | connect( videoUI, SIGNAL( moreReleased() ), this, SLOT( stopChangingVolume() ) ); | ||
364 | connect( videoUI, SIGNAL( lessReleased() ), this, SLOT( stopChangingVolume() ) ); | ||
365 | |||
366 | xineControl = new XineControl( videoUI, mediaPlayerState ); | ||
367 | } | ||
368 | |||
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.h b/noncore/multimedia/opieplayer2/mediaplayer.h index 6aeac7c..0d6f722 100644 --- a/noncore/multimedia/opieplayer2/mediaplayer.h +++ b/noncore/multimedia/opieplayer2/mediaplayer.h | |||
@@ -44,2 +44,4 @@ class VolumeControl; | |||
44 | class MediaPlayerState; | 44 | class MediaPlayerState; |
45 | class AudioWidget; | ||
46 | class VideoWidget; | ||
45 | 47 | ||
@@ -50,2 +52,6 @@ public: | |||
50 | ~MediaPlayer(); | 52 | ~MediaPlayer(); |
53 | |||
54 | public slots: | ||
55 | void recreateAudioAndVideoWidgets(); | ||
56 | |||
51 | private slots: | 57 | private slots: |
@@ -66,2 +72,3 @@ protected: | |||
66 | private: | 72 | private: |
73 | |||
67 | bool isBlanked, l, r; | 74 | bool isBlanked, l, r; |
@@ -72,2 +79,4 @@ private: | |||
72 | MediaPlayerState &mediaPlayerState; | 79 | MediaPlayerState &mediaPlayerState; |
80 | AudioWidget *audioUI; | ||
81 | VideoWidget *videoUI; | ||
73 | }; | 82 | }; |
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index 7ba342b..6bda71e 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp | |||
@@ -1097,8 +1097,10 @@ void PlayListWidget::skinsMenuActivated( int item ) { | |||
1097 | 1097 | ||
1098 | Config cfg( "OpiePlayer" ); | 1098 | { |
1099 | cfg.setGroup("Options"); | 1099 | Config cfg( "OpiePlayer" ); |
1100 | cfg.writeEntry("Skin", skinsMenu->text( item ) ); | 1100 | cfg.setGroup("Options"); |
1101 | QMessageBox::warning( this, tr( "OpiePlayer" ), | 1101 | cfg.writeEntry("Skin", skinsMenu->text( item ) ); |
1102 | tr( "You must <b>restart</b> Opieplayer<br>to see your changes." ) ); | 1102 | } |
1103 | } | 1103 | |
1104 | emit skinSelected(); | ||
1105 | } | ||
1104 | 1106 | ||
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.h b/noncore/multimedia/opieplayer2/playlistwidget.h index 3f52e63..ad5c9a3 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.h +++ b/noncore/multimedia/opieplayer2/playlistwidget.h | |||
@@ -96,2 +96,5 @@ protected: | |||
96 | 96 | ||
97 | signals: | ||
98 | void skinSelected(); | ||
99 | |||
97 | private: | 100 | private: |
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp index 071ef7c..b4ae783 100644 --- a/noncore/multimedia/opieplayer2/xinecontrol.cpp +++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp | |||
@@ -42,5 +42,4 @@ | |||
42 | 42 | ||
43 | extern VideoWidget *videoUI; | 43 | XineControl::XineControl( VideoWidget *videoWidget, MediaPlayerState &_mediaPlayerState, QObject *parent, const char *name ) |
44 | XineControl::XineControl( MediaPlayerState &_mediaPlayerState, QObject *parent, const char *name ) | 44 | : QObject( parent, name ), mediaPlayerState( _mediaPlayerState ), videoUI( videoWidget ) { |
45 | : QObject( parent, name ), mediaPlayerState( _mediaPlayerState ) { | ||
46 | 45 | ||
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.h b/noncore/multimedia/opieplayer2/xinecontrol.h index 00486f2..24e966b 100644 --- a/noncore/multimedia/opieplayer2/xinecontrol.h +++ b/noncore/multimedia/opieplayer2/xinecontrol.h | |||
@@ -41,2 +41,4 @@ | |||
41 | 41 | ||
42 | class VideoWidget; | ||
43 | |||
42 | class XineControl : public QObject { | 44 | class XineControl : public QObject { |
@@ -44,3 +46,3 @@ class XineControl : public QObject { | |||
44 | public: | 46 | public: |
45 | XineControl( MediaPlayerState &_mediaPlayerState, QObject *parent = 0, const char *name =0 ); | 47 | XineControl( VideoWidget *videoWidget, MediaPlayerState &_mediaPlayerState, QObject *parent = 0, const char *name =0 ); |
46 | ~XineControl(); | 48 | ~XineControl(); |
@@ -115,2 +117,4 @@ signals: | |||
115 | 117 | ||
118 | private: | ||
119 | VideoWidget *videoUI; | ||
116 | }; | 120 | }; |