palhenrique wrote:

I did this just yesterday. To continue the project.
I also tried to use the completed project function, but it didn't work.

Does this not only work for new cables?
the cable numbering

$qelectrotech -v
0.80-DEV
$ qelectrotech problem.qet 
QETProject::toXml() : exporting diagram "Tableau electrique entrée" [ Diagram(0x2f1d430) ]
QETProject::toXml() : exporting diagram "Pompes piscine" [ Diagram(0x4352a00) ]
QETProject::toXml() : exporting diagram "Tubes en provenance de la piscine" [ Diagram(0x4679a50) ]
QETProject::toXml() : exporting diagram "Douve et pompe arrosage" [ Diagram(0x4599350) ]
QETProject::toXml() : exporting diagram "Cablages Douve et Pompe Salmson" [ Diagram(0x4884640) ]
QETProject::toXml() : exporting diagram "Tubes eau + chauffage, bas escalier cave et Ballon d'eau chaude dans cave-1" [ Diagram(0x4594aa0) ]

Il semble que j'ai une version différente (version QT).

qtdiag
mesa: for the --simplifycfg-sink-common option: may only occur zero or one times!
mesa: for the --global-isel-abort option: may only occur zero or one times!
mesa: for the --amdgpu-atomic-optimizations option: may only occur zero or one times!
Qt 5.15.0 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 10.1.1 20200625 [revision c91e43e9363bd119a695d64505f96539fa451bf2]) on "xcb" 
OS: openSUSE Tumbleweed [linux version 5.7.11-1-default]

Architecture: x86_64; features: SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 AVX AVX2

Environment:
  QEMU_AUDIO_DRV="pa"
  QT_AUTO_SCREEN_SCALE_FACTOR="0"
  QT_IM_MODULE="xim"
  QT_IM_SWITCHER="imsw-multi"
  QT_SCREEN_SCALE_FACTORS="DisplayPort-0=1.5;DisplayPort-1=1.5;DisplayPort-2=1.5;HDMI-A-0=1.5;"

Features: QT_NO_EXCEPTIONS

Library info:
  PrefixPath: /usr
  DocumentationPath: /usr/share/doc/packages/qt5
  HeadersPath: /usr/include/qt5
  LibrariesPath: /usr/lib64
  LibraryExecutablesPath: /usr/lib64/qt5/libexec
  BinariesPath: /usr/lib64/qt5/bin
  PluginsPath: /usr/lib64/qt5/plugins
  ImportsPath: /usr/lib64/qt5/imports
  Qml2ImportsPath: /usr/lib64/qt5/qml
  ArchDataPath: /usr/lib64/qt5
  DataPath: /usr/share/qt5
  TranslationsPath: /usr/share/qt5/translations
  ExamplesPath: /usr/lib64/qt5/examples
  TestsPath: /usr/tests
  SettingsPath: /etc/xdg

Platform capabilities: ThreadedPixmaps OpenGL WindowMasks MultipleWindows ForeignWindows NonFullScreenWindows NativeWidgets WindowManagement SyncState RasterGLSurface SwitchableWidgetComposition

Style hints:
  mouseDoubleClickInterval: 400
  mousePressAndHoldInterval: 800
  startDragDistance: 10
  startDragTime: 500
  startDragVelocity: 0
  keyboardInputInterval: 400
  keyboardAutoRepeatRate: 30
  cursorFlashTime: 1000
  showIsFullScreen: 0
  showIsMaximized: 0
  passwordMaskDelay: 0
  passwordMaskCharacter: U+25CF
  fontSmoothingGamma: 1.7
  useRtlExtensions: 0
  setFocusOnTouchRelease: 0
  tabFocusBehavior: Qt::TabFocusAllControls 
  singleClickActivation: 1

Additional style hints (QPlatformIntegration):
  ReplayMousePressOutsidePopup: 0

Theme:
  Platforms requested : kde,generic
            available : kde,gtk2,gtk3
  Styles requested    : Breeze,breeze,oxygen,fusion,windows
         available    : Breeze,bb10dark,bb10bright,cleanlooks,gtk2,cde,motif,plastique,Windows,Fusion
  Icon theme          : breeze, hicolor from .local/share/icons,/usr/local/share/icons,/usr/share/icons
  System font         : "Noto Sans" 7

Fonts:
  General font : "Noto Sans" 7
  Fixed font   : "Hack" 7
  Title font   : "Noto Sans" 7
  Smallest font: "Noto Sans" 7

Palette:
  QPalette::WindowText: #ff232627
  QPalette::Button: #ffeff0f1
  QPalette::Light: #ffffffff
  QPalette::Midlight: #fff7f7f8
  QPalette::Dark: #ff888e93
  QPalette::Mid: #ffc4c9cd
  QPalette::Text: #ff232627
  QPalette::BrightText: #ffffffff
  QPalette::ButtonText: #ff232627
  QPalette::Base: #fffcfcfc
  QPalette::Window: #ffeff0f1
  QPalette::Shadow: #ff474a4c
  QPalette::Highlight: #ff3daee9
  QPalette::HighlightedText: #fffcfcfc
  QPalette::Link: #ff2980b9
  QPalette::LinkVisited: #ff7f8c8d
  QPalette::AlternateBase: #ffeff0f1
  QPalette::NoRole: #ff000000
  QPalette::ToolTipBase: #ff232627
  QPalette::ToolTipText: #fffcfcfc
  QPalette::PlaceholderText: #80232627

Screens: 2, High DPI scaling: active
# 0 "DisplayPort-0" Depth: 24 Primary: yes
  Manufacturer: Acer Technologies
  Model: Acer KG281K-
  Serial number: 2418025368
  Geometry: 2560x1440+1920+0 (native: 3840x2160+1920+0) Available: 2560x1440+1920+0
  Virtual geometry: 4480x1440+0+0 Available: 4480x1440+0+0
  2 virtual siblings
  Physical size: 621x341 mm  Refresh: 59.9966 Hz Power state: 0
  Physical DPI: 104.709,107.261 Logical DPI: 96,96 (native: 144,144) Subpixel_None
  High DPI scaling factor: 1.5 DevicePixelRatio: 1.5 Pixel density: 1
  Primary orientation: 2 Orientation: 2 Native orientation: 0 OrientationUpdateMask: 0

# 1 "HDMI-A-0" Depth: 24 Primary: no
  Manufacturer: LG Electronics
  Model: W2261-
  Serial number: 401292
  Geometry: 1280x720+0+0 (native: 1920x1080+0+0) Available: 1280x720+0+0
  Virtual geometry: 4480x1440+0+0 Available: 4480x1440+0+0
  2 virtual siblings
  Physical size: 477x268 mm  Refresh: 60 Hz Power state: 0
  Physical DPI: 68.1593,68.2388 Logical DPI: 96,96 (native: 144,144) Subpixel_None
  High DPI scaling factor: 1.5 DevicePixelRatio: 1.5 Pixel density: 1
  Primary orientation: 2 Orientation: 2 Native orientation: 0 OrientationUpdateMask: 0

LibGL Vendor: X.Org
Renderer: AMD Radeon RX 5700 XT (NAVI10, DRM 3.37.0, 5.7.11-1-default, LLVM 10.0.0)
Version: 4.6 (Compatibility Profile) Mesa 20.1.4
Shading language: 4.60
Format: Version: 4.6 Profile: 2 Swap behavior: 0 Buffer size (RGB): 8,8,8
Profile: None (QOpenGLFunctions_4_6)

Vulkan instance available
Supported instance extensions:
  VK_KHR_device_group_creation, version 1
  VK_KHR_external_fence_capabilities, version 1
  VK_KHR_external_memory_capabilities, version 1
  VK_KHR_external_semaphore_capabilities, version 1
  VK_KHR_get_display_properties2, version 1
  VK_KHR_get_physical_device_properties2, version 1
  VK_KHR_get_surface_capabilities2, version 1
  VK_KHR_surface, version 25
  VK_KHR_surface_protected_capabilities, version 1
  VK_KHR_wayland_surface, version 6
  VK_KHR_xcb_surface, version 6
  VK_KHR_xlib_surface, version 6
  VK_KHR_display, version 23
  VK_EXT_direct_mode_display, version 1
  VK_EXT_acquire_xlib_display, version 1
  VK_EXT_display_surface_counter, version 1
  VK_EXT_debug_report, version 9
  VK_EXT_debug_utils, version 2
Supported layers:
  VK_LAYER_VALVE_steam_overlay_32, version 1, spec version 1.1.73, Steam Overlay Layer
  VK_LAYER_VALVE_steam_overlay_64, version 1, spec version 1.1.73, Steam Overlay Layer
  VK_LAYER_VALVE_steam_fossilize_32, version 1, spec version 1.1.73, Steam Pipeline Caching Layer
  VK_LAYER_VALVE_steam_fossilize_64, version 1, spec version 1.1.73, Steam Pipeline Caching Layer
