Re: [calligra] krita/ui/openrastertk: load openraster blending modes
Hi, This commit break compilation: http://my.cdash.org/viewBuildError.php?buildid=187032 On Friday 13 May 2011, Boudewijn Rempt wrote: > Git commit 15f2a481ef742bc6f0ded66ca854d29ae6f712ac by Boudewijn Rempt. > Committed on 13/05/2011 at 02:36. > Pushed by rempt into branch 'master'. > > load openraster blending modes > > These are defined as a subset of svg blending modes. > > M +18 -0krita/ui/openrastertk/kis_open_raster_stack_load_visitor.cpp > M +12 -0krita/ui/openrastertk/kis_open_raster_stack_save_visitor.cpp > > http://commits.kde.org/calligra/15f2a481ef742bc6f0ded66ca854d29ae6f712ac > > diff --git a/krita/ui/openrastertk/kis_open_raster_stack_load_visitor.cpp > b/krita/ui/openrastertk/kis_open_raster_stack_load_visitor.cpp index > c1f65ab..d75 100644 > --- a/krita/ui/openrastertk/kis_open_raster_stack_load_visitor.cpp > +++ b/krita/ui/openrastertk/kis_open_raster_stack_load_visitor.cpp > @@ -31,6 +31,7 @@ > #include > #include > #include > +#include > > #include > #include > @@ -104,6 +105,23 @@ void > KisOpenRasterStackLoadVisitor::loadLayerInfo(const QDomElement& elem, > KisLa layer->setName(elem.attribute("name")); > layer->setX(elem.attribute("x").toInt()); > layer->setY(elem.attribute("y").toInt()); > + > +if (compop == "svg:clear") layer->setCompositeOp(COMPOSITE_CLEAR); > +if (compop == "svg:src-over") layer->setCompositeOp(COMPOSITE_OVER); > +if (compop == "svg:add") layer->setCompositeOp(COMPOSITE_ADD); > +if (compop == "svg:multiply") layer->setCompositeOp(COMPOSITE_MULT); > +if (compop == "svg:screen") layer->setCompositeOp(COMPOSITE_SCREEN); > +if (compop == "svg:overlay") layer->setCompositeOp(COMPOSITE_OVERLAY); > +if (compop == "svg:darken") layer->setCompositeOp(COMPOSITE_DARKEN); > +if (compop == "svg:lighten") layer->setCompositeOp(COMPOSITE_LIGHTEN); > +if (compop == "svg:color-dodge") > layer->setCompositeOp(COMPOSITE_DODGE); +if (compop == > "svg:color-burn") layer->setCompositeOp(COMPOSITE_BURN); +if (compop > == "svg:hard-light") layer->setCompositeOp(COMPOSITE_HARD_LIGHT); +if > (compop == "svg:soft-light") layer->setCompositeOp(COMPOSITE_SOFT_LIGHT); > +if (compop == "svg:difference") > layer->setCompositeOp(COMPOSITE_DIFF); + > +qDebug() << ">" << compop << layer->compositeOpId(); > + > } > > void KisOpenRasterStackLoadVisitor::loadAdjustmentLayer(const QDomElement& > elem, KisAdjustmentLayerSP aL) diff --git > a/krita/ui/openrastertk/kis_open_raster_stack_save_visitor.cpp > b/krita/ui/openrastertk/kis_open_raster_stack_save_visitor.cpp index > bf481f5..173df08 100644 > --- a/krita/ui/openrastertk/kis_open_raster_stack_save_visitor.cpp > +++ b/krita/ui/openrastertk/kis_open_raster_stack_save_visitor.cpp > @@ -22,6 +22,7 @@ > #include > > #include > +#include > > #include "kis_adjustment_layer.h" > #include "filter/kis_filter.h" > @@ -31,6 +32,7 @@ > #include > #include "kis_open_raster_save_context.h" > > + > struct KisOpenRasterStackSaveVisitor::Private { > Private() : currentElement(0) {} > KisOpenRasterSaveContext* saveContext; > @@ -52,6 +54,16 @@ void > KisOpenRasterStackSaveVisitor::saveLayerInfo(QDomElement& elt, KisLayer* > la { > elt.setAttribute("name", layer->name()); > elt.setAttribute("opacity", layer->opacity() / 255.0); > + > +QString compop = layer->compositeOpId(); > +if (layer->compositeOpId() == COMPOSITE_OVER) compop = "src-over"; > +else if (layer->compositeOpId() == COMPOSITE_BURN) compop = > "color-burn"; +else if (layer->compositeOpId() == COMPOSITE_DODGE) > compop = "color-dodge"; +else if (layer->compositeOpId() == > COMPOSITE_HARD_LIGHT) compop = "hard-light"; +else if > (layer->compositeOpId() == COMPOSITE_SOFT_LIGHT) compop = "soft-light"; + > else if (layer->compositeOpId() == COMPOSITE_DIFF) compop = > "difference"; + > +elt.setAttribute("composite-op", "svg:" + compop); > } > > bool KisOpenRasterStackSaveVisitor::visit(KisPaintLayer *layer) -- Cyrille Berger Skott ___ calligra-devel mailing list calligra-devel@kde.org https://mail.kde.org/mailman/listinfo/calligra-devel
Re: [calligra] krita/ui/openrastertk: load openraster blending modes
2011/5/13 Boudewijn Rempt : > Git commit 15f2a481ef742bc6f0ded66ca854d29ae6f712ac by Boudewijn Rempt. > Committed on 13/05/2011 at 02:36. > Pushed by rempt into branch 'master'. > > load openraster blending modes > > These are defined as a subset of svg blending modes. > > M +18 -0 krita/ui/openrastertk/kis_open_raster_stack_load_visitor.cpp > M +12 -0 krita/ui/openrastertk/kis_open_raster_stack_save_visitor.cpp > > http://commits.kde.org/calligra/15f2a481ef742bc6f0ded66ca854d29ae6f712ac > > diff --git a/krita/ui/openrastertk/kis_open_raster_stack_load_visitor.cpp > b/krita/ui/openrastertk/kis_open_raster_stack_load_visitor.cpp > index c1f65ab..d75 100644 > --- a/krita/ui/openrastertk/kis_open_raster_stack_load_visitor.cpp > +++ b/krita/ui/openrastertk/kis_open_raster_stack_load_visitor.cpp > @@ -31,6 +31,7 @@ > #include > #include > #include > +#include > > #include > #include > @@ -104,6 +105,23 @@ void KisOpenRasterStackLoadVisitor::loadLayerInfo(const > QDomElement& elem, KisLa > layer->setName(elem.attribute("name")); > layer->setX(elem.attribute("x").toInt()); > layer->setY(elem.attribute("y").toInt()); > + > + if (compop == "svg:clear") layer->setCompositeOp(COMPOSITE_CLEAR); > + if (compop == "svg:src-over") layer->setCompositeOp(COMPOSITE_OVER); > + if (compop == "svg:add") layer->setCompositeOp(COMPOSITE_ADD); > + if (compop == "svg:multiply") layer->setCompositeOp(COMPOSITE_MULT); > + if (compop == "svg:screen") layer->setCompositeOp(COMPOSITE_SCREEN); > + if (compop == "svg:overlay") layer->setCompositeOp(COMPOSITE_OVERLAY); > + if (compop == "svg:darken") layer->setCompositeOp(COMPOSITE_DARKEN); > + if (compop == "svg:lighten") layer->setCompositeOp(COMPOSITE_LIGHTEN); > + if (compop == "svg:color-dodge") layer->setCompositeOp(COMPOSITE_DODGE); > + if (compop == "svg:color-burn") layer->setCompositeOp(COMPOSITE_BURN); > + if (compop == "svg:hard-light") > layer->setCompositeOp(COMPOSITE_HARD_LIGHT); > + if (compop == "svg:soft-light") > layer->setCompositeOp(COMPOSITE_SOFT_LIGHT); > + if (compop == "svg:difference") layer->setCompositeOp(COMPOSITE_DIFF); > + > + qDebug() << ">" << compop << layer->compositeOpId(); Also, perhaps this qDebug() wasn't supposed to be in the commit? Elvis > + > } > > void KisOpenRasterStackLoadVisitor::loadAdjustmentLayer(const QDomElement& > elem, KisAdjustmentLayerSP aL) > diff --git a/krita/ui/openrastertk/kis_open_raster_stack_save_visitor.cpp > b/krita/ui/openrastertk/kis_open_raster_stack_save_visitor.cpp > index bf481f5..173df08 100644 > --- a/krita/ui/openrastertk/kis_open_raster_stack_save_visitor.cpp > +++ b/krita/ui/openrastertk/kis_open_raster_stack_save_visitor.cpp > @@ -22,6 +22,7 @@ > #include > > #include > +#include > > #include "kis_adjustment_layer.h" > #include "filter/kis_filter.h" > @@ -31,6 +32,7 @@ > #include > #include "kis_open_raster_save_context.h" > > + > struct KisOpenRasterStackSaveVisitor::Private { > Private() : currentElement(0) {} > KisOpenRasterSaveContext* saveContext; > @@ -52,6 +54,16 @@ void > KisOpenRasterStackSaveVisitor::saveLayerInfo(QDomElement& elt, KisLayer* la > { > elt.setAttribute("name", layer->name()); > elt.setAttribute("opacity", layer->opacity() / 255.0); > + > + QString compop = layer->compositeOpId(); > + if (layer->compositeOpId() == COMPOSITE_OVER) compop = "src-over"; > + else if (layer->compositeOpId() == COMPOSITE_BURN) compop = "color-burn"; > + else if (layer->compositeOpId() == COMPOSITE_DODGE) compop = > "color-dodge"; > + else if (layer->compositeOpId() == COMPOSITE_HARD_LIGHT) compop = > "hard-light"; > + else if (layer->compositeOpId() == COMPOSITE_SOFT_LIGHT) compop = > "soft-light"; > + else if (layer->compositeOpId() == COMPOSITE_DIFF) compop = "difference"; > + > + elt.setAttribute("composite-op", "svg:" + compop); > } > > bool KisOpenRasterStackSaveVisitor::visit(KisPaintLayer *layer) > ___ calligra-devel mailing list calligra-devel@kde.org https://mail.kde.org/mailman/listinfo/calligra-devel
Re: Review Request: Stage: save zoom factor for normal view and slides sorter between sesions
--- This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/101129/ --- (Updated May 13, 2011, 3:43 p.m.) Review request for Calligra. Changes --- Fix center page when loading document and other comments. Summary --- Add save of zoom factor and mode for normal view and slides sorter. Also eliminate page and width options of zooming in Slides Sorter (these options doesn't make much sense in that view). Finally I eliminate the white space around the slide because it make the slide lost focus when zooming and when I restore the previous zoom value (the zoom function center the white space too), in addition the white space make too big the default size of shapes when inserted. (I ask in calligra channel, and the white space was added to have an area for insert things, maybe it could be added in a better way). Diffs (updated) - kpresenter/part/KPrView.h 80b67520be60500ecf11df0827f1d4ee8eeab4e7 kpresenter/part/KPrView.cpp 0ba563aebc7fe7566b5cc00bbcabef235e48b317 kpresenter/part/KPrViewModeSlidesSorter.h ec5f6691072115eb7818f1eb224f6a03fe9bf13c kpresenter/part/KPrViewModeSlidesSorter.cpp b4fee3c755aebf65e9bff0cef5516776533ec4a6 libs/kopageapp/KoPAView.h 5585364c4bf0503e312a302b91f762653aaf98bb libs/kopageapp/KoPAView.cpp c53edecb309098949f66e9d50238bc60f26f9bee Diff: http://git.reviewboard.kde.org/r/101129/diff Testing --- build and run Thanks, Paul ___ calligra-devel mailing list calligra-devel@kde.org https://mail.kde.org/mailman/listinfo/calligra-devel
Qt's minimal dependency (Re: [calligra] /: Merge branch 'mobile-qml-shantanu')
Hi, We are supposed to be depending only on Qt 4.6, not 4.7. So we either have to: * decide to raise our minimum dependency to 4.7 * or make active only builded when Qt 4.7 is detected On Friday 13 May 2011, Shantanu Tushar wrote: > Git commit 2afc2b3be16b9392431894e2a0b73df352b68ed0 by Shantanu Tushar. > Committed on 13/05/2011 at 15:29. > Pushed by shantanu into branch 'master'. > > Merge branch 'mobile-qml-shantanu' > > I +1-0CMakeLists.txt > I +46 -0active/CMakeLists.txt > I +12 -0active/CalligraMobile.qrc > I +10 -0active/README > I +37 -0active/calligra_mobile_global.h.in > I +---active/images/arrow-down.png > I +---active/images/arrow-left.png > I +---active/images/arrow-right.png > I +---active/images/arrow-up.png > I +---active/images/stage.png > I +---active/images/tab-detach.png > I +---active/images/tables.png > I +---active/images/words.png > I +39 -0active/main.cpp > I +120 -0active/qml/Button.qml > I +103 -0active/qml/Doc.qml > I +66 -0active/qml/DocumentTypeSelector.qml > I +103 -0active/qml/HomeScreen.qml > I +42 -0active/qml/PresentationTemplatesModel.qml > I +37 -0active/qml/PresentationTemplatesView.qml > I +56 -0active/qml/PresentationToolbar.qml > I +46 -0active/qml/RecentFiles.qml > I +56 -0active/qml/SpreadsheetToolbar.qml > I +28 -0active/qml/WordsToolbar.qml > I +582 -0active/src/CanvasController.cpp > I +141 -0active/src/CanvasController.h > I +65 -0active/src/MainWindow.cpp > I +44 -0active/src/MainWindow.h > I +195 -0active/src/PAView.cpp > I +64 -0active/src/PAView.h > I +---active/templates/stage/Text_Only.odp > I +---active/templates/stage/Text_Only.odp.png > I +---active/templates/stage/Text_With_Chart.odp > I +---active/templates/stage/Text_With_Chart.odp.png > I +---active/templates/stage/Text_With_Header.odp > I +---active/templates/stage/Text_With_Header.odp.png > I +---active/templates/stage/Text_With_Image.odp > I +---active/templates/stage/Text_With_Image.odp.png > I +---active/templates/stage/Text_With_Outline.odp > I +---active/templates/stage/Text_With_Outline.odp.png > I +---active/templates/tables/NewSpread.ods > I +---active/templates/words/NewDocument.odt > > http://commits.kde.org/calligra/2afc2b3be16b9392431894e2a0b73df352b68ed0 -- Cyrille Berger Skott ___ calligra-devel mailing list calligra-devel@kde.org https://mail.kde.org/mailman/listinfo/calligra-devel
Re: Qt's minimal dependency (Re: [calligra] /: Merge branch 'mobile-qml-shantanu')
On Friday 13 May 2011 17:44:36 Cyrille Berger Skott wrote: > Hi, > > We are supposed to be depending only on Qt 4.6, not 4.7. So we either have > to: * decide to raise our minimum dependency to 4.7 > * or make active only builded when Qt 4.7 is detected I have no problem with us raising the Qt dependency to 4.7.2 ___ calligra-devel mailing list calligra-devel@kde.org https://mail.kde.org/mailman/listinfo/calligra-devel
Re: Qt's minimal dependency (Re: [calligra] /: Merge branch 'mobile-qml-shantanu')
On Friday, May 13, 2011 17:44:36 Cyrille Berger Skott wrote: > Hi, > > We are supposed to be depending only on Qt 4.6, not 4.7. So we either have > to: * decide to raise our minimum dependency to 4.7 > * or make active only builded when Qt 4.7 is detected Definitely only make active/ build when 4.7 is detected. Can this be fixed ASAP? I can't do anything right now. ___ calligra-devel mailing list calligra-devel@kde.org https://mail.kde.org/mailman/listinfo/calligra-devel
Re: Usage of libkundo2 in Calligra (Qt's maximal dependency)
On Friday 13 May 2011 19:23:10 Alexander Potashev wrote: > Hi, > > I've recently "pushed through" a patch to Qt 4.8 > (https://qt.gitorious.org/qt/qt/merge_requests/2610) that will allow > usage of different text in "Edit -> Undo %1"/"Redo %1" and "Undo > History" dockwidget. "Undo History" is only implemented in Krita. > > But since this feature will only be available in Qt 4.8, and Calligra > will probably depend on it in a year, may be it's worth using a > replacement library to take advantage of the same feature without > waiting for new release of Qt? > > How to use Qt 4.8's features without Qt 4.8: instead of QUndo* classes > (it's called Qt's Undo Framework, > http://doc.trolltech.com/4.7/qundo.html), the whole Calligra can use > my library libkundo2 (https://github.com/aspotashev/libkundo2) which > is a fork of Qt's Undo Framework. > In order to port Calligra to libkundo2, you should run the script > "forward-port.sh" from libkundo2 repository inside the calligra > sources' root directory. There is also a script for backward porting > -- "backward-port.sh". Running "forward-port" and then "backward-port" > will still give you a diff, because the format of #include-s is not > uniform throughout Calligra. See that diff in the attached file > "calligra-includes.diff". > Besides running the script, you should also link libkundo2's shared > library to those Calligra's libraries and applications that previously > used Qt's Undo Framework. You can find the patch doing this in the > attached file "0001-link-kundo2.patch". > > > Why we should use libkundo2 in the whole Calligra, not just in Krita: > Krita uses the class KoDocument that operates with QUndoStack. If we > switch Krita to libkundo2, we will have to also switch Calligra's core > libraries to it, and then the whole Calligra. > > But before starting using libkundo2, we firstly need to add > dependencies on it to CMakeLists.txt files and probably move > libkundo2's source code to git.kde.org. > > > P.S. The second patch that has been merged to Qt 4.8 is > https://qt.gitorious.org/qt/qt/merge_requests/1212, libkundo2 also > fixes that bug. > P.P.S. I'm doing all this, because Russian translators had a few > discussions on how text of undoable commands should be translated to > fit both the "Edit -> Undo %1" commands and the "Undo History" panel > in Krita, Step and probably some other applications. There are some > workarounds possible to do in translations (for example, using a > colon, like "Undo: %1", to indicate that the text of the menu item is > expected not to be a complete word collocation), but they are not > perfect. I don't think our core libraries should depend on an unreleased private library. So if we want this I only see two possible routes: 1. get libkundo2 released and wait until all distributions have picked it up and released with it. Meaning that qt 4.8 might be available at the same time. 2. add the library inside the Calligra repository. Casper Boemann ___ calligra-devel mailing list calligra-devel@kde.org https://mail.kde.org/mailman/listinfo/calligra-devel
Re: Usage of libkundo2 in Calligra (Qt's maximal dependency)
2011/5/13 C. Boemann : > 1. get libkundo2 released and wait until all distributions have picked it up > and released with it. Meaning that qt 4.8 might be available at the same time. I didn't think about this somehow... > 2. add the library inside the Calligra repository. So, moving to Calligra repository seems to be better. It has 2 more advantages: 1. the library will be immediately removed when it becomes unnecessary, 2. moving to Calligra repository is easier than creating a new repository. Other applications like Step and Kig will wait for Qt 4.8, because nobody uses them. ;) -- Alexander Potashev ___ calligra-devel mailing list calligra-devel@kde.org https://mail.kde.org/mailman/listinfo/calligra-devel