No need to hurry: health comes first!

plc-user wrote:

Ich verstehe das so, daß die Datei qet_labels.xml in Dein eigenes Element-Verzeichnis gehört.

Ins Basis-Verzeichnis der Benutzersammlung!
In der Firmensammlung funktioniert das (noch) nicht.

KORREKTUR:
In der Firmensammlung funktioniert das genauso!

Salut Laurent !

On QET download-page for win it says:

Ready-to-use versions are PORTABLE versions: they don't need to be installed!

But when using it, it creates it's configuration in registry ... hmm ...  not really portable!
To be really portable it would be necessary to write the config to a file in sub-dir "conf" in the Ready-To-Use - folder.

Then it would be possible to carry the whole Ready-To-Use - folder to another system and have everything like before. Especially when we think about the near future, when we also ship some fonts with QET.

What do you think, Laurent?
Would it be a big effort to have the configuration in a file for the win Ready-To-Use - version?

104

(39 replies, posted in Code)

plc-user wrote:

Auch, wenn Du den Text als Link markierst und den Text als Ziel-Adresse definieren kannst:
Das Ziel muss auch wissen, daß es Ziel ist, (...)

In the meantime, I have written a code that creates a position list with links and targets in the print module that can be used to insert PDF links.
I just haven't found anything in the Qt docs that explains what a link or a corresponding target should look like so that it works in the PDF file!

***** find positions for PDF-internal links...
XRef from page 3 QPoint(1380,620) to page 4 QPoint(120,440)
XRef from page 3 QPoint(1380,770) to page 4 QPoint(120,90)
XRef from page 3 QPoint(1380,640) to page 4 QPoint(120,420)
XRef from page 3 QPoint(1380,600) to page 4 QPoint(120,400)
XRef from page 3 QPoint(1380,790) to page 4 QPoint(120,110)
XRef from page 4 QPoint(120,90) to page 3 QPoint(1380,770)
XRef from page 4 QPoint(1320,90) to page 5 QPoint(120,90)
XRef from page 4 QPoint(120,110) to page 3 QPoint(1380,790)
XRef from page 4 QPoint(120,440) to page 3 QPoint(1380,620)
XRef from page 4 QPoint(1320,110) to page 5 QPoint(120,110)
XRef from page 4 QPoint(120,400) to page 3 QPoint(1380,600)
XRef from page 4 QPoint(120,420) to page 3 QPoint(1380,640)
XRef from page 5 QPoint(1380,90) to page 6 QPoint(120,90)
XRef from page 5 QPoint(120,90) to page 4 QPoint(1320,90)
XRef from page 5 QPoint(1380,110) to page 6 QPoint(120,110)
XRef from page 5 QPoint(120,110) to page 4 QPoint(1320,110)
XRef from page 6 QPoint(120,110) to page 5 QPoint(1380,110)
XRef from page 6 QPoint(1380,270) to page 8 QPoint(110,180)
XRef from page 6 QPoint(1380,440) to page 8 QPoint(110,440)
XRef from page 6 QPoint(1380,410) to page 8 QPoint(110,410)
XRef from page 6 QPoint(1380,240) to page 8 QPoint(110,210)
XRef from page 6 QPoint(120,90) to page 5 QPoint(1380,90)
XRef from page 8 QPoint(110,440) to page 6 QPoint(1380,440)
XRef from page 8 QPoint(110,180) to page 6 QPoint(1380,270)
XRef from page 8 QPoint(110,410) to page 6 QPoint(1380,410)
XRef from page 8 QPoint(110,210) to page 6 QPoint(1380,240)

There are also additional constraints such as fitting on the page or the print area. "Automagic" zoom factors are used here, which also have to be applied to the positions of the links and targets.

105

(7 replies, posted in Scripts)

Kellermorph wrote:

(...) dass das vorher die falsche Rubrik war (...)

Der andere Thread hat ja mit dem Ansatz angefangen, die PDF-Links direkt in QET zu integrieren, also war das definitiv an der richtigen Stelle!
Wir können dort gerne weiter über PDF-Links innerhalb QET diskutieren, wenn es dazu Ideen gibt:
https://qelectrotech.org/forum/viewtopi … 405#p21405

106

(7 replies, posted in Scripts)

Da waren noch mehr Fragen in meinem Post!

Der Quellcode hat sich also nicht geändert und hier liegt nun eine weitere Kopie einer knapp 70MB großen Datei, die im anderen Beitrag schon angehängt ist?

107

(7 replies, posted in Scripts)

Bin gerade ziemlich verwirrt!

Hat sich der Quellcode geändert?
Wenn ja: Warum liegt der nicht auf github? Da gehört er hin!

Wieso postest Du hier ein knapp 70MB großes AppImage, wenn ein Link auf Deinen github-Account gereicht hätte?
Wieso machst Du einen neuen Thread als Fortführung eines bestehenden Themas auf?

108

(193 replies, posted in Import DXF)

You're already now free to use any font you like, RedBaron!

If you need osifont for your elements and schematics: use it!

BTW: This part of forum is about import of dxf to elements.

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

To make it short: Yes!

110

(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!

111

(193 replies, posted in Import DXF)

missing attachment

112

(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!

116

(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

117

(39 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.

118

(39 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!

119

(39 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 --> ???

121

(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!