Setting text of entry box

The text in the entry box (the one in the dialog that opens up on clicking ‘+’ at the bottom of style dialog) determines the value of ‘class’ attribute of an object. A default text value shows up in the dialog box if no object is selected in the drawing.

Screenshot from 2016-06-07 00:14:38

In case, one object is selected, by default its id shows up in the text dialog. The user can change this text if he/she wishes.
Screenshot from 2016-06-07 00:15:35

However, if two or more objects are selected, then the text value in the entry box contains id of each of the selected objects separated by a space. In all the cases, clicking ‘Add’ adds a new selector to the treeview.
Screenshot from 2016-06-07 00:20:00

Also if some selection exists, then the class attribute of the object is set with value equal to text in the entry box. If class attribute for an object already has a value, then the new value added by the user is appended to the existing one.

_setClassAttribute(std::vector<spobject *>) is used to append the values in case multiple objects are selected. This function is called when text in the entry box has to be set up.

Leave a Reply

Follow

Get notified with the latest posts

Plugin Supporter WordPress Post Navigation
%d bloggers like this: