author | llornkcor <llornkcor> | 2002-08-10 17:41:15 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-08-10 17:41:15 (UTC) |
commit | b488752cf2149443dcebcc8f7ad21c1ba47070fa (patch) (unidiff) | |
tree | 461adc8345f14d495466e5082f36651a844bde67 /noncore/multimedia/opieplayer2/playlistwidget.cpp | |
parent | fb46a101bab9348ebfb68094b7c6cf54e56ea774 (diff) | |
download | opie-b488752cf2149443dcebcc8f7ad21c1ba47070fa.zip opie-b488752cf2149443dcebcc8f7ad21c1ba47070fa.tar.gz opie-b488752cf2149443dcebcc8f7ad21c1ba47070fa.tar.bz2 |
added skins to videowidget, fixed fullscreen menu. Still needs work on buttonmask.
Diffstat (limited to 'noncore/multimedia/opieplayer2/playlistwidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 41 |
1 files changed, 33 insertions, 8 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index b43d9f7..65458e7 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <qpe/storage.h> | 10 | #include <qpe/storage.h> |
11 | 11 | ||
12 | #include <qpe/applnk.h> | 12 | #include <qpe/applnk.h> |
13 | #include <qpopupmenu.h> | ||
13 | #include <qpe/config.h> | 14 | #include <qpe/config.h> |
14 | #include <qpe/global.h> | 15 | #include <qpe/global.h> |
15 | #include <qpe/resource.h> | 16 | #include <qpe/resource.h> |
@@ -158,13 +159,19 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl ) | |||
158 | new MenuItem( pmPlayList, tr( "Rescan for Audio Files" ), this,SLOT( scanForAudio() ) ); | 159 | new MenuItem( pmPlayList, tr( "Rescan for Audio Files" ), this,SLOT( scanForAudio() ) ); |
159 | new MenuItem( pmPlayList, tr( "Rescan for Video Files" ), this,SLOT( scanForVideo() ) ); | 160 | new MenuItem( pmPlayList, tr( "Rescan for Video Files" ), this,SLOT( scanForVideo() ) ); |
160 | 161 | ||
161 | QPopupMenu *pmView = new QPopupMenu( this ); | 162 | |
163 | pmView = new QPopupMenu( this ); | ||
162 | menu->insertItem( tr( "View" ), pmView ); | 164 | menu->insertItem( tr( "View" ), pmView ); |
165 | pmView->isCheckable(); | ||
166 | |||
167 | pmView->insertItem( Resource::loadPixmap("fullscreen") , tr( "Full Screen"), this, SLOT( toggleFull() ) ); | ||
168 | |||
169 | Config cfg( "OpiePlayer" ); | ||
170 | bool b= cfg.readBoolEntry("FullScreen", 0); | ||
171 | mediaPlayerState->setFullscreen( b ); | ||
172 | pmView->setItemChecked( -16, b ); | ||
163 | 173 | ||
164 | fullScreenButton = new QAction(tr("Full Screen"), Resource::loadPixmap("fullscreen"), QString::null, 0, this, 0); | 174 | pmView->insertItem( Resource::loadPixmap("opieplayer/scale") , tr( "Scale"), this, SLOT(toggleScaled() ) ); |
165 | fullScreenButton->addTo(pmView); | ||
166 | scaleButton = new QAction(tr("Scale"), Resource::loadPixmap("opieplayer/scale"), QString::null, 0, this, 0); | ||
167 | //scaleButton->addTo(pmView); | ||
168 | 175 | ||
169 | QVBox *vbox5 = new QVBox( this ); vbox5->setBackgroundMode( PaletteButton ); | 176 | QVBox *vbox5 = new QVBox( this ); vbox5->setBackgroundMode( PaletteButton ); |
170 | QVBox *vbox4 = new QVBox( vbox5 ); vbox4->setBackgroundMode( PaletteButton ); | 177 | QVBox *vbox4 = new QVBox( vbox5 ); vbox4->setBackgroundMode( PaletteButton ); |
@@ -242,8 +249,11 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl ) | |||
242 | tabWidget->insertTab(LTab,tr("Lists")); | 249 | tabWidget->insertTab(LTab,tr("Lists")); |
243 | 250 | ||
244 | connect(tbDeletePlaylist,(SIGNAL(released())),SLOT( deletePlaylist())); | 251 | connect(tbDeletePlaylist,(SIGNAL(released())),SLOT( deletePlaylist())); |
245 | connect( fullScreenButton, SIGNAL(activated()), mediaPlayerState, SLOT(toggleFullscreen()) ); | 252 | |
246 | connect( scaleButton, SIGNAL(activated()), mediaPlayerState, SLOT(toggleScaled()) ); | 253 | connect( pmView, SIGNAL( activated(int)), this, SLOT( pmViewActivated(int) ) ); |
254 | |||
255 | // connect( scaleButton, SIGNAL(activated()), mediaPlayerState, SLOT(toggleScaled() ) ); | ||
256 | |||
247 | connect( d->selectedFiles, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), | 257 | connect( d->selectedFiles, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), |
248 | this,SLOT( playlistViewPressed(int, QListViewItem *, const QPoint&, int)) ); | 258 | this,SLOT( playlistViewPressed(int, QListViewItem *, const QPoint&, int)) ); |
249 | connect( audioView, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), | 259 | connect( audioView, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), |
@@ -266,7 +276,6 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl ) | |||
266 | 276 | ||
267 | setCentralWidget( vbox5 ); | 277 | setCentralWidget( vbox5 ); |
268 | 278 | ||
269 | Config cfg( "OpiePlayer" ); | ||
270 | readConfig( cfg ); | 279 | readConfig( cfg ); |
271 | QString currentPlaylist = cfg.readEntry("CurrentPlaylist",""); | 280 | QString currentPlaylist = cfg.readEntry("CurrentPlaylist",""); |
272 | loadList(DocLnk( currentPlaylist)); | 281 | loadList(DocLnk( currentPlaylist)); |
@@ -1209,3 +1218,19 @@ void PlayListWidget::readPls(const QString &filename) { | |||
1209 | } | 1218 | } |
1210 | } | 1219 | } |
1211 | 1220 | ||
1221 | void PlayListWidget::pmViewActivated(int index) { | ||
1222 | qDebug("%d", index); | ||
1223 | switch(index) { | ||
1224 | case -16: | ||
1225 | { | ||
1226 | |||
1227 | mediaPlayerState->toggleFullscreen(); | ||
1228 | bool b=mediaPlayerState->fullscreen(); | ||
1229 | pmView->setItemChecked( index,b); | ||
1230 | Config cfg( "OpiePlayer" ); | ||
1231 | cfg.writeEntry("FullScreen", b); | ||
1232 | |||
1233 | } | ||
1234 | break; | ||
1235 | }; | ||
1236 | } | ||