{
registerValidators();
registerFilters();
+ registerProperties();
Config_ModuleReader aXMLReader = Config_ModuleReader();
aXMLReader.readAll();
\r
/// Register selection filters for this module\r
virtual void registerFilters() {}\r
+
+ /// Register properties of this module
+ virtual void registerProperties() {}
\r
/// Returns new instance of operation object (used in createOperation for customization)\r
virtual ModuleBase_Operation* getNewOperation(const std::string& theFeatureId);\r
//#include <SketchPlugin_ConstraintRigid.h>
#include <Events_Loop.h>
+#include <Config_PropManager.h>
#include <StdSelect_TypeOfFace.hxx>
#include <TopoDS_Vertex.hxx>
new ModuleBase_FilterCustom(aSelectFilter));
}
+void PartSet_Module::registerProperties()
+{
+ Config_PropManager::registerProp("Sketch planes", "planes_size", "Size", Config_Prop::Double,
+ PLANE_SIZE);
+ Config_PropManager::registerProp("Sketch planes", "planes_thickness", "Thickness",
+ Config_Prop::Integer, SKETCH_WIDTH);
+}
+
void PartSet_Module::operationCommitted(ModuleBase_Operation* theOperation)
{
if (theOperation->isEditOperation())
/// Register selection filters for this module
virtual void registerFilters();
+ /// Register properties of this module
+ virtual void registerProperties();
+
private slots:
/// Processing of vertex selected
void onVertexSelected();
#include <QTimer>
#include <QApplication>
-#define PLANE_SIZE "200"
-#define SKETCH_WIDTH "4"
-
PartSet_WidgetSketchLabel::PartSet_WidgetSketchLabel(QWidget* theParent,
const Config_WidgetAPI* theData,
std::shared_ptr<GeomAPI_Dir> theNorm,
const int theRGB[3])
{
- double aSize = Config_PropManager::integer("Sketch planes", "Size of planes", PLANE_SIZE);
+ double aSize = Config_PropManager::integer("Sketch planes", "planes_size", PLANE_SIZE);
std::shared_ptr<GeomAPI_Shape> aFace = GeomAlgoAPI_FaceBuilder::square(theOrigin, theNorm, aSize);
AISObjectPtr aAIS = AISObjectPtr(new GeomAPI_AISObject());
aAIS->createShape(aFace);
class XGUI_OperationMgr;
class XGUI_Workshop;
+/// the plane edge width
+#define SKETCH_WIDTH "4"
+
+/// face of the square-face displayed for selection of general plane
+#define PLANE_SIZE "200"
+
/**
* \ingroup Modules
* A model widget implementation for a label which provides specific behaviour
ModelAPI_Session::get()->registerPlugin(this);
// register sketcher properties
- Config_PropManager::registerProp("Sketch planes", "planes_color", "Color", Config_Prop::Color,
- SKETCH_PLANE_COLOR);
- Config_PropManager::registerProp("Sketch planes", "planes_size", "Size", Config_Prop::Double,
- PLANE_SIZE);
- Config_PropManager::registerProp("Sketch planes", "planes_thickness", "Thickness",
- Config_Prop::Integer, SKETCH_WIDTH);
Config_PropManager::registerProp("Visualization", "parallel_color", "Parallel constraint color",
Config_Prop::Color, PARALLEL_COLOR);
#include <GeomAPI_IPresentable.h>
#include <list>
-/// the plane edge color
-#define SKETCH_PLANE_COLOR "#700000"
-
-/// the plane edge width
-#define SKETCH_WIDTH "4"
-
-/// face of the square-face displayed for selection of general plane
-#define PLANE_SIZE "200"
-
/**\class SketchPlugin_Sketch
* \ingroup Plugins
* \brief Feature for creation of the new part in PartSet.