[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: Precision "display mode" for KoRuler
From:       "Aron Stansvik" <elvstone () gmail ! com>
Date:       2007-11-03 9:43:31
Message-ID: 751a4f870711030243j6aaff564mc893c36856ee79e2 () mail ! gmail ! com
[Download RAW message or body]

2007/11/3, Thomas Zander <zander@kde.org>:
> On Friday 02 November 2007 23:11:55 Aron Stansvik wrote:
> > 2007/11/2, Thomas Zander <zander@kde.org>:
> > > On Friday 02 November 2007 22:23:58 Aron Stansvik wrote:
> > > > Hello folks, I've found a JJ for myself :)
> > > >
> > > > I would like to take a shot at implementing an alternate display
> > > > mode for the ruler during Shift-dragging of indents, when the
> > > > indents are moved without snapping. Something similar, or even
> > > > identical, to what Microsoft Word has (see attached screenshot).
> > > >
> > > > First obvious question; any objections to this?
> > >
> > > It would take a TODO off of my list ;)
> >
> > Great ;)
> >
> > > > 2) Do it more elegantly using strategies.
> > >
> > > Yes, please.
> > >
> > > Basically you can delete the current strategy and create a
> > > MeasurementsPaintingStrategy to replace it in the mousePressEvent.
> > > I suggest inheriting from the horizontal policy is probably so you
> > > only have to reimplement the drawRulerStripes method.
> >
> > Sorry I forgot to say that the ruler should flip over to this display
> > mode also when changing the page margins,
>
> page margins will be implemented (soonish), I already added the concept
> of 'HotSpots' to the ruler to allow apps to do this.
> So the changing of the strategy could still be done in the
> mousePressEvent, just make sure you check the d->selected enum.

Alright.

> > and that it should work also
> > for the vertical ruler.
>
> Ah, I didn't get that :)
> I suggest a PaintingStrategy* KoRulerPrivate::createStrategy(); method
> that looks at d->orientation and d->selected to decide which strategy to
> create.

Sounds good.

> > So I guess two strategies for me to implement then, one for each
> > orientation, and each inheriting the existing strategy for the
> > respective orientation, overriding drawRulerStripes() as you suggest?
>
> yap, My initial guess is that that would work.

Okay. I think I have what I need to get started now. Thanks for the
input. Now less talking and more coding!

Aron
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic