Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
Executable
+57
@@ -0,0 +1,57 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Info Dialog for B/C Contamination
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by diers, NLE, 2017-03-30
|
||||
*/
|
||||
|
||||
#include "aes_bccontamination_info.h"
|
||||
#include "ui_aes_bccontamination_info.h"
|
||||
|
||||
#include <Plugins/AreaEffectSimulation/Gui/Base/InfoView/aes_base_info.h>
|
||||
#include <LtsSession/lts_session.h>
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
#include <QDateTime>
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
{
|
||||
|
||||
BCContaminationInfo::BCContaminationInfo(QWidget *parent)
|
||||
: LtsDialog(parent)
|
||||
, m_ui(new Ui::BCContaminationInfo)
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
}
|
||||
|
||||
BCContaminationInfo::~BCContaminationInfo()
|
||||
{
|
||||
delete m_ui;
|
||||
}
|
||||
|
||||
void BCContaminationInfo::retranslate()
|
||||
{
|
||||
translate(m_ui, tr("B/C-Contamination"));
|
||||
}
|
||||
|
||||
bool BCContaminationInfo::setData(const BCContamination *item)
|
||||
{
|
||||
m_ui->wBaseData->setData(item);
|
||||
|
||||
m_ui->lblImpactRadius->setText(QString::number(item->impactRadius()));
|
||||
m_ui->lblImpactPosition->setText(LtsCoordTrans::mgrsFromGeographic(item->impactPosition().lon(), item->impactPosition().lat()));
|
||||
m_ui->lblPropagationDirection->setText(tr("%1° = %2 mil").arg(item->propagationDirection(), 0, 'f', 2)
|
||||
.arg(item->propagationDirection() * 6400 / 360.0, 0, 'f', 0));
|
||||
m_ui->lblWindSpeed->setText(QString::number(item->windSpeed(), 'f', 2));
|
||||
m_ui->lblWeatherTimestamp->setText(QDateTime::fromMSecsSinceEpoch(item->weatherTimestamp()).toString());
|
||||
m_ui->lblWeatherPosition->setText(LtsCoordTrans::mgrsFromGeographic(item->weatherPosition().lon(), item->weatherPosition().lat()));
|
||||
return true;
|
||||
}
|
||||
|
||||
void BCContaminationInfo::init(LtsSession::LtsSession *session)
|
||||
{
|
||||
m_ui->wBaseData->init(session);
|
||||
}
|
||||
|
||||
}
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Info Dialog for B/C Contamination
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by diers, NLE, 2017-03-30
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LtsWidgets/lts_dialog.h>
|
||||
#include <Services/AreaEffectSimulation/aes.hpp>
|
||||
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class BCContaminationInfo;
|
||||
}
|
||||
|
||||
namespace LtsSession
|
||||
{
|
||||
class LtsSession;
|
||||
}
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
{
|
||||
|
||||
class BCContaminationInfo : public LtsWidgets::LtsDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit BCContaminationInfo(QWidget *parent = nullptr);
|
||||
~BCContaminationInfo();
|
||||
|
||||
bool setData(const BCContamination *item);
|
||||
void init(LtsSession::LtsSession *session);
|
||||
|
||||
private:
|
||||
void retranslate() override;
|
||||
|
||||
Ui::BCContaminationInfo *m_ui;
|
||||
};
|
||||
|
||||
}
|
||||
Executable
+171
@@ -0,0 +1,171 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>BCContaminationInfo</class>
|
||||
<widget class="QWidget" name="BCContaminationInfo">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>286</width>
|
||||
<height>172</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string notr="true">Aes B/C-Contamination Info</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="leftMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="lblPropagationDirection">
|
||||
<property name="toolTip">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">90° = 1600'</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="lbxWindSpeed">
|
||||
<property name="toolTip">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Wind Speed [m/s]:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="lbxImpactPosition">
|
||||
<property name="toolTip">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Impact Position:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="lbxWeatherTimestamp">
|
||||
<property name="toolTip">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Weather Timestamp:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="lbxImpactRadius">
|
||||
<property name="toolTip">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Impact Radius [m]:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="lbxPropagationDirection">
|
||||
<property name="toolTip">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Propagation Direction:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="lblImpactPosition">
|
||||
<property name="toolTip">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">32U MD 12345 67890</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="AreaEffectSimulation::BaseInfo" name="wBaseData" native="true"/>
|
||||
</item>
|
||||
<item row="7" column="0" colspan="2">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLabel" name="lblWindSpeed">
|
||||
<property name="toolTip">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">2.34</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="lblImpactRadius">
|
||||
<property name="toolTip">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="lbxWeatherPosition">
|
||||
<property name="toolTip">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Weather Position:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLabel" name="lblWeatherTimestamp">
|
||||
<property name="toolTip">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">12:34</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QLabel" name="lblWeatherPosition">
|
||||
<property name="toolTip">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">32U MD 23456 78901</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>AreaEffectSimulation::BaseInfo</class>
|
||||
<extends>QWidget</extends>
|
||||
<header location="global">Plugins/AreaEffectSimulation/Gui/Base/InfoView/aes_base_info.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
Reference in new issue
Block a user