~ubuntu-branches/ubuntu/oneiric/soqt/oneiric

« back to all changes in this revision

Viewing changes to build/msvc7/src/Inventor/Qt/editors/SoQtMaterialEditor.h

  • Committer: Bazaar Package Importer
  • Author(s): Steve M. Robbins
  • Date: 2009-03-01 11:41:00 UTC
  • mfrom: (1.1.4 upstream) (5.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20090301114100-f4zz3n1oasa52fgk
Tags: 1.4.2~svn20090224-2
* Upload upstream SVN head version containing fixes to build with Coin 3
  (Closes: #515729, #515736, #515742).  Upstream indicated to me that
  SVN is stable enough to release.

* control: Update Standards-Version to 3.8.0; no changes required.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef COIN_SOQTMATERIALEDITOR_H
2
 
#define COIN_SOQTMATERIALEDITOR_H
3
 
 
4
 
/**************************************************************************\
5
 
 *
6
 
 *  This file is part of the Coin 3D visualization library.
7
 
 *  Copyright (C) 1998-2005 by Systems in Motion.  All rights reserved.
8
 
 *
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.
14
 
 *
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.
19
 
 *
20
 
 *  See <URL:http://www.coin3d.org/> for more information.
21
 
 *
22
 
 *  Systems in Motion, Postboks 1283, Pirsenteret, 7462 Trondheim, NORWAY.
23
 
 *  <URL:http://www.sim.no/>.
24
 
 *
25
 
\**************************************************************************/
26
 
 
27
 
#include <Inventor/Qt/nodes/SoGuiMaterialEditor.h>
28
 
#include <Inventor/Qt/SoQtRenderArea.h>
29
 
 
30
 
class SoMaterial;
31
 
class SoVRMLMaterial;
32
 
 
33
 
// *************************************************************************
34
 
 
35
 
typedef void SoQtMaterialEditorCB(void * userdata, const SoMaterial * material);
36
 
 
37
 
class SOQT_DLL_API SoQtMaterialEditor : public SoQtRenderArea {
38
 
  SOQT_OBJECT_HEADER(SoQtMaterialEditor, SoQtRenderArea);
39
 
 
40
 
public:
41
 
  SoQtMaterialEditor(QWidget * parent = NULL, const char * name = NULL, SbBool embed = TRUE);
42
 
  ~SoQtMaterialEditor(void);
43
 
 
44
 
  enum UpdateFrequency {
45
 
    CONTINUOUS = SoGuiMaterialEditor::CONTINUOUS,
46
 
    AFTER_ACCEPT = SoGuiMaterialEditor::AFTER_ACCEPT
47
 
  };
48
 
 
49
 
  void attach(SoMaterial * material, int index = 0);
50
 
  void attach(SoVRMLMaterial * material);
51
 
  void detach(void);
52
 
  SbBool isAttached(void);
53
 
 
54
 
  void addMaterialChangedCallback(
55
 
    SoQtMaterialEditorCB * callback, void * closure = NULL);
56
 
  void removeMaterialChangedCallback(
57
 
    SoQtMaterialEditorCB * callback, void * closure = NULL);
58
 
 
59
 
  void setUpdateFrequency(SoQtMaterialEditor::UpdateFrequency frequency);
60
 
  SoQtMaterialEditor::UpdateFrequency getUpdateFrequency(void) const;
61
 
 
62
 
  void setMaterial(const SoMaterial & material);
63
 
  void setMaterial(const SoVRMLMaterial & material);
64
 
  const SoMaterial & getMaterial(void) const;
65
 
  SbBool isAttachedVRML(void);
66
 
 
67
 
  SoGuiMaterialEditor * getEditor(void) const;
68
 
 
69
 
protected:
70
 
  SoQtMaterialEditor(QWidget * parent, const char * const name, SbBool embed, SbBool build);
71
 
 
72
 
  virtual const char * getDefaultWidgetName(void) const;
73
 
  virtual const char * getDefaultTitle(void) const;
74
 
  virtual const char * getDefaultIconTitle(void) const;
75
 
 
76
 
private:
77
 
  void * internals;
78
 
 
79
 
}; // class SoQtMaterialEditor
80
 
 
81
 
// *************************************************************************
82
 
 
83
 
#endif // !COIN_SOQTMATERIALEDITOR_H