Skip to content

Commit

Permalink
Update qtdata.fmq
Browse files Browse the repository at this point in the history
  • Loading branch information
beckdave committed Apr 3, 2024
1 parent cb41443 commit f7dabb0
Show file tree
Hide file tree
Showing 2 changed files with 96 additions and 21 deletions.
77 changes: 67 additions & 10 deletions htdocs/qtobjecttree.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

<head>

<script type="text/javascript" src="json2.js"></script>
<script type="text/javascript" src="fmq.js"></script>


Expand All @@ -20,35 +19,93 @@

function iterateObjects(obj, level, idParent)
{
var table = '<table>';
var table = '<table border="1">';

table += '<tr>';
table += '<td>Class Chain</td>';
table += '<td>Properties</td>';
table += '<td>Methods</td>';
table += '<td>Children</td>';
table += '</tr>';


// Class Chain
table += '<tr>';

table += '<td>'
for (var i = 0; i < obj.classchain.length; i++)
{
var className = obj.classchain[i];
table += className;
table += ' ';
table += '<br/>';
}
table += '</td>';

table += '<td>'
// properties
table += '<td><table border="1">';
for (var i = 0; i < obj.properties.length; i++)
{
var prop = obj.properties[i];
table += prop.name + '=' + prop.value+'<br/>';
}
table += '</td>';
table += '<tr>';
table += '<td>' + prop.type + '</td>';
table += '<td>' + prop.name + '</td>';
table += '<td>' + prop.value.substr(0, 100) + '</td>';
table += '<td>' + prop.hasNotifySignal + '</td>';

table += '</tr>';
table += '</tr>';
}
table += '</table></td>';

// Methods
table += '<td><table border="1">';
for (var i = 0; i < obj.methods.length; i++)
{
var method = obj.methods[i];
table += '<tr>';
table += '<td>' + method.name + '</td>';
table += '<td>' + method.index + '</td>';
table += '<td>' + method.access + '</td>';
table += '<td>' + method.methodType + '</td>';
table += '<td>' + method.signature + '</td>';
table += '<td>' + method.returnType.typeName + '</td>';

// Parameters
table += '<td><table border="1">';
for (var j = 0; j < method.parameters.length; j++)
{
var parameter = method.parameters[j];
table += '<tr>';
table += '<td>' + parameter.name + '</td>';
table += '<td>' + parameter.typeName + '</td>';
table += '<td>' + parameter.typeId + '</td>';
table += '</tr>';
}
table += '</table></td>';

table += '</tr>';
}
table += '</table></td>';

// Children
table += '<td><table border="1">';
for (var i = 0; i < obj.children.length; i++)
{
var id = idParent + '.' + i;
table += '<tr>';
table += '<td id="'+ id +'">';
table += '</td>';
table += '</tr>';
}
table += '</table></td>';

table += '</tr>';

document.getElementById(idParent).innerHTML = table;

for (var i = 0; i < obj.children.length; i++)
{
var id = idParent + '.' + i;
iterateObjects(obj.children[i], level + 1, id);
}
}


Expand All @@ -73,7 +130,7 @@
function fmqReady()
{
poll();
setInterval(poll, 2000);
//setInterval(poll, 2000);
}


