author | simon <simon> | 2002-12-02 17:22:29 (UTC) |
---|---|---|
committer | simon <simon> | 2002-12-02 17:22:29 (UTC) |
commit | 28f9d0587b2ee6a6a9467f658567a45ab7e95b94 (patch) (unidiff) | |
tree | 509fcf475ca55dde3d64f6719a2a751c8c4a88dc | |
parent | a79674bdbba0093f4bba78f47905b67fd2f32a8f (diff) | |
download | opie-28f9d0587b2ee6a6a9467f658567a45ab7e95b94.zip opie-28f9d0587b2ee6a6a9467f658567a45ab7e95b94.tar.gz opie-28f9d0587b2ee6a6a9467f658567a45ab7e95b94.tar.bz2 |
- removed the playlistToggled signal, as it is never emitted
- resulted in some simplification in playlistwidget
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayerstate.h | 1 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 14 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.h | 1 |
3 files changed, 1 insertions, 15 deletions
diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.h b/noncore/multimedia/opieplayer2/mediaplayerstate.h index d15894f..7a80ad8 100644 --- a/noncore/multimedia/opieplayer2/mediaplayerstate.h +++ b/noncore/multimedia/opieplayer2/mediaplayerstate.h | |||
@@ -93,25 +93,24 @@ public slots: | |||
93 | void toggleShuffled(); | 93 | void toggleShuffled(); |
94 | void togglePaused(); | 94 | void togglePaused(); |
95 | void togglePlaying(); | 95 | void togglePlaying(); |
96 | void toggleBlank(); | 96 | void toggleBlank(); |
97 | void writeConfig( Config& cfg ) const; | 97 | void writeConfig( Config& cfg ) const; |
98 | 98 | ||
99 | 99 | ||
100 | signals: | 100 | signals: |
101 | void fullscreenToggled( bool ); | 101 | void fullscreenToggled( bool ); |
102 | void scaledToggled( bool ); | 102 | void scaledToggled( bool ); |
103 | void loopingToggled( bool ); | 103 | void loopingToggled( bool ); |
104 | void shuffledToggled( bool ); | 104 | void shuffledToggled( bool ); |
105 | void playlistToggled( bool ); | ||
106 | void pausedToggled( bool ); | 105 | void pausedToggled( bool ); |
107 | void playingToggled( bool ); | 106 | void playingToggled( bool ); |
108 | void stopToggled( bool ); | 107 | void stopToggled( bool ); |
109 | void positionChanged( long ); // When the slider is moved | 108 | void positionChanged( long ); // When the slider is moved |
110 | void positionUpdated( long ); // When the media file progresses | 109 | void positionUpdated( long ); // When the media file progresses |
111 | void lengthChanged( long ); | 110 | void lengthChanged( long ); |
112 | void viewChanged( char ); | 111 | void viewChanged( char ); |
113 | void isSeekableToggled( bool ); | 112 | void isSeekableToggled( bool ); |
114 | void blankToggled( bool ); | 113 | void blankToggled( bool ); |
115 | void videoGammaChanged( int ); | 114 | void videoGammaChanged( int ); |
116 | void prev(); | 115 | void prev(); |
117 | void next(); | 116 | void next(); |
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index 6355bec..5b277cc 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp | |||
@@ -138,26 +138,24 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl ) | |||
138 | connect( videoView, SIGNAL( doubleClicked( QListViewItem *) ), | 138 | connect( videoView, SIGNAL( doubleClicked( QListViewItem *) ), |
139 | this, SLOT( addToSelection( QListViewItem *) ) ); | 139 | this, SLOT( addToSelection( QListViewItem *) ) ); |
140 | connect( playLists, SIGNAL( fileSelected( const DocLnk &) ), | 140 | connect( playLists, SIGNAL( fileSelected( const DocLnk &) ), |
141 | this, SLOT( loadList( const DocLnk & ) ) ); | 141 | this, SLOT( loadList( const DocLnk & ) ) ); |
142 | connect( tabWidget, SIGNAL ( currentChanged(QWidget*) ), | 142 | connect( tabWidget, SIGNAL ( currentChanged(QWidget*) ), |
143 | this, SLOT( tabChanged( QWidget* ) ) ); | 143 | this, SLOT( tabChanged( QWidget* ) ) ); |
144 | connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), | 144 | connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), |
145 | d->tbPlay, SLOT( setOn( bool ) ) ); | 145 | d->tbPlay, SLOT( setOn( bool ) ) ); |
146 | connect( mediaPlayerState, SIGNAL( loopingToggled( bool ) ), | 146 | connect( mediaPlayerState, SIGNAL( loopingToggled( bool ) ), |
147 | d->tbLoop, SLOT( setOn( bool ) ) ); | 147 | d->tbLoop, SLOT( setOn( bool ) ) ); |
148 | connect( mediaPlayerState, SIGNAL( shuffledToggled( bool ) ), | 148 | connect( mediaPlayerState, SIGNAL( shuffledToggled( bool ) ), |
149 | d->tbShuffle, SLOT( setOn( bool ) ) ); | 149 | d->tbShuffle, SLOT( setOn( bool ) ) ); |
150 | connect( mediaPlayerState, SIGNAL( playlistToggled( bool ) ), | ||
151 | this, SLOT( setPlaylist( bool ) ) ); | ||
152 | connect( d->selectedFiles, SIGNAL( doubleClicked( QListViewItem *) ), | 150 | connect( d->selectedFiles, SIGNAL( doubleClicked( QListViewItem *) ), |
153 | this, SLOT( playIt( QListViewItem *) ) ); | 151 | this, SLOT( playIt( QListViewItem *) ) ); |
154 | connect ( gammaSlider, SIGNAL( valueChanged( int ) ), | 152 | connect ( gammaSlider, SIGNAL( valueChanged( int ) ), |
155 | mediaPlayerState, SLOT( setVideoGamma( int ) ) ); | 153 | mediaPlayerState, SLOT( setVideoGamma( int ) ) ); |
156 | 154 | ||
157 | // see which skins are installed | 155 | // see which skins are installed |
158 | videoScan=false; | 156 | videoScan=false; |
159 | audioScan=false; | 157 | audioScan=false; |
160 | audioPopulated=false; | 158 | audioPopulated=false; |
161 | videoPopulated=false; | 159 | videoPopulated=false; |
162 | populateSkinsMenu(); | 160 | populateSkinsMenu(); |
163 | initializeStates(); | 161 | initializeStates(); |
@@ -168,25 +166,25 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl ) | |||
168 | } | 166 | } |
169 | 167 | ||
170 | 168 | ||
171 | PlayListWidget::~PlayListWidget() { | 169 | PlayListWidget::~PlayListWidget() { |
172 | delete d; | 170 | delete d; |
173 | } | 171 | } |
174 | 172 | ||
175 | 173 | ||
176 | void PlayListWidget::initializeStates() { | 174 | void PlayListWidget::initializeStates() { |
177 | d->tbPlay->setOn( mediaPlayerState->isPlaying() ); | 175 | d->tbPlay->setOn( mediaPlayerState->isPlaying() ); |
178 | d->tbLoop->setOn( mediaPlayerState->isLooping() ); | 176 | d->tbLoop->setOn( mediaPlayerState->isLooping() ); |
179 | d->tbShuffle->setOn( mediaPlayerState->isShuffled() ); | 177 | d->tbShuffle->setOn( mediaPlayerState->isShuffled() ); |
180 | setPlaylist( true ); | 178 | d->playListFrame->show(); |
181 | } | 179 | } |
182 | 180 | ||
183 | void PlayListWidget::writeDefaultPlaylist() { | 181 | void PlayListWidget::writeDefaultPlaylist() { |
184 | 182 | ||
185 | Config config( "OpiePlayer" ); | 183 | Config config( "OpiePlayer" ); |
186 | config.setGroup( "PlayList" ); | 184 | config.setGroup( "PlayList" ); |
187 | QString filename=QPEApplication::documentDir() + "/default.m3u"; | 185 | QString filename=QPEApplication::documentDir() + "/default.m3u"; |
188 | QString currentString = config.readEntry( "CurrentPlaylist", filename); | 186 | QString currentString = config.readEntry( "CurrentPlaylist", filename); |
189 | if( currentString == filename) { | 187 | if( currentString == filename) { |
190 | Om3u *m3uList; | 188 | Om3u *m3uList; |
191 | // qDebug("<<<<<<<<<<<<<default>>>>>>>>>>>>>>>>>>>"); | 189 | // qDebug("<<<<<<<<<<<<<default>>>>>>>>>>>>>>>>>>>"); |
192 | if( d->selectedFiles->first() ) { | 190 | if( d->selectedFiles->first() ) { |
@@ -508,34 +506,24 @@ void PlayListWidget::loadList( const DocLnk & lnk) { | |||
508 | QString name = lnk.name(); | 506 | QString name = lnk.name(); |
509 | // qDebug("<<<<<<<<<<<<<<<<<<<<<<<<currentList is "+name); | 507 | // qDebug("<<<<<<<<<<<<<<<<<<<<<<<<currentList is "+name); |
510 | 508 | ||
511 | if( name.length()>0) { | 509 | if( name.length()>0) { |
512 | setCaption("OpiePlayer: "+name); | 510 | setCaption("OpiePlayer: "+name); |
513 | // qDebug("<<<<<<<<<<<<load list "+ lnk.file()); | 511 | // qDebug("<<<<<<<<<<<<load list "+ lnk.file()); |
514 | clearList(); | 512 | clearList(); |
515 | readm3u(lnk.file()); | 513 | readm3u(lnk.file()); |
516 | tabWidget->setCurrentPage(0); | 514 | tabWidget->setCurrentPage(0); |
517 | } | 515 | } |
518 | } | 516 | } |
519 | 517 | ||
520 | |||
521 | void PlayListWidget::setPlaylist( bool shown ) { | ||
522 | if ( shown ) { | ||
523 | d->playListFrame->show(); | ||
524 | } else { | ||
525 | d->playListFrame->hide(); | ||
526 | } | ||
527 | } | ||
528 | |||
529 | |||
530 | void PlayListWidget::addSelected() { | 518 | void PlayListWidget::addSelected() { |
531 | assert( inFileListMode() ); | 519 | assert( inFileListMode() ); |
532 | 520 | ||
533 | QListView *fileListView = currentFileListView(); | 521 | QListView *fileListView = currentFileListView(); |
534 | QListViewItemIterator it( fileListView ); | 522 | QListViewItemIterator it( fileListView ); |
535 | for ( ; it.current(); ++it ) | 523 | for ( ; it.current(); ++it ) |
536 | if ( it.current()->isSelected() ) { | 524 | if ( it.current()->isSelected() ) { |
537 | QString filename = it.current()->text(3); | 525 | QString filename = it.current()->text(3); |
538 | 526 | ||
539 | DocLnk lnk; | 527 | DocLnk lnk; |
540 | lnk.setName( QFileInfo( filename ).baseName() ); //sets name | 528 | lnk.setName( QFileInfo( filename ).baseName() ); //sets name |
541 | lnk.setFile( filename ); //sets file name | 529 | lnk.setFile( filename ); //sets file name |
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.h b/noncore/multimedia/opieplayer2/playlistwidget.h index 511a192..fa2837a 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.h +++ b/noncore/multimedia/opieplayer2/playlistwidget.h | |||
@@ -110,25 +110,24 @@ private: | |||
110 | private slots: | 110 | private slots: |
111 | void populateSkinsMenu(); | 111 | void populateSkinsMenu(); |
112 | void skinsMenuActivated(int); | 112 | void skinsMenuActivated(int); |
113 | void pmViewActivated(int); | 113 | void pmViewActivated(int); |
114 | void writem3u(); | 114 | void writem3u(); |
115 | void writeCurrentM3u(); | 115 | void writeCurrentM3u(); |
116 | void scanForAudio(); | 116 | void scanForAudio(); |
117 | void scanForVideo(); | 117 | void scanForVideo(); |
118 | void openFile(); | 118 | void openFile(); |
119 | void setDocument( const QString& fileref ); | 119 | void setDocument( const QString& fileref ); |
120 | void addToSelection( const DocLnk& ); // Add a media file to the playlist | 120 | void addToSelection( const DocLnk& ); // Add a media file to the playlist |
121 | void addToSelection( QListViewItem* ); // Add a media file to the playlist | 121 | void addToSelection( QListViewItem* ); // Add a media file to the playlist |
122 | void setPlaylist( bool ); // Show/Hide the playlist | ||
123 | void clearList(); | 122 | void clearList(); |
124 | void addAllToList(); | 123 | void addAllToList(); |
125 | void addAllMusicToList(); | 124 | void addAllMusicToList(); |
126 | void addAllVideoToList(); | 125 | void addAllVideoToList(); |
127 | void saveList(); // Save the playlist | 126 | void saveList(); // Save the playlist |
128 | void loadList( const DocLnk &); // Load a playlist | 127 | void loadList( const DocLnk &); // Load a playlist |
129 | void playIt( QListViewItem *); | 128 | void playIt( QListViewItem *); |
130 | void btnPlay(bool); | 129 | void btnPlay(bool); |
131 | void deletePlaylist(); | 130 | void deletePlaylist(); |
132 | void addSelected(); | 131 | void addSelected(); |
133 | void removeSelected(); | 132 | void removeSelected(); |
134 | void tabChanged(QWidget*); | 133 | void tabChanged(QWidget*); |