[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-edu-devel
Subject:    ROCS__default node type not renamed on canvas after renaming from node type properties
From:       Hitesh Sagtani <sagtanih () gmail ! com>
Date:       2019-12-30 10:00:46
Message-ID: CAJ6RfLuC2g2PtkSz8VWkqU8ii0+gBUhSfmF5UKtkxGqU-USwcQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Please refer to image below, I renamed default node type in node properties
as 123 (as shown in the dialog) but on the canvas it is still showing
default. If i add other node types and rename them it is working fine (i.e.
showing new name on the canvas).
I tried to understand the flow from the code and as per my understanding
rocs follows model/view/delegate programming and when i change the name of
node type from the dialog, signal clicked generates and the by signal/slot
mechanism name of node type is changed. The sequence of function execution
i think is this, where the former function calls the later function using
signal/slot mechanism.

 1. void NodeTypesDelegate::onNameChanged(const QString &name)
 b/c of connection : connect(title, &QLineEdit::textEdited,
        this, &NodeTypesDelegate::onNameChanged);

2. void DocumentTypesWidget::onNodeTypeNameChanged(const QModelIndex&
index, const QString& name)

3. bool NodeTypeModel::setData(const QModelIndex &index, const QVariant
&value, int role)

4. void NodeType::setName(const QString& name)

5. void NodeTypeModel::emitNodeTypeChanged(int row)
(signal mapper used to execute this function)

I tried to use qDebug() function (printed name of functions on terminal) to
confirm these are getting executed in the given order and what i noticed is
that 1,2,3 are not getting executed (as name of these functions are not
getting printed on terminal using qDebug() ) and 4th function is getting
executed everytime node type name is changed and 5th function is getting
executed in all cases except default node case (i did not understand this,
as in signal mapper is mapping all nodes including default node).
can someone help me resolve this problem, i am stuck at this for like 2-3
days and don't know how to proceed further.

Also @Tomaz Canabrava <tcanabrava@kde.org>, you gave me task to incorporate
node tools back,like `Alligin Horizontally / Vertically / Center`. can you
please tell which version of rocs contained these functionality. I will
refer to their code and try to understand how to function.

Thanks :)

[Attachment #5 (text/html)]

<div dir="ltr"><div>Please refer to image below, I renamed default node type in node \
properties as 123 (as shown in the dialog) but on the canvas it is still showing \
default. If i add other node types and rename them it is working fine (i.e. showing \
new name on the canvas).</div><div>I tried to understand the flow from the code and \
as per my understanding rocs follows model/view/delegate programming and when i \
change the name of node type from the dialog, signal clicked generates and the by \
signal/slot mechanism name of node type is changed. The sequence of function \
execution i think is this, where the former function calls the later function using \
signal/slot mechanism.<br></div><div><br></div><div>  1. void \
NodeTypesDelegate::onNameChanged(const QString &amp;name) <br></div><div>  b/c of \
connection : connect(title, &amp;QLineEdit::textEdited,<br>            this, \
&amp;NodeTypesDelegate::onNameChanged);<br></div><div>            <br></div><div>2. \
void DocumentTypesWidget::onNodeTypeNameChanged(const QModelIndex&amp; index, const \
QString&amp; name)</div><div><br></div><div>3. bool NodeTypeModel::setData(const \
QModelIndex &amp;index, const QVariant &amp;value, int \
role)</div><div><br></div><div>4. void NodeType::setName(const QString&amp; \
name)</div><div><br></div><div>5. void NodeTypeModel::emitNodeTypeChanged(int \
row)</div><div>(signal mapper used to execute this \
function)<br></div><div><br></div><div>I tried to use qDebug() function (printed name \
of functions on terminal) to confirm these are getting executed in the given order \
and what i noticed is that 1,2,3 are not getting executed (as name of these functions \
are not getting printed on terminal using qDebug() ) and 4th function is getting \
executed everytime node type name is changed and 5th function is getting executed in \
all cases except default node case (i did not understand this, as in signal mapper is \
mapping all nodes including default node).</div><div>can someone help me resolve this \
problem, i am stuck at this for like 2-3 days and don&#39;t know how to proceed \
further.<br></div><div><br></div><div>Also <a class="gmail_plusreply" \
id="plusReplyChip-0" href="mailto:tcanabrava@kde.org" tabindex="-1">@Tomaz \
Canabrava</a>, you gave me task to incorporate node tools back,like `Alligin \
Horizontally / Vertically / Center`. can you please tell which version of rocs \
contained these functionality. I will refer to their code and try to understand how \
to function.</div><div><br></div><div>Thanks \
:)<br></div><div><br></div><div><br></div></div>


["node_name_default.png" (image/png)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic