[Qgis-developer] Re: composer redesign branch
Marco Hugentobler
marco.hugentobler at karto.baug.ethz.ch
Sun Apr 13 09:13:05 EDT 2008
Hi Martin,
A very late follow up on this subject:
Looking at the composer items, those classes are multiple inherited from
QWidget (they are items and configuration dialogs at the same time). So my
original plan is not possible. Instead I first have to separate dialog parts
from items to put items in core.
Regards,
Marco
> I haven't got so far with the planning... I was more thinking of
> making the composer items independent of any GUI parts, also the
> graphics view related parts and wanted to create their counterparts in
> GUI library for graphics view. I haven't realized that we could use
> just graphics scene and graphics items in core library and having the
> graphics view in gui library. Your idea sounds better.
Am Dienstag 04 März 2008 02:06:49 schrieb Martin Dobias:
> On Mon, Mar 3, 2008 at 5:45 PM, Marco Hugentobler
>
> <marco.hugentobler at karto.baug.ethz.ch> wrote:
> > So my suggestion is to have the rendering context somehow like this:
> >
> > class QgsMapRenderContext
> > {
> > QgsMapToPixel mMapToPixel;
> > QgsCoordinateTransform mCoordTransform;
> > QgsRect mExtent;
> > bool drawEditingInformation;
> > bool mRenderingStopped;
> > double mResolutionRatio;
> > };
>
> Yes, something like that should do it...
> We should also include a member like "force vector output" which will
> tell to renderer whether it can use just a rendered pixmap of a symbol
> or whether it should render the symbol directly - this is where map
> composer is failing.
>
> > The resolution ratio is usually 1, except when drawing to a different
> > paint device (like QPrinter). I hope it will allow to consider for
> > different line width / symbol sizes on these output devices.
>
> When looking at QgsVectorLayer::draw(), there's symbolScale and
> widthScale... are both of them covered by mResolutionRatio?
>
> > Maybe QgsComposerView (derived from QGraphicsView) could go to gui and
> > the composer items to core? Then client applications (or some interface
> > component in core) could arrange the items and call
> > QGraphicsScene::render.
>
> I haven't got so far with the planning... I was more thinking of
> making the composer items independent of any GUI parts, also the
> graphics view related parts and wanted to create their counterparts in
> GUI library for graphics view. I haven't realized that we could use
> just graphics scene and graphics items in core library and having the
> graphics view in gui library. Your idea sounds better.
>
> Bye
> Martin
--
Dr. Marco Hugentobler
Institute of Cartography
ETH Zurich
Technical Advisor QGIS Project Steering Committee
More information about the Qgis-developer
mailing list