-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Offline mode #9
Comments
You are right, and I had this in mind for a long time actually, the only problem is that right now once you press reload the already read articles are gone. But I guess this would still be ok for a first offline version to just save what we have right now into a datastructure and on the harddisk and read it back into the memory while starting. |
What one would need to do is make the Post class serializable and then save the whole list in a file or something every time something changes, eithen when the list is updated or if the read state changes, etc. The easiest way would be to reuse the Settings. |
It that works like in Java, a list of serializable objects can be I found this from a quick search: http://www.devarticles.com/c/a/Cplusplus/Serialize-Your-Class-into-Streams-in-C/1/ I don't know if pulling in Boost is necessary, but I also don't know On 06/29/2016 10:58 PM, Jeena Paradies wrote:
|
No we don't really need boost, we kan do that with Qt, I just need to find the time to research it. It is a list of custom objects which themselves are build of strings, boleans, integers and dates. |
It looks like we mostly need to overload the << and >> operators http://stackoverflow.com/a/2571212/63779 |
Cool, looks like it shouldn't take all that long then :) My last exam is on Wednesday. I will need some rest after that, but I will gladly look into this afterwards :) I would need a quick primer on the life cycle of a QML app and what events I would need to look into, but I could probably figure the rest out :) |
I think that is a nice beginners feature to fix because it isn't too big and complex. Actually this app as as small scale because it is/was my own intro into QML apps with C++ qmlplugins and so on. I'll be happy to help and explain stuff too. |
I will probably start giving this a shot over the weekend. Where in your code should I start looking? (apart from overloading |
It would be great to have an offline mode. That's the biggest advantage of a desktop app IMHO, though it also looks very slick and reacts very fast.
I only have a basic understanding of QT and not that much more of C++, but it looks like you download the list of headings on program start and the selected article on-demand, is that correct?
The most straightforward thing to do would be to keep a (hash-indexed) cache of the headings whenever they get downloaded. The cache could be entirely rebuilt whenever a network connection is available.
I am willing to help with this after my exams are done in the next few weeks, but I would need some guidance (and your opinion and design decisions in advance, since this would not be a minor change).
The text was updated successfully, but these errors were encountered: