176

(23 replies, posted in Code)

@Re-searcher:

I do not know, what you are complaining about:
The settings does exactly, what it is made for: "Set the grid-dot-size to the value in the spinbox"
It looks like you chose a setting of "5" for the screenshots you made.
When I look at your screenshots, all grid-dots in both screenshots have the same height and width of 5x5.

And as written before:
The size of the grid-points does not change with zoom-factor in QET!

In relation the points look smaller, when zooming in a design.
But that's just an optical illusion:
Use a graphic-software to check the size in both screenshots!
You will see, that all points have the same size of "5x5" in your screenshots.

In the attachment you see both of your screenshots zoomed to 1200% with GIMP (no shouting here: it spells with capital letters).
I marked the diagonal of your black dots with red pixels, so you can count: 5 in each of your screenshots.

177

(117 replies, posted in Code)

Hallo Achim,

achim wrote:

Wenn man ein schon plaziertes Terminal-Element mit der Leertaste
rotiertieren will, springt das Terminal auf den Ursprong (0,0) zurück.
Ist sicher nicht so gewollt.

Richtig: Das ist nicht so gewollt und es betrifft nicht nur Terminals.
Das ist mir auch schon aufgefallen und bedarf noch etwas Hirnschmalz.
Habe das Verhalten für den Moment aber billigend in Kauf genommen, weil das Ergebnis (Rotieren, Spiegeln, Umdrehen) deutlich besser ist, als was wir vorher hatten.

Zwischendurch das Element speichern und neu laden, hilft aber!


Addendum:
I'm working on a solution ... looks better at first glance!

2nd addendum (edited):
Fix released with version ...git8427...

178

(117 replies, posted in Code)

Hallo Achim,

Danke für Deine Rückmeldung!

Es geht primär darum, daß das mal jemand anderes ausprobiert, ob alles noch so geht, wie vorher:
Aus einem Schaltplan ein Element löschen, das mehrere Verbindungen an einem Anschlußpunkt hat, wiederherstellen, etc.

Manchmal sieht man den Wald vor lauter Bäumen nicht und wird "Betriebsblind" und sieht die eigenen Fehler nicht,

Dann werde ich das mal als PR einreichen.

179

(117 replies, posted in Code)

Hello everybody!

I would like to get rid of those many Qt5/Qt6 - differentiations in sourcecode, so I tried something that seems to work for both, but to be sure:
Can someone please test this patch with undocommand/deletegraphicsitemcommand

diff --git a/sources/undocommand/deleteqgraphicsitemcommand.cpp b/sources/undocommand/deleteqgraphicsitemcommand.cpp
index 5aa85ca42..632c64a9a 100644
--- a/sources/undocommand/deleteqgraphicsitemcommand.cpp
+++ b/sources/undocommand/deleteqgraphicsitemcommand.cpp
@@ -179,7 +179,7 @@ void DeleteQGraphicsItemCommand::setPotentialsOfRemovedElements()
                     //If a conductor was already created between these two terminals
                     //in this undo command, from another removed element, we do nothing
                 bool exist_ = false;
