mirror of
https://github.com/jkriege2/JKQtPlotter.git
synced 2024-12-26 10:31:39 +08:00
improved styles-auto-doc-generation
This commit is contained in:
parent
aee3b23696
commit
55912ad931
@ -40,7 +40,7 @@ These are also linked into the JKQTPlotter library as Qt ressource into the subd
|
|||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
Here is a table with all available ready-made styles:
|
Here is a table with all available ready-made styles:
|
||||||
\htmlinclude styles.html
|
\include{doc} styles.dox
|
||||||
|
|
||||||
\see Classes are documented in \ref jkqtpplotter_styling_classes .
|
\see Classes are documented in \ref jkqtpplotter_styling_classes .
|
||||||
<br>See \ref JKQTPlotterStyling for a detailed example.
|
<br>See \ref JKQTPlotterStyling for a detailed example.
|
||||||
|
46
doc/htmlinclude/styles.dox
Normal file
46
doc/htmlinclude/styles.dox
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th>Style-file
|
||||||
|
<th>Screenshot
|
||||||
|
<th>Symbols
|
||||||
|
<tr>
|
||||||
|
<td><a href="https://github.com/jkriege2/JKQtPlotter/tree/master/lib/jkqtplotter/resources/styles/blackandwhite.ini"><code>:/JKQTPlotter/styles/blackandwhite.ini</code></a>
|
||||||
|
<td>\image html blackandwhite.ini.png
|
||||||
|
<td>\image html blackandwhite.ini.symbols.png
|
||||||
|
<tr>
|
||||||
|
<td><a href="https://github.com/jkriege2/JKQtPlotter/tree/master/lib/jkqtplotter/resources/styles/blueprint.ini"><code>:/JKQTPlotter/styles/blueprint.ini</code></a>
|
||||||
|
<td>\image html blueprint.ini.png
|
||||||
|
<td>\image html blueprint.ini.symbols.png
|
||||||
|
<tr>
|
||||||
|
<td><a href="https://github.com/jkriege2/JKQtPlotter/tree/master/lib/jkqtplotter/resources/styles/dark.ini"><code>:/JKQTPlotter/styles/dark.ini</code></a>
|
||||||
|
<td>\image html dark.ini.png
|
||||||
|
<td>\image html dark.ini.symbols.png
|
||||||
|
<tr>
|
||||||
|
<td><a href="https://github.com/jkriege2/JKQtPlotter/tree/master/lib/jkqtplotter/resources/styles/default.ini"><code>:/JKQTPlotter/styles/default.ini</code></a>
|
||||||
|
<td>\image html default.ini.png
|
||||||
|
<td>\image html default.ini.symbols.png
|
||||||
|
<tr>
|
||||||
|
<td><a href="https://github.com/jkriege2/JKQtPlotter/tree/master/lib/jkqtplotter/resources/styles/legacy_default_style.ini"><code>:/JKQTPlotter/styles/legacy_default_style.ini</code></a>
|
||||||
|
<td>\image html legacy_default_style.ini.png
|
||||||
|
<td>\image html legacy_default_style.ini.symbols.png
|
||||||
|
<tr>
|
||||||
|
<td><a href="https://github.com/jkriege2/JKQtPlotter/tree/master/lib/jkqtplotter/resources/styles/seaborn.ini"><code>:/JKQTPlotter/styles/seaborn.ini</code></a>
|
||||||
|
<td>\image html seaborn.ini.png
|
||||||
|
<td>\image html seaborn.ini.symbols.png
|
||||||
|
<tr>
|
||||||
|
<td><a href="https://github.com/jkriege2/JKQtPlotter/tree/master/lib/jkqtplotter/resources/styles/simple_arrowsaxes.ini"><code>:/JKQTPlotter/styles/simple_arrowsaxes.ini</code></a>
|
||||||
|
<td>\image html simple_arrowsaxes.ini.png
|
||||||
|
<td>\image html simple_arrowsaxes.ini.symbols.png
|
||||||
|
<tr>
|
||||||
|
<td><a href="https://github.com/jkriege2/JKQtPlotter/tree/master/lib/jkqtplotter/resources/styles/simple_axesoffset.ini"><code>:/JKQTPlotter/styles/simple_axesoffset.ini</code></a>
|
||||||
|
<td>\image html simple_axesoffset.ini.png
|
||||||
|
<td>\image html simple_axesoffset.ini.symbols.png
|
||||||
|
<tr>
|
||||||
|
<td><a href="https://github.com/jkriege2/JKQtPlotter/tree/master/lib/jkqtplotter/resources/styles/simple_axesoffset_plotbox.ini"><code>:/JKQTPlotter/styles/simple_axesoffset_plotbox.ini</code></a>
|
||||||
|
<td>\image html simple_axesoffset_plotbox.ini.png
|
||||||
|
<td>\image html simple_axesoffset_plotbox.ini.symbols.png
|
||||||
|
<tr>
|
||||||
|
<td><a href="https://github.com/jkriege2/JKQtPlotter/tree/master/lib/jkqtplotter/resources/styles/simple_gridandticks.ini"><code>:/JKQTPlotter/styles/simple_gridandticks.ini</code></a>
|
||||||
|
<td>\image html simple_gridandticks.ini.png
|
||||||
|
<td>\image html simple_gridandticks.ini.symbols.png
|
||||||
|
</table>
|
@ -1,3 +0,0 @@
|
|||||||
<table class="doxtable">
|
|
||||||
<tr><th>Style-file </th><th>Screenshot </th><th>Symbols </th></tr>
|
|
||||||
<tr><td><a href="https://github.com/jkriege2/JKQtPlotter/tree/master/lib/jkqtplotter/resources/styles/blackandwhite.ini"><code>:/JKQTPlotter/styles/blackandwhite.ini</code></a></td><td><div class="image"><img src="blackandwhite.ini.png" alt=""/></div></td><td><div class="image"><img src="blackandwhite.ini.symbols.png" alt=""/></div></td></tr> <tr><td><a href="https://github.com/jkriege2/JKQtPlotter/tree/master/lib/jkqtplotter/resources/styles/blueprint.ini"><code>:/JKQTPlotter/styles/blueprint.ini</code></a></td><td><div class="image"><img src="blueprint.ini.png" alt=""/></div></td><td><div class="image"><img src="blueprint.ini.symbols.png" alt=""/></div></td></tr> <tr><td><a href="https://github.com/jkriege2/JKQtPlotter/tree/master/lib/jkqtplotter/resources/styles/dark.ini"><code>:/JKQTPlotter/styles/dark.ini</code></a></td><td><div class="image"><img src="dark.ini.png" alt=""/></div></td><td><div class="image"><img src="dark.ini.symbols.png" alt=""/></div></td></tr> <tr><td><a href="https://github.com/jkriege2/JKQtPlotter/tree/master/lib/jkqtplotter/resources/styles/default.ini"><code>:/JKQTPlotter/styles/default.ini</code></a></td><td><div class="image"><img src="default.ini.png" alt=""/></div></td><td><div class="image"><img src="default.ini.symbols.png" alt=""/></div></td></tr> <tr><td><a href="https://github.com/jkriege2/JKQtPlotter/tree/master/lib/jkqtplotter/resources/styles/legacy_default_style.ini"><code>:/JKQTPlotter/styles/legacy_default_style.ini</code></a></td><td><div class="image"><img src="legacy_default_style.ini.png" alt=""/></div></td><td><div class="image"><img src="legacy_default_style.ini.symbols.png" alt=""/></div></td></tr> <tr><td><a href="https://github.com/jkriege2/JKQtPlotter/tree/master/lib/jkqtplotter/resources/styles/seaborn.ini"><code>:/JKQTPlotter/styles/seaborn.ini</code></a></td><td><div class="image"><img src="seaborn.ini.png" alt=""/></div></td><td><div class="image"><img src="seaborn.ini.symbols.png" alt=""/></div></td></tr> <tr><td><a href="https://github.com/jkriege2/JKQtPlotter/tree/master/lib/jkqtplotter/resources/styles/simple_arrowsaxes.ini"><code>:/JKQTPlotter/styles/simple_arrowsaxes.ini</code></a></td><td><div class="image"><img src="simple_arrowsaxes.ini.png" alt=""/></div></td><td><div class="image"><img src="simple_arrowsaxes.ini.symbols.png" alt=""/></div></td></tr> <tr><td><a href="https://github.com/jkriege2/JKQtPlotter/tree/master/lib/jkqtplotter/resources/styles/simple_axesoffset.ini"><code>:/JKQTPlotter/styles/simple_axesoffset.ini</code></a></td><td><div class="image"><img src="simple_axesoffset.ini.png" alt=""/></div></td><td><div class="image"><img src="simple_axesoffset.ini.symbols.png" alt=""/></div></td></tr> <tr><td><a href="https://github.com/jkriege2/JKQtPlotter/tree/master/lib/jkqtplotter/resources/styles/simple_axesoffset_plotbox.ini"><code>:/JKQTPlotter/styles/simple_axesoffset_plotbox.ini</code></a></td><td><div class="image"><img src="simple_axesoffset_plotbox.ini.png" alt=""/></div></td><td><div class="image"><img src="simple_axesoffset_plotbox.ini.symbols.png" alt=""/></div></td></tr> <tr><td><a href="https://github.com/jkriege2/JKQtPlotter/tree/master/lib/jkqtplotter/resources/styles/simple_gridandticks.ini"><code>:/JKQTPlotter/styles/simple_gridandticks.ini</code></a></td><td><div class="image"><img src="simple_gridandticks.ini.png" alt=""/></div></td><td><div class="image"><img src="simple_gridandticks.ini.symbols.png" alt=""/></div></td></tr></table>
|
|
@ -608,10 +608,10 @@ void plotStyleSymbols(JKQTBasePlotter& plotExtra, const JKQTBasePlotter& plot) {
|
|||||||
|
|
||||||
void doListStyles(const QDir& outputDir, const QDir& docoutputDir, int iconsize, QColor backgroundColor) {
|
void doListStyles(const QDir& outputDir, const QDir& docoutputDir, int iconsize, QColor backgroundColor) {
|
||||||
QDir dir(":/JKQTPlotter/styles/", "*.ini");
|
QDir dir(":/JKQTPlotter/styles/", "*.ini");
|
||||||
QFile fhtml(docoutputDir.absoluteFilePath("styles.html"));
|
QFile fhtml(docoutputDir.absoluteFilePath("styles.dox"));
|
||||||
fhtml.open(QFile::WriteOnly|QFile::Text);
|
fhtml.open(QFile::WriteOnly|QFile::Text);
|
||||||
QTextStream shtml(&fhtml);
|
QTextStream shtml(&fhtml);
|
||||||
shtml<<"<table class=\"doxtable\">\n <tr><th>Style-file </th><th>Screenshot </th><th>Symbols </th></tr>\n";
|
shtml<<"<table>\n <tr>\n <th>Style-file\n <th>Screenshot\n <th>Symbols\n";
|
||||||
for (auto& f: dir.entryList()) {
|
for (auto& f: dir.entryList()) {
|
||||||
qDebug()<<"plotting example for style "<<f;
|
qDebug()<<"plotting example for style "<<f;
|
||||||
|
|
||||||
@ -626,11 +626,10 @@ void doListStyles(const QDir& outputDir, const QDir& docoutputDir, int iconsize,
|
|||||||
plotStyleSymbols(plotExtra, plot);
|
plotStyleSymbols(plotExtra, plot);
|
||||||
plotExtra.grabPixelImage(QSize(plotExtra.getWidth(),plotExtra.getHeight()), false).copy(0,0,plotExtra.getWidth(),plotExtra.getHeight()).save(outputDir.absoluteFilePath(f+".symbols.png"), "png");
|
plotExtra.grabPixelImage(QSize(plotExtra.getWidth(),plotExtra.getHeight()), false).copy(0,0,plotExtra.getWidth(),plotExtra.getHeight()).save(outputDir.absoluteFilePath(f+".symbols.png"), "png");
|
||||||
|
|
||||||
shtml<<" <tr>"
|
shtml<<" <tr>\n"
|
||||||
<<"<td><a href=\"https://github.com/jkriege2/JKQtPlotter/tree/master/lib/jkqtplotter/resources/styles/"<<f<<"\"><code>"<<dir.absoluteFilePath(f)<<"</code></a></td>"
|
<<" <td><a href=\"https://github.com/jkriege2/JKQtPlotter/tree/master/lib/jkqtplotter/resources/styles/"<<f<<"\"><code>"<<dir.absoluteFilePath(f)<<"</code></a>\n"
|
||||||
<<"<td><div class=\"image\"><img src=\""<<f<<".png\" alt=\"\"/></div></td>"
|
<<" <td>\\image html "<<f<<".png\n"
|
||||||
<<"<td><div class=\"image\"><img src=\""<<f<<".symbols.png\" alt=\"\"/></div></td>"
|
<<" <td>\\image html "<<f<<".symbols.png\n";
|
||||||
<<"</tr>";
|
|
||||||
}
|
}
|
||||||
shtml<<"</table>";
|
shtml<<"</table>";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user