mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Add getters for RimColorLegend++.
This commit is contained in:
committed by
Magne Sjaastad
parent
0bf3ed91f0
commit
db384ea754
@@ -65,6 +65,14 @@ void RimColorLegend::appendColorLegendItem( RimColorLegendItem* colorLegendItem
|
|||||||
m_colorLegendItems.push_back( colorLegendItem );
|
m_colorLegendItems.push_back( colorLegendItem );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
std::vector<RimColorLegendItem*> RimColorLegend::colorLegendItems() const
|
||||||
|
{
|
||||||
|
return m_colorLegendItems.childObjects();
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -45,6 +45,8 @@ public:
|
|||||||
void setColorLegendName( const QString& colorLegendName );
|
void setColorLegendName( const QString& colorLegendName );
|
||||||
void appendColorLegendItem( RimColorLegendItem* colorLegendItem );
|
void appendColorLegendItem( RimColorLegendItem* colorLegendItem );
|
||||||
|
|
||||||
|
std::vector<RimColorLegendItem*> colorLegendItems() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
caf::PdmFieldHandle* userDescriptionField() override;
|
caf::PdmFieldHandle* userDescriptionField() override;
|
||||||
|
|
||||||
|
|||||||
@@ -47,6 +47,14 @@ void RimColorLegendCollection::appendColorLegend( RimColorLegend* colorLegend )
|
|||||||
m_colorLegends.push_back( colorLegend );
|
m_colorLegends.push_back( colorLegend );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
std::vector<RimColorLegend*> RimColorLegendCollection::colorLegends() const
|
||||||
|
{
|
||||||
|
return m_colorLegends.childObjects();
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -41,9 +41,10 @@ public:
|
|||||||
RimColorLegendCollection();
|
RimColorLegendCollection();
|
||||||
~RimColorLegendCollection() override;
|
~RimColorLegendCollection() override;
|
||||||
|
|
||||||
public:
|
|
||||||
void appendColorLegend( RimColorLegend* colorLegend );
|
void appendColorLegend( RimColorLegend* colorLegend );
|
||||||
|
|
||||||
|
std::vector<RimColorLegend*> colorLegends() const;
|
||||||
|
|
||||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -60,6 +60,30 @@ void RimColorLegendItem::setValues( const QString& categoryName, int categoryVal
|
|||||||
m_color = color;
|
m_color = color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
const cvf::Color3f& RimColorLegendItem::color() const
|
||||||
|
{
|
||||||
|
return m_color();
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
const QString& RimColorLegendItem::categoryName() const
|
||||||
|
{
|
||||||
|
return m_categoryName();
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
int RimColorLegendItem::categoryValue() const
|
||||||
|
{
|
||||||
|
return m_categoryValue();
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -41,7 +41,10 @@ public:
|
|||||||
RimColorLegendItem();
|
RimColorLegendItem();
|
||||||
~RimColorLegendItem() override;
|
~RimColorLegendItem() override;
|
||||||
|
|
||||||
void setValues( const QString& categoryName, int categoryValue, const cvf::Color3f& color );
|
void setValues( const QString& categoryName, int categoryValue, const cvf::Color3f& color );
|
||||||
|
const cvf::Color3f& color() const;
|
||||||
|
const QString& categoryName() const;
|
||||||
|
int categoryValue() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||||
|
|||||||
Reference in New Issue
Block a user