Trolltech Home | Qtopia-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qtopia-interest Archive, February 2008
Feedback on implementing a custom QAbstractServerInterface


Message 1 in thread

Hey,

for the neo the launcher/desktop is implemented in either Gtk+ or EFL. With 
our launcher the qpe mainly becomes a provider for the builtins, the context 
bar and provider of the phone dialogs.

I have considered three approaches and all of them are not too satisfying. 
Well, I'm seeking input on how you would have expected such a thing gets 
implemented.

1.) Extend from QAbstractServerInterface and add everything needed to be a 
replacement for the PhoneLauncher:
	+QTOPIA_REPLACE_WIDGET and QTOPIA_REPLACE_WIDGET_OVERRIDE work
	  really well and I can make sure my implementation gets used
	- to get the callhistory builtin working I need to set a HomeScreen at the 
	  HomeScreenControl, normally I would not have a homescreen at all as this
	  is provided by something outside of qpe
	- I will have to copy and paste from the PhoneLauncher to get the phone 
	  related behaviour. But there are dependencies like the above that make me
	  wonder if I can easily provide a replacement for the PhoneLauncher that has
	  the same behaviour (e.g. for incoming calls) but a different visual 
	  representation?

2.) I only want to change the visual appearance, not the behaviour so let us 
try subclassing:
	- I can not change the visual representation without making methods virtual
	  and changing the c'tor.

3.) #ifdef in the phonelauncher.cpp code
	+ I can add #ifdefs to the code to do what I want, I will get the same 
	   behaviour and a different visual representation.
	- I do not like #ifdef's
	- I would like to get our launcher into the upstream source and I think with
	  #ifdef's that won't happen.

So from these three approaches the third one is the most easy one to implement 
but is a nightmare to maintain and will be unlikely to end upstream. What 
would be preferable is to split the behaviour of PhoneLauncher into a 
intermediate class and allow subclassing. This way I can change the visual 
representation according to our needs but get the phone behaviour for free...

comments? is that on the list of things to be done?

z.

--
 [ signature omitted ]