1#ifndef ANA_COLOR_MINIPALETTE_H
2#define ANA_COLOR_MINIPALETTE_H
52 float left = -10000,
float top = -10000,
53 bool with_view =
true );
61 void resize(
float x,
float y,
float w,
float h );
68 double min(
int dim )
const;
69 double max(
int dim )
const;
71 std::pair<double, double>
range(
int dim )
const;
76 void _drawPaletteInGraphicsView();
77 std::string _format(
double num )
const;
78 QGraphicsSimpleTextItem* _textGraphicsItem(
79 const std::string & text,
float xpos,
float ypos,
float xmax,
80 float hardmax=-1, QGraphicsItem *parentitem=0 )
const;
142 bool allow_edit =
true,
143 bool self_parent =
true, QWidget *edit_parent = 0,
144 bool click_to_edit =
true,
bool auto_range =
false,
145 bool with_view =
true );
166 QWidget *edit_parent = 0 );
178 std::pair<double, double>
range()
const;
194#if QT_VERSION >= 0x060000
239 bool auto_range =
false,
bool with_view =
true,
240 bool allow_no_palette =
false );
253 std::pair<double, double>
range()
const;
301 bool opened_by_click =
false,
302 bool auto_range =
false );
322#if QT_VERSION >= 0x060000
Base Anatomist object (abstract)
MiniPaletteGraphics is an element which draws a palette in a GraphicsView scene.
std::pair< double, double > range(int dim) const
virtual ~MiniPaletteGraphics()
double max(int dim) const
int observedDimensions() const
void resize(float x, float y, float w, float h)
void setObject(AObject *obj, int dims=1)
set or change the observed object
void update(const Observable *observable, void *arg)
This method is called whenever the observed object is changed.
double min(int dim) const
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 ...
void setRange(double min, double max, int dim)
A class can implement the Observer interface when it wants to be informed of changes in observable ob...