Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 749 → Rev 750

/QMK-Groundstation/trunk/QMK-Maps/Classes/cSettings.cpp
43,21 → 43,6
GUI.Toolbar = Setting.value("Toolbar",true).toBool();
Setting.endGroup();
 
Setting.beginGroup("Data");
DATA.Intervall = Setting.value("Intervall", 500).toInt();
Setting.endGroup();
 
Setting.beginGroup("SERVER");
SERVER.Password = Setting.value("Password", QString("")).toString();
SERVER.IP_MAX = Setting.value("IP_MAX", 1).toInt();
SERVER.IP_ID = Setting.value("IP_ID", 0).toInt();
 
for (int z = 0; z < SERVER.IP_MAX; z++)
{
SERVER.IP[z] = Setting.value("IP_" + QString("%1").arg(z), QString("127.0.0.1:64400")).toString();
}
Setting.endGroup();
 
Setting.beginGroup("CONFIG");
CONFIG.cb_CenterPos = Setting.value("cb_CenterPos",true).toBool();
CONFIG.cb_ShowRoute = Setting.value("cb_ShowRoute",true).toBool();
87,21 → 72,6
Setting.setValue("Toolbar", GUI.Toolbar);
Setting.endGroup();
 
Setting.beginGroup("DATA");
Setting.setValue("Intervall", DATA.Intervall);
Setting.endGroup();
 
Setting.beginGroup("SERVER");
Setting.setValue("Password", SERVER.Password);
Setting.setValue("IP_MAX", SERVER.IP_MAX);
Setting.setValue("IP_ID", SERVER.IP_ID);
 
for (int z = 0; z < SERVER.IP_MAX; z++)
{
Setting.setValue("IP_" + QString("%1").arg(z), SERVER.IP[z]);
}
Setting.endGroup();
 
Setting.beginGroup("CONFIG");
Setting.setValue("cb_CenterPos", CONFIG.cb_CenterPos);
Setting.setValue("cb_ShowRoute", CONFIG.cb_ShowRoute);
/QMK-Groundstation/trunk/QMK-Maps/Classes/cSettings.h
33,19 → 33,6
bool Toolbar;
};
 
struct set_DATA
{
int Intervall;
};
 
struct set_SERVER
{
int IP_MAX;
int IP_ID;
QString IP[10];
QString Password;
};
 
struct set_CONFIG
{
bool cb_Goto;
71,8 → 58,6
int Settings_ID;
 
set_GUI GUI;
set_DATA DATA;
set_SERVER SERVER;
set_CONFIG CONFIG;
set_NAVI NAVI;
};
/QMK-Groundstation/trunk/QMK-Maps/Defines.h
24,7 → 24,7
#include "../Global/Kopter.h"
 
static const QString QA_NAME = "QMK-Maps";
static const QString QA_VERSION_NR = "1.1.4";
static const QString QA_VERSION_NR = "1.2.0";
 
#ifdef _BETA_
static const QString QA_VERSION = QA_VERSION_NR + " (BETA)";
32,8 → 32,8
static const QString QA_VERSION = QA_VERSION_NR;
#endif
 
static const QString QA_DATE = "30.11.2009";
static const QString QA_YEAR = "2008-2009";
static const QString QA_DATE = "28.03.2010";
static const QString QA_YEAR = "2008-2010";
 
static const QString QA_ABOUT =
"<HTML>"
/QMK-Groundstation/trunk/QMK-Maps/Dialogs/dlg_Main.cpp
32,7 → 32,7
 
o_Settings = new cSettings();
 
o_Input = new Input();
wg_Connection->set_Client(ID_MAPS, QA_NAME + " " + QA_VERSION, DataFields);
 
o_Map = new MapControl(QSize(25,25));
l_RouteWP = new LineString();
54,26 → 54,14
showMaximized();
}
 
for(int z = 0; z < o_Settings->SERVER.IP_MAX; z++)
{
if (cb_Server->findText(o_Settings->SERVER.IP[z]) == -1)
{
cb_Server->addItem(o_Settings->SERVER.IP[z]);
}
}
wg_Connection->set_SelectVisible(false);
 
cb_Server->setCurrentIndex(o_Settings->SERVER.IP_ID);
 
le_Password->setText(o_Settings->SERVER.Password);
 
sb_Intervall->setValue(o_Settings->DATA.Intervall);
 
cb_CenterPos->setChecked(o_Settings->CONFIG.cb_CenterPos);
cb_ShowRoute->setChecked(o_Settings->CONFIG.cb_ShowRoute);
cb_ShowWPs->setChecked(o_Settings->CONFIG.cb_ShowWPs);
cb_Goto->setChecked(o_Settings->CONFIG.cb_Goto);
 
// tb_More->addWidget(cb_Maps);
tb_More->addWidget(cb_Maps);
cb_Maps->setVisible(false);
 
ac_Toolbar->setChecked(o_Settings->GUI.Toolbar);
80,7 → 68,7
 
if (ac_Toolbar->isChecked())
{
btn_Connect->setVisible(false);
wg_Connection->set_ButtonVisible(false);
}
else
{
92,11 → 80,9
// Signale mit Slots verbinden
void dlg_Main::init_Connections()
{
connect(ac_Connect, SIGNAL(triggered()), this, SLOT(slot_ac_Connect()));
connect(ac_Connect, SIGNAL(triggered()), wg_Connection, SLOT(slot_btn_Connect()));
connect(ac_Toolbar, SIGNAL(triggered()), this, SLOT(slot_ac_Toolbar()));
 
connect(sb_Intervall, SIGNAL(valueChanged(int)), this, SLOT(slot_sb_Intervall(int)));
 
connect(sl_Zoom, SIGNAL(valueChanged(int)), this, SLOT(slot_Zoom(int)));
connect(cb_Maps, SIGNAL(currentIndexChanged(int)), this, SLOT(slot_ChangeMap(int)));
 
116,6 → 102,11
// About QMK-Kernel & About-QT Dialog einfügen
connect(ac_About, SIGNAL(triggered()), this, SLOT(slot_ac_About()));
menu_Help->addAction(trUtf8("Über &Qt"), qApp, SLOT(aboutQt()));
 
connect(wg_Connection, SIGNAL(sig_Status(int)), this, SLOT(slot_ConnectionStatus(int)));
connect(wg_Connection, SIGNAL(sig_MK_Version(s_Hardware)), this, SLOT(slot_MK_Version(s_Hardware)));
connect(wg_Connection, SIGNAL(sig_MK_NaviData(s_MK_NaviData)), this, SLOT(slot_MK_NaviData(s_MK_NaviData)));
connect(wg_Connection, SIGNAL(sig_MK_WayPoint(int)), this, SLOT(slot_MK_WayPoint(int)));
}
 
void dlg_Main::init_Directorys()
153,117 → 144,6
}
}
 
void dlg_Main::parse_IP_Data(QString t_Data)
{
QStringList Data;
Data = t_Data.split(":");
 
if (Data.count() > 1)
{
int CMD = Data[2].toInt();
 
switch(CMD)
{
case 101 :
{
o_Input->send_Data(HandlerIP::make_Frame(ID_MAPS, 101, QA_NAME + " " + QA_VERSION));
}
break;
case 502 :
{
switch (Data[3].toInt())
{
case 105 :
{
QString s_MD5PW;
QByteArray a_MD5PW;
 
a_MD5PW = QCryptographicHash::hash(le_Password->text().toAscii(),QCryptographicHash::Md5);
 
s_MD5PW = QString(a_MD5PW.toHex().data());
 
o_Input->send_Data(HandlerIP::make_Frame(ID_MAPS, 105, s_MD5PW));
}
break;
case 106 :
{
o_Input->send_Data(HandlerIP::make_Frame(ID_MAPS, 106, DataFields));
}
break;
}
}
break;
case 505 :
{
if (Data[3] == "OK")
{
}
else
{
QMessageBox::warning(this, QA_NAME, trUtf8("Authentifizierung fehlgeschlagen. <br />Daten senden zum Mikrokopter nicht möglich."), QMessageBox::Ok);
}
}
break;
}
}
}
 
