Changeset 651 for trunk/demos/qmediaplayer
- Timestamp:
- Mar 8, 2010, 12:52:58 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.6.2 (added) merged: 650 /branches/vendor/nokia/qt/current merged: 649 /branches/vendor/nokia/qt/4.6.1 removed
- Property svn:mergeinfo changed
-
trunk/demos/qmediaplayer/main.cpp
r561 r651 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 20 09Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/demos/qmediaplayer/mediaplayer.cpp
r561 r651 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 20 09Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 674 674 } 675 675 676 void MediaPlayer::setLocation(const QString& location) 677 { 678 setWindowTitle(location.right(location.length() - location.lastIndexOf('/') - 1)); 679 m_MediaObject.setCurrentSource(Phonon::MediaSource(QUrl::fromEncoded(location.toUtf8()))); 680 m_MediaObject.play(); 681 } 682 676 683 bool MediaPlayer::playPauseForDialog() 677 684 { … … 851 858 sourceURL = QInputDialog::getText(this, tr("Open Location"), tr("Please enter a valid address here:"), QLineEdit::Normal, sourceURL, &ok); 852 859 if (ok && !sourceURL.isEmpty()) { 853 setWindowTitle(sourceURL.right(sourceURL.length() - sourceURL.lastIndexOf('/') - 1)); 854 m_MediaObject.setCurrentSource(Phonon::MediaSource(QUrl::fromEncoded(sourceURL.toUtf8()))); 855 m_MediaObject.play(); 860 setLocation(sourceURL); 856 861 settings.setValue("location", sourceURL); 857 862 } … … 893 898 894 899 if (!list.isEmpty()) { 895 m_MediaObject. setCurrentSource(Phonon::MediaSource(list[0]));896 m_MediaObject.play();900 m_MediaObject.clearQueue(); 901 setLocation(list[0].toString()); 897 902 for (int i = 1; i < list.count(); i++) 898 903 m_MediaObject.enqueue(Phonon::MediaSource(list[i])); 904 m_MediaObject.play(); 899 905 } 900 906 -
trunk/demos/qmediaplayer/mediaplayer.h
r561 r651 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 20 09Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 113 113 void handleDrop(QDropEvent *e); 114 114 void setFile(const QString &text); 115 void setLocation(const QString &location); 115 116 void initVideoWindow(); 116 117 void initSettingsDialog();
Note:
See TracChangeset
for help on using the changeset viewer.