Warning, /frameworks/kapidox/docs/depdiagrams.md is written in an unsupported language. File is not indexed.
0001 Dependency diagrams {#depdiagrams} 0002 =================== 0003 0004 ## Introduction 0005 0006 In most case, you just want to call `kapidox` with the 0007 "--dependency-diagrams" option. However, if you want finer-grained control over 0008 diagram generation or want to work on its code, read on. 0009 0010 ## depdiagram tools 0011 0012 Dependency diagram generation is done using two tools: `src/depdiagram-prepare` 0013 and `src/depdiagram-generate`. The way you use it is as follows. 0014 0015 ### 1. Prepare dot files 0016 0017 You need to prepare Graphviz dot files for all frameworks with 0018 `src/depdiagram-prepare`. You can prepare dot files for all frameworks at once 0019 using: 0020 0021 depdiagram-prepare --all ~/src/frameworks ~/dots 0022 0023 This will generate many .dot files in ~/dots. 0024 0025 Or you can prepare dot files for a single framework with: 0026 0027 depdiagram-prepare --single ~/src/frameworks/myframework ~/dots 0028 0029 ### 2. Generate the diagrams 0030 0031 You can now generate the dependency diagrams with `src/depdiagram-generate`. 0032 This tool accepts a list of dot files and outputs a combined dot file to stdout. 0033 0034 Here is how to generate a dependency diagram for all the frameworks: 0035 0036 depdiagram-generate ~/dots/*.dot | dot -Tpng > kf5.png 0037 0038 The diagram might be very hard to read though. For complex diagrams, you may 0039 want to pipe the output through the `tred` tool: 0040 0041 depdiagram-generate ~/dots/*.dot | tred | dot -Tpng > kf5.png 0042 0043 You can also generate the diagram for one particular framework using the 0044 "--framework" option: 0045 0046 depdiagram-generate ~/dots/*.dot --framework kcrash | tred | dot -Tpng > kcrash.png 0047 0048 To include Qt libs, use the "--qt" option: 0049 0050 depdiagram-generate ~/dots/tier*/*/*.dot --framework kcrash --qt | tred | dot -Tpng > kcrash.png 0051 0052 And to include targets within the framework, use the "--detailed" option: 0053 0054 depdiagram-generate ~/dots/*.dot --framework kcrash --detailed | tred | dot -Tpng > kcrash.png 0055 0056 0057 ## Useful 3rd-party tools 0058 0059 `tred`, mentioned in the previous section, reduces clutter in dot files. 0060 0061 `xdot` can be used instead of `dot` to display the graph: 0062 0063 depdiagram-generate ~/dots/*.dot --framework kcrash --qt | tred | xdot 0064 0065 0066 ## Generating all diagrams at once 0067 0068 You can use the `depdiagram-generate-all` tool to generate diagrams for all 0069 frameworks at once: 0070 0071 depdiagram-generate-all ~/dots ~/pngs 0072 0073 This command creates two pngs for each framework: "$framework.png" and 0074 "$framework-simplified.png" (same diagram, ran through `tred`). It also creates a 0075 diagram for all of the frameworks, named "kf5.png".