[vtkusers] Qt Events and vtkObserver
Ale
notinmyhead at gmail.com
Thu Jun 7 10:18:45 EDT 2012
Hi,
I try again, hoping to explain it in a better way.
My first question relies on the fact that I understood (maybe I did not, in fact) that the vtkInteractor intercepts events and reacts by the vtkInteractorSyle set but in the example each single event is set by a QT events connector. Am I right? So it seems to me that no way of adding observers (or better custom vtkInterector styles) to handle the final behavior...
About my second question, I was trying to "connect" the FourPane example (where they share the same cursor...) to the slot implementation. Maybe am I missing something?
Thanks.
Ale
Il giorno 07/giu/2012, alle ore 15.46, David Doria ha scritto:
> I still don't follow your first question.
>
> For you second question, what do you mean by 'interactor'? The
> QVTKWidget has a vtkRenderWindowInteractor inside of it. Do you mean
> share an "actor" between the QVTKWidgets? That should not be done:
>
> http://vtk.1045678.n5.nabble.com/Should-I-use-one-actor-per-renderer-renderwindow-or-can-they-share-the-same-actor-td4954889.html
> http://vtk.1045678.n5.nabble.com/Adding-an-ImageSlice-to-one-renderer-causes-the-image-to-disappear-from-a-different-renderer-td4759415.html
>
> David
>
>
> On Thu, Jun 7, 2012 at 9:37 AM, Ale <notinmyhead at gmail.com> wrote:
>> Moreover I wonder how, in this case of slots usage instead of Interactor, how can I share the same interactor among several QVTKWidgets?
>>
>> Il giorno 07/giu/2012, alle ore 15.20, Ale ha scritto:
>>
>>> You're right. I'd like to "re-program" the whole behavior to adapt it to different styles... I tried the vtkObserver added to the Render Window but it seems not to be fired... Instead, i found out how to stop the propagation using AbortFlagOn but it seems to working in a "delayed" mode. If, as instance, I set a new slice, the display update the image only (resetting the camera) but no annotation is changed.
>>>
>>> Il giorno 07/giu/2012, alle ore 14.53, David Doria ha scritto:
>>>
>>>> On Thu, Jun 7, 2012 at 5:11 AM, Ale <notinmyhead at gmail.com> wrote:
>>>>> Hello,
>>>>>
>>>>> I had a look at Qt Event event example but I did not understand if there is a way to add observer instead of adding connection to slots since I don't know how to suppress the original event behavior. I did also tried to attach a vtkObserver but it seems not to work. Should I instantiate a InteractorStyle? Where did I have to attach it?
>>>>>
>>>>> Thanks,
>>>>> Ale
>>>>
>>>> You'll have to be a little more specific.
>>>>
>>>> I just added this example on how to connect a VTK event to a Qt slot.
>>>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Qt/EventQtSlotConnect
>>>>
>>>> Is this what you're trying to do? If not, please say what is producing
>>>> the event, and where you want to handle/observe the event.
>>>>
>>>> David
>>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list