mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-29 01:16:20 -05:00
commit
ef753d5252
@ -57,7 +57,6 @@
|
|||||||
#include "chat/ChatDialog.h"
|
#include "chat/ChatDialog.h"
|
||||||
#include "RetroShareLink.h"
|
#include "RetroShareLink.h"
|
||||||
#include "SoundManager.h"
|
#include "SoundManager.h"
|
||||||
#include "PlayerPage.h"
|
|
||||||
#include "notifyqt.h"
|
#include "notifyqt.h"
|
||||||
#include "common/UserNotify.h"
|
#include "common/UserNotify.h"
|
||||||
#include "gui/ServicePermissionDialog.h"
|
#include "gui/ServicePermissionDialog.h"
|
||||||
@ -190,7 +189,6 @@ MainWindow::MainWindow(QWidget* parent, Qt::WindowFlags flags)
|
|||||||
gxschannelDialog=NULL;
|
gxschannelDialog=NULL;
|
||||||
gxsforumDialog=NULL;
|
gxsforumDialog=NULL;
|
||||||
postedDialog=NULL;
|
postedDialog=NULL;
|
||||||
playerDialog=NULL;
|
|
||||||
|
|
||||||
/* Invoke the Qt Designer generated QObject setup routine */
|
/* Invoke the Qt Designer generated QObject setup routine */
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
@ -418,7 +416,6 @@ void MainWindow::initStackedPage()
|
|||||||
addPage(gxschannelDialog = new GxsChannelDialog(ui->stackPages), grp, ¬ify);
|
addPage(gxschannelDialog = new GxsChannelDialog(ui->stackPages), grp, ¬ify);
|
||||||
addPage(gxsforumDialog = new GxsForumsDialog(ui->stackPages), grp, ¬ify);
|
addPage(gxsforumDialog = new GxsForumsDialog(ui->stackPages), grp, ¬ify);
|
||||||
addPage(postedDialog = new PostedDialog(ui->stackPages), grp, ¬ify);
|
addPage(postedDialog = new PostedDialog(ui->stackPages), grp, ¬ify);
|
||||||
addPage(playerDialog = new PlayerPage(ui->stackPages), grp, NULL);
|
|
||||||
|
|
||||||
#ifdef RS_USE_NEW_PEOPLE_DIALOG
|
#ifdef RS_USE_NEW_PEOPLE_DIALOG
|
||||||
PeopleDialog *peopleDialog = NULL;
|
PeopleDialog *peopleDialog = NULL;
|
||||||
@ -997,9 +994,6 @@ void SetForegroundWindowInternal(HWND hWnd)
|
|||||||
case Posted:
|
case Posted:
|
||||||
_instance->ui->stackPages->setCurrentPage( _instance->postedDialog );
|
_instance->ui->stackPages->setCurrentPage( _instance->postedDialog );
|
||||||
return true ;
|
return true ;
|
||||||
case Player:
|
|
||||||
_instance->ui->stackPages->setCurrentPage( _instance->playerDialog );
|
|
||||||
return true ;
|
|
||||||
default:
|
default:
|
||||||
std::cerr << "Show page called on value that is not handled yet. Please code it! (value = " << page << ")" << std::endl;
|
std::cerr << "Show page called on value that is not handled yet. Please code it! (value = " << page << ")" << std::endl;
|
||||||
}
|
}
|
||||||
@ -1082,8 +1076,6 @@ void SetForegroundWindowInternal(HWND hWnd)
|
|||||||
return _instance->gxsforumDialog;
|
return _instance->gxsforumDialog;
|
||||||
case Posted:
|
case Posted:
|
||||||
return _instance->postedDialog;
|
return _instance->postedDialog;
|
||||||
case Player:
|
|
||||||
return _instance->playerDialog;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -61,7 +61,7 @@ class TransfersDialog;
|
|||||||
class MessagesDialog;
|
class MessagesDialog;
|
||||||
class PluginsPage;
|
class PluginsPage;
|
||||||
class HomePage;
|
class HomePage;
|
||||||
class PlayerPage;
|
//class ChannelFeed;
|
||||||
class BandwidthGraph;
|
class BandwidthGraph;
|
||||||
class MainPage;
|
class MainPage;
|
||||||
class NewsFeed;
|
class NewsFeed;
|
||||||
@ -92,9 +92,8 @@ public:
|
|||||||
Forums = 7, /** Forums page. */
|
Forums = 7, /** Forums page. */
|
||||||
Search = 8, /** Search page. */
|
Search = 8, /** Search page. */
|
||||||
Posted = 11, /** Posted links */
|
Posted = 11, /** Posted links */
|
||||||
People = 12, /** People page. */
|
People = 12, /** People page. */
|
||||||
Options = 13, /** People page. */
|
Options = 13 /** People page. */
|
||||||
Player = 14 /** Player page. */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -154,7 +153,6 @@ public:
|
|||||||
GxsChannelDialog *gxschannelDialog ;
|
GxsChannelDialog *gxschannelDialog ;
|
||||||
GxsForumsDialog *gxsforumDialog ;
|
GxsForumsDialog *gxsforumDialog ;
|
||||||
PostedDialog *postedDialog;
|
PostedDialog *postedDialog;
|
||||||
PlayerPage *playerDialog;
|
|
||||||
|
|
||||||
// ForumsDialog *forumsDialog;
|
// ForumsDialog *forumsDialog;
|
||||||
// ChannelFeed *channelFeed;
|
// ChannelFeed *channelFeed;
|
||||||
|
@ -1,209 +0,0 @@
|
|||||||
/*******************************************************************************
|
|
||||||
* gui/PlayerPage.cpp *
|
|
||||||
* *
|
|
||||||
* Copyright (C) 2020 RetroShare Team <retroshare.project@gmail.com> *
|
|
||||||
* *
|
|
||||||
* This program is free software: you can redistribute it and/or modify *
|
|
||||||
* it under the terms of the GNU Affero General Public License as *
|
|
||||||
* published by the Free Software Foundation, either version 3 of the *
|
|
||||||
* License, or (at your option) any later version. *
|
|
||||||
* *
|
|
||||||
* This program is distributed in the hope that it will be useful, *
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
||||||
* GNU Affero General Public License for more details. *
|
|
||||||
* *
|
|
||||||
* You should have received a copy of the GNU Affero General Public License *
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
|
|
||||||
* *
|
|
||||||
*******************************************************************************/
|
|
||||||
|
|
||||||
#include "PlayerPage.h"
|
|
||||||
#include "ui_PlayerPage.h"
|
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
|
|
||||||
#include <QUrlQuery>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <iostream>
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
#include <QtWidgets>
|
|
||||||
#include <QVideoWidget>
|
|
||||||
|
|
||||||
|
|
||||||
PlayerPage::PlayerPage(QWidget *parent) :
|
|
||||||
MainPage(parent),
|
|
||||||
ui(new Ui::PlayerPage)
|
|
||||||
{
|
|
||||||
ui->setupUi(this);
|
|
||||||
|
|
||||||
mediaPlayer = new QMediaPlayer(this, QMediaPlayer::VideoSurface);
|
|
||||||
videoWidget = new QVideoWidget;
|
|
||||||
|
|
||||||
videoWidget->show();
|
|
||||||
videoWidget->setStyleSheet("background-color: #1f1f1f;");
|
|
||||||
|
|
||||||
playButton = new QPushButton;
|
|
||||||
playButton->setEnabled(false);
|
|
||||||
playButton->setIcon(style()->standardIcon(QStyle::SP_MediaPlay));
|
|
||||||
|
|
||||||
stopButton = new QPushButton;
|
|
||||||
stopButton->setIcon(style()->standardIcon(QStyle::SP_MediaStop));
|
|
||||||
stopButton->setEnabled(false);
|
|
||||||
|
|
||||||
fullScreenButton = new QPushButton(tr("FullScreen"));
|
|
||||||
fullScreenButton->setCheckable(true);
|
|
||||||
fullScreenButton->setEnabled(false);
|
|
||||||
|
|
||||||
positionSlider = new QSlider(Qt::Horizontal);
|
|
||||||
positionSlider->setRange(0, mediaPlayer->duration() / 1000);
|
|
||||||
|
|
||||||
labelDuration = new QLabel;
|
|
||||||
|
|
||||||
errorLabel = new QLabel;
|
|
||||||
errorLabel->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);
|
|
||||||
|
|
||||||
QBoxLayout *controlLayout = new QHBoxLayout;
|
|
||||||
controlLayout->setMargin(0);
|
|
||||||
|
|
||||||
controlLayout->addWidget(playButton);
|
|
||||||
controlLayout->addWidget(stopButton);
|
|
||||||
controlLayout->addWidget(positionSlider);
|
|
||||||
controlLayout->addWidget(labelDuration);
|
|
||||||
controlLayout->addWidget(fullScreenButton);
|
|
||||||
|
|
||||||
QBoxLayout *layout = new QVBoxLayout;
|
|
||||||
layout->addWidget(videoWidget);
|
|
||||||
layout->addLayout(controlLayout);
|
|
||||||
layout->addWidget(errorLabel);
|
|
||||||
|
|
||||||
ui->widget->setLayout(layout);
|
|
||||||
|
|
||||||
mediaPlayer->setVideoOutput(videoWidget);
|
|
||||||
|
|
||||||
connect(playButton, &QAbstractButton::clicked,this, &PlayerPage::play);
|
|
||||||
connect(stopButton, &QAbstractButton::clicked,this, &PlayerPage::stopVideo);
|
|
||||||
connect(mediaPlayer, &QMediaPlayer::stateChanged,this, &PlayerPage::mediaStateChanged);
|
|
||||||
connect(mediaPlayer, &QMediaPlayer::positionChanged, this, &PlayerPage::positionChanged);
|
|
||||||
connect(mediaPlayer, &QMediaPlayer::durationChanged, this, &PlayerPage::durationChanged);
|
|
||||||
connect(mediaPlayer, QOverload<QMediaPlayer::Error>::of(&QMediaPlayer::error),this, &PlayerPage::handleError);
|
|
||||||
connect(mediaPlayer, SIGNAL(videoAvailableChanged(bool)), this, SLOT(videoAvailableChanged(bool)));
|
|
||||||
connect(positionSlider, &QSlider::sliderMoved, this, &PlayerPage::seek);
|
|
||||||
}
|
|
||||||
|
|
||||||
PlayerPage::~PlayerPage()
|
|
||||||
{
|
|
||||||
delete ui;
|
|
||||||
}
|
|
||||||
|
|
||||||
void PlayerPage::setUrl(const QUrl &url)
|
|
||||||
{
|
|
||||||
errorLabel->setText(QString());
|
|
||||||
mediaPlayer->setMedia(url);
|
|
||||||
playButton->setEnabled(true);
|
|
||||||
play();
|
|
||||||
}
|
|
||||||
|
|
||||||
void PlayerPage::play()
|
|
||||||
{
|
|
||||||
switch (mediaPlayer->state()) {
|
|
||||||
//case QMediaPlayer::StoppedState:
|
|
||||||
case QMediaPlayer::PlayingState:
|
|
||||||
mediaPlayer->pause();
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
mediaPlayer->play();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void PlayerPage::stopVideo()
|
|
||||||
{
|
|
||||||
mediaPlayer->stop();
|
|
||||||
}
|
|
||||||
|
|
||||||
void PlayerPage::mediaStateChanged(QMediaPlayer::State state)
|
|
||||||
{
|
|
||||||
switch (state) {
|
|
||||||
case QMediaPlayer::StoppedState:
|
|
||||||
stopButton->setEnabled(false);
|
|
||||||
playButton->setIcon(style()->standardIcon(QStyle::SP_MediaPlay));
|
|
||||||
break;
|
|
||||||
case QMediaPlayer::PlayingState:
|
|
||||||
stopButton->setEnabled(true);
|
|
||||||
playButton->setIcon(style()->standardIcon(QStyle::SP_MediaPause));
|
|
||||||
break;
|
|
||||||
case QMediaPlayer::PausedState:
|
|
||||||
stopButton->setEnabled(true);
|
|
||||||
playButton->setIcon(style()->standardIcon(QStyle::SP_MediaPlay));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void PlayerPage::positionChanged(qint64 progress)
|
|
||||||
{
|
|
||||||
if (!positionSlider->isSliderDown())
|
|
||||||
positionSlider->setValue(progress / 1000);
|
|
||||||
|
|
||||||
updateDurationInfo(progress / 1000);
|
|
||||||
}
|
|
||||||
|
|
||||||
void PlayerPage::durationChanged(qint64 duration)
|
|
||||||
{
|
|
||||||
duration = duration / 1000;
|
|
||||||
positionSlider->setMaximum(duration);
|
|
||||||
}
|
|
||||||
|
|
||||||
void PlayerPage::seek(int seconds)
|
|
||||||
{
|
|
||||||
mediaPlayer->setPosition(seconds * 1000);
|
|
||||||
}
|
|
||||||
|
|
||||||
void PlayerPage::handleError()
|
|
||||||
{
|
|
||||||
playButton->setEnabled(false);
|
|
||||||
const QString errorString = mediaPlayer->errorString();
|
|
||||||
QString message = "Error: ";
|
|
||||||
if (errorString.isEmpty())
|
|
||||||
message += " #" + QString::number(int(mediaPlayer->error()));
|
|
||||||
else
|
|
||||||
message += errorString;
|
|
||||||
errorLabel->setText(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
void PlayerPage::videoAvailableChanged(bool available)
|
|
||||||
{
|
|
||||||
if (!available) {
|
|
||||||
disconnect(fullScreenButton, SIGNAL(clicked(bool)),
|
|
||||||
videoWidget, SLOT(setFullScreen(bool)));
|
|
||||||
disconnect(videoWidget, SIGNAL(fullScreenChanged(bool)),
|
|
||||||
fullScreenButton, SLOT(setChecked(bool)));
|
|
||||||
videoWidget->setFullScreen(false);
|
|
||||||
} else {
|
|
||||||
connect(fullScreenButton, SIGNAL(clicked(bool)),
|
|
||||||
videoWidget, SLOT(setFullScreen(bool)));
|
|
||||||
connect(videoWidget, SIGNAL(fullScreenChanged(bool)),
|
|
||||||
fullScreenButton, SLOT(setChecked(bool)));
|
|
||||||
|
|
||||||
if (fullScreenButton->isChecked())
|
|
||||||
videoWidget->setFullScreen(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void PlayerPage::updateDurationInfo(qint64 currentInfo)
|
|
||||||
{
|
|
||||||
QString tStr;
|
|
||||||
if (currentInfo || duration) {
|
|
||||||
QTime currentTime((currentInfo / 3600) % 60, (currentInfo / 60) % 60,
|
|
||||||
currentInfo % 60, (currentInfo * 1000) % 1000);
|
|
||||||
QTime totalTime((duration / 3600) % 60, (duration / 60) % 60,
|
|
||||||
duration % 60, (duration * 1000) % 1000);
|
|
||||||
QString format = "mm:ss";
|
|
||||||
if (duration > 3600)
|
|
||||||
format = "hh:mm:ss";
|
|
||||||
tStr = currentTime.toString(format) + " / " + totalTime.toString(format);
|
|
||||||
}
|
|
||||||
labelDuration->setText(tStr);
|
|
||||||
}
|
|
@ -1,91 +0,0 @@
|
|||||||
/*******************************************************************************
|
|
||||||
* gui/PlayerPage.h *
|
|
||||||
* *
|
|
||||||
* Copyright (C) 2020 RetroShare Team <retroshare.project@gmail.com> *
|
|
||||||
* *
|
|
||||||
* This program is free software: you can redistribute it and/or modify *
|
|
||||||
* it under the terms of the GNU Affero General Public License as *
|
|
||||||
* published by the Free Software Foundation, either version 3 of the *
|
|
||||||
* License, or (at your option) any later version. *
|
|
||||||
* *
|
|
||||||
* This program is distributed in the hope that it will be useful, *
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
||||||
* GNU Affero General Public License for more details. *
|
|
||||||
* *
|
|
||||||
* You should have received a copy of the GNU Affero General Public License *
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
|
|
||||||
* *
|
|
||||||
*******************************************************************************/
|
|
||||||
|
|
||||||
#ifndef PLAYERPAGE_H
|
|
||||||
#define PLAYERPAGE_H
|
|
||||||
|
|
||||||
#include <retroshare-gui/mainpage.h>
|
|
||||||
#include <retroshare/rsfiles.h>
|
|
||||||
#include <retroshare/rspeers.h>
|
|
||||||
|
|
||||||
#include <QMediaPlayer>
|
|
||||||
#include <QWidget>
|
|
||||||
#include <QVideoWidget>
|
|
||||||
|
|
||||||
class QAbstractButton;
|
|
||||||
class QPushButton;
|
|
||||||
class QSlider;
|
|
||||||
class QLabel;
|
|
||||||
class QUrl;
|
|
||||||
|
|
||||||
|
|
||||||
namespace Ui {
|
|
||||||
class PlayerPage;
|
|
||||||
}
|
|
||||||
|
|
||||||
class PlayerPage : public MainPage
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit PlayerPage(QWidget *parent);
|
|
||||||
~PlayerPage();
|
|
||||||
|
|
||||||
virtual QIcon iconPixmap() const { return QIcon(":/icons/png/video-camera.png") ; } //MainPage
|
|
||||||
virtual QString pageName() const { return tr("Player") ; } //MainPage
|
|
||||||
virtual QString helpText() const { return ""; } //MainPage
|
|
||||||
|
|
||||||
void setUrl(const QUrl &url);
|
|
||||||
protected:
|
|
||||||
//virtual void keyPressEvent(QKeyEvent *e) ;
|
|
||||||
|
|
||||||
public slots:
|
|
||||||
|
|
||||||
void play();
|
|
||||||
void stopVideo();
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void mediaStateChanged(QMediaPlayer::State state);
|
|
||||||
void positionChanged(qint64 position);
|
|
||||||
void durationChanged(qint64 duration);
|
|
||||||
void handleError();
|
|
||||||
void videoAvailableChanged(bool available);
|
|
||||||
|
|
||||||
void seek(int seconds);
|
|
||||||
|
|
||||||
private:
|
|
||||||
void updateDurationInfo(qint64 currentInfo);
|
|
||||||
|
|
||||||
QMediaPlayer* mediaPlayer;
|
|
||||||
QVideoWidget *videoWidget;
|
|
||||||
QPushButton *playButton;
|
|
||||||
QPushButton *fullScreenButton;
|
|
||||||
QPushButton *stopButton;
|
|
||||||
QSlider *positionSlider;
|
|
||||||
QLabel *errorLabel;
|
|
||||||
QLabel *labelDuration;
|
|
||||||
qint64 duration;
|
|
||||||
|
|
||||||
Ui::PlayerPage *ui;
|
|
||||||
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // PlayerPage_H
|
|
@ -1,27 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>PlayerPage</class>
|
|
||||||
<widget class="QWidget" name="PlayerPage">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>612</width>
|
|
||||||
<height>450</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>Form</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QWidget" name="widget" native="true"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<resources>
|
|
||||||
<include location="icons.qrc"/>
|
|
||||||
<include location="images.qrc"/>
|
|
||||||
</resources>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
@ -24,8 +24,6 @@
|
|||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
|
||||||
#include "SubFileItem.h"
|
#include "SubFileItem.h"
|
||||||
#include "gui/PlayerPage.h"
|
|
||||||
#include "gui/MainWindow.h"
|
|
||||||
|
|
||||||
#include <gui/common/RsUrlHandler.h>
|
#include <gui/common/RsUrlHandler.h>
|
||||||
#include <retroshare/rsfiles.h>
|
#include <retroshare/rsfiles.h>
|
||||||
@ -99,7 +97,6 @@ SubFileItem::SubFileItem(const RsFileHash &hash, const std::string &name, const
|
|||||||
void SubFileItem::Setup()
|
void SubFileItem::Setup()
|
||||||
{
|
{
|
||||||
connect( playButton, SIGNAL( clicked( ) ), this, SLOT( play ( ) ) );
|
connect( playButton, SIGNAL( clicked( ) ), this, SLOT( play ( ) ) );
|
||||||
connect( mediaplayerButton, SIGNAL( clicked( ) ), this, SLOT( playmedia ( ) ) );
|
|
||||||
connect( downloadButton, SIGNAL( clicked( ) ), this, SLOT( download ( ) ) );
|
connect( downloadButton, SIGNAL( clicked( ) ), this, SLOT( download ( ) ) );
|
||||||
connect( cancelButton, SIGNAL( clicked( ) ), this, SLOT( cancel( ) ) );
|
connect( cancelButton, SIGNAL( clicked( ) ), this, SLOT( cancel( ) ) );
|
||||||
connect( deleteButton, SIGNAL( clicked( ) ), this, SLOT( del( ) ) );
|
connect( deleteButton, SIGNAL( clicked( ) ), this, SLOT( del( ) ) );
|
||||||
@ -607,38 +604,6 @@ void SubFileItem::play()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SubFileItem::playmedia()
|
|
||||||
{
|
|
||||||
FileInfo info;
|
|
||||||
FileSearchFlags flags = RS_FILE_HINTS_DOWNLOAD | RS_FILE_HINTS_EXTRA | RS_FILE_HINTS_LOCAL | RS_FILE_HINTS_NETWORK_WIDE;
|
|
||||||
|
|
||||||
|
|
||||||
if (!rsFiles->FileDetails( mFileHash, flags, info))
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (done()) {
|
|
||||||
|
|
||||||
/* Play the Video with the Qt Mediaplayer */
|
|
||||||
QFileInfo qinfo;
|
|
||||||
qinfo.setFile(info.path.c_str());
|
|
||||||
if (qinfo.exists()) {
|
|
||||||
MainWindow::showWindow(MainWindow::Player);
|
|
||||||
PlayerPage *Player = dynamic_cast<PlayerPage*>(MainWindow::getPage(MainWindow::Player));
|
|
||||||
Player->setUrl(QUrl::fromLocalFile(qinfo.absoluteFilePath()));
|
|
||||||
}else{
|
|
||||||
QMessageBox::information(this, tr("Play File"),
|
|
||||||
tr("File %1 does not exist at location.").arg(info.path.c_str()));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
/* rise a message box for incompleted download file */
|
|
||||||
QMessageBox::information(this, tr("Play File"),
|
|
||||||
tr("File %1 is not completed.").arg(info.fname.c_str()));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void SubFileItem::download()
|
void SubFileItem::download()
|
||||||
{
|
{
|
||||||
#ifdef DEBUG_ITEM
|
#ifdef DEBUG_ITEM
|
||||||
|
@ -82,7 +82,6 @@ public slots:
|
|||||||
void play();
|
void play();
|
||||||
void mediatype();
|
void mediatype();
|
||||||
void copyLink();
|
void copyLink();
|
||||||
void playmedia();
|
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void toggle();
|
void toggle();
|
||||||
|
@ -70,6 +70,12 @@
|
|||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>26</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="focusPolicy">
|
<property name="focusPolicy">
|
||||||
<enum>Qt::NoFocus</enum>
|
<enum>Qt::NoFocus</enum>
|
||||||
</property>
|
</property>
|
||||||
@ -90,6 +96,12 @@
|
|||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>26</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="focusPolicy">
|
<property name="focusPolicy">
|
||||||
<enum>Qt::NoFocus</enum>
|
<enum>Qt::NoFocus</enum>
|
||||||
</property>
|
</property>
|
||||||
@ -105,23 +117,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="mediaplayerButton">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Play in Qt Media Player</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../icons.qrc">
|
|
||||||
<normaloff>:/icons/png/video-camera.png</normaloff>:/icons/png/video-camera.png</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="iconSize">
|
|
||||||
<size>
|
|
||||||
<width>16</width>
|
|
||||||
<height>16</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="playButton">
|
<widget class="QPushButton" name="playButton">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -130,6 +125,12 @@
|
|||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>26</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="focusPolicy">
|
<property name="focusPolicy">
|
||||||
<enum>Qt::NoFocus</enum>
|
<enum>Qt::NoFocus</enum>
|
||||||
</property>
|
</property>
|
||||||
@ -179,6 +180,12 @@
|
|||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>26</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="focusPolicy">
|
<property name="focusPolicy">
|
||||||
<enum>Qt::NoFocus</enum>
|
<enum>Qt::NoFocus</enum>
|
||||||
</property>
|
</property>
|
||||||
|
@ -122,9 +122,8 @@
|
|||||||
<file>icons/png/thumbs-down.png</file>
|
<file>icons/png/thumbs-down.png</file>
|
||||||
<file>icons/png/thumbs-neutral.png</file>
|
<file>icons/png/thumbs-neutral.png</file>
|
||||||
<file>icons/png/thumbs-up.png</file>
|
<file>icons/png/thumbs-up.png</file>
|
||||||
<file>icons/png/typing.png</file>
|
<file>icons/png/typing.png</file>
|
||||||
<file>icons/png/video.png</file>
|
<file>icons/png/video.png</file>
|
||||||
<file>icons/png/video-camera.png</file>
|
|
||||||
<file>icons/quit_128.png</file>
|
<file>icons/quit_128.png</file>
|
||||||
<file>icons/search_red_128.png</file>
|
<file>icons/search_red_128.png</file>
|
||||||
<file>icons/security_high_128.png</file>
|
<file>icons/security_high_128.png</file>
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 3.9 KiB |
@ -19,7 +19,7 @@
|
|||||||
!include("../../retroshare.pri"): error("Could not include file ../../retroshare.pri")
|
!include("../../retroshare.pri"): error("Could not include file ../../retroshare.pri")
|
||||||
|
|
||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
QT += network xml multimedia multimediawidgets
|
QT += network xml
|
||||||
CONFIG += qt gui uic qrc resources idle
|
CONFIG += qt gui uic qrc resources idle
|
||||||
CONFIG += console
|
CONFIG += console
|
||||||
TARGET = retroshare
|
TARGET = retroshare
|
||||||
@ -421,7 +421,6 @@ HEADERS += rshare.h \
|
|||||||
gui/SoundManager.h \
|
gui/SoundManager.h \
|
||||||
gui/HelpDialog.h \
|
gui/HelpDialog.h \
|
||||||
gui/LogoBar.h \
|
gui/LogoBar.h \
|
||||||
gui/PlayerPage.h \
|
|
||||||
gui/common/AvatarDialog.h \
|
gui/common/AvatarDialog.h \
|
||||||
gui/FileTransfer/SearchDialog.h \
|
gui/FileTransfer/SearchDialog.h \
|
||||||
gui/FileTransfer/SharedFilesDialog.h \
|
gui/FileTransfer/SharedFilesDialog.h \
|
||||||
@ -677,7 +676,6 @@ FORMS += gui/StartDialog.ui \
|
|||||||
# gui/ShareDialog.ui \
|
# gui/ShareDialog.ui \
|
||||||
gui/help/browser/helpbrowser.ui \
|
gui/help/browser/helpbrowser.ui \
|
||||||
gui/HelpDialog.ui \
|
gui/HelpDialog.ui \
|
||||||
gui/PlayerPage.ui \
|
|
||||||
gui/ServicePermissionDialog.ui \
|
gui/ServicePermissionDialog.ui \
|
||||||
gui/profile/ProfileWidget.ui \
|
gui/profile/ProfileWidget.ui \
|
||||||
gui/profile/StatusMessage.ui \
|
gui/profile/StatusMessage.ui \
|
||||||
@ -800,7 +798,6 @@ SOURCES += main.cpp \
|
|||||||
# gui/ShareDialog.cpp \
|
# gui/ShareDialog.cpp \
|
||||||
# gui/SFListDelegate.cpp \
|
# gui/SFListDelegate.cpp \
|
||||||
gui/SoundManager.cpp \
|
gui/SoundManager.cpp \
|
||||||
gui/PlayerPage.cpp \
|
|
||||||
gui/im_history/ImHistoryBrowser.cpp \
|
gui/im_history/ImHistoryBrowser.cpp \
|
||||||
gui/im_history/IMHistoryItemDelegate.cpp \
|
gui/im_history/IMHistoryItemDelegate.cpp \
|
||||||
gui/im_history/IMHistoryItemPainter.cpp \
|
gui/im_history/IMHistoryItemPainter.cpp \
|
||||||
|
Loading…
Reference in New Issue
Block a user