mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
Mod doc for better readability doxygen
1. this can be an example howto add english and french documentation without sacrificing code readability 2. Fix indentation code
This commit is contained in:
committed by
Laurent Trinques
parent
a28e7289b9
commit
b9ce532db7
@@ -18,10 +18,19 @@
|
|||||||
#include "borderproperties.h"
|
#include "borderproperties.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Constructeur. Initialise un objet BorderProperties avec les proprietes par
|
@brief BorderProperties::BorderProperties
|
||||||
|
constructor
|
||||||
|
Initializes a BorderProperties object with default properties
|
||||||
|
|
||||||
|
Initializes a BorderProperties object
|
||||||
|
with the following default properties:
|
||||||
|
- 17 columns of 60.0 px wide by 20.0px high
|
||||||
|
- 8 lines of 80.0 px high by 20.0px wide
|
||||||
|
|
||||||
|
Initialise un objet BorderProperties avec les proprietes par
|
||||||
defaut suivantes :
|
defaut suivantes :
|
||||||
* 17 colonnes affichees de 60.0 px de large pour 20.0px de haut
|
- 17 colonnes affichees de 60.0 px de large pour 20.0px de haut
|
||||||
* 8 lignes affichees de 80.0 px de haut pour 20.0px de large
|
- 8 lignes affichees de 80.0 px de haut pour 20.0px de large
|
||||||
*/
|
*/
|
||||||
BorderProperties::BorderProperties() :
|
BorderProperties::BorderProperties() :
|
||||||
columns_count(17),
|
columns_count(17),
|
||||||
@@ -36,14 +45,20 @@ BorderProperties::BorderProperties() :
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Destructeur
|
@brief BorderProperties::~BorderProperties
|
||||||
|
destructor
|
||||||
*/
|
*/
|
||||||
BorderProperties::~BorderProperties() {
|
BorderProperties::~BorderProperties() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@param bp autre conteneur BorderProperties
|
@brief BorderProperties::operator ==
|
||||||
@return true si ip et ce conteneur sont identiques, false sinon
|
@param bp :
|
||||||
|
- other BorderProperties container/class
|
||||||
|
- autre conteneur BorderProperties
|
||||||
|
@return
|
||||||
|
- true if it and this container are identical, false otherwise
|
||||||
|
- true si ip et ce conteneur sont identiques, false sinon
|
||||||
*/
|
*/
|
||||||
bool BorderProperties::operator==(const BorderProperties &bp) {
|
bool BorderProperties::operator==(const BorderProperties &bp) {
|
||||||
return(
|
return(
|
||||||
@@ -59,16 +74,25 @@ bool BorderProperties::operator==(const BorderProperties &bp) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@param bp autre conteneur BorderProperties
|
@brief BorderProperties::operator !=
|
||||||
@return false si bp et ce conteneur sont identiques, true sinon
|
@param bp :
|
||||||
|
- other BorderProperties container/class
|
||||||
|
- autre conteneur BorderProperties
|
||||||
|
@return
|
||||||
|
- false if it and this container are identical, true otherwise
|
||||||
|
- false si bp et ce conteneur sont identiques, true sinon
|
||||||
*/
|
*/
|
||||||
bool BorderProperties::operator!=(const BorderProperties &bp) {
|
bool BorderProperties::operator!=(const BorderProperties &bp) {
|
||||||
return(!(*this == bp));
|
return(!(*this == bp));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Exporte les dimensions sous formes d'attributs XML ajoutes a l'element e.
|
@brief BorderProperties::toXml
|
||||||
@param e Element XML auquel seront ajoutes des attributs
|
- Exports dimensions as XML attributes added to element e.
|
||||||
|
- Exporte les dimensions sous formes d'attributs XML ajoutes a l'element e.
|
||||||
|
@param e :
|
||||||
|
- XML element to which attributes will be added
|
||||||
|
- Element XML auquel seront ajoutes des attributs
|
||||||
*/
|
*/
|
||||||
void BorderProperties::toXml(QDomElement &e) const {
|
void BorderProperties::toXml(QDomElement &e) const {
|
||||||
e.setAttribute("cols", columns_count);
|
e.setAttribute("cols", columns_count);
|
||||||
@@ -80,8 +104,12 @@ void BorderProperties::toXml(QDomElement &e) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Importe les dimensions a partir des attributs XML de l'element e
|
@brief BorderProperties::fromXml
|
||||||
@param e Element XML dont les attributs seront lus
|
- Import dimensions from XML attributes of element e
|
||||||
|
- Importe les dimensions a partir des attributs XML de l'element e
|
||||||
|
@param e :
|
||||||
|
- XML element whose attributes will be read
|
||||||
|
- Element XML dont les attributs seront lus
|
||||||
*/
|
*/
|
||||||
void BorderProperties::fromXml(QDomElement &e) {
|
void BorderProperties::fromXml(QDomElement &e) {
|
||||||
if (e.hasAttribute("cols")) columns_count = e.attribute("cols").toInt();
|
if (e.hasAttribute("cols")) columns_count = e.attribute("cols").toInt();
|
||||||
@@ -93,9 +121,15 @@ void BorderProperties::fromXml(QDomElement &e) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Exporte les dimensions dans une configuration.
|
@brief BorderProperties::toSettings
|
||||||
@param settings Parametres a ecrire
|
- Export dimensions in a QSettings object.
|
||||||
@param prefix prefixe a ajouter devant les noms des parametres
|
- Exporte les dimensions dans une configuration.
|
||||||
|
@param settings :
|
||||||
|
- QSettings object to write
|
||||||
|
- Parametres a ecrire
|
||||||
|
@param prefix :
|
||||||
|
- prefix to be added before the names of the parameters
|
||||||
|
- prefixe a ajouter devant les noms des parametres
|
||||||
*/
|
*/
|
||||||
void BorderProperties::toSettings(QSettings &settings, const QString &prefix) const {
|
void BorderProperties::toSettings(QSettings &settings, const QString &prefix) const {
|
||||||
settings.setValue(prefix + "cols", columns_count);
|
settings.setValue(prefix + "cols", columns_count);
|
||||||
@@ -107,9 +141,15 @@ void BorderProperties::toSettings(QSettings &settings, const QString &prefix) co
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Importe les dimensions depuis une configuration.
|
@brief BorderProperties::fromSettings
|
||||||
@param settings Parametres a lire
|
- Import dimensions from a QSettings object.
|
||||||
@param prefix prefixe a ajouter devant les noms des parametres
|
- Importe les dimensions depuis une configuration.
|
||||||
|
@param settings :
|
||||||
|
- QSettings object to read
|
||||||
|
- Parametres a lire
|
||||||
|
@param prefix :
|
||||||
|
- prefix to be added before the names of the parameters
|
||||||
|
- prefixe a ajouter devant les noms des parametres
|
||||||
*/
|
*/
|
||||||
void BorderProperties::fromSettings(QSettings &settings, const QString &prefix) {
|
void BorderProperties::fromSettings(QSettings &settings, const QString &prefix) {
|
||||||
columns_count = settings.value(prefix + "cols", columns_count).toInt();
|
columns_count = settings.value(prefix + "cols", columns_count).toInt();
|
||||||
@@ -122,9 +162,9 @@ void BorderProperties::fromSettings(QSettings &settings, const QString &prefix)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief BorderProperties::defaultProperties
|
@brief BorderProperties::defaultProperties
|
||||||
* @return the default properties stored in the setting file
|
@return the default properties stored in the setting file
|
||||||
*/
|
*/
|
||||||
BorderProperties BorderProperties::defaultProperties()
|
BorderProperties BorderProperties::defaultProperties()
|
||||||
{
|
{
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
|
|||||||
@@ -19,35 +19,38 @@
|
|||||||
#define BORDER_PROPERTIES_H
|
#define BORDER_PROPERTIES_H
|
||||||
#include <QtCore>
|
#include <QtCore>
|
||||||
#include <QtXml>
|
#include <QtXml>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@brief The BorderProperties class
|
||||||
This class is a container for dimensions and display properties of a
|
This class is a container for dimensions and display properties of a
|
||||||
diagram.
|
diagram.
|
||||||
|
@remark Attributes are public
|
||||||
*/
|
*/
|
||||||
class BorderProperties {
|
class BorderProperties {
|
||||||
public:
|
public:
|
||||||
// constructor, destructor, operators
|
// constructor, destructor, operators
|
||||||
BorderProperties();
|
BorderProperties();
|
||||||
virtual ~BorderProperties();
|
virtual ~BorderProperties();
|
||||||
|
|
||||||
bool operator==(const BorderProperties &);
|
bool operator==(const BorderProperties &);
|
||||||
bool operator!=(const BorderProperties &);
|
bool operator!=(const BorderProperties &);
|
||||||
|
|
||||||
void toXml(QDomElement &) const;
|
void toXml(QDomElement &) const;
|
||||||
void fromXml(QDomElement &);
|
void fromXml(QDomElement &);
|
||||||
void toSettings(QSettings &, const QString & = QString()) const;
|
void toSettings(QSettings &, const QString & = QString()) const;
|
||||||
void fromSettings(QSettings &, const QString & = QString());
|
void fromSettings(QSettings &, const QString & = QString());
|
||||||
|
|
||||||
static BorderProperties defaultProperties();
|
static BorderProperties defaultProperties();
|
||||||
|
|
||||||
// attributes
|
// attributes
|
||||||
int columns_count; ///< Columns count
|
int columns_count; ///< Columns count
|
||||||
qreal columns_width; ///< Columns width
|
qreal columns_width; ///< Columns width
|
||||||
qreal columns_header_height; ///< Column headers height
|
qreal columns_header_height; ///< Column headers height
|
||||||
bool display_columns; ///< Whether to display column headers
|
bool display_columns; ///< Whether to display column headers
|
||||||
|
|
||||||
int rows_count; ///< Rows count
|
int rows_count; ///< Rows count
|
||||||
qreal rows_height; ///< Rows height
|
qreal rows_height; ///< Rows height
|
||||||
qreal rows_header_width; ///< Row headers width
|
qreal rows_header_width; ///< Row headers width
|
||||||
bool display_rows; ///< Whether to display row headers
|
bool display_rows; ///< Whether to display row headers
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user