Browse Source

Merged

QGC4.4
pixhawk 15 years ago
parent
commit
8e4eb03a60
  1. 20
      mavground.pri
  2. 21
      src/Core.cc
  3. 13
      src/ui/MainWindow.cc

20
mavground.pri

@ -1,8 +1,8 @@ @@ -1,8 +1,8 @@
#-------------------------------------------------
#
# MAVGround - Micro Air Vehicle Groundstation
# QGroundControl - Micro Air Vehicle Groundstation
#
# Please see our website at <http://pixhawk.ethz.ch>
# Please see our website at <http://qgroundcontrol.org>
#
# Original Author:
# Lorenz Meier <mavteam@student.ethz.ch>
@ -58,10 +58,20 @@ message(Qt version $$[QT_VERSION]) @@ -58,10 +58,20 @@ message(Qt version $$[QT_VERSION])
# MAC OS X
macx {
message(Building for Mac OS X 64bit)
CONFIG += x86 #x86_64
CONFIG -= static phonon
HARDWARE_PLATFORM = $$system(uname -a)
contains( HARDWARE_PLATFORM, x86_64 ) {
# x64 Mac OS X Snow Leopard 10.6 and later
CONFIG += x86_64
CONFIG -= x86 static phonon
message(Building for Mac OS X 64bit/Snow Leopard 10.6 and later)
} else {
# x86 Mac OS X Leopard 10.5 and earlier
CONFIG += x86 static phonon
message(Building for Mac OS X 32bit/Leopard 10.5 and earlier)
}
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.5
@ -87,8 +97,6 @@ macx { @@ -87,8 +97,6 @@ macx {
# GNU/Linux
linux-g++ {
message(Building for GNU/Linux)
debug {
DESTDIR = $$BASEDIR
}
@ -103,10 +111,12 @@ linux-g++ { @@ -103,10 +111,12 @@ linux-g++ {
# 64-bit Linux
LIBS += \
-L$$BASEDIR/lib/flite/linux64
message(Building for GNU/Linux 64bit/x64)
} else {
# 32-bit Linux
LIBS += \
-L$$BASEDIR/lib/flite/linux32
message(Building for GNU/Linux 32bit/i386)
}
LIBS += -lm \
-lflite_cmu_us_awb \

21
src/Core.cc

@ -61,6 +61,14 @@ Core::Core(int &argc, char* argv[]) : QApplication(argc, argv) @@ -61,6 +61,14 @@ Core::Core(int &argc, char* argv[]) : QApplication(argc, argv)
this->setApplicationName("OpenMAV Ground Control Station");
this->setApplicationVersion("v. 0.0.5");
this->setOrganizationName(QLatin1String("OpenMAV Association"));
this->setOrganizationDomain("http://qgroundcontrol.org");
// Show splash screen
QPixmap splashImage(":images/splash.png");
QSplashScreen* splashScreen = new QSplashScreen(splashImage, Qt::WindowStaysOnTopHint);
splashScreen->show();
splashScreen->showMessage(tr("Loading application fonts"), Qt::AlignLeft | Qt::AlignBottom, QColor(62, 93, 141));
QSettings::setDefaultFormat(QSettings::IniFormat);
// Exit main application when last window is closed
connect(this, SIGNAL(lastWindowClosed()), this, SLOT(quit()));
@ -73,17 +81,12 @@ Core::Core(int &argc, char* argv[]) : QApplication(argc, argv) @@ -73,17 +81,12 @@ Core::Core(int &argc, char* argv[]) : QApplication(argc, argv)
fontDatabase.addApplicationFont(fontFileName);
setFont(fontDatabase.font(fontFamilyName, "Roman", 12));
// Show splash screen
QPixmap splashImage(":images/splash.png");
QSplashScreen* splashScreen = new QSplashScreen(splashImage, Qt::WindowStaysOnTopHint);
splashScreen->show();
// Start the comm link manager
splashScreen->showMessage(tr("Starting Communication Links"));
splashScreen->showMessage(tr("Starting Communication Links"), Qt::AlignLeft | Qt::AlignBottom, QColor(62, 93, 141));
startLinkManager();
// Start the UAS Manager
splashScreen->showMessage(tr("Starting UAS Manager"));
splashScreen->showMessage(tr("Starting UAS Manager"), Qt::AlignLeft | Qt::AlignBottom, QColor(62, 93, 141));
startUASManager();
// Start audio output
@ -93,7 +96,7 @@ Core::Core(int &argc, char* argv[]) : QApplication(argc, argv) @@ -93,7 +96,7 @@ Core::Core(int &argc, char* argv[]) : QApplication(argc, argv)
//tarsus->start();
// Start the user interface
splashScreen->showMessage(tr("Starting User Interface"));
splashScreen->showMessage(tr("Starting User Interface"), Qt::AlignLeft | Qt::AlignBottom, QColor(62, 93, 141));
startUI();
// Remove splash screen
@ -140,7 +143,5 @@ void Core::startUI() @@ -140,7 +143,5 @@ void Core::startUI()
{
// Start UI
mainWindow = new MainWindow();
// Make UI visible
mainWindow->show();
}

13
src/ui/MainWindow.cc

@ -60,6 +60,9 @@ This file is part of the PIXHAWK project @@ -60,6 +60,9 @@ This file is part of the PIXHAWK project
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
{
this->hide();
this->setVisible(false);
// Quick hack
//comp = new LogCompressor("/home/pixhawk/Desktop/test.txt");
@ -142,10 +145,6 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) @@ -142,10 +145,6 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
// Add status bar
setStatusBar(createStatusBar());
// Load widgets
loadWidgets();
// Adjust the size
adjustSize();
// Create actions
connectActions();
@ -173,6 +172,12 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) @@ -173,6 +172,12 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
//CommConfigurationWindow* simulationWidget = new CommConfigurationWindow(simulationLink, mavlink, this);
//ui.menuNetwork->addAction(commWidget->getAction());
simulationLink->connect();
// Load widgets and show application window
loadWidgets();
// Adjust the size
adjustSize();
}
MainWindow::~MainWindow()

Loading…
Cancel
Save