anatomist 6.0.4
3D neuroimaging data viewer
anatomist::MiniPaletteGraphics Class Reference

MiniPaletteGraphics is an element which draws a palette in a GraphicsView scene. More...

#include <anatomist/color/minipalette.h>

Inheritance diagram for anatomist::MiniPaletteGraphics:
Collaboration diagram for anatomist::MiniPaletteGraphics:

Public Member Functions

 MiniPaletteGraphics (QGraphicsView *graphicsview, AObject *object=0, int dims=0, float width=-10000, float height=-10000, float left=-10000, float top=-10000, bool with_view=true)
 Parameters: graphicsview: the existing graphic view where the palette should be drawn object: object to display or edit the palette for width: width of the display in the graphics view.
 
virtual ~MiniPaletteGraphics ()
 
AObjectgetObject ()
 
void setObject (AObject *obj, int dims=1)
 set or change the observed object
 
void setRange (double min, double max, int dim)
 
void updateDisplay ()
 
void resize (float x, float y, float w, float h)
 
float width () const
 
float height () const
 
float top () const
 
float left () const
 
void clear ()
 
void update (const Observable *observable, void *arg)
 This method is called whenever the observed object is changed.
 
double min (int dim) const
 
double max (int dim) const
 
int observedDimensions () const
 
std::pair< double, double > range (int dim) const
 
- Public Member Functions inherited from anatomist::Observer
virtual ~Observer ()
 

Additional Inherited Members

- Protected Member Functions inherited from anatomist::Observer
virtual void cleanupObserver ()
 call this function from inherited classes destructors.
 
virtual void registerObservable (Observable *)
 only called by Observable: don't use this function directly
 
virtual void unregisterObservable (Observable *)
 Called when an observable is destroyed, only called by Observable: don't use this function directly.
 
const std::set< Observable * > & observed () const
 

Detailed Description

MiniPaletteGraphics is an element which draws a palette in a GraphicsView scene.

It is used by MiniPaletteWidget, but can be used alone in a QGraphicsView.

It provides a small sized palette widget which can be used to display the palette.

The palette view displayes the palette assigned to an object, and the view may be zoomed to a given values range.

Definition at line 25 of file minipalette.h.

Constructor & Destructor Documentation

◆ MiniPaletteGraphics()

anatomist::MiniPaletteGraphics::MiniPaletteGraphics ( QGraphicsView * graphicsview,
AObject * object = 0,
int dims = 0,
float width = -10000,
float height = -10000,
float left = -10000,
float top = -10000,
bool with_view = true )

Parameters: graphicsview: the existing graphic view where the palette should be drawn object: object to display or edit the palette for width: width of the display in the graphics view.

-10000 (default) means whole scene width. height: height of the display in the graphics view. -10000 (default) means whole scene height. left: left position of the display in the graphics view. -10000 (default) means centered in scene. top: top position of the display in the graphics view. -10000 (default) means centered in scene. with_view: bool if false, the palette view will not be displayed.

References height(), left(), top(), and width().

◆ ~MiniPaletteGraphics()

virtual anatomist::MiniPaletteGraphics::~MiniPaletteGraphics ( )
virtual

Member Function Documentation

◆ clear()

void anatomist::MiniPaletteGraphics::clear ( )

◆ getObject()

AObject * anatomist::MiniPaletteGraphics::getObject ( )

◆ height()

float anatomist::MiniPaletteGraphics::height ( ) const

Referenced by MiniPaletteGraphics().

◆ left()

float anatomist::MiniPaletteGraphics::left ( ) const

Referenced by MiniPaletteGraphics().

◆ max()

double anatomist::MiniPaletteGraphics::max ( int dim) const

Referenced by setRange().

◆ min()

double anatomist::MiniPaletteGraphics::min ( int dim) const

Referenced by setRange().

◆ observedDimensions()

int anatomist::MiniPaletteGraphics::observedDimensions ( ) const

◆ range()

std::pair< double, double > anatomist::MiniPaletteGraphics::range ( int dim) const

◆ resize()

void anatomist::MiniPaletteGraphics::resize ( float x,
float y,
float w,
float h )

◆ setObject()

void anatomist::MiniPaletteGraphics::setObject ( AObject * obj,
int dims = 1 )

set or change the observed object

◆ setRange()

void anatomist::MiniPaletteGraphics::setRange ( double min,
double max,
int dim )

References max(), and min().

◆ top()

float anatomist::MiniPaletteGraphics::top ( ) const

Referenced by MiniPaletteGraphics().

◆ update()

void anatomist::MiniPaletteGraphics::update ( const Observable * observable,
void * arg )
virtual

This method is called whenever the observed object is changed.

The programmer calls an observable object's notifyObservers method to have all the object's observers notified of the change.

Parameters
observablethe observable object

Implements anatomist::Observer.

References anatomist::Observer::Observable.

◆ updateDisplay()

void anatomist::MiniPaletteGraphics::updateDisplay ( )

◆ width()

float anatomist::MiniPaletteGraphics::width ( ) const

Referenced by MiniPaletteGraphics().


The documentation for this class was generated from the following file: