hi i am not an expert programmer and i've always done gui with html. in that case is simple, there is one place (and one language too) for the backend and one for the frontend. yeah ok sometimes i've used some mvc pattern but not a lot.
not i'm doing a gui with qt and i don't know where to put my classes.
let's say that i have to make a gui for a gesture recognition system: there is one thread that read from camera, and one thread for the computations (for make everything nonblocking). the computations is dived in some preprocessing, background subtraction, and recocgnition.
i think that the better interface is the one more consistent with the structure. so i thought to have some tabs: one for camera capturing, one for preprocessing, one for background subtraction and one for recognition.
but now i am kind of stucked because i don't know where to put my files. the first thought was to put the code (of the object that do it) inside the widget.. let's say: the CameraControlWidget has inside as a protected member the camera thread, the BackgroundSubtractionWindget has inside the BackgroundSubtractor object and so on..
But in this way I have to separate my algorithm through the gui.. and this is bad. if one day i will do another gui with pure opengl, or something withoug gui at all.. i have to look for in the gui widjet and take apart the algorithm..
the best thing could be have a directory with all the gui files and one for all the algorithm code.. and something totally divided.. but it is not easy.. expecially if the gui is complex and if there has to be some realtime stream (like the stream from a webcam)
can someone give me some advice for how to design such a kind of application?
just some blog article or whatever that talk on how keep separate the backend from the frontend in qt could be nice.
Bookmarks