426

(22 replies, posted in Code)

https://medium.com/better-programming/c … fda291ea93

stil reading.....

https://nvie.com/posts/a-successful-git … ing-model/
or
http://scottchacon.com/2011/08/31/github-flow.html

I have to say.
I made a branch of the master, for each fix or change.
therefore I could quickly

git checkout foo
git format-patch master

ok I know.

scorpio810 wrote:

If you know a good method to update changelog

but it also has to do with it.

so the question is quick release (as 0.8 dev is now) (gitub workflow)
or slower release (git workflow)
or something like Syncthing once a month a Stable and Candidate release
https://docs.syncthing.net/users/releases.html

than for the changelog.
suppose we use this

git log $(git describe --tags --abbrev=0)..HEAD --pretty=format:"%ar : %s , %an"

bron
https://blogs.sap.com/2018/06/22/genera … s-gitgrep/

note tis is still in draft

tehthoams
I have a question.
Would right-clicking an element be a better method, to number 1 element?
__________

info:
menu for Mouse
qet/sources/diagramview.cpp @ line 1148

/**
* @brief DiagramView::contextMenuActions
* @return a list of actions currently available for a context menu.
*
*/

QList<QAction *> DiagramView::contextMenuActions() const
{
    QList<QAction *> list;
    if (QETDiagramEditor *qde = diagramEditor())
    {
        if (m_diagram->selectedItems().isEmpty())
        {
            list << m_paste_here;
            list << m_separators.at(0);
            list << qde->m_edit_diagram_properties;
            list << qde->m_row_column_actions_group.actions();
        }
        else
        {
            list << qde->m_cut;
            list << qde->m_copy;
            list << m_multi_paste;
            list << m_separators.at(0);
            list << qde->m_conductor_reset;
            list << m_separators.at(1);
            list << qde->m_selection_actions_group.actions();
            list << m_separators.at(2);
            list << qde->m_depth_action_group->actions();
        }
 
            //Remove from the context menu the actions which are disabled.
        const QList<QAction *> actions = list;
        for(QAction *action : actions)
        {
            if (!action->isEnabled()) {
                list.removeAll(action);
            }
        }
    }
 
    return list;
}

"qde->m_selection_actions_group.actions();"   this seems to be the menu we need to adjust
qet/sources/qetdiagrameditor.cpp @ line 543

//Selections Actions (related to a selected item)
    m_delete_selection    = m_selection_actions_group.addAction( QET::Icons::EditDelete,        tr("Supprimer")                 );
    m_rotate_selection     = m_selection_actions_group.addAction( QET::Icons::TransformRotate,   tr("Pivoter")                   );
    m_rotate_texts         = m_selection_actions_group.addAction( QET::Icons::ObjectRotateRight, tr("Orienter les textes")       );
    m_find_element         = m_selection_actions_group.addAction( QET::Icons::ZoomDraw,          tr("Retrouver dans le panel")   );
    m_edit_selection       = m_selection_actions_group.addAction( QET::Icons::ElementEdit,       tr("Éditer l'item sélectionné") );
    m_group_selected_texts = m_selection_actions_group.addAction(QET::Icons::textGroup,       tr("Grouper les textes sélectionnés"));

That solution would take me weeks.
The autonum class is one that I do not yet master.
In any case, good job Joshua.

429

(22 replies, posted in Code)

Well I did not know this but this file can help.

430

(22 replies, posted in Code)

Add a code of conduct to qelectrotech project

why, to avoid different coding styles in the same program.

Tab = 8 spaces

/**
    Gere les relachements de la souris sur ce widget
    @param event Evenement decrivant le relachement de la souris
*/
void QTextOrientationWidget::mouseReleaseEvent(QMouseEvent *event) {
    if (read_only_) return;
    
    double clicked_angle;
    bool drawn_angle_clicked = positionIsASquare(event -> localPos(), &clicked_angle);
    
    if (drawn_angle_clicked) {
        setOrientation(clicked_angle);
        emit(orientationChanged(clicked_angle));
        must_highlight_angle_ = false;
        update();
    }
}

vs

Tab = 4 spaces

/**
 * @brief NumerotationContext::addValue, add a new value on the contexte
 * @param type the type of value
 * @param value the value itself
 * @param increase the increase number of value
 * @return true if value is append
 */
bool NumerotationContext::addValue(const QString &type, const QVariant &value, const int increase, const int initialvalue) {
    if (!keyIsAcceptable(type) && !value.canConvert(QVariant::String)) return false;
    if (keyIsNumber(type) && !value.canConvert(QVariant::Int)) return false;

    QString valuestr = value.toString();
    valuestr.remove("|");
    content_ << type + "|" + valuestr + "|" + QString::number(increase) + "|" + QString::number(initialvalue);
    return true;
}

problem:
developer A Tab = 8 spaces
developer B Tab = 4 spaces

developer B had written the function.

developer A adds "setIdentifier(element.firstChildElement("identifier").text());"

the code works, but the compiler complains
Wmisleading-indentation
is misleadingly indented as if it were guarded by the ‘if’

@@ -274,7 +274,7 @@ void ProjectDBModel::fromXml(const QDomElement &element)
         if (element.tagName() != xmlTagName())
                 return;
 
-                setIdentifier(element.firstChildElement("identifier").text());
+        setIdentifier(element.firstChildElement("identifier").text());
         setQuery(element.firstChildElement("query").text());
 
                 //Index 0,0

can consensus be reached on this?
Tab = 8 spaces vs 4 spaces

What do we take as standard,
and then we can start equalize the code Style.

ctrl + E
Tab
Tab
entering the properties of an element. (“Formula du labe”)
Alt + T

yes that's the commit

I hope the Joshua or anyone else can fix this is a bit too complex for me.

tehthoams wrote:

I am not a software expert

Just like me, let's see what we need to do.
1. make autonumbering value visible (where is it in the code?)
    - qet/sources/autoNum/assignvariables.h
    - ...
2. understand how autonumbering works.
3. set the autonumbering value in qelectrotech.
4. suggest a good place for the adjustment (first post)
5. get permission to write it in the code.

fout bij "dynamicelementtextitem.cpp"
@ 1183

label = elmt->actualLabel();

from:

QString DynamicElementTextItem::reportReplacedCompositeText() const
{
    QString string;
 
    if(m_parent_element.data()->linkType() & Element::AllReport)
    {
        string = m_composite_text;
 
        if (string.contains("%{label}") && m_other_report)
        {
            Element *elmt = m_other_report.data();
            QString label = m_report_formula;
            label = elmt->actualLabel(); // <======= set to NULL!!!!!
            string.replace("%{label}", label);
            qDebug()<<string<<label<<elmt->actualLabel(); // test van De-Backer
        }
        if (m_watched_conductor)
        {
            if(string.contains("%{function}"))
                string.replace("%{function}", m_watched_conductor.data()->properties().m_function);
            if(string.contains("%{tension-protocol}"))
                string.replace("%{tension-protocol}", m_watched_conductor.data()->properties().m_tension_protocol);
            if(string.contains("%{couleur-conducteur"))
                string.replace("%{couleur-conducteur}", m_watched_conductor.data()->properties().m_wire_color);
            if(string.contains("%{section-conducteur"))
                string.replace("%{section-conducteur}", m_watched_conductor.data()->properties().m_wire_section);
        }
    }
 
    return string;
}

Seeking further.... 


the origin of the bug is id fc73d53d73bc341e853e7f36e797bd8b9ad47b46

test: it works for that, but not after that

Joshua can certainly find the bug faster. Than me.

De-Backer wrote:

I'll look further tomorrow.

Well, Auto Numbering hasn't changed since 0.7.

tehthoams wrote:

Hoping to Achieve:
1. Another place to set autonumbering with quick access and visibility
2. Ability to re-number an already placed element by clicking the renumber tool and then clicking the element to be re-numbered.

1. this can be coded.
2. besides writing the code, there is the implantation of the function, and how it should look/work.

436

(11 replies, posted in Elements)

yes you are right, if i use the wires for the info,
but now the info comes from the schematic that uses no wires.

if i turn it over and the fuse is connected to the sockets and the info of all sockets is the same.

Or am I wrong.

<dynamic_text text_width="-1" z="1" rotation="0" Halignment="AlignLeft" text_from="ElementInfo" font="Sans Serif,9,-1,5,50,0,0,0,0,0" y="20" uuid="{e6ffd3e5-47dd-42e6-8253-66918b0db5da}" Valignment="AlignTop" frame="false" x="-2">
            <text></text>
            <info_name>label</info_name>
        </dynamic_text>
