Hallo Plc-user,

Another one: Is it possible to show the coordinates of the mouse-pointer?

Good idea. ;-)

Hallo Plc-user,

many thanks for sharing your elements.
I just commit it to GIT, Wago directory needs to be reorganized a bit, if it interests someone to work on it.
https://git.tuxfamily.org/qet/qet.git/c … a830d3ac9d

Cheers,
Laurent

Hallo Plc-user,

I extracted your Wago elements and not seeing any different like some Wago elements in official collection :

https://git.tuxfamily.org/qet/qet.git/t … icles/wago

Cheers
Laurent

Hallo,

right click on polygon for add or delete point, if I understand your Google translated question well.
https://git.tuxfamily.org/qet/qet.git/c … 5baf5aa117 

@Plc-user,

is new Wago elements?
I can add these in collection?

Laurent

2. You could disable backup copy in settings.
Very strange ! 0.80 version has for now only folio list position added in code.
GIT log sources histroy : https://git.tuxfamily.org/qet/qet.git/log/sources

3,682

(317 replies, posted in News)

QTabBar::tab:selected { font: bold; color: green; }
https://download.qelectrotech.org/qet/forum_img/style_css_green_tab_selected.png

  Haroldo,
thanks for your feedback.
.
QET save window editors geometry in config, under Windows is stored on Regedit.
But when you uninstall QET this key isn't removed on Regedit.

You can delete in Regedit HKEY_CURRENT_USER\Software\QElectroTech\
https://download.qelectrotech.org/qet/forum_img/regedit3.png
 

Example here under Linux is only a  text file :


[diagrameditor]
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x2\0\0\0\0\0\0\0\0\0\x1\0\0\n\xb6\0\0\x5\xd7\0\0\0\0\0\0\0\x14\0\0\a#\0\0\x4\x17\0\0\0\0\x2\0\0\0\n\xb7)
state="@ByteArray(\0\0\0\xff\0\0\0\0\xfd\0\0\0\x1\0\0\0\0\0\0\x1i\0\0\x5`\xfc\x2\0\0\0\x2\xfb\0\0\0J\0\x64\0i\0\x61\0g\0r\0\x61\0m\0_\0p\0r\0o\0p\0\x65\0r\0t\0i\0\x65\0s\0_\0\x65\0\x64\0i\0t\0o\0r\0_\0\x64\0o\0\x63\0k\0_\0w\0i\0\x64\0g\0\x65\0t\x1\0\0\0\x44\0\0\0\"\0\0\0\"\0\0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\0\x4:\xff\xff\xff\xff\0\0\0\0\0\0\0\0)"
viewmode=tabbed

zoom-out-beyond-of-folio=false
etc

[elementeditor]
default-informations=
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x2\0\0\0\0\0\0\0\0\0\x1\0\0\n\xb6\0\0\x5\xd7\0\0\0\0\0\0\0\x14\0\0\x2\x8d\0\0\x1\xa1\0\0\0\0\x2\0\0\0\n\xb7)
state=@ByteArray(\0\0\0\xff\0\0\0\0\xfd\0\0\0\x1\0\0\0\x1\0\0\x1\xa8\0\0\x5`\xfc\x2\0\0\0\x2\xfb\0\0\0\x18\0i\0n\0\x66\0o\0r\0m\0\x61\0t\0i\0o\0n\0s\x1\0\0\0\x44\0\0\x1\xb8\0\0\0\x34\x1\0\0\x3\xfc\0\0\x1\xfd\0\0\x3\xa7\0\0\0\x92\x1\0\0\x1b\xfa\0\0\0\x1\x2\0\0\0\x2\xfb\0\0\0\b\0u\0n\0\x64\0o\x1\0\0\0\0\xff\xff\xff\xff\0\0\0v\x1\0\0\x3\xfb\0\0\0\x14\0p\0\x61\0r\0t\0s\0_\0l\0i\0s\0t\x1\0\0\0\0\xff\xff\xff\xff\0\0\0v\x1\0\0\x3\0\0\b\xe8\0\0\x5`\0\0\0\x4\0\0\0\x4\0\0\0\b\0\0\0\b\xfc\0\0\0\x2\0\0\0\0\0\0\0\x1\0\0\0\n\0p\0\x61\0r\0t\0s\x3\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\x2\0\0\0\x4\0\0\0\x1a\0\x64\0\x65\0p\0t\0h\0_\0t\0o\0o\0l\0\x62\0\x61\0r\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\x18\0m\0\x61\0i\0n\0_\0t\0o\0o\0l\0\x62\0\x61\0r\x1\0\0\0\x96\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\xe\0\x64\0i\0s\0p\0l\0\x61\0y\x1\0\0\x1\xc4\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\x1e\0\x65\0l\0\x65\0m\0\x65\0n\0t\0_\0t\0o\0o\0l\0\x62\0\x61\0r\x1\0\0\x2\x16\xff\xff\xff\xff\0\0\0\0\0\0\0\0)

