-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 4 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index ce9faac..11a7b5c 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp | |||
@@ -953,218 +953,218 @@ void PlayListWidget::writeCurrentM3u() { | |||
953 | qDebug("writing to current m3u"); | 953 | qDebug("writing to current m3u"); |
954 | Config cfg( "OpiePlayer" ); | 954 | Config cfg( "OpiePlayer" ); |
955 | cfg.setGroup("PlayList"); | 955 | cfg.setGroup("PlayList"); |
956 | QString currentPlaylist = cfg.readEntry("CurrentPlaylist","default"); | 956 | QString currentPlaylist = cfg.readEntry("CurrentPlaylist","default"); |
957 | 957 | ||
958 | Om3u *m3uList; | 958 | Om3u *m3uList; |
959 | m3uList = new Om3u( currentPlaylist, IO_ReadWrite | IO_Truncate ); | 959 | m3uList = new Om3u( currentPlaylist, IO_ReadWrite | IO_Truncate ); |
960 | if( d->selectedFiles->first()) { | 960 | if( d->selectedFiles->first()) { |
961 | 961 | ||
962 | do { | 962 | do { |
963 | // qDebug( "add writeCurrentM3u " +d->selectedFiles->current()->file()); | 963 | // qDebug( "add writeCurrentM3u " +d->selectedFiles->current()->file()); |
964 | m3uList->add( d->selectedFiles->current()->file() ); | 964 | m3uList->add( d->selectedFiles->current()->file() ); |
965 | } | 965 | } |
966 | while ( d->selectedFiles->next() ); | 966 | while ( d->selectedFiles->next() ); |
967 | // qDebug( "<<<<<<<<<<<<>>>>>>>>>>>>>>>>>" ); | 967 | // qDebug( "<<<<<<<<<<<<>>>>>>>>>>>>>>>>>" ); |
968 | m3uList->write(); | 968 | m3uList->write(); |
969 | m3uList->close(); | 969 | m3uList->close(); |
970 | 970 | ||
971 | if(m3uList) delete m3uList; | 971 | if(m3uList) delete m3uList; |
972 | } | 972 | } |
973 | 973 | ||
974 | } | 974 | } |
975 | 975 | ||
976 | /* | 976 | /* |
977 | writes current playlist to m3u file */ | 977 | writes current playlist to m3u file */ |
978 | void PlayListWidget::writem3u() { | 978 | void PlayListWidget::writem3u() { |
979 | InputDialog *fileDlg; | 979 | InputDialog *fileDlg; |
980 | fileDlg = new InputDialog( this, tr( "Save m3u Playlist " ), TRUE, 0); | 980 | fileDlg = new InputDialog( this, tr( "Save m3u Playlist " ), TRUE, 0); |
981 | fileDlg->exec(); | 981 | fileDlg->exec(); |
982 | QString name, filename, list; | 982 | QString name, filename, list; |
983 | Om3u *m3uList; | 983 | Om3u *m3uList; |
984 | 984 | ||
985 | if( fileDlg->result() == 1 ) { | 985 | if( fileDlg->result() == 1 ) { |
986 | name = fileDlg->text(); | 986 | name = fileDlg->text(); |
987 | // qDebug( filename ); | 987 | // qDebug( filename ); |
988 | 988 | ||
989 | if( name.left( 1) != "/" ) { | 989 | if( name.left( 1) != "/" ) { |
990 | filename = QPEApplication::documentDir() + "/" + name; | 990 | filename = QPEApplication::documentDir() + "/" + name; |
991 | } | 991 | } |
992 | 992 | ||
993 | if( name.right( 3 ) != "m3u" ) { | 993 | if( name.right( 3 ) != "m3u" ) { |
994 | filename = QPEApplication::documentDir() + "/" +name+".m3u"; | 994 | filename = QPEApplication::documentDir() + "/" +name+".m3u"; |
995 | } | 995 | } |
996 | 996 | ||
997 | if( d->selectedFiles->first()) { | 997 | if( d->selectedFiles->first()) { |
998 | m3uList = new Om3u(filename, IO_ReadWrite); | 998 | m3uList = new Om3u(filename, IO_ReadWrite); |
999 | 999 | ||
1000 | do { | 1000 | do { |
1001 | m3uList->add( d->selectedFiles->current()->file()); | 1001 | m3uList->add( d->selectedFiles->current()->file()); |
1002 | } | 1002 | } |
1003 | while ( d->selectedFiles->next() ); | 1003 | while ( d->selectedFiles->next() ); |
1004 | // qDebug( list ); | 1004 | // qDebug( list ); |
1005 | m3uList->write(); | 1005 | m3uList->write(); |
1006 | m3uList->close(); | 1006 | m3uList->close(); |
1007 | if(m3uList) delete m3uList; | 1007 | if(m3uList) delete m3uList; |
1008 | 1008 | ||
1009 | if(fileDlg) delete fileDlg; | 1009 | if(fileDlg) delete fileDlg; |
1010 | 1010 | ||
1011 | DocLnk lnk; | 1011 | DocLnk lnk; |
1012 | lnk.setFile( filename); | 1012 | lnk.setFile( filename); |
1013 | lnk.setIcon("opieplayer2/playlist2"); | 1013 | lnk.setIcon("opieplayer2/playlist2"); |
1014 | lnk.setName( name); //sets file name | 1014 | lnk.setName( name); //sets file name |
1015 | 1015 | ||
1016 | // qDebug(filename); | 1016 | // qDebug(filename); |
1017 | Config config( "OpiePlayer" ); | 1017 | Config config( "OpiePlayer" ); |
1018 | config.setGroup( "PlayList" ); | 1018 | config.setGroup( "PlayList" ); |
1019 | 1019 | ||
1020 | config.writeEntry("CurrentPlaylist",filename); | 1020 | config.writeEntry("CurrentPlaylist",filename); |
1021 | currentPlayList=filename; | 1021 | currentPlayList=filename; |
1022 | 1022 | ||
1023 | if(!lnk.writeLink()) { | 1023 | if(!lnk.writeLink()) { |
1024 | qDebug("Writing doclink did not work"); | 1024 | qDebug("Writing doclink did not work"); |
1025 | } | 1025 | } |
1026 | 1026 | ||
1027 | setCaption(tr("OpiePlayer: ") + name); | 1027 | setCaption(tr("OpiePlayer: ") + name); |
1028 | } | 1028 | } |
1029 | } | 1029 | } |
1030 | } | 1030 | } |
1031 | 1031 | ||
1032 | void PlayListWidget::keyReleaseEvent( QKeyEvent *e ) { | 1032 | void PlayListWidget::keyReleaseEvent( QKeyEvent *e ) { |
1033 | switch ( e->key() ) { | 1033 | switch ( e->key() ) { |
1034 | ////////////////////////////// Zaurus keys | 1034 | ////////////////////////////// Zaurus keys |
1035 | case Key_F9: //activity | 1035 | case Key_F9: //activity |
1036 | // if(audioUI->isHidden()) | 1036 | // if(audioUI->isHidden()) |
1037 | // audioUI->showMaximized(); | 1037 | // audioUI->showMaximized(); |
1038 | break; | 1038 | break; |
1039 | case Key_F10: //contacts | 1039 | case Key_F10: //contacts |
1040 | // if( videoUI->isHidden()) | 1040 | // if( videoUI->isHidden()) |
1041 | // videoUI->showMaximized(); | 1041 | // videoUI->showMaximized(); |
1042 | break; | 1042 | break; |
1043 | case Key_F11: //menu | 1043 | case Key_F11: //menu |
1044 | break; | 1044 | break; |
1045 | case Key_F12: //home | 1045 | case Key_F12: //home |
1046 | // doBlank(); | 1046 | // doBlank(); |
1047 | break; | 1047 | break; |
1048 | case Key_F13: //mail | 1048 | case Key_F13: //mail |
1049 | // doUnblank(); | 1049 | // doUnblank(); |
1050 | break; | 1050 | break; |
1051 | case Key_Q: //add to playlist | 1051 | case Key_Q: //add to playlist |
1052 | addSelected(); | 1052 | addSelected(); |
1053 | break; | 1053 | break; |
1054 | case Key_R: //remove from playlist | 1054 | case Key_R: //remove from playlist |
1055 | removeSelected(); | 1055 | removeSelected(); |
1056 | break; | 1056 | break; |
1057 | // case Key_P: //play | 1057 | // case Key_P: //play |
1058 | // qDebug("Play"); | 1058 | // qDebug("Play"); |
1059 | // playSelected(); | 1059 | // playSelected(); |
1060 | // break; | 1060 | // break; |
1061 | case Key_Space: | 1061 | case Key_Space: |
1062 | // playSelected(); puh | 1062 | // playSelected(); puh |
1063 | break; | 1063 | break; |
1064 | case Key_1: | 1064 | case Key_1: |
1065 | tabWidget->setCurrentPage( 0 ); | 1065 | tabWidget->setCurrentPage( 0 ); |
1066 | break; | 1066 | break; |
1067 | case Key_2: | 1067 | case Key_2: |
1068 | tabWidget->setCurrentPage( 1 ); | 1068 | tabWidget->setCurrentPage( 1 ); |
1069 | break; | 1069 | break; |
1070 | case Key_3: | 1070 | case Key_3: |
1071 | tabWidget->setCurrentPage( 2 ); | 1071 | tabWidget->setCurrentPage( 2 ); |
1072 | break; | 1072 | break; |
1073 | case Key_4: | 1073 | case Key_4: |
1074 | tabWidget->setCurrentPage( 3 ); | 1074 | tabWidget->setCurrentPage( 3 ); |
1075 | break; | 1075 | break; |
1076 | case Key_Down: | 1076 | case Key_Down: |
1077 | if ( !d->selectedFiles->next() ) | 1077 | if ( !d->selectedFiles->next() ) |
1078 | d->selectedFiles->first(); | 1078 | d->selectedFiles->first(); |
1079 | break; | 1079 | break; |
1080 | case Key_Up: | 1080 | case Key_Up: |
1081 | if ( !d->selectedFiles->prev() ) | 1081 | if ( !d->selectedFiles->prev() ) |
1082 | // d->selectedFiles->last(); | 1082 | // d->selectedFiles->last(); |
1083 | break; | 1083 | break; |
1084 | } | 1084 | } |
1085 | } | 1085 | } |
1086 | 1086 | ||
1087 | void PlayListWidget::pmViewActivated(int index) { | 1087 | void PlayListWidget::pmViewActivated(int index) { |
1088 | // qDebug("%d", index); | 1088 | // qDebug("%d", index); |
1089 | switch(index) { | 1089 | switch(index) { |
1090 | case -16: | 1090 | case -16: |
1091 | { | 1091 | { |
1092 | mediaPlayerState->toggleFullscreen(); | 1092 | mediaPlayerState->toggleFullscreen(); |
1093 | bool b=mediaPlayerState->isFullscreen(); | 1093 | bool b=mediaPlayerState->isFullscreen(); |
1094 | pmView->setItemChecked( index, b); | 1094 | pmView->setItemChecked( index, b); |
1095 | Config cfg( "OpiePlayer" ); | 1095 | Config cfg( "OpiePlayer" ); |
1096 | cfg.writeEntry( "FullScreen", b ); | 1096 | cfg.writeEntry( "FullScreen", b ); |
1097 | } | 1097 | } |
1098 | break; | 1098 | break; |
1099 | }; | 1099 | }; |
1100 | } | 1100 | } |
1101 | 1101 | ||
1102 | void PlayListWidget::populateSkinsMenu() { | 1102 | void PlayListWidget::populateSkinsMenu() { |
1103 | int item = 0; | 1103 | int item = 0; |
1104 | defaultSkinIndex = 0; | 1104 | defaultSkinIndex = 0; |
1105 | QString skinName; | 1105 | QString skinName; |
1106 | Config cfg( "OpiePlayer" ); | 1106 | Config cfg( "OpiePlayer" ); |
1107 | cfg.setGroup("Options" ); | 1107 | cfg.setGroup("Options" ); |
1108 | QString skin = cfg.readEntry( "Skin", "default" ); | 1108 | QString skin = cfg.readEntry( "Skin", "default" ); |
1109 | 1109 | ||
1110 | QDir skinsDir( QPEApplication::qpeDir() + "/pics/opieplayer2/skins" ); | 1110 | QDir skinsDir( QPEApplication::qpeDir() + "/pics/opieplayer2/skins" ); |
1111 | skinsDir.setFilter( QDir::Dirs ); | 1111 | skinsDir.setFilter( QDir::Dirs ); |
1112 | skinsDir.setSorting(QDir::Name ); | 1112 | skinsDir.setSorting(QDir::Name ); |
1113 | const QFileInfoList *skinslist = skinsDir.entryInfoList(); | 1113 | const QFileInfoList *skinslist = skinsDir.entryInfoList(); |
1114 | QFileInfoListIterator it( *skinslist ); | 1114 | QFileInfoListIterator it( *skinslist ); |
1115 | QFileInfo *fi; | 1115 | QFileInfo *fi; |
1116 | while ( ( fi = it.current() ) ) { | 1116 | while ( ( fi = it.current() ) ) { |
1117 | skinName = fi->fileName(); | 1117 | skinName = fi->fileName(); |
1118 | // qDebug( fi->fileName() ); | 1118 | // qDebug( fi->fileName() ); |
1119 | if( skinName != "." && skinName != ".." && skinName !="CVS" ) { | 1119 | if( skinName != "." && skinName != ".." && skinName !="CVS" ) { |
1120 | item = skinsMenu->insertItem( fi->fileName() ) ; | 1120 | item = skinsMenu->insertItem( fi->fileName() ) ; |
1121 | } | 1121 | } |
1122 | if( skinName == "default" ) { | 1122 | if( skinName == "default" ) { |
1123 | defaultSkinIndex = item; | 1123 | defaultSkinIndex = item; |
1124 | } | 1124 | } |
1125 | if( skinName == skin ) { | 1125 | if( skinName == skin ) { |
1126 | skinsMenu->setItemChecked( item, TRUE ); | 1126 | skinsMenu->setItemChecked( item, TRUE ); |
1127 | } | 1127 | } |
1128 | ++it; | 1128 | ++it; |
1129 | } | 1129 | } |
1130 | } | 1130 | } |
1131 | 1131 | ||
1132 | void PlayListWidget::skinsMenuActivated( int item ) { | 1132 | void PlayListWidget::skinsMenuActivated( int item ) { |
1133 | for(unsigned int i = defaultSkinIndex; i > defaultSkinIndex - skinsMenu->count(); i-- ) { | 1133 | for(unsigned int i = defaultSkinIndex; i > defaultSkinIndex - skinsMenu->count(); i-- ) { |
1134 | skinsMenu->setItemChecked( i, FALSE ); | 1134 | skinsMenu->setItemChecked( i, FALSE ); |
1135 | } | 1135 | } |
1136 | skinsMenu->setItemChecked( item, TRUE ); | 1136 | skinsMenu->setItemChecked( item, TRUE ); |
1137 | 1137 | ||
1138 | Config cfg( "OpiePlayer" ); | 1138 | Config cfg( "OpiePlayer" ); |
1139 | cfg.setGroup("Options"); | 1139 | cfg.setGroup("Options"); |
1140 | cfg.writeEntry("Skin", skinsMenu->text( item ) ); | 1140 | cfg.writeEntry("Skin", skinsMenu->text( item ) ); |
1141 | QMessageBox::warning( this, tr( "OpiePlayer" ), | 1141 | QMessageBox::warning( this, tr( "OpiePlayer" ), |
1142 | tr( "You must <b>restart</b> Opieplayer<br>to see your changes." ) ); | 1142 | tr( "You must <b>restart</b> Opieplayer<br>to see your changes." ) ); |
1143 | } | 1143 | } |
1144 | 1144 | ||
1145 | int PlayListWidget::whichList() { | 1145 | int PlayListWidget::whichList() const { |
1146 | return tabWidget->currentPageIndex(); | 1146 | return tabWidget->currentPageIndex(); |
1147 | } | 1147 | } |
1148 | 1148 | ||
1149 | PlayListWidget::TabType PlayListWidget::currentTab() const | 1149 | PlayListWidget::TabType PlayListWidget::currentTab() const |
1150 | { | 1150 | { |
1151 | static const TabType indexToTabType[ NumTabTypes ] = | 1151 | static const TabType indexToTabType[ NumTabTypes ] = |
1152 | { CurrentPlayList, AudioFiles, VideoFiles, PlayLists }; | 1152 | { CurrentPlayList, AudioFiles, VideoFiles, PlayLists }; |
1153 | 1153 | ||
1154 | int index = tabWidget->currentPageIndex(); | 1154 | int index = tabWidget->currentPageIndex(); |
1155 | assert( index < NumTabTypes && index >= 0 ); | 1155 | assert( index < NumTabTypes && index >= 0 ); |
1156 | 1156 | ||
1157 | return indexToTabType[ index ]; | 1157 | return indexToTabType[ index ]; |
1158 | } | 1158 | } |
1159 | 1159 | ||
1160 | QString PlayListWidget::currentFileListPathName() { | 1160 | QString PlayListWidget::currentFileListPathName() const { |
1161 | switch (whichList()) { | 1161 | switch (whichList()) { |
1162 | case 1: | 1162 | case 1: |
1163 | return audioView->currentItem()->text(3); | 1163 | return audioView->currentItem()->text(3); |
1164 | break; | 1164 | break; |
1165 | case 2: | 1165 | case 2: |
1166 | return videoView->currentItem()->text(3); | 1166 | return videoView->currentItem()->text(3); |
1167 | break; | 1167 | break; |
1168 | }; | 1168 | }; |
1169 | return ""; | 1169 | return ""; |
1170 | } | 1170 | } |
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.h b/noncore/multimedia/opieplayer2/playlistwidget.h index 05d53a4..7044abe 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.h +++ b/noncore/multimedia/opieplayer2/playlistwidget.h | |||
@@ -1,124 +1,124 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | 3 | ||
4 | Copyright (c) 2002 Max Reiss <harlekin@handhelds.org> | 4 | Copyright (c) 2002 Max Reiss <harlekin@handhelds.org> |
5 | Copyright (c) 2002 L. Potter <ljp@llornkcor.com> | 5 | Copyright (c) 2002 L. Potter <ljp@llornkcor.com> |
6 | Copyright (c) 2002 Holger Freyther <zecke@handhelds.org> | 6 | Copyright (c) 2002 Holger Freyther <zecke@handhelds.org> |
7 | =. | 7 | =. |
8 | .=l. | 8 | .=l. |
9 | .>+-= | 9 | .>+-= |
10 | _;:, .> :=|. This program is free software; you can | 10 | _;:, .> :=|. This program is free software; you can |
11 | .> <`_, > . <= redistribute it and/or modify it under | 11 | .> <`_, > . <= redistribute it and/or modify it under |
12 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 12 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
13 | .="- .-=="i, .._ License as published by the Free Software | 13 | .="- .-=="i, .._ License as published by the Free Software |
14 | - . .-<_> .<> Foundation; either version 2 of the License, | 14 | - . .-<_> .<> Foundation; either version 2 of the License, |
15 | ._= =} : or (at your option) any later version. | 15 | ._= =} : or (at your option) any later version. |
16 | .%`+i> _;_. | 16 | .%`+i> _;_. |
17 | .i_,=:_. -<s. This program is distributed in the hope that | 17 | .i_,=:_. -<s. This program is distributed in the hope that |
18 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 18 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
19 | : .. .:, . . . without even the implied warranty of | 19 | : .. .:, . . . without even the implied warranty of |
20 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 20 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
21 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 21 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
22 | ..}^=.= = ; General Public License for more | 22 | ..}^=.= = ; General Public License for more |
23 | ++= -. .` .: details. | 23 | ++= -. .` .: details. |
24 | : = ...= . :.=- | 24 | : = ...= . :.=- |
25 | -. .:....=;==+<; You should have received a copy of the GNU | 25 | -. .:....=;==+<; You should have received a copy of the GNU |
26 | -_. . . )=. = General Public License along with | 26 | -_. . . )=. = General Public License along with |
27 | -- :-=` this library; see the file COPYING.LIB. | 27 | -- :-=` this library; see the file COPYING.LIB. |
28 | If not, write to the Free Software Foundation, | 28 | If not, write to the Free Software Foundation, |
29 | Inc., 59 Temple Place - Suite 330, | 29 | Inc., 59 Temple Place - Suite 330, |
30 | Boston, MA 02111-1307, USA. | 30 | Boston, MA 02111-1307, USA. |
31 | 31 | ||
32 | */ | 32 | */ |
33 | 33 | ||
34 | #ifndef PLAY_LIST_WIDGET_H | 34 | #ifndef PLAY_LIST_WIDGET_H |
35 | #define PLAY_LIST_WIDGET_H | 35 | #define PLAY_LIST_WIDGET_H |
36 | 36 | ||
37 | #include <qmainwindow.h> | 37 | #include <qmainwindow.h> |
38 | #include <qpe/applnk.h> | 38 | #include <qpe/applnk.h> |
39 | #include <qtabwidget.h> | 39 | #include <qtabwidget.h> |
40 | #include <qpe/fileselector.h> | 40 | #include <qpe/fileselector.h> |
41 | #include <qpushbutton.h> | 41 | #include <qpushbutton.h> |
42 | #include <qpopupmenu.h> | 42 | #include <qpopupmenu.h> |
43 | 43 | ||
44 | #include "playlistwidgetgui.h" | 44 | #include "playlistwidgetgui.h" |
45 | 45 | ||
46 | 46 | ||
47 | //class PlayListWidgetPrivate; | 47 | //class PlayListWidgetPrivate; |
48 | class Config; | 48 | class Config; |
49 | class QListViewItem; | 49 | class QListViewItem; |
50 | class QListView; | 50 | class QListView; |
51 | class QPoint; | 51 | class QPoint; |
52 | class QAction; | 52 | class QAction; |
53 | class QLabel; | 53 | class QLabel; |
54 | 54 | ||
55 | class PlayListWidget : public PlayListWidgetGui { | 55 | class PlayListWidget : public PlayListWidgetGui { |
56 | Q_OBJECT | 56 | Q_OBJECT |
57 | public: | 57 | public: |
58 | enum TabType { CurrentPlayList, AudioFiles, VideoFiles, PlayLists, NumTabTypes = 4 }; | 58 | enum TabType { CurrentPlayList, AudioFiles, VideoFiles, PlayLists, NumTabTypes = 4 }; |
59 | 59 | ||
60 | PlayListWidget( QWidget* parent=0, const char* name=0, WFlags fl=0 ); | 60 | PlayListWidget( QWidget* parent=0, const char* name=0, WFlags fl=0 ); |
61 | ~PlayListWidget(); | 61 | ~PlayListWidget(); |
62 | DocLnkSet files; | 62 | DocLnkSet files; |
63 | DocLnkSet vFiles; | 63 | DocLnkSet vFiles; |
64 | bool fromSetDocument; | 64 | bool fromSetDocument; |
65 | bool insanityBool; | 65 | bool insanityBool; |
66 | QString setDocFileRef, currentPlayList; | 66 | QString setDocFileRef, currentPlayList; |
67 | // retrieve the current playlist entry (media file link) | 67 | // retrieve the current playlist entry (media file link) |
68 | const DocLnk *current(); | 68 | const DocLnk *current(); |
69 | void useSelectedDocument(); | 69 | void useSelectedDocument(); |
70 | int selected; | 70 | int selected; |
71 | int whichList(); | 71 | int whichList() const; |
72 | TabType currentTab() const; | 72 | TabType currentTab() const; |
73 | 73 | ||
74 | public slots: | 74 | public slots: |
75 | bool first(); | 75 | bool first(); |
76 | bool last(); | 76 | bool last(); |
77 | bool next(); | 77 | bool next(); |
78 | bool prev(); | 78 | bool prev(); |
79 | void writeDefaultPlaylist( ); | 79 | void writeDefaultPlaylist( ); |
80 | QString currentFileListPathName(); | 80 | QString currentFileListPathName() const; |
81 | protected: | 81 | protected: |
82 | void keyReleaseEvent( QKeyEvent *e); | 82 | void keyReleaseEvent( QKeyEvent *e); |
83 | 83 | ||
84 | private: | 84 | private: |
85 | int defaultSkinIndex; | 85 | int defaultSkinIndex; |
86 | bool audioScan, videoScan, audioPopulated, videoPopulated; | 86 | bool audioScan, videoScan, audioPopulated, videoPopulated; |
87 | void readm3u(const QString &); | 87 | void readm3u(const QString &); |
88 | void readPls(const QString &); | 88 | void readPls(const QString &); |
89 | void initializeStates(); | 89 | void initializeStates(); |
90 | void populateAudioView(); | 90 | void populateAudioView(); |
91 | void populateVideoView(); | 91 | void populateVideoView(); |
92 | 92 | ||
93 | private slots: | 93 | private slots: |
94 | void populateSkinsMenu(); | 94 | void populateSkinsMenu(); |
95 | void skinsMenuActivated(int); | 95 | void skinsMenuActivated(int); |
96 | void pmViewActivated(int); | 96 | void pmViewActivated(int); |
97 | void writem3u(); | 97 | void writem3u(); |
98 | void writeCurrentM3u(); | 98 | void writeCurrentM3u(); |
99 | void scanForAudio(); | 99 | void scanForAudio(); |
100 | void scanForVideo(); | 100 | void scanForVideo(); |
101 | void openFile(); | 101 | void openFile(); |
102 | void setDocument( const QString& fileref ); | 102 | void setDocument( const QString& fileref ); |
103 | void addToSelection( const DocLnk& ); // Add a media file to the playlist | 103 | void addToSelection( const DocLnk& ); // Add a media file to the playlist |
104 | void addToSelection( QListViewItem* ); // Add a media file to the playlist | 104 | void addToSelection( QListViewItem* ); // Add a media file to the playlist |
105 | void setPlaylist( bool ); // Show/Hide the playlist | 105 | void setPlaylist( bool ); // Show/Hide the playlist |
106 | void clearList(); | 106 | void clearList(); |
107 | void addAllToList(); | 107 | void addAllToList(); |
108 | void addAllMusicToList(); | 108 | void addAllMusicToList(); |
109 | void addAllVideoToList(); | 109 | void addAllVideoToList(); |
110 | void saveList(); // Save the playlist | 110 | void saveList(); // Save the playlist |
111 | void loadList( const DocLnk &); // Load a playlist | 111 | void loadList( const DocLnk &); // Load a playlist |
112 | void playIt( QListViewItem *); | 112 | void playIt( QListViewItem *); |
113 | void btnPlay(bool); | 113 | void btnPlay(bool); |
114 | void deletePlaylist(); | 114 | void deletePlaylist(); |
115 | void addSelected(); | 115 | void addSelected(); |
116 | void removeSelected(); | 116 | void removeSelected(); |
117 | void tabChanged(QWidget*); | 117 | void tabChanged(QWidget*); |
118 | void viewPressed( int, QListViewItem *, const QPoint&, int); | 118 | void viewPressed( int, QListViewItem *, const QPoint&, int); |
119 | void playlistViewPressed( int, QListViewItem *, const QPoint&, int); | 119 | void playlistViewPressed( int, QListViewItem *, const QPoint&, int); |
120 | void playSelected(); | 120 | void playSelected(); |
121 | }; | 121 | }; |
122 | 122 | ||
123 | #endif // PLAY_LIST_WIDGET_H | 123 | #endif // PLAY_LIST_WIDGET_H |
124 | 124 | ||