mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-27 19:45:43 +03:00
54 lines
1.3 KiB
C++
54 lines
1.3 KiB
C++
#ifndef CFICONTROLLER_H
|
||
#define CFICONTROLLER_H
|
||
|
||
#include <QObject>
|
||
#include <QMutex>
|
||
#include <QLocale>
|
||
#include "updatecontroller.h"
|
||
#include "cfiobject.h"
|
||
|
||
class CfiController : public QObject
|
||
{
|
||
Q_OBJECT
|
||
public:
|
||
explicit CfiController(UpdateController* updateController, QObject *parent = nullptr);
|
||
~CfiController();
|
||
public:
|
||
void lockAccessToCfiXML();
|
||
void unLockAccessToCfiXML();
|
||
|
||
//Распарсивание файла CfiList.xml
|
||
bool parsingCfiXML(QMap<int, CfiObject>& mapCfiObjects);
|
||
|
||
//Слияние (обновление) с новыми данными
|
||
bool updateCfiXML(const QByteArray& array);
|
||
|
||
//Для теста
|
||
//void test();
|
||
|
||
signals:
|
||
|
||
private:
|
||
Vector3dDouble getXYZfromElement(QDomElement element);
|
||
Vector2dDouble getXYfromElement(QDomElement element);
|
||
|
||
double roundDoubleVal(double value, int cntNumAfterPoint);
|
||
|
||
bool parsingCfiXML_DOM(QDomDocument& domDoc, QMap<int, CfiObject>& mapCfiObjects);
|
||
|
||
bool merge2map(QMap<int, CfiObject>& mapCfiObjects_orig, QMap<int, CfiObject>& mapCfiObjects_new);
|
||
|
||
bool saveNewCfiListFile(QMap<int, CfiObject>& mapCfiObjects);
|
||
|
||
private:
|
||
UpdateController* updateController;
|
||
|
||
QMutex mtxAccess;
|
||
|
||
//QList<CfiObject> listCfiObjects;
|
||
|
||
QLocale* germanLocale;
|
||
};
|
||
|
||
#endif // CFICONTROLLER_H
|