magicleader wrote:Qml
It's possible to use QML? I doing some research on qt web site and i noticed that it's possible to use the Xmlhttprequest...
QML is not interesting for us at this point (QML targets touch devices such as tablets).
It might be possible to use QML - I simply never looked into that.
magicleader wrote:Webkit
If i need to show a grid of data, can i use webkit in order to display the data in html format?
Yes, we also use web kit for the tag view of the part library browser.
magicleader wrote:Do you think that it's possible to bind a click over an html element (for example a link) to a QCAD function?
Yes, we also do that in the library browser. You can register a function to be called when the user clicks a link.
magicleader wrote:Getting project elements
In Qcad it's possible to identify an element using an ID?
Yes. Object IDs are valid for the lifetime of the document, object handles are persistent and are stored in DXF / DWG.
magicleader wrote:I would like to store in a DB (maybe using webservices so i will not need db drivers) infos like ["CustomerID, "QCADElementID", "Status"].
When i click over the element identified by QCADElementID i would like to show the Customer info (using webkit calling a specific URL). The element could be a string (a stand name ex A1, D45, D46)..
This certainly sounds possible.
magicleader wrote:In my previus post i asked about the search function because i wanted to parse the dwg project and color the strings matching my DB entries ... I was thinking to bind my customer record to a strings (a stand/area code).
Programmatically, you can search for a text with a code snippet like this:
Code: Select all
var di = this.getDocumentInterface();
var document = this.getDocument();
var ids = document.queryAllEntities();
for (var i=0; i<ids.length; i++) {
var entityId = ids[i];
var entity = document.queryEntity(entityId);
if (!isTextEntity(entity)) {
continue;
}
var text = entity.getEscapedText();
// do something with the text
// e.g. compare, etc...
}