From 488c8234681918b90b9664b165bab42ccf88cd1f Mon Sep 17 00:00:00 2001 From: dankers Date: Tue, 15 Dec 2009 13:09:13 +0000 Subject: [PATCH] Start of GCS git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@68 ebee16cc-31ac-478f-84a7-5cbb03baadba --- ground/OpenPilotGCS/OpenPilotGCS.pro | 18 +++ ground/OpenPilotGCS/OpenPilotGCS.pro.user | 161 ++++++++++++++++++++++ ground/OpenPilotGCS/main.cpp | 10 ++ ground/OpenPilotGCS/mainwindow.cpp | 26 ++++ ground/OpenPilotGCS/mainwindow.h | 23 ++++ ground/OpenPilotGCS/mainwindow.ui | 40 ++++++ ground/doc/Build.txt | 4 + 7 files changed, 282 insertions(+) create mode 100644 ground/OpenPilotGCS/OpenPilotGCS.pro create mode 100644 ground/OpenPilotGCS/OpenPilotGCS.pro.user create mode 100644 ground/OpenPilotGCS/main.cpp create mode 100644 ground/OpenPilotGCS/mainwindow.cpp create mode 100644 ground/OpenPilotGCS/mainwindow.h create mode 100644 ground/OpenPilotGCS/mainwindow.ui diff --git a/ground/OpenPilotGCS/OpenPilotGCS.pro b/ground/OpenPilotGCS/OpenPilotGCS.pro new file mode 100644 index 000000000..d10cdca2f --- /dev/null +++ b/ground/OpenPilotGCS/OpenPilotGCS.pro @@ -0,0 +1,18 @@ +#------------------------------------------------- +# +# Project created by QtCreator 2009-12-16T00:09:29 +# +#------------------------------------------------- + +QT += svg + +TARGET = OpenPilotGCS +TEMPLATE = app + + +SOURCES += main.cpp\ + mainwindow.cpp + +HEADERS += mainwindow.h + +FORMS += mainwindow.ui diff --git a/ground/OpenPilotGCS/OpenPilotGCS.pro.user b/ground/OpenPilotGCS/OpenPilotGCS.pro.user new file mode 100644 index 000000000..d4503776b --- /dev/null +++ b/ground/OpenPilotGCS/OpenPilotGCS.pro.user @@ -0,0 +1,161 @@ + + + + RunConfiguration0-BaseEnvironmentBase + 2 + + + RunConfiguration0-CommandLineArguments + + + + RunConfiguration0-ProFile + OpenPilotGCS.pro + + + RunConfiguration0-RunConfiguration.name + OpenPilotGCS + + + RunConfiguration0-UseDyldImageSuffix + false + + + RunConfiguration0-UseTerminal + false + + + RunConfiguration0-UserEnvironmentChanges + + + + RunConfiguration0-UserSetName + false + + + RunConfiguration0-UserSetWorkingDirectory + false + + + RunConfiguration0-UserWorkingDirectory + + + + RunConfiguration0-type + Qt4ProjectManager.Qt4RunConfiguration + + + activeRunConfiguration + 0 + + + activebuildconfiguration + Debug + + + buildConfiguration-Debug + + Debug + 0 + 2 + 2 + + + + buildConfiguration-Release + + Release + 0 + 2 + 0 + + + + buildconfiguration-Debug-buildstep0 + + Debug + + + + buildconfiguration-Debug-buildstep1 + + Debug + + + + buildconfiguration-Debug-cleanstep0 + + Debug + true + + clean + + + + + buildconfiguration-Release-buildstep0 + + Release + + + + buildconfiguration-Release-buildstep1 + + Release + + + + buildconfiguration-Release-cleanstep0 + + Release + + + + buildconfigurations + + Debug + Release + + + + buildstep0 + + + + + + + buildstep1 + + + + + + buildsteps + + trolltech.qt4projectmanager.qmake + trolltech.qt4projectmanager.make + + + + cleanstep0 + + + true + + + + cleansteps + + trolltech.qt4projectmanager.make + + + + defaultFileEncoding + System + + + project + + + diff --git a/ground/OpenPilotGCS/main.cpp b/ground/OpenPilotGCS/main.cpp new file mode 100644 index 000000000..49a2cb9b8 --- /dev/null +++ b/ground/OpenPilotGCS/main.cpp @@ -0,0 +1,10 @@ +#include +#include "mainwindow.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + MainWindow w; + w.show(); + return a.exec(); +} diff --git a/ground/OpenPilotGCS/mainwindow.cpp b/ground/OpenPilotGCS/mainwindow.cpp new file mode 100644 index 000000000..914bdebae --- /dev/null +++ b/ground/OpenPilotGCS/mainwindow.cpp @@ -0,0 +1,26 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); +} + +MainWindow::~MainWindow() +{ + delete ui; +} + +void MainWindow::changeEvent(QEvent *e) +{ + QMainWindow::changeEvent(e); + switch (e->type()) { + case QEvent::LanguageChange: + ui->retranslateUi(this); + break; + default: + break; + } +} diff --git a/ground/OpenPilotGCS/mainwindow.h b/ground/OpenPilotGCS/mainwindow.h new file mode 100644 index 000000000..b28f69786 --- /dev/null +++ b/ground/OpenPilotGCS/mainwindow.h @@ -0,0 +1,23 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +namespace Ui { + class MainWindow; +} + +class MainWindow : public QMainWindow { + Q_OBJECT +public: + MainWindow(QWidget *parent = 0); + ~MainWindow(); + +protected: + void changeEvent(QEvent *e); + +private: + Ui::MainWindow *ui; +}; + +#endif // MAINWINDOW_H diff --git a/ground/OpenPilotGCS/mainwindow.ui b/ground/OpenPilotGCS/mainwindow.ui new file mode 100644 index 000000000..7aa0bee05 --- /dev/null +++ b/ground/OpenPilotGCS/mainwindow.ui @@ -0,0 +1,40 @@ + + + MainWindow + + + + 0 + 0 + 600 + 400 + + + + OpenPilot GCS + + + + + + 0 + 0 + 600 + 21 + + + + + + TopToolBarArea + + + false + + + + + + + + diff --git a/ground/doc/Build.txt b/ground/doc/Build.txt index f862aa9bc..89adc0973 100644 --- a/ground/doc/Build.txt +++ b/ground/doc/Build.txt @@ -1,2 +1,6 @@ The simply way to build this is to use QT Creator, this can be downloaded from http://qt.nokia.com/ +Serial port classes: + +http://code.google.com/p/qextserialport/ +