Remove field accessor method. Adjusted whitespace

This commit is contained in:
Jacob Støren 2017-10-06 13:34:45 +02:00
parent 9bb5dcf011
commit 62b8da837f
3 changed files with 23 additions and 26 deletions

View File

@ -530,8 +530,8 @@ QString RimWellRftPlot::currentWellName() const
//--------------------------------------------------------------------------------------------------
bool RimWellRftPlot::hasPressureData(RimWellLogFile* wellLogFile)
{
const auto& wellLogChannels = wellLogFile->wellLogChannelNames();
for (const auto& wellLogChannel : *wellLogChannels)
auto wellLogChannels = wellLogFile->wellLogChannels();
for (const auto& wellLogChannel : wellLogChannels)
{
if (hasPressureData(wellLogChannel)) return true;
}

View File

@ -43,31 +43,28 @@ public:
RimWellLogFile();
virtual ~RimWellLogFile();
static RimWellLogFile* readWellLogFile(const QString& logFilePath);
void setFileName(const QString& fileName);
QString fileName() const { return m_fileName; }
bool readFile(QString* errorMessage);
QString wellName() const;
QString date() const;
virtual caf::PdmFieldHandle* userDescriptionField() { return &m_name; }
RigWellLogFile* wellLogFile() { return m_wellLogDataFile.p(); }
const caf::PdmChildArrayField<RimWellLogFileChannel*>* wellLogChannelNames() const { return &m_wellLogChannelNames; }
static RimWellLogFile* readWellLogFile(const QString& logFilePath);
void setFileName(const QString& fileName);
QString fileName() const { return m_fileName; }
bool readFile(QString* errorMessage);
QString wellName() const;
QString date() const;
RigWellLogFile* wellLogFile() { return m_wellLogDataFile.p(); }
std::vector<RimWellLogFileChannel*> wellLogChannels() const;
private:
virtual caf::PdmFieldHandle* userDescriptionField() { return &m_name; }
caf::PdmChildArrayField<RimWellLogFileChannel*> m_wellLogChannelNames;
private:
cvf::ref<RigWellLogFile> m_wellLogDataFile;
caf::PdmField<QString> m_wellName;
caf::PdmField<QString> m_fileName;
caf::PdmField<QString> m_name;
caf::PdmField<QString> m_date;
cvf::ref<RigWellLogFile> m_wellLogDataFile;
caf::PdmField<QString> m_wellName;
caf::PdmField<QString> m_fileName;
caf::PdmField<QString> m_name;
caf::PdmField<QString> m_date;
};

View File

@ -240,11 +240,11 @@ QList<caf::PdmOptionItemInfo> RimWellLogFileCurve::calculateValueOptions(const c
RimWellLogFile* wellLogFile = m_wellPath->wellLogFile();
if (wellLogFile)
{
const caf::PdmChildArrayField<RimWellLogFileChannel*>* fileLogs = wellLogFile->wellLogChannelNames();
std::vector<RimWellLogFileChannel*> fileLogs = wellLogFile->wellLogChannels();
for (size_t i = 0; i < fileLogs->size(); i++)
for (size_t i = 0; i < fileLogs.size(); i++)
{
QString wellLogChannelName = (*fileLogs)[i]->name();
QString wellLogChannelName = fileLogs[i]->name();
options.push_back(caf::PdmOptionItemInfo(wellLogChannelName, wellLogChannelName));
}
}