View Single Post
Old 10-29-2010, 06:06 AM   #47
Dzha
Member
Dzha began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Aug 2010
Device: kindle dxg
I was thinking about a solution for a while now. Ideas so far:

Solution 1: Patch QScreen (easy?)
  • introduce virtual void QScreen::setFlashing(bool)
  • empty default implementation
  • overwrite setFlashing in KindleScreen
  • set the flashing update once when the set to true and reset to false after the update
  • get the static pointer QScreen::instance();
  • use screen->setFlashing(true) before calling the update to do one flashing update

Solution 2: Intermediate class (better?)
  • inherit QFlashingScreen from QLinuxFBScreen
  • Introduce setFlashing in QFlashingScreen
  • reinterpret_cast or dynamic_cast the pointer of QScreen to QFlashingScreen
  • call setFlashing()
  • enjoy flashing udpate

I think that I can possibly use QFlashingScreen in future for some other purposes as well (like hardware text cursor for example). So No2 looks good so far.



Uploaded with ImageShack.us

Edit:
Victory is sweet!
Implemented in 10 minutes, works like a charm .

Last edited by Dzha; 10-30-2010 at 12:41 PM.
Dzha is offline   Reply With Quote