// Eingangsdaten verarbeiten
void dlg_Main::parse_MK_Data(QString t_Data)
{
unsigned char OutData[150];
char *InData = t_Data.toLatin1().data();
 
if (HandlerMK::Decode_64(InData, t_Data.length(), OutData) != 0)
{
 
switch(InData[2])
{
case 'V' : // Versions-Info
{
o_Input->stop_Resend(DATA_VERSION);
VersionInfo = HandlerMK::parse_Version(OutData, InData[1] - 'a');
setWindowTitle(QA_NAME + " " + QA_VERSION + " - " + VersionInfo.Hardware + " " + VersionInfo.Version);
 
if (VersionInfo.ID == ADDRESS_NC)
{
c_Data[0] = sb_Intervall->value() / 10;
o_Input->send_Data(HandlerMK::make_Frame('o', ADDRESS_ALL, c_Data, 1).toLatin1().data());
}
else // TODO: Befehl wenden zum Wechseln auf Navi.
{
}
}
break;
case 'O' : // Navi-OSD-Data
{
if (InData[1] - 'a' == ADDRESS_NC)
{
s_MK_NaviData MK_NaviData;
 
memcpy((unsigned char *)&MK_NaviData, (unsigned char *)&OutData, sizeof(MK_NaviData));
if (MK_NaviData.Version == MK_VERSION_NAVI)
{
show_Data(MK_NaviData);
add_Position(MK_NaviData);
}
}
}
break;
case 'W' : // WayPoints
{
o_Input->stop_Resend(DATA_WRITE_WAYPOINT);
 
if (OutData[0] < l_WayPoints.count())
{
send_WayPoints(l_WayPoints, OutData[0] + 1);
}
}
break;
}
}
}
 
///////////////////////////////////////////////////////////////////
// QMK-Maps //
///////////////////////////////////////////////////////////////////
482,25 → 362,6
f_MKW->close();
}
 
void dlg_Main::show_Data(s_MK_NaviData t_NaviData)
{
QString Mode = "NC-Flags : ";
if (t_NaviData.NCFlags & 0x08) {le_Mode->setText(tr("Range Limit")); Mode += "R";}
if (t_NaviData.NCFlags & 0x10) {le_Mode->setText(tr("Serial Error")); Mode += "S";}
if (t_NaviData.NCFlags & 0x20) {le_Mode->setText(tr("Target reached")); Mode += "T";}
if (t_NaviData.NCFlags & 0x40) {le_Mode->setText(tr("Manual Control")); Mode += "M";}
if (t_NaviData.NCFlags & 0x01) {le_Mode->setText(tr("Free")); Mode += "F";}
if (t_NaviData.NCFlags & 0x02) {le_Mode->setText(tr("Position Hold")); Mode += "P";}
if (t_NaviData.NCFlags & 0x04) {le_Mode->setText(tr("Coming Home")); Mode += "C";}
 
//qDebug(Mode.toLatin1().data());
 
le_WP->setText(QString("%1/").arg(t_NaviData.WaypointIndex) + QString("%1").arg(t_NaviData.WaypointNumber));
le_WPTime->setText(QString("%1:").arg(t_NaviData.TargetHoldTime / 60) + (QString("%1").arg(t_NaviData.TargetHoldTime % 60)).rightJustified(2, '0'));
le_WPDist->setText(QString("%1m").arg(t_NaviData.TargetPositionDeviation.Distance / 10));
le_HomeDist->setText(QString("%1m").arg(t_NaviData.HomePositionDeviation.Distance / 10));
}
 
// Aktuelle MK-Position hinzufügen
void dlg_Main::add_Position(s_MK_NaviData t_NaviData)
{
577,7 → 438,7
s_WayPoint.reserve[3] = 0;
 
memcpy((unsigned char *)&c_Data, (unsigned char *)&s_WayPoint, sizeof(s_WayPoint));
o_Input->send_Data(HandlerMK::make_Frame('s', ADDRESS_NC, c_Data, sizeof(s_WayPoint)).toLatin1().data());
wg_Connection->send_Data(HandlerMK::make_Frame('s', ADDRESS_NC, c_Data, sizeof(s_WayPoint)).toLatin1().data());
}
else
{
596,7 → 457,7
s_WayPoint.Position.Status = INVALID;
 
memcpy((unsigned char *)&c_Data, (unsigned char *)&s_WayPoint, sizeof(s_WayPoint));
o_Input->send_Data(HandlerMK::make_Frame('w', ADDRESS_NC, c_Data, sizeof(s_WayPoint)).toLatin1().data(), DATA_WRITE_WAYPOINT);
wg_Connection->send_Data(HandlerMK::make_Frame('w', ADDRESS_NC, c_Data, sizeof(s_WayPoint)).toLatin1().data(), DATA_WRITE_WAYPOINT);
}
else
{
625,7 → 486,7
s_WayPoint.reserve[3] = 0; // reserve
 
memcpy((unsigned char *)&c_Data, (unsigned char *)&s_WayPoint, sizeof(s_WayPoint));
o_Input->send_Data(HandlerMK::make_Frame('w', ADDRESS_NC, c_Data, sizeof(s_WayPoint)).toLatin1().data(), DATA_WRITE_WAYPOINT);
wg_Connection->send_Data(HandlerMK::make_Frame('w', ADDRESS_NC, c_Data, sizeof(s_WayPoint)).toLatin1().data(), DATA_WRITE_WAYPOINT);
}
}
 
643,176 → 504,64
{
if (ac_Toolbar->isChecked())
{
btn_Connect->setVisible(false);
wg_Connection->set_ButtonVisible(false);
ToolBar->setVisible(true);
tb_More->setVisible(true);
}
else
{
btn_Connect->setVisible(true);
wg_Connection->set_ButtonVisible(true);
ToolBar->setVisible(false);
tb_More->setVisible(false);
}
}
 
 
// Datenintervall geändert.
void dlg_Main::slot_sb_Intervall(int t_Intervall)
void dlg_Main::slot_ConnectionStatus(int li_Status)
{
if (t_Intervall == 0)
if (li_Status)
{
c_Data[0] = 0;
ac_Connect->setChecked(true);
ac_Connect->setText(tr("Trennen"));
}
else
{
c_Data[0] = t_Intervall / 10;
}
o_Input->send_Data(HandlerMK::make_Frame('o', ADDRESS_ALL, c_Data, 1).toLatin1().data());
}
 
// Verbindung zum Server auf f_Settings = new wdg_Settings( this );bauen
void dlg_Main::slot_ac_Connect()
{
if (!o_Input->IsOpen())
{
if (cb_Server->findText(cb_Server->currentText()) == -1)
{
cb_Server->addItem(cb_Server->currentText());
cb_Server->setCurrentIndex(cb_Server->findText(cb_Server->currentText()));
}
 
cb_Server->setEnabled(false);
le_Password->setEnabled(false);
 
if (cb_Server->currentText().startsWith('/'))
{
o_Input = new Input_TTY();
o_Input->Init();
 
set_Input s_Input;
s_Input.Main = cb_Server->currentText();
 
if (o_Input->Open(s_Input) == true)
{
ac_Connect->setText(tr("Trennen"));
connect(o_Input, SIGNAL(sig_NewData(QString)), this, SLOT(slot_Input_Data(QString)));
 
o_Input->send_Data(HandlerMK::make_Frame('v', 0, c_Data, 0).toLatin1().data(), DATA_VERSION);
}
else
{
cb_Server->setEnabled(true);
le_Password->setEnabled(true);
}
 
}
else // Connect über TCPIP
{
o_Input = new Input_TCP();
o_Input->Init();
 
set_Input s_Input;
 
QStringList Server = cb_Server->currentText().split(":");
 
s_Input.Main = Server[0];
s_Input.Sub = Server[1];
 
if (o_Input->Open(s_Input) == true)
{
connect(o_Input, SIGNAL(sig_Disconnected(int)), this, SLOT(slot_Input_Disconnected(int)));
connect(o_Input, SIGNAL(sig_Connected()), this, SLOT(slot_Input_Connected()));
}
}
}
else
{
cb_Server->setEnabled(true);
le_Password->setEnabled(true);
 
ac_Connect->setChecked(false);
ac_Connect->setText(tr("Verbinden"));
o_Input->Close();
disconnect(o_Input, SIGNAL(sig_NewData(QString)), 0, 0);
if (o_Input->Mode() == TCP)
{
disconnect(o_Input, SIGNAL(sig_Disconnected(int)), 0, 0);
disconnect(o_Input, SIGNAL(sig_Connected()), 0, 0);
}
}
}
 
// Neue Daten empfangen.
void dlg_Main::slot_Input_Data(QString t_Data)
void dlg_Main::slot_MK_Version(s_Hardware ls_Version)
{
if ((t_Data[0] == '#'))
{
if ((HandlerMK::Check_CRC(t_Data.toLatin1().data(), t_Data.length() - 1)) || ((o_Input->Mode() == TTY) && (HandlerMK::Check_CRC(t_Data.toLatin1().data(), t_Data.length()))))
{
parse_MK_Data(t_Data);
}
else
{
// qDebug(QString("CRC-Error - " + t_Data).toLatin1().data());
}
}
else if ((o_Input->Mode() == TCP) && (t_Data[0] == '$'))
{
parse_IP_Data(t_Data);
}
gs_Version = ls_Version;
setWindowTitle(QA_NAME + " " + QA_VERSION + " - " + ls_Version.Hardware + " " + ls_Version.Version);
}
 
// Serververbindung beendet
void dlg_Main::slot_Input_Disconnected(int Error)
void dlg_Main::slot_MK_NaviData(s_MK_NaviData ps_MK_NaviData)
{
cb_Server->setEnabled(true);
le_Password->setEnabled(true);
QString Mode = "NC-Flags : ";
if (ps_MK_NaviData.NCFlags & 0x08) {le_Mode->setText(tr("Range Limit")); Mode += "R";}
if (ps_MK_NaviData.NCFlags & 0x10) {le_Mode->setText(tr("Serial Error")); Mode += "S";}
if (ps_MK_NaviData.NCFlags & 0x20) {le_Mode->setText(tr("Target reached")); Mode += "T";}
if (ps_MK_NaviData.NCFlags & 0x40) {le_Mode->setText(tr("Manual Control")); Mode += "M";}
if (ps_MK_NaviData.NCFlags & 0x01) {le_Mode->setText(tr("Free")); Mode += "F";}
if (ps_MK_NaviData.NCFlags & 0x02) {le_Mode->setText(tr("Position Hold")); Mode += "P";}
if (ps_MK_NaviData.NCFlags & 0x04) {le_Mode->setText(tr("Coming Home")); Mode += "C";}
 
disconnect(o_Input, SIGNAL(sig_NewData(QString)), 0, 0);
disconnect(o_Input, SIGNAL(sig_Disconnected(int)), 0, 0);
disconnect(o_Input, SIGNAL(sig_Connected()), 0, 0);
le_WP->setText(QString("%1/").arg(ps_MK_NaviData.WaypointIndex) + QString("%1").arg(ps_MK_NaviData.WaypointNumber));
le_WPTime->setText(QString("%1:").arg(ps_MK_NaviData.TargetHoldTime / 60) + (QString("%1").arg(ps_MK_NaviData.TargetHoldTime % 60)).rightJustified(2, '0'));
le_WPDist->setText(QString("%1m").arg(ps_MK_NaviData.TargetPositionDeviation.Distance / 10));
le_HomeDist->setText(QString("%1m").arg(ps_MK_NaviData.HomePositionDeviation.Distance / 10));
 
ac_Connect->setChecked(false);
ac_Connect->setText(tr("Verbinden"));
btn_Connect->setChecked(false);
add_Position(ps_MK_NaviData);
}
 
switch (Error)
void dlg_Main::slot_MK_WayPoint(int pi_WayPointID)
{
if (pi_WayPointID < l_WayPoints.count())
{
case REMOTECLOSED :
{
// lb_Status->setText(tr("Verbindung vom Server beendet."));
QMessageBox::warning(this, QA_NAME,tr("QMK-Datenserver: Verbindung wurde vom Server beendet."), QMessageBox::Ok);
}
break;
case REFUSED :
{
// lb_Status->setText(tr("Server nicht gefunden."));
QMessageBox::warning(this, QA_NAME,tr("QMK-Datenserver: Kann nicht zum Server verbinden."), QMessageBox::Ok);
}
break;
case 3 :
{
// lb_Status->setText(tr("Serververbindung getrennt. Logindaten falsch."));
QMessageBox::warning(this, QA_NAME,tr("QMK-Datenserver: Loginname oder Password falsch."), QMessageBox::Ok);
}
break;
default :
{
// lb_Status->setText(tr("Getrennt vom QMK-Datenserver."));
}
break;
send_WayPoints(l_WayPoints, pi_WayPointID + 1);
}
 
}
 
// Serververbindung hergestellt
void dlg_Main::slot_Input_Connected()
{
connect(o_Input, SIGNAL(sig_NewData(QString)), this, SLOT(slot_Input_Data(QString)));
 
o_Input->send_Data(HandlerMK::make_Frame('v', 0, c_Data, 0).toLatin1().data(), DATA_VERSION);
ac_Connect->setText(tr("Trennen"));
}
 
