Add setters for board url, cache, username, and password to DanbooruService

Remove also a useless constructor
This commit is contained in:
Luca Beltrame 2015-02-08 23:52:34 +01:00
parent d20cc5d3f5
commit d94084bc25
2 changed files with 56 additions and 16 deletions

View file

@ -104,8 +104,6 @@ private:
public:
DanbooruService(QObject *parent = 0);
/**
* @brief Construct a default instance of the service.
*
@ -117,7 +115,7 @@ public:
* @param parent The parent QObject
*
**/
DanbooruService(QUrl &boardUrl, QString username = QString(),
DanbooruService(QUrl boardUrl=QUrl(), QString username = QString(),
QString password = QString(), KImageCache *cache = 0,
QObject *parent = 0);
@ -212,6 +210,35 @@ public:
**/
void setBlackList(QStringList blacklist);
/**
* @brief Set the board URL to connect to.
*
* @param url The URL to connect to.
* @return void
*/
void setBoardUrl(const QUrl& url);
/**
* @brief Set an image cache to use.
*
* @param cache A pointer to an intsnaec of KImageCache.
* @return void
*/
void setImageCache(KImageCache *cache);
/**
* @brief Set username for login.
*
* @param username The username to use.
* @return void
*/
void setUserName(const QString& username);
void setPassword(const QString& password);
private Q_SLOTS:
void processPostList(KJob *job);
void downloadAllTags(KJob *job);