Available physical devices:
  API version 1.2.131, vendor 0x1002, device 0x731F, AMD RADV NAVI10 (LLVM 10.0.0), type 2, driver version 20.1.4

Qt Rendering Hardware Interface supported backends:
OpenGL (with default QSurfaceFormat):
  Min Texture Size: 1
  Max Texture Size: 16384
  Max Color Attachments: 8
  Frames in Flight: 1
  Uniform Buffer Alignment: 1
  Supported MSAA sample counts: 1,2,4,8
  Features:
    - MultisampleTexture
    v MultisampleRenderBuffer
    - DebugMarkers
    - Timestamps
    v Instancing
    - CustomInstanceStepRate
    v PrimitiveRestart
    v NonDynamicUniformBuffers
    v NonFourAlignedEffectiveIndexBufferOffset
    v NPOTTextureRepeat
    - RedOrAlpha8IsRed
    v ElementIndexUint
    v Compute
    v WideLines
    v VertexShaderPointSize
    v BaseVertex
    - BaseInstance
    v TriangleFanTopology
    v ReadBackNonUniformBuffer
    v ReadBackNonBaseMipLevel
  Texture formats: RGBA8 BGRA8 R8 R16 RED_OR_ALPHA8 RGBA16F RGBA32F R16F R32F D16 D32F BC1 BC3 BC5 ETC2_RGB8 ETC2_RGB8A1 ETC2_RGBA8
Vulkan:
  Min Texture Size: 1
  Max Texture Size: 16384
  Max Color Attachments: 8
  Frames in Flight: 2
  Uniform Buffer Alignment: 4
  Supported MSAA sample counts: 1,2,4,8
  Features:
    v MultisampleTexture
    v MultisampleRenderBuffer
    - DebugMarkers
    v Timestamps
    v Instancing
    - CustomInstanceStepRate
    v PrimitiveRestart
    v NonDynamicUniformBuffers
    v NonFourAlignedEffectiveIndexBufferOffset
    v NPOTTextureRepeat
    v RedOrAlpha8IsRed
    v ElementIndexUint
    v Compute
    v WideLines
    v VertexShaderPointSize
    v BaseVertex
    v BaseInstance
    v TriangleFanTopology
    v ReadBackNonUniformBuffer
    v ReadBackNonBaseMipLevel
  Texture formats: RGBA8 BGRA8 R8 R16 RED_OR_ALPHA8 RGBA16F RGBA32F R16F R32F D16 D32F BC1 BC2 BC3 BC4 BC5 BC6H BC7

pouvez-vous le confirmer?

scorpio810 wrote:
De-Backer wrote:

Where is the multi thread in QElectroTech?

Is it QtConcurrent?
https://doc.qt.io/qt-5/qtconcurrent-index.html

Or are there others?

https://doc.qt.io/qt-5/qfuture.html
https://git.tuxfamily.org/qet/qet.git/t … l.cpp#n216

yes is this the only thing? (did I already see in the code)
proposal: to run the storage in another thread

