Exemple #1
0
Radio::Radio(Module &module) :
	once(false), net(NULL),
	qmp2Icon(QMPlay2Core.getQMPlay2Pixmap()),
	wlasneStacje(tr("Own radio stations"))
{
	SetModule(module);

	setContextMenuPolicy(Qt::CustomContextMenu);
	popupMenu.addAction(tr("Remove the radio station"), this, SLOT(removeStation()));

	dw = new DockWidget;
	dw->setWindowTitle(tr("Internet radios"));
	dw->setObjectName(RadioName);
	dw->setWidget(this);

	lW = new QListWidget;
	connect(lW, SIGNAL(itemDoubleClicked(QListWidgetItem *)), this, SLOT(openLink()));
	lW->setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel);
	lW->setResizeMode(QListView::Adjust);
	lW->setWrapping(true);
	lW->setIconSize(QSize(32, 32));

	QAction *act = new QAction(lW);
	act->setShortcuts(QList<QKeySequence>() << QKeySequence("Return") << QKeySequence("Enter"));
	connect(act, SIGNAL(triggered()), this, SLOT(openLink()));
	act->setShortcutContext(Qt::WidgetWithChildrenShortcut);
	lW->addAction(act);

	infoL = new QLabel;

	progressB = new QProgressBar;

	QVBoxLayout *layout = new QVBoxLayout(this);
	layout->addWidget(lW);
	layout->addWidget(infoL);
	layout->addWidget(progressB);

	progressB->hide();

	connect(dw, SIGNAL(visibilityChanged(bool)), this, SLOT(visibilityChanged(bool)));
	connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(popup(const QPoint &)));

	addGroup(wlasneStacje);
	nowaStacjaLWI = new QListWidgetItem("-- " + tr("Add new radio station") + " --", lW);
	nowaStacjaLWI->setData(Qt::TextAlignmentRole, Qt::AlignCenter);

	Settings sets("Radio");
	foreach (const QString &entry, sets.get("Radia").toStringList())
	{
		const QStringList nazwa_i_adres = entry.split('\n');
		if (nazwa_i_adres.count() == 2)
			addStation(nazwa_i_adres[0], nazwa_i_adres[1], wlasneStacje);
	}
}
void OscController::addPanel(ofxPanel* panel){
    addGroup(panel);
    panels.push_back(panel);
    
    // testing: parameter sync
    // a group can only have one parent
    // see: https://github.com/openframeworks/openFrameworks/issues/3104
    //ofParameterGroup & group = (ofParameterGroup&) panel->getParameter();
    //cout << group.getParent() << endl;
    //ofAddListener(group.parameterChangedE, this, &OscController::parameterChanged);
}
Exemple #3
0
void DecalRoad::initPersistFields()
{
   addGroup( "DecalRoad" );

      addField( "material", TypeMaterialName, Offset( mMaterialName, DecalRoad ) ); 
      addProtectedField( "textureLength", TypeF32, Offset( mTextureLength, DecalRoad ), &DecalRoad::ptSetTextureLength, &defaultProtectedGetFn, "" );      
      addProtectedField( "breakAngle", TypeF32, Offset( mBreakAngle, DecalRoad ), &DecalRoad::ptSetBreakAngle, &defaultProtectedGetFn, 
         "Angle in degrees - DecalRoad will subdivided the spline if its curve is greater than this threshold." );      
      addField( "renderPriority", TypeS32, Offset( mRenderPriority, DecalRoad ), "DecalRoad(s) are rendered in descending renderPriority order" );

   endGroup( "DecalRoad" );

   addGroup( "Internal" );

      addProtectedField( "node", TypeString, NULL, &addNodeFromField, &emptyStringProtectedGetFn, "" );

   endGroup( "Internal" );

   Parent::initPersistFields();
}
void ProximityMineData::initPersistFields()
{
   addGroup( "Arming" );
   addField( "armingDelay", TypeF32, Offset(armingDelay, ProximityMineData), 
      "Delay (in seconds) from when the mine is placed to when it becomes active." );
   addField( "armingSound", TypeSFXTrackName, Offset(armingSound, ProximityMineData),
      "Sound to play when the mine is armed (starts at the same time as "
      "the <i>armed</i> sequence if defined)." );
   endGroup( "Arming" );

   addGroup( "Triggering" );
   addField( "autoTriggerDelay", TypeF32, Offset(autoTriggerDelay, ProximityMineData),
      "@brief Delay (in seconds) from arming until the mine automatically "
      "triggers and explodes, even if no object has entered the trigger area.\n\n"
      "Set to 0 to disable." );
   addField( "triggerOnOwner", TypeBool, Offset(triggerOnOwner, ProximityMineData),
      "@brief Controls whether the mine can be triggered by the object that owns it.\n\n"
      "For example, a player could deploy mines that are only dangerous to other "
      "players and not himself." );
   addField( "triggerRadius", TypeF32, Offset(triggerRadius, ProximityMineData),
      "Distance at which an activated mine will detect other objects and explode." );
   addField( "triggerSpeed", TypeF32, Offset(triggerSpeed, ProximityMineData),
      "Speed above which moving objects within the trigger radius will trigger the mine" );
   addField( "triggerDelay", TypeF32, Offset(triggerDelay, ProximityMineData),
      "Delay (in seconds) from when the mine is triggered until it explodes." );
   addField( "triggerSound", TypeSFXTrackName, Offset(triggerSound, ProximityMineData),
      "Sound to play when the mine is triggered (starts at the same time as "
      "the <i>triggered</i> sequence if defined)." );
   endGroup( "Triggering" );

   addGroup( "Explosion" );
   addField( "explosionOffset", TypeF32, Offset(explosionOffset, ProximityMineData),
      "@brief Offset from the mine's origin where the explosion emanates from."
      "Sometimes a thrown mine may be slightly sunk into the ground.  This can be just "
      "enough to cause the explosion to occur under the ground, especially on flat "
      "ground, which can end up blocking the explosion.  This offset along the mine's "
      "'up' normal allows you to raise the explosion origin to a better height.");
   endGroup( "Explosion" );

   Parent::initPersistFields();
}
void Ut_DBusInterfaceNotificationSink::init()
{
    qDBusConnectionConnectService.clear();
    qDBusConnectionConnectPath.clear();
    qDBusConnectionConnectInterface.clear();
    qDBusConnectionConnectName.clear();
    qDBusConnectionConnectReceiver.clear();
    qDBusConnectionConnectSlot.clear();

    manager = new NotificationManager;
    sink = new DBusInterfaceNotificationSink(manager);

    connect(this, SIGNAL(addNotification(Notification)), sink, SLOT(addNotification(Notification)));
    connect(this, SIGNAL(addGroup(uint,NotificationParameters)), sink, SLOT(addGroup(uint,NotificationParameters)));
    connect(this, SIGNAL(removeNotification(uint)), sink, SLOT(removeNotification(uint)));
    connect(this, SIGNAL(removeGroup(uint)), sink, SLOT(removeGroup(uint)));
    gNotificationManagerStub->stubReset();

    gNotificationGroupStub->stubReset();
    gNotificationGroupStub->stubSetReturnValue<const NotificationParameters&>("parameters", fakeParams);
}
Exemple #6
0
AttackTask::AttackTask(AIClasses *_ai, int target, CGroup &group): ATask(_ai) {
	const UnitDef *eud = ai->cbc->GetUnitDef(target);

	this->t = TASK_ATTACK;
	this->target = target;
	this->pos    = ai->cbc->GetUnitPos(target);
	if (eud)
		this->enemy = eud->humanName;
	targetAlt = -1;

	addGroup(group);
}
void PxMaterial::initPersistFields()
{
   Parent::initPersistFields();

   addGroup("PxMaterial");		

      addField( "restitution", TypeF32, Offset( restitution, PxMaterial ) );
      addField( "staticFriction", TypeF32, Offset( staticFriction, PxMaterial ) );
      addField( "dynamicFriction", TypeF32,	Offset( dynamicFriction, PxMaterial ) );

   endGroup("PxMaterial");		
}
void GameBaseData::initPersistFields()
{
   addGroup("Scripting");

      addField( "category", TypeCaseString, Offset( category, GameBaseData ),
         "The group that this datablock will show up in under the \"Scripted\" "
         "tab in the World Editor Library." );

   endGroup("Scripting");

   Parent::initPersistFields();
}
Exemple #9
0
void jRoster::constr()
{
	TreeModelItem contact;
	contact.m_protocol_name = "Jabber";
	contact.m_account_name = m_account_name;
        contact.m_parent_name = m_account_name;
        contact.m_item_name = m_account_name;
	contact.m_item_type = TreeModelItem::Account;

	emit addItemToContactList(contact, m_account_name);
	m_my_connections = new jBuddy(m_account_name, "My connections", m_path_to_avatars);
	addGroup("My connections");
}
//--------------------------------------------------------------------------
void GuiColorPickerCtrl::initPersistFields()
{
   addGroup("ColorPicker");
   addField("BaseColor", TypeColorF, Offset(mBaseColor, GuiColorPickerCtrl));
   addField("PickColor", TypeColorF, Offset(mPickColor, GuiColorPickerCtrl));
   addField("SelectorGap", TypeS32,  Offset(mSelectorGap, GuiColorPickerCtrl)); 
   addField("DisplayMode", TypeEnum, Offset(mDisplayMode, GuiColorPickerCtrl), 1, &gColorPickerModeTable );
   addField("ActionOnMove", TypeBool,Offset(mActionOnMove, GuiColorPickerCtrl));
	addField("ShowReticle", TypeBool, Offset(mShowReticle, GuiColorPickerCtrl));
   endGroup("ColorPicker");

   Parent::initPersistFields();
}
void GroundPlane::initPersistFields()
{
   addGroup( "Plane" );
   addField( "squareSize",    TypeF32,          Offset( mSquareSize, GroundPlane ) );
   addField( "scaleU",        TypeF32,          Offset( mScaleU, GroundPlane ) );
   addField( "scaleV",        TypeF32,          Offset( mScaleV, GroundPlane ) );
   addField( "material",      TypeMaterialName, Offset( mMaterialName, GroundPlane ) );
   endGroup( "Plane" );
   
   Parent::initPersistFields();

   removeField( "scale" );
}
Exemple #12
0
	void View::updateView(MyGUI::ResourceImageSetPtr _image)
	{
		MyGUI::EnumeratorWidgetPtr childs = mImageView->getEnumerator();
		MyGUI::WidgetManager::getInstance().destroyWidgets(childs);

		MyGUI::IntSize size(0, 10);
		MyGUI::EnumeratorGroupImage groups = _image->getEnumerator();
		while (groups.next())
		{
			addGroup(_image, groups.current(), size);
		}
		mImageView->setCanvasSize(size);
	}
