LoadPointLineGeometry::LoadPointLineGeometry() : Module(0, 0)
{
  // Suppress calls of handleNotification on field changes to
  // avoid side effects during initialization phase.
  handleNotificationOff();

  // Add output field
  (_outPositionsListFld         = addBase("outPositionsList"))->setBaseValueAndAddAllowedType(&_outPositionsList);
  (_outConnectionsListFld       = addBase("outConnectionsList"))->setBaseValueAndAddAllowedType(&_outConnectionsList);
  (_outFibersFld                = addBase("outFibers"))->setBaseValueAndAddAllowedType(&_outFiberSetContainer);
  (_outCachedPositionsListFld   = addBase("outCachedPositionsList"))->setBaseValueAndAddAllowedType(&_outCachedPositionsList);
  (_outCachedConnectionsListFld = addBase("outCachedConnectionsList"))->setBaseValueAndAddAllowedType(&_outCachedConnectionsList);

  // Add parameter fields
   _filenameFld = addString("filename","");
   _filterFld   = addString("filter","");

   _numberDelimiterFld      = addString("numberDelimiter",  ";");
   _numberDelimiterSpaceFld = addBool("numberDelimiterSpace",  true);
   _decimalSeparatorFld     = addString("decimalSeparator", ".");

   _loadFld     = addNotify("load");
   _unloadFld   = addNotify("unload");
   _autoLoadFld = addBool("autoLoad", false);

   _positionsLoadedFld   = addBool("positionsLoaded", false);
   _connectionsLoadedFld = addBool("connectionsLoaded", false);

   _addToCacheFld     = addNotify("addToCache");
   _clearCacheFld     = addNotify("clearCache");
   _autoAddToCacheFld = addBool("autoAddToCache", false);

  // Reactivate calls of handleNotification on field changes.
  handleNotificationOn();
}
示例#2
0
void IndexProcessor::process(HTTPRequest& request) {
    Session* s = SessionManager::instance()->getSession(request.getSessionId());

    QString lang = request.getParameter("lang").toString();
    if (!lang.isEmpty()) {
        Translate::instance()->load(lang);
    }

    addNotify(s->getNotification("connection"));
    addNotify(s->getNotification("listing"));
}
ListModifyProperties::ListModifyProperties () : Engine ()
{ 
  ML_TRACE_IN("ListModifyProperties::ListModifyProperties () : Engine (), _needsCompleteRebuild(true)");
    
  handleNotificationOff();

  (_outListFld            = addBase("outList", NULL))->addAllowedType<ListBase>();
  (_inListFld             = addBase("inList", NULL))->addAllowedType<ListBase>();
  _updateFld              = addNotify("update");
  (_autoUpdateModeFld     = addEnum("updateMode", AutoUpdateModeNames, AutoUpdateModeCount))->setEnumValue(AutoUpdateModeAutoUpdate);
  _clearFld               = addNotify("clear");  

  _changeTypeValueFld     = addInt("changeTypeValue", 0);

  handleNotificationOn();
}
DicomSurfaceSegmentationLoad::DicomSurfaceSegmentationLoad(std::string type) : WEMGenerator(type)
{
	//Suppress calls of handleNotification on field changes to
	//avoid side effects during initialization phase.
	handleNotificationOff();

	// Init globals
	_datasetPointer.reset();

	// Output fields 
	(_outPointSetPositionsFld  = addBase("outPointSetPositions"))  ->setBaseValueAndAddAllowedType(&_outPointSetPositions);
	(_outLineSetPositionsFld   = addBase("outLineSetPositions"))   ->setBaseValueAndAddAllowedType(&_outLineSetPositions);
	//(_outLineSetConnectionsFld = addBase("outLineSetConnections")) ->setBaseValueAndAddAllowedType(&_outLineSetConnections);

  // UI fields
	_filenameFld    = addString("filename", "");
	_unloadFld      = addNotify("unload");
  _outputValidFld = addBool("outputValid", false);

	_numPointSetsFld      = addInt("numPointSets", 0);
	_numLineSetsFld       = addInt("numLineSets", 0);
	_numMeshesFld         = addInt("numMeshes", 0);
	_numUnknownObjectsFld = addInt("numUnknownObjects", 0);

	_pointSetsInfoFld      = addString("pointSetsInfo", POINTSETINFOCOLUMNS);
	_lineSetsInfoFld       = addString("lineSetsInfo", LINESETINFOCOLUMNS);
	_meshesInfoFld         = addString("meshesInfo", MESHINFOCOLUMNS);
	_unknownObjectsInfoFld = addString("unknownObjectsInfo", UNKNOWNOBJECTINFOCOLUMNS);

  _pointSetsExportMarkerTypeStartValueFld = addInt("pointSetsExportMarkerTypeStartValue", 1);
  _lineSetsExportMarkerTypeStartValueFld  = addInt("lineSetsExportMarkerTypeStartValue", 1);
  _meshesIDStartValueFld                  = addInt("meshesIDStartValueFld", 1);

  _allDicomTagsFld = addString("allDicomTags", "");

  _tagName0Fld = addString("tagName0", "");
  _tagName1Fld = addString("tagName1", "");
  _tagName2Fld = addString("tagName2", "");
  _tagName3Fld = addString("tagName3", "");
  _tagName4Fld = addString("tagName4", "");
  _tagName5Fld = addString("tagName5", "");
  _tagName6Fld = addString("tagName6", "");
  _tagName7Fld = addString("tagName7", "");
  _tagName8Fld = addString("tagName8", "");
  _tagName9Fld = addString("tagName9", "");

  _tagValue0Fld = addString("tagValue0", "");
  _tagValue1Fld = addString("tagValue1", "");
  _tagValue2Fld = addString("tagValue2", "");
  _tagValue3Fld = addString("tagValue3", "");
  _tagValue4Fld = addString("tagValue4", "");
  _tagValue5Fld = addString("tagValue5", "");
  _tagValue6Fld = addString("tagValue6", "");
  _tagValue7Fld = addString("tagValue7", "");
  _tagValue8Fld = addString("tagValue8", "");
  _tagValue9Fld = addString("tagValue9", "");

	//Reactivate calls of handleNotification on field changes
	handleNotificationOn();
}
void ServerListProcessor::process(HTTPRequest& request) {
    Session*     s = SessionManager::instance()->getSession(request.getSessionId());
    addNotify(s->getNotification("edit"));

    ITable* object = DatabaseManager::instance()->getTable("server");
    if (object == 0) {
        s->setNotification("listing", "Entity 'server' doesn't exists.", UI::Notify::ERROR);
        request.redirect("index");
        return;
    }

    _table = UI::ModelWidgetFactory::instance()->getListWidget("serverConfigurationList");
    if (_table == NULL) {
        s->setNotification("listing", "Model Entity List 'serverConfiguration' doesn't exists.", UI::Notify::ERROR);
        request.redirect("index");
    } else {
        _table->fill(object->getAll());
    }
    delete object;
}
PDFCalcCamera::PDFCalcCamera() : Module(0, 0)
{
  // Suppress calls of handleNotification on field changes to
  // avoid side effects during initialization phase.
  handleNotificationOff();

  //! Inventor camera fields (needed for calculation of PDF view camera from Inventor camera settings)
  _calculateCameraFromInventorSceneFld      = addNotify("calculateCameraFromInventorScene");
  (_autoCalculateCameraFromInventorSceneFld = addBool("autoCalculateCameraFromInventorScene"))->setBoolValue(false);
  (_inventorCameraPositionFld               = addVector3("inventorCameraPosition"))->setVector3Value(Vector3(0, 0, 0));
  (_inventorCameraOrientationFld            = addVector4("inventorCameraOrientation"))->setVector4Value(Vector4(0, 0, 1, 0));
  (_inventorCameraFocalDistanceFld          = addFloat("inventorCameraFocalDistance"))->setFloatValue(0);
  (_inventorCameraHeightFld                 = addFloat("inventorCameraHeight"))->setFloatValue(0);

  //! PDF view camera fields
  (_cameraCenterOfOrbitFld  = addVector3("cameraCenterOfOrbit"))->setVector3Value(Vector3(0));
  (_cameraCenterToCameraFld = addVector3("cameraCenterToCamera"))->setVector3Value(Vector3(0));
  (_cameraRadiusOfOrbitFld  = addFloat("cameraRadiusOfOrbit"))->setFloatValue(0);
  (_cameraFOVAngleFld       = addFloat("cameraFOVAngle"))->setFloatValue(90.0f);
  (_cameraRollAngleFld      = addFloat("cameraRollAngle"))->setFloatValue(0);

  // Reactivate calls of handleNotification on field changes.
  handleNotificationOn();
}
示例#7
0
SavePRC::SavePRC (std::string type)
  : WEMInspector(type)
{
  // Suppress calls of handleNotification on field changes to
  // avoid side effects during initialization phase.
  handleNotificationOff();

  // Add input fields to the module and set allowed types.
  (_inPointPositionsFld  = addBase("inPointPositions"))->setBaseValueAndAddAllowedType(&_inPointPositions);
  (_inLinePositionsFld   = addBase("inLinePositions"))->setBaseValueAndAddAllowedType(&_inLinePositions);
  (_inLineConnectionsFld = addBase("inLineConnections"))->setBaseValueAndAddAllowedType(&_inLineConnections);

  // Add fields for selecting simple, straightforward mode
  (_simpleModePointSetFld = addBool("simpleModePointSet"))->setBoolValue(false);
  (_simpleModeLineSetFld = addBool("simpleModeLineSet"))->setBoolValue(false);
  (_simpleModeMeshFld = addBool("simpleModeMesh"))->setBoolValue(false);

  // Add fields to the module and set their values.
  (_modelPrefixPointCloudsFld = addString("modelPrefixPointClouds"))->setStringValue("PointSet");
  (_modelPrefixLineSetsFld    = addString("modelPrefixLineSets"))->setStringValue("LineSet");
  (_modelPrefixMeshesFld      = addString("modelPrefixMeshes"))->setStringValue("Mesh");
  //(_modelPrefixGlyphsFld      = addString("modelPrefixGlyphs"))->setStringValue("Glyph");       // Not supported by Acrobat

  (_pointCloudSpecificationFld = addString("pointCloudSpecification"))->setStringValue("");
  (_lineSetSpecificationFld    = addString("lineSetSpecification"))->setStringValue("");
  (_meshSpecificationFld       = addString("meshSpecification"))->setStringValue("");
  //(_glyphSpecificationFld      = addString("glyphSpecification"))->setStringValue("");          // Not supported by Acrobat
  //(_viewsSpecificationFld      = addString("viewsSpecification"))->setStringValue("");
  //(_lightsSpecificationFld     = addString("lightsSpecification"))->setStringValue("");
  //(_metaDataSpecificationFld   = addString("metaDataSpecification"))->setStringValue("");

  //(_defaultViewNameFld     = addString("defaultViewName"))->setStringValue("DefaultView");
  //(_defaultLightNameFld    = addString("defaultLightName"))->setStringValue("DefaultAmbientLight");

  //(_defaultMaterialDiffuseColorFld  = addColor("defaultMaterialDiffuseColor"))->setVector3Value(Vector3(0.65f,0.65f,0.65f));
  //(_defaultMaterialSpecularColorFld = addColor("defaultMaterialSpecularColor"))->setVector3Value(Vector3(0.75f,0.75f,0.75f));
  //(_defaultMaterialAmbientColorFld  = addColor("defaultMaterialAmbientColor"))->setVector3Value(Vector3(0.0f,0.0f,0.0f));
  //(_defaultMaterialEmissiveColorFld = addColor("defaultMaterialEmissiveColor"))->setVector3Value(Vector3(0.0f,0.0f,0.0f));
  //(_defaultMaterialTransparencyFld  = addFloat("defaultMaterialTransparency"))->setFloatValue(0.0f);

  //(_defaultLightColorFld = addColor("defaultLightColor"))->setVector3Value(Vector3(1.0f,1.0f,1.0f));
  //(_defaultLightIntensityFld = addDouble("defaultLightIntensity"))->setDoubleValue(1.0f);

  //(_defaultBoundingBoxMetaDataFld = addBool("defaultBoundingBoxMetaData"))->setBoolValue(true);
  //(_addDefaultViewNodeFld         = addBool("addDefaultViewNode"))->setBoolValue(true);
  //(_addDefaultLightNodeFld        = addBool("addDefaultLightNode"))->setBoolValue(true);

  (_mlFileNameFld = addString("filename"))->setStringValue("");

  _mlSaveFld = addNotify("save");

  (_statusFld     = addString("status"))    ->setStringValue("Idle.");
  (_progressFld   = addProgress("progress"))->setFloatValue(0.0f);

  //-------------------------------------------------------------------
  //! Strings for enum field: specification type 
  //-------------------------------------------------------------------
  const char* const NEW_SPECIFICATION_OBJECTTYPE_STRINGS[mlPDF::NUM_OBJECTTYPES] = {
    "OBJECTTYPE_POINTCLOUD",
    "OBJECTTYPE_LINESET",
    "OBJECTTYPE_MESH",
    "OBJECTTYPE_METADATA"
  };

  //-------------------------------------------------------------------
  //! Strings for enum field: model visibility 
  //-------------------------------------------------------------------
  const char* const NEW_SPECIFICATION_MODELVISIBILITY_STRINGS[mlPDF::NUM_MODELVISIBILITY] = {
    "MODELVISIBILITY_NOTVISIBLE",
    "MODELVISIBILITY_FRONTVISIBLE",
    "MODELVISIBILITY_BACKVISIBLE",
    "MODELVISIBILITY_FRONTANDBACKVISIBLE"
  };

  //! Add fields for Specification Generator
  (_newSpecificationFld                        = addString("newSpecification"))->setStringValue("");
  (_newSpecificationSelectedTabFld             = addInt("selectedTab"))->setIntValue(0);
  (_newSpecificationOutputValidFld             = addBool("newSpecificationOutputValid"))->setBoolValue(false);
  _newSpecificationAddFld                      = addNotify("newSpecificationAdd");
  (_newSpecificationTypeFld                    = addEnum("newSpecificationType", NEW_SPECIFICATION_OBJECTTYPE_STRINGS, mlPDF::NUM_OBJECTTYPES))->setEnumValue(mlPDF::OBJECTTYPE_MESH);
  (_newSpecificationObjectNameFld              = addString("newSpecificationObjectName"))->setStringValue("");
  (_newSpecificationGroupPathFld               = addString("newSpecificationGroupPath"))->setStringValue("");
  (_newSpecificationUseDefaultColorFld         = addBool("newSpecificationUseDefaultColor"))->setBoolValue(true);
  (_newSpecificationUseDefaultSpecularColorFld = addBool("newSpecificationUseDefaultSpecularColor"))->setBoolValue(true);
  (_newSpecificationColorFld                   = addColor("newSpecificationColor"))->setVector3Value(Vector3(0.651f,0.651f,0.651f));
  (_newSpecificationColorAlphaFld              = addFloat("newSpecificationColorAlpha"))->setFloatValue(1.0f);
  (_newSpecificationSpecularColorFld           = addColor("newSpecificationSpecularColor"))->setVector3Value(Vector3(0.75f,0.75f,0.75f));
  (_newSpecificationModelVisibilityFld         = addEnum("newSpecificationModelVisibility", NEW_SPECIFICATION_MODELVISIBILITY_STRINGS, mlPDF::NUM_MODELVISIBILITY))->setEnumValue(mlPDF::MODELVISIBILITY_FRONTANDBACKVISIBLE);
  (_newSpecificationMetaDataKeyFld             = addString("newSpecificationMetaDataKey"))->setStringValue("");
  (_newSpecificationMetaDataValueFld           = addString("newSpecificationMetaDataValue"))->setStringValue("");
  (_newSpecificationWEMLabelFld                = addString("newSpecificationWEMLabel"))->setStringValue("");
  (_newSpecificationPositionTypesFld           = addString("newSpecificationPositionTypes"))->setStringValue("");
  (_newSpecificationConnectionTypesFld         = addString("newSpecificationConnectionTypes"))->setStringValue("");

  // Turn off the automatic saving on all notifications
  _listenToFinishingNotificationsFld       ->setBoolValue(false);
  _listenToRepaintNotificationsFld         ->setBoolValue(false);
  _listenToSelectionChangedNotificationsFld->setBoolValue(false);

  _autoUpdateFld->setBoolValue(false);
  _autoApplyFld->setBoolValue(false);

  // Reactivate calls of handleNotification on field changes.
  handleNotificationOn();
}
示例#8
0
int PushCliConn::onCreate(EventLoop* l){
	addNotify(l, READ_EVENT);	
	return 0;
}