Hi all!
Another weekend has gone by, and unfortunately not much progress so far.
Unfortunately, i found out the QThread documentation is very misleading, so i am in the process of rewriting all the thread related stuff... Which is taking a bit of time!
Update: i got another couple of not-so-nice news on Qt... The first is that you cannot open a modal dialog box from a paintEvent. Actually, it make sense, because opening a dialog box will cause screen redraw causing an infinite loop with the paintEvent call... But its quite annoying because i was counting on starting a modal dialog and a background thread to "cache" map chunks on the fly.
The second is related to the WaitDialog, under no circumstances i am able to have it running on the simulator. I am now trying to deploy on the phone and see what happens.
I am thinking a doing this:
- Get rid of MapCacheManager and threads!
- a map will select the list of chunks to paint...
- any chunk loaded, will be painted immediately
- any chunk NON loaded will add the chunk to a list and a "not loaded" image drawn on screen
-After the paint is done (maybe a one-time trigger event? queue-scheduled during the paintEvent?) the new chunk(s) gets loaded
- upon chunks loaded, another update() is somehow scheduled.
Precaching can work like it is now, but why i cannot get that dialog to show?
Nessun commento:
Posta un commento