Example #1
0
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);
        }
    }
}
Example #2
0
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();
  }
}
Example #3
0
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);
    }
  }
}
Example #4
0
/**
 * Reimplemented from UMLWidget::updateTextItemGroups to update
 * texts and their properties.
 */
void NoteWidget::updateTextItemGroups()
{
    TextItemGroup *grp = textItemGroupAt(GroupIndex);
    grp->setTextItemCount(TextItemCount);

    TextItem *diagramLinkItem = grp->textItemAt(DiagramLinkItemIndex);
    diagramLinkItem->setExplicitVisibility(false);
    //FIXME: Fixe diagram link drawing

    TextItem *noteTypeItem = grp->textItemAt(NoteTypeItemIndex);
    if (m_noteType == NoteWidget::PreCondition) {
        noteTypeItem->setText(i18n("<< precondition >>"));
        noteTypeItem->setExplicitVisibility(true);
    }
    else if (m_noteType == NoteWidget::PostCondition) {
        noteTypeItem->setText(i18n("<< postcondition >>"));
        noteTypeItem->setExplicitVisibility(true);
    }
    else if (m_noteType == NoteWidget::Transformation) {
        noteTypeItem->setText(i18n("<< transformation >>"));
        noteTypeItem->setExplicitVisibility(true);
    }
    else { // = NoteWidget::Normal
        noteTypeItem->setExplicitVisibility(false);
    }

    TextItem *noteTextItem = grp->textItemAt(NoteTextItemIndex);
    noteTextItem->setText(documentation());

    UMLWidget::updateTextItemGroups();
}
Example #5
0
 void GasBlender::createActions()
 {
     newAct = new QAction(tr("&New"), this);
     //     newAct->setIcon(QIcon(":/images/new.png"));     
     newAct->setShortcuts(QKeySequence::New);
     //newAct->setStatusTip(tr("Create a new file"));
     connect(newAct, SIGNAL(triggered()), this, SLOT(newFile()));

     aboutAct = new QAction(tr("&About"),this);
     // aboutAct->setStatusTip(tr("Show the application's About box"));
     connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));

     manualAct = new QAction(tr("&Manual"),this);
     // aboutAct->setStatusTip(tr("Show the application's About box"));
     connect(manualAct, SIGNAL(triggered()), this, SLOT(manual()));

     documentationAct = new QAction(tr("&Documentation"),this);
     // aboutAct->setStatusTip(tr("Show the application's About box"));
     connect(documentationAct, SIGNAL(triggered()), this, SLOT(documentation()));


     //     aboutQtAct = new QAction(tr("About &Qt"), this);
     //aboutQtAct->setStatusTip(tr("Show the Qt library's About box"));
     //connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));

     quitAct = new QAction(tr("&Quit"), this);
     quitAct->setShortcuts(QKeySequence::Quit);
     //     quitAct->setStatusTip(tr("Exit the application"));
     connect(quitAct, SIGNAL(triggered()), this, SLOT(close()));
 }
Example #6
0
int ServerRunner::run() {

    if (stopAfterExecutingOptions_()) return 0;

    try {
        PsiServer psiServer(
            options_["address"].as<std::string>(),
            options_["port"].as<std::string>(),
            options_["threads"].as<std::string>(),
            rootDir_.string()
        );

        std::cout << psiServer.info();

        // register all websites
        IndexSite index(psiServer);
        std::string opts = annotatorOptions_.empty() ? DEFAULT_PIPE : annotatorOptionsAsString_();
        PipeSite pipe(psiServer, opts, DEFAULT_TEXT);
        HelpSite help(psiServer);
        JsonSite json(psiServer);
        ProcessorDocumentationSite documentation(psiServer);

        // run server
        psiServer.run();
    }
    catch (std::exception& e) {
        ERROR("Exception: " << e.what());
    }

    return 0;
}
Example #7
0
void GroupDef::writeBriefDescription(OutputList &ol)
{
  if (!briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
  {
    ol.startParagraph();
    ol.parseDoc(briefFile(),briefLine(),this,0,
                briefDescription(),TRUE,FALSE,0,TRUE,FALSE);
    ol.pushGeneratorState();
    ol.disable(OutputGenerator::RTF);
    ol.writeString(" \n");
    ol.enable(OutputGenerator::RTF);

    if (Config_getBool("REPEAT_BRIEF") ||
        !documentation().isEmpty()
       )
    {
      ol.disableAllBut(OutputGenerator::Html);
      ol.startTextLink(0,"details");
      ol.parseText(theTranslator->trMore());
      ol.endTextLink();
    }
    ol.popGeneratorState();
    ol.endParagraph();
  }
}
Example #8
0
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();
  }
}
Example #9
0
/**
 * Reimplemented from UMLWidget::saveToXMI to save SignalWidget
 * to XMI.
 */
void SignalWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement )
{
    QDomElement signalElement = qDoc.createElement( "signalwidget" );
    UMLWidget::saveToXMI( qDoc, signalElement );
    signalElement.setAttribute( "signalname", name() );
    signalElement.setAttribute( "documentation", documentation() );
    signalElement.setAttribute( "signaltype", m_signalType );
    qElement.appendChild( signalElement );
}
Example #10
0
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);
    }
  }
}
Example #11
0
/**
 * Saves the widget to the "preconditionwidget" XMI element.
 */
void PreconditionWidget::saveToXMI(QDomDocument& qDoc, QDomElement& qElement)
{
    QDomElement preconditionElement = qDoc.createElement(QLatin1String("preconditionwidget"));
    UMLWidget::saveToXMI(qDoc, preconditionElement);

    preconditionElement.setAttribute(QLatin1String("widgetaid"), Uml::ID::toString(m_objectWidget->localID()));
    preconditionElement.setAttribute(QLatin1String("preconditionname"), name());
    preconditionElement.setAttribute(QLatin1String("documentation"), documentation());
    qElement.appendChild(preconditionElement);
}
Example #12
0
/**
 * Saves to the "notewidget" XMI element.
 */
void NoteWidget::saveToXMI(QDomDocument & qDoc, QDomElement & qElement)
{
    QDomElement noteElement = qDoc.createElement(QLatin1String("notewidget"));
    UMLWidget::saveToXMI(qDoc, noteElement);
    noteElement.setAttribute(QLatin1String("text"), documentation());
    if (m_diagramLink != Uml::ID::None)
        noteElement.setAttribute(QLatin1String("diagramlink"), Uml::ID::toString(m_diagramLink));
    noteElement.setAttribute(QLatin1String("noteType"), m_noteType);
    qElement.appendChild(noteElement);
}
Example #13
0
/**
 * Saves the widget to the "activitywidget" XMI element.
 */
void ActivityWidget::saveToXMI(QDomDocument & qDoc, QDomElement & qElement)
{
    QDomElement activityElement = qDoc.createElement(QLatin1String("activitywidget"));
    UMLWidget::saveToXMI(qDoc, activityElement);
    activityElement.setAttribute(QLatin1String("activityname"), name());
    activityElement.setAttribute(QLatin1String("documentation"), documentation());
    activityElement.setAttribute(QLatin1String("precondition"), preconditionText());
    activityElement.setAttribute(QLatin1String("postcondition"), postconditionText());
    activityElement.setAttribute(QLatin1String("activitytype"), m_activityType);
    qElement.appendChild(activityElement);
}
Example #14
0
/**
 * Reimplemented from UMLWidget::saveToXMI to save note widget
 * into XMI.
 */
void NoteWidget::saveToXMI(QDomDocument& qDoc, QDomElement& qElement)
{
    QDomElement noteElement = qDoc.createElement( "notewidget" );
    UMLWidget::saveToXMI( qDoc, noteElement );
    noteElement.setAttribute("text", documentation());
    if (m_diagramLink != Uml::id_None) {
        noteElement.setAttribute( "diagramlink", ID2STR(m_diagramLink) );
    }
    noteElement.setAttribute( "noteType", m_noteType);
    qElement.appendChild(noteElement);
}
Example #15
0
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();
  }
}
Example #17
0
void TestManPageModel::testDocumentation()
{
    ManPageDocumentation documentation("dlopen", QUrl("man: (3)/dlmopen"));
    QSignalSpy spy(&documentation, SIGNAL(descriptionChanged()));
    QVERIFY(spy.wait());

    const QString description = documentation.description();
    if (!description.isEmpty()) {
        qDebug() << description;
        // check that we've found the correct page by checking some references
        QVERIFY(description.contains("dlclose"));
        QVERIFY(description.contains("dlerror"));
        QVERIFY(description.contains("dlopen"));
    }
}
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();
}
Example #19
0
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();
        }
    }
}
Example #20
0
/**
 * Overrides method from UMLWidget.
 */
