Add Lts/Application module with Qt6 CMakeLists updates

- Copy Lts/Application from qt5-before (AarApp, OpApp, THP submodules)
- Update all CMakeLists.txt to use Qt6::Core, Qt6::Widgets, Qt6::Xml, Qt6::Network, Qt6::PrintSupport, Qt6::Svg, Qt6::WebEngineCore, Qt6::WebEngineWidgets
- No SIGNAL/SLOT, QRegExp, QDesktopWidget, or QTextCodec issues found in Application source code
- Module ready for Qt6 build validation
This commit is contained in:
torsten committed 2026-08-25 13:28:58 +02:00
1 parent 079175a055
commit 45eb8ee689
68 files changed
+9120

No files matched your search

@@ -0,0 +1,100 @@
/**
* @RDE_HEADER@
* PresentationManangement - Script Overview Dialog Model
* $Id$
* $HeadURL$
* $Author$
*
* Created by Mike Wille, SLSE, 2017-03-15
*/
#pragma once
#include "logger.h"
#include <LtsUtils/LtsUtilsCore/data_modification_enum.h>
#include <QAbstractTableModel>
#include <QSortFilterProxyModel>
class QSqlDatabase;
namespace AARApplication
{
struct Exercise
{
qint32 id = 0;
QString name;
QString dbName;
qint64 startTime = 0;
qint64 endTime = 0;
qint32 stateId = 0;
bool operator == (const Exercise &other) { return id == other.m_id; }
bool operator != (const Exercise &other) { return id != other.m_id; }
};
////////////////////////////////////////////////////////////////////////////////////////////////////
// DatabasesModel
//
class DatabasesModel : public QAbstractTableModel
{
Q_OBJECT
public:
enum Columns
{
Id = 0,
Name,
StartTime,
EndTime
};
explicit DatabasesModel(QObject *parent = nullptr);
~DatabasesModel() = default;
bool initModel(const QSqlDatabase &db);
QVariant data(const QModelIndex &, int) const override final;
int rowCount(const QModelIndex &parent) const override final;
int columnCount(const QModelIndex &parent) const override final;
QVariant headerData(int section, Qt::Orientation orientation, int role) const override final;
Exercise getRowData(int row) const;
bool insertRow(const Exercise &item);
bool removeRow(const int &row);
friend class DatabasesProxyModel;
protected:
public slots:
void onDataChanged(const Exercise &data, DataModification modType);
private:
QVector<Exercise> m_vecData;
LOGGER_T m_logger;
};
////////////////////////////////////////////////////////////////////////////////////////////////////
// DatabasesProxyModel
//
class DatabasesProxyModel final : public QSortFilterProxyModel
{
Q_OBJECT
public:
using QSortFilterProxyModel::QSortFilterProxyModel;
void setSourceModel(QAbstractItemModel *sourceModel) override;
protected:
bool lessThan(const QModelIndex &source_left, const QModelIndex &source_right) const override;
private:
DatabasesModel *m_sourceModel = nullptr;
};
}