void GroupDef::writeDetailedDocumentation(OutputList &ol) { if (!briefDescription().isEmpty() || !documentation().isEmpty()) { if (pageDict->count()!=countMembers()) // classical layout { ol.writeRuler(); ol.pushGeneratorState(); ol.disable(OutputGenerator::Latex); ol.disable(OutputGenerator::RTF); ol.writeAnchor(0,"_details"); ol.popGeneratorState(); ol.startGroupHeader(); ol.parseText(theTranslator->trDetailedDescription()); ol.endGroupHeader(); // repeat brief description if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) { ol.parseDoc(briefFile(),briefLine(),this,0,briefDescription(),FALSE,FALSE); ol.newParagraph(); } } // write documentation if (!documentation().isEmpty()) { ol.parseDoc(docFile(),docLine(),this,0,documentation()+"\n",TRUE,FALSE); } } }
void FileDef::writeDetailedDescription(OutputList &ol,const QCString &title) { if ((!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) || !documentation().isEmpty() || (Config_getBool("SOURCE_BROWSER") && getStartBodyLine()!=-1 && getBodyDef()) ) { ol.pushGeneratorState(); ol.disable(OutputGenerator::Html); ol.writeRuler(); ol.popGeneratorState(); ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Html); ol.writeAnchor(0,"details"); ol.popGeneratorState(); ol.startGroupHeader(); ol.parseText(title); ol.endGroupHeader(); ol.startTextBlock(); if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) { ol.parseDoc(briefFile(),briefLine(),this,0,briefDescription(),FALSE,FALSE); } if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF") && !documentation().isEmpty()) { ol.pushGeneratorState(); ol.disable(OutputGenerator::Man); ol.disable(OutputGenerator::RTF); // ol.newParagraph(); // FIXME:PARA ol.enableAll(); ol.disableAllBut(OutputGenerator::Man); ol.writeString("\n\n"); ol.popGeneratorState(); } if (!documentation().isEmpty()) { ol.parseDoc(docFile(),docLine(),this,0,documentation()+"\n",TRUE,FALSE); } //printf("Writing source ref for file %s\n",name().data()); if (Config_getBool("SOURCE_BROWSER")) { ol.startParagraph(); QCString refText = theTranslator->trDefinedInSourceFile(); int fileMarkerPos = refText.find("@0"); if (fileMarkerPos!=-1) // should always pass this. { ol.parseText(refText.left(fileMarkerPos)); //text left from marker 1 ol.writeObjectLink(0,getSourceFileBase(), 0,name()); ol.parseText(refText.right( refText.length()-fileMarkerPos-2)); // text right from marker 2 } ol.endParagraph(); } ol.endTextBlock(); } }
void PageDef::writePageDocumentation(OutputList &ol) { bool markdownEnabled = Doxygen::markdownSupport; if (getLanguage()==SrcLangExt_Markdown) { Doxygen::markdownSupport = TRUE; } ol.startTextBlock(); ol.generateDoc( docFile(), // fileName docLine(), // startLine this, // context 0, // memberdef documentation()+inbodyDocumentation(), // docStr TRUE, // index words FALSE // not an example ); ol.endTextBlock(); Doxygen::markdownSupport = markdownEnabled; if (hasSubPages()) { // for printed documentation we write subpages as section's of the // parent page. ol.pushGeneratorState(); ol.disableAll(); ol.enable(OutputGenerator::Latex); ol.enable(OutputGenerator::RTF); PageSDict::Iterator pdi(*m_subPageDict); PageDef *subPage=pdi.toFirst(); for (pdi.toFirst();(subPage=pdi.current());++pdi) { SectionInfo::SectionType sectionType = SectionInfo::Paragraph; switch (m_nestingLevel) { case 0: sectionType = SectionInfo::Page; break; case 1: sectionType = SectionInfo::Section; break; case 2: sectionType = SectionInfo::Subsection; break; case 3: sectionType = SectionInfo::Subsubsection; break; default: sectionType = SectionInfo::Paragraph; break; } QCString title = subPage->title(); if (title.isEmpty()) title = subPage->name(); ol.startSection(subPage->name(),title,sectionType); ol.parseText(title); ol.endSection(subPage->name(),sectionType); Doxygen::subpageNestingLevel++; subPage->writePageDocumentation(ol); Doxygen::subpageNestingLevel--; } ol.popGeneratorState(); } }
void Writer::removeIndex() const { QFile idxFile(indexFile); if (idxFile.exists()) idxFile.remove(); QFile docFile(documentFile); if (docFile.exists()) docFile.remove(); }
void GroupDef::writeDetailedDescription(OutputList &ol,const QCString &title) { if ((!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF)) || !documentation().isEmpty() || !inbodyDocumentation().isEmpty() ) { if (pageDict->count()!=countMembers()) // not only pages -> classical layout { ol.pushGeneratorState(); ol.disable(OutputGenerator::Html); ol.writeRuler(); ol.popGeneratorState(); ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Html); ol.writeAnchor(0,"details"); ol.popGeneratorState(); ol.startGroupHeader(); ol.parseText(title); ol.endGroupHeader(); } // repeat brief description if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF)) { ol.generateDoc(briefFile(),briefLine(),this,0,briefDescription(),FALSE,FALSE); } // write separator between brief and details if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF) && !documentation().isEmpty()) { ol.pushGeneratorState(); ol.disable(OutputGenerator::Man); ol.disable(OutputGenerator::RTF); // ol.newParagraph(); // FIXME:PARA ol.enableAll(); ol.disableAllBut(OutputGenerator::Man); ol.enable(OutputGenerator::Latex); ol.writeString("\n\n"); ol.popGeneratorState(); } // write detailed documentation if (!documentation().isEmpty()) { ol.generateDoc(docFile(),docLine(),this,0,documentation()+"\n",TRUE,FALSE); } // write inbody documentation if (!inbodyDocumentation().isEmpty()) { ol.generateDoc(inbodyFile(),inbodyLine(),this,0,inbodyDocumentation()+"\n",TRUE,FALSE); } } }
void Settings::ParseInitConfig() { QFile launcherFile(DirectoryManager::GetInstance()->GetConfigDir() + InitFile); if (!launcherFile.open(QFile::ReadOnly)) { Logger::GetInstance()->AddLog(tr("Error read launcher config")); return; } YAML::Parser launcherParser; std::istringstream launcherStream(launcherFile.readAll().data()); launcherParser.Load(launcherStream); launcherFile.close(); YAML::Node launcherSettings; if (!launcherParser.GetNextDocument(launcherSettings)) { Logger::GetInstance()->AddLog(tr("Error parse launcher settings.")); return; } AppsConfig newConfig; const YAML::Node* pTimer = launcherSettings.FindValue(CONFIG_UPDATE_INTERVAL); if (pTimer) { QString interval; setString(interval, pTimer); m_nUpdateTimer = interval.toInt() * 60 * 1000; } const YAML::Node* Launcher = launcherSettings.FindValue(LAUNCHER); if (Launcher) { const YAML::Node* LauncherVer = Launcher->FindValue(LAUNCHER_VER); if (LauncherVer) setString(newConfig.m_Launcher.m_Version, LauncherVer); const YAML::Node* LauncherUrl = Launcher->FindValue(LAUNCHER_UPDATE_URL); if (LauncherUrl) setString(newConfig.m_Launcher.m_Url, LauncherUrl); } QFile docFile(DirectoryManager::GetInstance()->GetDocumentsDirectory() + InitFile); if(docFile.open(QFile::ReadOnly)) { YAML::Parser docParser; std::istringstream docStream(docFile.readAll().data()); docParser.Load(docStream); docFile.close(); YAML::Node docSettings; docParser.GetNextDocument(docSettings); ParseAppConfig(&docSettings, STABLE, newConfig.m_Stable); ParseAppConfig(&docSettings, QA, newConfig.m_Test); ParseAppConfig(&docSettings, DEVELOPMENT, newConfig.m_Development); ParseAppConfig(&docSettings, DEPENDENCIES, newConfig.m_Dependencies); } m_Config = newConfig; }
void NamespaceDef::findSectionsInDocumentation() { docFindSections(documentation(),this,0,docFile()); MemberGroupSDict::Iterator mgli(*memberGroupSDict); MemberGroup *mg; for (;(mg=mgli.current());++mgli) { mg->findSectionsInDocumentation(); } decDefineMembers.findSectionsInDocumentation(); decProtoMembers.findSectionsInDocumentation(); decTypedefMembers.findSectionsInDocumentation(); decEnumMembers.findSectionsInDocumentation(); decFuncMembers.findSectionsInDocumentation(); decVarMembers.findSectionsInDocumentation(); }
/** * Loads the document specified by name in the constructor and displays it * in the text browser area. * If the specified file can not be found, then a failure message will be * shown instead of the HTML text. */ void HtmlInfoWidget::updateDocument() { QString documentText = ""; QFile docFile(mDocumentFileName); if(!docFile.open(QIODevice::ReadOnly | QIODevice::Text)){ documentText.append("Could not find text file [").append(mDocumentFileName) .append("]!"); } else { QTextStream in(&docFile); QString nextLine = in.readAll(); documentText.append(nextLine); } mDocumentBrowser->setText(documentText); docFile.close(); }
void DirDef::writeDetailedDescription(OutputList &ol,const QCString &title) { if ((!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) || !documentation().isEmpty()) { ol.pushGeneratorState(); ol.disable(OutputGenerator::Html); ol.writeRuler(); ol.popGeneratorState(); ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Html); ol.writeAnchor(0,"details"); ol.popGeneratorState(); ol.startGroupHeader(); ol.parseText(title); ol.endGroupHeader(); // repeat brief description if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) { ol.generateDoc(briefFile(),briefLine(),this,0,briefDescription(),FALSE,FALSE); } // separator between brief and details if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF") && !documentation().isEmpty()) { ol.pushGeneratorState(); ol.disable(OutputGenerator::Man); ol.disable(OutputGenerator::RTF); // ol.newParagraph(); // FIXME:PARA ol.enableAll(); ol.disableAllBut(OutputGenerator::Man); ol.enable(OutputGenerator::Latex); ol.writeString("\n\n"); ol.popGeneratorState(); } // write documentation if (!documentation().isEmpty()) { ol.generateDoc(docFile(),docLine(),this,0,documentation()+"\n",TRUE,FALSE); } } }
void NamespaceDef::findSectionsInDocumentation() { docFindSections(documentation(),this,0,docFile()); MemberGroupSDict::Iterator mgli(*memberGroupSDict); MemberGroup *mg; for (; (mg=mgli.current()); ++mgli) { mg->findSectionsInDocumentation(); } QListIterator<MemberList> mli(m_memberLists); MemberList *ml; for (mli.toFirst(); (ml=mli.current()); ++mli) { if (ml->listType()&MemberListType_declarationLists) { ml->findSectionsInDocumentation(); } } }
void NamespaceDef::writeDetailedDescription(OutputList &ol,const QCString &title) { if (hasDetailedDescription()) { ol.pushGeneratorState(); ol.disable(OutputGenerator::Html); ol.writeRuler(); ol.popGeneratorState(); ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Html); ol.writeAnchor(0,"details"); ol.popGeneratorState(); ol.startGroupHeader(); ol.parseText(title); ol.endGroupHeader(); ol.startTextBlock(); if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF)) { ol.generateDoc(briefFile(),briefLine(),this,0,briefDescription(),FALSE,FALSE); } if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF) && !documentation().isEmpty()) { ol.pushGeneratorState(); ol.disable(OutputGenerator::Man); ol.disable(OutputGenerator::RTF); //ol.newParagraph(); // FIXME:PARA ol.enableAll(); ol.disableAllBut(OutputGenerator::Man); ol.enable(OutputGenerator::Latex); ol.writeString("\n\n"); ol.popGeneratorState(); } if (!documentation().isEmpty()) { ol.generateDoc(docFile(),docLine(),this,0,documentation()+"\n",TRUE,FALSE); } ol.endTextBlock(); } }
void NamespaceDef::writeDetailedDocumentation(OutputList &ol) { if ((!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) || !documentation().isEmpty()) { ol.writeRuler(); ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Html); //bool latexOn = ol.isEnabled(OutputGenerator::Latex); //if (latexOn) ol.disable(OutputGenerator::Latex); ol.writeAnchor(0,"_details"); //if (latexOn) ol.enable(OutputGenerator::Latex); ol.popGeneratorState(); ol.startGroupHeader(); ol.parseText(theTranslator->trDetailedDescription()); ol.endGroupHeader(); ol.startTextBlock(); if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) { ol.parseDoc(briefFile(),briefLine(),this,0,briefDescription(),FALSE,FALSE); } if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF") && !documentation().isEmpty()) { ol.pushGeneratorState(); ol.disable(OutputGenerator::Man); ol.newParagraph(); ol.enableAll(); ol.disableAllBut(OutputGenerator::Man); ol.writeString("\n\n"); ol.popGeneratorState(); } if (!documentation().isEmpty()) { ol.parseDoc(docFile(),docLine(),this,0,documentation()+"\n",TRUE,FALSE); ol.newParagraph(); } ol.endTextBlock(); } }
void Image::createImages(uint typeId, QColor color) { QDomDocument doc; QFile docFile(QString("graphics/objects/%1/images_%1.xml").arg(typeId)); doc.setContent(&docFile); QDomElement rootElement = doc.documentElement(); QDomElement buildElement = rootElement.firstChildElement("build"); QDomElement liveElement = rootElement.firstChildElement("live"); QDomElement deadElement = rootElement.firstChildElement("dead"); QDomElement movementElement = rootElement.firstChildElement("move"); uint movementWidth = movementElement.attribute("width", "1").toUInt(); uint movementHeight = movementElement.attribute("height", "1").toUInt(); getMovementPictures(typeId, movementWidth, movementHeight); ticksPerFrameMovement = movementElement.attribute("ticksPerFrame", "1").toUInt(); getStateImages(typeId, ObjectState::BUILD, buildElement, color); getStateImages(typeId, ObjectState::LIVE, liveElement, color); getStateImages(typeId, ObjectState::DEAD, deadElement, color); }
void PageDef::writeDocumentation(OutputList &ol) { static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW"); //outputList->disable(OutputGenerator::Man); QCString pageName,manPageName; pageName = escapeCharsInString(name(),FALSE,TRUE); manPageName = escapeCharsInString(name(),TRUE,TRUE); //printf("PageDef::writeDocumentation: %s\n",getOutputFileBase().data()); ol.pushGeneratorState(); //1.{ if (m_nestingLevel>0 //&& // a sub page //(Doxygen::mainPage==0 || getOuterScope()!=Doxygen::mainPage) // and not a subpage of the mainpage ) { // do not generate sub page output for RTF and LaTeX, as these are // part of their parent page ol.disableAll(); ol.enable(OutputGenerator::Man); ol.enable(OutputGenerator::Html); } ol.pushGeneratorState(); //2.{ ol.disableAllBut(OutputGenerator::Man); startFile(ol,getOutputFileBase(),manPageName,title(),HLI_Pages,!generateTreeView); ol.enableAll(); ol.disable(OutputGenerator::Man); startFile(ol,getOutputFileBase(),pageName,title(),HLI_Pages,!generateTreeView); ol.popGeneratorState(); //2.} if (!generateTreeView) { if (getOuterScope()!=Doxygen::globalScope && !Config_getBool("DISABLE_INDEX")) { getOuterScope()->writeNavigationPath(ol); } ol.endQuickIndices(); } SectionInfo *si=Doxygen::sectionDict->find(name()); // save old generator state and write title only to Man generator ol.pushGeneratorState(); //2.{ ol.disableAllBut(OutputGenerator::Man); ol.startTitleHead(manPageName); ol.endTitleHead(manPageName, manPageName); if (si) { ol.generateDoc(docFile(),docLine(),this,0,si->title,TRUE,FALSE,0,TRUE,FALSE); ol.endSection(si->label,si->type); } ol.popGeneratorState(); //2.} // for Latex the section is already generated as a chapter in the index! ol.pushGeneratorState(); //2.{ ol.disable(OutputGenerator::Latex); ol.disable(OutputGenerator::RTF); ol.disable(OutputGenerator::Man); if (!title().isEmpty() && !name().isEmpty() && si!=0) { //ol.startSection(si->label,si->title,si->type); startTitle(ol,getOutputFileBase(),this); ol.generateDoc(docFile(),docLine(),this,0,si->title,TRUE,FALSE,0,TRUE,FALSE); //stringToSearchIndex(getOutputFileBase(), // theTranslator->trPage(TRUE,TRUE)+" "+si->title, // si->title); //ol.endSection(si->label,si->type); endTitle(ol,getOutputFileBase(),name()); } ol.startContents(); ol.popGeneratorState(); //2.} if (m_showToc && hasSections()) { writeToc(ol); } writePageDocumentation(ol); if (generateTreeView && getOuterScope()!=Doxygen::globalScope && !Config_getBool("DISABLE_INDEX")) { ol.endContents(); endFileWithNavPath(getOuterScope(),ol); } else { endFile(ol); } ol.popGeneratorState(); //1.} if (!Config_getString("GENERATE_TAGFILE").isEmpty()) { bool found = name()=="citelist"; QDictIterator<RefList> rli(*Doxygen::xrefLists); RefList *rl; for (rli.toFirst();(rl=rli.current()) && !found;++rli) { if (rl->listName()==name()) { found=TRUE; break; } } if (!found) // not one of the generated related pages { Doxygen::tagFile << " <compound kind=\"page\">" << endl; Doxygen::tagFile << " <name>" << name() << "</name>" << endl; Doxygen::tagFile << " <title>" << convertToXML(title()) << "</title>" << endl; Doxygen::tagFile << " <filename>" << getOutputFileBase() << "</filename>" << endl; writeDocAnchorsToTagFile(); Doxygen::tagFile << " </compound>" << endl; } } Doxygen::indexList->addIndexItem(this,0,0,filterTitle(title())); }
void PageDef::findSectionsInDocumentation() { docFindSections(documentation(),this,0,docFile()); }
void PageDef::writeDocumentation(OutputList &ol) { static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW); //outputList->disable(OutputGenerator::Man); QCString pageName,manPageName; pageName = escapeCharsInString(name(),FALSE,TRUE); manPageName = escapeCharsInString(name(),TRUE,TRUE); //printf("PageDef::writeDocumentation: %s\n",getOutputFileBase().data()); ol.pushGeneratorState(); //1.{ if (m_nestingLevel>0 //&& // a sub page //(Doxygen::mainPage==0 || getOuterScope()!=Doxygen::mainPage) // and not a subpage of the mainpage ) { // do not generate sub page output for RTF and LaTeX, as these are // part of their parent page ol.disableAll(); ol.enable(OutputGenerator::Man); ol.enable(OutputGenerator::Html); } ol.pushGeneratorState(); //2.{ ol.disableAllBut(OutputGenerator::Man); startFile(ol,getOutputFileBase(),manPageName,title(),HLI_Pages,!generateTreeView); ol.enableAll(); ol.disable(OutputGenerator::Man); startFile(ol,getOutputFileBase(),pageName,title(),HLI_Pages,!generateTreeView); ol.popGeneratorState(); //2.} if (!generateTreeView) { if (getOuterScope()!=Doxygen::globalScope && !Config_getBool(DISABLE_INDEX)) { getOuterScope()->writeNavigationPath(ol); } ol.endQuickIndices(); } SectionInfo *si=Doxygen::sectionDict->find(name()); // save old generator state and write title only to Man generator ol.pushGeneratorState(); //2.{ ol.disableAllBut(OutputGenerator::Man); ol.startTitleHead(manPageName); ol.endTitleHead(manPageName, manPageName); if (si) { ol.generateDoc(docFile(),docLine(),this,0,si->title,TRUE,FALSE,0,TRUE,FALSE); ol.endSection(si->label,si->type); } ol.popGeneratorState(); //2.} // for Latex the section is already generated as a chapter in the index! ol.pushGeneratorState(); //2.{ ol.disable(OutputGenerator::Latex); ol.disable(OutputGenerator::RTF); ol.disable(OutputGenerator::Man); if (!title().isEmpty() && !name().isEmpty() && si!=0) { //ol.startSection(si->label,si->title,si->type); startTitle(ol,getOutputFileBase(),this); ol.generateDoc(docFile(),docLine(),this,0,si->title,TRUE,FALSE,0,TRUE,FALSE); //stringToSearchIndex(getOutputFileBase(), // theTranslator->trPage(TRUE,TRUE)+" "+si->title, // si->title); //ol.endSection(si->label,si->type); endTitle(ol,getOutputFileBase(),name()); } ol.startContents(); ol.popGeneratorState(); //2.} if (m_showToc && hasSections()) { writeToc(ol); } writeGeneratedFromFile(ol, this->getDefFileName()); writePageDocumentation(ol); if (generateTreeView && getOuterScope()!=Doxygen::globalScope && !Config_getBool(DISABLE_INDEX)) { ol.endContents(); endFileWithNavPath(getOuterScope(),ol); } else { endFile(ol); } ol.popGeneratorState(); //1.} Doxygen::indexList->addIndexItem(this,0,0,filterTitle(title())); }