etc

Hi Haroldo,

A new Qelectrotech Icon for the editing window appears on the system tray bar but the windows "don't appear"

Very strange, you can't switch to editor with ALT -TAB shortcuts?

Have you tried to delete QET config keys in regedit, if the version is installer?
Is the installer, or ReadyToUse version?

3,685

(8 replies, posted in Export DXF)

Here DXF export commits :
https://git.tuxfamily.org/qet/qet.git/l … &q=dxf 

3,686

(8 replies, posted in Export DXF)

Hi Ronny,

in exportdialog you can found functions to export project to DXF :

// Determine les elements a "XMLiser"
 
        foreach(QGraphicsItem *qgi, diagram -> items()) {
 
            if (Element *elmt = qgraphicsitem_cast<Element *>(qgi)) {
 
                list_elements << elmt;
 
            } else if (Conductor *f = qgraphicsitem_cast<Conductor *>(qgi)) {
 
                list_conductors << f;
 
            } else if (IndependentTextItem *iti = qgraphicsitem_cast<IndependentTextItem *>(qgi)) {
 
                list_texts << iti;
 
            } else if (DiagramImageItem *dii = qgraphicsitem_cast<DiagramImageItem *>(qgi)) {
 
                list_images << dii;
 
            } else if (QetShapeItem *dii = qgraphicsitem_cast<QetShapeItem *>(qgi)) {
 
                list_shapes << dii;
 
            } else if (DynamicElementTextItem *deti = qgraphicsitem_cast<DynamicElementTextItem *>(qgi)) {
 
                list_texts << deti;
 
            }
 
        }
 
    }

After for parsing to QTextStream


