ImageFilterBase* FilterChain::appendNewFilter(const std::string& type) { ImageFilterBase *filter = filterCreator->createFilter(type); appendFilter(filter); return filter; }
void visualStudioProject::addSrc(string srcFile, string folder){ fixSlashOrder(folder); fixSlashOrder(srcFile); vector < string > folderSubNames = ofSplitString(folder, "\\"); string folderName = ""; for (int i = 0; i < folderSubNames.size(); i++){ if (i != 0) folderName += "\\"; folderName += folderSubNames[i]; appendFilter(folderName); } if (ofIsStringInString(srcFile, ".h") || ofIsStringInString(srcFile, ".hpp")){ appendValue(doc, "ClInclude", "Include", srcFile); pugi::xml_node node = filterXmlDoc.select_single_node("//ItemGroup[ClInclude]").node(); pugi::xml_node nodeAdded = node.append_child("ClInclude"); nodeAdded.append_attribute("Include").set_value(srcFile.c_str()); nodeAdded.append_child("Filter").append_child(pugi::node_pcdata).set_value(folder.c_str()); } else { appendValue(doc, "ClCompile", "Include", srcFile); pugi::xml_node node = filterXmlDoc.select_single_node("//ItemGroup[ClCompile]").node(); pugi::xml_node nodeAdded = node.append_child("ClCompile"); nodeAdded.append_attribute("Include").set_value(srcFile.c_str()); nodeAdded.append_child("Filter").append_child(pugi::node_pcdata).set_value(folder.c_str()); } }
void SoundWindow::constructorInternals(QString title) { setWindowTitle(title); QMenu *fileMenu = menuBar()->addMenu("File"); QAction *saveAction = new QAction("Save", this); connect(saveAction, SIGNAL(triggered()), this, SLOT(save())); fileMenu->addAction(saveAction); QAction *playAction = new QAction("Play", this); connect(playAction, SIGNAL(triggered()), this, SLOT(play())); fileMenu->addAction(playAction); mDisplayLabel = new QLabel(this); this->setCentralWidget(mDisplayLabel); mFiltersMenu = menuBar()->addMenu("Filters"); appendFilter(new AutoCorrelationFilter(this)); appendFilter(new CombFilter(this)); connect(mFiltersMenu, SIGNAL(triggered(QAction*)), this, SLOT(applyFilter(QAction*))); }
void visualStudioProject::addSrc(string srcFile, string folder, SrcType type){ toDosSlashOrder(folder); toDosSlashOrder(srcFile); vector < string > folderSubNames = ofSplitString(folder, "\\"); string folderName = ""; for (int i = 0; i < folderSubNames.size(); i++){ if (i != 0) folderName += "\\"; folderName += folderSubNames[i]; appendFilter(folderName); } if(type==DEFAULT){ if (ofIsStringInString(srcFile, ".h") || ofIsStringInString(srcFile, ".hpp")){ appendValue(doc, "ClInclude", "Include", srcFile); pugi::xml_node node = filterXmlDoc.select_single_node("//ItemGroup[ClInclude]").node(); pugi::xml_node nodeAdded = node.append_child("ClInclude"); nodeAdded.append_attribute("Include").set_value(srcFile.c_str()); nodeAdded.append_child("Filter").append_child(pugi::node_pcdata).set_value(folder.c_str()); } else { appendValue(doc, "ClCompile", "Include", srcFile); pugi::xml_node nodeFilters = filterXmlDoc.select_single_node("//ItemGroup[ClCompile]").node(); pugi::xml_node nodeAdded = nodeFilters.append_child("ClCompile"); nodeAdded.append_attribute("Include").set_value(srcFile.c_str()); nodeAdded.append_child("Filter").append_child(pugi::node_pcdata).set_value(folder.c_str()); } }else{ switch(type){ case CPP:{ appendValue(doc, "ClCompile", "Include", srcFile); pugi::xml_node nodeFilters = filterXmlDoc.select_single_node("//ItemGroup[ClCompile]").node(); pugi::xml_node nodeAdded = nodeFilters.append_child("ClCompile"); nodeAdded.append_attribute("Include").set_value(srcFile.c_str()); nodeAdded.append_child("Filter").append_child(pugi::node_pcdata).set_value(folder.c_str()); break; } case C:{ pugi::xml_node node = appendValue(doc, "ClCompile", "Include", srcFile); if(!node.child("CompileAs")){ pugi::xml_node compileAs = node.append_child("CompileAs"); compileAs.append_attribute("Condition").set_value("'$(Configuration)|$(Platform)'=='Debug|Win32'"); compileAs.set_value("Default"); compileAs = node.append_child("CompileAs"); compileAs.append_attribute("Condition").set_value("'$(Configuration)|$(Platform)'=='Release|Win32'"); compileAs.set_value("Default"); } pugi::xml_node nodeFilters = filterXmlDoc.select_single_node("//ItemGroup[ClCompile]").node(); pugi::xml_node nodeAdded = nodeFilters.append_child("ClCompile"); nodeAdded.append_attribute("Include").set_value(srcFile.c_str()); nodeAdded.append_child("Filter").append_child(pugi::node_pcdata).set_value(folder.c_str()); break; } case HEADER:{ appendValue(doc, "ClInclude", "Include", srcFile); pugi::xml_node node = filterXmlDoc.select_single_node("//ItemGroup[ClInclude]").node(); pugi::xml_node nodeAdded = node.append_child("ClInclude"); nodeAdded.append_attribute("Include").set_value(srcFile.c_str()); nodeAdded.append_child("Filter").append_child(pugi::node_pcdata).set_value(folder.c_str()); break; } case OBJC:{ ofLogError() << "objective c type not supported on vs for " << srcFile; break; } default:{ ofLogError() << "explicit source type " << type << " not supported yet on osx for " << srcFile; break; } } } }