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