Exemplo n.º 1
0
bool PowerupHeal::saveTidy(PropertyBag &xml, PropertyBag &dataFile) const
{
	saveTag(xml, dataFile, "healValue", healValue);
	saveTag(xml, dataFile, "healTime", healTime);

	return Powerup::saveTidy(xml, dataFile);
}
Exemplo n.º 2
0
bool TriggerParticles::saveTidy(PropertyBag &xml, PropertyBag &dataFile) const
{
	saveTag(xml, dataFile, "pfxFileName", pfxFileName);
	saveTag(xml, dataFile, "pfxLocation", pfxLocation);

	return Trigger::saveTidy(xml, dataFile);
}
Exemplo n.º 3
0
bool Spawn::saveTidy(PropertyBag &xml, PropertyBag &editorData) const
{
	saveTag(xml, editorData, "monsterDataFile",     monsterDataFile);
	saveTag(xml, editorData, "minMonsters",         minMonsters);
	saveTag(xml, editorData, "maxMonsters",         maxMonsters);
	saveTag(xml, editorData, "separationDistance",  separationDistance);

	return Listener::saveTidy(xml, editorData);
}
Exemplo n.º 4
0
QByteArray MyXmlDoc::save()
{
   QByteArray baDoc;
   baDoc.append("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\r");
   baDoc.append(saveTag(m_root));
   return baDoc;
}
Exemplo n.º 5
0
bool Trigger::saveTidy(PropertyBag &xml, PropertyBag &dataFile) const
{
	saveList(xml, "sounds", sounds);
	saveTag(xml, dataFile, "triggerRadius", triggerRadius);

	return Actor::saveTidy(xml, dataFile);
}
Exemplo n.º 6
0
bool Monster::saveTidy(PropertyBag &xml, PropertyBag &dataFile) const
{
	saveTag(xml, dataFile, "preferredSpell", preferredSpell);

	StateMachine *fsm = GetStateMachine();

	string type = "none";

	if(fsm != 0)
	{
		type = fsm->getTypeString();
	}

	saveTag(xml, dataFile, "fsm", type);

	return Creature::saveTidy(xml, dataFile);
}
Exemplo n.º 7
0
void TagEditor::createActions(){

    connect(LoadScriptButton,SIGNAL(clicked()),this,SLOT(loadScript()));
    connect(SaveScriptButton,SIGNAL(clicked()),this,SLOT(saveScript()));
    connect(RunScriptButton,SIGNAL(clicked()),this, SLOT(runScript()));

    QAction* searchOnlineAction = new QAction(tr("Search for selected file/album in online musicdatabases..."), this);
    searchOnlineAction->setShortcut(tr("Ctrl+S"));
    connect(searchOnlineAction, SIGNAL(triggered()), this, SLOT(searchOnline()));
    QAction* searchForFilesAction = new QAction(tr("Search for files to add to workspace..."), this);
    //searchForFilesAction->setShortcut(tr("Ctrl+S"));
    connect(searchForFilesAction, SIGNAL(triggered()), this, SLOT(searchAndAddFiles()));

    TreeView->setContextMenuPolicy(Qt::ActionsContextMenu);
    TreeView->addAction(searchOnlineAction);
    TreeView->addAction(searchForFilesAction);


    connect( TreeView, SIGNAL( expanded( const QModelIndex & )  ), this, SLOT( resizeColumn() ) );
    connect( TreeView, SIGNAL( collapsed( const QModelIndex & )  ), this, SLOT( resizeColumn() ) );
    //connect( TreeWidget_, SIGNAL( currentRowChanged( int )  ), this, SLOT( showTagInfo(int) ) );
    connect( TreeWidget_, SIGNAL( itemSelectionChanged() ), this, SLOT( showTagInfo() ) );
    connect( AddButton, SIGNAL( clicked()  ), this, SLOT(addFiles() ) );
    connect( RemoveButton, SIGNAL( clicked()  ), this, SLOT(removeFiles() ) );
    connect( ClearButton, SIGNAL( clicked()  ), this, SLOT(removeAllFiles() ) );
    connect( SaveButton, SIGNAL( clicked()  ), this, SLOT(saveTag() ) );
    connect( ChooseDirButton, SIGNAL( clicked()  ), this, SLOT(chooseDir() ) );

    connect( actionSettings, SIGNAL( triggered() ), this, SLOT( showSettings() ) );
    connect( actionRewriteTag, SIGNAL( triggered() ), this, SLOT( rewriteTag() ) );
    connect( actionRenameFiles, SIGNAL( triggered() ), this, SLOT( renameFiles() ) );
    connect( actionReplaceTags, SIGNAL( triggered() ), this, SLOT( replaceTags() ) );
    connect( actionSerialize, SIGNAL( triggered() ), this, SLOT( serialize() ) );
    connect( actionClearTags, SIGNAL( triggered() ), this, SLOT( clearTags() ) );
    //connect( actionRemoveFrames, SIGNAL( triggered() ), this, SLOT( removeFrames() ) );
    //styles

    QSignalMapper *styleMapper = new QSignalMapper(this);
    QStringList styles = QStyleFactory::keys();
    for(int i=0;i<styles.size();i++){
        QAction *a = new QAction(styles[i],menuStyle);
        a->setCheckable(true);
        connect(a, SIGNAL(triggered()), styleMapper, SLOT(map()));
        styleMapper->setMapping(a, styles[i]);
        menuStyle->addAction(a);
    }
    menuStyle->addSeparator();
    QAction *actionCustomStyleSheet = new QAction("Custom...",menuStyle);
    actionCustomStyleSheet->setCheckable(true);
    connect(actionCustomStyleSheet, SIGNAL(triggered()), this, SLOT(openStyleSheet()));
    menuStyle->addAction( actionCustomStyleSheet );
    connect(styleMapper, SIGNAL(mapped(const QString &)), this, SLOT(setGUIStyle(const QString &)));

}
Exemplo n.º 8
0
QByteArray MyXmlDoc::saveTag(MyXmlTag *tag)
{
   QByteArray baDoc;
   baDoc.append("<");
   baDoc.append(tag->getName());

   MyXmlTag *child_tag=tag->getChild();

   bool haveChild=false;
   while(child_tag)
   {
      if(!child_tag->isNode())
      {
         baDoc.append(" ");
         baDoc.append(child_tag->getName());
         baDoc.append("=\"");
         baDoc.append(child_tag->getValue());
         baDoc.append("\"");

      }
      else
         haveChild=true;

      child_tag=child_tag->getNext();
   }

   if(haveChild || tag->getValue().size())
   {
      baDoc.append(">\r");
      if(tag->getValue().size())
      {
         baDoc.append(tag->getValue());
         baDoc.append("\r");
      }
      child_tag=tag->getChild();
      while(child_tag)
      {
         if(child_tag->isNode())
            baDoc.append(saveTag(child_tag));

         child_tag=child_tag->getNext();
      }
      baDoc.append("</");
      baDoc.append(tag->getName());
      baDoc.append(">\r");
   }
   else
   {
      baDoc.append(" />\r");
   }

   return baDoc;
}
Exemplo n.º 9
0
bool GateOpener::saveTidy(PropertyBag &xml, PropertyBag &editorData) const
{
	saveTag(xml, editorData, "gateName", gateName);
	saveTag(xml, editorData, "open", open);
	return Listener::saveTidy(xml, editorData);
}