Sophie

Sophie

distrib > Fedora > 15 > x86_64 > by-pkgid > ec9ccd822be669bf449eecc0e640e0be > files > 279

camstream-0.26.3-19.fc12.x86_64.rpm

<html>
<head>
<title>CamStream Tech Docs</title>
<link rel="stylesheet" href="../tech.css" type="text/css">
</head>

<body>

<h1>Programming style</h1>

<p>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.

<p>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 <span class="code">CVideoDevice::Resized()</span>
signal is for: when the size has been changed by a call to <span
class="code">CVideoDevice::SetSize()</span>, this signal will be called. All
viewers and dialogs connect to this slot, and thus get notified of any
changes. 

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



</body>
</html>