[vtkusers] BorderWidget with mouse
Leonardo M. Ramé
l.rame at griensu.com
Fri Oct 22 14:36:43 EDT 2010
On 2010-10-22 14:20:19 -0400, John Drescher wrote:
> On Fri, Oct 22, 2010 at 2:16 PM, Leonardo M. Ramé <l.rame at griensu.com> wrote:
> > Hi, I'm testing vtkBorderWidget but I don't like the results I'm
> > getting.
> >
> > This code places a borderWidget in a QVTKwidget, then I can manipulate
> > it with the mouse:
> >
> > borderWidget = vtkBorderWidget::New();
> > borderWidget->SetInteractor(this->GetInteractor());
> > borderWidget->CreateDefaultRepresentation();
> > borderWidget->On();
> >
> > What I would like is to let the user pick a point in the QVTKWidget,
> > then start dragging to create a box, like many drawing programs do. When
> > the box is created, the user should resize it (vtkBorderWidget already
> > does this), and, when the user click inside the borderWidget and drag
> > the mouse, the widget should move until the user stop dragging.
> >
> > Does anybody knows how can I get this behavior? or a similar widget that
> > alows me to do this?.
> >
>
> Derive your class from vtkBorderWidget and add the additional drag
> functionality.
>
> John
Yes, I was hoping to get some pointers no how to do that.
--
Leonardo M. Ramé
http://leonardorame.blogspot.com
More information about the vtkusers
mailing list