- 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)
93 lines
1.5 KiB
C++
Executable File
93 lines
1.5 KiB
C++
Executable File
#include <QLayout>
|
|
|
|
#include "content.h"
|
|
#include "fullline.h"
|
|
#include "ui_content.h"
|
|
|
|
Content::Content(QWidget *parent) : QWidget(parent)
|
|
, m_ui(new Ui::Content)
|
|
{
|
|
m_ui->setupUi(this);
|
|
}
|
|
|
|
Content::~Content()
|
|
{
|
|
delete m_ui;
|
|
}
|
|
|
|
void Content::init()
|
|
{
|
|
delete layout();
|
|
m_layout = new QVBoxLayout(this);
|
|
m_layout->setSpacing(0);
|
|
|
|
while (!m_lines.isEmpty())
|
|
deleteLastLine();
|
|
|
|
while (m_lines.size() < m_lineCount)
|
|
newLine();
|
|
}
|
|
|
|
void Content::setLineCount(int lineCount)
|
|
{
|
|
while(lineCount != m_lines.size())
|
|
{
|
|
if(lineCount > m_lineCount)
|
|
newLine();
|
|
else if (lineCount < m_lineCount)
|
|
deleteLastLine();
|
|
}
|
|
|
|
m_lineCount = m_lines.size();
|
|
}
|
|
|
|
void Content::setCharCount(int charCount)
|
|
{
|
|
m_charCount = charCount;
|
|
|
|
for (FullLine * l : qAsConst(m_lines))
|
|
l->setCharCount(m_charCount);
|
|
}
|
|
|
|
int Content::charCount() const
|
|
{
|
|
return m_charCount;
|
|
}
|
|
|
|
void Content::setHeight(int height)
|
|
{
|
|
m_height = height;
|
|
|
|
for (FullLine * l : qAsConst(m_lines))
|
|
l->setHeight(height);
|
|
}
|
|
|
|
int Content::height() const
|
|
{
|
|
return m_height;
|
|
}
|
|
|
|
void Content::setCharCountAndHeight(int charCount, int height)
|
|
{
|
|
m_charCount = charCount;
|
|
m_height = height;
|
|
|
|
init();
|
|
}
|
|
|
|
void Content::newLine()
|
|
{
|
|
FullLine *line = new FullLine(m_lines.count()+1, m_height, m_charCount, this);
|
|
m_layout->addWidget(line);
|
|
m_lines.append(line);
|
|
}
|
|
|
|
void Content::deleteLastLine()
|
|
{
|
|
if (m_lines.isEmpty())
|
|
return;
|
|
|
|
delete m_lines.last();
|
|
m_lines.remove(m_lines.size()-1);
|
|
}
|