QSizeF NoteWidget::minimumSize() const
{
    int width = 60;
    int height = 30;
    const QFontMetrics &fm = getFontMetrics(FT_NORMAL);
    const int textWidth = fm.width(documentation());
    if (m_noteType == PreCondition) {
        const int widthtemp = fm.width(QLatin1String("<< precondition >>"));
        width = textWidth > widthtemp ? textWidth : widthtemp;
        width += 10;
    }
    else if (m_noteType == PostCondition) {
        const int widthtemp = fm.width(QLatin1String("<< postcondition >>"));
        width = textWidth > widthtemp ? textWidth : widthtemp;
        width += 10;
    }
    else if (m_noteType == Transformation) {
        const int widthtemp = fm.width(QLatin1String("<< transformation >>"));
        width = textWidth > widthtemp ? textWidth : widthtemp;
        width += 10;
    }
    return QSizeF(width, height);
}
Example #21
0
void NamespaceDef::writeBriefDescription(OutputList &ol)
{
  if (!briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
  {
    DocRoot *rootNode = validatingParseDoc(briefFile(),briefLine(),this,0,
                        briefDescription(),TRUE,FALSE,0,TRUE,FALSE);
    if (rootNode && !rootNode->isEmpty())
    {
      ol.startParagraph();
      ol.writeDoc(rootNode,this,0);
      ol.pushGeneratorState();
      ol.disable(OutputGenerator::RTF);
      ol.writeString(" \n");
      ol.enable(OutputGenerator::RTF);

      if (Config_getBool("REPEAT_BRIEF") ||
          !documentation().isEmpty()
         )
      {
        ol.disableAllBut(OutputGenerator::Html);
        ol.startTextLink(0,"details");
        ol.parseText(theTranslator->trMore());
        ol.endTextLink();
      }
      ol.popGeneratorState();
      ol.endParagraph();
    }
    delete rootNode;

    // FIXME:PARA
    //ol.pushGeneratorState();
    //ol.disable(OutputGenerator::RTF);
    //ol.newParagraph();
    //ol.popGeneratorState();
  }
  ol.writeSynopsis();
}
Example #22
0
void DirDef::writeBriefDescription(OutputList &ol)
{
  if (hasBriefDescription())
  {
    DocRoot *rootNode = validatingParseDoc(
         briefFile(),briefLine(),this,0,briefDescription(),TRUE,FALSE);
    if (rootNode && !rootNode->isEmpty())
    {
      ol.startParagraph();
      ol.pushGeneratorState();
      ol.disableAllBut(OutputGenerator::Man);
      ol.writeString(" - ");
      ol.popGeneratorState();
      ol.writeDoc(rootNode,this,0);
      ol.pushGeneratorState();
      ol.disable(OutputGenerator::RTF);
      ol.writeString(" \n");
      ol.enable(OutputGenerator::RTF);

      if (Config_getBool(REPEAT_BRIEF) ||
          !documentation().isEmpty()
         )
      {
        ol.disableAllBut(OutputGenerator::Html);
        ol.startTextLink(0,"details");
        ol.parseText(theTranslator->trMore());
        ol.endTextLink();
      }
      ol.popGeneratorState();

      ol.endParagraph();
    }
    delete rootNode;
  }
  ol.writeSynopsis();
}
Example #23
0
    }
    return QSizeF(width, height);
}

/**
 * Calculate content related size of widget.
 * Overrides method from UMLWidget.
 */
QSizeF NoteWidget::calculateSize(bool withExtensions /* = true */) const
{
    Q_UNUSED(withExtensions)
    int width = this->width();
    int height = this->height();
    const QFontMetrics &fm = getFontMetrics(FT_NORMAL);
    const int margin = fm.width(QLatin1String("W"));
    QSize size = fm.size (0, documentation());
    const int textWidth = size.width();
    if (m_noteType == PreCondition) {
        const int widthtemp = fm.width(QLatin1String("<< precondition >>"));
        width = textWidth > widthtemp ? textWidth : widthtemp;
        width += 2 * margin;
    }
    else if (m_noteType == PostCondition) {
        const int widthtemp = fm.width(QLatin1String("<< postcondition >>"));
        width = textWidth > widthtemp ? textWidth : widthtemp;
        width += 2 * margin;
    }
    else if (m_noteType == Transformation) {
        const int widthtemp = fm.width(QLatin1String("<< transformation >>"));
        width = textWidth > widthtemp ? textWidth : widthtemp;
        width += 2 * margin;
Example #24
0
bool DirDef::hasDetailedDescription() const
{
  static bool repeatBrief = Config_getBool(REPEAT_BRIEF);
  return (!briefDescription().isEmpty() && repeatBrief) || !documentation().isEmpty();
}
Example #25
0
bool NamespaceDef::hasDetailedDescription() const
{
    static bool repeatBrief = Config_getBool("REPEAT_BRIEF");
    return ((!briefDescription().isEmpty() && repeatBrief) ||
            !documentation().isEmpty());
}
Example #26
0
void PageDef::findSectionsInDocumentation()
{
  docFindSections(documentation(),this,0,docFile());
}