#7656 AppFwk : Make it possible to create a custom uiTreeOrdering

This commit is contained in:
Magne Sjaastad 2021-05-10 14:01:32 +02:00
parent e04c761752
commit 5c1b08a05b
2 changed files with 6 additions and 4 deletions

View File

@ -76,11 +76,13 @@ void PdmUiTreeOrdering::add( PdmFieldHandle* field, QString uiConfigName )
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void PdmUiTreeOrdering::add( PdmObjectHandle* object )
PdmUiTreeOrdering* PdmUiTreeOrdering::add( PdmObjectHandle* object )
{
CAF_ASSERT( object );
new PdmUiTreeOrdering( this, object );
auto node = new PdmUiTreeOrdering( this, object );
return node;
}
//--------------------------------------------------------------------------------------------------

View File

@ -69,8 +69,9 @@ public:
PdmUiTreeOrdering& operator=( const PdmUiTreeOrdering& ) = delete;
void add( PdmFieldHandle* field, QString uiConfigName = "" );
void add( PdmObjectHandle* object );
PdmUiTreeOrdering* add( PdmObjectHandle* object );
PdmUiTreeOrdering* add( const QString& title, const QString& iconResourceName );
void appendChild( PdmUiTreeOrdering* child );
/// If the rest of the fields containing children is supposed to be omitted, set skipRemainingFields to true.
void skipRemainingChildren( bool doSkip = true ) { m_forgetRemainingFields = doSkip; }
@ -105,7 +106,6 @@ private:
bool ignoreSubTree() const { return m_isToIgnoreSubTree; }
bool containsField( const PdmFieldHandle* field );
bool containsObject( const PdmObjectHandle* object );
void appendChild( PdmUiTreeOrdering* child );
friend class PdmUiTreeViewQModel;
PdmUiEditorHandle* editor();