+/*!
+ \class UserDefinedContent
+ \brief The class represents base class for user defined widget that
+ can be inserted to the Preferences dialog.
+*/
+
+/*!
+ \brief Constructor
+*/
+UserDefinedContent::UserDefinedContent()
+ : QWidget()
+{
+}
+
+/*!
+ \brief Called from Preferences dialog to store settings to the resource file.
+*/
+void UserDefinedContent::store()
+{
+}
+
+/*!
+ \brief Called from Preferences dialog to restore settings from the resource file.
+*/
+void UserDefinedContent::retrieve()
+{
+}
+
+/*!
+ \class SgPyQtUserDefinedContent
+ \brief A Wrapper for UserDefinedContent class.
+ \internal
+*/
+class SgPyQtUserDefinedContent: public QtxUserDefinedContent
+{
+public:
+ SgPyQtUserDefinedContent(UserDefinedContent*);
+ virtual ~SgPyQtUserDefinedContent();
+
+ void store( QtxResourceMgr*, QtxPreferenceMgr* );
+ void retrieve( QtxResourceMgr*, QtxPreferenceMgr* );
+
+private:
+ UserDefinedContent* myContent;
+};
+
+/*!
+ \brief Create custom item for Preferences dialog wrapping widget passed from Python.
+ \internal
+*/
+SgPyQtUserDefinedContent::SgPyQtUserDefinedContent(UserDefinedContent* content)
+ : QtxUserDefinedContent( 0 ), myContent( content )
+{
+ QVBoxLayout* l = new QVBoxLayout( this );
+ l->setContentsMargins( 0, 0, 0, 0 );
+ l->addWidget( myContent );
+}
+
+/*!
+ \brief Destructor.
+ \internal
+*/
+SgPyQtUserDefinedContent::~SgPyQtUserDefinedContent()
+{
+}
+
+/*!
+ \brief Called from Preferences dialog to store settings to the resource file.
+ \internal
+*/
+void SgPyQtUserDefinedContent::store( QtxResourceMgr*, QtxPreferenceMgr* )
+{
+ myContent->store();
+}
+
+/*!
+ \brief Called from Preferences dialog to restore settings from the resource file.
+ \internal
+*/
+void SgPyQtUserDefinedContent::retrieve( QtxResourceMgr*, QtxPreferenceMgr* )
+{
+ myContent->retrieve();
+}
+