CamStream Tech Docs

# Programming style

Because I build the program on top of Qt, some things are quite easy to program. For example: when two views of the same video device are open, and you change the size of one of them, the other automaticly changes with it, including all dialogs! So how I do this? Well, with the signal/slot mechanism it's really easy.

In this case there is a single common item: the video device. So it makes sense for this device to announce to the world that something has changed, and that is just what the CVideoDevice::Resized() signal is for: when the size has been changed by a call to CVideoDevice::SetSize(), this signal will be called. All viewers and dialogs connect to this slot, and thus get notified of any changes.

The Qt library automatically cleans up connections to objects that are deleted, so you don't no need to worry about that.