Strokes framework naming problem
Silvio Heinrich
plassy at web.de
Mon Jul 11 06:22:52 CEST 2011
On 07/10/2011 04:59 PM, Dmitry Kazakov wrote:
> Hi!
>
> I need some help with discussing the design stuff again. I think the
> current version of names inside the stroke framework is not the best
> option for the future. I guess, I should rename the classes in some
> way before I start porting other tools, but I'm not sure how.
>
> Maybe, someone knows some books or articles about the class naming
> topic? Or there are any KDE-wide standards describing that? Many
> classes are going to appear there soon, so there should be some policy
> how to name them now to avoid vast renames in the future.
> ...
I personally think that all the calss naming in krita is a big mess and
that is because we are not using namespaces.
I mean, seriously... that is what namespaces are for. To group classes
logically and prevent name clashes.
Something like:
namespace Kis {
// ui framework
namespace Ui {
namespace Widgets { ... }
namespace Models { ... }
}
// image framework
namespace Image {
class Image;
...
}
// stroke framework
namespace Stroke {
class Stroke;
namespace Processing {
class InitStroke;
class CancelStroke;
class FinishStroke;
...
}
}
}
I think you get what I mean :).
But I think Qt's moc has a huge problem with namespaces (what is really
pitiful in my opinion).
But I still would like to use namespaces where we don't need to use the moc.
More information about the kimageshop
mailing list