Compare commits

...

2 Commits

@ -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

@ -0,0 +1,246 @@
<doxygenlayout version="1.0">
<!-- Generated by doxygen 1.9.4 -->
<!-- Navigation index tabs for HTML output -->
<navindex>
<tab type="mainpage" visible="yes" title=""/>
<tab type="pages" visible="yes" title="" intro=""/>
<tab type="usergroup" show-subpages="yes" visible="yes" url="\ref Settings" title="Settings">
<tab type="user" visible="yes" url="\ref ini_config" title="Configuration"/>
<tab type="user" visible="yes" url="\ref Settings_src" title="Implementation"/>
</tab>
<!--<tab type="modules" visible="yes" title="" intro=""/>
<tab type="namespaces" visible="yes" title="">
<tab type="namespacelist" visible="yes" title="" intro=""/>
<tab type="namespacemembers" visible="yes" title="" intro=""/>
</tab>
<tab type="concepts" visible="yes" title="">
</tab>
<tab type="interfaces" visible="yes" title="">
<tab type="interfacelist" visible="yes" title="" intro=""/>
<tab type="interfaceindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="interfacehierarchy" visible="yes" title="" intro=""/>
</tab>-->
<tab type="classlist" visible="yes" title="Classes" intro=""/>
<!--<tab type="classes" visible="yes" title="">
<tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="hierarchy" visible="yes" title="" intro=""/>
<tab type="classmembers" visible="yes" title="" intro=""/>
</tab>-->
<!--
<tab type="structs" visible="yes" title="">
<tab type="structlist" visible="yes" title="" intro=""/>
<tab type="structindex" visible="$ALPHABETICAL_INDEX" title=""/>
</tab>
<tab type="exceptions" visible="yes" title="">
<tab type="exceptionlist" visible="yes" title="" intro=""/>
<tab type="exceptionindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="exceptionhierarchy" visible="yes" title="" intro=""/>
</tab>-->
<tab type="files" visible="yes" title="">
<tab type="filelist" visible="yes" title="" intro=""/>
<tab type="globals" visible="yes" title="" intro=""/>
</tab>
<!--
<tab type="examples" visible="yes" title="" intro=""/>-->
</navindex>
<!-- Layout definition for a class page -->
<class>
<briefdescription visible="yes"/>
<includes visible="$SHOW_HEADERFILE"/>
<inheritancegraph visible="$CLASS_GRAPH"/>
<collaborationgraph visible="$COLLABORATION_GRAPH"/>
<memberdecl>
<nestedclasses visible="yes" title=""/>
<publictypes title=""/>
<services title=""/>
<interfaces title=""/>
<publicslots title=""/>
<signals title=""/>
<publicmethods title=""/>
<publicstaticmethods title=""/>
<publicattributes title=""/>
<publicstaticattributes title=""/>
<protectedtypes title=""/>
<protectedslots title=""/>
<protectedmethods title=""/>
<protectedstaticmethods title=""/>
<protectedattributes title=""/>
<protectedstaticattributes title=""/>
<packagetypes title=""/>
<packagemethods title=""/>
<packagestaticmethods title=""/>
<packageattributes title=""/>
<packagestaticattributes title=""/>
<properties title=""/>
<events title=""/>
<privatetypes title=""/>
<privateslots title=""/>
<privatemethods title=""/>
<privatestaticmethods title=""/>
<privateattributes title=""/>
<privatestaticattributes title=""/>
<friends title=""/>
<related title="" subtitle=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<typedefs title=""/>
<enums title=""/>
<services title=""/>
<interfaces title=""/>
<constructors title=""/>
<functions title=""/>
<related title=""/>
<variables title=""/>
<properties title=""/>
<events title=""/>
</memberdef>
<allmemberslink visible="yes"/>
<usedfiles visible="$SHOW_USED_FILES"/>
<authorsection visible="yes"/>
</class>
<!-- Layout definition for a namespace page -->
<namespace>
<briefdescription visible="yes"/>
<memberdecl>
<nestednamespaces visible="yes" title=""/>
<constantgroups visible="yes" title=""/>
<interfaces visible="yes" title=""/>
<classes visible="yes" title=""/>
<concepts visible="yes" title=""/>
<structs visible="yes" title=""/>
<exceptions visible="yes" title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
</memberdef>
<authorsection visible="yes"/>
</namespace>
<!-- Layout definition for a concept page -->
<concept>
<briefdescription visible="yes"/>
<includes visible="$SHOW_HEADERFILE"/>
<definition visible="yes" title=""/>
<detaileddescription title=""/>
<authorsection visible="yes"/>
</concept>
<!-- Layout definition for a file page -->
<file>
<briefdescription visible="yes"/>
<includes visible="$SHOW_INCLUDE_FILES"/>
<includegraph visible="$INCLUDE_GRAPH"/>
<includedbygraph visible="$INCLUDED_BY_GRAPH"/>
<sourcelink visible="yes"/>
<memberdecl>
<interfaces visible="yes" title=""/>
<classes visible="yes" title=""/>
<structs visible="yes" title=""/>
<exceptions visible="yes" title=""/>
<namespaces visible="yes" title=""/>
<concepts visible="yes" title=""/>
<constantgroups visible="yes" title=""/>
<defines title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<defines title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
</memberdef>
<authorsection/>
</file>
<!-- Layout definition for a group page -->
<group>
<briefdescription visible="yes"/>
<groupgraph visible="$GROUP_GRAPHS"/>
<detaileddescription visible="yes" title=""/>
<memberdecl>
<nestedgroups visible="yes" title="Sections"/>
<dirs visible="yes" title=""/>
<files visible="yes" title=""/>
<namespaces visible="yes" title=""/>
<concepts visible="yes" title=""/>
<classes visible="yes" title=""/>
<defines title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<enumvalues title=""/>
<functions title=""/>
<variables title=""/>
<signals title=""/>
<publicslots title=""/>
<protectedslots title=""/>
<privateslots title=""/>
<events title=""/>
<properties title=""/>
<friends title=""/>
<membergroups visible="yes"/>
</memberdecl>
<memberdef>
<pagedocs/>
<inlineclasses title=""/>
<defines title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<enumvalues title=""/>
<functions title=""/>
<variables title=""/>
<signals title=""/>
<publicslots title=""/>
<protectedslots title=""/>
<privateslots title=""/>
<events title=""/>
<properties title=""/>
<friends title=""/>
</memberdef>
<authorsection visible="yes"/>
</group>
<!-- Layout definition for a directory page -->
<directory>
<briefdescription visible="yes"/>
<directorygraph visible="yes"/>
<memberdecl>
<dirs visible="yes"/>
<files visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
</directory>
</doxygenlayout>

