Commit 9c9664f0 authored by Leon Handreke's avatar Leon Handreke

Rename generated struct moved to TpDBus namespace

parent e0cae54a
...@@ -43,7 +43,7 @@ AccountIdentityDialog::AccountIdentityDialog(const Tp::AccountPtr &account, QWid ...@@ -43,7 +43,7 @@ AccountIdentityDialog::AccountIdentityDialog(const Tp::AccountPtr &account, QWid
setButtons(KDialog::Ok | KDialog::Cancel); setButtons(KDialog::Ok | KDialog::Cancel);
connect(m_account.data(), SIGNAL(nicknameChanged(QString)), SLOT(onNicknameChanged(QString))); connect(m_account.data(), SIGNAL(nicknameChanged(QString)), SLOT(onNicknameChanged(QString)));
connect(m_account.data(), SIGNAL(avatarChanged(Tp::Avatar)), SLOT(onAvatarChanged(Tp::Avatar))); connect(m_account.data(), SIGNAL(avatarChanged(TpDBus::Avatar)), SLOT(onAvatarChanged(TpDBus::Avatar)));
onNicknameChanged(account->nickname()); onNicknameChanged(account->nickname());
onAvatarChanged(account->avatar()); onAvatarChanged(account->avatar());
...@@ -63,7 +63,7 @@ void AccountIdentityDialog::onNicknameChanged(const QString &nickname) ...@@ -63,7 +63,7 @@ void AccountIdentityDialog::onNicknameChanged(const QString &nickname)
ui->accountNickname->setText(nickname); ui->accountNickname->setText(nickname);
} }
void AccountIdentityDialog::onAvatarChanged(const Tp::Avatar &avatar) void AccountIdentityDialog::onAvatarChanged(const TpDBus::Avatar &avatar)
{ {
ui->accountAvatar->setAvatar(avatar); ui->accountAvatar->setAvatar(avatar);
} }
......
...@@ -49,7 +49,7 @@ public Q_SLOTS: ...@@ -49,7 +49,7 @@ public Q_SLOTS:
private Q_SLOTS: private Q_SLOTS:
void onNicknameChanged(const QString &nickname); void onNicknameChanged(const QString &nickname);
void onAvatarChanged(const Tp::Avatar &avatar); void onAvatarChanged(const TpDBus::Avatar &avatar);
private: private:
Tp::AccountPtr m_account; Tp::AccountPtr m_account;
......
/* /*
* Button representing user's Avatar * Button representing user's TpDBus::Avatar
* *
* Copyright (C) 2011 Martin Klapetek <martin.klapetek@gmail.com> * Copyright (C) 2011 Martin Klapetek <martin.klapetek@gmail.com>
* *
...@@ -62,7 +62,7 @@ AvatarButton::~AvatarButton() ...@@ -62,7 +62,7 @@ AvatarButton::~AvatarButton()
} }
void AvatarButton::setAvatar(const Tp::Avatar &avatar) void AvatarButton::setAvatar(const TpDBus::Avatar &avatar)
{ {
m_avatar = avatar; m_avatar = avatar;
...@@ -77,7 +77,7 @@ void AvatarButton::setAvatar(const Tp::Avatar &avatar) ...@@ -77,7 +77,7 @@ void AvatarButton::setAvatar(const Tp::Avatar &avatar)
} }
} }
Tp::Avatar AvatarButton::avatar() const TpDBus::Avatar AvatarButton::avatar() const
{ {
return m_avatar; return m_avatar;
} }
...@@ -148,7 +148,7 @@ void AvatarButton::onLoadAvatarFromFile() ...@@ -148,7 +148,7 @@ void AvatarButton::onLoadAvatarFromFile()
return; return;
} }
Tp::Avatar avatar; TpDBus::Avatar avatar;
avatar.MIMEType = QLatin1String("image/png"); avatar.MIMEType = QLatin1String("image/png");
QDataStream stream(&avatar.avatarData, QIODevice::WriteOnly); QDataStream stream(&avatar.avatarData, QIODevice::WriteOnly);
if (!finalPixmap.save(stream.device(), "PNG")) { if (!finalPixmap.save(stream.device(), "PNG")) {
...@@ -197,6 +197,6 @@ QPixmap AvatarButton::cropPixmap(const QPixmap &pixmap, int maxWidth, int maxHei ...@@ -197,6 +197,6 @@ QPixmap AvatarButton::cropPixmap(const QPixmap &pixmap, int maxWidth, int maxHei
void AvatarButton::onClearAvatar() void AvatarButton::onClearAvatar()
{ {
setAvatar(Tp::Avatar()); setAvatar(TpDBus::Avatar());
Q_EMIT avatarChanged(); Q_EMIT avatarChanged();
} }
/* /*
* Button representing user's Avatar * Button representing user's TpDBus::Avatar
* *
* Copyright (C) 2011 Martin Klapetek <martin.klapetek@gmail.com> * Copyright (C) 2011 Martin Klapetek <martin.klapetek@gmail.com>
* *
...@@ -39,8 +39,8 @@ public: ...@@ -39,8 +39,8 @@ public:
void setAccount(const Tp::AccountPtr &account); void setAccount(const Tp::AccountPtr &account);
void setAvatar(const Tp::Avatar &avatar); void setAvatar(const TpDBus::Avatar &avatar);
Tp::Avatar avatar() const; TpDBus::Avatar avatar() const;
Q_SIGNALS: Q_SIGNALS:
void avatarChanged(); void avatarChanged();
...@@ -53,7 +53,7 @@ private: ...@@ -53,7 +53,7 @@ private:
QPixmap cropPixmap(const QPixmap &pixmap, int maxWidth, int maxHeight, QPixmap cropPixmap(const QPixmap &pixmap, int maxWidth, int maxHeight,
int minWidth, int minHeight) const; int minWidth, int minHeight) const;
Tp::Avatar m_avatar; TpDBus::Avatar m_avatar;
Tp::AccountPtr m_account; Tp::AccountPtr m_account;
}; };
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment