Allow getting pool pages as well as posts

Currently this clashes, meaning that there will be problems if you get
pools and then posts...
This commit is contained in:
Luca Beltrame 2015-03-01 22:34:14 +01:00
parent 786c8d1f44
commit feded2bdf3
2 changed files with 26 additions and 13 deletions

View file

@ -317,7 +317,8 @@ const QStringList DanbooruService::allowedRatings() const
}
int DanbooruService::currentPage() const {
int DanbooruService::currentPage() const
{
return m_currentPage;
}
@ -340,6 +341,13 @@ void DanbooruService::nextPostPage()
getPostList();
}
void DanbooruService::nextPoolPage()
{
m_currentPage++;
getPoolList();
}
QStringList DanbooruService::postTags() const
{
return m_tags;

View file

@ -194,19 +194,24 @@ public:
**/
int maxPosts() const;
/**
* @brief Fetches the next page of posts.
*
* @return void
*/
**/
Q_INVOKABLE void nextPostPage();
/**
* @brief Fetches the next page of pools.
**/
Q_INVOKABLE void nextPoolPage();
/**
* @return A QStringList containing the currently-selected tags
*/
**/
QStringList postTags() const;
/**
* @brief Resets the service to the default state, clearing the page counters.
**/
void reset();
/**
@ -215,8 +220,8 @@ public:
* Posts with blacklisted tags are not downloaded.
*
* @param blacklist A QSet<QString> including unwanted tags.
* @return void
*/
*
**/
void setBlacklist(const QStringList& blacklist);
/**
@ -257,8 +262,8 @@ public:
* @brief Set username for login.
*
* @param username The username to use.
* @return void
*/
*
**/
void setUserName(const QString& username);
/**
@ -268,9 +273,9 @@ public:
* with a specific salt (which is board-dependent; check their
* API access rules).
*
* @param username The salted password to use.
* @return void
*/
* @param password The salted password to use.
*
**/
void setPassword(const QString& password);
void setMaxPosts(int number);