mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-09-14 20:33:05 +02:00
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:
parent
65ba816859
commit
36dbe65457
@ -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
|
||||||
|
@ -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 += .
|
||||||
|
@ -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;
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -687,7 +687,7 @@ 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,
|
||||||
@ -819,12 +819,14 @@ 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,
|
||||||
@ -908,12 +910,12 @@ void Createdxf::drawPolyline(const QString &filepath,
|
|||||||
*/
|
*/
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
@ -522,9 +522,9 @@ 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)
|
||||||
{
|
{
|
||||||
@ -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
|
||||||
|
@ -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
|
||||||
{
|
{
|
||||||
|
@ -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());
|
||||||
|
@ -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();
|
||||||
|
@ -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::)
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -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));
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
|
@ -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,17 +96,18 @@ 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)
|
||||||
{
|
{
|
||||||
@ -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,8 +175,8 @@ QList<CustomElementPart *> LineEditor::currentParts() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief LineEditor::updateForm
|
@brief LineEditor::updateForm
|
||||||
* Reimplemented from @ElementItemEditor
|
Reimplemented from ElementItemEditor
|
||||||
*/
|
*/
|
||||||
void LineEditor::updateForm()
|
void LineEditor::updateForm()
|
||||||
{
|
{
|
||||||
|
@ -29,7 +29,7 @@ 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
|
||||||
{
|
{
|
||||||
|
@ -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"
|
||||||
"("
|
"("
|
||||||
|
@ -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().
|
||||||
|
@ -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-]+)$");
|
||||||
|
@ -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
|
||||||
|
@ -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();
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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())
|
||||||
{
|
{
|
||||||
|
@ -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)
|
||||||
{
|
{
|
||||||
|
@ -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);
|
||||||
|
@ -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())
|
||||||
|
@ -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;
|
||||||
|
@ -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_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
@ -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_;
|
||||||
|
@ -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
|
||||||
|
@ -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_);
|
||||||
}
|
}
|
||||||
|
@ -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("%","");
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user