//-Correction d'un problème de parsing des fichiers LogZT
//-Correction de l'affichage du répertoire de la db au démarrage
This commit is contained in:
jfmartel 2025-02-04 12:06:41 -05:00
parent ce57a2e501
commit 291d9bad85
8 changed files with 27 additions and 6 deletions

View File

@ -54,6 +54,7 @@ CLogViewPage::CLogViewPage(int Width, QGraphicsWidget *Parent)
mMouseDragging = false;
mViewType = UNKNOWN_LOG_TYPE;
mPGTreshold = 0;
mGraphZoneWidth = GRAPH_ZONE_WIDTH;
setFlag(QGraphicsItem::ItemIsFocusable);
@ -76,6 +77,7 @@ CLogViewPage::CLogViewPage(int Width, QGraphicsWidget *Parent)
PlotsHeight -= (20 + (10/(ZT1_DISCREET_PLOTTABLE_NB_PARAM + ZT1_ANALOG_PLOTTABLE_NB_PARAM))) ; //space between plots
int CurPlot = 0;
int GraphZoneWidth = Width - GRAPH_ZONE_X_OFFSET;//boundingRect().width();
mGraphZoneWidth = GraphZoneWidth;
for(int param = 0; param < ZT1_DISCREET_PLOTTABLE_NB_PARAM; param++)
{
mZT1DiscreetPlots[param].mParamID = param;
@ -1168,8 +1170,8 @@ unsigned int CLogViewPage::AdjustMouseCursorPos(qreal PosX, qreal PosY)
mCursorPos = PosX;
if(mCursorPos < GRAPH_ZONE_X_OFFSET)
mCursorPos = GRAPH_ZONE_X_OFFSET;
else if(mCursorPos > GRAPH_ZONE_WIDTH + GRAPH_ZONE_X_OFFSET)
mCursorPos = GRAPH_ZONE_WIDTH + GRAPH_ZONE_X_OFFSET;
else if(mCursorPos > mGraphZoneWidth + GRAPH_ZONE_X_OFFSET)
mCursorPos = mGraphZoneWidth + GRAPH_ZONE_X_OFFSET;
qreal HCursorPos = PosY;
if(HCursorPos > GRAPH_ZONE_HEIGHT)

View File

@ -172,6 +172,7 @@ private:
CRankRulerWidget *mRankRuler;
CEventRulerWidget *mEventRuler;
unsigned int mViewType;
int mGraphZoneWidth;
int mStaticCursor1Pos, mStaticCursor2Pos;
int mCursorPos;

View File

@ -682,6 +682,11 @@ void CLogsListPage::ViewZTLogBtnClicked(CPushButton *btn)
QFileInfo FileDir(FilePath);
QString ZTLogFilePath = FileDir.absolutePath();
ZTLogFilePath += "/ZTLog.txt";
if(QFileInfo(ZTLogFilePath).exists() == false)
{
ZTLogFilePath = FileDir.absolutePath();
ZTLogFilePath += "/LogZT.txt";
}
int line =0;
QFile *LogFile = new QFile(ZTLogFilePath);

View File

@ -104,6 +104,7 @@ COptionsPage::COptionsPage(QGraphicsWidget *Parent)
StationName->adjustSize();
StationName->setPos(xpos-StationName->boundingRect().width(), ypos + (i*30));
StationName->hide();
StationIP = new QLineEdit("100.100.100.100");
Proxy = new QGraphicsProxyWidget(this);
@ -112,6 +113,7 @@ COptionsPage::COptionsPage(QGraphicsWidget *Parent)
Proxy->setPos(xpos+10,ypos +(i*30)+3);
StationIP->resize(100,20);
StationIP->setEnabled(false);
StationIP->hide();
mIpAddressList.append(StationIP);
}

View File

@ -60,7 +60,7 @@ public:
unsigned int SetSettings(CSettingsData *SettingsData);
void EnableEngineeringMode();
QGraphicsTextItem *mLogsPathText;
private:
@ -69,7 +69,7 @@ private:
CTextButtonWidget *mCancelButton;
CTextButtonWidget *mApplyNetworkSettingsBtn;
QGraphicsTextItem *mLogsPathText;
QList<QLineEdit*> mIpAddressList;
CSettingsData *mSettings;

View File

@ -94,6 +94,7 @@ unsigned int COutilZT::Start()
mSettingsFileMgr.LoadSettings(&mSettingsData);
panel.mOptionsPage->mLogsPathText->setPlainText(mSettingsData.mDataSourceDirectoryPath);
// CNetworkManager::instance()->BindPointers(this);

View File

@ -1,6 +1,15 @@
#ifndef OUTILZTVERSION_H
#define OUTILZTVERSION_H
#define SOFTWARE_VERSION "1.15"
#define SOFTWARE_VERSION "1.17"
//Suivi des versions
//
//1.17
//-Correction d'un problème de parsing des fichiers LogZT
//-Correction de l'affichage du répertoire de la db au démarrage
// 1.16
//-Compilation sur Qt 5.14.2
//-Adaptation pour supporter les flags d'état d'activation des fonctions de détection
#endif // OUTILZTVERSION_H

View File

@ -169,7 +169,8 @@ bool CZTLogFilesMgr::ExtractLogInfo(QString LogFilePath)
{
QFileInfo LogFileInfo(LogFilePath);
if(LogFileInfo.fileName() != "ZTLog.txt")
if(LogFileInfo.fileName() != "ZTLog.txt" &&
LogFileInfo.fileName() != "LogZT.txt")
return false;
CZTLogFileInfo NewLogFileInfo;