mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-11 07:56:08 -06:00
Output field keyword alias names
This commit is contained in:
parent
2d5d4e4f52
commit
3c05fff768
@ -24,6 +24,7 @@
|
||||
|
||||
#include "cafClassTypeName.h"
|
||||
#include "cafPdmDefaultObjectFactory.h"
|
||||
#include "cafPdmXmlFieldHandle.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QApplication>
|
||||
@ -122,7 +123,14 @@ void RicExportObjectAndFieldKeywordsFeature::exportObjectAndFieldKeywords( const
|
||||
|
||||
for ( auto f : fields )
|
||||
{
|
||||
if ( !f->xmlCapability()->isIOReadable() ) continue;
|
||||
|
||||
stream << " " << f->keyword() << "\n";
|
||||
|
||||
for ( auto alias : f->keywordAliases() )
|
||||
{
|
||||
stream << " (A)" << alias << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
stream << "\n";
|
||||
|
@ -124,6 +124,14 @@ bool PdmFieldHandle::matchesKeywordAlias(const QString& keyword) const
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<QString> PdmFieldHandle::keywordAliases() const
|
||||
{
|
||||
return m_keywordAliases;
|
||||
}
|
||||
|
||||
// These two functions can be used when PdmCore is used standalone without PdmUi/PdmXml
|
||||
/*
|
||||
PdmUiFieldHandle* PdmFieldHandle::uiCapability()
|
||||
|
@ -27,8 +27,9 @@ public:
|
||||
PdmObjectHandle* ownerObject();
|
||||
QString ownerClass() const;
|
||||
|
||||
void registerKeywordAlias(const QString& alias);
|
||||
bool matchesKeywordAlias(const QString& keyword) const;
|
||||
void registerKeywordAlias(const QString& alias);
|
||||
bool matchesKeywordAlias(const QString& keyword) const;
|
||||
std::vector<QString> keywordAliases() const;
|
||||
|
||||
// Child objects
|
||||
bool hasChildObjects();
|
||||
|
Loading…
Reference in New Issue
Block a user