♻️ Moved doxygen documentation around until it finally works for settings and the SameGame class.

main
Isabell Pflug 3 years ago
parent 9a45de0bbd
commit 8dba6d4fa9

@ -20,12 +20,12 @@
<tab type="interfaceindex" visible="$ALPHABETICAL_INDEX" title=""/> <tab type="interfaceindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="interfacehierarchy" visible="yes" title="" intro=""/> <tab type="interfacehierarchy" visible="yes" title="" intro=""/>
</tab>--> </tab>-->
<tab type="classes" visible="yes" title=""> <tab type="classlist" visible="yes" title="Classes" intro=""/>
<tab type="classlist" visible="yes" title="" intro=""/> <!--<tab type="classes" visible="yes" title="">
<tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/> <tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="hierarchy" visible="yes" title="" intro=""/> <tab type="hierarchy" visible="yes" title="" intro=""/>
<tab type="classmembers" visible="yes" title="" intro=""/> <tab type="classmembers" visible="yes" title="" intro=""/>
</tab> </tab>-->
<!-- <!--
<tab type="structs" visible="yes" title=""> <tab type="structs" visible="yes" title="">
<tab type="structlist" visible="yes" title="" intro=""/> <tab type="structlist" visible="yes" title="" intro=""/>
@ -186,7 +186,7 @@
<group> <group>
<briefdescription visible="yes"/> <briefdescription visible="yes"/>
<groupgraph visible="$GROUP_GRAPHS"/> <groupgraph visible="$GROUP_GRAPHS"/>
<detaileddescription visible="yes" title="Configuration"/> <detaileddescription visible="yes" title=""/>
<memberdecl> <memberdecl>
<nestedgroups visible="yes" title="Sections"/> <nestedgroups visible="yes" title="Sections"/>
<dirs visible="yes" title=""/> <dirs visible="yes" title=""/>

@ -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 . * 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[in] rows the number of rows.
* \param columns the number of columns. * \param[in] columns the number of columns.
*/ */
void initialiseGameMatrix(int rows, int 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. * \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? * \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. * -# 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). * -# 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 rows the number of rows. * \param[in] rows the number of rows.
* \param columns the number of columns. * \param[in] columns the number of columns.
*/ */
SameGame(int rows, int columns); SameGame(int rows, int columns);
/*! \} */ /*! \} */
@ -60,36 +60,47 @@ public:
/*! /*!
* \name Cell functions * \name Cell functions
* \brief Functions that all use coordinates of a specific cell from the #gameMatrix as parameters. * \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[in] row Number of the row of cell to be selected.
* \param column Number of the column of the cell to be selected. * \param[in] column Number of the column of the cell to be selected.
* \{ * \{
*/ */
/*! /*!
* \brief getCell returns #gameMatrix[#row][#column]. * \brief getCell returns #gameMatrix[#row][#column].
* \return #QString color at the requested position. * \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); QString getCell(int row, int column);
/*! /*!
* \brief setCell sets the value of #gameMatrix[#row][#column] to #color. * \brief setCell sets the value of #gameMatrix[#row][#column] to that of #color.
* \param color new color for the requested position. * \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); void setCell(int row, int column, QString color);
/*! /*!
* \brief checkNeighbour * \brief checkNeighbour checks if input coordinates belong to an existing cell,
* \param connectedSet * 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 color * \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); void checkNeighbour(std::set<std::vector<int>> *connectedSet, QString color, int row, int column);
/*! /*!
* \brief getConnected * \brief getConnected gets all cells that are connected to the original input cell that share the same color recursively, making use
* \param connectedSet * of \ref checkNeighbour to verify each new cell that gets examined.
* \param color * \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); 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. * \brief deleteCell changes the color in the selected cell to an invalid value so that it will get taken out of the game.

@ -37,6 +37,8 @@
* \defgroup Settings_src C++ Implementation * \defgroup Settings_src C++ Implementation
* \ingroup Settings * \ingroup Settings
* \brief Overview of all sources that initialise and declare the `std::unique_ptr<QSettings>` #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.
*/ */
/*! /*!

Loading…
Cancel
Save