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

List:       kde-games-devel
Subject:    Re: [Kde-games-devel] The status bar and the Difficulty Level widget
From:       Parker Coates <parker.coates () gmail ! com>
Date:       2012-01-07 2:45:27
Message-ID: CAEn-ceZGz4p8a_vYDKrh4FYLrf2SSSZyBE9z+-O3B5HoGUigpA () mail ! gmail ! com
[Download RAW message or body]

On Fri, Jan 6, 2012 at 19:01, Ian Wadham wrote:
> Libkdegames' standard Difficulty Level widget always appears in the
> status bar, so if you use it you must have a status bar.
>
> Would anyone have any objections if I modified libkdegames to provide
> an option to return a Difficulty Level widget that can be placed anywhere,
> leaving the status bar as the default position?

I'm not sure returning a widget is the cleanest API. I'm guessing
you're talking about some sort of "KComboBox *
KGameDifficulty::comboBox()" method, but that raises a couple issues.
Who owns the widget returned? If the method is called second time, is
a pointer to the same widget returned or a pointer to a new widget?

Personally, I'd recommend to instead create a new
KGameDifficultyComboBox class the inherits KComboBox and automatically
hooks itself up KGameDifficulty. It would probably just be a matter of
make the existing widget public.

Parker
_______________________________________________
kde-games-devel mailing list
kde-games-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-games-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

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