-                for (QPair<Terminal *, Terminal *> pair : m_connected_terminals)
+                for (std::pair<Terminal *, Terminal *> pair : m_connected_terminals)
                 {
                     if  (pair.first == hub_terminal && pair.second == t) {
                         exist_ = true;
@@ -192,14 +192,8 @@ void DeleteQGraphicsItemCommand::setPotentialsOfRemovedElements()
 
                 if (exist_ == false)
                 {
-#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)    // ### Qt 6: remove
-                    m_connected_terminals.append(qMakePair<Terminal *, Terminal *>(hub_terminal, t));
-#else
-#if TODO_LIST
-#pragma message("@TODO remove code for QT 6 or later")
-#endif
-                    qDebug()<<"Help code for QT 6 or later";
-#endif
+                    m_connected_terminals.append(std::make_pair<Terminal *, Terminal *>((Terminal *)hub_terminal, (Terminal *)t));
+                    qInfo() << "m_connected_terminals" << m_connected_terminals;
                     Conductor *new_cond = new Conductor(hub_terminal, t);
                     new_cond->setProperties(properties);
                     new AddGraphicsObjectCommand(new_cond, t->diagram(), QPointF(), this);
diff --git a/sources/undocommand/deleteqgraphicsitemcommand.h b/sources/undocommand/deleteqgraphicsitemcommand.h
index 2f03ed050..c4ad2946b 100644
--- a/sources/undocommand/deleteqgraphicsitemcommand.h
+++ b/sources/undocommand/deleteqgraphicsitemcommand.h
@@ -52,7 +52,7 @@ class DeleteQGraphicsItemCommand : public QUndoCommand
         QHash <Element *, QList<Element *> > m_link_hash; /// keep linked element for each removed element linked to other element.
         QHash <DynamicElementTextItem *, Element *> m_elmt_text_hash; /// Keep the parent element of each deleted dynamic element text item
         QHash <DynamicElementTextItem *, ElementTextItemGroup *> m_grp_texts_hash; ///Keep the parent group of each deleted element text item
-        QList <QPair<Terminal *, Terminal *>> m_connected_terminals;
+        QList <std::pair<Terminal *, Terminal *>> m_connected_terminals;
         QHash <QetGraphicsTableItem *, QPointer<QGraphicsScene>> m_table_scene_hash;
         bool m_remove_linked_table = false;
 };

These functions handle the case that an element, that has more than one connections at one terminal, is deleted and then recovered again.
Don't want to demolish basic functions, so to be sure...

Thanks in advance!

In my opinion, it would be a great improvement if we could get rid of these two! It seems that QET is the only project that uses these two libraries and they keep causing problems when using Qt-Creator. When searching the web for these two libraries it always comes back to the same results in this forum...

I will try your solution later and report back

EDIT:
As far as I can see, the code for ColorButton and ColorComboBox works fine and I could eliminate KWidgetsAddons from includes and libs!

I found a better solution for using KF6CoreAddons and KF6WidgetsAddons from distribution-packages!

In my local qelectrotech.pro I added these lines to global part, so that the include-files can be found:

INCLUDEPATH += /usr/include/KF6/KCoreAddons
INCLUDEPATH += /usr/include/KF6/KWidgetsAddons

The linker needs the information, where to find the libs, so I added these lines to the "unix"-section:

LIBS += /usr/lib/x86_64-linux-gnu/libKF6CoreAddons.so
LIBS += /usr/lib/x86_64-linux-gnu/libKF6WidgetsAddons.so

Now everything compiles and links fine without exclamation-marks or red texts in edit-lines in Qt-Creator!

This info might help someone install and use Qt-Creator on Linux to help develop QElectroTech!

182

(23 replies, posted in Code)

An explanation:
The height and width of the grid-points does not grow with zoom-factor in QET!
It is always the number of pixels on your screen for width/height of the grid-points.
Maybe a maximum of "5" isn't enough for High-DPI-Screens. But that could be changed very easily in sources...

183

(23 replies, posted in Code)

... works also in element-editor:

184

(23 replies, posted in Code)

@Re-searcher:
There is no need to shout!
I can read small letters, too!

What version of QElectroTech do you use?
Add screenshots of settings and grid to your next post.

I use Debian GNU/Linux trixie/sid and most recent QET-version from repository and also tried last binary from QET-download-site for windows this morning:
On both systems:
Changing grid-point-size works perfectly!

Maybe another user can share his/her experience with changing grid-points, too?

185

(23 replies, posted in Code)

Works also on win.

186

(23 replies, posted in Code)

some settings changed in forum: can only attach one file per post...
Here the same view with setting: 5px
note: there are some optical artifacts because of zoom-factor

187

(23 replies, posted in Code)

Would not have published that code, if it didn't work!
you need to zoom in or out once, after changing the setting to see the changes

Salut Laurent !

Thanks for your hint, but: Was already installed.

$ dpkg -l | grep pkg-config
ii  pkg-config:amd64   1.8.1-4  amd64  manage compile and link flags for libraries (transitional package)
$

Package will be replaced in (near) future:

$ apt-cache search pkg-config
pkgconf-bin - Verwaltung der Compiler- und Linker-Schalter für Bibliotheken (Programm
pkg-config - Verwaltung der Compiler- und Linker-Schalter für Bibliotheken (Übergangspaket)
pkgconf - Verwaltung der Compiler- und Linker-Schalter für Bibliotheken
$

In the meantime I could manage to compile QET-Sources, with the help of Qt-Creator:
I adjusted the settings for make-command in build-settings.
It feels a bit strange, as there is a message with an exclamation-mark that says that the build will be overwritten and the text in edit-field for build-dir is marked red...
But it compiles and I could already solve some more of the "#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)" - things! nomicons/smile

Hello everybody,

I have a strange phenomenon, that I would like to understand and get rid of...

There is a fresh installed Debian unstable with QET-Sources from github-branch "qt6-cmake".
From commandline everything compiles fine from cmake, qmake and make.

But sometimes it is much more comfortable to use an IDE to edit sourcefiles and start compilation by clicking a button.

So I installed Qt Creator 15.0.1 based on Qt 6.7.2 (GCC 14.2.0, x86_64) on top of it, imported the QET-codestyle-settings and clicked "compile".
And that's where the phenomenon comes to light: It won't compile, because some header-files cannot be found, see also attachment.

To remember: Everything compiles fine from commandline, so all headers are on the system:

$ dpkg -l | grep libkf6 | grep addons-dev
ii  libkf6coreaddons-dev:amd64  6.11.0-1  amd64  KDE Frameworks 6 addons to QtCore - development files
ii  libkf6widgetsaddons-dev     6.11.0-1  amd64  development files for kwidgetsaddons
$

So there is a setting in Qt-Creator that has to be adjusted to be able to compile from IDE, but I don't see it!

Is there someone who can help "cleaning my glasses"???

There is something basic missing ...

What version of QElectroTech do you use?
"menu" -> "Help" -> "About QElectroTech" -> tab "Version"

It seems, you're a new user of QElectroTech:
You should use this (or newer) version to have some additional info in log-file:
https://download.qelectrotech.org/qet/b … 5-02-17-1/

Now to the plugin:

Did you download the exe-file of plugin as suggested from github?
https://github.com/raulroda/qet_tb_gene … aster/dist

Did you rename the exe-file of plugin to "qet_tb_generator.exe"?

Did you copy the exe-file of plugin to "AppDataLocation"\binary\qet_tb_generator.exe ?

What does the log-file say about "App Data Location"?
"menu" -> "Help" -> "About QElectroTech" -> tab "Log"

What does the log-file say about "qet_tb_generator not found: ..." and "qet_tb_generator found here: ..."
after loading a project and clicking on "menu" -> "Project" -> "Launch the terminal block creation plugin"?
"menu" -> "Help" -> "About QElectroTech" -> tab "Log"


Please answer ALL questions!

191

(117 replies, posted in Code)

Now, what I wanted to write in my own name!!!

Sorry again!

----------------------------------

Ok ... as I don't compile with Qt6, yet ...

In Qt-docs there is a function for casting QString to QUuid.

When I eliminate the "#if QT_VERSION..." and use this code with Qt5:

    foreach (QDomElement qdo, uuid_list) {
        tmp_uuids_link << QUuid(qdo.attribute(QStringLiteral("uuid")));
    }
    qInfo() << "tmp_uuids_link: " << tmp_uuids_link;

there are no compilation-errors or warnings and when I open a project with XRefs it prints the UUIDs to log-file and in the diagram I see all XRefs as before.

I see no reason, that something like that should not work for Qt6...

192

(117 replies, posted in Code)

I wonder what is Qt5- or Qt6-specific about this line?
If I understand correctly, the linked elements are passed there ... they are also needed when compiling with Qt6.

Why don't you just download the binary from github-page and use that?
In that case you do not have to compile it yourself...
https://github.com/raulroda/qet_tb_gene … aster/dist

With a recent 0100-dev - version of QET you find something like this in the log-file
"menu" -> "Help" -> "About QElectroTech" -> tab "Log"

12:35:21.187 Info:  For data-files (user-/company-collections, titleblocks, etc.):
12:35:21.187 Info:  App Data Location: "C:/Tools/qelectrotech/conf"

Use your favorite file-browser to create the subdir "binary" in "App Data Location" and place binary "qet_tb_generator.exe" there.

Then you can use the plugin from QET-Project-Menu.

When starting the plugin, something like this is written to log-file:

12:36:54.665 Info:  project to use for qet_tb_generator:  "C:/Users/ich/Documents/ohne Namen.qet"
12:36:54.665 Info:  qet_tb_generator found here: "C:/Tools/qelectrotech/conf/binary/qet_tb_generator.exe"

Prerequisites for the plugin:
A saved project must be loaded. That project contains terminals that are named according to the scheme “X1:1, X1:2, etc” and are also connected somewhere.

jiridobrovolny wrote:

Please add option in program settings for change size of dots

Found a solution for changing grid-dot-size in general config-page that is saved in settings.
Implemented and published today.

195

(23 replies, posted in Code)

Created a PR at github for variable setting of grid-point-size.

Adjusted Erik's suggestion to be variable and have the possibility to set the value on general configuration-page and save setting in settings-file.

.

The revision-index is set per folio!
If you want to set all rev-indexes to the same global value, you need to use a project-variable and set this for each folio.

If you delete the post with the problem description, nobody will be able to understand what it was all about!
Nobody can find it in the forum search!

Your file is corrupt!
It contains many thousand lines only with a semicolon from line 7053!
Check with a text-editor and correct those lines!

EDIT:
You should also check your elements-collection for such lines!

200

(8 replies, posted in Import DXF)

Hello Vadoola,

no problem for me: Already deleted my fork!