[Aptitude-devel] 002-qt-stubs review

Piotr Galiszewski piotr at galiszewski.pl
Mon Jul 12 23:45:22 UTC 2010


2010/7/13 Daniel Burrows <dburrows at google.com>:
> On Mon, Jul 12, 2010 at 4:22 PM, Piotr Galiszewski <piotr at galiszewski.pl> wrote:
>> I have only one more question. Currenty tabs_manager sends also Qt
>> signals. The signal is used to determine which buttons should be
>> active on status_widget. For example, when changes preview tab will be
>> active, show changes button should be disabled. It will increase
>> usability for the users. The same situation is with resolver or
>> perform changes tab
>
>  I think you forgot to write the question :)
>

Uhm. Yes. It is late here in my timezone ;)

In Qt to receive signal it is needed to use connect functions. connect
requires a pointer to a sender and a receiver of this particular
signal. tabs_manager do not know about classes which want to connect
to his signal. So receiver needs a pointer to tabs_manager_impl.
There are many solution of this problem, but I am not sure which will
be the best e.g.

1) create static method in tabs_manager returning pointer
2) use watchers pattern or aware object
3) I do not know if sigc++ supports static signals. In documentation
is information about slots
4) forget about signals in manager and provide pointer to tab_widget object

>  Daniel
>

-- 
Regards
Piotr Galiszewski



More information about the Aptitude-devel mailing list