You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
980 B
47 lines
980 B
#include <QFile>
|
|
#include <QTime>
|
|
|
|
#include "dialog.h"
|
|
#include "ui_dialog.h"
|
|
#include "adbprocess.h"
|
|
|
|
Dialog::Dialog(QWidget *parent) :
|
|
QDialog(parent),
|
|
ui(new Ui::Dialog)
|
|
{
|
|
ui->setupUi(this);
|
|
setAttribute(Qt::WA_DeleteOnClose);
|
|
//setWindowFlags(windowFlags() | Qt::WindowMaximizeButtonHint | Qt::WindowMinimizeButtonHint);
|
|
}
|
|
|
|
Dialog::~Dialog()
|
|
{
|
|
on_stopServerBtn_clicked();
|
|
delete ui;
|
|
}
|
|
|
|
void Dialog::on_adbProcess_clicked()
|
|
{
|
|
AdbProcess* adb = new AdbProcess();
|
|
connect(adb, &AdbProcess::adbProcessResult, this, [this](AdbProcess::ADB_EXEC_RESULT processResult){
|
|
Q_UNUSED(processResult);
|
|
sender()->deleteLater();
|
|
});
|
|
adb->execute("", QStringList() << "devices");
|
|
}
|
|
|
|
void Dialog::on_startServerBtn_clicked()
|
|
{
|
|
if (!m_videoForm) {
|
|
m_videoForm = new VideoForm();
|
|
}
|
|
m_videoForm->show();
|
|
}
|
|
|
|
void Dialog::on_stopServerBtn_clicked()
|
|
{
|
|
if (m_videoForm) {
|
|
m_videoForm->close();
|
|
}
|
|
}
|