Mod doc to set style de same + Fix indentation code

This commit is contained in:
Simon De Backer
2020-07-15 18:17:39 +02:00
committed by Laurent Trinques
parent 251dfdf37a
commit 2cdfce18ec
11 changed files with 252 additions and 245 deletions

View File

@@ -28,11 +28,12 @@
#include <QPolygonF>
/**
* @brief ConductorCreator::ConductorCreator
* Create an electrical potential between all terminals of @terminals_list.
* the terminals of the list must be in the same diagram.
* @param terminals_list
*/
@brief ConductorCreator::ConductorCreator
Create an electrical potential between all terminals of @terminals_list.
the terminals of the list must be in the same diagram.
@param d Diagram
@param terminals_list QList<Terminal *>
*/
ConductorCreator::ConductorCreator(Diagram *d, QList<Terminal *> terminals_list) :
m_terminals_list(terminals_list)
{
@@ -68,11 +69,11 @@ ConductorCreator::ConductorCreator(Diagram *d, QList<Terminal *> terminals_list)
}
/**
* @brief ConductorCreator::create
* Create an electrical potential between the terminals of the diagram d, contained in the polygon
* @param d
* @param polygon : polygon in diagram coordinate
*/
@brief ConductorCreator::create
Create an electrical potential between the terminals of the diagram d, contained in the polygon
@param d Diagram
@param polygon : polygon in diagram coordinate
*/
void ConductorCreator::create(Diagram *d, const QPolygonF &polygon)
{
QList<Terminal *> t_list;
@@ -92,9 +93,9 @@ void ConductorCreator::create(Diagram *d, const QPolygonF &polygon)
}
/**
* @brief ConductorCreator::propertieToUse
* @return the conductor properties to use for the new conductors.
*/
@brief ConductorCreator::propertieToUse
@return the conductor properties to use for the new conductors.
*/
void ConductorCreator::setUpPropertieToUse()
{
QList<Conductor *> potentials = existingPotential();
@@ -130,11 +131,11 @@ void ConductorCreator::setUpPropertieToUse()
}
/**
* @brief ConductorCreator::existingPotential
* Return the list of existing potential of
* the terminal list
* @return
*/
@brief ConductorCreator::existingPotential
Return the list of existing potential of
the terminal list
@return c_list QList<Conductor *>
*/
QList<Conductor *> ConductorCreator::existingPotential()
{
QList<Conductor *> c_list;
@@ -174,9 +175,9 @@ QList<Conductor *> ConductorCreator::existingPotential()
}
/**
* @brief ConductorCreator::hubTerminal
* @return
*/
@brief ConductorCreator::hubTerminal
@return hub_terminal
*/
Terminal *ConductorCreator::hubTerminal()
{
Terminal *hub_terminal = m_terminals_list.first();

View File

@@ -24,7 +24,7 @@
@param parent
*/
MacOSXOpenEvent::MacOSXOpenEvent(QObject *parent) :
QObject(parent)
QObject(parent)
{}
/**
@@ -35,13 +35,13 @@ MacOSXOpenEvent::MacOSXOpenEvent(QObject *parent) :
*/
bool MacOSXOpenEvent::eventFilter(QObject *watched, QEvent *event)
{
if (event->type() == QEvent::FileOpen)
{
SingleApplication *app = dynamic_cast<SingleApplication *>(watched);
QFileOpenEvent *open_event = static_cast<QFileOpenEvent*>(event);
QString message = "launched-with-args: " + open_event->file();
app->sendMessage(message.toUtf8());
return true;
}
return false;
if (event->type() == QEvent::FileOpen)
{
SingleApplication *app = dynamic_cast<SingleApplication *>(watched);
QFileOpenEvent *open_event = static_cast<QFileOpenEvent*>(event);
QString message = "launched-with-args: " + open_event->file();
app->sendMessage(message.toUtf8());
return true;
}
return false;
}

View File

@@ -19,13 +19,15 @@
#define MACOSXOPENEVENT_H
#include <QObject>
/**
@brief The MacOSXOpenEvent class
*/
class MacOSXOpenEvent : public QObject
{
Q_OBJECT
public:
explicit MacOSXOpenEvent(QObject *parent = nullptr);
bool eventFilter(QObject *watched, QEvent *event) override;
Q_OBJECT
public:
explicit MacOSXOpenEvent(QObject *parent = nullptr);
bool eventFilter(QObject *watched, QEvent *event) override;
};
#endif // MACOSXOPENEVENT_H

View File

@@ -26,7 +26,7 @@
*/
QString QETUtils::marginsToString(const QMargins &margins)
{
QString str;
QString str;
str += QString::number(margins.left());
str += ";";
str += QString::number(margins.top());

View File

@@ -21,12 +21,12 @@
#include <QMargins>
/**
* Provide some small utils function
*/
Provide some small utils function
*/
namespace QETUtils
{
QString marginsToString(const QMargins &margins);
QMargins marginsFromString(const QString &string);
QString marginsToString(const QMargins &margins);
QMargins marginsFromString(const QString &string);
}
#endif // QETUTILS_H