StelVideoMgr.cpp   StelVideoMgr.cpp 
skipping to change at line 20 skipping to change at line 20
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA. * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
*/ */
#include "StelVideoMgr.hpp" #include "StelVideoMgr.hpp"
#include "StelMainGraphicsView.hpp" #include "StelMainView.hpp"
#include <QDebug> #include <QDebug>
#include <QDir> #include <QDir>
StelVideoMgr::StelVideoMgr() StelVideoMgr::StelVideoMgr()
{ {
} }
#ifdef HAVE_QT_PHONON #if 0
StelVideoMgr::~StelVideoMgr() StelVideoMgr::~StelVideoMgr()
{ {
foreach(QString id, videoObjects.keys()) foreach(QString id, videoObjects.keys())
{ {
dropVideo(id); dropVideo(id);
} }
} }
void StelVideoMgr::loadVideo(const QString& filename, const QString& id, fl oat x, float y, bool show, float alpha) void StelVideoMgr::loadVideo(const QString& filename, const QString& id, fl oat x, float y, bool show, float alpha)
{ {
skipping to change at line 51 skipping to change at line 51
qWarning() << "[StelVideoMgr] Video object with ID" << id << "already exists, dropping it"; qWarning() << "[StelVideoMgr] Video object with ID" << id << "already exists, dropping it";
dropVideo(id); dropVideo(id);
} }
videoObjects[id] = new VideoPlayer; videoObjects[id] = new VideoPlayer;
videoObjects[id]->widget = new QWidget(); videoObjects[id]->widget = new QWidget();
videoObjects[id]->player = new Phonon::VideoPlayer(Phonon::VideoCate gory, videoObjects[id]->widget); videoObjects[id]->player = new Phonon::VideoPlayer(Phonon::VideoCate gory, videoObjects[id]->widget);
videoObjects[id]->player->load(Phonon::MediaSource(filename)); videoObjects[id]->player->load(Phonon::MediaSource(filename));
videoObjects[id]->pWidget = videoObjects[id]->pWidget =
StelMainGraphicsView::getInstance().scene()->addWidget(video Objects[id]->widget, Qt::FramelessWindowHint); StelMainView::getInstance().scene()->addWidget(videoObjects[ id]->widget, Qt::FramelessWindowHint);
videoObjects[id]->pWidget->setPos(x, y); videoObjects[id]->pWidget->setPos(x, y);
videoObjects[id]->pWidget->setOpacity(alpha); videoObjects[id]->pWidget->setOpacity(alpha);
videoObjects[id]->pWidget->setVisible(show); videoObjects[id]->pWidget->setVisible(show);
videoObjects[id]->player->show(); videoObjects[id]->player->show();
} }
void StelVideoMgr::playVideo(const QString& id) void StelVideoMgr::playVideo(const QString& id)
{ {
skipping to change at line 180 skipping to change at line 180
{ {
if (videoObjects.contains(id)) if (videoObjects.contains(id))
{ {
if (videoObjects[id]->pWidget!=NULL) if (videoObjects[id]->pWidget!=NULL)
{ {
videoObjects[id]->pWidget->setVisible(show); videoObjects[id]->pWidget->setVisible(show);
} }
} }
} }
#else // HAVE_QT_PHONON #else
void StelVideoMgr::loadVideo(const QString& filename, const QString& id, fl oat x, float y, bool show, float alpha) void StelVideoMgr::loadVideo(const QString& filename, const QString& id, fl oat x, float y, bool show, float alpha)
{ {
qWarning() << "[StelVideoMgr] This build of Stellarium does not supp ort video - cannot load video" << QDir::toNativeSeparators(filename) << id << x << y << show << alpha; qWarning() << "[StelVideoMgr] This build of Stellarium does not supp ort video - cannot load video" << QDir::toNativeSeparators(filename) << id << x << y << show << alpha;
} }
StelVideoMgr::~StelVideoMgr() {;} StelVideoMgr::~StelVideoMgr() {;}
void StelVideoMgr::playVideo(const QString&) {;} void StelVideoMgr::playVideo(const QString&) {;}
void StelVideoMgr::pauseVideo(const QString&) {;} void StelVideoMgr::pauseVideo(const QString&) {;}
void StelVideoMgr::stopVideo(const QString&) {;} void StelVideoMgr::stopVideo(const QString&) {;}
void StelVideoMgr::dropVideo(const QString&) {;} void StelVideoMgr::dropVideo(const QString&) {;}
void StelVideoMgr::seekVideo(const QString&, qint64) {;} void StelVideoMgr::seekVideo(const QString&, qint64) {;}
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/