<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hi all,<br>
    I am having really hard times passing on reference to the objects
    that are stored as vtkSmartPointer&lt;T&gt; as private data within a
    class. E.g.:<br>
    <tt>class MyClass </tt><tt><br>
    </tt><tt>{</tt><tt><br>
    </tt><tt>&nbsp; public:</tt><tt><br>
    </tt><tt>&nbsp;&nbsp;&nbsp; ...</tt><tt><br>
    </tt><tt>&nbsp;&nbsp; private:</tt><tt><br>
    </tt><tt>&nbsp;&nbsp;&nbsp; vtkSmartPointer&lt;vtkPolyData&gt; surface;</tt><tt><br>
    </tt><tt>};</tt><tt><br>
    </tt><br>
    What is the best way to pass 'surface' via signal/slot mechanism of
    Qt? <br>
    I thought I'd create a public method<br>
    <tt>vtkPolyData * MyClass::getSurface() { return
      surface.GetPointer(); }</tt><br>
    The problem is that GetPointer() returns <b>const</b> T* which the
    compiler complains about when I later want to use it. As a matter of
    fact, all vtkSmartPointer's public methods return const something. <br>
    <br>
    What would be the preferred way to pass objects stored as
    vtkSmartPointer&lt;T&gt; object?<br>
    1.) T* MyClass::getT() const { return object.GetPointer(); }<br>
    2.) vtkSmartPointer&lt;T&gt; MyClass::getT() { return object; }<br>
    3.) something else?<br>
    <br>
    I want to pass the object via signal/slot mechanism. What would be
    the best way?<br>
    A.) signal doneSurfaceProcessing(vtkPolyData &amp;);&nbsp; <br>
    B.) signal doneSurfaceProcessing(vtkPolyData *);<br>
    C.) signal
    doneSurfaceProcessing(vtkSmartPointer&lt;vtkPolyData&gt;);<br>
    <br>
    The idea is to send off the signal with something like<br>
    emit doneSurfaceProcessing(myclass-&gt;getSurface());<br>
    <br>
    then the slot would be<br>
    setSurface(???)&nbsp; //vtkSmartPointer&lt;T&gt;&nbsp; or T* or T&amp; ?<br>
    <br>
    Thank you!!<br>
    Miro
    <div style="font-size:75%"><br>
    </div>
    <div class="moz-signature">
    </div>
  </body>
</html>