///////////////////////////////////////////////////////////////////
// QMK-Maps //
///////////////////////////////////////////////////////////////////
1143,20 → 892,6
o_Settings->GUI.Point = pos();
o_Settings->GUI.Toolbar = ac_Toolbar->isChecked();
 
o_Settings->DATA.Intervall = sb_Intervall->value();
 
o_Settings->SERVER.Password = le_Password->text();
o_Settings->SERVER.IP_MAX = cb_Server->count();
o_Settings->SERVER.IP_ID = cb_Server->currentIndex();
 
for (int z = 0; z < cb_Server->count(); z++)
{
if (z < 10)
{
o_Settings->SERVER.IP[z] = cb_Server->itemText(z);
}
}
 
o_Settings->CONFIG.cb_CenterPos = cb_CenterPos->isChecked();
o_Settings->CONFIG.cb_ShowRoute = cb_ShowRoute->isChecked();
o_Settings->CONFIG.cb_ShowWPs = cb_ShowWPs->isChecked();
/QMK-Groundstation/trunk/QMK-Maps/Dialogs/dlg_Main.h
20,8 → 20,6
#define DLG_MAIN_H
 
#include <QtGui/QMainWindow>
//#include <QTcpServer>
//#include <QTcpSocket>
#include <QFile>
 
#include "ui_dlg_Main.h"
31,16 → 29,8
 
#include "../Classes/cSettings.h"
 
#include "../../Global/Kopter.h"
#include "../../Global/MK_Datatypes.h"
 
#include "../../Global/Class_QMapControl.h"
 
#include "../../Global/Class_Input/Input.h"
#include "../../Global/Class_Input/Input_TCP.h"
#include "../../Global/Class_Input/Input_TTY.h"
#include "../../Global/Class_HandlerIP/HandlerIP.h"
#include "../../Global/Class_HandlerMK/HandlerMK.h"
#include "../../Global/Class_HandlerKML/HandlerKML.h"
 
using namespace qmapcontrol;
55,11 → 45,9
void create_Map();
 
private:
// Input Device.
Input *o_Input;
 
// Info über die Hardware
s_Hardware VersionInfo;
s_Hardware gs_Version;
 
// Settings-Object
cSettings *o_Settings;
73,10 → 61,6
void init_Directorys();
s_Directorys s_Dir;
 
// Einkommende Datenpackete zerlegen.
void parse_MK_Data(QString t_Data);
void parse_IP_Data(QString t_Data);
 
// QMK-Maps
QFile *o_Record;
 
118,7 → 102,7
void save_WayPointsMKW(QString s_File);
 
void add_Position(s_MK_NaviData t_NaviData);
void show_Data(s_MK_NaviData t_NaviData);
// void show_Data(s_MK_NaviData t_NaviData);
void send_Target(Point *t_Target);
void send_WayPoints(QList<sWayPoint> l_WayPoints, int t_Pos = 0);
 
126,14 → 110,11
void slot_ac_About();
void slot_ac_Toolbar();
 
void slot_ac_Connect();
void slot_sb_Intervall(int t_Intervall);
void slot_ConnectionStatus(int li_Status);
void slot_MK_Version(s_Hardware ls_Version);
void slot_MK_NaviData(s_MK_NaviData ps_MK_NaviData);
void slot_MK_WayPoint(int pi_WayPointID);
 
// Einkommende Datenpackete.
void slot_Input_Data(QString t_Data);
void slot_Input_Disconnected(int Error);
void slot_Input_Connected();
 
// QMK-Maps
void slot_Zoom(int t_Zoom);
void slot_ChangeMap(int);
149,9 → 130,6
void slot_ac_LoadMapPic();
void slot_ac_Record();
 
// void slot_GotoTarget();
// void slot_Close();
 
void slot_ac_LoadWayPoints();
void slot_ac_SaveRoute();
 