//Draw elements
    foreach(Element *elmt, list_elements)
    {
        double rotation_angle = elmt -> orientation() * 90;
 
        qreal elem_pos_x = elmt -> pos().x();
        qreal elem_pos_y = elmt -> pos().y();// - (diagram -> margin / 2);
 
        qreal hotspot_x = (elem_pos_x) * Createdxf::xScale;
        qreal hotspot_y = Createdxf::sheetHeight - (elem_pos_y) * Createdxf::yScale;
 
        ElementPictureFactory::primitives primitives = ElementPictureFactory::instance()->getPrimitives(elmt->location());
 
        for(QGraphicsSimpleTextItem *text : primitives.m_texts)
        {
            qreal fontSize = text->font().pointSizeF();
            if (fontSize < 0)
                fontSize = text->font().pixelSize();
 
            fontSize *= Createdxf::yScale;
            qreal x = elem_pos_x + text->pos().x();
            qreal y = elem_pos_y + text->pos().y();
            x *= Createdxf::xScale;
            y = Createdxf::sheetHeight - (y * Createdxf::yScale);// - fontSize;
            QPointF transformed_point = rotation_transformed(x, y, hotspot_x, hotspot_y, rotation_angle);
            x = transformed_point.x();
            y = transformed_point.y();
            QStringList lines = text->text().split('\n');
            y += (fontSize/2) * (lines.count()-1);
            for (QString line : lines)
            {
                qreal angle = 360 - (text->rotation() + rotation_angle);
                if (line.size() > 0 && line != "_" ) {
                    Createdxf::drawText(file_path, line, x, y, fontSize, angle, 0);
                }
                angle += 1080;
                // coordinates for next line
                if (int(angle) % 360 == 0) // no rotation
                    y -= fontSize*1.06;
                else if (int(angle - 180) % 360 == 0) // 180 degrees rotation
                    y += fontSize*1.06;
                else if (int(angle - 270) % 360 == 0) // 270 degrees rotation
                    x -= fontSize*1.06;
                else // ((angle - 90) % 360 == 0) 90 degrees rotation
                    x += fontSize*1.06;
            }
        }
 
        for (QLineF line : primitives.m_lines)
        {
            qreal x1 = (elem_pos_x + line.p1().x()) * Createdxf::xScale;
            qreal y1 = Createdxf::sheetHeight - (elem_pos_y + line.p1().y()) * Createdxf::yScale;
            QPointF transformed_point = rotation_transformed(x1, y1, hotspot_x, hotspot_y, rotation_angle);
            x1 = transformed_point.x();
            y1 = transformed_point.y();
            qreal x2 = (elem_pos_x + line.p2().x()) * Createdxf::xScale;
            qreal y2 = Createdxf::sheetHeight - (elem_pos_y + line.p2().y()) * Createdxf::yScale;
            transformed_point = rotation_transformed(x2, y2, hotspot_x, hotspot_y, rotation_angle);
            x2 = transformed_point.x();
            y2 = transformed_point.y();
            Createdxf::drawLine(file_path, x1, y1, x2, y2, 0);
        }
 
        for (QRectF rect : primitives.m_rectangles)
        {
            qreal x1 = (elem_pos_x + rect.bottomLeft().x()) * Createdxf::xScale;
            qreal y1 = Createdxf::sheetHeight - (elem_pos_y + rect.bottomLeft().y()) * Createdxf::yScale;
            qreal w = rect.width() * Createdxf::xScale;
            qreal h = rect.height() * Createdxf::yScale;
            // opposite corner
            qreal x2 = x1 + w;
            qreal y2 = y1 + h;
            QPointF transformed_point = rotation_transformed(x1, y1, hotspot_x, hotspot_y, rotation_angle);
            x1 = transformed_point.x();
            y1 = transformed_point.y();
            transformed_point = rotation_transformed(x2, y2, hotspot_x, hotspot_y, rotation_angle);
            x2 = transformed_point.x();
            y2 = transformed_point.y();
            qreal bottom_left_x = (x1 < x2) ? x1 : x2;
            qreal bottom_left_y = (y1 < y2) ? y1 : y2;
            w = (x1 < x2) ? x2-x1 : x1-x2;
            h = (y1 < y2) ? y2-y1 : y1-y2;
            Createdxf::drawRectangle(file_path, bottom_left_x, bottom_left_y, w, h, 0);
        }
 
        for (QRectF circle_rect : primitives.m_circles)
        {
            qreal x1 = (elem_pos_x + circle_rect.center().x()) * Createdxf::xScale;
            qreal y1 = Createdxf::sheetHeight - (elem_pos_y + circle_rect.center().y()) * Createdxf::yScale;
            qreal r = circle_rect.width() * Createdxf::xScale / 2;
            QPointF transformed_point = rotation_transformed(x1, y1, hotspot_x, hotspot_y, rotation_angle);
            x1 = transformed_point.x();
            y1 = transformed_point.y();
            Createdxf::drawCircle(file_path, r, x1, y1, 0);
        }
 
        for (QVector<QPointF> polygon : primitives.m_polygons)
        {
            if (polygon.size() == 0)
                continue;
            qreal x1 = (elem_pos_x + polygon.at(0).x()) * Createdxf::xScale;
            qreal y1 = Createdxf::sheetHeight - (elem_pos_y + polygon.at(0).y()) * Createdxf::yScale;
            QPointF transformed_point = rotation_transformed(x1, y1, hotspot_x, hotspot_y, rotation_angle);
            x1 = transformed_point.x();
            y1 = transformed_point.y();
            for (int i = 1; i < polygon.size(); ++i ) {
                qreal x2 = (elem_pos_x + polygon.at(i).x()) * Createdxf::xScale;
                qreal y2 = Createdxf::sheetHeight - (elem_pos_y + polygon.at(i).y()) * Createdxf::yScale;
                QPointF transformed_point = rotation_transformed(x2, y2, hotspot_x, hotspot_y, rotation_angle);
                x2 = transformed_point.x();
                y2 = transformed_point.y();
                Createdxf::drawLine(file_path, x1, y1, x2, y2, 0);
                x1 = x2;
                y1 = y2;
            }
        }
 
        // Draw arcs and ellipses
        for (QVector<qreal> arc : primitives.m_arcs)
        {
            if (arc.size() == 0)
                continue;
            qreal x = (elem_pos_x + arc.at(0)) * Createdxf::xScale;
            qreal y = Createdxf::sheetHeight - (elem_pos_y + arc.at(1)) * Createdxf::yScale;
            qreal w = arc.at(2) * Createdxf::xScale;
            qreal h = arc.at(3) * Createdxf::yScale;
            qreal startAngle = arc.at(4);
            qreal spanAngle = arc .at(5);
            Createdxf::drawArcEllipse(file_path, x, y, w, h, startAngle, spanAngle, hotspot_x, hotspot_y, rotation_angle, 0);
        }
    }
 
    //Draw conductors
    foreach(Conductor *cond, list_conductors) {
        foreach(ConductorSegment *segment, cond -> segmentsList()) {
            qreal x1 = (segment -> firstPoint().x()) * Createdxf::xScale;
            qreal y1 = Createdxf::sheetHeight - (segment -> firstPoint().y() * Createdxf::yScale);
            qreal x2 = (segment -> secondPoint().x()) * Createdxf::xScale;
            qreal y2 = Createdxf::sheetHeight - (segment -> secondPoint().y() * Createdxf::yScale);
            Createdxf::drawLine(file_path, x1, y1, x2, y2, 0);
        }
        //Draw conductor text item
        ConductorTextItem *textItem = cond -> textItem();
        if (textItem) {
            qreal fontSize = textItem -> font().pointSizeF();
            if (fontSize < 0)
                fontSize = textItem -> font().pixelSize();
            fontSize *= Createdxf::yScale;
            qreal x = (textItem -> pos().x()) * Createdxf::xScale;
            qreal y = Createdxf::sheetHeight - (textItem -> pos().y() * Createdxf::yScale) - fontSize;
            QStringList lines = textItem->toPlainText().split('\n');
            foreach (QString line, lines) {
                qreal angle = 360 - (textItem -> rotation());
                if (line.size() > 0 && line != "_" )
                    Createdxf::drawText(file_path, line, x, y, fontSize, angle, 0 );
 
                angle += 1080;
                // coordinates for next line
                if (int(angle) % 360 == 0) // no rotation
                    y -= fontSize*1.06;
                else if (int(angle - 180) % 360 == 0) // 180 degrees rotation
                    y += fontSize*1.06;
                else if (int(angle - 270) % 360 == 0) // 270 degrees rotation
                    x -= fontSize*1.06;
                else // ((angle - 90) % 360 == 0) 90 degrees rotation
                    x += fontSize*1.06;
            }
 
        }
    }
 
    //Draw text items
    foreach(DiagramTextItem *dti, list_texts) {
        qreal fontSize = dti -> font().pointSizeF();
        if (fontSize < 0)
            fontSize = dti -> font().pixelSize();
        fontSize *= Createdxf::yScale;
        qreal x = (dti->scenePos().x()) * Createdxf::xScale;
        qreal y = Createdxf::sheetHeight - (dti->scenePos().y() * Createdxf::yScale) - fontSize*1.05;
        QStringList lines = dti -> toPlainText().split('\n');
        foreach (QString line, lines) {
            qreal angle = 360 - (dti -> rotation());
            if (line.size() > 0 && line != "_" )
                Createdxf::drawText(file_path, line, x, y, fontSize, angle, 0);
 
            angle += 1080;
            // coordinates for next line
            if (int(angle) % 360 == 0) // no rotation
                y -= fontSize*1.06;
            else if (int(angle - 180) % 360 == 0) // 180 degrees rotation
                y += fontSize*1.06;
            else if (int(angle - 270) % 360 == 0) // 270 degrees rotation
                x -= fontSize*1.06;
            else // ((angle - 90) % 360 == 0) 90 degrees rotation
                x += fontSize*1.06;
        }
    }
    Createdxf::dxfEnd(file_path);
 
