Skip to content
  • Friedrich W. H. Kossebau's avatar
    Fixes: ensure same order of units in whole Calligra UI, have ruler and page... · 57f7c3e1
    Friedrich W. H. Kossebau authored
    Fixes: ensure same order of units in whole Calligra UI, have ruler and page layout dialog update to change of document's unit type
    
    also tune KoUnit API a little:
    * 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:: ListOption  <- more general, some might want to add other flags like HideImperial
    
    And adds unit tests for the touched KoUnit API
    
    Thanks to boemann and Cyrille for making it compile with Qt 4.7 as well
    
    REVIEW: 104626
    57f7c3e1