<dynamic_text text_width="-1" z="6" rotation="0" Halignment="AlignRight" text_from="ElementInfo" font="Sans Serif,9,-1,5,0,0,0,0,0,0,normal" y="20" uuid="{8f8a06fb-a7d6-47cf-9833-5d614b55954c}" Valignment="AlignTop" frame="false" x="-7">
            <text>kamer</text>
            <info_name>location</info_name>
        </dynamic_text>
        <line length1="1.5" y1="-10" end2="none" x1="-26" x2="6" y2="-10" antialias="false" length2="1.5" style="line-style:normal;line-weight:normal;filling:none;color:black" end1="none"/>
        <line length1="1.5" y1="-4" end2="none" x1="-10" x2="0" y2="-16" antialias="false" length2="1.5" style="line-style:normal;line-weight:normal;filling:none;color:black" end1="none"/>
        <dynamic_text text_width="-1" z="9" rotation="0" Halignment="AlignLeft" text_from="ElementInfo" font="Sans Serif,12,-1,5,0,0,0,0,0,0,normal" y="-37" uuid="{528ebbca-c8e3-4f20-916d-53d6a0eb7ac3}" Valignment="AlignBottom" frame="false" x="-4">
            <text>3</text>
            <info_name>quantity</info_name>
        </dynamic_text>
        <dynamic_text text_width="-1" z="10" rotation="0" Halignment="AlignRight" text_from="ElementInfo" font="Sans Serif,9,-1,5,0,0,0,0,0,0,normal" y="-35" uuid="{732d53e3-6f5c-4585-ac8c-85b7db103038}" Valignment="AlignTop" frame="false" x="-25">
            <text>h</text>
            <info_name>description</info_name>
        </dynamic_text>

well it's in the code, but I'm also not successful in starting the auto-numbering on element already on the schematic.
But it is possible that this works with the correct input.

I'll look further tomorrow.

If in the meantime someone knows if this works please leave and message.

(it seems that "Label formula" is not being updated.)

438

(11 replies, posted in Elements)

the master elements contain extra text (data) that is shared between the 2 elements master-slave.
I am not getting this working with folio link type. Is this possible?

439

(11 replies, posted in Elements)

still work in progress, but I already have this:
- the basic folder structure.
- the basic elements.
- an almost example.

can you give me feedback regarding:
- the location of the root folder (90_arei)?
- if this can be included in QElectroTech or not (if it is complete)?

QElectroTech V 0.80-DEV
Compilation: GCC 10.1.1 20200507 [revision dd38686d9c810cecbaa80bb82ed91caaa58ad635]
Built with Qt 5.15.0 - Date : Jun 28 2020 : 14:51:14 
Run with Qt 5.15.0 using 16 thread(s)
OS : linux - x86_64 - Version : openSUSE Tumbleweed - Kernel : 5.7.2-1-default

ad 0.8 dev

Project =>
Project properties =>
Auto Numbering =>

Is the Auto Numbering of QElectroTech.

What do you want to achieve,
- that it is easier for newcomers?
- another place to set Auto Numbering?
- ...

Do you already have a working example?
then maybe this can be placed in the code.

Thanks for the info. (still reading)
Is it worth investigating and write code , for the user so he can adjust this in the program?

Indeed why the prefix is not in the element.
Is this something that is scheduled to change?

Can someone test / confirm if "% prefix" still works for elements?

I can't get it working on automatic numbering.
and also if you put it manuele in the element.

git ad 6c84b555861309de2b9898fba195831c089dc976

a) are there more Beckhoff-elements
Apart from 'elements/10_electric/20_manufacturers_articles/beckhoff/"

No

b+ c ) I think you are not alone, there are people who made the elements.
https://www.google.com/search?q=QElectroTech+Beckhoff

d)
https://youtu.be/U_1GMbZjn_4
examples of sent elements.
https://qelectrotech.org/forum/viewtopi … 111#p11111
PLC https://qelectrotech.org/forum/viewtopi … 503#p11503

Et ça?

Pour pouvoir voir les modifications, The Grid doit être actif.

Remarque.
Je suis convaincu que vous êtes critique avec les ajustements (je fais définitivement des erreurs).

le cadre vert?

- pouvoir

Prepare patches for e-mail submission

https://git-scm.com/docs/git-format-patch#_examples

Extract all commits which are in the current branch but not in the "remotes/origin/master" branch:

git format-patch remotes/origin/master

____translate.google_____

Préparer les correctifs pour l'envoi par e-mail

https://git-scm.com/docs/git-format-patch#_examples

Extrayez toutes les validations qui se trouvent dans la branche courante mais pas dans la branche "remotes/origin/master":

git format-patch remotes/origin/master

448

(14 replies, posted in Code)

conductorpropertieswidget.ui

Was not perfect yet if you increase the geometry widget in height, the text alignment became oval.

449

(14 replies, posted in Code)

fix

450

(14 replies, posted in Code)

a 6 patch's