Add TODO compile var + Fix doxygen issue

You can make your code warn on compile time for the TODO's
In order to do so, uncomment the following line. in pro file
DEFINES += TODO_LIST
This commit is contained in:
Simon De Backer 2020-09-24 17:01:33 +02:00
parent 65ba816859
commit 36dbe65457
40 changed files with 1147 additions and 966 deletions

View File

@ -27,7 +27,9 @@
#include <QtCore/QSharedMemory> #include <QtCore/QSharedMemory>
#if QT_VERSION < QT_VERSION_CHECK(5, 10, 0) // ### Qt 6: remove #if QT_VERSION < QT_VERSION_CHECK(5, 10, 0) // ### Qt 6: remove
#else #else
#if TODO_LIST
#pragma message("@TODO remove code for QT 5.10 or later") #pragma message("@TODO remove code for QT 5.10 or later")
#endif
#include <QRandomGenerator> #include <QRandomGenerator>
#endif #endif
#include "singleapplication.h" #include "singleapplication.h"
@ -107,7 +109,9 @@ SingleApplication::SingleApplication( int &argc, char *argv[], bool allowSeconda
qsrand( QDateTime::currentMSecsSinceEpoch() % std::numeric_limits<uint>::max() ); qsrand( QDateTime::currentMSecsSinceEpoch() % std::numeric_limits<uint>::max() );
QThread::sleep( 8 + static_cast <unsigned long>( static_cast <float>( qrand() ) / RAND_MAX * 10 ) ); QThread::sleep( 8 + static_cast <unsigned long>( static_cast <float>( qrand() ) / RAND_MAX * 10 ) );
#else #else
#if TODO_LIST
#pragma message("@TODO remove code for QT 5.10 or later") #pragma message("@TODO remove code for QT 5.10 or later")
#endif
quint32 value = QRandomGenerator::global()->generate(); quint32 value = QRandomGenerator::global()->generate();
QThread::sleep( 8 + static_cast <unsigned long>( static_cast <float>( value ) / RAND_MAX * 10 ) ); QThread::sleep( 8 + static_cast <unsigned long>( static_cast <float>( value ) / RAND_MAX * 10 ) );
#endif #endif

View File

@ -4,51 +4,51 @@
# Chemins utilises pour la compilation et l'installation de QET # Chemins utilises pour la compilation et l'installation de QET
unix { unix {
# Chemins UNIX # Chemins UNIX
COMPIL_PREFIX = '/usr/local/' COMPIL_PREFIX = '/usr/local/'
INSTALL_PREFIX = '/usr/local/' INSTALL_PREFIX = '/usr/local/'
QET_BINARY_PATH = 'bin/' QET_BINARY_PATH = 'bin/'
QET_COMMON_COLLECTION_PATH = 'share/qelectrotech/elements/' QET_COMMON_COLLECTION_PATH = 'share/qelectrotech/elements/'
QET_COMMON_TBT_PATH = 'share/qelectrotech/titleblocks/' QET_COMMON_TBT_PATH = 'share/qelectrotech/titleblocks/'
QET_LANG_PATH = 'share/qelectrotech/lang/' QET_LANG_PATH = 'share/qelectrotech/lang/'
QET_EXAMPLES_PATH = 'share/qelectrotech/examples/' QET_EXAMPLES_PATH = 'share/qelectrotech/examples/'
QET_LICENSE_PATH = 'doc/qelectrotech/' QET_LICENSE_PATH = 'doc/qelectrotech/'
QET_MIME_XML_PATH = '../share/mime/application/' QET_MIME_XML_PATH = '../share/mime/application/'
QET_MIME_DESKTOP_PATH = '../share/mimelnk/application/' QET_MIME_DESKTOP_PATH = '../share/mimelnk/application/'
QET_MIME_PACKAGE_PATH = '../share/mime/packages/' QET_MIME_PACKAGE_PATH = '../share/mime/packages/'
QET_DESKTOP_PATH = 'share/applications/' QET_DESKTOP_PATH = 'share/applications/'
QET_ICONS_PATH = 'share/icons/hicolor/' QET_ICONS_PATH = 'share/icons/hicolor/'
QET_MAN_PATH = 'man/' QET_MAN_PATH = 'man/'
QET_APPDATA_PATH = 'share/appdata' QET_APPDATA_PATH = 'share/appdata'
} }
win32 { win32 {
# Chemins Windows # Chemins Windows
COMPIL_PREFIX = './' COMPIL_PREFIX = './'
INSTALL_PREFIX = './' INSTALL_PREFIX = './'
QET_BINARY_PATH = './' QET_BINARY_PATH = './'
QET_COMMON_COLLECTION_PATH = 'elements/' QET_COMMON_COLLECTION_PATH = 'elements/'
QET_COMMON_TBT_PATH = 'titleblocks/' QET_COMMON_TBT_PATH = 'titleblocks/'
QET_LANG_PATH = 'lang/' QET_LANG_PATH = 'lang/'
QET_LICENSE_PATH = './' QET_LICENSE_PATH = './'
# Liste des ressources Windows # Liste des ressources Windows
#RC_FILE = qelectrotech.rc #RC_FILE = qelectrotech.rc
} }
macx { macx {
# Chemins MacOS X # Chemins MacOS X
COMPIL_PREFIX = './' COMPIL_PREFIX = './'
INSTALL_PREFIX = '/usr/local/' INSTALL_PREFIX = '/usr/local/'
QET_BINARY_PATH = 'bin/' QET_BINARY_PATH = 'bin/'
QET_COMMON_COLLECTION_PATH = '../Resources/elements/' QET_COMMON_COLLECTION_PATH = '../Resources/elements/'
QET_COMMON_TBT_PATH = '../Resources/titleblocks/' QET_COMMON_TBT_PATH = '../Resources/titleblocks/'
QET_LANG_PATH = '../Resources/lang/' QET_LANG_PATH = '../Resources/lang/'
QET_EXAMPLES_PATH = 'share/qelectrotech/examples/' QET_EXAMPLES_PATH = 'share/qelectrotech/examples/'
QET_LICENSE_PATH = 'doc/qelectrotech/' QET_LICENSE_PATH = 'doc/qelectrotech/'
QET_MIME_XML_PATH = '../share/mime/application/' QET_MIME_XML_PATH = '../share/mime/application/'
QET_MIME_DESKTOP_PATH = '../share/mimelnk/application/' QET_MIME_DESKTOP_PATH = '../share/mimelnk/application/'
QET_DESKTOP_PATH = 'share/applications/' QET_DESKTOP_PATH = 'share/applications/'
QET_ICONS_PATH = 'share/icons/hicolor/' QET_ICONS_PATH = 'share/icons/hicolor/'
QET_MAN_PATH = 'man/' QET_MAN_PATH = 'man/'
ICON = 'ico/mac_icon/qelectrotech.icns' ICON = 'ico/mac_icon/qelectrotech.icns'
} }
@ -76,7 +76,14 @@ include(sources/QWidgetAnimation/QWidgetAnimation.pri)
DEFINES += QAPPLICATION_CLASS=QApplication DEFINES += QAPPLICATION_CLASS=QApplication
DEFINES += QT_MESSAGELOGCONTEXT DEFINES += QT_MESSAGELOGCONTEXT
DEFINES += GIT_COMMIT_SHA="\\\"$(shell git -C \""$$_PRO_FILE_PWD_"\" rev-parse --verify HEAD)\\\"" DEFINES += GIT_COMMIT_SHA="\\\"$(shell git -C \""$$_PRO_FILE_PWD_"\" rev-parse --verify HEAD)\\\""
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000
# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
# You can make your code warn on compile time for the TODO's
# In order to do so, uncomment the following line.
#DEFINES += TODO_LIST
TEMPLATE = app TEMPLATE = app
DEPENDPATH += . DEPENDPATH += .
@ -268,28 +275,28 @@ man.extra = sh man/compress_man_pages.sh
INSTALLS += target elements tbt lang copyright INSTALLS += target elements tbt lang copyright
# Sous Unix, on installe egalement l'icone, un fichier .desktop, des fichiers mime et les pages de manuel # Sous Unix, on installe egalement l'icone, un fichier .desktop, des fichiers mime et les pages de manuel
unix { unix {
INSTALLS += desktop mime_xml mime_desktop mime_package icons man examples appdata INSTALLS += desktop mime_xml mime_desktop mime_package icons man examples appdata
} }
# Options de compilation communes a Unix et MacOS X # Options de compilation communes a Unix et MacOS X
unix { unix {
# Chemin des fichiers de traduction ; par defaut : lang/ dans le repertoire d'execution # Chemin des fichiers de traduction ; par defaut : lang/ dans le repertoire d'execution
DEFINES += QET_LANG_PATH=$$join(COMPIL_PREFIX,,,$${QET_LANG_PATH}) DEFINES += QET_LANG_PATH=$$join(COMPIL_PREFIX,,,$${QET_LANG_PATH})
# Chemin de la collection commune ; par defaut : elements/ dans le repertoire d'execution # Chemin de la collection commune ; par defaut : elements/ dans le repertoire d'execution
DEFINES += QET_COMMON_COLLECTION_PATH=$$join(COMPIL_PREFIX,,,$${QET_COMMON_COLLECTION_PATH}) DEFINES += QET_COMMON_COLLECTION_PATH=$$join(COMPIL_PREFIX,,,$${QET_COMMON_COLLECTION_PATH})
DEFINES += QET_COMMON_TBT_PATH=$$join(COMPIL_PREFIX,,,$${QET_COMMON_TBT_PATH}) DEFINES += QET_COMMON_TBT_PATH=$$join(COMPIL_PREFIX,,,$${QET_COMMON_TBT_PATH})
} }
# Options de compilation specifiques a MacOS X # Options de compilation specifiques a MacOS X
macx { macx {
# les chemins definis precedemment sont relatifs au dossier contenant le binaire executable # les chemins definis precedemment sont relatifs au dossier contenant le binaire executable
DEFINES += QET_LANG_PATH_RELATIVE_TO_BINARY_PATH DEFINES += QET_LANG_PATH_RELATIVE_TO_BINARY_PATH
DEFINES += QET_COMMON_COLLECTION_PATH_RELATIVE_TO_BINARY_PATH DEFINES += QET_COMMON_COLLECTION_PATH_RELATIVE_TO_BINARY_PATH
} }
# Compilers-specific options # Compilers-specific options
unix { unix {
QMAKE_COPY_DIR = 'cp -f -r --preserve=timestamps' QMAKE_COPY_DIR = 'cp -f -r --preserve=timestamps'
} }

View File

@ -744,7 +744,9 @@ void ElementsCollectionWidget::search()
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) // ### Qt 6: remove #if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) // ### Qt 6: remove
QStringList text_list = text.split("+", QString::SkipEmptyParts); QStringList text_list = text.split("+", QString::SkipEmptyParts);
#else #else
#if TODO_LIST
#pragma message("@TODO remove code for QT 5.14 or later") #pragma message("@TODO remove code for QT 5.14 or later")
#endif
QStringList text_list = text.split("+", Qt::SkipEmptyParts); QStringList text_list = text.split("+", Qt::SkipEmptyParts);
#endif #endif
QModelIndexList match_index; QModelIndexList match_index;

View File

@ -70,7 +70,9 @@ bool ConductorNumExport::toCsv()
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) // ### Qt 6: remove #if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) // ### Qt 6: remove
stream << wiresNum() << endl; stream << wiresNum() << endl;
#else #else
#if TODO_LIST
#pragma message("@TODO remove code for QT 5.15 or later") #pragma message("@TODO remove code for QT 5.15 or later")
#endif
stream << wiresNum() << &Qt::endl(stream); stream << wiresNum() << &Qt::endl(stream);
#endif #endif
} }

View File

@ -368,7 +368,9 @@ void ConductorProperties::fromXml(QDomElement &e)
//Keep retrocompatible with version older than 0,4 //Keep retrocompatible with version older than 0,4
//If the propertie @type is simple (removed since QET 0,4), we set text no visible. //If the propertie @type is simple (removed since QET 0,4), we set text no visible.
//@TODO remove this code for qet 0.6 or later //@TODO remove this code for qet 0.6 or later
#if TODO_LIST
#pragma message("@TODO remove this code for qet 0.6 or later") #pragma message("@TODO remove this code for qet 0.6 or later")
#endif
if (e.attribute("type") == "simple") m_show_text = false; if (e.attribute("type") == "simple") m_show_text = false;
} }
@ -786,7 +788,9 @@ void ConductorProperties::readStyle(const QString &style_string) {
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) // ### Qt 6: remove #if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) // ### Qt 6: remove
QStringList styles = style_string.split(";", QString::SkipEmptyParts); QStringList styles = style_string.split(";", QString::SkipEmptyParts);
#else #else
#if TODO_LIST
#pragma message("@TODO remove code QString::SkipEmptyParts for QT 5.14 or later") #pragma message("@TODO remove code QString::SkipEmptyParts for QT 5.14 or later")
#endif
QStringList styles = style_string.split(";", Qt::SkipEmptyParts); QStringList styles = style_string.split(";", Qt::SkipEmptyParts);
#endif #endif

View File

