Code Search for Developers
 
 
  

IEditorPluginWidgetABC.h from osgDesigner at Krugle


Show IEditorPluginWidgetABC.h syntax highlighted

#ifndef __IEDITORPLUGINWIDGETABC_H__
#define __IEDITORPLUGINWIDGETABC_H__ 1

#include <osgIntrospectionToolKit/signalslib.hpp>
#include <QtGui/QWidget>

#include <osgDesigner/core/Export.h>
#include <osgDesigner/core/IEditorWidgetABC.h>
#include <osgIntrospection/Value>
#include <boost/bind.hpp>

namespace osgDesigner
{

    class OSGDESIGNER_EXPORT IEditorPluginWidgetABC: public IEditorWidgetABC
    {
        public:
        	IEditorPluginWidgetABC()
            : IEditorWidgetABC()
            {}
        	virtual ~IEditorPluginWidgetABC() {}
            
            bool setEditedValue(osgIntrospectionToolKit::CReflectedRefPointer* rrp);            
            void updateEditor();
            
        protected:
        
            /** set the value to edit
             *  \@return true if the value is editable, false otherwise 
             *  must be reimplemented in derived class
             **/
            virtual bool _setEditedValue(osgIntrospection::Value& value) = 0;
        
            /** update the widget with the rrp
             *  must be reimplemented in derived class
             **/
            virtual void _update() = 0;
            
            
            void _connect();
            void _disconnect();
        private:
        
            osg::ref_ptr<osgIntrospectionToolKit::CReflectedRefPointer>     _rrp;
    };
    
    inline void IEditorPluginWidgetABC::_connect()
    { _rrp->updateSignal().connect(boost::bind(&IEditorPluginWidgetABC::updateEditor, this)); }
    inline void IEditorPluginWidgetABC::_disconnect()
    { _rrp->updateSignal().disconnect(boost::bind(&IEditorPluginWidgetABC::updateEditor, this)); }

}

#endif // ** __IEDITORPLUGINWIDGETABC_H__ ** //




See more files for this project here

osgDesigner

osgDesigner is a graphical tool used to modify an OpenSceneGraph (OSG) scene using the osgIntrospection framework. OpenSceneGraph developpers will be able to extend osgDesigner at need using (editor | render | osgIntrospection wrapper) plugin system.

Project homepage: http://sourceforge.net/projects/osgdesigner
Programming language(s): C++,Shell Script
License: other

  CModulePrefixSuffix.h
  DynamicLibrary.h
  IEditorPluginABC.h
  IEditorPluginDescABC.h
  IEditorPluginWidgetABC.h
  IPluginDescABC.h
  IRenderPluginABC.h
  IRenderPluginDescABC.h
  SEditorPluginManager.h
  SEditorPluginRegistry.h
  SRenderPluginManager.h
  SRenderPluginRegistry.h
  TPluginManagerProxy.h