My app is an interface to a system in which i represented all command and response available in a QTreeModel style. Representation example below
User can click a command item of a certain device and click a send command button and look at the response at the coresponding response from the device at the response tree...// command tree
Commands
|__Device1
| |__SignatureRq
| | |__Opcode
| |
| |__AnotherRqForThisDevice
| |__data for this Req
| |__data for this Req
|__ Device2
|__SignatureWriteRq
| |__SerialNo
| |__Manufacturing Date
| |__FirmwareVersion
|
|__AnotherRqForThisDevice
|__data for this Req
// response tree
Response
|__Device1
| |__SignatureRsp
| | |__SerialNo
| | |__Manufacturing Date
| | |__FirmwareVersion
| |
| |__AnotherRspForThisDevice
| |__data for this Rsp
|__ Device2
|__SignatureRsp
| |__SerialNo
| |__Manufacturing Date
| |__FirmwareVersion
|
|__AnotherRspForThisDevice
|__data for this Rsp
Now, this style is good for the engineering user for they know what request to use and what response to look for in the response tree but I was ask to make an interface for the normal user then came my problem. I would like to somehow create a widget that represent each device and pick some not all the command and show the response in a user firendly fashion. I would like to use my tree model as the backbone of this interface so that if the designer decides to add or delete some command ill just edit my tree and my interface will adjust.
My million dollar question is
can I somehow link a widget to represent an Item including its children of my model? notice that the devices ( device 1 and so on ) is always the child of COMMAND/RESPONSE Item in my model, and the children of my devices is the available command or response depending on which model you are looking.
What is the easiest way to implement this goal? I was planning to use a delegate to somehow draw my Widget so i will still have a tree like view as viewer.
Is there any other simple way to achieve my goal?
Lastly, Did you guys have a good holiday season ?
baray98
Bookmarks