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