saveReloadDiagramParameters(diagram, false);
}
 
void ExportDialog::fillRow(const QString& file_path, const QRectF &row_rect, QString author, const QString& title,
                             QString folio, QString date)
{
    qreal x = row_rect.bottomLeft().x();
    qreal y = row_rect.bottomLeft().y();
 
    x *= Createdxf::xScale;
    y = Createdxf::sheetHeight - y * Createdxf::yScale;
    qreal height = row_rect.height() * Createdxf::yScale *0.7;
    y += height*0.2;
 
    Createdxf::drawTextAligned(file_path, std::move(folio),
                             x + 0.02*DiagramFolioList::colWidths[0]*row_rect.width()*Createdxf::xScale, y, height, 0, 0, 5, 0,
                             x + 0.95*DiagramFolioList::colWidths[0]*row_rect.width()*Createdxf::xScale, 0);
 
    x += DiagramFolioList::colWidths[0]*row_rect.width()*Createdxf::xScale;
    QString heading = tr("Titre");
    if (title == heading)
        Createdxf::drawTextAligned(file_path, title,
                                 x + 0.02*DiagramFolioList::colWidths[1]*row_rect.width()*Createdxf::xScale, y, height, 0, 0, 5, 0,
                                 x + 0.02*DiagramFolioList::colWidths[1]*row_rect.width()*Createdxf::xScale, 0);
    else
        Createdxf::drawTextAligned(file_path, title,
                                 x + 0.02*DiagramFolioList::colWidths[1]*row_rect.width()*Createdxf::xScale, y, height, 0, 0, 5, 0,
                                 x + 0.02*DiagramFolioList::colWidths[1]*row_rect.width()*Createdxf::xScale, 0, true);
 
    x += DiagramFolioList::colWidths[1]*row_rect.width()*Createdxf::xScale;
    Createdxf::drawTextAligned(file_path, std::move(author),
                             x + 0.02*DiagramFolioList::colWidths[2]*row_rect.width()*Createdxf::xScale, y, height, 0, 0, 5, 0,
                             x + 3.02*DiagramFolioList::colWidths[2]*row_rect.width()*Createdxf::xScale, 0);
 
    x += DiagramFolioList::colWidths[2]*row_rect.width()*Createdxf::xScale;
    Createdxf::drawTextAligned(file_path, std::move(date),
                             x + 0.02*DiagramFolioList::colWidths[3]*row_rect.width()*Createdxf::xScale, y, height, 0, 0, 5, 0,
                             x + 5.02*DiagramFolioList::colWidths[3]*row_rect.width()*Createdxf::xScale, 0);
}
 