@ -11,6 +11,10 @@ std::unique_ptr<QSettings> 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 = "";

@ -41,8 +41,8 @@ public:
*
* This function takes the number of rows and columns as arguments and creates a game grid of the respective size that it stores into #gameMatrix with randomly picked colors for each cell from #colors .
*
* \param rows the number of rows.
* \param columns the number of columns.
* \param[in] rows the number of rows.
* \param[in] columns the number of columns.
*/
void initialiseGameMatrix(int rows, int columns);
@ -50,9 +50,9 @@ public:
* \brief Constructor for the SameGame class. Takes the colors from #settings and stores them into #colors.
* \todo Why did I not make the amount of rows and columns constants read from #settings as well, like the #QStringList #colors?
* -# it is included in the #settings pointer anyways. no reason to have it being a variable.
* -# because of that, I am not going to group the rows and columns parameters of the constructor and the #initialiseGameMatrix() function like I did for the [selection parameters](#SelectionParameters).
* \param rows the number of rows.
* \param columns the number of columns.
* -# because of that, I am not going to group the rows and columns parameters of the constructor and the #initialiseGameMatrix() function like I did for the [selection parameters](#Cell functions).
* \param[in] rows the number of rows.
* \param[in] columns the number of columns.
*/
SameGame(int rows, int columns);
/*! \} */
@ -60,36 +60,47 @@ public:
/*!
* \name Cell functions
* \brief Functions that all use coordinates of a specific cell from the #gameMatrix as parameters.
* \param row Number of the row of cell to be selected.
* \param column Number of the column of the cell to be selected.
* \param[in] row Number of the row of cell to be selected.
* \param[in] column Number of the column of the cell to be selected.
* \{
*/
/*!
* \brief getCell returns #gameMatrix[#row][#column].
* \return #QString color at the requested position.
* \param[in] row Number of the row of cell to be selected.
* \param[in] column Number of the column of the cell to be selected.
*/
QString getCell(int row, int column);
/*!
* \brief setCell sets the value of #gameMatrix[#row][#column] to #color.
* \param color new color for the requested position.
* \brief setCell sets the value of #gameMatrix[#row][#column] to that of #color.
* \param[in] color new color for the requested position.
* \param[in] row Number of the row of cell to be selected.
* \param[in] column Number of the column of the cell to be selected.
*/
void setCell(int row, int column, QString color);
/*!
* \brief checkNeighbour
* \param connectedSet
* \param color
* \brief checkNeighbour checks if input coordinates belong to an existing cell,
* whether or not that cell has already been visited, and if the color of that cell matches the color that is currently getting searched for.
* \param[in,out] connectedSet keeps track of all coordinate pairs of neighbouring cells that have already been selected.
* \param[in] row Number of the row of cell to be selected.
* \param[in] column Number of the column of the cell to be selected.
* \param[in] color the color that we are searching for.
*/
void checkNeighbour(std::set<std::vector<int>> *connectedSet, QString color, int row, int column);
/*!
* \brief getConnected
* \param connectedSet
* \param color
* \brief getConnected gets all cells that are connected to the original input cell that share the same color recursively, making use
* of \ref checkNeighbour to verify each new cell that gets examined.
* \param[in,out] connectedSet keeps track of all coordinate pairs of neighbouring cells that have already been selected.
* \param[in] color the color that we are searching for.
* \param[in] row Number of the row of cell to be selected.
* \param[in] column Number of the column of the cell to be selected.
*/
void getConnected(std::set<std::vector<int>> *connectedSet, QString color, int row, int column);
/*! \} */
/*!
* \brief deleteCell changes the color in the selected cell to an invalid value so that it will get taken out of the game.

@ -1,12 +1,50 @@
/*!
* \file settings.hpp
* \ingroup Settings_src
*/
#ifndef SETTINGS_HPP
#define SETTINGS_HPP
#include <QSettings>
/*!
* \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<QSettings>` #settings.
* \details Initialising the QSettings using a std::unique_ptr enables usage of user configuration at load time. \n
* This means that we can have the grid size of \ref SameGame::gameMatrix and color list \ref SameGame::colors as constants.
*/
/*!
* \brief global `unique_ptr` of #QSettings \n
* Granting global access to #QSettings at load time.
* \ingroup Settings_src
*/
extern std::unique_ptr<QSettings> settings;

Loading…
Cancel
Save