Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
@@ -0,0 +1,75 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* TerrainProfileDialog/ Höhendialog
|
||||
* $Id: zwmsui_TerrainProfileDialog.cpp 21168 2014-10-27 07:35:54Z ehrlicher $
|
||||
* $HeadURL: svn://slssvn/TDS/branches/product/devel/vor_cleanup_zw_zs/ZW/ZWMS/ZWMSUI/zwmsui_TerrainProfileDialog.cpp $
|
||||
* $Author: ehrlicher $
|
||||
*/
|
||||
|
||||
#include "terrain_profile_dialog.h"
|
||||
#include "ui_terrain_profile_dialog.h"
|
||||
|
||||
//#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
#include <Map/map.h>
|
||||
|
||||
namespace SituationMap
|
||||
{
|
||||
TerrainProfileDialog::TerrainProfileDialog(QWidget *parent, LtsWidgets::ButtonCombination buttonCombination)
|
||||
: LtsWidgets::LtsDialog(parent, buttonCombination)
|
||||
, m_ui(new Ui::TerrainProfile)
|
||||
, m_logger(getLogger("TerrainProfileDialog"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
|
||||
connect(m_ui->heightPlotWidget, &LtsHeightPlotWidget::mousePositionChanged, this, &TerrainProfileDialog::onUpdatePosition);
|
||||
|
||||
// SIGNAL-SIGNAL um die Informationen nach aussen zu tragen
|
||||
connect(m_ui->heightPlotWidget, &LtsHeightPlotWidget::mousePositionChanged, this, &TerrainProfileDialog::mousePositionChanged);
|
||||
connect(m_ui->heightPlotWidget, &LtsHeightPlotWidget::startLineOfSight, this, &TerrainProfileDialog::startLineOfSight);
|
||||
connect(m_ui->heightPlotWidget, &LtsHeightPlotWidget::stopLineOfSight, this, &TerrainProfileDialog::stopLineOfSight);
|
||||
|
||||
setOnlineHelpFilename(QStringLiteral("Situation-Start_Terrain_Profil"));
|
||||
}
|
||||
|
||||
TerrainProfileDialog::~TerrainProfileDialog()
|
||||
{
|
||||
delete m_ui;
|
||||
}
|
||||
|
||||
void TerrainProfileDialog::setMap(Map *map)
|
||||
{
|
||||
m_map = map;
|
||||
}
|
||||
|
||||
void TerrainProfileDialog::retranslate()
|
||||
{
|
||||
translate(m_ui, QString(), false, tr("Terrain Profile"));
|
||||
}
|
||||
|
||||
void TerrainProfileDialog::setData(const QVector<heightData> &data)
|
||||
{
|
||||
m_ui->heightPlotWidget->setData(data);
|
||||
}
|
||||
|
||||
void TerrainProfileDialog::setMarks(const QVector<QPointF> &data)
|
||||
{
|
||||
m_ui->heightPlotWidget->setMarks(data);
|
||||
}
|
||||
|
||||
void TerrainProfileDialog::setMarkerPen(const QPen &pen)
|
||||
{
|
||||
m_ui->heightPlotWidget->setMarkerPen(pen);
|
||||
}
|
||||
|
||||
void TerrainProfileDialog::onUpdatePosition(const QPointF &position, double curHeight, double mouseHeight)
|
||||
{
|
||||
QString str; // = LtsCoordTrans::UtmCoordinate::fromGeographic(position).mgrs();
|
||||
if (m_map)
|
||||
str = m_map->mapToMgrsString(position);
|
||||
|
||||
m_ui->lblPosition->setText(str);
|
||||
m_ui->lblHeight->setText(QString::number(curHeight, 'f', 2));
|
||||
m_ui->lblHeightCursor->setText(QString::number(mouseHeight, 'f', 2));
|
||||
}
|
||||
|
||||
} // namespace SituationMap
|
||||
Reference in new issue
Block a user