[Kde-games-devel] A new highscore manager - KScoreManager
Matt Williams
matt at milliams.com
Tue Apr 29 17:18:50 CEST 2008
On Tuesday 29 April 2008 16:03:40 Pino Toscano wrote:
> Hi,
>
> some API notes :)
>
> > #include <QPair>
>
> No QPair used, to be removed.
Cheers, will do.
> > enum OptionFlag
> > {
> > DoNotAskName, ///<Should the player be asked for their name
> > upon getting a highscore
> > LessIsMore ///<should the highscores be awarded
> > such that a lower score is better
> > };
>
> LessIsMore seems quite confusing (at least IMHO), maybe LessIsBetter?
Yeah, that probably makes more sense. Maybe even LowerScoreIsBetter.
LessIsMore is an artifact from KScoreDialog.
> > KDialog createScoreDialog(const ScoreDisplay& scoreDisplay =
> > ScoreDisplay()) const;
>
> KDialog * as return value, I'd say.
>
> > QGraphicsWidget createScoreGraphicsWidget(const ScoreDisplay&
> > scoreDisplay = ScoreDisplay()) const;
>
> ... ditto.
Dmitry already mentioned this to me so yes, I'm going to change it.
> > void setOptions(const Option& options = Option());
>
> This would allow something like:
> KScoreManager::self()->setOptions();
> that IMHO is a bit illogical (a setter that sets nothing, apparently).
> Better force the parameter, so
> ...->setOptions(KScoreManager::Options())
> is way clear that it will set no options.
>
> Ah, and better put the destructor as well, even if empty.
Ah, yes. That's much nicer. I was having trouble finding a good way to handle
that case.
Thanks a lot for having a look.
Regards,
Matt Williams
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kde-games-devel/attachments/20080429/521a3825/attachment-0001.pgp
More information about the kde-games-devel
mailing list