1 /****************************************************************************** |
1 /****************************************************************************** |
2 * |
2 * |
3 * |
3 * |
4 * |
4 * |
5 * Copyright (C) 1997-2008 by Dimitri van Heesch. |
5 * Copyright (C) 1997-2010 by Dimitri van Heesch. |
6 * |
6 * |
7 * Permission to use, copy, modify, and distribute this software and its |
7 * Permission to use, copy, modify, and distribute this software and its |
8 * documentation under the terms of the GNU General Public License is hereby |
8 * documentation under the terms of the GNU General Public License is hereby |
9 * granted. No representations are made about the suitability of this software |
9 * granted. No representations are made about the suitability of this software |
10 * for any purpose. It is provided "as is" without express or implied warranty. |
10 * for any purpose. It is provided "as is" without express or implied warranty. |
602 void GroupDef::writeFiles(OutputList &ol,const QCString &title) |
602 void GroupDef::writeFiles(OutputList &ol,const QCString &title) |
603 { |
603 { |
604 // write list of files |
604 // write list of files |
605 if (fileList->count()>0) |
605 if (fileList->count()>0) |
606 { |
606 { |
607 ol.startMemberHeader(); |
607 ol.startMemberHeader("files"); |
608 ol.parseText(title); |
608 ol.parseText(title); |
609 ol.endMemberHeader(); |
609 ol.endMemberHeader(); |
610 ol.startMemberList(); |
610 ol.startMemberList(); |
611 FileDef *fd=fileList->first(); |
611 FileDef *fd=fileList->first(); |
612 while (fd) |
612 while (fd) |
643 void GroupDef::writeNestedGroups(OutputList &ol,const QCString &title) |
643 void GroupDef::writeNestedGroups(OutputList &ol,const QCString &title) |
644 { |
644 { |
645 // write list of groups |
645 // write list of groups |
646 if (groupList->count()>0) |
646 if (groupList->count()>0) |
647 { |
647 { |
648 ol.startMemberHeader(); |
648 ol.startMemberHeader("groups"); |
649 ol.parseText(title); |
649 ol.parseText(title); |
650 ol.endMemberHeader(); |
650 ol.endMemberHeader(); |
651 ol.startMemberList(); |
651 ol.startMemberList(); |
652 GroupDef *gd=groupList->first(); |
652 GroupDef *gd=groupList->first(); |
653 while (gd) |
653 while (gd) |
679 void GroupDef::writeDirs(OutputList &ol,const QCString &title) |
679 void GroupDef::writeDirs(OutputList &ol,const QCString &title) |
680 { |
680 { |
681 // write list of directories |
681 // write list of directories |
682 if (dirList->count()>0) |
682 if (dirList->count()>0) |
683 { |
683 { |
684 ol.startMemberHeader(); |
684 ol.startMemberHeader("dirs"); |
685 ol.parseText(title); |
685 ol.parseText(title); |
686 ol.endMemberHeader(); |
686 ol.endMemberHeader(); |
687 ol.startMemberList(); |
687 ol.startMemberList(); |
688 DirDef *dd=dirList->first(); |
688 DirDef *dd=dirList->first(); |
689 while (dd) |
689 while (dd) |
801 ol.endGroupHeader(); |
801 ol.endGroupHeader(); |
802 ol.parseText(theTranslator->trGeneratedAutomatically(Config_getString("PROJECT_NAME"))); |
802 ol.parseText(theTranslator->trGeneratedAutomatically(Config_getString("PROJECT_NAME"))); |
803 ol.popGeneratorState(); |
803 ol.popGeneratorState(); |
804 } |
804 } |
805 |
805 |
|
806 void GroupDef::writeSummaryLinks(OutputList &ol) |
|
807 { |
|
808 ol.pushGeneratorState(); |
|
809 ol.disableAllBut(OutputGenerator::Html); |
|
810 QListIterator<LayoutDocEntry> eli( |
|
811 LayoutDocManager::instance().docEntries(LayoutDocManager::Group)); |
|
812 LayoutDocEntry *lde; |
|
813 bool first=TRUE; |
|
814 for (eli.toFirst();(lde=eli.current());++eli) |
|
815 { |
|
816 if ((lde->kind()==LayoutDocEntry::GroupClasses && classSDict->declVisible()) || |
|
817 (lde->kind()==LayoutDocEntry::GroupNamespaces && namespaceSDict->declVisible()) || |
|
818 (lde->kind()==LayoutDocEntry::GroupFiles && fileList->count()>0) || |
|
819 (lde->kind()==LayoutDocEntry::GroupNestedGroups && groupList->count()>0) || |
|
820 (lde->kind()==LayoutDocEntry::GroupDirs && dirList->count()>0) |
|
821 ) |
|
822 { |
|
823 LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde; |
|
824 QCString label = lde->kind()==LayoutDocEntry::GroupClasses ? "nested-classes" : |
|
825 lde->kind()==LayoutDocEntry::GroupNamespaces ? "namespaces" : |
|
826 lde->kind()==LayoutDocEntry::GroupFiles ? "files" : |
|
827 lde->kind()==LayoutDocEntry::GroupNestedGroups ? "groups" : |
|
828 "dirs"; |
|
829 writeSummaryLink(ol,label,ls->title,first); |
|
830 } |
|
831 else if (lde->kind()==LayoutDocEntry::MemberDecl) |
|
832 { |
|
833 LayoutDocEntryMemberDecl *lmd = (LayoutDocEntryMemberDecl*)lde; |
|
834 MemberList * ml = getMemberList(lmd->type); |
|
835 if (ml && ml->declVisible()) |
|
836 { |
|
837 writeSummaryLink(ol,ml->listTypeAsString(),lmd->title,first); |
|
838 } |
|
839 } |
|
840 } |
|
841 if (!first) |
|
842 { |
|
843 ol.writeString(" </div>\n"); |
|
844 } |
|
845 ol.popGeneratorState(); |
|
846 } |
|
847 |
806 void GroupDef::writeDocumentation(OutputList &ol) |
848 void GroupDef::writeDocumentation(OutputList &ol) |
807 { |
849 { |
808 ol.pushGeneratorState(); |
850 ol.pushGeneratorState(); |
809 startFile(ol,getOutputFileBase(),name(),title); |
851 startFile(ol,getOutputFileBase(),name(),title); |
810 startTitle(ol,getOutputFileBase()); |
852 startTitle(ol,getOutputFileBase(),this); |
811 ol.parseText(title); |
853 ol.parseText(title); |
812 addGroupListToTitle(ol,this); |
854 addGroupListToTitle(ol,this); |
813 endTitle(ol,getOutputFileBase(),title); |
855 endTitle(ol,getOutputFileBase(),title); |
|
856 ol.startContents(); |
814 |
857 |
815 if (Doxygen::searchIndex) |
858 if (Doxygen::searchIndex) |
816 { |
859 { |
817 Doxygen::searchIndex->setCurrentDoc(title,getOutputFileBase()); |
860 Doxygen::searchIndex->setCurrentDoc(title,getOutputFileBase()); |
818 static QRegExp we("[a-zA-Z_][-a-zA-Z_0-9]*"); |
861 static QRegExp we("[a-zA-Z_][-a-zA-Z_0-9]*"); |