cee::ug::OverlayColorLegend Class Reference

A color legend to show as overlay in the view. More...

Public Member Functions

int resultId () const
 Returns the result id. More...
 
virtual unsigned int width () const
 Returns the width of the color legend viewport in pixels. More...
 
virtual unsigned int height () const
 Returns the height of the color legend viewport in pixels. More...
 
virtual void setSize (unsigned int width, unsigned int height)
 Sets the height of the color legend in pixels. More...
 
virtual int priority () const
 Returns the render priority of the item. More...
 
virtual void setPriority (int priority)
 Sets render priority of the item. More...
 
- Public Member Functions inherited from cee::vis::OverlayItem
bool visible () const
 Returns true if the overlay item is set to be visible. More...
 
void setVisible (bool visible)
 Sets if the overlay item should be visible or not. More...
 
int absolutePositionX () const
 Returns the x coordinate of the absolute position to use for the OverlayItem if LayoutDirection is specified as ABSOLUTE_POSITION. More...
 
int absolutePositionY () const
 Returns the y coordinate of the absolute position to use for the OverlayItem if LayoutDirection is specified as ABSOLUTE_POSITION. More...
 
void setAbsolutePosition (int x, int y)
 Sets the absolute position of the bottom left corner of the OverlayItem as an offset from the LayoutCorner of the item. More...
 
- Public Member Functions inherited from cee::RefCountedObject
void addRef () const
 Increments the reference count for this object. More...
 
void release () const
 Decrements the reference count for this object. More...
 
int refCount () const
 Returns the reference count for this object. More...
 
void setRefCountZero () const
 Sets the ref count to zero, but DOES NOT delete the object. More...
 

Additional Inherited Members

- Public Types inherited from cee::vis::OverlayItem
enum  LayoutCorner {
  TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT,
  CENTER, TOP_CENTER, BOTTOM_CENTER
}
 Enumerator for the different locations/"corners" of the view. More...
 
enum  LayoutDirection { HORIZONTAL, VERTICAL, ABSOLUTE_POSITION }
 Enumerator for horizontal or vertical orientation of layout items. Describes which direction additional items should be positioned if more than one exists in the same corner. More...
 
Inheritance diagram for cee::ug::OverlayColorLegend:
cee::vis::OverlayItem cee::RefCountedObject

Detailed Description

A color legend to show as overlay in the view.

A color legend shows the correspondence between the colors in the model and the numerical values they represent.

Each scalar result has its own color legend and multiple color legend can be shown simultaneously. A color legend does not need to be added to the view manually as for the other overlay items. Each visualized scalar result has it's own color legend which can be controlled in its scalar settings.

Color legend attributes such as visibility, colors and range, can be modified in the corresponding scalar result's scalar settings. See UnstructGridModel::scalarSettings().

See also
ScalarSettings
OverlayItem

Member Function Documentation

unsigned int cee::ug::OverlayColorLegend::height ( ) const
virtual

Returns the height of the color legend viewport in pixels.

Implements cee::vis::OverlayItem.

int cee::ug::OverlayColorLegend::priority ( ) const
virtual

Returns the render priority of the item.

Implements cee::vis::OverlayItem.

int cee::ug::OverlayColorLegend::resultId ( ) const

Returns the result id.

void cee::ug::OverlayColorLegend::setPriority ( int  priority)
virtual

Sets render priority of the item.

The render priority determines the order in which item get rendered. Items with lower priorities get rendered first. The default priority is 10.

Implements cee::vis::OverlayItem.

void cee::ug::OverlayColorLegend::setSize ( unsigned int  width,
unsigned int  height 
)
virtual

Sets the height of the color legend in pixels.

Implements cee::vis::OverlayItem.

unsigned int cee::ug::OverlayColorLegend::width ( ) const
virtual

Returns the width of the color legend viewport in pixels.

Implements cee::vis::OverlayItem.