Major Changes:
- Merged latest Qt5 devel content from dlbo (292 files changed, 7 new dirs)
- Consolidated forward-declarations and include folders
- Removed unneeded modules per Niklas' repo check list
Build System Fixes:
- Fixed CMake VERSION_GREATER syntax in ParticipantManagement/CMakeLists.txt
- Added VLC packages (libvlc-dev, vlc-plugin-base) to docker_build.sh
- Added PostgreSQL dev packages (libpq-dev, postgresql-server-dev-all) to Dockerfile
- Fixed locale warnings (ANSI_X3.4-1968 → C.UTF-8)
- Fixed ArcGIS SDK path warnings when BUILD_ARCGIS=OFF
Code Generation Fixes:
- Fixed IDL enum collisions (PortType→CorePortType/DdsutPortType, PdmEventType)
- Fixed Grantlee template svc_translation.cpp.grantlee:
- Changed {{ idl_enum.name }}_def:: to {{ idl_enum.name }}::
- Fixed .underlying() calls for C++11 scoped enums (enum class)
- Removed generated files from repo (moc_*, *_dtc.h, *_ftc.h)
Validation:
- BUILD_RTI=ON: SUCCESS
- BUILD_RTI=OFF: SUCCESS
- C++17 standard maintained for RTI 7.7 compatibility
- Ubuntu 26.04 Docker environment verified
Remaining Warnings (expected):
- BgViewer, KDChart, KDReports, Poppler-Qt6 not found (optional features)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
109 lines
2.2 KiB
C++
109 lines
2.2 KiB
C++
#pragma once
|
|
|
|
#include "LoginWnd.h"
|
|
#include "DataModel.h"
|
|
#include "AddModel.h"
|
|
|
|
#include <QSqlDatabase>
|
|
#include <QList>
|
|
#include <QModelIndex>
|
|
|
|
class Query;
|
|
|
|
class QueryWorker: public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit QueryWorker();
|
|
~QueryWorker();
|
|
|
|
void dy()
|
|
{
|
|
m_dy = true;
|
|
}
|
|
|
|
bool isIdle() const
|
|
{
|
|
return m_idle;
|
|
}
|
|
|
|
QAtomicInt m_dy;
|
|
QAtomicInt m_idle; // dunno how to solve this atm
|
|
|
|
private:
|
|
QSqlDatabase m_sqlDB;
|
|
|
|
QString selectQuery(const QString &queryString, DataModel *dataModel); //DataModel* model, )
|
|
QString executeQuery(int* affectedRows, const QString &queryString);
|
|
QString valueToSqlString(const QVariant &val, const HeaderList &headerList, const int col);
|
|
|
|
|
|
// NEW ARCH
|
|
// Delete Lines
|
|
public slots:
|
|
void slotDeleteLines(Query* caller, const QList<QModelIndex> &selectedRows, DataModel* dataModel);
|
|
|
|
signals:
|
|
void signalDeleteLinesResult(Query*,int, const QString &, const QList<QModelIndex> &);
|
|
|
|
|
|
// Custom Query
|
|
public slots:
|
|
void slotCustomQuery(Query* caller, const QString &queryString, DataModel* model);
|
|
|
|
signals:
|
|
void signalCustomQueryResult(Query*,const QString &);
|
|
|
|
|
|
// Table Query
|
|
public slots:
|
|
void slotTableQuery(Query* caller, DataModel* model);
|
|
|
|
signals:
|
|
void signalTableQueryResult(Query*,const QString &);
|
|
void signalSwapModelData();
|
|
|
|
|
|
|
|
// Add Lines
|
|
public slots:
|
|
void slotAddLines(Query* caller, AddModel* addModel);
|
|
|
|
signals:
|
|
void signalAddLinesResult(Query*,int, const QString &);
|
|
|
|
|
|
|
|
// Set Data
|
|
public slots:
|
|
void slotSetData(Query* caller, DataModel*, const QModelIndex &, const QVariant &);
|
|
|
|
signals:
|
|
void signalSetDataResult(Query*,const QString &);
|
|
void signalSetDataInModel(const QModelIndex &idx, const QVariant &data);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public slots:
|
|
void slotConnectIt(const LoginData &loginData);
|
|
void slotGetTableList();
|
|
|
|
|
|
signals:
|
|
void signalConnectResult(const QString &);
|
|
void signalNewTableList(const QStringList &);
|
|
|
|
//unused?void signalSelectQueryResult(QString errorMsg, DataModel* dataModel);
|
|
void signalSelectQueryStatus(int percent); // 0 - 100
|
|
|
|
//unsued?void signalExecuteQueryResult(bool success, QString errorMsg, QVariant actualValue, QModelIndex onThisPosition); // take actual value as the new value set!
|
|
void signalExecuteQueryStatus(int percent);
|
|
|
|
};
|