ROCS__default node type not renamed on canvas after renaming from node type properties

Hitesh Sagtani sagtanih at gmail.com
Mon Dec 30 09:48:46 GMT 2019


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 at 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 :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20191230/ed3b1923/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: node_name_default.png
Type: image/png
Size: 32966 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20191230/ed3b1923/attachment-0001.png>


More information about the kde-edu mailing list