Review Request: tune KoUnit API (and have pagelayout dialog and Words' horizontal ruler context menu update to changes of the document's unit type)

C. Boemann cbr at boemann.dk
Sat Apr 21 11:20:37 BST 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/104626/#review12749
-----------------------------------------------------------

Ship it!


Me and Cyrille have pushed a build fix each

with that it's read - great work !

btw we even got a bug for this behaviour in the mean time

- C. Boemann


On April 16, 2012, 9:27 p.m., Friedrich W. H. Kossebau wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/104626/
> -----------------------------------------------------------
> 
> (Updated April 16, 2012, 9:27 p.m.)
> 
> 
> Review request for Calligra and C. Boemann.
> 
> 
> Description
> -------
> 
> Sigh... so the proposal from https://git.reviewboard.kde.org/r/104607/ from boemann
>     "I'd say fix the code in KoUnit so it reports the unit in the order you like, and use KoUnit everywhere to define the order"
> turned into quite some hacking and in the end I found myself redoing the KoUnit API partially (because the old confused me too often).
> 
> So let's have some feedback on the current state, to see what is welcome and what is not, and what else could/should be done :)
> 
> Changed:
> * rename KoUnit::unit(...) to KoUnit::fromSymbol(...)   <- more Qt'ish
> * turn static KoUnit::unitName(KoUnit) into member method KoUnit::symbol()   <- as typical use-case is on existing KoUnit instance, also shorter and more OOed
> * rename KoUnit::Unit to KoUnit::Type    <- "type" feels a better term here
> * added KoUnit::type() and KoUnit::setFactor(...)    <- useful in a few places
> * remove KoUnit::unitDescription(...) from API    <- not used outside
> * rename KoUnit::PixelVisibility to KoUnit::ListFilter   <- more general, some might want to add other flags like HideNoneMetrics
> 
> Fixes:
> * ensure the same order of unit types in all unit type selectors in the UI
> * update the page layout dialog on a change of the document's unit property
> * update the changeUnitActions on a change of the document's unit property
> 
> 
> Diffs
> -----
> 
>   filters/karbon/image/ImageExportOptionsWidget.cpp 2b5d541 
>   karbon/ui/KarbonPart.cpp 5e6a958 
>   krita/plugins/extensions/imagesize/dlg_imagesize.cc 96490c9 
>   krita/plugins/tools/defaulttools/kis_tool_measure.cc 5e9afa3 
>   krita/ui/widgets/kis_custom_image_widget.cc 5b00fb9 
>   libs/kopageapp/KoPADocument.cpp 240171a 
>   libs/kopageapp/dialogs/KoPAConfigureDialog.cpp 8912db3 
>   libs/koproperty/editors/spinbox.cpp d923c6e 
>   libs/koreport/common/KoReportItemBase.cpp 7f6a575 
>   libs/koreport/common/krsectiondata.cpp 38c14c8 
>   libs/koreport/wrtembed/KoReportDesigner.cpp 68a61f9 
>   libs/koreport/wrtembed/KoReportDesignerItemBase.cpp f3ff8dc 
>   libs/koreport/wrtembed/KoReportDesignerItemLine.cpp ce54e7c 
>   libs/koreport/wrtembed/reportscene.cpp dd32f7a 
>   libs/koreport/wrtembed/reportsection.cpp 52447cf 
>   libs/main/KoDocument.h 66bf3ac 
>   libs/main/KoDocument.cpp 831ed9d 
>   libs/main/KoRuler.cpp 4272b9b 
>   libs/main/KoView.cpp 81dafd3 
>   libs/main/KoView_p.h 9b3dff2 
>   libs/main/config/KoConfigGridPage.h 01373e9 
>   libs/main/config/KoConfigGridPage.cpp a3e1d6f 
>   libs/main/config/KoConfigMiscPage.h 2c36996 
>   libs/main/config/KoConfigMiscPage.cpp 7f54ef1 
>   libs/odf/KoUnit.h 1f035fe 
>   libs/odf/KoUnit.cpp 43cc908 
>   libs/widgets/KoPageLayoutWidget.cpp c9f0fc0 
>   libs/widgets/KoUnitDoubleSpinBox.cpp f9f00da 
>   plugins/paragraphtool/Ruler.cpp 3053696 
>   plugins/textshape/dialogs/ParagraphBulletsNumbers.cpp 87c1b85 
>   sheets/DocBase.cpp a9812c6 
>   sheets/dialogs/LayoutDialog.cpp d1090f4 
>   sheets/part/Doc.cpp 4c40b87 
>   sheets/part/HeaderItems.cpp 5fc3cfa 
>   sheets/part/HeaderWidgets.cpp 3fac4cc 
>   sheets/part/dialogs/PreferenceDialog.cpp fae954a 
>   words/part/KWApplicationConfig.cpp b5fd980 
>   words/part/KWOdfLoader.cpp 238c7fe 
>   words/part/dialogs/KWPageSettingsDialog.h 0a028a9 
>   words/part/dialogs/KWPageSettingsDialog.cpp f577353 
> 
> Diff: http://git.reviewboard.kde.org/r/104626/diff/
> 
> 
> Testing
> -------
> 
> Played with (hopefully) all touched widgets, seems to work.
> 
> 
> Thanks,
> 
> Friedrich W. H. Kossebau
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20120421/e5dee91f/attachment.htm>


More information about the calligra-devel mailing list