Exemple #13
0
//--------------------------------------------------------------------------
void GuiGradientCtrl::initPersistFields()
{
   addGroup("ColorPicker");
   addField("baseColor", TypeColorF, Offset(mBaseColor, GuiGradientCtrl));
   addField("pickColor", TypeColorF, Offset(mPickColor, GuiGradientCtrl));
   addField("displayMode", TYPEID< PickMode >(), Offset(mDisplayMode, GuiGradientCtrl) );
   addField("actionOnMove", TypeBool,Offset(mActionOnMove, GuiGradientCtrl));
	addField("showReticle", TypeBool, Offset(mShowReticle, GuiGradientCtrl));
	addField("swatchFactor", TypeS32, Offset(mSwatchFactor, GuiGradientCtrl));
   endGroup("ColorPicker");

   Parent::initPersistFields();
}
void SimComponent::initPersistFields()
{
    addGroup("Component");

        addProtectedField( "Template", TypeBool, Offset(mTemplate, SimComponent), 
           &setIsTemplate, &defaultProtectedGetFn, 
           "Places the object in a component set for later use in new levels." );

    endGroup("Component");

    // Call Parent.
    Parent::initPersistFields();
} 
Exemple #15
0
void SFXEmitter::initPersistFields()
{
   //[rene 07/04/09]
   //  This entire profile/local profile split thing back from TGE-days is no good and should be removed.
   //  The emitter should link to a single SFXProfile and there should be a separate means of creating/editing/managing
   //  profiles as part of the standard editor toolset (datablock editor?).
   //
   //  The way it is now, it is totally confusing, inconsistent, and difficult to handle in script (example:
   //  what's the "is3D" supposed to mean?  Nothing, if a profile is selected.  So how do I determine whether
   //  a profile is 3D?  Hmmm, check for profile, it set, check it's description, if not, check the emitter...).

   addGroup("Media");
   addField("profile",              TypeSFXProfilePtr,         Offset(mProfile, SFXEmitter));
   addField("fileName",             TypeStringFilename,        Offset(mLocalProfile.mFilename, SFXEmitter));
   endGroup("Media");

   addGroup("Sound");
   addField("playOnAdd",            TypeBool,   Offset(mPlayOnAdd, SFXEmitter));
   addField("isLooping",            TypeBool,   Offset(mDescription.mIsLooping, SFXEmitter));
   addField("isStreaming",          TypeBool,   Offset(mDescription.mIsStreaming, SFXEmitter));
   addField("channel",              TypeS32,    Offset(mDescription.mChannel, SFXEmitter));
   addField("volume",               TypeF32,    Offset(mDescription.mVolume, SFXEmitter));
   addField("pitch",                TypeF32,    Offset(mDescription.mPitch, SFXEmitter));
   addField("fadeInTime",           TypeF32,    Offset(mDescription.mFadeInTime, SFXEmitter));
   addField("fadeOutTime",          TypeF32,    Offset(mDescription.mFadeOutTime, SFXEmitter));
   endGroup("Sound");

   addGroup("3D Sound");
   addField("is3D",                 TypeBool,   Offset(mDescription.mIs3D, SFXEmitter));
   addField("referenceDistance",    TypeF32,    Offset(mDescription.mReferenceDistance, SFXEmitter));
   addField("maxDistance",          TypeF32,    Offset(mDescription.mMaxDistance, SFXEmitter));
   addField("coneInsideAngle",      TypeS32,    Offset(mDescription.mConeInsideAngle, SFXEmitter));
   addField("coneOutsideAngle",     TypeS32,    Offset(mDescription.mConeOutsideAngle, SFXEmitter));
   addField("coneOutsideVolume",    TypeF32,    Offset(mDescription.mConeOutsideVolume, SFXEmitter));
   endGroup("3D Sound");

   Parent::initPersistFields();
}
void GuiBitmapCtrl::initPersistFields()
{
   addGroup( "Bitmap" );
   
      addProtectedField( "bitmap", TypeImageFilename, Offset( mBitmapName, GuiBitmapCtrl ),
         &setBitmapName, &defaultProtectedGetFn,
         "The bitmap file to display in the control." );
      addField( "wrap",   TypeBool,     Offset( mWrap, GuiBitmapCtrl ),
         "If true, the bitmap is tiled inside the control rather than stretched to fit." );
      
   endGroup( "Bitmap" );

   Parent::initPersistFields();
}
Exemple #17
0
groups *doGroups(icqInfo *details_pointer, groups *groups_pointer)
{
	if(details_pointer == NULL) {
		printf("weird error!\n");
	} else {
		while(details_pointer) {
			if(!foundGroup(groups_pointer, details_pointer->group)) {
				groups_pointer = addGroup(groups_pointer, details_pointer->group);
			}
			details_pointer=details_pointer->link;
		}
	}
	return groups_pointer;
}
Exemple #18
0
void Forest::initPersistFields()
{
   Parent::initPersistFields();

   addField( "dataFile",  TypeFilename, Offset( mDataFileName, Forest ),
      "The source forest data file." );

   addGroup( "Lod" );
      
      addField( "lodReflectScalar",      TypeF32,       Offset( mReflectionLodScalar, Forest ),
         "Scalar applied to the farclip distance when Forest renders into a reflection." );

   endGroup( "Lod" );
}
void ForestBrushElement::initPersistFields()
{   
   Parent::initPersistFields();

   addGroup( "ForestBrushElement" );

      addField( "forestItemData", TYPEID< ForestItemData >(), Offset( mData, ForestBrushElement ), 
         "The type of ForestItem this element holds placement parameters for." );

      addField( "probability",   TypeF32, Offset( mProbability, ForestBrushElement ),
         "The probability that this element will be created during an editor brush stroke "
         "is the sum of all element probabilities in the brush divided by the probability "
         "of this element." );

      addField( "rotationRange",   TypeF32, Offset( mRotationRange, ForestBrushElement ),
         "The max rotation in degrees that items will be placed." );

      addField( "scaleMin",   TypeF32, Offset( mScaleMin, ForestBrushElement ),
         "The minimum random size for each item." );

      addField( "scaleMax",   TypeF32, Offset( mScaleMax, ForestBrushElement ),
         "The maximum random size of each item." );

      addField( "scaleExponent",   TypeF32, Offset( mScaleExponent, ForestBrushElement ),
         "An exponent used to bias between the minimum and maximum random sizes." );

      addField( "sinkMin",   TypeF32, Offset( mSinkMin, ForestBrushElement ),
         "Min variation in the sink radius." );

      addField( "sinkMax",   TypeF32, Offset( mSinkMax, ForestBrushElement ),
         "Max variation in the sink radius." );

      addField( "sinkRadius",   TypeF32, Offset( mSinkRadius, ForestBrushElement ),
         "This is the radius used to calculate how much to sink the trunk at "
         "its base and is used to sink the tree into the ground when its on a slope." );

      addField( "slopeMin",   TypeF32, Offset( mSlopeMin, ForestBrushElement ),
         "The min surface slope in degrees this item will be placed on." );

      addField( "slopeMax",   TypeF32, Offset( mSlopeMax, ForestBrushElement ),
         "The max surface slope in degrees this item will be placed on." );

      addField( "elevationMin",   TypeF32, Offset( mElevationMin, ForestBrushElement ),
         "The min world space elevation this item will be placed." );

      addField( "elevationMax",   TypeF32, Offset( mElevationMax, ForestBrushElement ),
         "The max world space elevation this item will be placed." );

   endGroup( "ForestBrushElement" );      
}
Exemple #20
0
void TriggerData::initPersistFields()
{
   addGroup("Callbacks");

      addField( "tickPeriodMS",  TypeS32,    Offset( tickPeriodMS, TriggerData ),
         "@brief Time in milliseconds between calls to onTickTrigger() while at least one object is within a Trigger's bounds.\n\n"
         "@see onTickTrigger()\n");
      addField( "clientSide",    TypeBool,   Offset( isClientSide, TriggerData ),
         "Forces Trigger callbacks to only be called on clients.");

   endGroup("Callbacks");

   Parent::initPersistFields();
}
Exemple #21
0
void GuiColorPickerCtrl::initPersistFields()
{
   addGroup("ColorPicker");
      addField("baseColor", TypeColorF, Offset(mBaseColor, GuiColorPickerCtrl));
      addField("pickColor", TypeColorF, Offset(mPickColor, GuiColorPickerCtrl));
      addField("useSRGB", TypeBool, Offset(mUseSRGB, GuiColorPickerCtrl), "Render using sRGB scale");
      addField("selectorGap", TypeS32,  Offset(mSelectorGap, GuiColorPickerCtrl)); 
      addField("displayMode", TYPEID< PickMode >(), Offset(mDisplayMode, GuiColorPickerCtrl) );
      addField("actionOnMove", TypeBool,Offset(mActionOnMove, GuiColorPickerCtrl));
      addField("showReticle", TypeBool, Offset(mShowReticle, GuiColorPickerCtrl));
   endGroup("ColorPicker");

   Parent::initPersistFields();
}
Exemple #22
0
    // Return true if the line is successfully processed without errors
    // If cont is true, then groupName must be set to the continuation group name
    bool AclReader::processGroupLine(tokList& toks, const bool cont) {
        const unsigned toksSize = toks.size();

        if (contFlag) {
            gmCitr citr = groups.find(groupName);
            for (unsigned i = 0; i < toksSize; i++) {
                if (isValidGroupName(toks[i])) {
                    if (toks[i] == groupName) {
                        QPID_LOG(debug, "ACL: Line: " << lineNumber
                            << ", Ignoring recursive sub-group \"" << toks[i] << "\".");
                        continue;
                    } else if (groups.find(toks[i]) == groups.end()) {
                        errorStream << ACL_FORMAT_ERR_LOG_PREFIX << "Line : " << lineNumber
                            << ", Sub-group \"" << toks[i] << "\" not defined yet.";
                        return false;
                    }
                } else if (!isValidUserName(toks[i])) return false;
                addName(toks[i], citr->second);
            }
        } else {
            const unsigned minimumSize = (cont ? 2 : 3);
            if (toksSize < minimumSize) {
                errorStream << ACL_FORMAT_ERR_LOG_PREFIX << "Line : " << lineNumber
                    << ", Insufficient tokens for group definition.";
                return false;
            }
            if (!isValidGroupName(toks[1])) {
                errorStream << ACL_FORMAT_ERR_LOG_PREFIX << "Line : " << lineNumber
                    << ", Group name \"" << toks[1] << "\" contains illegal characters.";
                return false;
            }
            gmCitr citr = addGroup(toks[1]);
            if (citr == groups.end()) return false;
            for (unsigned i = 2; i < toksSize; i++) {
                if (isValidGroupName(toks[i])) {
                    if (toks[i] == groupName) {
                        QPID_LOG(debug, "ACL: Line: " << lineNumber
                            << ", Ignoring recursive sub-group \"" << toks[i] << "\".");
                        continue;
                    } else if (groups.find(toks[i]) == groups.end()) {
                        errorStream << ACL_FORMAT_ERR_LOG_PREFIX << "Line : " << lineNumber
                            << ", Sub-group \"" << toks[i] << "\" not defined yet.";
                        return false;
                    }
                } else if (!isValidUserName(toks[i])) return false;
                addName(toks[i], citr->second);
            }
        }
        return true;
    }
bool StandardContactList::load_groups(const QDomElement& groups)
{
    QDomNodeList list = groups.elementsByTagName("group");
    for(int i = 0; i < list.size(); i++)
    {
        QDomElement el = list.at(i).toElement();
        int id = el.attribute("id").toInt();
        GroupPtr gr = createGroup(id);
        if(!gr->deserialize(el))
            return false;
        addGroup(gr);
    }
    return true;
}
Exemple #24
0
void updateFile(ObjFile* file, const char* line)
{
    // counts the number of groups, objectes, faces, positions, normals, 
    // texcoords 

    // TODO: trim [line]

    if (line[0] == 'v' && line[1] == ' ')
    {
        addPosition(file, line);
        return;
    }

    if (line[0] == 'v' && line[1] == 'n' && line[2] == ' ')
    {
        addNormal(file, line);
        return;
    }

    if (line[0] == 'v' && line[1] == 't' && line[2] == ' ')
    {
        addTexCoord(file, line);
        return;
    }

    if (line[0] == 'o' && line[1] == ' ')
    {
        addObject(file, line);
        return;
    }

    if (line[0] == 'g' && line[1] == ' ')
    {
        addGroup(file, line);
        return;
    }

    if (line[0] == 'f' && line[1] == ' ')
    {
        addFace(file, line);
        return;
    }

    if (strstr(line, "usemtl") == line) 
    {
        setCurrentMaterial(file, line);
        return;
    }
}
Exemple #25
0
void Portal::initPersistFields()
{
   addGroup( "Zoning" );

      addProtectedField( "frontSidePassable", TypeBool, Offset( mPassableSides[ FrontSide ], Portal ),
         &_setFrontSidePassable, &defaultProtectedGetFn,
         "Whether one can view through the front-side of the portal." );
      addProtectedField( "backSidePassable", TypeBool, Offset( mPassableSides[ BackSide ], Portal ),
         &_setBackSidePassable, &defaultProtectedGetFn,
         "Whether one can view through the back-side of the portal." );

   endGroup( "Zoning" );

   Parent::initPersistFields();
}
Exemple #26
0
void ADOU::performEntry(ADEntry* entry)
{
	if (entry->dnKeys.size() == 0)
	{
		return;
	}
	else if (entry->dnKeys[entry->dnKeys.size() - 1] == _T("OU"))
	{
		CString strLastValue = entry->popKeyValue();
		findOU(strLastValue, entry->getOUDN())->performEntry(entry);
	}
	else if (entry->type == _T("computer"))
	{
		ADComputer *computer = addComputer(entry->cn, entry->dn, domain);
		computer->infos = entry->infos;
	}
	else if (entry->type == _T("user"))
	{
		ADUser *user = addUser(entry->cn, entry->dn);
		user->infos = entry->infos;
	}
	else if (entry->type == _T("localgroup"))
	{
		ADGroup *group = addGroup(entry->cn, entry->dn, domain, _T("local"));
		group->infos = entry->infos;
	}
	else if (entry->type == _T("globalgroup"))
	{
		ADGroup *group = addGroup(entry->cn, entry->dn, domain, _T("global"));
		group->infos = entry->infos;
	}
	else
	{
		MyMessageBox_Error(_T("performEntry Error"), _T("Error"));
	}
}
//--------------------------------------------------------------------------
void Lightning::initPersistFields()
{
   addGroup( "Strikes" );
   addField( "strikesPerMinute", TypeS32, Offset(strikesPerMinute, Lightning),
      "@brief Number of lightning strikes to perform per minute.\n\n"
      "Automatically invokes strikeRandomPoint() at regular intervals." );
   addField( "strikeWidth", TypeF32, Offset(strikeWidth, Lightning),
      "Width of a lightning bolt." );
   addField( "strikeRadius", TypeF32, Offset(strikeRadius, Lightning),
      "@brief Horizontal size (XY plane) of the search box used to find and "
      "damage Player or Vehicle objects within range of the strike.\n\n"
      "Only the object at highest altitude with a clear line of sight to the "
      "bolt will be hit." );
   endGroup( "Strikes" );

   addGroup( "Colors" );
   addField( "color", TypeColorF, Offset(color, Lightning),
      "Color to blend the strike texture with." );
   addField( "fadeColor", TypeColorF, Offset(fadeColor, Lightning),
      "@brief Color to blend the strike texture with when the bolt is fading away.\n\n"
      "Bolts fade away automatically shortly after the strike occurs." );
   endGroup( "Colors" );

   addGroup( "Bolts" );
   addField( "chanceToHitTarget", TypeF32, Offset(chanceToHitTarget, Lightning),
      "Percentage chance (0-1) that a given lightning bolt will hit something." );
   addField( "boltStartRadius", TypeF32, Offset(boltStartRadius, Lightning),
      "@brief Radial distance from the center of the Lightning object for the "
      "start point of the bolt.\n\n"
      "The actual start point will be a random point within this radius." );
   addField( "useFog", TypeBool, Offset(useFog, Lightning),
      "Controls whether lightning bolts are affected by fog when they are rendered." );
   endGroup( "Bolts" );

   Parent::initPersistFields();
}
 void WindowsManager::createScene (const char* sceneNameCorba)
 {
     std::string sceneName (sceneNameCorba);
     if (nodes_.find (sceneName) != nodes_.end ()) {
         std::ostringstream oss;
         oss << "A scene with name, \"" << sceneName << "\" already exists.";
         throw std::runtime_error (oss.str ());
     }
     else {
         mtx_.lock();
         GroupNodePtr_t mainNode = GroupNode::create (sceneName);
         addGroup (sceneName, mainNode);
         mtx_.unlock();
     }
 }
