Debug messages to GUI terminal
This commit is contained in:
parent
cccd987bdd
commit
a6909f8c16
7 changed files with 131 additions and 80 deletions
|
|
@ -18,6 +18,11 @@
|
|||
*/
|
||||
#include "libremediaserver-audio.h"
|
||||
|
||||
QTextEdit * libreMediaServerAudio::textEdit = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
/ Constructor
|
||||
*/
|
||||
|
|
@ -25,25 +30,24 @@
|
|||
libreMediaServerAudio::libreMediaServerAudio(QStringList args, QWidget *parent)
|
||||
: QMainWindow(parent)
|
||||
{
|
||||
qDebug() << "********************************************************************************";
|
||||
qDebug() << QDate::currentDate().toString() << " "<< QTime::currentTime().toString();
|
||||
qDebug() << VERSION;
|
||||
qDebug() << COPYRIGHT;
|
||||
qDebug() << LICENSE;
|
||||
|
||||
Q_UNUSED(args);
|
||||
ui.setupUi(this);
|
||||
|
||||
this->setWindowTitle(VERSION);
|
||||
// Inicia el widget Terminal
|
||||
textEdit = new QTextEdit(this);
|
||||
textEdit->append(QString::fromLatin1(VERSION));
|
||||
textEdit->append(QString::fromLatin1(LICENSE));
|
||||
textEdit->append(QString::fromLatin1(COPYRIGHT));
|
||||
textEdit = new QTextEdit;
|
||||
textEdit->setReadOnly(true);
|
||||
QDockWidget *bottomWidget = new QDockWidget(tr("Terminal"), this);
|
||||
bottomWidget->setAllowedAreas(Qt::BottomDockWidgetArea);
|
||||
bottomWidget->setWidget(textEdit);
|
||||
addDockWidget(Qt::BottomDockWidgetArea, bottomWidget);
|
||||
|
||||
this->setWindowTitle(VERSION);
|
||||
|
||||
// qDebug() << QDate::currentDate().toString() << " "<< QTime::currentTime().toString();
|
||||
qDebug() << VERSION;
|
||||
qDebug() << COPYRIGHT;
|
||||
qDebug() << LICENSE;
|
||||
|
||||
// Inicia el widget central de audio
|
||||
aw = new AudioWidget(this);
|
||||
setCentralWidget(aw);
|
||||
|
|
@ -51,11 +55,19 @@ libreMediaServerAudio::libreMediaServerAudio(QStringList args, QWidget *parent)
|
|||
// Inicia la lectura de dmx a través de ola
|
||||
ola = new olaThread();
|
||||
Q_CHECK_PTR(ola);
|
||||
connect(ola, SIGNAL(toTerminal(QString)),
|
||||
this, SLOT(toTerminal(QString)));
|
||||
ola->start(QThread::TimeCriticalPriority );
|
||||
ola->blockSignals(true);
|
||||
|
||||
connect(ola, SIGNAL(toTerminal(QString)),
|
||||
textEdit, SLOT(append(QString)), Qt::QueuedConnection);
|
||||
|
||||
ola->blockSignals(true);
|
||||
ola->start(QThread::TimeCriticalPriority );
|
||||
|
||||
/* connect(MediaLibrary::getInstance(), SIGNAL(debug(QString)),
|
||||
textEdit, SLOT(append(QString)), Qt::QueuedConnection);
|
||||
|
||||
connect(MediaLibrary::getInstance(), SIGNAL(warning(QString)),
|
||||
textEdit, SLOT(append(QString)), Qt::QueuedConnection);
|
||||
*/
|
||||
// Inicia el widget Master. No implementado todavía
|
||||
/*
|
||||
amw = new AudioMasterWidget(this);
|
||||
|
|
@ -64,11 +76,6 @@ libreMediaServerAudio::libreMediaServerAudio(QStringList args, QWidget *parent)
|
|||
topWidget->setWidget(amw);
|
||||
addDockWidget(Qt::TopDockWidgetArea, topWidget);
|
||||
*/
|
||||
if (args.contains("-log"))
|
||||
{
|
||||
textEdit->append("Log to file");
|
||||
}
|
||||
|
||||
// Conectamos los menus
|
||||
connect(ui.actionOpen_conf, SIGNAL(triggered()), this, SLOT(openFile()));
|
||||
connect(ui.actionSave_conf, SIGNAL(triggered()), this, SLOT(saveFile()));
|
||||
|
|
@ -98,11 +105,11 @@ libreMediaServerAudio::libreMediaServerAudio(QStringList args, QWidget *parent)
|
|||
libreMediaServerAudio::~libreMediaServerAudio()
|
||||
{
|
||||
// save_finish();
|
||||
delete MediaLibrary::getInstance();
|
||||
ola->stop();
|
||||
qDebug() << QDate::currentDate().toString() << " " << QTime::currentTime().toString();
|
||||
qDebug() << "********************************************************************************";
|
||||
return;
|
||||
// delete MediaLibrary::getInstance();
|
||||
// ola->stop();
|
||||
// qDebug() << QDate::currentDate().toString() << " " << QTime::currentTime().toString();
|
||||
// qDebug() << "********************************************************************************";
|
||||
// return;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue