D19327: Karbon: Enable multi page capability

Anthony Fieroni noreply at phabricator.kde.org
Thu Mar 7 18:33:10 GMT 2019


anthonyfieroni added inline comments.

INLINE COMMENTS

> KarbonView.cpp:429-433
> +    // TODO: It is not obvious how this is best implemented when importing multipage docs
> +    // Append pages?
> +    // Append layers to existing pages?
> +    // Add shapes to active page?
> +    // etc?

Can we append layers?

> KarbonView.cpp:462-465
> +/*
>          foreach(KoShape * shape, importedShapes) {
>              d->canvas->shapeManager()->selection()->select(shape, false);
> +        }*/

Remove

> KarbonView.cpp:483
> +    for (int i = 0; i < kopaDocument()->pages().count(); ++i) {
> +        KoShapeLayer *l = dynamic_cast<KoShapeLayer*>(kopaDocument()->pages().at(i));
> +        shapes += l->shapes();

Use static_cast when we don't check against nullptr, dynamic_cast is waste of time.

> KarbonView.cpp:878-879
> +    kopaCanvas()->canvasController()->zoomTo(viewRect.translated(kopaCanvas()->documentOrigin()));
> +//     QPointF newCenter = kopaCanvas()->documentOrigin() + zoomHandler->documentToView(bbox.center());
> +//     kopaCanvas()->setPreferredCenter(newCenter.toPoint());
>  }

If we don't need this - remove.

> KarbonConfigInterfacePage.cpp:85-87
> +// TODO or move or remove?
> +//     m_canvasColor = new KColorButton(m_oldCanvasColor, tmpQGroupBox);
> +//     interfaceLayout->addRow(i18n("Canvas color:"), m_canvasColor);

We can keep canvas color, after all

> KarbonConfigInterfacePage.cpp:122-126
> +//     QColor canvasColor = m_canvasColor->color();
> +//     if (canvasColor != m_oldCanvasColor) {
> +//         interfaceGroup.writeEntry("CanvasColor", canvasColor);
> +//         refreshGUI = true;
> +//     }

Also we can keep.

REPOSITORY
  R8 Calligra

REVISION DETAIL
  https://phabricator.kde.org/D19327

To: danders, anthonyfieroni
Cc: Calligra-Devel-list, dcaliste, cochise, vandenoever
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20190307/c15f0085/attachment.htm>


More information about the calligra-devel mailing list