24#ifndef _SO_QT_COLOR_EDITOR_
25#define _SO_QT_COLOR_EDITOR_
50struct ColorEditorCBData;
145 const char *name = NULL,
196 void *userData = NULL );
201 void *userData = NULL );
250 {
return updateFreq; }
280 virtual SbString getDefaultWidgetName()
const;
281 virtual SbString getDefaultTitle()
const;
282 virtual SbString getDefaultIconTitle()
const;
289 QPointer<QMenu> menu_sliders, edit;
290 QPointer<SoQtButton> lpleftButton ;
291 QPointer<SoQtButton> lprightButton ;
292 QPointer<SoQtButton> lpswitchButton ;
294 QAction* edAcCon, *edAcMan, *edAcWy;
295 QAction* msAcNone, *msAcInt, *msAcRGB, *msAcHSV, *msAcRGB_V, *msAcRGB_HSV;
298 QWidget* buildWidget(QWidget *parent);
301 QPointer<QWidget> mgrWidget;
308 SoQtColorWheel *wheel;
309 SoQtColorPatch *current, *previous;
310 ColorEditorCBData *dataId;
328 QPointer<SoQtButton> acceptButton;
332 QMenuBar* buildPulldownMenu(QWidget *parent);
333 void buildControls(QWidget *parent);
334 void buildSlidersForm(QWidget *parent);
336 void doSliderLayout();
337 void doDynamicTopLevelLayout();
346 static void fieldChangedCB(
void *,
SoSensor *);
350 static void wheelCallback(
void *,
const float hsv[3]);
353 void wheelChanged(
const float hsv[3]);
355 static void sliderCallback(
void *,
float);
356 void sliderChanged(
short id,
float value);
358 void buttonPressed(
short id);
360 void sliderMenuCallback(
int id);
361 void editMenuCallback(
int id);
364 void constructorCommon(
SbBool buildNow);
369 void slot_intensity();
375 void slot_continuous();
379 void slot_leftButton();
380 void slot_rightButton();
381 void slot_switchButton();
382 void slot_acceptButton();
385 void visibilityChangeCB(
SbBool visible);
#define TRUE
Possible value of SbBool.
void SoQtColorEditorCB(void *userData, const SbColor *color)
External change callback functions registered with the color editor should be of this type.
SoQtColorSlider(QWidget *parent=NULL, const char *name=NULL, SbBool buildInsideParent=TRUE, Type type=INTENSITY_SLIDER)
List of generic (void *) pointers.
Class for smart character strings.
Base class for all nodes, paths, and engines.
Manages a list of callbacks and associated data.
void addCallback(SoCallbackListCB *f, void *userData=NULL)
Adds a function to the list of callback functions.
void removeCallback(SoCallbackListCB *f, void *userData=NULL)
Removes a function from the list of callback functions.
Multiple-value field containing any number of RGB colors stored as three floats.
Multiple-value field containing any number of uint32_t integers.
Sensor class that can be attached to Open Inventor nodes.
Maintains a list of pointers to paths.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Component that l...
UpdateFrequency
Update frequency.
@ CONTINUOUS
Send updates with every mouse motion.
@ AFTER_ACCEPT
Only send updates after user hits accept button.
void setUpdateFrequency(SoQtColorEditor::UpdateFrequency freq)
Sets the update frequency.
void addColorChangedCallback(SoQtColorEditorCB *f, void *userData=NULL)
Additional way of using the color editor, by registering a callback which will be called whenever the...
virtual void hide()
Hide the color editor.
void attach(SoMFUInt32 *color, int index, SoBase *node)
Attaches the editor to a color node and edits the color of the given index.
void attach(SoSFColor *color, SoBase *node)
Attaches the editor to a color node and edits the specified color.
void setColor(const SbColor &color)
Sets a new color value.
const SbColor & getColor()
Gets the current color value.
SbBool isAttached()
Returns TRUE if the editor is attached.
SoQtColorEditor::Sliders getCurrentSliders()
Gets which slider(s) should be displayed.
SoQtColorEditor(QWidget *parent=qApp->activeWindow(), const char *name=NULL, SbBool buildInsideParent=TRUE)
Constructor.
SbBool isWYSIWYG()
Gets the WYSIWYG mode.
void attach(SoMFColor *color, int index, SoBase *node)
Attaches the editor to a color node and edits the specified color.
SbBool alwaysOnTop
Boolean indicating if the editor should be always on top of the other windows.
@ NONE
Display no sliders.
@ RGB
Display RGB sliders.
@ HSV
Display HSV sliders.
@ RGB_HSV
Display RGB and HSV sliders.
@ INTENSITY
Display intensity slider (default)
@ RGB_V
Display RGB and value sliders.
void setCurrentSliders(SoQtColorEditor::Sliders whichSliders)
Sets which slider(s) should be displayed.
~SoQtColorEditor()
Destructor.
SoQtColorEditor::UpdateFrequency getUpdateFrequency()
Gets the update frequency.
virtual void show()
Make the color editor visible.
void detach()
Detaches the editor from a color node.
void setWYSIWYG(SbBool trueOrFalse)
Sets the WYSIWYG (what-you-see-is-what-you-get) mode on/off for the colored backgrounds of the slider...
void removeColorChangedCallback(SoQtColorEditorCB *f, void *userData=NULL)
Removes colorChanged callback.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Abstract base cl...
Field containing an RGB color.
Abstract base class for Open Inventor sensors.
void SoCallbackListCB(void *userData, void *callbackData)