Expand Down
40 changes: 29 additions & 11 deletions inc/finalmq/Qt/qtdata.fmq
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,10 @@
{"tid":"struct[]", "type":"Parameter", "name":"parameters", "desc":"","flags":[]}
]},
{"type":"Property","desc":"","fields":[
{"tid":"string", "type":"", "name":"name", "desc":"","flags":[]},
{"tid":"string", "type":"", "name":"value", "desc":"","flags":[]}
{"tid":"string", "type":"", "name":"type", "desc":"","flags":[]},
{"tid":"string", "type":"", "name":"name", "desc":"","flags":[]},
{"tid":"string", "type":"", "name":"value", "desc":"","flags":[]},
{"tid":"bool", "type":"", "name":"hasNotifySignal","desc":"","flags":[]}
]},
{"type":"ObjectData","desc":"","fields":[
{"tid":"struct[]", "type":"Property", "name":"properties", "desc":"","flags":[]},
Expand Down Expand Up @@ -127,16 +129,20 @@
{"tid":"int32", "type":"","name":"right","desc":"","flags":[]},
{"tid":"int32", "type":"","name":"bottom","desc":"","flags":[]}
]},
{"type":"FmqQSize","attrs":["qttype:QSize"],"desc":"","fields":[
{"tid":"int32", "type":"","name":"width","desc":"","flags":[]},
{"tid":"int32", "type":"","name":"height","desc":"","flags":[]}
]},
{"type":"FmqQColor","attrs":["qttype:QColor"],"desc":"","fields":[
{"tid":"enum", "type":"FmqQColorSpec","name":"cspec","desc":"","flags":[]},
{"tid":"int16", "type":"","name":"alpha","desc":"","flags":[]},
{"tid":"int16", "type":"","name":"red","desc":"","flags":[]},
{"tid":"int16", "type":"","name":"green","desc":"","flags":[]},
{"tid":"int16", "type":"","name":"blue","desc":"","flags":[]},
{"tid":"int16", "type":"","name":"pad","desc":"","flags":[]}
{"tid":"uint16", "type":"","name":"alpha","desc":"","flags":[]},
{"tid":"uint16", "type":"","name":"red","desc":"","flags":[]},
{"tid":"uint16", "type":"","name":"green","desc":"","flags":[]},
{"tid":"uint16", "type":"","name":"blue","desc":"","flags":[]},
{"tid":"uint16", "type":"","name":"pad","desc":"","flags":[]}
]},

{"type":"FmqQTransform","desc":"","fields":[
{"type":"FmqQTransform","attrs":["qttype:QTransform"],"desc":"","fields":[
{"tid":"double", "name":"m11", "desc":"","flags":[]},
{"tid":"double", "name":"m12", "desc":"","flags":[]},
{"tid":"double", "name":"m13", "desc":"","flags":[]},
Expand All @@ -148,11 +154,16 @@
{"tid":"double", "name":"m33", "desc":"","flags":[]}
]},

{"type":"FmqQPointF","desc":"","fields":[
{"type":"FmqQPointF","attrs":["qttype:QPointF"],"desc":"","fields":[
{"tid":"double", "name":"x", "desc":"","flags":[]},
{"tid":"double", "name":"y", "desc":"","flags":[]}
]},

{"type":"FmqQPoint","attrs":["qttype:QPoint"],"desc":"","fields":[
{"tid":"int32", "name":"x", "desc":"","flags":[]},
{"tid":"int32", "name":"y", "desc":"","flags":[]}
]},

{"type":"FmqQBrushSimple","desc":"","fields":[
{"tid":"struct","type":"FmqQColor", "name":"color", "desc":"","flags":[]},
{"tid":"struct","type":"FmqQTransform", "name":"transform", "desc":"","flags":[]}
Expand Down Expand Up @@ -212,11 +223,18 @@

{"type":"FmqQBrush","attrs":["qttype:QBrush"],"desc":"","fields":[
{"tid":"enum", "type":"FmqQBrushStyle", "name":"style", "attrs":["indexmode:mapping,0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:1,16:1,17:1,24:2"],"desc":"","flags":["METAFLAG_INDEX"]},
{"tid":"struct","type":"FmqQBrushSimple", "name":"sinple", "desc":"","flags":[]},
{"tid":"struct","type":"FmqQBrushSimple", "name":"simple", "desc":"","flags":[]},
{"tid":"struct","type":"FmqQBrushGradient", "name":"gradient", "desc":"","flags":[]},
{"tid":"struct","type":"FmqQBrushTexturePattern", "name":"texture", "desc":"","flags":[]}
]}
]},

{"type":"FmqQPaletteColorRole","desc":"","fields":[
{"tid":"struct[]","type":"FmqQBrush", "name":"roles", "attrs":["fixedarray:21"], "desc":"","flags":[]}
]},

{"type":"FmqQPalette","attrs":["qttype:QPalette"],"desc":"","fields":[
{"tid":"struct[]","type":"FmqQPaletteColorRole", "name":"goups", "attrs":["fixedarray:3"], "desc":"","flags":[]}
]}
]
}

Expand Down

0 comments on commit f7dabb0

Please sign in to comment.