mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Parse options. Rename field
This commit is contained in:
parent
61779e5876
commit
8dd804b5ee
@ -128,7 +128,7 @@ const AsciiDataParseOptions RicPasteAsciiDataToSummaryPlotFeatureUi::parseOption
|
|||||||
dateFormat = m_dateFormat().text();
|
dateFormat = m_dateFormat().text();
|
||||||
}
|
}
|
||||||
|
|
||||||
parseOptions.dateFormat_ = dateFormat;
|
parseOptions.dateFormat = dateFormat;
|
||||||
}
|
}
|
||||||
|
|
||||||
parseOptions.timeFormat = m_timeFormat() != TIME_NONE ? m_timeFormat().text() : QString("");
|
parseOptions.timeFormat = m_timeFormat() != TIME_NONE ? m_timeFormat().text() : QString("");
|
||||||
|
@ -36,7 +36,7 @@ public:
|
|||||||
QString plotTitle;
|
QString plotTitle;
|
||||||
QString curvePrefix;
|
QString curvePrefix;
|
||||||
QString decimalSeparator;
|
QString decimalSeparator;
|
||||||
QString dateFormat_;
|
QString dateFormat;
|
||||||
QString timeFormat;
|
QString timeFormat;
|
||||||
QString cellSeparator;
|
QString cellSeparator;
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ public:
|
|||||||
RimPlotCurve::PointSymbolEnum curveSymbol;
|
RimPlotCurve::PointSymbolEnum curveSymbol;
|
||||||
float curveSymbolSkipDistance;
|
float curveSymbolSkipDistance;
|
||||||
|
|
||||||
QString dateTimeFormat() const { return dateFormat_ + " " + timeFormat; }
|
QString dateTimeFormat() const { return dateFormat + " " + timeFormat; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ bool RifCsvUserDataParser::parseData(const QString& data, const AsciiDataParseOp
|
|||||||
col.dataType = ColumnInfo::NUMERIC;
|
col.dataType = ColumnInfo::NUMERIC;
|
||||||
}
|
}
|
||||||
else if (tryParseDateTime(colData, parseOptions.dateTimeFormat()).isValid() ||
|
else if (tryParseDateTime(colData, parseOptions.dateTimeFormat()).isValid() ||
|
||||||
tryParseDateTime(colData, parseOptions.dateFormat_).isValid())
|
tryParseDateTime(colData, parseOptions.dateFormat).isValid())
|
||||||
{
|
{
|
||||||
col.dataType = ColumnInfo::DATETIME;
|
col.dataType = ColumnInfo::DATETIME;
|
||||||
}
|
}
|
||||||
@ -152,7 +152,7 @@ bool RifCsvUserDataParser::parseData(const QString& data, const AsciiDataParseOp
|
|||||||
QDateTime dt = tryParseDateTime(colData, parseOptions.dateTimeFormat());
|
QDateTime dt = tryParseDateTime(colData, parseOptions.dateTimeFormat());
|
||||||
if (!dt.isValid())
|
if (!dt.isValid())
|
||||||
{
|
{
|
||||||
dt = tryParseDateTime(colData, parseOptions.dateFormat_);
|
dt = tryParseDateTime(colData, parseOptions.dateFormat);
|
||||||
}
|
}
|
||||||
if (!dt.isValid()) throw 0;
|
if (!dt.isValid()) throw 0;
|
||||||
col.dateTimeValues.push_back(dt);
|
col.dateTimeValues.push_back(dt);
|
||||||
|
Loading…
Reference in New Issue
Block a user