00001 #ifndef IG3DMATERIAL_EDITOR_IG_MAT_ED_MAIN_WIDGET_H 00002 # define IG3DMATERIAL_EDITOR_IG_MAT_ED_MAIN_WIDGET_H 00003 00004 //<<<<<< INCLUDES >>>>>> 00005 00006 # include "Iguana/Controls/interface/config.h" 00007 # include "Iguana/Controls/interface/IgSoMaterialMap.h" 00008 # include <qwidget.h> 00009 00010 //<<<<<< PUBLIC DEFINES >>>>>> 00011 //<<<<<< PUBLIC CONSTANTS >>>>>> 00012 //<<<<<< PUBLIC TYPES >>>>>> 00013 00014 class QHBox; 00015 class QVBox; 00016 class QListView; 00017 class QListViewItem; 00018 class QVBoxLayout; 00019 class QComboBox; 00020 class QPushButton; 00021 class SoSeparator; 00022 class SoMaterial; 00023 class IgG4ToSoMaterialMap; 00024 class IgMatEdSlider; 00025 class IgMatEdColorBox; 00026 class IgMatEdMainMenu; 00027 class IgMatEdViewer; 00028 00029 //<<<<<< PUBLIC VARIABLES >>>>>> 00030 //<<<<<< PUBLIC FUNCTIONS >>>>>> 00031 //<<<<<< CLASS DECLARATIONS >>>>>> 00032 00033 class IG3DMATERIAL_EDITOR_API IgMatEdMainWidget : public QWidget 00034 { 00035 private: 00036 Q_OBJECT 00037 QWidget *m_parent; 00038 public: 00039 IgMatEdMainWidget (QWidget *parent, IgMatEdMainMenu *menu); 00040 ~IgMatEdMainWidget (void); 00041 00042 void saveSoMaterials (void); 00043 void saveMaterialMap (void); 00044 00045 // implicit copy constructor 00046 // implicit assignment operator 00047 // implicit destructor 00048 IgSoMaterialMap *m_soMaterialMap; 00049 QComboBox *m_comboBox; 00050 QListView *m_g4ListView; 00051 public slots: 00052 void setCurrentG4Material (const QString &name); 00053 void newMaterial (const QString &text); 00054 void newG4Material (QListViewItem *item); 00055 void fileMenuActivated (int item); 00056 void createSoMaterial (void); 00057 private: 00058 IgMatEdMainMenu *m_menu; 00059 QVBoxLayout *m_layout; 00060 QHBox *m_mainHBox; 00061 IgMatEdViewer *m_viewer; 00062 SoSeparator *m_rootNode; 00063 QVBox *m_sliderBox; 00064 QHBox *m_colorBox; 00065 QHBox *m_soMaterialBox; 00066 QPushButton *m_createMaterialButton; 00067 IgG4ToSoMaterialMap *m_g4ToSoMap; 00068 IgMatEdSlider *m_shininessSlider; 00069 IgMatEdSlider *m_transparencySlider; 00070 00071 IgMatEdColorBox *m_diffuseColorBox; 00072 IgMatEdColorBox *m_ambientColorBox; 00073 IgMatEdColorBox *m_specularColorBox; 00074 IgMatEdColorBox *m_emissiveColorBox; 00075 }; 00076 00077 //<<<<<< INLINE PUBLIC FUNCTIONS >>>>>> 00078 //<<<<<< INLINE MEMBER FUNCTIONS >>>>>> 00079 00080 #endif // IG3DMATERIAL_EDITOR_IG_MAT_ED_MAIN_WIDGET_H