@ -687,51 +687,51 @@ void Createdxf::drawArc(
@param height @param height
@param rotation @param rotation
@param colour @param colour
@param xScale=1 @param xScaleW = 1
*/ */
void Createdxf::drawText( void Createdxf::drawText(
const QString& fileName, const QString& fileName,
const QString& text, const QString& text,
double x, double x,
double y, double y,
double height, double height,
double rotation, double rotation,
int colour, int colour,
double xScaleW) double xScaleW)
{ {
if (!fileName.isEmpty()) { if (!fileName.isEmpty()) {
QFile file(fileName); QFile file(fileName);
if (!file.open(QFile::Append)) { if (!file.open(QFile::Append)) {
// error message // error message
QMessageBox errorFileOpen; QMessageBox errorFileOpen;
errorFileOpen.setText("Error: File "+fileName+" was not written correctly."); errorFileOpen.setText("Error: File "+fileName+" was not written correctly.");
errorFileOpen.setInformativeText("Close all Files and Re-Run"); errorFileOpen.setInformativeText("Close all Files and Re-Run");
errorFileOpen.exec(); errorFileOpen.exec();
} else { } else {
QTextStream To_Dxf(&file); QTextStream To_Dxf(&file);
// Draw the text // Draw the text
To_Dxf << 0 << "\r\n"; To_Dxf << 0 << "\r\n";
To_Dxf << "TEXT" << "\r\n"; To_Dxf << "TEXT" << "\r\n";
To_Dxf << 8 << "\r\n"; To_Dxf << 8 << "\r\n";
To_Dxf << 0 << "\r\n"; // Layer number (default layer in autocad) To_Dxf << 0 << "\r\n"; // Layer number (default layer in autocad)
To_Dxf << 62 << "\r\n"; To_Dxf << 62 << "\r\n";
To_Dxf << colour << "\r\n"; // Colour Code To_Dxf << colour << "\r\n"; // Colour Code
To_Dxf << 10 << "\r\n"; // XYZ To_Dxf << 10 << "\r\n"; // XYZ
To_Dxf << x << "\r\n"; // X in UCS (User Coordinate System)coordinates To_Dxf << x << "\r\n"; // X in UCS (User Coordinate System)coordinates
To_Dxf << 20 << "\r\n"; To_Dxf << 20 << "\r\n";
To_Dxf << y << "\r\n"; // Y in UCS (User Coordinate System)coordinates To_Dxf << y << "\r\n"; // Y in UCS (User Coordinate System)coordinates
To_Dxf << 30 << "\r\n"; To_Dxf << 30 << "\r\n";
To_Dxf << 0.0 << "\r\n"; // Z in UCS (User Coordinate System)coordinates To_Dxf << 0.0 << "\r\n"; // Z in UCS (User Coordinate System)coordinates
To_Dxf << 40 << "\r\n"; To_Dxf << 40 << "\r\n";
To_Dxf << height << "\r\n"; // Text Height To_Dxf << height << "\r\n"; // Text Height
To_Dxf << 41 << "\r\n"; To_Dxf << 41 << "\r\n";
To_Dxf << xScaleW << "\r\n"; // X Scale To_Dxf << xScaleW << "\r\n"; // X Scale
To_Dxf << 1 << "\r\n"; To_Dxf << 1 << "\r\n";
To_Dxf << text << "\r\n"; // Text Value To_Dxf << text << "\r\n"; // Text Value
To_Dxf << 50 << "\r\n"; To_Dxf << 50 << "\r\n";
To_Dxf << rotation << "\r\n"; // Text Rotation To_Dxf << rotation << "\r\n"; // Text Rotation
file.close(); file.close();
} }
} }
} }
@ -749,7 +749,7 @@ void Createdxf::drawTextAligned(
int hAlign, int hAlign,
int vAlign, int vAlign,
double xAlign, double xAlign,
double xScaleW, double xScaleW,
int colour) int colour)
{ {
if (!fileName.isEmpty()) { if (!fileName.isEmpty()) {
@ -778,7 +778,7 @@ void Createdxf::drawTextAligned(
To_Dxf << 40 << "\r\n"; To_Dxf << 40 << "\r\n";
To_Dxf << height << "\r\n"; // Text Height To_Dxf << height << "\r\n"; // Text Height
To_Dxf << 41 << "\r\n"; To_Dxf << 41 << "\r\n";
To_Dxf << xScaleW << "\r\n"; // X Scale To_Dxf << xScaleW << "\r\n"; // X Scale
To_Dxf << 1 << "\r\n"; To_Dxf << 1 << "\r\n";
To_Dxf << text << "\r\n"; // Text Value To_Dxf << text << "\r\n"; // Text Value
To_Dxf << 50 << "\r\n"; To_Dxf << 50 << "\r\n";
@ -819,76 +819,78 @@ void Createdxf::drawTextAligned(
} }
} }
} }
/** /**
@brief Createdxf::drawPolyline @brief Createdxf::drawPolyline
Convenience function for draw polyline Convenience function for draw polyline
@param filepath @param filepath
@param poly @param poly
@param colorcode @param colorcode
@param preScaled
*/ */
void Createdxf::drawPolyline(const QString &filepath, void Createdxf::drawPolyline(const QString &filepath,
const QPolygonF &poly, const QPolygonF &poly,
const int &colorcode, bool preScaled) const int &colorcode, bool preScaled)
{ {
qreal x,y; qreal x,y;
if (!filepath.isEmpty()) { if (!filepath.isEmpty()) {
QFile file(filepath); QFile file(filepath);
if (!file.open(QFile::Append)) { if (!file.open(QFile::Append)) {
// error message // error message
QMessageBox errorFileOpen; QMessageBox errorFileOpen;
errorFileOpen.setText("Error: File "+filepath+" was not written correctly."); errorFileOpen.setText("Error: File "+filepath+" was not written correctly.");
errorFileOpen.setInformativeText("Close all Files and Re-Run"); errorFileOpen.setInformativeText("Close all Files and Re-Run");
errorFileOpen.exec(); errorFileOpen.exec();
} else { } else {
QTextStream To_Dxf(&file); QTextStream To_Dxf(&file);
// Draw the Line // Draw the Line
To_Dxf << 0 << "\r\n"; To_Dxf << 0 << "\r\n";
To_Dxf << "POLYLINE" << "\r\n"; To_Dxf << "POLYLINE" << "\r\n";
To_Dxf << 8 << "\r\n"; To_Dxf << 8 << "\r\n";
To_Dxf << 0 << "\r\n"; // Layer number (default layer in autocad) To_Dxf << 0 << "\r\n"; // Layer number (default layer in autocad)
To_Dxf << 62 << "\r\n"; To_Dxf << 62 << "\r\n";
To_Dxf << colorcode << "\r\n"; // Colour Code To_Dxf << colorcode << "\r\n"; // Colour Code
To_Dxf << 66 << "\r\n"; To_Dxf << 66 << "\r\n";
To_Dxf << 1 << "\r\n"; To_Dxf << 1 << "\r\n";
To_Dxf << 70 << "\r\n"; To_Dxf << 70 << "\r\n";
To_Dxf << 8 << "\r\n"; To_Dxf << 8 << "\r\n";
To_Dxf << 10 << "\r\n"; To_Dxf << 10 << "\r\n";
To_Dxf << 0 << "\r\n"; To_Dxf << 0 << "\r\n";
To_Dxf << 20 << "\r\n"; To_Dxf << 20 << "\r\n";
To_Dxf << 0 << "\r\n"; To_Dxf << 0 << "\r\n";
To_Dxf << 30 << "\r\n"; To_Dxf << 30 << "\r\n";
To_Dxf << 0 << "\r\n"; To_Dxf << 0 << "\r\n";
foreach(QPointF p, poly) foreach(QPointF p, poly)
{ {
if(preScaled) { if(preScaled) {
x = p.x(); x = p.x();
y = p.y(); y = p.y();
} else { } else {
x = p.x() * xScale; x = p.x() * xScale;
y = sheetHeight - (p.y() * yScale); y = sheetHeight - (p.y() * yScale);
} }
To_Dxf << 0 << "\r\n"; To_Dxf << 0 << "\r\n";
To_Dxf << "VERTEX" << "\r\n"; To_Dxf << "VERTEX" << "\r\n";
To_Dxf << 8 << "\r\n"; To_Dxf << 8 << "\r\n";
To_Dxf << 0 << "\r\n"; // Layer number (default layer in autocad) To_Dxf << 0 << "\r\n"; // Layer number (default layer in autocad)
To_Dxf << 70 << "\r\n"; To_Dxf << 70 << "\r\n";
To_Dxf << 32 << "\r\n"; To_Dxf << 32 << "\r\n";
To_Dxf << 10 << "\r\n"; To_Dxf << 10 << "\r\n";
To_Dxf << x << "\r\n"; // X in UCS (User Coordinate System)coordinates To_Dxf << x << "\r\n"; // X in UCS (User Coordinate System)coordinates
To_Dxf << 20 << "\r\n"; To_Dxf << 20 << "\r\n";
To_Dxf << y << "\r\n"; // Y in UCS (User Coordinate System)coordinates To_Dxf << y << "\r\n"; // Y in UCS (User Coordinate System)coordinates
To_Dxf << 30 << "\r\n"; To_Dxf << 30 << "\r\n";
To_Dxf << 0.0 << "\r\n"; // Z in UCS (User Coordinate System)coordinates To_Dxf << 0.0 << "\r\n"; // Z in UCS (User Coordinate System)coordinates
} }
To_Dxf << 0 << "\r\n"; To_Dxf << 0 << "\r\n";
To_Dxf << "SEQEND" << "\r\n"; To_Dxf << "SEQEND" << "\r\n";
To_Dxf << 8 << "\r\n"; To_Dxf << 8 << "\r\n";
To_Dxf << 0 << "\r\n"; // Layer number (default layer in autocad) To_Dxf << 0 << "\r\n"; // Layer number (default layer in autocad)
file.close(); file.close();
} }
} }
} }
@ -899,63 +901,63 @@ void Createdxf::drawPolyline(const QString &filepath,
* ================================================ * ================================================
*/ */
/** /**
@brief Createdxf::drawCircle @brief Createdxf::drawCircle
draw circle in qt format draw circle in qt format
@param fileName @param fileName
@param center @param center
@param radius @param radius
@param colour @param colour
*/ */
void Createdxf::drawCircle( void Createdxf::drawCircle(
const QString& fileName, const QString& fileName,
QPointF centre, QPointF center,
double radius, double radius,
int colour) int colour)
{ {
qreal x = centre.x() * xScale; qreal x = center.x() * xScale;
qreal y = sheetHeight - centre.y() * yScale; qreal y = sheetHeight - center.y() * yScale;
qreal r = radius * xScale; qreal r = radius * xScale;
drawCircle(fileName,r,x,y,colour); drawCircle(fileName,r,x,y,colour);
} }
/** /**
@brief Createdxf::drawLine @brief Createdxf::drawLine
Convenience function to draw line Convenience function to draw line
@param filepath @param filepath
@param line @param line
@param colorcode @param colorcode
*/ */
void Createdxf::drawLine( void Createdxf::drawLine(
const QString &filepath, const QString &filepath,
const QLineF &line, const QLineF &line,
const int &colorcode) const int &colorcode)
{ {
drawLine(filepath, line.p1().x() * xScale, drawLine(filepath, line.p1().x() * xScale,
sheetHeight - (line.p1().y() * yScale), sheetHeight - (line.p1().y() * yScale),
line.p2().x() * xScale, line.p2().x() * xScale,
sheetHeight - (line.p2().y() * yScale), sheetHeight - (line.p2().y() * yScale),
colorcode); colorcode);
} }
/** /**
@brief Createdxf::drawEllipse @brief Createdxf::drawEllipse
Conveniance function for draw ellipse Conveniance function for draw ellipse
@param filepath @param filepath
@param rect @param rect
@param colorcode @param colorcode
*/ */
void Createdxf::drawEllipse( void Createdxf::drawEllipse(
const QString &filepath, const QString &filepath,
const QRectF &rect, const QRectF &rect,
const int &colorcode) const int &colorcode)
{ {
drawArcEllipse( drawArcEllipse(
filepath, filepath,
rect.topLeft().x() * xScale, rect.topLeft().x() * xScale,
sheetHeight - (rect.topLeft().y() * yScale), sheetHeight - (rect.topLeft().y() * yScale),
rect.width() * xScale, rect.width() * xScale,
rect.height() * yScale, rect.height() * yScale,
0, 360, 0, 0, 0, colorcode); 0, 360, 0, 0, 0, colorcode);
} }
/** /**
@ -966,9 +968,9 @@ void Createdxf::drawEllipse(
@param colorcode @param colorcode
*/ */
void Createdxf::drawRectangle( void Createdxf::drawRectangle(
const QString &filepath, const QString &filepath,
const QRectF &rect, const QRectF &rect,
const int &colorcode) { const int &colorcode) {
//QPolygonF poly(scaleRect(rect)); //QPolygonF poly(scaleRect(rect));
QPolygonF poly(rect); QPolygonF poly(rect);
drawPolyline(filepath,poly,colorcode); drawPolyline(filepath,poly,colorcode);
@ -982,49 +984,49 @@ void Createdxf::drawRectangle(
@param colorcode @param colorcode
*/ */
void Createdxf::drawPolygon( void Createdxf::drawPolygon(
const QString &filepath, const QString &filepath,
const QPolygonF &poly, const QPolygonF &poly,
const int &colorcode) const int &colorcode)
{ {
QPolygonF pg = poly; QPolygonF pg = poly;
if(!poly.isClosed()) { if(!poly.isClosed()) {
pg << poly.at(0); // Close it pg << poly.at(0); // Close it
} }
drawPolyline(filepath,pg,colorcode); drawPolyline(filepath,pg,colorcode);
} }
/** /**
@brief Createdxf::drawText @brief Createdxf::drawText
draw simple text in dxf format without any alignment specified draw simple text in dxf format without any alignment specified
@param fileName @param fileName
@param text @param text
@param point @param point
@param height @param height
@param rotation @param rotation
@param colour @param colour
@param xScaleW=1 @param xScaleW = 1
*/ */
void Createdxf::drawText( void Createdxf::drawText(
const QString& fileName, const QString& fileName,
const QString& text, const QString& text,
QPointF point, QPointF point,
double height, double height,
double rotation, double rotation,
int colour, int colour,
double xScaleW) double xScaleW)
{ {
qreal x = point.x() * xScale; qreal x = point.x() * xScale;
qreal y = sheetHeight - (point.y() * yScale); qreal y = sheetHeight - (point.y() * yScale);
drawText(fileName,text,x,y,height * yScale,rotation,colour,xScaleW); drawText(fileName,text,x,y,height * yScale,rotation,colour,xScaleW);
} }
void Createdxf::drawArcEllipse( void Createdxf::drawArcEllipse(
const QString &file_path, const QString &file_path,
QRectF rect, QRectF rect,
qreal startAngle, qreal startAngle,
qreal spanAngle, qreal spanAngle,
QPointF hotspot, QPointF hotspot,
qreal rotation_angle, qreal rotation_angle,
const int &colorcode) const int &colorcode)
{ {
qreal x = rect.x() * xScale; qreal x = rect.x() * xScale;
qreal y = sheetHeight - rect.y() * yScale; qreal y = sheetHeight - rect.y() * yScale;
@ -1041,8 +1043,8 @@ void Createdxf::drawArcEllipse(
static QRectF scaleRect(QRectF rect) static QRectF scaleRect(QRectF rect)
{ {
QRectF ro(rect.bottomLeft().x() * Createdxf::xScale, QRectF ro(rect.bottomLeft().x() * Createdxf::xScale,
Createdxf::sheetHeight - (rect.bottomLeft().y() * Createdxf::yScale), Createdxf::sheetHeight - (rect.bottomLeft().y() * Createdxf::yScale),
rect.width() * Createdxf::xScale, rect.width() * Createdxf::xScale,
rect.height() * Createdxf::yScale); rect.height() * Createdxf::yScale);
return ro; return ro;
} }

View File

@ -40,11 +40,11 @@ class Createdxf
double, double,
int); int);
static void drawCircle( static void drawCircle(
const QString& , const QString& ,
QPointF, QPointF,
double, double,
int ); int );
static void drawArc( static void drawArc(
const QString&, const QString&,
@ -69,14 +69,14 @@ class Createdxf
qreal rotation_angle, qreal rotation_angle,
const int &colorcode); const int &colorcode);
static void drawArcEllipse( static void drawArcEllipse(
const QString &file_path, const QString &file_path,
QRectF rect, QRectF rect,
qreal startAngle, qreal startAngle,
qreal spanAngle, qreal spanAngle,
QPointF hotspot, QPointF hotspot,
qreal rotation_angle, qreal rotation_angle,
const int &colorcode); const int &colorcode);
static void drawEllipse (const QString &filepath, static void drawEllipse (const QString &filepath,
const QRectF &rect, const QRectF &rect,
@ -117,16 +117,16 @@ class Createdxf
double,double, double,double,
double, double,
double, double,
int, int,
double xScale=1.0); double xScale=1.0);
static void drawText( static void drawText(
const QString&, const QString&,
const QString&, const QString&,
QPointF, QPointF,
double, double,
double, double,
int, int,
double xScale=1.0); double xScale=1.0);
static void drawTextAligned( static void drawTextAligned(
const QString& fileName, const QString& fileName,
const QString& text, const QString& text,
@ -141,19 +141,19 @@ class Createdxf
double xScale, double xScale,
int colour); int colour);
static void drawPolyline( static void drawPolyline(
const QString &filepath, const QString &filepath,
const QPolygonF &poly, const QPolygonF &poly,
const int &colorcode, const int &colorcode,
bool preScaled = false); bool preScaled = false);
static int getcolorCode ( static int getcolorCode (
const long red, const long red,
const long green, const long green,
const long blue); const long blue);
static long RGBcodeTable[]; static long RGBcodeTable[];
static int dxfColor(QColor color); static int dxfColor(QColor color);
static int dxfColor(QPen pen); static int dxfColor(QPen pen);
static const double sheetWidth; static const double sheetWidth;
static const double sheetHeight; static const double sheetHeight;

View File

@ -522,10 +522,10 @@ QHash<QString, QString> projectDataBase::elementInfoToString(Element *elmt)
} }
/** /**
* @brief projectDataBase::sqliteHandle @brief projectDataBase::sqliteHandle
* @param db @param db
* @return the sqlite3 handler class used internally by @db @return the sqlite3 handler class used internally by db
*/ */
sqlite3 *projectDataBase::sqliteHandle(QSqlDatabase *db) sqlite3 *projectDataBase::sqliteHandle(QSqlDatabase *db)
{ {
//sqlite 3 lib isn't availlable for the moment on macosx //sqlite 3 lib isn't availlable for the moment on macosx
@ -547,7 +547,7 @@ sqlite3 *projectDataBase::sqliteHandle(QSqlDatabase *db)
/** /**
* @brief projectDataBase::exportDb * @brief projectDataBase::exportDb
* Export the @db, to a file. * Export the db, to a file.
* @param db : database to export * @param db : database to export
* @param parent : parent widget of a QDialog used in this function * @param parent : parent widget of a QDialog used in this function
* @param caption : Title of the QDialog used in this function * @param caption : Title of the QDialog used in this function

View File

@ -46,7 +46,9 @@ ElementQueryWidget::ElementQueryWidget(QWidget *parent) :
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) // ### Qt 6: remove #if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) // ### Qt 6: remove
connect(&m_button_group, static_cast<void (QButtonGroup::*)(int)>(&QButtonGroup::buttonClicked), [this](int id) connect(&m_button_group, static_cast<void (QButtonGroup::*)(int)>(&QButtonGroup::buttonClicked), [this](int id)
#else #else
#if TODO_LIST
#pragma message("@TODO remove code for QT 5.15 or later") #pragma message("@TODO remove code for QT 5.15 or later")
#endif
connect(&m_button_group, static_cast<void (QButtonGroup::*)(int)>(&QButtonGroup::idClicked), [this](int id) connect(&m_button_group, static_cast<void (QButtonGroup::*)(int)>(&QButtonGroup::idClicked), [this](int id)
#endif #endif
{ {

View File

@ -354,7 +354,9 @@ void Diagram::keyPressEvent(QKeyEvent *event)
return; return;
} }
#if TODO_LIST
#pragma message("@TODO move code to new function") #pragma message("@TODO move code to new function")
#endif
//Move item with the keyboard arrow //Move item with the keyboard arrow
if(event->modifiers() == Qt::NoModifier) if(event->modifiers() == Qt::NoModifier)
{ {
@ -1465,7 +1467,9 @@ bool Diagram::fromXml(QDomElement &document,
content_ptr -> m_images = added_images.toSet(); content_ptr -> m_images = added_images.toSet();
content_ptr -> m_shapes = added_shapes.toSet(); content_ptr -> m_shapes = added_shapes.toSet();
#else #else
#if TODO_LIST
#pragma message("@TODO remove code for QT 5.14 or later") #pragma message("@TODO remove code for QT 5.14 or later")
#endif
content_ptr -> m_text_fields = QSet<IndependentTextItem *>( content_ptr -> m_text_fields = QSet<IndependentTextItem *>(
added_texts.begin(), added_texts.begin(),
added_texts.end()); added_texts.end());

View File

@ -146,6 +146,9 @@ void DiagramPrintDialog::exec()
#if defined Q_OS_LINUX #if defined Q_OS_LINUX
//Due to some bug with xfwm, we display this dialog has a windows on linux os (X11) //Due to some bug with xfwm, we display this dialog has a windows on linux os (X11)
//@TODO see if we must this line with graphic server wayland //@TODO see if we must this line with graphic server wayland
#if TODO_LIST
#pragma message("@TODO see if we must this line with graphic server wayland")
#endif
QETPrintPreviewDialog preview_dialog(project_, printer_, parentWidget(), Qt::Window); QETPrintPreviewDialog preview_dialog(project_, printer_, parentWidget(), Qt::Window);
#else #else
QETPrintPreviewDialog preview_dialog(project_, printer_, parentWidget()); QETPrintPreviewDialog preview_dialog(project_, printer_, parentWidget());
@ -326,6 +329,9 @@ void DiagramPrintDialog::acceptPrintTypeDialog()
); );
} else dialog_ -> accept(); } else dialog_ -> accept();
} else { } else {
#if TODO_LIST
#pragma message("@TODO une imprimante doit avoir ete selectionnee")
#endif
// une imprimante doit avoir ete selectionnee // une imprimante doit avoir ete selectionnee
/// @todo /// @todo
dialog_ -> accept(); dialog_ -> accept();

View File

@ -83,6 +83,9 @@ void ArcEditor::setUpChangeConnections()
m_change_connections << connect(part, &PartArc::rectChanged, this, &ArcEditor::updateForm); m_change_connections << connect(part, &PartArc::rectChanged, this, &ArcEditor::updateForm);
m_change_connections << connect(part, &PartArc::spanAngleChanged, this, &ArcEditor::updateForm); m_change_connections << connect(part, &PartArc::spanAngleChanged, this, &ArcEditor::updateForm);
m_change_connections << connect(part, &PartArc::startAngleChanged, this, &ArcEditor::updateForm); m_change_connections << connect(part, &PartArc::startAngleChanged, this, &ArcEditor::updateForm);
#if TODO_LIST
#pragma message("@TODO implement position changes!")
#endif
// TODO: implement position changes! // TODO: implement position changes!
//m_change_connections << connect(part, &PartArc::) //m_change_connections << connect(part, &PartArc::)
} }
@ -90,7 +93,7 @@ void ArcEditor::setUpChangeConnections()
void ArcEditor::disconnectChangeConnections() void ArcEditor::disconnectChangeConnections()
{ {
for (QMetaObject::Connection c : m_change_connections) { for (QMetaObject::Connection c : m_change_connections) {
disconnect(c); disconnect(c);
} }
m_change_connections.clear(); m_change_connections.clear();
} }

View File

@ -375,7 +375,9 @@ void ChangeZValueCommand::applyRaise(const QList<QGraphicsItem *> &items_list) {
#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0) // ### Qt 6: remove #if QT_VERSION < QT_VERSION_CHECK(5, 13, 0) // ### Qt 6: remove
my_items_list.swap(i, i + 1); my_items_list.swap(i, i + 1);
#else #else
#if TODO_LIST
#pragma message("@TODO remove code for QT 5.13 or later") #pragma message("@TODO remove code for QT 5.13 or later")
#endif
my_items_list.swapItemsAt(i, i + 1); my_items_list.swapItemsAt(i, i + 1);
#endif #endif
} }
@ -398,7 +400,9 @@ void ChangeZValueCommand::applyLower(const QList<QGraphicsItem *> &items_list) {
#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0) // ### Qt 6: remove #if QT_VERSION < QT_VERSION_CHECK(5, 13, 0) // ### Qt 6: remove
my_items_list.swap(i, i - 1); my_items_list.swap(i, i - 1);
#else #else
#if TODO_LIST
#pragma message("@TODO remove code for QT 5.13 or later") #pragma message("@TODO remove code for QT 5.13 or later")
#endif
my_items_list.swapItemsAt(i, i - 1); my_items_list.swapItemsAt(i, i - 1);
#endif #endif
} }

View File

@ -515,7 +515,9 @@ void CustomElementGraphicPart::stylesFromXml(const QDomElement &qde)
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) // ### Qt 6: remove #if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) // ### Qt 6: remove
QStringList styles = qde.attribute("style").split(";", QString::SkipEmptyParts); QStringList styles = qde.attribute("style").split(";", QString::SkipEmptyParts);
#else #else
#if TODO_LIST
#pragma message("@TODO remove code for QT 5.14 or later") #pragma message("@TODO remove code for QT 5.14 or later")
#endif
QStringList styles = qde.attribute("style").split(";", Qt::SkipEmptyParts); QStringList styles = qde.attribute("style").split(";", Qt::SkipEmptyParts);
#endif #endif

View File

@ -174,6 +174,9 @@ void PartDynamicTextField::fromXml(const QDomElement &dom_elmt) {
setFont(font_); setFont(font_);
} }
else { else {
#if TODO_LIST
#pragma message("@TODO remove in futur")
#endif
//Keep compatibility TODO remove in futur //Keep compatibility TODO remove in futur
setFont(QETApp::dynamicTextsItemFont(9)); setFont(QETApp::dynamicTextsItemFont(9));
} }

View File

@ -672,6 +672,9 @@ void QETElementEditor::slot_updateInformations()
//We add the editor widget //We add the editor widget
ElementItemEditor *editor = static_cast<ElementItemEditor*>(m_editors[selection_xml_name]); ElementItemEditor *editor = static_cast<ElementItemEditor*>(m_editors[selection_xml_name]);
#if TODO_LIST
#pragma message("@TODO Check if it takes longer than setting the parts again to the editor.")
#endif
// TODO: Check if it takes longer than setting the parts again to the editor. // TODO: Check if it takes longer than setting the parts again to the editor.
bool equal = true; bool equal = true;
QList<CustomElementPart*> parts = editor -> currentParts(); QList<CustomElementPart*> parts = editor -> currentParts();
@ -710,6 +713,9 @@ void QETElementEditor::slot_updateInformations()
return; return;
} }
else if (selection_xml_name == "polygon" && cep_list.length() == 1) { else if (selection_xml_name == "polygon" && cep_list.length() == 1) {
#if TODO_LIST
#pragma message("@TODO maybe allowing multipart edit when number of points is the same?")
#endif
// multi edit for polygons makes no sense // multi edit for polygons makes no sense
// TODO: maybe allowing multipart edit when number of points is the same? // TODO: maybe allowing multipart edit when number of points is the same?
//We add the editor widget //We add the editor widget

View File

@ -1,19 +1,19 @@
/* /*
Copyright 2006-2020 The QElectroTech Team Copyright 2006-2020 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or the Free Software Foundation, either version 2 of the License, or
(at your option) any later version. (at your option) any later version.
QElectroTech is distributed in the hope that it will be useful, QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>. along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "lineeditor.h" #include "lineeditor.h"
#include "ui_lineeditor.h" #include "ui_lineeditor.h"
@ -25,28 +25,68 @@
#include "qeticons.h" #include "qeticons.h"
/** /**
* @brief LineEditor::LineEditor @brief LineEditor::LineEditor
* @param editor : Element editor who belong this editor @param editor : Element editor who belong this editor
* @param part : part line to edit @param part : part line to edit
* @param parent : parent widget @param parent : parent widget
*/ */
LineEditor::LineEditor(QETElementEditor *editor, PartLine *part, QWidget *parent) : LineEditor::LineEditor(
ElementItemEditor(editor, parent), QETElementEditor *editor, PartLine *part, QWidget *parent) :
ui(new Ui::LineEditor) ElementItemEditor(editor, parent),ui(new Ui::LineEditor)
{ {
ui->setupUi(this); ui->setupUi(this);
ui->m_end1_cb->addItem(QET::Icons::EndLineNone, tr("Normale", "type of the 1st end of a line"), Qet::None ); ui->m_end1_cb->addItem(
ui->m_end1_cb->addItem(QET::Icons::EndLineSimple, tr("Flèche simple", "type of the 1st end of a line"), Qet::Simple ); QET::Icons::EndLineNone,
ui->m_end1_cb->addItem(QET::Icons::EndLineTriangle, tr("Flèche triangulaire", "type of the 1st end of a line"), Qet::Triangle); tr("Normale",
ui->m_end1_cb->addItem(QET::Icons::EndLineCircle, tr("Cercle", "type of the 1st end of a line"), Qet::Circle ); "type of the 1st end of a line"),
ui->m_end1_cb->addItem(QET::Icons::EndLineDiamond, tr("Carré", "type of the 1st end of a line"), Qet::Diamond ); Qet::None );
ui->m_end1_cb->addItem(
QET::Icons::EndLineSimple,
tr("Flèche simple",
"type of the 1st end of a line"),
Qet::Simple );
ui->m_end1_cb->addItem(
QET::Icons::EndLineTriangle,
tr("Flèche triangulaire",
"type of the 1st end of a line"),
Qet::Triangle);
ui->m_end1_cb->addItem(
QET::Icons::EndLineCircle,
tr("Cercle",
"type of the 1st end of a line"),
Qet::Circle );
ui->m_end1_cb->addItem(
QET::Icons::EndLineDiamond,
tr("Carré",
"type of the 1st end of a line"),
Qet::Diamond );
ui->m_end2_cb->addItem(QET::Icons::EndLineNone, tr("Normale", "type of the 1st end of a line"), Qet::None ); ui->m_end2_cb->addItem(
ui->m_end2_cb->addItem(QET::Icons::EndLineSimple, tr("Flèche simple", "type of the 1st end of a line"), Qet::Simple ); QET::Icons::EndLineNone,
ui->m_end2_cb->addItem(QET::Icons::EndLineTriangle, tr("Flèche triangulaire", "type of the 1st end of a line"), Qet::Triangle); tr("Normale",
ui->m_end2_cb->addItem(QET::Icons::EndLineCircle, tr("Cercle", "type of the 1st end of a line"), Qet::Circle ); "type of the 1st end of a line"),
ui->m_end2_cb->addItem(QET::Icons::EndLineDiamond, tr("Carré", "type of the 1st end of a line"), Qet::Diamond ); Qet::None );
ui->m_end2_cb->addItem(
QET::Icons::EndLineSimple,
tr("Flèche simple",
"type of the 1st end of a line"),
Qet::Simple );
ui->m_end2_cb->addItem(
QET::Icons::EndLineTriangle,
tr("Flèche triangulaire",
"type of the 1st end of a line"),
Qet::Triangle);
ui->m_end2_cb->addItem(
QET::Icons::EndLineCircle,
tr("Cercle",
"type of the 1st end of a line"),
Qet::Circle );
ui->m_end2_cb->addItem(
QET::Icons::EndLineDiamond,
tr("Carré",
"type of the 1st end of a line"),
Qet::Diamond );
m_style = new StyleEditor(editor); m_style = new StyleEditor(editor);
ui->m_main_layout->insertWidget(0, m_style); ui->m_main_layout->insertWidget(0, m_style);
@ -56,18 +96,19 @@ LineEditor::LineEditor(QETElementEditor *editor, PartLine *part, QWidget *parent
} }
/** /**
* @brief LineEditor::~LineEditor @brief LineEditor::~LineEditor
*/ */
LineEditor::~LineEditor() { LineEditor::~LineEditor()
delete ui; {
delete ui;
} }
/** /**
* @brief LineEditor::setPart @brief LineEditor::setPart
* Reimplemented from @ElementItemEditor Reimplemented from ElementItemEditor
* @param part : part line to edit @param part : part line to edit
* @return : true if the given part can be edited @return : true if the given part can be edited
*/ */
bool LineEditor::setPart(CustomElementPart *part) bool LineEditor::setPart(CustomElementPart *part)
{ {
if (m_part == part) { if (m_part == part) {
@ -100,7 +141,7 @@ bool LineEditor::setPart(CustomElementPart *part)
/** /**
* @brief LineEditor::setParts * @brief LineEditor::setParts
* Reimplemented from @ElementItemEditor * Reimplemented from ElementItemEditor
* @param parts : parts to edit * @param parts : parts to edit
* @return true if the parts can be edited * @return true if the parts can be edited
*/ */
@ -134,9 +175,9 @@ QList<CustomElementPart *> LineEditor::currentParts() const {
} }
/** /**
* @brief LineEditor::updateForm @brief LineEditor::updateForm
* Reimplemented from @ElementItemEditor Reimplemented from ElementItemEditor
*/ */
void LineEditor::updateForm() void LineEditor::updateForm()
{ {
if (!m_part) { if (!m_part) {

View File

@ -1,19 +1,19 @@
/* /*
Copyright 2006-2020 The QElectroTech Team Copyright 2006-2020 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or the Free Software Foundation, either version 2 of the License, or
(at your option) any later version. (at your option) any later version.
QElectroTech is distributed in the hope that it will be useful, QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>. along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef LINEEDITOR_H #ifndef LINEEDITOR_H
#define LINEEDITOR_H #define LINEEDITOR_H
@ -29,15 +29,15 @@ class StyleEditor;
/** /**
* @brief The LineEditor class * @brief The LineEditor class
* Provide a widget editor used to edit the properties of a @PartLine * Provide a widget editor used to edit the properties of a PartLine
*/ */
class LineEditor : public ElementItemEditor class LineEditor : public ElementItemEditor
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit LineEditor(QETElementEditor *editor, PartLine *part = nullptr, QWidget *parent = nullptr); explicit LineEditor(QETElementEditor *editor, PartLine *part = nullptr, QWidget *parent = nullptr);
~LineEditor() override; ~LineEditor() override;
bool setPart(CustomElementPart *part) override; bool setPart(CustomElementPart *part) override;
bool setParts(QList <CustomElementPart *> parts) override; bool setParts(QList <CustomElementPart *> parts) override;
@ -58,7 +58,7 @@ class LineEditor : public ElementItemEditor
private: private:
PartLine *m_part = nullptr; PartLine *m_part = nullptr;
Ui::LineEditor *ui; Ui::LineEditor *ui;
StyleEditor *m_style = nullptr; StyleEditor *m_style = nullptr;
QList <QMetaObject::Connection> m_change_connections; QList <QMetaObject::Connection> m_change_connections;
bool m_locked = false; bool m_locked = false;

View File

@ -51,9 +51,14 @@ ElementsCollectionCache::ElementsCollectionCache(const QString &database_path, Q
cache_db_.exec("PRAGMA locking_mode = EXCLUSIVE"); cache_db_.exec("PRAGMA locking_mode = EXCLUSIVE");
cache_db_.exec("PRAGMA synchronous = OFF"); cache_db_.exec("PRAGMA synchronous = OFF");
#if TODO_LIST
#pragma message("@TODO This code remove old table with mtime for create table with uuid, created at version 0,5")
#endif
//TODO This code remove old table with mtime for create table with uuid, created at version 0,5 //TODO This code remove old table with mtime for create table with uuid, created at version 0,5
//see to remove this code at version 0,6 or 0,7 when all users will table with uuid. //see to remove this code at version 0,6 or 0,7 when all users will table with uuid.
#if TODO_LIST
#pragma message("@TODO remove this code for qet 0.6 or later") #pragma message("@TODO remove this code for qet 0.6 or later")
#endif
QSqlQuery table_name(cache_db_); QSqlQuery table_name(cache_db_);
if (table_name.exec("PRAGMA table_info(names)")) if (table_name.exec("PRAGMA table_info(names)"))
{ {
@ -71,7 +76,9 @@ ElementsCollectionCache::ElementsCollectionCache(const QString &database_path, Q
else else
table_name.finish(); table_name.finish();
} }
#if TODO_LIST
#pragma message("@TODO the tables could already exist, handle that case.")
#endif
//@TODO the tables could already exist, handle that case. //@TODO the tables could already exist, handle that case.
cache_db_.exec("CREATE TABLE names" cache_db_.exec("CREATE TABLE names"
"(" "("

View File

@ -129,6 +129,9 @@ void ElementsMover::continueMovement(const QPointF &movement)
// Move some conductors // Move some conductors
for (Conductor *c : m_moved_content.m_conductors_to_update) for (Conductor *c : m_moved_content.m_conductors_to_update)
{ {
#if TODO_LIST
#pragma message("@TODO fix this problem correctly, probably we must to see conductor class.")
#endif
//Due to a weird behavior, we must to ensure that the position of the conductor is to (0,0). //Due to a weird behavior, we must to ensure that the position of the conductor is to (0,0).
//If not, in some unknown case the function QGraphicsScene::itemsBoundingRect() return a rectangle //If not, in some unknown case the function QGraphicsScene::itemsBoundingRect() return a rectangle
//that take in acount the pos() of the conductor, even if the bounding rect returned by the conductor is not in the pos(). //that take in acount the pos() of the conductor, even if the bounding rect returned by the conductor is not in the pos().

View File

@ -566,7 +566,9 @@ void ElementPictureFactory::setPainterStyle(const QDomElement &dom, QPainter &pa
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) // ### Qt 6: remove #if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) // ### Qt 6: remove
const QStringList styles = dom.attribute("style").split(";", QString::SkipEmptyParts); const QStringList styles = dom.attribute("style").split(";", QString::SkipEmptyParts);
#else #else
#if TODO_LIST
#pragma message("@TODO remove code for QT 5.14 or later") #pragma message("@TODO remove code for QT 5.14 or later")
#endif
const QStringList styles = dom.attribute("style").split(";", Qt::SkipEmptyParts); const QStringList styles = dom.attribute("style").split(";", Qt::SkipEmptyParts);
#endif #endif
QRegularExpression rx("^(?<name>[a-z-]+):(?<value>[a-z-]+)$"); QRegularExpression rx("^(?<name>[a-z-]+):(?<value>[a-z-]+)$");

View File

@ -176,8 +176,9 @@ bool QET::orthogonalProjection(const QPointF &point,
// determine le point d'intersection des deux droites = le projete orthogonal // determine le point d'intersection des deux droites = le projete orthogonal
QPointF intersection_point; QPointF intersection_point;
#if TODO_LIST
#pragma message("@TODO remove code for QT 5.14 or later") #pragma message("@TODO remove code for QT 5.14 or later")
#endif
QLineF::IntersectType it = line. QLineF::IntersectType it = line.
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) #if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
intersect // ### Qt 6: remove intersect // ### Qt 6: remove
@ -416,7 +417,11 @@ QList<QChar> QET::forbiddenCharacters()
@param name Chaine de caractere a transformer en nom de fichier potable @param name Chaine de caractere a transformer en nom de fichier potable
@todo virer les caracteres accentues ? @todo virer les caracteres accentues ?
*/ */
QString QET::stringToFileName(const QString &name) { QString QET::stringToFileName(const QString &name)
{
#if TODO_LIST
#pragma message("@TODO virer les caracteres accentues ?")
#endif
QString file_name(name.toLower()); QString file_name(name.toLower());
// remplace les caracteres interdits par des tirets // remplace les caracteres interdits par des tirets
@ -474,8 +479,9 @@ QString QET::joinWithSpaces(const QStringList &string_list) {
QStringList QET::splitWithSpaces(const QString &string) { QStringList QET::splitWithSpaces(const QString &string) {
// les chaines sont separees par des espaces non echappes // les chaines sont separees par des espaces non echappes
// = avec un nombre nul ou pair de backslashes devant // = avec un nombre nul ou pair de backslashes devant
#if TODO_LIST
#pragma message("@TODO remove code for QT 5.14 or later") #pragma message("@TODO remove code for QT 5.14 or later")
#endif
QStringList escaped_strings = string.split(QRegularExpression("[^\\]?(?:\\\\)* "), QStringList escaped_strings = string.split(QRegularExpression("[^\\]?(?:\\\\)* "),
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) // ### Qt 6: remove #if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) // ### Qt 6: remove
QString QString

View File

@ -1494,7 +1494,9 @@ void QETApp::useSystemPalette(bool use) {
*/ */
void QETApp::quitQET() void QETApp::quitQET()
{ {
#if TODO_LIST
#pragma message("@TODO Segmentation fault when closing program before loading elements is finished") #pragma message("@TODO Segmentation fault when closing program before loading elements is finished")
#endif
if (closeEveryEditor()) { if (closeEveryEditor()) {
qApp->quit(); qApp->quit();
} }

View File

@ -1999,6 +1999,9 @@ void QETDiagramEditor::activateDiagram(Diagram *diagram)
project_view -> showDiagram(diagram); project_view -> showDiagram(diagram);
} }
} else { } else {
#if TODO_LIST
#pragma message("@TODO gerer ce cas")
#endif
/// @todo gerer ce cas /// @todo gerer ce cas
} }
} }

View File

@ -448,7 +448,9 @@ void GraphicsTablePropertiesEditor::setUpEditConnection()
m_edit_connection << connect(m_table_button_group, QOverload<int>::of(&QButtonGroup::buttonClicked), this, &GraphicsTablePropertiesEditor::apply); m_edit_connection << connect(m_table_button_group, QOverload<int>::of(&QButtonGroup::buttonClicked), this, &GraphicsTablePropertiesEditor::apply);
m_edit_connection << connect(m_header_button_group, QOverload<int>::of(&QButtonGroup::buttonClicked), this, &GraphicsTablePropertiesEditor::apply); m_edit_connection << connect(m_header_button_group, QOverload<int>::of(&QButtonGroup::buttonClicked), this, &GraphicsTablePropertiesEditor::apply);
#else #else
#if TODO_LIST
#pragma message("@TODO remove code for QT 5.15 or later") #pragma message("@TODO remove code for QT 5.15 or later")
#endif
m_edit_connection << connect(m_table_button_group, QOverload<int>::of(&QButtonGroup::idClicked), this, &GraphicsTablePropertiesEditor::apply); m_edit_connection << connect(m_table_button_group, QOverload<int>::of(&QButtonGroup::idClicked), this, &GraphicsTablePropertiesEditor::apply);
m_edit_connection << connect(m_header_button_group, QOverload<int>::of(&QButtonGroup::idClicked), this, &GraphicsTablePropertiesEditor::apply); m_edit_connection << connect(m_header_button_group, QOverload<int>::of(&QButtonGroup::idClicked), this, &GraphicsTablePropertiesEditor::apply);
#endif #endif

View File

@ -1694,7 +1694,9 @@ QSet<Conductor *> Conductor::relatedPotentialConductors(const bool all_diagram,
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) // ### Qt 6: remove #if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) // ### Qt 6: remove
other_conductors += other_conductors_list_t.toSet(); other_conductors += other_conductors_list_t.toSet();
#else #else
#if TODO_LIST
#pragma message("@TODO remove code for QT 5.14 or later") #pragma message("@TODO remove code for QT 5.14 or later")
#endif
other_conductors += QSet<Conductor*>(other_conductors_list_t.begin(),other_conductors_list_t.end()); other_conductors += QSet<Conductor*>(other_conductors_list_t.begin(),other_conductors_list_t.end());
#endif #endif
} }

View File

@ -939,7 +939,9 @@ bool Element::fromXml(
* So we swap the value stored in "label" to "formula" as expected. * So we swap the value stored in "label" to "formula" as expected.
* @TODO remove this code at version 0.7 or more (probably useless). * @TODO remove this code at version 0.7 or more (probably useless).
*/ */
#if TODO_LIST
#pragma message("@TODO remove this code for qet 0.7 or later") #pragma message("@TODO remove this code for qet 0.7 or later")
#endif
if (dc["label"].toString().contains("%") if (dc["label"].toString().contains("%")
&& dc["formula"].toString().isNull()) && dc["formula"].toString().isNull())
{ {

View File

@ -851,6 +851,9 @@ bool QetShapeItem::fromXml(const QDomElement &e)
m_brush = QETXML::brushFromXml(e.firstChildElement("brush")); m_brush = QETXML::brushFromXml(e.firstChildElement("brush"));
QString type = e.attribute("type"); QString type = e.attribute("type");
#if TODO_LIST
#pragma message("@TODO Compatibility for version older than N°4075, shape type was stored with an int")
#endif
//@TODO Compatibility for version older than N°4075, shape type was stored with an int //@TODO Compatibility for version older than N°4075, shape type was stored with an int
if (type.size() == 1) if (type.size() == 1)
{ {
@ -965,28 +968,28 @@ bool QetShapeItem::toDXF(const QString &filepath,const QPen &pen)
switch (m_shapeType) switch (m_shapeType)
{ {
case Line: case Line:
Createdxf::drawLine(filepath, Createdxf::drawLine(filepath,
QLineF( mapToScene(m_P1), QLineF( mapToScene(m_P1),
mapToScene(m_P2)), mapToScene(m_P2)),
Createdxf::dxfColor(pen)); Createdxf::dxfColor(pen));
return true; return true;
case Rectangle: case Rectangle:
Createdxf::drawRectangle(filepath, Createdxf::drawRectangle(filepath,
QRectF(mapToScene(m_P1), QRectF(mapToScene(m_P1),
mapToScene(m_P2)).normalized(), mapToScene(m_P2)).normalized(),
Createdxf::dxfColor(pen)); Createdxf::dxfColor(pen));
return true; return true;
case Ellipse: case Ellipse:
Createdxf::drawEllipse(filepath, Createdxf::drawEllipse(filepath,
QRectF(mapToScene(m_P1), QRectF(mapToScene(m_P1),
mapToScene(m_P2)).normalized(), mapToScene(m_P2)).normalized(),
Createdxf::dxfColor(pen)); Createdxf::dxfColor(pen));
return true; return true;
case Polygon: case Polygon:
Createdxf::drawPolygon(filepath,m_polygon,Createdxf::dxfColor(pen)); Createdxf::drawPolygon(filepath,m_polygon,Createdxf::dxfColor(pen));
return true; return true;
default: default:
return false; return false;
} }
} }

View File

@ -155,6 +155,9 @@ Terminal::Terminal(TerminalData* data, Element* e) :
d(data), d(data),
parent_element_(e) parent_element_(e)
{ {
#if TODO_LIST
#pragma message("@TODO what is when multiple parents exist. So the other relation is lost.")
#endif
// TODO: what is when multiple parents exist. So the other relation is lost. // TODO: what is when multiple parents exist. So the other relation is lost.
d->setParent(this); d->setParent(this);
init("_", "_", false); init("_", "_", false);

View File

@ -61,6 +61,9 @@ void QETMainWindow::initCommonActions()
connect(configure_action_, &QAction::triggered, [qet_app]() connect(configure_action_, &QAction::triggered, [qet_app]()
{ {
qet_app->configureQET(); qet_app->configureQET();
#if TODO_LIST
#pragma message("@TODO we use reloadOldElementPanel only to keep up to date the string of the folio in the old element panel. then, if user change the option "Use labels of folio instead of their ID" the string of folio in the old element panel is up to date")
#endif
//TODO we use reloadOldElementPanel only to keep up to date the string of the folio in the old element panel. //TODO we use reloadOldElementPanel only to keep up to date the string of the folio in the old element panel.
//then, if user change the option "Use labels of folio instead of their ID" the string of folio in the old element panel is up to date //then, if user change the option "Use labels of folio instead of their ID" the string of folio in the old element panel is up to date
for (QETDiagramEditor *qde : qet_app->diagramEditors()) for (QETDiagramEditor *qde : qet_app->diagramEditors())

View File

@ -988,6 +988,9 @@ bool QETProject::isEmpty() const
// si le projet a un titre, on considere qu'il n'est pas vide // si le projet a un titre, on considere qu'il n'est pas vide
if (!project_title_.isEmpty()) return(false); if (!project_title_.isEmpty()) return(false);
#if TODO_LIST
#pragma message("@TODO check if the embedded element collection is empty")
#endif
//@TODO check if the embedded element collection is empty //@TODO check if the embedded element collection is empty
// compte le nombre de schemas non vides // compte le nombre de schemas non vides
@ -1273,7 +1276,9 @@ void QETProject::readProjectXml(QDomDocument &xml_project)
{ {
bool conv_ok; bool conv_ok;
m_project_qet_version = root_elmt.attribute("version").toDouble(&conv_ok); m_project_qet_version = root_elmt.attribute("version").toDouble(&conv_ok);
#if TODO_LIST
#pragma message("@TODO use of version convert") #pragma message("@TODO use of version convert")
#endif
if (conv_ok && QET::version.toDouble() < m_project_qet_version) if (conv_ok && QET::version.toDouble() < m_project_qet_version)
{ {
int ret = QET::QetMessageBox::warning( int ret = QET::QetMessageBox::warning(
@ -1328,7 +1333,9 @@ void QETProject::readProjectXml(QDomDocument &xml_project)
*/ */
void QETProject::readDiagramsXml(QDomDocument &xml_project) void QETProject::readDiagramsXml(QDomDocument &xml_project)
{ {
#if TODO_LIST
#pragma message("@TODO try to solve a weird bug (dialog is black) since port to Qt5 with the DialogWaiting") #pragma message("@TODO try to solve a weird bug (dialog is black) since port to Qt5 with the DialogWaiting")
#endif
//@TODO try to solve a weird bug (dialog is black) since port to Qt5 with the DialogWaiting //@TODO try to solve a weird bug (dialog is black) since port to Qt5 with the DialogWaiting
//show DialogWaiting //show DialogWaiting
DialogWaiting *dlgWaiting = nullptr; DialogWaiting *dlgWaiting = nullptr;

View File

@ -45,6 +45,9 @@ RecentFiles::RecentFiles(const QString &identifier, int size, QObject *parent) :
*/ */
RecentFiles::~RecentFiles() RecentFiles::~RecentFiles()
{ {
#if TODO_LIST
#pragma message("@TODO determiner s'il faut detruire ou non le menu")
#endif
delete menu_; delete menu_;
} }

View File

@ -740,7 +740,9 @@ QString RichTextEditor::text(Qt::TextFormat format) const
break; break;
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) #if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
#else #else
#if TODO_LIST
#pragma message("@TODO remove code for QT 5.14 or later") #pragma message("@TODO remove code for QT 5.14 or later")
#endif
case Qt::MarkdownText: //This enum value was added in Qt 5.14. case Qt::MarkdownText: //This enum value was added in Qt 5.14.
break; break;
#endif #endif

View File

@ -210,6 +210,9 @@ bool QETTitleBlockTemplateEditor::edit(
} }
if (!tb_template_orig) { if (!tb_template_orig) {
/// TODO The TBT does not exist, manage error /// TODO The TBT does not exist, manage error
#if TODO_LIST
#pragma message("@TODO The TBT does not exist, manage error")
#endif
return(false); return(false);
} }
@ -247,6 +250,9 @@ bool QETTitleBlockTemplateEditor::edit(
if (!tb_template_orig) { if (!tb_template_orig) {
/// TODO The TBT does not exist, manage error /// TODO The TBT does not exist, manage error
#if TODO_LIST
#pragma message("@TODO The TBT does not exist, manage error")
#endif
return(false); return(false);
} }
@ -267,12 +273,18 @@ bool QETTitleBlockTemplateEditor::edit(const QString &file_path)
TitleBlockTemplate *tbt = new TitleBlockTemplate(); TitleBlockTemplate *tbt = new TitleBlockTemplate();
bool loading = tbt -> loadFromXmlFile(file_path); bool loading = tbt -> loadFromXmlFile(file_path);
if (!loading) { if (!loading) {
#if TODO_LIST
#pragma message("@TODO the file opening failed, warn the user?")
#endif
/// TODO the file opening failed, warn the user? /// TODO the file opening failed, warn the user?
return(false); return(false);
} }
bool editing = edit(tbt); bool editing = edit(tbt);
if (!editing) { if (!editing) {
#if TODO_LIST
#pragma message("@TODO the file editing failed, warn the user?")
#endif
/// TODO the file editing failed, warn the user? /// TODO the file editing failed, warn the user?
return(false); return(false);
} }

View File

@ -46,6 +46,9 @@ class QETTitleBlockTemplateEditor : public QETMainWindow {
// attributes // attributes
private: private:
/// menus TODO /// menus TODO
#if TODO_LIST
#pragma message("@TODO menus")
#endif
QMenu *file_menu_, *edit_menu_, *display_menu_; QMenu *file_menu_, *edit_menu_, *display_menu_;
/// actions /// actions
QAction *new_, *open_, *open_from_file_, *save_, *save_as_, *save_as_file_, *quit_; QAction *new_, *open_, *open_from_file_, *save_, *save_as_, *save_as_file_, *quit_;

View File

@ -235,6 +235,9 @@ QString TitleBlockTemplateLogoManager::confirmLogoName(const QString &initial_na
} else if (answer == QDialogButtonBox::NoRole) { } else if (answer == QDialogButtonBox::NoRole) {
// the user provided another name // the user provided another name
name = rd_input -> text(); name = rd_input -> text();
#if TODO_LIST
#pragma message("@TODO prevent the user from entering an empty name")
#endif
/// TODO prevent the user from entering an empty name /// TODO prevent the user from entering an empty name
} else { } else {
// the user cancelled the operation // the user cancelled the operation

View File

@ -439,6 +439,9 @@ void TitleBlockTemplateView::splitSelectedCell()
*/ */
void TitleBlockTemplateView::drawBackground(QPainter *painter, const QRectF &rect) { void TitleBlockTemplateView::drawBackground(QPainter *painter, const QRectF &rect) {
QGraphicsView::drawBackground(painter, rect); QGraphicsView::drawBackground(painter, rect);
#if TODO_LIST
#pragma message("@TODO shouldn't we draw a large uniform rect?")
#endif
if (!tbtemplate_) return; // TODO shouldn't we draw a large uniform rect? if (!tbtemplate_) return; // TODO shouldn't we draw a large uniform rect?
} }
@ -959,6 +962,9 @@ QList<QAction *> TitleBlockTemplateView::columnsActions() const
*/ */
void TitleBlockTemplateView::updateLayout() void TitleBlockTemplateView::updateLayout()
{ {
#if TODO_LIST
#pragma message("@TODO we should try to update the grid instead of deleting-and-reloading it")
#endif
// TODO we should try to update the grid instead of deleting-and-reloading it // TODO we should try to update the grid instead of deleting-and-reloading it
loadTemplate(tbtemplate_); loadTemplate(tbtemplate_);
} }

View File

@ -397,7 +397,9 @@ void TitleBlockTemplate::parseRows(const QString &rows_string) {
QStringList rows_descriptions = QStringList rows_descriptions =
rows_string.split(QChar(';'), QString::SkipEmptyParts); rows_string.split(QChar(';'), QString::SkipEmptyParts);
#else #else
#if TODO_LIST
#pragma message("@TODO remove code for QT 5.14 or later") #pragma message("@TODO remove code for QT 5.14 or later")
#endif
QStringList rows_descriptions = QStringList rows_descriptions =
rows_string.split(QChar(';'), Qt::SkipEmptyParts); rows_string.split(QChar(';'), Qt::SkipEmptyParts);
#endif #endif
@ -437,7 +439,9 @@ void TitleBlockTemplate::parseColumns(const QString &cols_string) {
QStringList cols_descriptions = QStringList cols_descriptions =
cols_string.split(QChar(';'), QString::SkipEmptyParts); cols_string.split(QChar(';'), QString::SkipEmptyParts);
#else #else
#if TODO_LIST
#pragma message("@TODO remove code for QT 5.14 or later") #pragma message("@TODO remove code for QT 5.14 or later")
#endif
QStringList cols_descriptions = QStringList cols_descriptions =
cols_string.split(QChar(';'), Qt::SkipEmptyParts); cols_string.split(QChar(';'), Qt::SkipEmptyParts);
#endif #endif
@ -1378,7 +1382,9 @@ bool TitleBlockTemplate::removeLogo(const QString &logo_name) {
if (!data_logos_.contains(logo_name)) { if (!data_logos_.contains(logo_name)) {
return(false); return(false);
} }
#if TODO_LIST
#pragma message("@TODO check existing cells using this logo.") #pragma message("@TODO check existing cells using this logo.")
#endif
/// TODO check existing cells using this logo. /// TODO check existing cells using this logo.
if (vector_logos_.contains(logo_name)) { if (vector_logos_.contains(logo_name)) {
delete vector_logos_.take(logo_name); delete vector_logos_.take(logo_name);
@ -1404,7 +1410,9 @@ bool TitleBlockTemplate::renameLogo(const QString &logo_name,
|| data_logos_.contains(new_name)) { || data_logos_.contains(new_name)) {
return(false); return(false);
} }
#if TODO_LIST
#pragma message("@TODO check existing cells using this logo.")
#endif
/// TODO check existing cells using this logo. /// TODO check existing cells using this logo.
if (vector_logos_.contains(logo_name)) { if (vector_logos_.contains(logo_name)) {
vector_logos_.insert(new_name, vector_logos_.take(logo_name)); vector_logos_.insert(new_name, vector_logos_.take(logo_name));
@ -1755,7 +1763,9 @@ QStringList TitleBlockTemplate::listOfVariables()
|| cells_[i][j] -> cell_type || cells_[i][j] -> cell_type
== TitleBlockCell::EmptyCell) == TitleBlockCell::EmptyCell)
continue; continue;
#if TODO_LIST
#pragma message("@TODO not works on all cases...") #pragma message("@TODO not works on all cases...")
#endif
// TODO: not works on all cases... // TODO: not works on all cases...
list << cells_[i][j] -> value.name().replace("%",""); list << cells_[i][j] -> value.name().replace("%","");
} }

View File

@ -83,7 +83,9 @@ int BOMExportDialog::exec()
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) // ### Qt 6: remove #if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) // ### Qt 6: remove
stream << getBom() << endl; stream << getBom() << endl;
#else #else
#if TODO_LIST
#pragma message("@TODO remove code for QT 5.15 or later") #pragma message("@TODO remove code for QT 5.15 or later")
#endif
stream << getBom() << &Qt::endl(stream); stream << getBom() << &Qt::endl(stream);
#endif #endif
} }

View File

@ -107,6 +107,9 @@ DiagramPropertiesDialog::DiagramPropertiesDialog(Diagram *diagram, QWidget *pare
// Conducteur have change // Conducteur have change
if (new_conductors != conductors) { if (new_conductors != conductors) {
#if TODO_LIST
#pragma message("@TODO implement an undo command to allow the user to undo/redo this action")
#endif
/// TODO implement an undo command to allow the user to undo/redo this action /// TODO implement an undo command to allow the user to undo/redo this action
diagram -> defaultConductorProperties = new_conductors; diagram -> defaultConductorProperties = new_conductors;
} }