|
| | MiniPaletteWidget (AObject *object=0, int dim=0, bool allow_edit=true, bool self_parent=true, QWidget *edit_parent=0, bool click_to_edit=true, bool auto_range=false, bool with_view=true) |
| | Parameters:
|
| |
| virtual | ~MiniPaletteWidget () |
| |
| AObject * | getObject () |
| |
| void | setObject (AObject *obj, int dim=0) |
| | set or change the observed object, dim is the texture dimension observed
|
| |
| void | allowEdit (bool allow, bool self_parent=true, QWidget *edit_parent=0) |
| | Enalbes or disable the edition capabilities.
|
| |
| void | setRange (double min1, double max1) |
| | set the view range in object values
|
| |
| void | updateDisplay () |
| | redraws the palette view
|
| |
| void | clear () |
| |
| void | showEditor () |
| | pops up the editor, if the edition is allowed
|
| |
| void | hideEditor () |
| |
| MiniPaletteGraphics * | miniPaletteGraphics () |
| |
| QGraphicsView * | graphicsView () |
| |
| int | observedDimension () const |
| |
| std::pair< double, double > | range () const |
| |
MiniPaletteWidget.
It provides a small sized palette widget which can be used both to display the palette in a GUI, and to edit the palette range (optionally).
The palette view displayes the palette assigned to an object, and the view may be zoomed to a given values range.
The palatte may be zoomed in/out using the mouse wheel. This action will not change the palette settings, but only the view displayed.
Edition is possible if enabled, either using the allow_edit constructor parameter, or using the method :meth:allow_edit.
Edition is triggered in 2 modes:
- if
click_to_edit is True (the default), a click on the palette will open the editor mode.
- otherwise a mouse hover will open it, and it will be closed when the mouse leaves the editor, without the need for a user click.
The edition mode opens a popup frameless widget, with sliders.
- See also
- MiniPaletteWidgetTranscient.
Definition at line 110 of file minipalette.h.
| anatomist::MiniPaletteWidget::MiniPaletteWidget |
( |
AObject * | object = 0, |
|
|
int | dim = 0, |
|
|
bool | allow_edit = true, |
|
|
bool | self_parent = true, |
|
|
QWidget * | edit_parent = 0, |
|
|
bool | click_to_edit = true, |
|
|
bool | auto_range = false, |
|
|
bool | with_view = true ) |
Parameters:
object: AObject or null object to display or edit the palette for dim: int texture dimension of the object allow_edit: bool if True, an editor will popup, either by clicking on the widget, or by "hovering" it if click_to_edit is False. self_parent: bool if true, the edit parent (see edit_parent) will be the MiniPaletteWidget, this. edit_parent: QWidget or 0 the parent widget passed to the editor widget, if edition is allowed. If in self_parent mode, this valus is not used. click_to_edit: bool if False, the edition widget will popup as soon as the mouse cursor passes over the palette widget, without clicking. If True, only a user click will open the editor window. auto_range: bool For edition mode, allow the auto-zoom mode when palette range is modified. with_view: bool if false, the palette view will not be displayed.
| void anatomist::MiniPaletteWidget::allowEdit |
( |
bool | allow, |
|
|
bool | self_parent = true, |
|
|
QWidget * | edit_parent = 0 ) |
Enalbes or disable the edition capabilities.
Parameters
allow: bool if True, an editor will popup, either by clicking on the widget, or by "hovering" it if click_to_edit is False. self_parent: bool if true, the edit parent (see edit_parent) will be the MiniPaletteWidget, this. edit_parent: QWidget or 0 the parent widget passed to the editor widget, if edition is allowed. If in self_parent mode, this valus is not used.