View Single Post
Old 10-24-2010, 07:41 PM   #44
Dzha
Member
Dzha began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Aug 2010
Device: kindle dxg
Quote:
Originally Posted by darron View Post
@Dzha: Sounds good except I'm not sure about a new QLinuxFbScreen. You could just add the full refresh function to the screen from my package, and use the static QScreen::instance() function to get a pointer to it. In your case, it'd be safe to simply cast that instance pointer to the Kindle screen version from the package, and use that.

I think in testing I was doing this sort of thing for the mouse pointer... setting the refresh mode, drawing the mouse pointer, resetting the mode, etc. I didn't bother with a custom QWidget/QPainter... the paints were synchronous at that point.
Thanks a lot darron.

It looks like the best way is to use QScreen::instance(), cast the pointer to our driver and then call the new method. Also it should be possible to call the new function within the existing paintEvent().
The only problem now is that I need to link my app with the plugin. I should be able to figure it out. At list I found a "How to.." on Qt plugins and it recommends an abstract interface class use.
Also I have been thinking on how to speed up the process of drawing the gui elements. Menu looks ok, but for example the drawing of the preferences dialog is a drag. I am not sure that it is possible to accelerate that through hardware somehow, probably not. I will definitely try to simplify dialogs as much as possible, remove all decorations, etc.
Dzha is offline   Reply With Quote