diff options
author | Klaas Freitag <freitag@opensuse.org> | 2017-01-22 15:58:36 +0300 |
---|---|---|
committer | Klaas Freitag <freitag@opensuse.org> | 2017-01-22 15:58:36 +0300 |
commit | d466a059151fec1ed883ea124e6bc7dcf9a2457d (patch) | |
tree | fb658f5bd24007d446f79749306a1c830dd02a1b /src/gui/settingsdialog.h | |
parent | e05d6bfcdc39b551d0a29c763afcabcadb5d05a6 (diff) |
SettingsDialog: Display the user avatar as action icon if available.
The avatar image is fetched from the server async, thus connect a signal
from the account if the avatar changes.
Server feature https://github.com/owncloud/core/pull/26872 is needed.
Diffstat (limited to 'src/gui/settingsdialog.h')
-rw-r--r-- | src/gui/settingsdialog.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/settingsdialog.h b/src/gui/settingsdialog.h index dd4ffd448..39f2595a1 100644 --- a/src/gui/settingsdialog.h +++ b/src/gui/settingsdialog.h @@ -58,6 +58,7 @@ public slots: void showActivityPage(); void slotSwitchPage(QAction *action); void slotRefreshActivity(AccountState *accountState ); + void slotAccountAvatarChanged(); protected: void reject() Q_DECL_OVERRIDE; @@ -73,12 +74,18 @@ private: QIcon createColorAwareIcon(const QString &name); QAction *createColorAwareAction(const QString &iconName, const QString &fileName); + QAction *createActionWithIcon(const QIcon& icon, const QString& text, const QString& iconPath = QString()); + Ui::SettingsDialog * const _ui; QActionGroup* _actionGroup; // Maps the actions from the action group to the corresponding widgets QHash<QAction*, QWidget*> _actionGroupWidgets; + // Maps the action in the dialog to their according account. Needed in + // case the account avatar changes + QHash<Account*, QAction*> _actionForAccount; + QToolBar* _toolBar; ActivitySettings *_activitySettings; |