Where did you try to find information about this topic so far?
Did you search the forum?

To make it short: Yes!

52

(8 replies, posted in Scripts)

Hallo Xander,

damit wir das alles besser verstehen können:
Vielleicht beschreibst du in ein paar Sätzen, was Du erreichen willst, welche Voraussetzungen im Schaltplan erfüllt sein müssen, etc. pp.

Grafisch ist das schon mal ziemlich beeindruckend!

53

(193 replies, posted in Import DXF)

missing attachment

54

(193 replies, posted in Import DXF)

@vadoola:

As also discussed in the other thread:
We are about to ship a few free fonts with QET. Among them is “osifont” which is often used as a font for CAD applications.
What do you think about specifying “osifont” as a font in converted elements for which no font is specified in the DXF?

When I look at the title block of the well-known “Wet Location Grip” file in LibreCAD and compare the font with “osifont” in QET, the font fits much better than a sans serif font.


Would like to have attached a screenshot, but something's still wrong with forum-settings: I cannot attach a file!

In preparation for the integration of the Liberation fonts in QET, I have updated the element collection.
In doing so, I converted the fonts of the elements to the Liberation substitution as good as possible. Until now there are no elements, which use osifont. The elements have also been tidied up a little.
As long as the fonts are not yet integrated into QET (the PR is still missing), the elements are only available in my github account for the time being.
As soon as the fonts for all systems are available in QET, the elements will be moved to the official collection.
Until then, the elements can be tested by users who have installed the Liberation fonts on their system anyway.
Objective feedback is welcome!


BTW:
It is possible but not needed, to edit the registry directly!
Changing the font-settings in configuration-page will do it for you!

baruse wrote:

cross reference and cable still in my mind, but now it doesn't work

It will be a challenge, to resolve all XRefs!  nomicons/wink

Some words about licenses.

To start with: I am not a lawyer!
If I understand it correctly, the MIT licence is the most permissive; even commercial use is allowed with acknowledgement of the original author.

Hello Baruse!

Very impressing! 
Even as an excited FreeCAD user... nomicons/smile

As I am still planning and writing a code to create wiring-plans from QET-Drawings, I struggle with coming-/ going-references and elements that aren't real parts like jumps and splices:
Does your script handle some of those?
Does your script handle diagrams that have more than one folio and use references?

Please don't feel offended: Just simple questions!

58

(23 replies, posted in Code)

Hallo Re-searcher!

Lass mich auf Deutsch anfangen, Englisch ist weiter unten.

Worin liegt der Unterschied zwischen diesen beiden Code-Fragmenten für "diagram.cpp":

QPen point(Qt::black, 1);
p -> setPen(point);

und

pen.setWidth(settings.value(QStringLiteral("diagrameditor/grid_pointsize"), 1).toInt());

Ich sehe diese Unterschiede:
Im ersten Fragment wird eine hardcodierte "1" als Stiftbreite eingetragen und im zweiten wird eine Stiftbreite aus der Konfigurationsdatei geladen. Ist kein Wert in der Konfigurationsdatei vorhanden, wird eine "1" eingetragen.

Im Ergebnis steht in beiden Fällen eine "1" als Stiftbreite.

Einen Nachteil hat das erste Code-Fragment aber leider: Es wird eine möglicherweise vorgegebene Stiftfarbe hardcodiert durch "Qt::black" ersetzt!


Nun zur Datei "elementview.cpp".

pen.setWidth(5);

und

pen.setWidth(settings.value(QStringLiteral("diagrameditor/grid_pointsize"), 1).toInt());

Im ersten Fall wird die Stiftbreite hardcodiert auf "5" gesetzt und im zweiten Fall auf den Wert aus der Konfigurationsdatei.


p -> drawLine(QLineF(gx - 0.8, gy, gx + 0.8, gy));
p -> drawLine(QLineF(gx, gy - 0.8, gx, gy + 0.8));

und

p -> drawLine(QLineF(gx - (pen.width()/4.0), gy, gx + (pen.width()/4.0), gy));
p -> drawLine(QLineF(gx, gy - (pen.width()/4.0), gx, gy + (pen.width()/4.0)));

Im ersten Fall wird die Linienlänge um von "-0.8" bis "+0.8" definiert und im zweiten Fall auf "Stiftbreite geteilt durch 4".
Für den Fall "Stiftbreite = 5" ist das Ergebnis identisch.

Zusammenfassung:
In einem Fall sind die Stiftbreiten hardcodiert und im zweiten Fall kommt die Stiftbreite aus der Konfigurationsdatei. Bei gleicher Einstellung für die Stiftbreite ist das Ergebnis auf dem Bildschirm das gleiche.
Seit ein paar Tagen ist die Raster-Punktgröße für den Schaltplaneditor und den Element-Editor sogar getrennt einstellbar, sodass man unterschiedliche Werte haben kann: Zum Beispiel "1" für den Schaltplaneditor und "5" für den Element-Editor, wie es in hardcodiertem Code der Fall wäre.

So ist Deine Idee mit anderer Punktgröße für das Raster in den Quellcode von QElectroTech gelangt, Re-searcher!
Die Ergänzung, daß es konfigurierbar ist, kann für die Benutzer nur von Vorteil sein.

Daß Du keine grafischen Artefakte siehst: Freue Dich doch!
Die fallen je nach Pixelgröße des Bildschirms optisch weniger auf!
Du hat einen UHD-Monitor, nicht wahr?

Ich hoffe, dass mit dieser Erklärung deutlich geworden ist, dass es ausdrücklich nicht darum geht, den Code-Vorschlag von jemandem nicht umzusetzen, sondern für uns und die Nutzer von QET eine gute Lösung zu haben!

Beste Grüße
  plc-user


Online-Translator


Hello Re-searcher!

What is the difference between these two code fragments for "diagram.cpp":

QPen point(Qt::black, 1);
p -> setPen(point);

and

pen.setWidth(settings.value(QStringLiteral("diagrameditor/grid_pointsize"), 1).toInt());

I see these differences:
In the first fragment, a hardcoded "1" is entered as the pen width and in the second, a pen width is loaded from the configuration file. If there is no value in the configuration file, a "1" is entered.

The result in both cases is a "1" as the pen width.

Unfortunately, the first code fragment has one disadvantage: a possibly predefined pen color is hardcoded and replaced by "Qt::black"!


Now to the "elementview.cpp" file.

pen.setWidth(5);

and

pen.setWidth(settings.value(QStringLiteral("diagrameditor/grid_pointsize"), 1).toInt());

In the first case, the pen width is hardcoded to "5" and in the second case to the value from the configuration file.


p -> drawLine(QLineF(gx - 0.8, gy, gx + 0.8, gy));
p -> drawLine(QLineF(gx, gy - 0.8, gx, gy + 0.8));

and

p -> drawLine(QLineF(gx - (pen.width()/4.0), gy, gx + (pen.width()/4.0), gy));
p -> drawLine(QLineF(gx, gy - (pen.width()/4.0), gx, gy + (pen.width()/4.0)));

In the first case, the line length is defined from "-0.8" to "+0.8" and in the second case to "pen width divided by 4".
In the case of "pen width == 5" (as in pen.setWidth(5)), the result is identical.


Summary:
In one case the pen widths are hardcoded and in the second case the pen width comes from the configuration file. With the same setting for the pen width, the result on the screen is the same.
Since a few days, the grid point size for the circuit diagram editor and the element editor can even be set separately, so that you can have different values: For example "1" for the schematic editor and "5" for the element editor, as would be the case in hardcoded code.

This is how your idea with a different point size for the grid got into the source code of QElectroTech, Re-searcher!
The addition that it is configurable can only be an advantage for users.

That you don't see any graphical artifacts: Rejoice!
Depending on the pixel size of the screen, they are less noticeable!
You have a UHD monitor, don't you?

I hope that this explanation has made it clear that it is explicitly not about not implementing someone's code proposal, but about having a good solution for us and the users of QET!

Best regards
  plc-user

59

(38 replies, posted in Code)

@scorpio810:
It's not just about the Registry-script:
It seems that many attachments are lost somehow!

If you look at this post from 20. February:
https://qelectrotech.org/forum/viewtopi … 099#p21099

There should be a png as attachment, but there is only a link!
When I follow the link, it says:

Bad request. The link you followed is incorrect or outdated.

Same here with post from 10. March
https://qelectrotech.org/forum/viewtopi … 220#p21220

Bad request. The link you followed is incorrect or outdated.

60

(38 replies, posted in Code)

@scorpio810:

scorpio810 wrote:

(...) forgot to Refresh hooks in attachments plugin....I'm tired!!!

Something's wrong with the forums' attachments, Laurent!
This afternoon, I attached a file and it was marked as "not allowed to download"
And now I don't see any attachment in the forum!

61

(38 replies, posted in Code)

I can reassure you, Laurent:
I understood that differently, too!

But it doesn't hurt to have such a script...  nomicons/wink

We need to inform the users, that we provide default-fonts for all systems from date x.
And we should also point out that the font should be chosen if users are thinking about or relying on cross-system data exchange.

Do we need to adjust the Elements-Collection, too?
This could be done with a small script, but we would need to agree on which fonts to replace with which others:
Sans Serif or Arial --> Liberation Sans
Serif or Times New Roman --> Liberation Serif
MS Shell Dlg --> ???

63

(16 replies, posted in Scripts)

Information für alle, die hier im Forum konkrete Hilfe erwarten:
Wir brauchen Informationen, welches Betriebssystem und welche QElectroTech-Version Du benutzt!
Erst dann kann es eine spezifische Hilfe geben!
In diesem Fall:

Online-Translator:

Information for all those who expect specific help here in the forum:
We need information about which operating system and which QElectroTech version you are using!
Only then can we provide specific help!
In this case:

Traducteur en ligne :

Information pour tous ceux qui attendent une aide concrète sur ce forum :
Nous avons besoin d'informations sur le système d'exploitation et la version de QElectroTech que tu utilises !
Ce n'est qu'alors qu'il sera possible d'obtenir une aide spécifique !
Dans ce cas :

C:\Documents and Settings\<username>\Application Data\qet

For the time of the changeover to ‘Liberation Sans’ as default-font:
Should we give our win users the option to change the default font to ‘Liberation Sans’ in the registry?
This could be done with a *.bat, *.cmd or *.reg file, I think...

EDIT:
This should be it:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\QElectroTech\QElectroTech]
"diagramitemfont"="Liberation Sans"
"diagramitemsize"=dword:00000009
"diagramitemstyle"="Regular"
"diagramitemweight"=dword:00000032


[HKEY_CURRENT_USER\Software\QElectroTech\QElectroTech\diagrameditor]
"dynamic_text_font"="Liberation Sans,9,-1,5,50,0,0,0,0,0,Regular"
"independent_text_font"="Liberation Sans,9,-1,5,50,0,0,0,0,0,Regular"

cite from Bugtracker:

Workaround:
- Download however you prefer, FireFox, Safari, etc
- Expand the arm64 zip with terminal: unzip qelectrotech-xxxxxxx-arm64.zip
- Launch .app as usual, and be presented with confirmation to open a functioning application with proper validation

I noticed that downloading the ARM64 archive and expanding with the double-click Archive Utility, the resultant application reports as corrupt. I'm not sure why exactly. Clearly there are differences between the terminal application and the GUI Archive Utility - I'm sure there are reasons.

https://github.com/qelectrotech/qelectr … issues/307

Free software should only use free "ingredients"!

Therefore:
We are on a very good way to solve this age-old problem!

You're not living up to your name at the moment:  nomicons/wink
It looks like, you did not read the last few posts in this thread!

68

(23 replies, posted in Code)

plc-user wrote:

@Re-searcher:
You still did not explain, what you think does "not work" with bigger grid-points.
You need to explain, what you expect to see with bigger points!

If you can't or won't explain what you expect, no one can help you!

The implementation of texts and fonts is not finished in dxf2elmt.
That is why the font selection can still be described as hardcoded and “temporary”!

There is no need to hurry, Laurent!

EDIT:

scorpio810 wrote:

so I'll give you my consent if anyone wants to do it.

elevatormind already included the fonts in his "liberation-fonts"-Branch and I added a patch for setting default-font to "Liberation Sans" here. See above


But to repeat the reasons, why delivering a few fonts with QET is a good idea:

The user still has complete freedom to do whatever he wants!
If he wants to be compatible with different systems, it is suggested to use the fonts that QET provides.
If he wants to use other fonts, he can and may of course continue to do so!
He just needs to be aware that the particular font he has selected may not be available on other systems. This may even be the case if he re-installs his operating system.
That's why we supply a few fonts that can be used in addition to the fonts already available in the system!

There will be no limitation!
It is not so, that we only have the fonts available to use, which are coming with QET:
Still all fonts available on your system can be chosen to use with texts in QET.
So in this point there would be no change to the user!
And if the user is upgrading the QET-version and has set some font in Config-Page they wouldn't even notice a change!

72

(38 replies, posted in Code)

Lade doch erstmal nur den Quellcode inklusive einer kurzen Beschreibung in einem Post hoch.
Damit können wir doch schon mal anfangen...

Do you think, we should include Symbol-Fonts, too, Laurent?
That would "blow-up" the binary of QET even more!

As already said: I would limit the number of fonts to three Liberation-Fonts (or four including osifont) to have the basic fonts available on all systems with the default set to one of these.
That will possibly be enough for 90% of our users, I think.

And with the possibility to enter/display unicode-signs even with Liberation we'll have many symbols "on board". Sample in screenshot.

74

(38 replies, posted in Code)

Git ist eine Versions-Verwaltung für Quellcode und github ist ein Onlinedienst zur gemeinschaftlichen Versionsverwaltung für Softwareprojekte.
Quelle: Wikipedia

Dort stellst Du primär den Quellcode nebst einer Beschreibung Deiner Anwendung zur Verfügung.

Wenn es Abhängigkeiten gibt, müssen die natürlich irgendwie ersichtlich sein: "RTFM" geht nur, wenn es auch "FM" gibt!

Dort können auch Releases veröffentlicht werden, die als Binärpakete (in Deinem Fall ein AppImage) verfügbar sind.

75

(38 replies, posted in Code)

Im günstigsten Fall hast Du einen github-Account, auf dem Du Sourcecode und Releases veröffentlichst.
Dann kann sich jeder den Quellcode anschauen, weiter verbessern, PullRequests erstellen, etc. pp.