summaryrefslogtreecommitdiff
authorsimon <simon>2002-12-02 14:38:47 (UTC)
committer simon <simon>2002-12-02 14:38:47 (UTC)
commit46d64cdfe9a3d949e91ea6a72828405d03337225 (patch) (unidiff)
tree992e6fd74384ed4b7126b73b3313d599b5035949
parent77d55b631fa3cf26bfdf809c17ee3252d3c80ac0 (diff)
downloadopie-46d64cdfe9a3d949e91ea6a72828405d03337225.zip
opie-46d64cdfe9a3d949e91ea6a72828405d03337225.tar.gz
opie-46d64cdfe9a3d949e91ea6a72828405d03337225.tar.bz2
- two const fixlets
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.cpp4
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.h4
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
@@ -1129,42 +1129,42 @@ void PlayListWidget::populateSkinsMenu() {
1129 } 1129 }
1130} 1130}
1131 1131
1132void PlayListWidget::skinsMenuActivated( int item ) { 1132void 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
1145int PlayListWidget::whichList() { 1145int PlayListWidget::whichList() const {
1146 return tabWidget->currentPageIndex(); 1146 return tabWidget->currentPageIndex();
1147} 1147}
1148 1148
1149PlayListWidget::TabType PlayListWidget::currentTab() const 1149PlayListWidget::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
1160QString PlayListWidget::currentFileListPathName() { 1160QString 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
@@ -55,42 +55,42 @@ class QLabel;
55class PlayListWidget : public PlayListWidgetGui { 55class PlayListWidget : public PlayListWidgetGui {
56 Q_OBJECT 56 Q_OBJECT
57public: 57public:
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
74public slots: 74public 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;
81protected: 81protected:
82 void keyReleaseEvent( QKeyEvent *e); 82 void keyReleaseEvent( QKeyEvent *e);
83 83
84private: 84private:
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
93private slots: 93private slots:
94 void populateSkinsMenu(); 94 void populateSkinsMenu();
95 void skinsMenuActivated(int); 95 void skinsMenuActivated(int);
96 void pmViewActivated(int); 96 void pmViewActivated(int);