[Kde-games-devel] please help me: how to hide some KScoreDialog config groups?

Parker Coates parker.coates at kdemail.net
Sat Sep 4 15:34:54 CEST 2010


On Sat, Sep 4, 2010 at 03:05, nihui wrote:
> hi,
> I am currently working on ksame mode support for klickety, but the KScoreDialog blocked my work.
>
> Currently I treat the ksame mode highscores as a highscore group, along side with the standard klickety groups.
> When I need to show the score dialog, all the config groups are shown( both ksame scores and klickety ones ).
> So, how to hide some config groups( I mean the Very Easy/Easy/Normal/... groups in ksame mode, while the KSame score group in klickety mode ).

As you've just discovered, KScoreDialog is a pretty crappy class.
We've been sticking additional funcitonality and fixes into it for
years, doing little more than "keeping it running". So in the same
vein, we could add some more API to handle this use case. Something
like setHiddenGroups(QStringList groups). It's not pretty, but would
probably work.

The hope has always been that someone would write a flexible but
elegant highscore system to replace it. There have been a few
attempts, but none has yet reached fruition. Stefan Majewskey is
currently working on one called KScore2. You might want to contact him
to get an update.

> I once tried to use multiple kconfig files(klicketyrc and ksamerc) to store scores saparately, but I couldn't figure work how to achieve that.

KScoreDialog uses KHighscore for reading/writing entries to/from disk
and KHighscore automatically uses the application rc file. I don't
really think there's currently much we can do about that. Hopefully in
the future, we can move highscores out of the RC file an into separate
files for ease of backup.

> sorry for grammer mistakes. I am not a native English speaker.  ;)

Your English is more than sufficient. Don't worry about that. :)

Parker


More information about the kde-games-devel mailing list