1
#ifndef COIN_SOQTMATERIALEDITOR_H
2
#define COIN_SOQTMATERIALEDITOR_H
4
/**************************************************************************\
6
* This file is part of the Coin 3D visualization library.
7
* Copyright (C) 1998-2005 by Systems in Motion. All rights reserved.
9
* This library is free software; you can redistribute it and/or
10
* modify it under the terms of the GNU General Public License
11
* ("GPL") version 2 as published by the Free Software Foundation.
12
* See the file LICENSE.GPL at the root directory of this source
13
* distribution for additional information about the GNU GPL.
15
* For using Coin with software that can not be combined with the GNU
16
* GPL, and for taking advantage of the additional benefits of our
17
* support services, please contact Systems in Motion about acquiring
18
* a Coin Professional Edition License.
20
* See <URL:http://www.coin3d.org/> for more information.
22
* Systems in Motion, Postboks 1283, Pirsenteret, 7462 Trondheim, NORWAY.
23
* <URL:http://www.sim.no/>.
25
\**************************************************************************/
27
#include <Inventor/Qt/nodes/SoGuiMaterialEditor.h>
28
#include <Inventor/Qt/SoQtRenderArea.h>
33
// *************************************************************************
35
typedef void SoQtMaterialEditorCB(void * userdata, const SoMaterial * material);
37
class SOQT_DLL_API SoQtMaterialEditor : public SoQtRenderArea {
38
SOQT_OBJECT_HEADER(SoQtMaterialEditor, SoQtRenderArea);
41
SoQtMaterialEditor(QWidget * parent = NULL, const char * name = NULL, SbBool embed = TRUE);
42
~SoQtMaterialEditor(void);
44
enum UpdateFrequency {
45
CONTINUOUS = SoGuiMaterialEditor::CONTINUOUS,
46
AFTER_ACCEPT = SoGuiMaterialEditor::AFTER_ACCEPT
49
void attach(SoMaterial * material, int index = 0);
50
void attach(SoVRMLMaterial * material);
52
SbBool isAttached(void);
54
void addMaterialChangedCallback(
55
SoQtMaterialEditorCB * callback, void * closure = NULL);
56
void removeMaterialChangedCallback(
57
SoQtMaterialEditorCB * callback, void * closure = NULL);
59
void setUpdateFrequency(SoQtMaterialEditor::UpdateFrequency frequency);
60
SoQtMaterialEditor::UpdateFrequency getUpdateFrequency(void) const;
62
void setMaterial(const SoMaterial & material);
63
void setMaterial(const SoVRMLMaterial & material);
64
const SoMaterial & getMaterial(void) const;
65
SbBool isAttachedVRML(void);
67
SoGuiMaterialEditor * getEditor(void) const;
70
SoQtMaterialEditor(QWidget * parent, const char * const name, SbBool embed, SbBool build);
72
virtual const char * getDefaultWidgetName(void) const;
73
virtual const char * getDefaultTitle(void) const;
74
virtual const char * getDefaultIconTitle(void) const;
79
}; // class SoQtMaterialEditor
81
// *************************************************************************
83
#endif // !COIN_SOQTMATERIALEDITOR_H