Session 022: Migrate Lts/Tools (72 submodules) to Qt6
- Copied complete Lts/Tools directory from qt5-before to qt6-after - Updated 32 CMakeLists.txt files (Qt5:: → Qt6::) - Tools subdirectory already included in parent Lts/CMakeLists.txt - All 72 tool submodules now present in qt6-migrated-legatus - Includes: Adler, ArAssets, ConfigX, DBAdministration, DBUpdate, DdsView, InfrastructureManagement, and 67 more tools - C++17 standard (RTI 7.7.0 compatibility maintained) - Tests deferred until final validation phase Migration progress: ✅ Lts/Application (68 files) ✅ Lts/DDS (verified Qt6-ready) ✅ Lts/Plugins (60 submodules, verified) ✅ Lts/Projects (5 submodules, verified) ✅ Lts/Proxies (13 submodules, verified) ✅ Lts/Services (47 submodules, verified) ✅ Lts/Tools (72 submodules, copied + CMake updated) ✅ Lts/Viewer (LtsFileDialog, LtsReportDisplay, SituationMap) 🟡 TetraIF (partial) 🟡 Z (partial: nglwidgets, QtSingleApplication, qsql_informix, WMS_Interface)
This commit is contained in:
1 parent
01dce5fe52
commit
d5c13033e2
1792 files changed
+982018
No files matched your search
@@ -0,0 +1,123 @@
|
||||
/*
|
||||
* @RDE_HEADER@
|
||||
* <short description>
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Malte Schröder, SLSE, 2016-06-08
|
||||
*/
|
||||
|
||||
#include "licenceedit.h"
|
||||
#include "ui_licenceedit.h"
|
||||
|
||||
#include <LtsLicence/lts_licence.h>
|
||||
|
||||
LicenceEdit::LicenceEdit(QWidget *parent)
|
||||
: NGLDialog(parent)
|
||||
, m_ui(new Ui::LicenceEdit)
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
|
||||
clear();
|
||||
|
||||
connect(m_ui->nglDialogButtonBox, &NGLDialogButtonBox::onOk,
|
||||
this, &LicenceEdit::onOk);
|
||||
connect(m_ui->nglDialogButtonBox, &NGLDialogButtonBox::onCancel,
|
||||
this, &LicenceEdit::onCancel);
|
||||
connect(m_ui->chbIgnoreCount, &QCheckBox::stateChanged,
|
||||
this, &LicenceEdit::enableIgnoreCount);
|
||||
connect(m_ui->chbIgnoreExpiration, &QCheckBox::stateChanged,
|
||||
this, &LicenceEdit::enableIgnoreExpiration);
|
||||
connect(m_ui->leName, &QLineEdit::textChanged,
|
||||
this, &LicenceEdit::onNameChanged);
|
||||
}
|
||||
|
||||
LicenceEdit::~LicenceEdit()
|
||||
{
|
||||
delete m_ui;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief enables QCheckBox "Ignore Count"
|
||||
* @param checkState
|
||||
*
|
||||
* The function enables or disables the QCheckBox "sbCount"
|
||||
* The parameter @checkState represents the CheckState of the QCheckBox.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
void LicenceEdit::enableIgnoreCount(int checkState)
|
||||
{
|
||||
m_ui->lbxCount->setEnabled(checkState == Qt::Unchecked);
|
||||
m_ui->sbMaxCount->setEnabled(checkState == Qt::Unchecked);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief enables QCheckBox "Ignore Expiration"
|
||||
* @param i
|
||||
*
|
||||
* The function enables or disables the QCheckBox "sbExpiration"
|
||||
* The parameter "i" represents the CheckState of the QCheckBox.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
void LicenceEdit::enableIgnoreExpiration(int checkState)
|
||||
{
|
||||
m_ui->lbxExpiry->setEnabled(checkState == Qt::Unchecked);
|
||||
m_ui->dateEdit->setEnabled(checkState == Qt::Unchecked);
|
||||
m_ui->timeEdit->setEnabled(checkState == Qt::Unchecked);
|
||||
}
|
||||
|
||||
void LicenceEdit::onNameChanged(const QString &name)
|
||||
{
|
||||
setWindowTitle(name.isEmpty() ? tr("Add Licence") : name);
|
||||
m_ui->nglDialogButtonBox->setEnabled(NGLStandardButton::Ok, !name.isEmpty());
|
||||
}
|
||||
|
||||
|
||||
void LicenceEdit::setLicence(const LtsLicence::Licence &licence)
|
||||
{
|
||||
m_ui->leName->setText(licence.name);
|
||||
m_ui->dateEdit->setDate(licence.expiration.date());
|
||||
m_ui->timeEdit->setTime(licence.expiration.time());
|
||||
m_ui->sbMaxCount->setValue(licence.maxCount);
|
||||
m_ui->chbIgnoreCount->setChecked(licence.ignoreMaxCount);
|
||||
m_ui->chbIgnoreExpiration->setChecked(licence.ignoreExpiration);
|
||||
m_ui->leName->setEnabled(false);
|
||||
}
|
||||
|
||||
void LicenceEdit::clear()
|
||||
{
|
||||
m_ui->leName->clear();
|
||||
m_ui->chbIgnoreCount->setChecked(false);
|
||||
m_ui->chbIgnoreExpiration->setChecked(false);
|
||||
m_ui->dateEdit->setMinimumDate(QDate::currentDate());
|
||||
m_ui->dateEdit->setDate(QDateTime::currentDateTime().date());
|
||||
m_ui->timeEdit->setTime(QDateTime::currentDateTime().time());
|
||||
m_ui->sbMaxCount->setValue(1);
|
||||
m_ui->leName->setEnabled(true);
|
||||
m_ui->leName->setFocus();
|
||||
}
|
||||
|
||||
void LicenceEdit::onOk()
|
||||
{
|
||||
QDateTime dateTime(m_ui->dateEdit->date(), m_ui->timeEdit->time());
|
||||
|
||||
LtsLicence::Licence li;
|
||||
li.name = m_ui->leName->text();
|
||||
li.expiration = dateTime;
|
||||
li.maxCount = m_ui->sbMaxCount->text().toInt();
|
||||
li.ignoreMaxCount = m_ui->chbIgnoreCount->isChecked();
|
||||
li.ignoreExpiration = m_ui->chbIgnoreExpiration->isChecked();
|
||||
|
||||
emit newLicence(li);
|
||||
|
||||
accept();
|
||||
}
|
||||
|
||||
void LicenceEdit::onCancel()
|
||||
{
|
||||
reject();
|
||||
}
|
||||
Reference in new issue
Block a user