From 9a45de0bbd3bc7dc7ff5e0e676ca1cad26c1f8a6 Mon Sep 17 00:00:00 2001 From: Isabell Pflug Date: Fri, 28 Jul 2023 03:07:40 +0200 Subject: [PATCH] :memo: Added documentation for ThinkPink.ini configuration file --- Doxyfile | 32 +++--- DoxygenLayout.xml | 246 +++++++++++++++++++++++++++++++++++++++++ ThinkPink/main.cpp | 4 + ThinkPink/settings.hpp | 42 ++++++- 4 files changed, 305 insertions(+), 19 deletions(-) create mode 100644 DoxygenLayout.xml diff --git a/Doxyfile b/Doxyfile index 70e21db..7a594cf 100644 --- a/Doxyfile +++ b/Doxyfile @@ -128,7 +128,7 @@ BRIEF_MEMBER_DESC = YES # brief descriptions will be completely suppressed. # The default value is: YES. -REPEAT_BRIEF = YES +REPEAT_BRIEF = NO # This tag implements a quasi-intelligent brief description abbreviator that is # used to form the text in various listings. Each string in this list, if found @@ -341,7 +341,7 @@ OPTIMIZE_OUTPUT_SLICE = NO # # Note see also the list of default file extension mappings. -EXTENSION_MAPPING = +EXTENSION_MAPPING = .ini=C # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments # according to the Markdown format, which allows for more readable @@ -437,7 +437,7 @@ SUBGROUPING = YES # SEPARATE_MEMBER_PAGES. # The default value is: NO. -INLINE_GROUPED_CLASSES = NO +INLINE_GROUPED_CLASSES = YES # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions # with only public data fields or simple typedef fields will be shown inline in @@ -447,7 +447,7 @@ INLINE_GROUPED_CLASSES = NO # Man pages) or section (for LaTeX and RTF). # The default value is: NO. -INLINE_SIMPLE_STRUCTS = NO +INLINE_SIMPLE_STRUCTS = YES # When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or # enum is documented as struct, union, or enum with the name of the typedef. So @@ -1028,21 +1028,21 @@ EXCLUDE_SYMBOLS = # that contain example code fragments that are included (see the \include # command). -EXAMPLE_PATH = +EXAMPLE_PATH = ThinkPink/ # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and # *.h) to filter out the source-files in the directories. If left blank all # files are included. -EXAMPLE_PATTERNS = * +EXAMPLE_PATTERNS = *.ini # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude commands # irrespective of the value of the RECURSIVE tag. # The default value is: NO. -EXAMPLE_RECURSIVE = NO +EXAMPLE_RECURSIVE = YES # The IMAGE_PATH tag can be used to specify one or more files or directories # that contain images that are to be included in the documentation (see the @@ -1117,13 +1117,13 @@ USE_MDFILE_AS_MAINPAGE = # also VERBATIM_HEADERS is set to NO. # The default value is: NO. -SOURCE_BROWSER = NO +SOURCE_BROWSER = YES # Setting the INLINE_SOURCES tag to YES will include the body of functions, # classes and enums directly into the documentation. # The default value is: NO. -INLINE_SOURCES = NO +INLINE_SOURCES = YES # Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any # special comment blocks from generated source code fragments. Normal C, C++ and @@ -1136,13 +1136,13 @@ STRIP_CODE_COMMENTS = YES # entity all documented functions referencing it will be listed. # The default value is: NO. -REFERENCED_BY_RELATION = NO +REFERENCED_BY_RELATION = YES # If the REFERENCES_RELATION tag is set to YES then for each documented function # all documented entities called/used by that function will be listed. # The default value is: NO. -REFERENCES_RELATION = NO +REFERENCES_RELATION = YES # If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set # to YES then the hyperlinks from functions in REFERENCES_RELATION and @@ -1241,7 +1241,7 @@ CLANG_DATABASE_PATH = # classes, structs, unions or interfaces. # The default value is: YES. -ALPHABETICAL_INDEX = YES +ALPHABETICAL_INDEX = NO # In case all classes in a project start with a common prefix, all classes will # be put under the same header in the alphabetical index. The IGNORE_PREFIX tag @@ -1535,7 +1535,7 @@ TOC_EXPAND = NO # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. -GENERATE_QHP = NO +GENERATE_QHP = NO # If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify # the file name of the resulting .qch file. The path specified is relative to @@ -1909,7 +1909,7 @@ LATEX_OUTPUT = latex # the output language. # This tag requires that the tag GENERATE_LATEX is set to YES. -LATEX_CMD_NAME = +LATEX_CMD_NAME = lualatex # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate # index for LaTeX. @@ -2374,7 +2374,7 @@ TAGFILES = qtsources.tags # tag file that is based on the input files it reads. See section "Linking to # external documentation" for more information about the usage of tag files. -GENERATE_TAGFILE = +GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES, all external class will be listed in # the class index. If set to NO, only the inherited external classes will be @@ -2483,7 +2483,7 @@ COLLABORATION_GRAPH = YES # The default value is: YES. # This tag requires that the tag HAVE_DOT is set to YES. -GROUP_GRAPHS = YES +GROUP_GRAPHS = NO # If the UML_LOOK tag is set to YES, doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling diff --git a/DoxygenLayout.xml b/DoxygenLayout.xml new file mode 100644 index 0000000..996f781 --- /dev/null +++ b/DoxygenLayout.xml @@ -0,0 +1,246 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ThinkPink/main.cpp b/ThinkPink/main.cpp index 3ef99db..e2f607b 100644 --- a/ThinkPink/main.cpp +++ b/ThinkPink/main.cpp @@ -11,6 +11,10 @@ std::unique_ptr settings; * \file main.cpp */ +/*! + * \brief Reads game settings from `ThinkPink.ini` config file + * \ingroup Settings_src + */ void initialise_settings() { QString config_filename = "ThinkPink.ini"; QString config_path = ""; diff --git a/ThinkPink/settings.hpp b/ThinkPink/settings.hpp index 7b042e8..f4049da 100644 --- a/ThinkPink/settings.hpp +++ b/ThinkPink/settings.hpp @@ -1,12 +1,48 @@ +/*! + * \file settings.hpp + * \ingroup Settings_src + */ + #ifndef SETTINGS_HPP #define SETTINGS_HPP #include /*! - * \var QSettings settings - * \brief #QSettings unique pointer. - * Gets initialised inside of \ref main.cpp once from reading the "ThinkPink.ini" configuration file. + * \defgroup Settings Settings + * \brief Configuration of your SameGame. + * \details If you wish to just see the documentation of using the configuration file, go to \ref ini_config. \n + * The implementation of it is documented in \ref Settings_src. + */ + +/*! + * \example ThinkPink.ini + * Default configuration file. + */ + +/*! + * \defgroup ini_config Configuration + * \ingroup Settings + * \brief Quick explanation of using the `ThinkPink.ini` configuration file for customising your \ref ThinkPink experience. + * \section Keys + * \subsection Size + * To adjust the size of the game grid, change the keys `columns` and `rows` to the desired integer values. + * \subsection Colors + * A list of all colors that can get picked for the initial game grid. You can edit the list to have as many or as few colors as you want, using the hexadecimal color values. + * \section Default Default configuration file + * \verbinclude{doc} ThinkPink.ini + */ + +/*! + * \defgroup Settings_src C++ Implementation + * \ingroup Settings + * \brief Overview of all sources that initialise and declare the `std::unique_ptr` #settings. + */ + +/*! + * \brief global `unique_ptr` of #QSettings \n + * Granting global access to #QSettings at load time. + * \ingroup Settings_src */ extern std::unique_ptr settings;