/QMK-Groundstation/trunk/QMK-Maps/Dialogs/dlg_Main.ui
7,7 → 7,7
<x>0</x>
<y>0</y>
<width>711</width>
<height>404</height>
<height>336</height>
</rect>
</property>
<property name="windowTitle">
18,140 → 18,9
<normaloff>:/Icon/Global/Images/Icons/QMK-Maps.png</normaloff>:/Icon/Global/Images/Icons/QMK-Maps.png</iconset>
</property>
<widget class="QWidget" name="centralWidget">
<layout class="QGridLayout" name="gridLayout_6">
<layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="1" colspan="2">
<widget class="QFrame" name="frame">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,0,0,0,0,0,0,0,0">
<property name="spacing">
<number>2</number>
</property>
<property name="margin">
<number>2</number>
</property>
<item>
<widget class="QToolButton" name="btn_Connect">
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="../QMK-Maps.qrc">
<normaloff>:/Actions/Global/Images/Actions/Connection-NO.png</normaloff>
<normalon>:/Actions/Global/Images/Actions/Connection-OK.png</normalon>:/Actions/Global/Images/Actions/Connection-NO.png</iconset>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Server:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="cb_Server">
<property name="minimumSize">
<size>
<width>120</width>
<height>0</height>
</size>
</property>
<property name="editable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_4">
<property name="text">
<string>PW:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="le_Password">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>120</width>
<height>0</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
<item>
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_3">
<property name="text">
<string>Intervall:</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="sb_Intervall">
<property name="minimumSize">
<size>
<width>80</width>
<height>0</height>
</size>
</property>
<property name="suffix">
<string> ms</string>
</property>
<property name="maximum">
<number>5000</number>
</property>
<property name="singleStep">
<number>50</number>
</property>
<property name="value">
<number>500</number>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>35</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="wgt_Connection" name="wg_Connection" native="true"/>
</item>
<item row="1" column="1">
<widget class="QFrame" name="frame_3">
484,7 → 353,7
</layout>
</widget>
</item>
<item row="3" column="0" colspan="2">
<item row="3" column="0" rowspan="2" colspan="2">
<spacer name="AAA2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
630,6 → 499,12
<addaction name="menu_Help"/>
</widget>
<widget class="QToolBar" name="ToolBar">
<property name="minimumSize">
<size>
<width>0</width>
<height>80</height>
</size>
</property>
<property name="windowTitle">
<string>toolBar</string>
</property>
776,6 → 651,14
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
<customwidget>
<class>wgt_Connection</class>
<extends>QWidget</extends>
<header>wgt_Connection.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources>
<include location="../QMK-Maps.qrc"/>
</resources>
796,37 → 679,5
</hint>
</hints>
</connection>
<connection>
<sender>ac_Connect</sender>
<signal>triggered(bool)</signal>
<receiver>btn_Connect</receiver>
<slot>setChecked(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
<hint type="destinationlabel">
<x>133</x>
<y>51</y>
</hint>
</hints>
</connection>
<connection>
<sender>btn_Connect</sender>
<signal>clicked()</signal>
<receiver>ac_Connect</receiver>
<slot>trigger()</slot>
<hints>
<hint type="sourcelabel">
<x>133</x>
<y>51</y>
</hint>
<hint type="destinationlabel">
<x>-1</x>
<y>-1</y>
</hint>
</hints>
</connection>
</connections>
</ui>
/QMK-Groundstation/trunk/QMK-Maps/QMK-Maps.pro
2,9 → 2,8
# Project created by QtCreator 2009-07-20T20:04:00
# -------------------------------------------------
 
DEFINES += _TTY_POSIX_
include(../Global/Class_QMapControl.pri)
include(../Global/Class_SerialPort.pri)
include(../Global/Widget_Connection.pri)
 
QT += network \
xml
18,25 → 17,13
RCC_DIR = ../Binary/.build/QMK-Maps
RESOURCES += QMK-Maps.qrc
SOURCES += main.cpp \
../Global/Class_Input/Input.cpp \
../Global/Class_Input/Input_TCP.cpp \
../Global/Class_Input/Input_TTY.cpp \
../Global/Class_HandlerMK/HandlerMK.cpp \
../Global/Class_HandlerIP/HandlerIP.cpp \
Dialogs/dlg_Main.cpp \
Dialogs/dlg_MapPos.cpp \
Classes/cSettings.cpp \
../Global/Class_HandlerKML/HandlerKML.cpp
HEADERS += Defines.h \
../Global/Kopter.h \
../Global/MK_Datatypes.h \
../Global/Global.h \
../Global/Class_QMapControl.h \
../Global/Class_Input/Input.h \
../Global/Class_Input/Input_TCP.h \
../Global/Class_Input/Input_TTY.h \
../Global/Class_HandlerMK/HandlerMK.h \
../Global/Class_HandlerIP/HandlerIP.h \
Dialogs/dlg_Main.h \
Dialogs/dlg_MapPos.h \
Classes/cSettings.h \