Favicon download button.
This commit is contained in:
@@ -18,8 +18,13 @@
|
||||
#ifndef KEEPASSX_EDITWIDGETICONS_H
|
||||
#define KEEPASSX_EDITWIDGETICONS_H
|
||||
|
||||
#include <QtCore/QSet>
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
|
||||
#include <QtNetwork/QNetworkAccessManager>
|
||||
#include <QtNetwork/QNetworkReply>
|
||||
|
||||
#include "core/Global.h"
|
||||
#include "core/Uuid.h"
|
||||
|
||||
@@ -48,9 +53,15 @@ public:
|
||||
~EditWidgetIcons();
|
||||
|
||||
IconStruct save();
|
||||
void load(Uuid currentUuid, Database* database, IconStruct iconStruct);
|
||||
void load(Uuid currentUuid, Database* database, IconStruct iconStruct, const QString &url = QString());
|
||||
|
||||
public Q_SLOTS:
|
||||
void setUrl(const QString &url);
|
||||
|
||||
private Q_SLOTS:
|
||||
void downloadFavicon();
|
||||
void abortFaviconDownload();
|
||||
void onRequestFinished(QNetworkReply *reply);
|
||||
void addCustomIcon();
|
||||
void removeCustomIcon();
|
||||
void updateWidgetsDefaultIcons(bool checked);
|
||||
@@ -62,8 +73,11 @@ private:
|
||||
const QScopedPointer<Ui::EditWidgetIcons> m_ui;
|
||||
Database* m_database;
|
||||
Uuid m_currentUuid;
|
||||
QString m_url;
|
||||
DefaultIconModel* const m_defaultIconModel;
|
||||
CustomIconModel* const m_customIconModel;
|
||||
QNetworkAccessManager* const m_networkAccessMngr;
|
||||
QSet<QNetworkReply *> m_networkOperations;
|
||||
|
||||
Q_DISABLE_COPY(EditWidgetIcons)
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user