From 55912ad93151a7d3f074e05201e0d90cca47ae6e Mon Sep 17 00:00:00 2001 From: jkriege2 Date: Sun, 2 Jul 2023 23:19:05 +0200 Subject: [PATCH] improved styles-auto-doc-generation --- doc/dox/jkqtplotter_styling.dox | 2 +- doc/htmlinclude/styles.dox | 46 +++++++++++++++++++ doc/htmlinclude/styles.html | 3 -- .../jkqtplotter_doc_imagegenerator.cpp | 13 +++--- 4 files changed, 53 insertions(+), 11 deletions(-) create mode 100644 doc/htmlinclude/styles.dox delete mode 100644 doc/htmlinclude/styles.html diff --git a/doc/dox/jkqtplotter_styling.dox b/doc/dox/jkqtplotter_styling.dox index 5c9375be1b..5240db6b61 100644 --- a/doc/dox/jkqtplotter_styling.dox +++ b/doc/dox/jkqtplotter_styling.dox @@ -40,7 +40,7 @@ These are also linked into the JKQTPlotter library as Qt ressource into the subd \endcode 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 \ref JKQTPlotterStyling for a detailed example. diff --git a/doc/htmlinclude/styles.dox b/doc/htmlinclude/styles.dox new file mode 100644 index 0000000000..0ea49dbc47 --- /dev/null +++ b/doc/htmlinclude/styles.dox @@ -0,0 +1,46 @@ + + + + + + + + + + + + +
Style-file + Screenshot + Symbols +
:/JKQTPlotter/styles/blackandwhite.ini + \image html blackandwhite.ini.png + \image html blackandwhite.ini.symbols.png +
:/JKQTPlotter/styles/blueprint.ini + \image html blueprint.ini.png + \image html blueprint.ini.symbols.png +
:/JKQTPlotter/styles/dark.ini + \image html dark.ini.png + \image html dark.ini.symbols.png +
:/JKQTPlotter/styles/default.ini + \image html default.ini.png + \image html default.ini.symbols.png +
:/JKQTPlotter/styles/legacy_default_style.ini + \image html legacy_default_style.ini.png + \image html legacy_default_style.ini.symbols.png +
:/JKQTPlotter/styles/seaborn.ini + \image html seaborn.ini.png + \image html seaborn.ini.symbols.png +
:/JKQTPlotter/styles/simple_arrowsaxes.ini + \image html simple_arrowsaxes.ini.png + \image html simple_arrowsaxes.ini.symbols.png +
:/JKQTPlotter/styles/simple_axesoffset.ini + \image html simple_axesoffset.ini.png + \image html simple_axesoffset.ini.symbols.png +
:/JKQTPlotter/styles/simple_axesoffset_plotbox.ini + \image html simple_axesoffset_plotbox.ini.png + \image html simple_axesoffset_plotbox.ini.symbols.png +
:/JKQTPlotter/styles/simple_gridandticks.ini + \image html simple_gridandticks.ini.png + \image html simple_gridandticks.ini.symbols.png +
\ No newline at end of file diff --git a/doc/htmlinclude/styles.html b/doc/htmlinclude/styles.html deleted file mode 100644 index 998c5c08c6..0000000000 --- a/doc/htmlinclude/styles.html +++ /dev/null @@ -1,3 +0,0 @@ - - -
Style-file Screenshot Symbols
:/JKQTPlotter/styles/blackandwhite.ini
:/JKQTPlotter/styles/blueprint.ini
:/JKQTPlotter/styles/dark.ini
:/JKQTPlotter/styles/default.ini
:/JKQTPlotter/styles/legacy_default_style.ini
:/JKQTPlotter/styles/seaborn.ini
:/JKQTPlotter/styles/simple_arrowsaxes.ini
:/JKQTPlotter/styles/simple_axesoffset.ini
:/JKQTPlotter/styles/simple_axesoffset_plotbox.ini
:/JKQTPlotter/styles/simple_gridandticks.ini
\ No newline at end of file diff --git a/tools/jkqtplotter_doc_imagegenerator/jkqtplotter_doc_imagegenerator.cpp b/tools/jkqtplotter_doc_imagegenerator/jkqtplotter_doc_imagegenerator.cpp index 8a28ac8e7a..d5b3e23249 100644 --- a/tools/jkqtplotter_doc_imagegenerator/jkqtplotter_doc_imagegenerator.cpp +++ b/tools/jkqtplotter_doc_imagegenerator/jkqtplotter_doc_imagegenerator.cpp @@ -608,10 +608,10 @@ void plotStyleSymbols(JKQTBasePlotter& plotExtra, const JKQTBasePlotter& plot) { void doListStyles(const QDir& outputDir, const QDir& docoutputDir, int iconsize, QColor backgroundColor) { QDir dir(":/JKQTPlotter/styles/", "*.ini"); - QFile fhtml(docoutputDir.absoluteFilePath("styles.html")); + QFile fhtml(docoutputDir.absoluteFilePath("styles.dox")); fhtml.open(QFile::WriteOnly|QFile::Text); QTextStream shtml(&fhtml); - shtml<<"\n \n"; + shtml<<"
Style-file Screenshot Symbols
\n \n " - <<"" - <<"" - <<""; + shtml<<" \n" + <<"
Style-file\n Screenshot\n Symbols\n"; for (auto& f: dir.entryList()) { qDebug()<<"plotting example for style "<" - <<""<
\"\"/
\"\"/
"<\n" + <<" \\image html "<\\image html "<"; }