#include <ModelAPI_Session.h>
#include <ModelAPI_Document.h>
+#define SKETCH_WIDTH "4"
+/// face of the square-face displayed for selection of general plane
+#define PLANE_SIZE "200"
+
// the only created instance of this plugin
static ConstructionPlugin_Plugin* MY_CONSTRUCTION_INSTANCE = new ConstructionPlugin_Plugin();
aFactory->registerValidator("ConstructionPlugin_ValidatorAxisTwoNotParallelPlanes",
new ConstructionPlugin_ValidatorAxisTwoNotParallelPlanes());
+ Config_PropManager::registerProp(SKETCH_TAB_NAME, "planes_size", "Size", Config_Prop::Double,
+ PLANE_SIZE);
+ Config_PropManager::registerProp(SKETCH_TAB_NAME, "planes_thickness", "Thickness",
+ Config_Prop::Integer, SKETCH_WIDTH);
+ Config_PropManager::registerProp(SKETCH_TAB_NAME, "rotate_to_plane",
+ "Rotate to plane when selected", Config_Prop::Boolean, "false");
+
// register this plugin
ModelAPI_Session::get()->registerPlugin(this);
aFactory->registerValidator("PartSet_ProjectionSelection", new PartSet_ProjectionSelection);
}
-void PartSet_Module::registerProperties()
-{
- Config_PropManager::registerProp(SKETCH_TAB_NAME, "planes_size", "Size", Config_Prop::Double,
- PLANE_SIZE);
- Config_PropManager::registerProp(SKETCH_TAB_NAME, "planes_thickness", "Thickness",
- Config_Prop::Integer, SKETCH_WIDTH);
- Config_PropManager::registerProp(SKETCH_TAB_NAME, "rotate_to_plane",
- "Rotate to plane when selected", Config_Prop::Boolean, "false");
-}
-
void PartSet_Module::connectToPropertyPanel(ModuleBase_ModelWidget* theWidget,
const bool isToConnect)
{
/// Register validators for this module
virtual void registerValidators();
- /// Register properties of this module
- virtual void registerProperties();
-
/// Connects or disconnects to the value changed signal of the property panel widgets
/// \param theWidget a property contol widget
/// \param isToConnect a boolean value whether connect or disconnect
class ModuleBase_IWorkshop;
-/// the plane edge width
-#define SKETCH_WIDTH "4"
-/// face of the square-face displayed for selection of general plane
-#define PLANE_SIZE "200"
-
/**
* \class PartSet_PreviewPlanes
* \ingroup Modules