mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-16 10:22:15 -05:00
Add color icon to RimColorLegendItem in project tree.
This commit is contained in:
1 parent
db384ea754
commit
368de8491e
2 files changed
+14
-1
No files matched your search
@@ -108,3 +108,15 @@ QString RimColorLegendItem::extractColorItemName() const
|
||||
{
|
||||
return QString( "%1" ).arg( m_categoryValue, 2, 10, QChar( '0' ) ) + " " + m_categoryName;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimColorLegendItem::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/ )
|
||||
{
|
||||
QColor qcolor( m_color().rByte(), m_color().gByte(), m_color().bByte() );
|
||||
|
||||
caf::QIconProvider iconProvider = this->uiIconProvider();
|
||||
iconProvider.setBackgroundColor( qcolor );
|
||||
this->setUiIcon( iconProvider );
|
||||
}
|
||||
Reference in new issue
Block a user