summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-08-13 23:57:49 (UTC)
committer llornkcor <llornkcor>2002-08-13 23:57:49 (UTC)
commit05a272a0dc03c37f143546aa5cde228bd3ba79bb (patch) (side-by-side diff)
tree2e994a06ebd2b66287905dce828c5f3e57a0147a
parent6baf582094b418ec1defa2415210a7d7583628ff (diff)
downloadopie-05a272a0dc03c37f143546aa5cde228bd3ba79bb.zip
opie-05a272a0dc03c37f143546aa5cde228bd3ba79bb.tar.gz
opie-05a272a0dc03c37f143546aa5cde228bd3ba79bb.tar.bz2
remove unused variables
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp
index 27db464..2521906 100644
--- a/noncore/multimedia/opieplayer2/playlistwidget.cpp
+++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp
@@ -608,132 +608,133 @@ void PlayListWidget::loadList( const DocLnk & lnk) {
}
}
void PlayListWidget::setPlaylist( bool shown ) {
if ( shown ) {
d->playListFrame->show();
} else {
d->playListFrame->hide();
}
}
void PlayListWidget::setView( char view ) {
if ( view == 'l' )
showMaximized();
else
hide();
}
void PlayListWidget::addSelected() {
Config cfg( "OpiePlayer" );
cfg.setGroup("PlayList");
QString currentPlaylist = cfg.readEntry("CurrentPlaylist","");
- int noOfFiles = cfg.readNumEntry("NumberOfFiles", 0 );
+// int noOfFiles = cfg.readNumEntry("NumberOfFiles", 0 );
switch (tabWidget->currentPageIndex()) {
case 0: //playlist
break;
case 1: { //audio
QListViewItemIterator it( audioView );
// iterate through all items of the listview
for ( ; it.current(); ++it ) {
if ( it.current()->isSelected() ) {
QListIterator<DocLnk> dit( files.children() );
for ( ; dit.current(); ++dit ) {
if( dit.current()->name() == it.current()->text(0) ) {
d->selectedFiles->addToSelection( **dit );
}
}
audioView->setSelected( it.current(),FALSE);
}
}
tabWidget->setCurrentPage(0);
}
break;
case 2: { // video
QListViewItemIterator it( videoView );
// iterate through all items of the listview
for ( ; it.current(); ++it ) {
if ( it.current()->isSelected() ) {
QListIterator<DocLnk> dit( vFiles.children() );
for ( ; dit.current(); ++dit ) {
if( dit.current()->name() == it.current()->text(0) ) {
d->selectedFiles->addToSelection( **dit );
}
}
videoView->setSelected( it.current(),FALSE);
}
}
tabWidget->setCurrentPage(0);
}
break;
};
}
void PlayListWidget::removeSelected() {
d->selectedFiles->removeSelected( );
}
void PlayListWidget::playIt( QListViewItem *it) {
+ if(it==NULL) return;
qDebug("playIt");
mediaPlayerState->setPlaying(FALSE);
mediaPlayerState->setPlaying(TRUE);
d->selectedFiles->unSelect();
}
void PlayListWidget::addToSelection( QListViewItem *it) {
d->setDocumentUsed = FALSE;
if(it) {
switch (tabWidget->currentPageIndex()) {
case 1: {
QListIterator<DocLnk> dit( files.children() );
for ( ; dit.current(); ++dit ) {
if( dit.current()->name() == it->text(0)) {
d->selectedFiles->addToSelection( **dit );
}
}
}
break;
case 2: {
QListIterator<DocLnk> dit( vFiles.children() );
for ( ; dit.current(); ++dit ) {
if( dit.current()->name() == it->text(0)) {
d->selectedFiles->addToSelection( **dit );
}
}
}
break;
case 0:
break;
};
tabWidget->setCurrentPage(0);
}
}
-void PlayListWidget::tabChanged(QWidget *widg) {
+void PlayListWidget::tabChanged(QWidget *) {
switch ( tabWidget->currentPageIndex()) {
case 0:
{
if( !tbDeletePlaylist->isHidden())
tbDeletePlaylist->hide();
d->tbRemoveFromList->setEnabled(TRUE);
d->tbAddToList->setEnabled(FALSE);
}
break;
case 1:
{
audioView->clear();
populateAudioView();
if( !tbDeletePlaylist->isHidden())
tbDeletePlaylist->hide();
d->tbRemoveFromList->setEnabled(FALSE);
d->tbAddToList->setEnabled(TRUE);
}
break;
case 2:
{
videoView->clear();
@@ -781,90 +782,90 @@ void PlayListWidget::btnPlay(bool b) {
d->selectedFiles->removeSelected( );
tabWidget->setCurrentPage(2);
d->selectedFiles->unSelect();
insanityBool=FALSE;
}// videoView->clearSelection();
break;
};
}
void PlayListWidget::deletePlaylist() {
switch( QMessageBox::information( this, (tr("Remove Playlist?")),
(tr("You really want to delete\nthis playlist?")),
(tr("Yes")), (tr("No")), 0 )){
case 0: // Yes clicked,
QFile().remove(playLists->selected()->file());
QFile().remove(playLists->selected()->linkFile());
playLists->reread();
break;
case 1: // Cancel
break;
};
}
-void PlayListWidget::viewPressed( int mouse, QListViewItem *item, const QPoint& point, int i) {
+void PlayListWidget::viewPressed( int mouse, QListViewItem *, const QPoint& , int) {
switch (mouse) {
case 1:
break;
case 2:{
QPopupMenu m;
m.insertItem( tr( "Play" ), this, SLOT( playSelected() ));
m.insertItem( tr( "Add to Playlist" ), this, SLOT( addSelected() ));
m.insertSeparator();
m.insertItem( tr( "Properties" ), this, SLOT( listDelete() ));
m.exec( QCursor::pos() );
}
break;
};
}
void PlayListWidget::playSelected() {
btnPlay( TRUE);
}
-void PlayListWidget::playlistViewPressed( int mouse, QListViewItem *item, const QPoint& point, int i) {
+void PlayListWidget::playlistViewPressed( int mouse, QListViewItem *, const QPoint& , int ) {
switch (mouse) {
case 1:
break;
case 2:
{
QPopupMenu m;
m.insertItem( tr( "Play Selected" ), this, SLOT( playSelected() ));
m.insertItem( tr( "Remove" ), this, SLOT( removeSelected() ));
m.exec( QCursor::pos() );
}
break;
};
}
void PlayListWidget::listDelete() {
Config cfg( "OpiePlayer" );
cfg.setGroup("PlayList");
QString currentPlaylist = cfg.readEntry("CurrentPlaylist","");
QString file;
- int noOfFiles = cfg.readNumEntry("NumberOfFiles", 0 );
+// int noOfFiles = cfg.readNumEntry("NumberOfFiles", 0 );
switch ( tabWidget->currentPageIndex()) {
case 0:
break;
case 1:
{
file = audioView->currentItem()->text(0);
QListIterator<DocLnk> Pdit( files.children() );
for ( ; Pdit.current(); ++Pdit ) {
if( Pdit.current()->name() == file) {
LnkProperties prop( Pdit.current() );
prop.showMaximized();
prop.exec();
}
}
populateAudioView();
}
break;
case 2:
{
}
break;
};
}
@@ -1019,49 +1020,49 @@ void PlayListWidget::keyReleaseEvent( QKeyEvent *e)
break;
case Key_2:
tabWidget->setCurrentPage(1);
break;
case Key_3:
tabWidget->setCurrentPage(2);
break;
case Key_4:
tabWidget->setCurrentPage(3);
break;
case Key_Down:
if ( !d->selectedFiles->next() )
d->selectedFiles->first();
break;
case Key_Up:
if ( !d->selectedFiles->prev() )
// d->selectedFiles->last();
break;
}
}
-void PlayListWidget::keyPressEvent( QKeyEvent *e)
+void PlayListWidget::keyPressEvent( QKeyEvent *)
{
// qDebug("Key press");
// switch ( e->key() ) {
// ////////////////////////////// Zaurus keys
// case Key_A: //add to playlist
// qDebug("Add");
// addSelected();
// break;
// case Key_R: //remove from playlist
// removeSelected();
// break;
// case Key_P: //play
// qDebug("Play");
// playSelected();
// break;
// case Key_Space:
// qDebug("Play");
// playSelected();
// break;
// }
}
void PlayListWidget::doBlank() {
qDebug("do blanking");