Diffstat (limited to 'noncore/multimedia/opieplayer2/playlistwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index 39f5090..262b685 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp | |||
@@ -112,60 +112,60 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl ) | |||
112 | QPEMenuBar *menu = new QPEMenuBar( toolbar ); | 112 | QPEMenuBar *menu = new QPEMenuBar( toolbar ); |
113 | menu->setMargin( 0 ); | 113 | menu->setMargin( 0 ); |
114 | 114 | ||
115 | QPEToolBar *bar = new QPEToolBar( this ); | 115 | QPEToolBar *bar = new QPEToolBar( this ); |
116 | bar->setLabel( tr( "Play Operations" ) ); | 116 | bar->setLabel( tr( "Play Operations" ) ); |
117 | 117 | ||
118 | tbDeletePlaylist = new QPushButton( Resource::loadIconSet("trash"),"",bar,"close"); | 118 | tbDeletePlaylist = new QPushButton( Resource::loadIconSet("trash"),"",bar,"close"); |
119 | tbDeletePlaylist->setFlat(TRUE); | 119 | tbDeletePlaylist->setFlat(TRUE); |
120 | tbDeletePlaylist->setFixedSize(20,20); | 120 | tbDeletePlaylist->setFixedSize(20,20); |
121 | 121 | ||
122 | d->tbAddToList = new ToolButton( bar, tr( "Add to Playlist" ), "opieplayer2/add_to_playlist", | 122 | d->tbAddToList = new ToolButton( bar, tr( "Add to Playlist" ), "opieplayer2/add_to_playlist", |
123 | this , SLOT(addSelected()) ); | 123 | this , SLOT(addSelected()) ); |
124 | d->tbRemoveFromList = new ToolButton( bar, tr( "Remove from Playlist" ), "opieplayer2/remove_from_playlist", | 124 | d->tbRemoveFromList = new ToolButton( bar, tr( "Remove from Playlist" ), "opieplayer2/remove_from_playlist", |
125 | this , SLOT(removeSelected()) ); | 125 | this , SLOT(removeSelected()) ); |
126 | d->tbPlay = new ToolButton( bar, tr( "Play" ), "opieplayer2/play", | 126 | d->tbPlay = new ToolButton( bar, tr( "Play" ), "opieplayer2/play", |
127 | this , SLOT( btnPlay(bool) ), TRUE ); | 127 | this , SLOT( btnPlay(bool) ), TRUE ); |
128 | d->tbShuffle = new ToolButton( bar, tr( "Randomize" ),"opieplayer2/shuffle", | 128 | d->tbShuffle = new ToolButton( bar, tr( "Randomize" ),"opieplayer2/shuffle", |
129 | mediaPlayerState, SLOT(setShuffled(bool)), TRUE ); | 129 | mediaPlayerState, SLOT(setShuffled(bool)), TRUE ); |
130 | d->tbLoop = new ToolButton( bar, tr( "Loop" ),"opieplayer2/loop", | 130 | d->tbLoop = new ToolButton( bar, tr( "Loop" ),"opieplayer2/loop", |
131 | mediaPlayerState, SLOT(setLooping(bool)), TRUE ); | 131 | mediaPlayerState, SLOT(setLooping(bool)), TRUE ); |
132 | tbDeletePlaylist->hide(); | 132 | tbDeletePlaylist->hide(); |
133 | 133 | ||
134 | QPopupMenu *pmPlayList = new QPopupMenu( this ); | 134 | QPopupMenu *pmPlayList = new QPopupMenu( this ); |
135 | menu->insertItem( tr( "File" ), pmPlayList ); | 135 | menu->insertItem( tr( "File" ), pmPlayList ); |
136 | new MenuItem( pmPlayList, tr( "Clear List" ), this, SLOT( clearList() ) ); | 136 | (void)new MenuItem( pmPlayList, tr( "Clear List" ), this, SLOT( clearList() ) ); |
137 | new MenuItem( pmPlayList, tr( "Add all audio files" ), this, SLOT( addAllMusicToList() ) ); | 137 | (void)new MenuItem( pmPlayList, tr( "Add all audio files" ), this, SLOT( addAllMusicToList() ) ); |
138 | new MenuItem( pmPlayList, tr( "Add all video files" ), this, SLOT( addAllVideoToList() ) ); | 138 | (void)new MenuItem( pmPlayList, tr( "Add all video files" ), this, SLOT( addAllVideoToList() ) ); |
139 | new MenuItem( pmPlayList, tr( "Add all files" ), this, SLOT( addAllToList() ) ); | 139 | (void)new MenuItem( pmPlayList, tr( "Add all files" ), this, SLOT( addAllToList() ) ); |
140 | pmPlayList->insertSeparator(-1); | 140 | pmPlayList->insertSeparator(-1); |
141 | new MenuItem( pmPlayList, tr( "Save PlayList" ), this, SLOT( saveList() ) ); | 141 | (void)new MenuItem( pmPlayList, tr( "Save PlayList" ), this, SLOT( saveList() ) ); |
142 | new MenuItem( pmPlayList, tr( "Export playlist to m3u" ), this, SLOT(writem3u() ) ); | 142 | (void)new MenuItem( pmPlayList, tr( "Export playlist to m3u" ), this, SLOT(writem3u() ) ); |
143 | pmPlayList->insertSeparator(-1); | 143 | pmPlayList->insertSeparator(-1); |
144 | new MenuItem( pmPlayList, tr( "Open File or URL" ), this,SLOT( openFile() ) ); | 144 | (void)new MenuItem( pmPlayList, tr( "Open File or URL" ), this,SLOT( openFile() ) ); |
145 | pmPlayList->insertSeparator(-1); | 145 | pmPlayList->insertSeparator(-1); |
146 | new MenuItem( pmPlayList, tr( "Rescan for Audio Files" ), this,SLOT( scanForAudio() ) ); | 146 | (void)new MenuItem( pmPlayList, tr( "Rescan for Audio Files" ), this,SLOT( scanForAudio() ) ); |
147 | new MenuItem( pmPlayList, tr( "Rescan for Video Files" ), this,SLOT( scanForVideo() ) ); | 147 | (void)new MenuItem( pmPlayList, tr( "Rescan for Video Files" ), this,SLOT( scanForVideo() ) ); |
148 | 148 | ||
149 | 149 | ||
150 | pmView = new QPopupMenu( this ); | 150 | pmView = new QPopupMenu( this ); |
151 | menu->insertItem( tr( "View" ), pmView ); | 151 | menu->insertItem( tr( "View" ), pmView ); |
152 | pmView->isCheckable(); | 152 | pmView->isCheckable(); |
153 | 153 | ||
154 | pmView->insertItem( Resource::loadPixmap("fullscreen") , tr( "Full Screen"), mediaPlayerState, SLOT( toggleFullscreen() ) ); | 154 | pmView->insertItem( Resource::loadPixmap("fullscreen") , tr( "Full Screen"), mediaPlayerState, SLOT( toggleFullscreen() ) ); |
155 | 155 | ||
156 | Config cfg( "OpiePlayer" ); | 156 | Config cfg( "OpiePlayer" ); |
157 | bool b= cfg.readBoolEntry("FullScreen", 0); | 157 | bool b= cfg.readBoolEntry("FullScreen", 0); |
158 | mediaPlayerState->setFullscreen( b ); | 158 | mediaPlayerState->setFullscreen( b ); |
159 | pmView->setItemChecked( -16, b ); | 159 | pmView->setItemChecked( -16, b ); |
160 | 160 | ||
161 | // pmView->insertItem( Resource::loadPixmap("opieplayer/scale") , tr( "Scale"), mediaPlayerState, SLOT(toggleScaled() ) ); | 161 | // pmView->insertItem( Resource::loadPixmap("opieplayer/scale") , tr( "Scale"), mediaPlayerState, SLOT(toggleScaled() ) ); |
162 | 162 | ||
163 | pmView->insertSeparator(-1); | 163 | pmView->insertSeparator(-1); |
164 | 164 | ||
165 | skinsMenu = new QPopupMenu( this ); | 165 | skinsMenu = new QPopupMenu( this ); |
166 | pmView->insertItem( tr( "Skins" ), skinsMenu ); | 166 | pmView->insertItem( tr( "Skins" ), skinsMenu ); |
167 | skinsMenu->isCheckable(); | 167 | skinsMenu->isCheckable(); |
168 | populateSkinsMenu(); | 168 | populateSkinsMenu(); |
169 | 169 | ||
170 | QVBox *vbox5 = new QVBox( this ); vbox5->setBackgroundMode( PaletteButton ); | 170 | QVBox *vbox5 = new QVBox( this ); vbox5->setBackgroundMode( PaletteButton ); |
171 | QVBox *vbox4 = new QVBox( vbox5 ); vbox4->setBackgroundMode( PaletteButton ); | 171 | QVBox *vbox4 = new QVBox( vbox5 ); vbox4->setBackgroundMode( PaletteButton ); |
@@ -176,51 +176,51 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl ) | |||
176 | // tabWidget->setTabShape(QTabWidget::Triangular); | 176 | // tabWidget->setTabShape(QTabWidget::Triangular); |
177 | 177 | ||
178 | QWidget *pTab; | 178 | QWidget *pTab; |
179 | pTab = new QWidget( tabWidget, "pTab" ); | 179 | pTab = new QWidget( tabWidget, "pTab" ); |
180 | tabWidget->insertTab( pTab,"Playlist"); | 180 | tabWidget->insertTab( pTab,"Playlist"); |
181 | 181 | ||
182 | 182 | ||
183 | QGridLayout *Playout = new QGridLayout( pTab ); | 183 | QGridLayout *Playout = new QGridLayout( pTab ); |
184 | Playout->setSpacing( 2); | 184 | Playout->setSpacing( 2); |
185 | Playout->setMargin( 2); | 185 | Playout->setMargin( 2); |
186 | 186 | ||
187 | // Add the playlist area | 187 | // Add the playlist area |
188 | 188 | ||
189 | QVBox *vbox3 = new QVBox( pTab ); vbox3->setBackgroundMode( PaletteButton ); | 189 | QVBox *vbox3 = new QVBox( pTab ); vbox3->setBackgroundMode( PaletteButton ); |
190 | d->playListFrame = vbox3; | 190 | d->playListFrame = vbox3; |
191 | 191 | ||
192 | QHBox *hbox2 = new QHBox( vbox3 ); hbox2->setBackgroundMode( PaletteButton ); | 192 | QHBox *hbox2 = new QHBox( vbox3 ); hbox2->setBackgroundMode( PaletteButton ); |
193 | 193 | ||
194 | d->selectedFiles = new PlayListSelection( hbox2); | 194 | d->selectedFiles = new PlayListSelection( hbox2); |
195 | QVBox *vbox1 = new QVBox( hbox2 ); vbox1->setBackgroundMode( PaletteButton ); | 195 | QVBox *vbox1 = new QVBox( hbox2 ); vbox1->setBackgroundMode( PaletteButton ); |
196 | 196 | ||
197 | QPEApplication::setStylusOperation( d->selectedFiles->viewport(),QPEApplication::RightOnHold); | 197 | QPEApplication::setStylusOperation( d->selectedFiles->viewport(),QPEApplication::RightOnHold); |
198 | 198 | ||
199 | QVBox *stretch1 = new QVBox( vbox1 ); stretch1->setBackgroundMode( PaletteButton ); // add stretch | 199 | QVBox *stretch1 = new QVBox( vbox1 ); stretch1->setBackgroundMode( PaletteButton ); // add stretch |
200 | new ToolButton( vbox1, tr( "Move Up" ), "opieplayer2/up", d->selectedFiles, SLOT(moveSelectedUp()) ); | 200 | (void)new ToolButton( vbox1, tr( "Move Up" ), "opieplayer2/up", d->selectedFiles, SLOT(moveSelectedUp()) ); |
201 | new ToolButton( vbox1, tr( "Remove" ), "opieplayer2/cut", d->selectedFiles, SLOT(removeSelected()) ); | 201 | (void)new ToolButton( vbox1, tr( "Remove" ), "opieplayer2/cut", d->selectedFiles, SLOT(removeSelected()) ); |
202 | new ToolButton( vbox1, tr( "Move Down" ), "opieplayer2/down", d->selectedFiles, SLOT(moveSelectedDown()) ); | 202 | (void)new ToolButton( vbox1, tr( "Move Down" ), "opieplayer2/down", d->selectedFiles, SLOT(moveSelectedDown()) ); |
203 | QVBox *stretch2 = new QVBox( vbox1 ); stretch2->setBackgroundMode( PaletteButton ); // add stretch | 203 | QVBox *stretch2 = new QVBox( vbox1 ); stretch2->setBackgroundMode( PaletteButton ); // add stretch |
204 | 204 | ||
205 | 205 | ||
206 | Playout->addMultiCellWidget( vbox3, 0, 0, 0, 1 ); | 206 | Playout->addMultiCellWidget( vbox3, 0, 0, 0, 1 ); |
207 | 207 | ||
208 | QWidget *aTab; | 208 | QWidget *aTab; |
209 | aTab = new QWidget( tabWidget, "aTab" ); | 209 | aTab = new QWidget( tabWidget, "aTab" ); |
210 | 210 | ||
211 | QGridLayout *Alayout = new QGridLayout( aTab ); | 211 | QGridLayout *Alayout = new QGridLayout( aTab ); |
212 | Alayout->setSpacing( 2); | 212 | Alayout->setSpacing( 2); |
213 | Alayout->setMargin( 2); | 213 | Alayout->setMargin( 2); |
214 | 214 | ||
215 | audioView = new QListView( aTab, "Audioview" ); | 215 | audioView = new QListView( aTab, "Audioview" ); |
216 | audioView->addColumn( tr("Title"),140); | 216 | audioView->addColumn( tr("Title"),140); |
217 | audioView->addColumn(tr("Size"), -1); | 217 | audioView->addColumn(tr("Size"), -1); |
218 | audioView->addColumn(tr("Media"),-1); | 218 | audioView->addColumn(tr("Media"),-1); |
219 | audioView->setColumnAlignment(1, Qt::AlignRight); | 219 | audioView->setColumnAlignment(1, Qt::AlignRight); |
220 | audioView->setColumnAlignment(2, Qt::AlignRight); | 220 | audioView->setColumnAlignment(2, Qt::AlignRight); |
221 | audioView->setAllColumnsShowFocus(TRUE); | 221 | audioView->setAllColumnsShowFocus(TRUE); |
222 | audioView->setSorting(0,TRUE); | 222 | audioView->setSorting(0,TRUE); |
223 | 223 | ||
224 | audioView->setMultiSelection( TRUE ); | 224 | audioView->setMultiSelection( TRUE ); |
225 | audioView->setSelectionMode( QListView::Extended); | 225 | audioView->setSelectionMode( QListView::Extended); |
226 | 226 | ||