26#ifndef _SO_QT_MATERIAL_EDITOR_
27#define _SO_QT_MATERIAL_EDITOR_
121 const char *name = NULL,
151 void *userData = NULL);
157 void *userData = NULL);
168 {
return updateFreq; }
209 virtual SbString getDefaultWidgetName()
const;
210 virtual SbString getDefaultTitle()
const;
211 virtual SbString getDefaultIconTitle()
const;
213 virtual bool eventFilter(QObject *
object,QEvent *event);
216 unsigned long nCurrEditId ;
229 QPointer<QRadioButton> diamondButtons[4], radioButtons[4];
230 QPointer<SoQtButton> acceptButton;
234 QPointer<QWidget> mgrWidget;
239 SoQtMaterialList *materialList;
258 void updateLocalComponents();
261 void updateColorEditor(
SbBool updateTitle =
FALSE);
268 void updateMaterialColor(
273 void updateMaterialColor(
282 void copyMaterial(
SoNode *mat1,
int index1,
283 const SoNode *mat2,
int index2);
287 void undoIgnoresIfChanged();
293 static void materialListCB(
void *,
const SoMaterial *);
294 static void colorEditorCB(
void *,
const SbColor *);
295 static void ambientSliderCB(
void *,
float);
296 static void diffuseSliderCB(
void *,
float);
297 static void specularSliderCB(
void *,
float);
298 static void emissiveSliderCB(
void *,
float);
299 static void shininessSliderCB(
void *,
float);
300 static void transparencySliderCB(
void *,
float);
302 static void colorEditorCloseCB(
void* userData,
SoQtComponent*);
306 void menuPick(
int id);
308 void radioButtonPick(QWidget*,
int,
XtPointer);
309 void diamondButtonPick(QWidget*,
int,
XtPointer);
312 static void sensorCB(
void *,
SoSensor *);
315 QWidget* buildWidget(QWidget* parent);
316 QMenuBar* buildPulldownMenu(QWidget* parent);
317 QWidget* buildControls(QWidget* parent);
318 QWidget* buildSlidersForm(QWidget* parent);
324 void constructorCommon(
SbBool buildNow);
326 QPointer<QMenu> edit;
327 QAction* acCon, *acMan;
331 void visibilityChangeCB(
SbBool visible);
334 void slot_continuous();
337 void slot_radioButton0();
338 void slot_radioButton1();
339 void slot_radioButton2();
340 void slot_radioButton3();
342 void slot_diamondButton0();
343 void slot_diamondButton1();
344 void slot_diamondButton2();
345 void slot_diamondButton3();
347 void acceptButtonCB();
#define TRUE
Possible value of SbBool.
#define FALSE
Possible value of SbBool.
SoQtColorSlider(QWidget *parent=NULL, const char *name=NULL, SbBool buildInsideParent=TRUE, Type type=INTENSITY_SLIDER)
void SoQtMaterialEditorCB(void *userData, const SoMaterial *mtl)
Class for smart character strings.
Node that defines an object's base color.
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.
Node representing a directional light source.
Multiple-value field containing any number of RGB colors stored as three floats.
Surface material definition node.
Abstract base class for all database nodes.
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...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Abstract base cl...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Component which ...
const SoMaterial & getMaterial() const
Gets the current material value.
void removeMaterialChangedCallback(SoQtMaterialEditorCB *f, void *userData=NULL)
Removes the material changed callback.
void setUpdateFrequency(SoQtMaterialEditor::UpdateFrequency freq)
Sets the update frequency.
SoQtMaterialEditor(QWidget *parent=qApp->activeWindow(), const char *name=NULL, SbBool buildInsideParent=TRUE)
Constructor.
void attach(SoMaterial *material, int index=0)
Attaches the editor to a material node and edits the material of the given index.
virtual void hide()
This hides the component.
virtual void show()
This shows the component.
SoQtMaterialPalette * m_pMaterialPalette
Pointer to a material palette editor.
void detach()
Detaches the editor from the material node.
SbBool alwaysOnTop
Boolean indicating if the editor should be always on top of the other windows.
void setMaterial(const SoMaterial &mtl)
Sets a new material value.
~SoQtMaterialEditor()
Destructor.
SoQtMaterialEditor::UpdateFrequency getUpdateFrequency()
Gets the update frequency.
UpdateFrequency
Update frequency.
@ CONTINUOUS
Send updates with every mouse motion.
@ AFTER_ACCEPT
Only send updates after user hits accept button.
SbBool isAttached()
Returns TRUE if the editor is attached.
void addMaterialChangedCallback(SoQtMaterialEditorCB *f, void *userData=NULL)
Additional way of using the material editor, by registering a callback which will be called whenever ...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Component for re...
Field containing an RGB color.
Manages a list of selected objects.
Abstract base class for Open Inventor sensors.
Group node that saves and restores traversal state.
void SoCallbackListCB(void *userData, void *callbackData)