"" Write a backup file of this project, in the case that QET crash"""

QtConcurrent::run(QThreadPool::globalInstance(), function, ...);
De-Backer wrote:

for  QElectrotech is freezing

static int BACKUP_INTERVAL = 120000; //interval in ms of backup = 2min
/**
 * @brief QETProject::init
 */
void QETProject::init()
{
    connect(&m_titleblocks_collection, &TitleBlockTemplatesCollection::changed, this, &QETProject::updateDiagramsTitleBlockTemplate);
    connect(&m_titleblocks_collection, &TitleBlockTemplatesCollection::aboutToRemove, this, &QETProject::removeDiagramsTitleBlockTemplate);

    m_undo_stack = new QUndoStack(this);
    connect(m_undo_stack, SIGNAL(cleanChanged(bool)), this, SLOT(undoStackChanged(bool)));

    m_save_backup_timer.setInterval(BACKUP_INTERVAL);
    connect(&m_save_backup_timer, &QTimer::timeout, this, &QETProject::writeBackup);
    m_save_backup_timer.start();
    writeBackup();

this cannot be stopped: in de setting

m_save_backup_timer.setInterval(BACKUP_INTERVAL);
    connect(&m_save_backup_timer, &QTimer::timeout, this, &QETProject::writeBackup);
    m_save_backup_timer.start();

runs :

]/**
* @brief QETProject::writeBackup
* Write a backup file of this project, in the case that QET crash
*/

void QETProject::writeBackup()
{
    if (!m_backup_file ||
        (!m_backup_file->isOpen() && !m_backup_file->open(QIODevice::ReadWrite))) {
        return;
    }
 
    QDomDocument xml_project(toXml());
    QET::writeToFile(xml_project, m_backup_file);
}

in de gui thread

Where is the multi thread in QElectroTech?

Is it QtConcurrent?
https://doc.qt.io/qt-5/qtconcurrent-index.html

Or are there others?

@ 2959

<terminal number="_" name="_" nameHidden="0" orientation="3" id="166" x="-6" y="0"/>

element

embed://import/30_hydraulic/45_valves/vanne_man_1.elmt
Diagram::fromXml() : Le chargement des parametres d'un element a echoue

/sources/diagram.cpp @ 1335

addItem(nvel_elmt);
        //Loading fail, remove item from the diagram
        if (!nvel_elmt->fromXml(element_xml,
                    table_adr_id,
                    handle_inputs_rotation))
        {
            removeItem(nvel_elmt);
            delete nvel_elmt;
            qDebug() << "Diagram::fromXml() : Le chargement des "
                    "parametres d'un element a echoue";
        } else {
            added_elements << nvel_elmt;
        }
Diagram::fromXml() : terminal id  166  not found

/sources/diagram.cpp  @ 1133

else {
        // Backward compatibility.
        // Until version 0.7 a generated id is used to link the terminal.
        int id_p1 = f.attribute(terminal_index).toInt();
        if (!table_adr_id.contains(id_p1)) {
            qDebug() << "Diagram::fromXml() : terminal id "
                 << id_p1
                 << " not found";
        } else
            return table_adr_id.value(id_p1);
    }

(Google Translate)
Je n'ai pas les mêmes erreurs que toi, mais ça peut être moi.

Joshua wrote:

For me they miss one thing , add new kind of text : terminal text witch display the name of the terminal, the text should be static (not editable in the diagram editor), anyways it's good job nomicons/wink

yes I understand what you mean, but this will be some "Dynamic text field / text field", because it will never be in the right place.

Joshua wrote:

Also see with Martin what he already made with terminal
https://invent.kde.org/marmsoler/qelect … rce-mirror

Martin Marmsoler authored 2 months ago

where is he, is he still working on it?

De-Backer wrote:

I think I got it working,
Joshua can this be tested?

https://github.com/De-Backer/qelectrote … minal_name

an example:
https://youtu.be/Ae6nfh876gM

Is this where we want to go?

Good day, you can specify the version of QElectroTech?

sure, no problem.
I have not finished adding info, so expect me to ask you som questions.
-about design choice
-and many other relevant things.

scorpio810 wrote:

Martin is working on this feature
https://framaestro.org/p/#MTM1NDk1/qele … lang%3Den;

-The database should be editable by user, to let him add new data.
-Like elements, it will be great if users can send us there db to merge it with the official db of qelectrotech, then the official db will grow quickly and a lot of user will benefit.
Yes this would be a nice idea

eg KiCAD Library ?
https://kicad-pcb.org/libraries/download/
https://github.com/KiCad/kicad-symbols

but:
https://kicad-pcb.org/libraries/contribute/

damianCaceres wrote:

Warning: I'm using google translator and word reference.

If I understood fine, DRU is asking about including the terminal names in the file .qet
With my poor experience using QElectroTech, I've perceived that the terminals and conductors look like the younger brothers of the elements. Terminals and conductors carry less information than elements, for instance name and uuid.
I think terminals and conductors should be at the same level of importance as the elements.
Why? I'm not too sure, but in my brain schematics they are all important.
Thank you.

PostScript: I always work with reference to objects by uuid.

You can be right, but we are going to break a lot if we mess around with that.

As it is now,my patch won't break anything but it will add the name in element.elmt

a night sleep does miracles.

damianCaceres wrote:

I search through it.

and the uuid? Why is not included?
Thank you

should that be?

full file

for  QElectrotech is freezing

static int BACKUP_INTERVAL = 120000; //interval in ms of backup = 2min
/**
 * @brief QETProject::init
 */
void QETProject::init()
{
    connect(&m_titleblocks_collection, &TitleBlockTemplatesCollection::changed, this, &QETProject::updateDiagramsTitleBlockTemplate);
    connect(&m_titleblocks_collection, &TitleBlockTemplatesCollection::aboutToRemove, this, &QETProject::removeDiagramsTitleBlockTemplate);

    m_undo_stack = new QUndoStack(this);
    connect(m_undo_stack, SIGNAL(cleanChanged(bool)), this, SLOT(undoStackChanged(bool)));

    m_save_backup_timer.setInterval(BACKUP_INTERVAL);
    connect(&m_save_backup_timer, &QTimer::timeout, this, &QETProject::writeBackup);
    m_save_backup_timer.start();
    writeBackup();

this cannot be stopped: in de setting

m_save_backup_timer.setInterval(BACKUP_INTERVAL);
    connect(&m_save_backup_timer, &QTimer::timeout, this, &QETProject::writeBackup);
    m_save_backup_timer.start();

runs :

/**
 * @brief QETProject::writeBackup
 * Write a backup file of this project, in the case that QET crash
 */
void QETProject::writeBackup()
{
    if (!m_backup_file ||
        (!m_backup_file->isOpen() && !m_backup_file->open(QIODevice::ReadWrite))) {
        return;
    }

    QDomDocument xml_project(toXml());
    QET::writeToFile(xml_project, m_backup_file);
}

in de gui thread

in test_element.elmt

<terminal x="0" uuid="{a9f1a07f-2a4a-460a-b6e7-d831f73e1a08}" name="21" orientation="s" y="30"/>
<terminal x="40" uuid="{93173c01-5706-498d-ab28-9fdb3dfe1a69}" name="23" orientation="s" y="30"/>
<terminal x="0" uuid="{1e57863e-e456-430b-a204-6831722b7312}" name="11" orientation="n" y="-30"/>
<terminal x="20" uuid="{42dd9184-b750-4ae3-8e89-593c958526f4}" name="12" orientation="n" y="-30"/>
<terminal x="20" uuid="{3dc51ac8-c354-499d-8c3b-f46ff6e435ad}" name="22" orientation="s" y="30"/>
<terminal x="40" uuid="{5455d1e1-4acb-47dd-8fcf-cb38fc88094a}" name="13" orientation="n" y="-30"/>

works
but in test.qet

diagram
<terminal x="0" id="0" nameHidden="0" orientation="0" name="_" number="_" y="-26"/>
<terminal x="20" id="1" nameHidden="0" orientation="0" name="_" number="_" y="-26"/>
<terminal x="40" id="2" nameHidden="0" orientation="0" name="_" number="_" y="-26"/>
<terminal x="0" id="3" nameHidden="0" orientation="2" name="_" number="_" y="26"/>
<terminal x="20" id="4" nameHidden="0" orientation="2" name="_" number="_" y="26"/>
<terminal x="40" id="5" nameHidden="0" orientation="2" name="_" number="_" y="26"/>

I search through it.

I think I got it working,
Joshua can this be tested?

https://github.com/De-Backer/qelectrote … minal_name

do you mean this?
(name)

it is being worked on but it is not yet possible.

Thanks for the head up.

The 0.8 dev is now in a state of stabilization

I am making a test to make all the elements in 1 file to see the loading difference

Ok thanks, can there be any changes before /*for*/ 0.8 due to the file structure?
I am asking this because I am asked to number the contact points of each element.
(for Terminal block generator)
And if you have any idea how that is planned, let me know.

edited
for => before


I made a start for the wiki:
https://github.com/De-Backer/qelectrote … irror/wiki

Has JSON ever been proposed as a file for the elements?
I am asking this because the search function returns NULL.
Perhaps this can be faster than XML.
It is certainly more readable than XML.

Dear Calypso, I think your effort will be in vain.

Friedel wrote:

Aber dieses Board ist unbrauchbar. Dies war mein letzter Besuch hier. Und damit brauche ich dann auch ein anderes Programm um Schaltpläne zu zeichnen. Schade.

Thanks for the effort anyway.

Friedel could also have made it from the source code. isn't this a requirement to work with linux?

scorpio810 wrote:

Not much time for the next few days, but I'll try to find some. ;-)

no problem,i have faith in "git merge"

Joshua wrote:
De-Backer wrote:

and what if we index when we open the folder.
instead of everything at start up?

We load all the collection at the start up for use the search engine. If we not do that the search engine will search only for folder already expanded.

we can't put the search function in a worker thread?
I notice the gui freezes when entering text.

scorpio810 wrote:
De-Backer wrote:

scorpio810
what is the oldest QT version you still compile?

Qt 5.9 for Ubuntu Bionic LTS.

https://github.com/De-Backer/qelectrote … clean_code

i have removed some code
you can check this if it's ok.

if ok, then I can bring it to the main git repo

(i don't want to pollute the main git repo)

scorpio810
what is the oldest QT version you still compile?