QPointF ExportDialog::rotation_transformed(qreal px, qreal py , qreal origin_x, qreal origin_y, qreal angle) {
 
    angle *= -3.14159265 / 180;
 
    float s = sin(angle);
    float c = cos(angle);
 
    // Vector to rotate:
    qreal Vx = px - origin_x;
    qreal Vy = py - origin_y;
 
    // rotate vector
    float xnew = Vx * c - Vy * s;
    float ynew = Vx * s + Vy * c;
 
    return QPointF(xnew + origin_x, ynew + origin_y);
}

Hi,

like this warning message "You are not allowed to modify this element. Thus it will be edited read-only."?

  https://qelectrotech.org/forum/viewtopic.php?id=953 

nice. ;-)

  https://qelectrotech.org/forum/viewtopi … 6411#p6411 

QET isn't a CAO for make plans of scales like autocad , freecad, librecad, but for electrical diagrams.
But some people get there, e.g Nuri.https://qelectrotech.org/gallery/photos/nuri_schaltschrankaufbau_-_innenansicht.png

Hi Jamis,

draw your schematic like for A4, and try printing on A3 printer.
Columns and rows isn't for printer paper but for scaling element view in your diagrams.
What you see in print preview  is what will be normalhy printed, after try use the wole page option, or fit folio to page.

I only have this workaround in mind for now, sorry.
I don't know, but in a future we maybe can have possibility to add internal conductor in element, for now I think is very compilcated addon.
We are a little team and only work on our free time at home after work on QET...and owr jobs is very exhausting dependy on days ...


Cheers,
Laurent

NB: is it possible to had button to reload project ?

Why?, delete old folio list pages and generate a new summary page again.

3,695

(8 replies, posted in Export DXF)

Thanks Ronny.

but convertion not read the XML but the mapscene.
I hope Joshua can explain it better than me. ;-)

@Galexis : changed on GIT

https://git.tuxfamily.org/qet/qet.git/t … labels.xml

Great. ;-)

  https://git.tuxfamily.org/qet/qet.git/c … a0bb602d0b 

Put this style.css in your ~/.qet folder and disable use system color in settings.
Not perfect but it should be better.

https://download.qelectrotech.org/qet/forum_img/black-theme.png