[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: Better default step size for KoUnitSpinBox
From:       Thomas Zander <zander () kde ! org>
Date:       2008-03-13 19:55:21
Message-ID: 200803132055.21340.zander () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Thursday 13. March 2008 19:51:05 Florian Merz wrote:
> Am Donnerstag, 13. März 2008 schrieb Thomas Zander:
[]
> I'll have a look at that tomorrow, if I have the time.

Great!
> > I'm personally not convinced the placement of the static on KoUnit is the
> > best thing, there currently is no place where this is needed as well so
> > we would be able to add the functionality without any external API (just
> > some code in the KoUnitDoubleSpinBox.cpp).
>
> I know it's not perfect, but it's the best place I could think of. Although
> I have to admit, that I don't know the koffice code very well.
>
> > What about doing that and only when someone actually requires this
> > feature move the code to have a new public method on KoUnit?
>
> Well, I wrote it for my own tool and then decided to share with the
> KoUnitSpinBox. But the tool is not (yet?) in svn so I don't know if that
> counts :)

Hehe, yeah, that probably counts :)
Ok, its fine to place it where you have it now.

> > Let me know what you think!
>
> I used a static variable for defaultStep() because unitName(), does, too.
> But honstely, I don't understand why that one is static and then takes a
> KoUnit as its first argument.

Its a matter of taste, I guess.
To me it makes sense to have
 KoUnit::unitName(KoUnit::Millimeter);
instead of
 KoUnit mm(KoUnit::Millimeter);
 mm.unitName();
It makes sense to me because its more logical to ask the class for a name then 
to ask an instance which may confuse you to think that there is a 
corresponding setter to go with it.

> Also, is there a reason why KoUnit is placed in libs/odf? It took me some
> time to find it there. It's an integral part of the application, not just a
> part of the file format, right?

In KOffice the dependency graph is currently the folowing;

 kostore
 += koodf
    +=  main

with others like flake depending on those etc.
In other words; kostore is as far up the dependency graph as you can get and 
KoOdf is slightly less 'core'. 
So, I guess that your statement of "just part of the fileformat" is where our 
perception differs; the fileformat is a central library that the rest is 
build on top of.

Cheers!
-- 
Thomas Zander

["signature.asc" (application/pgp-signature)]

_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic