[Qt-interest] Box Pick Zoom

Sujan Dasmahapatra sujan.dasmahapatra at gmail.com
Sat Aug 15 11:08:40 CEST 2009


Dear Friends Can we use QwtPlotZoomer for QGraphicsView...??

On Sat, Aug 15, 2009 at 1:53 PM, Sujan Dasmahapatra <
sujan.dasmahapatra at gmail.com> wrote:

> I want to paint on the QGraphicsView do I need to reimplement paintEvent()
> ??
>
>
> On Fri, Aug 14, 2009 at 8:57 PM, Christopher Rasch-Olsen Raa <
> christopher at technophile.info> wrote:
>
>> Some code would help us spot what you're doing wrong.
>>
>> --
>> Christopher
>>
>>  Fredag 14 august 2009 16:17:27 skrev Sujan Dasmahapatra :
>>  > Dear Friends
>> > I am fed up with this implementing box pick zoom.
>> > implementing paintEvent() mehtod is changin the whole software looks.
>> > I set the scene in the view with scene background as black.
>> > Now I am implementing paint() method for graphicsItem display on the
>> > view.These all were going fine.
>> >
>> >
>> > Now I want to implement box pick zoom ,i.e user will press the left
>> mouse
>> > and release then there should be a rectangle selected and any items
>> coming
>> > in that portion should be selected.
>> >
>> > But I wanted to draw a rectangle in the paintEvent() method but if I
>> > implement that method then my view is getting white it's not what I set.
>> >
>> > Please giveme some suugestion where should I draw the rectangle. !!!
>> > Thanks
>> >
>> > On Thu, Aug 13, 2009 at 5:53 PM, Sujan Dasmahapatra <
>> >
>> > sujan.dasmahapatra at gmail.com> wrote:
>> > > It seems the whole work is manual right ? I need to define the box and
>> > > get the portion of my items.
>> > > One question is that I may not have a full graphicsItem but a some
>> > > portion of the item may be picked so in that case is it possible to
>> > > operate over that portion ?
>> > >
>> > >   On Thu, Aug 13, 2009 at 5:35 PM, Thomas Dähling <
>> > >
>> > > t.daehling at googlemail.com> wrote:
>> > >> OK, so what is the specific problem? Of course there won't be a
>> rubber
>> > >> band appearing by issuing that simple call you did, because that is
>> > >> just deciding how the View should treat selected Items (i.e. select
>> > >> all items that contained or intersected by the graphicsitem or it's
>> > >> bounding rect). If you want to start showing a rubber band you might
>> > >> have to reimplement the view and provide a specialized paint routine
>> > >> that, when 'zoom in' is toggled, draws a rect around the selected
>> > >> items.
>> > >>
>> > >> 2009/8/13 Sujan Dasmahapatra <sujan.dasmahapatra at gmail.com>:
>> > >> > Box Pick Zoom is rubber band selection option.
>> > >> > Mean User'll pick some portion on the view using  left mouse
>> (Rubber
>> > >>
>> > >> band
>> > >>
>> > >> > selection )and that portion will be zoomed.
>> > >> >
>> > >> > On Thu, Aug 13, 2009 at 4:56 PM, Thomas Dähling <
>> > >>
>> > >> t.daehling at googlemail.com>
>> > >>
>> > >> > wrote:
>> > >> >> In all honesty, I cannot imagine what 'box pick zoom' is supposed
>> to
>> > >> >> be, and google did not help me figuring this out either. Maybe if
>> you
>> > >> >> could elaborate further upon what this is exactly supposed to do
>> > >> >> there'll be more people able to help you out with this.
>> > >> >>
>> > >> >> 2009/8/13 Sujan Dasmahapatra <sujan.dasmahapatra at gmail.com>:
>> > >> >> > Dear Friends
>> > >> >> >
>> > >> >> > I have a QGraphicsView, QGraphicsScene and a bunch of
>> > >> >> > QGraphicsItem.
>> > >> >> >
>> > >> >> > all the  items are in the scene and displayed in view. I want to
>> > >>
>> > >> provide
>> > >>
>> > >> >> > box
>> > >> >> > pick zoom in and zoom out to the items or to the view.
>> > >> >> >
>> > >> >> > so  in the slot when user clicks for zoom in I am enabling
>> > >> >> > rubberband selection mode.
>> > >> >> > //something like this.
>> > >> >> > MainWindow::ZoomIn()
>> > >> >> > {
>> > >> >> >    view->setRubberBandSelectionMode (Qt::ContainsItemShape);
>> > >> >> >
>> > >> >> > }
>> > >> >> >
>> > >> >> >
>> > >> >> > //////////////////////////////////////////////
>> > >> >> >
>> > >> >> > but when I click on zoom in  no rubber band is appearing.Can
>> anyone
>> > >> >> > suggest
>> > >> >> > me how could I achieve box pick zoom for my view and items in
>> the
>> > >>
>> > >> view.
>> > >>
>> > >> >> > ??
>> > >> >> >
>> > >> >> > --
>> > >> >> > Thanks & Regards
>> > >> >> > S. Dasmahapatra
>> > >> >> > B.E. (Aeronautics-Aerodynamics)
>> > >> >> > Bangalore, India
>> > >> >> > Ph:91-9900839788
>> > >> >> > Office:91-80-66470248
>> > >> >> > mail id : sujan.dasmahapatra at gmail.com
>> > >> >> >
>> > >> >> > _______________________________________________
>> > >> >> > Qt-interest mailing list
>> > >> >> > Qt-interest at trolltech.com
>> > >> >> > http://lists.trolltech.com/mailman/listinfo/qt-interest
>> > >> >
>> > >> > --
>> > >> > Thanks & Regards
>> > >> > S. Dasmahapatra
>> > >> > B.E. (Aeronautics-Aerodynamics)
>> > >> > Bangalore, India
>> > >> > Ph:91-9900839788
>> > >> > Office:91-80-66470248
>> > >> > mail id : sujan.dasmahapatra at gmail.com
>> > >> >
>> > >> > _______________________________________________
>> > >> > Qt-interest mailing list
>> > >> > Qt-interest at trolltech.com
>> > >> > http://lists.trolltech.com/mailman/listinfo/qt-interest
>> > >
>> > > --
>> > >  Thanks & Regards
>> > > S. Dasmahapatra
>> > > B.E. (Aeronautics-Aerodynamics)
>> > > Bangalore, India
>> > > Ph:91-9900839788
>> > > Office:91-80-66470248
>> > > mail id : sujan.dasmahapatra at gmail.com
>>
>>
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>>
>
>
>
> --
>  Thanks & Regards
> S. Dasmahapatra
> B.E. (Aeronautics-Aerodynamics)
> Bangalore, India
> Ph:91-9900839788
> Office:91-80-66470248
> mail id : sujan.dasmahapatra at gmail.com
>



-- 
Thanks & Regards
S. Dasmahapatra
B.E. (Aeronautics-Aerodynamics)
Bangalore, India
Ph:91-9900839788
Office:91-80-66470248
mail id : sujan.dasmahapatra at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090815/23724294/attachment.html 


More information about the Qt-interest-old mailing list