Compare commits
No commits in common. "0.5" and "0.2" have entirely different histories.
6 changed files with 22 additions and 52 deletions
Binary file not shown.
Before Width: | Height: | Size: 318 B |
Binary file not shown.
Before Width: | Height: | Size: 766 B |
|
@ -22,8 +22,3 @@ FORMS += \
|
||||||
qnx: target.path = /tmp/$${TARGET}/bin
|
qnx: target.path = /tmp/$${TARGET}/bin
|
||||||
else: unix:!android: target.path = /opt/$${TARGET}/bin
|
else: unix:!android: target.path = /opt/$${TARGET}/bin
|
||||||
!isEmpty(target.path): INSTALLS += target
|
!isEmpty(target.path): INSTALLS += target
|
||||||
|
|
||||||
RESOURCES += \
|
|
||||||
BPM-Studio-Net-Client.qrc
|
|
||||||
|
|
||||||
RC_ICONS = BPM-Studio-Net-Client-32x32.ico
|
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
<RCC>
|
|
||||||
<qresource prefix="/">
|
|
||||||
<file>BPM-Studio-Net-Client-16x16.ico</file>
|
|
||||||
<file>BPM-Studio-Net-Client-32x32.ico</file>
|
|
||||||
</qresource>
|
|
||||||
</RCC>
|
|
|
@ -7,23 +7,18 @@ MainWindow::MainWindow(QWidget *parent)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
timer = new QTimer(this);
|
QTimer *timer = new QTimer(this);
|
||||||
timer->setInterval(5000);
|
timer->setInterval(1000);
|
||||||
connect(timer,&QTimer::timeout,this,&MainWindow::holen_status);
|
connect(timer,&QTimer::timeout,this,&MainWindow::holen_status);
|
||||||
timer->start();
|
timer->start();
|
||||||
|
|
||||||
manager = new QNetworkAccessManager();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MainWindow::~MainWindow()
|
MainWindow::~MainWindow()
|
||||||
{
|
{
|
||||||
delete timer;
|
|
||||||
delete manager;
|
|
||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::holen_status(){
|
void MainWindow::holen_status(){
|
||||||
status_loop="ja";
|
|
||||||
//Autoplay
|
//Autoplay
|
||||||
befehl=befehl_getauto;
|
befehl=befehl_getauto;
|
||||||
sende_befehl();
|
sende_befehl();
|
||||||
|
@ -60,12 +55,12 @@ void MainWindow::holen_status(){
|
||||||
befehl=befehl_file;
|
befehl=befehl_file;
|
||||||
sende_befehl();
|
sende_befehl();
|
||||||
ui->lineEdit_titel->setText((status.split("<br>")[0]));
|
ui->lineEdit_titel->setText((status.split("<br>")[0]));
|
||||||
status_loop="nein";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MainWindow::sende_befehl(){
|
bool MainWindow::sende_befehl(){
|
||||||
ausgabe=url + befehl;
|
ausgabe=url + befehl;
|
||||||
|
|
||||||
|
manager = new QNetworkAccessManager(this);
|
||||||
QNetworkRequest request(ausgabe);
|
QNetworkRequest request(ausgabe);
|
||||||
QNetworkReply *reply = manager->get(request);
|
QNetworkReply *reply = manager->get(request);
|
||||||
QEventLoop event_loop;
|
QEventLoop event_loop;
|
||||||
|
@ -85,45 +80,31 @@ bool MainWindow::sende_befehl(){
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_pushButton_pause_clicked(){
|
void MainWindow::on_pushButton_pause_clicked(){
|
||||||
if(status_auto=="an"){
|
|
||||||
while(status_loop=="ja")
|
|
||||||
ui->statusbar->showMessage("~");
|
|
||||||
if(status_player1=="play"){
|
if(status_player1=="play"){
|
||||||
befehl=befehl_pause1;
|
befehl=befehl_pause1;
|
||||||
sende_befehl();
|
sende_befehl();
|
||||||
|
|
||||||
}else if(status_player2=="play"){
|
}else if(status_player2=="play"){
|
||||||
befehl=befehl_pause2;
|
befehl=befehl_pause2;
|
||||||
sende_befehl();
|
sende_befehl();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::on_pushButton_play_clicked(){
|
void MainWindow::on_pushButton_play_clicked(){
|
||||||
if(status_auto=="an"){
|
|
||||||
while(status_loop=="ja")
|
|
||||||
ui->statusbar->showMessage("~");
|
|
||||||
if(!(status_player1=="play") || !(status_player2=="play")){
|
if(!(status_player1=="play") || !(status_player2=="play")){
|
||||||
if(status_player1=="pause"){
|
if(status_player1=="aus" || status_player1=="pause"){
|
||||||
befehl=befehl_play1;
|
befehl=befehl_play1;
|
||||||
sende_befehl();
|
sende_befehl();
|
||||||
}else if(status_player2=="pause"){
|
}else if(status_player2=="aus" || status_player2=="pause"){
|
||||||
befehl=befehl_play2;
|
befehl=befehl_play2;
|
||||||
sende_befehl();
|
sende_befehl();
|
||||||
}else{
|
|
||||||
befehl=befehl_play1;
|
|
||||||
sende_befehl();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_pushButton_fade_clicked(){
|
void MainWindow::on_pushButton_fade_clicked(){
|
||||||
if(status_auto=="an"){
|
|
||||||
while(status_loop=="ja")
|
|
||||||
ui->statusbar->showMessage("~");
|
|
||||||
if(status_player1=="play" || status_player2=="play"){
|
if(status_player1=="play" || status_player2=="play"){
|
||||||
befehl=befehl_fade;
|
befehl=befehl_fade;
|
||||||
sende_befehl();
|
sende_befehl();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -6,7 +6,9 @@
|
||||||
#include <QtNetwork/QNetworkAccessManager>
|
#include <QtNetwork/QNetworkAccessManager>
|
||||||
#include <QtNetwork/QNetworkRequest>
|
#include <QtNetwork/QNetworkRequest>
|
||||||
#include <QtNetwork/QNetworkReply>
|
#include <QtNetwork/QNetworkReply>
|
||||||
|
#include <QPalette>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
#include <QThread>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
namespace Ui { class MainWindow; }
|
namespace Ui { class MainWindow; }
|
||||||
|
@ -31,14 +33,12 @@ private:
|
||||||
|
|
||||||
bool sende_befehl();
|
bool sende_befehl();
|
||||||
|
|
||||||
QTimer *timer;
|
|
||||||
QNetworkAccessManager *manager;
|
QNetworkAccessManager *manager;
|
||||||
|
|
||||||
QString ip="192.168.100.7";
|
QString ip="192.168.100.7";
|
||||||
QString port="80";
|
QString port="80";
|
||||||
QString url="http://" + ip + ":" + port + "/";
|
QString url="http://" + ip + ":" + port + "/";
|
||||||
QString ausgabe;
|
QString ausgabe;
|
||||||
QString status_loop;
|
|
||||||
QString status;
|
QString status;
|
||||||
QString status_player1;
|
QString status_player1;
|
||||||
QString status_player2;
|
QString status_player2;
|
||||||
|
|
Loading…
Add table
Reference in a new issue