Exemple #29
0
/**
 *  Default constructor.
 *  @param "CModel *" pModel
 */
CSensProblem::CSensProblem(const CCopasiContainer * pParent):
    CCopasiProblem(CCopasiTask::sens, pParent),
    mpSubTaskType(NULL),
    mpTargetFunctions(NULL),
    mpVariablesGroup(NULL),
    mpResultAnnotation(NULL),
    mpScaledResultAnnotation(NULL),
    mpCollapsedResultAnnotation(NULL)
{
  addParameter("SubtaskType", CCopasiParameter::UINT, (unsigned C_INT32) 0);
  mpSubTaskType = (CSensProblem::SubTaskType*)getValue("SubtaskType").pUINT;

  //---------------------------------------------------
  addGroup("TargetFunctions");
  mpTargetFunctions = dynamic_cast<CCopasiParameterGroup*>(getParameter("TargetFunctions"));
  createParametersInGroup(mpTargetFunctions);

  //---------------------------------------------------
  addGroup("ListOfVariables");
  mpVariablesGroup = dynamic_cast<CCopasiParameterGroup*>(getParameter("ListOfVariables"));

  //create a useful default problem
  setSubTaskType(SteadyState);

  CSensItem item;

  item.setListType(CObjectLists::NON_CONST_METAB_CONCENTRATIONS);
  changeTargetFunctions(item);

  item.setListType(CObjectLists::ALL_PARAMETER_VALUES);
  addVariables(item);

  //  initDebugProblem();
  initObjects();
  CONSTRUCTOR_TRACE;
}
void Ut_DBusInterfaceNotificationSink::testNothingCalledWhenNothingRegistered()
{
    Notification n;
    NotificationParameters np;

    emit addNotification(n);
    emit addGroup(0, np);
    emit removeNotification(0);
    emit removeGroup(0);

    QCOMPARE(gAddNotificationProxies.count(), 0);
    QCOMPARE(gAddGroupProxies.count(), 0);
    QCOMPARE(gRemoveNotificationProxies.count(), 0);
    QCOMPARE(gRemoveGroupProxies.count(), 0);
}