Combines updating of folders, feeds and articles.
More...
#include <Fuoten/Helpers/Synchronizer>
|
| void | start () |
| | Starts the synchronizing process.
|
|
| void | finished () |
| | Finishes the synchronization and cleans up.
|
| void | notifyAboutRead () |
| | Notifies the News App about read articles from the local queue.
|
| void | notifyAboutStarred () |
| | Notifies the News App about starred articles from the local queue.
|
| void | notifyAboutUnread () |
| | Notifies the News App about unread articles from the local queue.
|
| void | notifyAboutUnstarred () |
| | Notifies the News app about unstarred articles from the local queue.
|
| void | requestFeeds () |
| | Requests feed information from the News App.
|
| void | requestFolders () |
| | Requests folder information from the News App.
|
| void | requestStarred () |
| | Requests all starred articles from the News App.
|
| void | requestUnread () |
| | Requests all unread articles from the News App.
|
| void | requestUpdated () |
| | Requests articles from the News App that are new or have been updated since last sync.
|
| void | setError (Fuoten::Error *nError) |
| | Sets a new Error object to the error property.
|
Combines updating of folders, feeds and articles.
- Mandatory properties
- Synchronizer::configuration
◆ configuration
◆ currentAction
| QString Fuoten::Synchronizer::currentAction |
|
read |
Returns the current performed action.
- Access functions:
-
- Notifier signal:
-
- See also
- setCurrentAction()
◆ error
Pointer to an Error object, if an error occurred. Otherwise a nullptr.
- Access functions:
-
- Notifier signal:
-
◆ inOperation
| bool Fuoten::Synchronizer::inOperation |
|
read |
Returns true while the Synchronizer is in operational mode.
- Access functions:
-
- Notifier signal:
-
◆ notificator
Pointer to an object derived from AbstractNotificator.
Set a notificator to notify users about errors and events. This is not mandatory. You have to derive your own notificator that uses the notification system of the target platform.
If no notificator has been set via setNotificator(), the one set via Component::setDefaultConfigurator() will be used - if any has been set. If you do not set a notificator either per instance or global, this property will hold a nullptr. If a notificator is set to an instance of this class via setNotificator(), this notificator will take precedence over the global default notificator object (if any set).
- Access functions:
-
- Notifier signal:
-
◆ progress
| qreal Fuoten::Synchronizer::progress |
|
read |
Pregress value between 0.0 and 1.0.
- Access functions:
-
- Notifier signal:
-
- See also
- setProgress()
◆ storage
◆ Synchronizer()
| Synchronizer::Synchronizer |
( |
QObject * | parent = nullptr | ) |
|
|
explicit |
◆ ~Synchronizer()
| Synchronizer::~Synchronizer |
( |
| ) |
|
|
override |
◆ clearError()
| void Synchronizer::clearError |
( |
| ) |
|
Clears the current error and sets the error property to a nullptr.
◆ configuration()
◆ configurationChanged
◆ currentAction()
| QString Synchronizer::currentAction |
( |
| ) |
const |
◆ currentActionChanged
| void Fuoten::Synchronizer::currentActionChanged |
( |
const QString & | currentAction | ) |
|
|
signal |
◆ deferredSync()
| void Synchronizer::deferredSync |
( |
quint32 | miliseconds | ) |
|
|
virtual |
Invokes the synchronizing process after miliseconds.
The base implementation simply calls start() after the timeout in miliseconds.
◆ error()
| Error * Synchronizer::error |
( |
| ) |
const |
Returns a pointer to an Error object if any error occurred, otherwise a nullptr.
- See also
- error
◆ errorChanged
This signal is emitted if the pointer to an Error object changes.
Maybe a nullptr if the Error object was reset.
- See also
- error
◆ failed
This signal is emitted if the synchonization process failed for some reason.
- See also
- succeeded(), error
◆ finished
| void Synchronizer::finished |
( |
| ) |
|
|
protectedslot |
Finishes the synchronization and cleans up.
◆ inOperation()
| bool Synchronizer::inOperation |
( |
| ) |
const |
Returns true while the synchronization is active.
- See also
- inOperation
◆ inOperationChanged
| void Fuoten::Synchronizer::inOperationChanged |
( |
bool | inOperation | ) |
|
|
signal |
This signal is emitted if the oprational state changes.
- See also
- inOperation
◆ notificator()
◆ notificatorChanged
◆ notifyAboutRead
| void Synchronizer::notifyAboutRead |
( |
| ) |
|
|
protectedslot |
Notifies the News App about read articles from the local queue.
◆ notifyAboutStarred
| void Synchronizer::notifyAboutStarred |
( |
| ) |
|
|
protectedslot |
Notifies the News App about starred articles from the local queue.
◆ notifyAboutUnread
| void Synchronizer::notifyAboutUnread |
( |
| ) |
|
|
protectedslot |
Notifies the News App about unread articles from the local queue.
◆ notifyAboutUnstarred
| void Synchronizer::notifyAboutUnstarred |
( |
| ) |
|
|
protectedslot |
Notifies the News app about unstarred articles from the local queue.
◆ progress()
| qreal Synchronizer::progress |
( |
| ) |
const |
◆ progressChanged
| void Fuoten::Synchronizer::progressChanged |
( |
qreal | progress | ) |
|
|
signal |
◆ requestFeeds
| void Synchronizer::requestFeeds |
( |
| ) |
|
|
protectedslot |
Requests feed information from the News App.
◆ requestFolders
| void Synchronizer::requestFolders |
( |
| ) |
|
|
protectedslot |
Requests folder information from the News App.
◆ requestStarred
| void Synchronizer::requestStarred |
( |
| ) |
|
|
protectedslot |
Requests all starred articles from the News App.
◆ requestUnread
| void Synchronizer::requestUnread |
( |
| ) |
|
|
protectedslot |
Requests all unread articles from the News App.
◆ requestUpdated
| void Synchronizer::requestUpdated |
( |
| ) |
|
|
protectedslot |
Requests articles from the News App that are new or have been updated since last sync.
◆ setConfiguration()
◆ setCurrentAction()
| void Synchronizer::setCurrentAction |
( |
const QString & | nCurrentAction | ) |
|
|
protected |
◆ setError
Sets a new Error object to the error property.
- See also
- error
◆ setNotificator()
◆ setProgress()
| void Synchronizer::setProgress |
( |
qreal | nProgress | ) |
|
|
protected |
◆ setStorage()
◆ start
| void Synchronizer::start |
( |
| ) |
|
|
slot |
Starts the synchronizing process.
Prior to starting the synchronizing process, it checks inOperation(). If that returns true, nothing will happen. If inOperation() returns false, it will set it to true and will start the update process.
When you create a derived class, call start() in your implementation of sync().
◆ storage()
Returns the pointer to the currently set AbstractStorage object, if any, otherwise a nullptr.
◆ storageChanged
◆ succeeded
| void Fuoten::Synchronizer::succeeded |
( |
| ) |
|
|
signal |
This signal is emitted if the synchronization process was successful.
- See also
- failed()
◆ sync()
| void Synchronizer::sync |
( |
| ) |
|
|
virtual |
Invokes the synchronizing process.
The base implementation simply calls start().
The documentation for this class was generated from the following files:
- Fuoten/Helpers/synchronizer.h
- build/Fuoten/FuotenQt5_autogen/include/moc_synchronizer.cpp
- Fuoten/Helpers/synchronizer.cpp