Commit 6a5e0f49 authored by pixhawk's avatar pixhawk
Browse files

Fixed path dependency in audio output, added settings for main window

parent 4f579073
......@@ -165,10 +165,11 @@ bool GAudioOutput::alert(QString text)
if (!emergency)
{
// Play alert sound
m_media->setCurrentSource(Phonon::MediaSource(QString("alert.wav").toStdString().c_str()));
QString alertFile = QCoreApplication::applicationDirPath() + "alert.wav";
m_media->setCurrentSource(Phonon::MediaSource(alertFile.toStdString().c_str()));
qDebug() << "FILENAME:" << m_media->currentSource().fileName();
qDebug() << "TYPE:" << m_media->currentSource().type();
qDebug() << QString("alert.wav").toStdString().c_str();
qDebug() << alertFile.toStdString().c_str();
m_media->play();
m_media->setCurrentSource(Phonon::MediaSource(QString("alert.wav").toStdString().c_str()));
m_media->play();
......
......@@ -58,19 +58,13 @@ This file is part of the QGROUNDCONTROL project
*
* @see QMainWindow::show()
**/
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent),
settings()
{
this->hide();
this->setVisible(false);
// Quick hack
//comp = new LogCompressor("/home/pixhawk/Desktop/test.txt");
mavlink = new MAVLinkProtocol();
//as4link = new AS4Protocol();
// MG::DISPLAY::setPixelSize(0.224f);
// Setup user interface
ui.setupUi(this);
......@@ -107,6 +101,9 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
acceptList->append("roll IMU");
acceptList->append("pitch IMU");
acceptList->append("yaw IMU");
acceptList->append("vx");
acceptList->append("vy");
acceptList->append("vz");
headDown1 = new HDDisplay(acceptList, this);
headDown1->setVisible(false);
......@@ -502,6 +499,11 @@ void MainWindow::loadEngineerView()
this->show();
}
void MainWindow::loadAllView()
{
}
void MainWindow::loadWidgets()
{
loadOperatorView();
......
......@@ -34,6 +34,7 @@ This file is part of the PIXHAWK project
#include <QtGui/QMainWindow>
#include <QStatusBar>
#include <QStackedWidget>
#include <QSettings>
#include "ui_MainWindow.h"
#include "LinkManager.h"
......@@ -75,6 +76,7 @@ public:
MainWindow(QWidget *parent = 0);
~MainWindow();
QSettings settings;
UASControlWidget* control;
LinechartWidget* linechart;
UASInfoWidget* info;
......@@ -128,6 +130,8 @@ public slots:
void loadOperatorView();
/** @brief Load view for general settings */
void loadSettingsView();
/** @brief Load view with all widgets */
void loadAllView();
void reloadStylesheet();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment