Ejemplo n.º 1
0
  void Run() override
  {

    const QHash<QString, QString>& properties =
        view->GetPartProperties();
    if (!properties.empty())
    {
      IMemento::Pointer propBag = viewMemento ->CreateChild(
          WorkbenchConstants::TAG_PROPERTIES);
      for (QHash<QString, QString>::const_iterator i =
          properties.begin(); i != properties.end(); ++i)
      {
        IMemento::Pointer p = propBag->CreateChild(
            WorkbenchConstants::TAG_PROPERTY, i.key());
        p->PutTextData(i.value());
      }
    }

    view->SaveState(viewMemento ->CreateChild(
        WorkbenchConstants::TAG_VIEW_STATE));
  }
Ejemplo n.º 2
0
  void Run()
  {

    const std::map<std::string, std::string>& properties =
        view->GetPartProperties();
    if (!properties.empty())
    {
      IMemento::Pointer propBag = viewMemento ->CreateChild(
          WorkbenchConstants::TAG_PROPERTIES);
      for (std::map<std::string, std::string>::const_iterator i =
          properties.begin(); i != properties.end(); ++i)
      {
        IMemento::Pointer p = propBag->CreateChild(
            WorkbenchConstants::TAG_PROPERTY, i->first);
        p->PutTextData(i->second);
      }
    }

    view->SaveState(viewMemento ->CreateChild(
        WorkbenchConstants::TAG_VIEW_STATE));
  }