Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
+41
@@ -0,0 +1,41 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Declaration/Definition
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
#include "jump_point_namer.h"
|
||||
#include "ui_jump_point_namer.h"
|
||||
|
||||
namespace SituationMap
|
||||
{
|
||||
|
||||
JumpPointNamer::JumpPointNamer(int count, const QPointF &coordGeo, QWidget *parent)
|
||||
: LtsWidgets::LtsFramelessDialog(parent, LtsWidgets::Behaviour::Modal)
|
||||
, m_ui(new Ui::JumpPointNamer)
|
||||
, m_coord(coordGeo)
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
m_ui->leName->setText(QStringLiteral("JP_%1").arg(count));
|
||||
#ifdef TABLET_MODE
|
||||
m_ui->leName->setFocusPolicy(Qt::ClickFocus);
|
||||
#endif
|
||||
connect(m_ui->ltsDialogButtonBox->getButton(LtsWidgets::DialogButton::Close), &QPushButton::clicked, this, &JumpPointNamer::close);
|
||||
connect(m_ui->ltsDialogButtonBox->getButton(LtsWidgets::DialogButton::Ok), &QPushButton::clicked, this, &JumpPointNamer::onOk);
|
||||
}
|
||||
|
||||
JumpPointNamer::~JumpPointNamer()
|
||||
{
|
||||
delete m_ui;
|
||||
}
|
||||
|
||||
void JumpPointNamer::onOk()
|
||||
{
|
||||
if (m_ui->leName->text().size() > 0)
|
||||
{
|
||||
emit newName(m_ui->leName->text(), m_coord);
|
||||
close();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user