Beispiel #1
0
// DeviceInterface
DeviceInterface::DeviceInterface(const QDBusObjectPath &path, const QVariantMap &properties, QObject *parent)
    : QDBusAbstractAdaptor(parent)
    , m_mediaPlayer(0)
{
    setPath(path);
    setObjectParent(parent);
    setProperties(properties);
    setName(QStringLiteral("org.bluez.Device1"));

    // Alias needs special handling
    setAlias(properties.value(QStringLiteral("Alias")).toString());

    // Create Input1
    if (properties.contains(QStringLiteral("Input"))) {
        const QVariantMap &inputProps = qdbus_cast<QVariantMap>(properties.value(QStringLiteral("Input")));
        InputInterface *input = new InputInterface(path, inputProps, parent);

        ObjectManager *manager = ObjectManager::self();
        manager->addObject(input);

        QVariantMap props = properties;
        props.remove(QStringLiteral("Input"));
        setProperties(props);
    }
}
Beispiel #2
0
CModelParameterSet::CModelParameterSet(const std::string & name,
                                       const CCopasiContainer * pParent):
  CCopasiContainer(name, pParent),
  CModelParameterGroup(NULL, CModelParameter::Set),
  CAnnotation(),
  mKey(CCopasiRootContainer::getKeyFactory()->add("ModelParameterSet", this)),
  mpModel(NULL)
{
  setObjectParent(pParent);
}
Beispiel #3
0
CModelParameterSet::CModelParameterSet(const CModelParameterSet & src,
                                       const CCopasiContainer * pParent,
                                       const bool & createMissing):
  CCopasiContainer(src, pParent),
  CModelParameterGroup(src, NULL, createMissing),
  CAnnotation(src),
  mKey(CCopasiRootContainer::getKeyFactory()->add("ModelParameterSet", this)),
  mpModel(NULL)
{
  setObjectParent(pParent);

  if (mpModel == NULL)
    {
      mpModel = src.getModel();
    }

  compile();
}