mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
Fix FTBFS on x86_64-w64-mingw32 cross-compilation, thank Joshua
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4083 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -817,8 +817,9 @@ bool Diagram::fromXml(QDomElement &document, QPointF position, bool consider_inf
|
|||||||
Enregistre le schema XML dans son document XML interne et emet le signal
|
Enregistre le schema XML dans son document XML interne et emet le signal
|
||||||
written().
|
written().
|
||||||
*/
|
*/
|
||||||
void Diagram::write() {
|
void Diagram::write()
|
||||||
qDebug() << qPrintable(QString("Diagram::write() : saving changes from diagram \"%1\" [%2]").arg(title()).arg(QET::pointerString(this)));
|
{
|
||||||
|
qDebug() << qPrintable(QString("Diagram::write() : saving changes from diagram \"%1\"").arg(title())) << "[" << this << "]";
|
||||||
write(toXml().documentElement());
|
write(toXml().documentElement());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -540,28 +540,6 @@ QET::DiagramArea QET::diagramAreaFromString(const QString &string) {
|
|||||||
else return(QET::ElementsArea);
|
else return(QET::ElementsArea);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
@param ptr pointeur quelconque
|
|
||||||
@return une representation hexadecimale de l'adresse du pointeur
|
|
||||||
*/
|
|
||||||
QString QET::pointerString(void *ptr) {
|
|
||||||
static int hexa_digits = -1;
|
|
||||||
|
|
||||||
if (hexa_digits == -1) {
|
|
||||||
// determine le nombre de bits dans un unsigned long int
|
|
||||||
hexa_digits = std::numeric_limits<unsigned long int>::digits / 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
return(
|
|
||||||
QString("0x%1").arg(
|
|
||||||
reinterpret_cast<unsigned long int>(ptr),
|
|
||||||
hexa_digits,
|
|
||||||
16,
|
|
||||||
QChar('0')
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Round \a x to the nearest multiple of the invert of \a epsilon.
|
Round \a x to the nearest multiple of the invert of \a epsilon.
|
||||||
For instance, epsilon = 10 will round to 1/10 = 0.1
|
For instance, epsilon = 10 will round to 1/10 = 0.1
|
||||||
|
|||||||
@@ -156,7 +156,6 @@ namespace QET {
|
|||||||
QStringList splitWithSpaces(const QString &);
|
QStringList splitWithSpaces(const QString &);
|
||||||
QString diagramAreaToString(const QET::DiagramArea &);
|
QString diagramAreaToString(const QET::DiagramArea &);
|
||||||
QET::DiagramArea diagramAreaFromString(const QString &);
|
QET::DiagramArea diagramAreaFromString(const QString &);
|
||||||
QString pointerString(void *);
|
|
||||||
qreal round(qreal, qreal);
|
qreal round(qreal, qreal);
|
||||||
QPointF roundPoint(const QPointF &, qreal);
|
QPointF roundPoint(const QPointF &, qreal);
|
||||||
qreal correctAngle(const qreal &);
|
qreal correctAngle(const qreal &);
|
||||||
|
|||||||
@@ -619,7 +619,7 @@ QDomDocument QETProject::toXml() {
|
|||||||
// Write the diagram to XML only if it is not of type DiagramFolioList.
|
// Write the diagram to XML only if it is not of type DiagramFolioList.
|
||||||
DiagramFolioList *ptr = dynamic_cast<DiagramFolioList *>(diagram);
|
DiagramFolioList *ptr = dynamic_cast<DiagramFolioList *>(diagram);
|
||||||
if ( !ptr ) {
|
if ( !ptr ) {
|
||||||
qDebug() << qPrintable(QString("QETProject::toXml() : exporting diagram \"%1\" [%2]").arg(diagram -> title()).arg(QET::pointerString(diagram)));
|
qDebug() << qPrintable(QString("QETProject::toXml() : exporting diagram \"%1\"").arg(diagram -> title())) << "[" << diagram << "]";
|
||||||
QDomNode appended_diagram = project_root.appendChild(diagram -> writeXml(xml_doc));
|
QDomNode appended_diagram = project_root.appendChild(diagram -> writeXml(xml_doc));
|
||||||
appended_diagram.toElement().setAttribute("order", order_num ++);
|
appended_diagram.toElement().setAttribute("order", order_num ++);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,16 +23,6 @@ TitleBlockCell::TitleBlockCell() {
|
|||||||
TitleBlockCell::~TitleBlockCell() {
|
TitleBlockCell::~TitleBlockCell() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
@return A string representing the titleblock cell
|
|
||||||
*/
|
|
||||||
QString TitleBlockCell::toString() const {
|
|
||||||
if (cell_type == TitleBlockCell::EmptyCell) return("TitleBlockCell{null}");
|
|
||||||
QString span_desc = (row_span > 0 || col_span > 0) ? QString("+%1,%2").arg(row_span).arg(col_span) : QET::pointerString(spanner_cell);
|
|
||||||
QString base_desc = QString("TitleBlockCell{ [%1, %2] %3 }").arg(num_row).arg(num_col).arg(span_desc);
|
|
||||||
return(base_desc);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@return the type of this cell
|
@return the type of this cell
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -43,7 +43,6 @@ class TitleBlockCell {
|
|||||||
|
|
||||||
// methods
|
// methods
|
||||||
public:
|
public:
|
||||||
QString toString() const;
|
|
||||||
TemplateCellType type() const;
|
TemplateCellType type() const;
|
||||||
int horizontalAlign() const;
|
int horizontalAlign() const;
|
||||||
int verticalAlign() const;
|
int verticalAlign() const;
|
||||||
|
|||||||
@@ -583,21 +583,6 @@ void TitleBlockTemplate::initCells() {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
@return A string representing the titleblock template
|
|
||||||
@see TitleBlockCell::toString()
|
|
||||||
*/
|
|
||||||
QString TitleBlockTemplate::toString() const {
|
|
||||||
QString str = "\n";
|
|
||||||
for (int j = 0 ; j < rows_heights_.count() ; ++ j) {
|
|
||||||
for (int i = 0 ; i < columns_width_.count() ; ++ i) {
|
|
||||||
str += cells_[i][j] -> toString() + " ";
|
|
||||||
}
|
|
||||||
str += "\n";
|
|
||||||
}
|
|
||||||
return(str);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@return the name of this template
|
@return the name of this template
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -99,7 +99,6 @@ class TitleBlockTemplate : public QObject {
|
|||||||
void render(QPainter &, const DiagramContext &, int) const;
|
void render(QPainter &, const DiagramContext &, int) const;
|
||||||
void renderDxf(QRectF &, const DiagramContext &, int, QString &, int) const;
|
void renderDxf(QRectF &, const DiagramContext &, int, QString &, int) const;
|
||||||
void renderCell(QPainter &, const TitleBlockCell &, const DiagramContext &, const QRect &) const;
|
void renderCell(QPainter &, const TitleBlockCell &, const DiagramContext &, const QRect &) const;
|
||||||
QString toString() const;
|
|
||||||
void applyCellSpans();
|
void applyCellSpans();
|
||||||
void forgetSpanning();
|
void forgetSpanning();
|
||||||
void forgetSpanning(TitleBlockCell *, bool = true);
|
void forgetSpanning(TitleBlockCell *, bool = true);
|
||||||
|
|||||||
Reference in New Issue
Block a user