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
setButtons(KDialog::Ok | KDialog::Cancel);
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());
onAvatarChanged(account->avatar());
......@@ -63,7 +63,7 @@ void AccountIdentityDialog::onNicknameChanged(const QString &nickname)
ui->accountNickname->setText(nickname);
}
void AccountIdentityDialog::onAvatarChanged(const Tp::Avatar &avatar)
void AccountIdentityDialog::onAvatarChanged(const TpDBus::Avatar &avatar)
{
ui->accountAvatar->setAvatar(avatar);
}
......
......@@ -49,7 +49,7 @@ public Q_SLOTS:
private Q_SLOTS:
void onNicknameChanged(const QString &nickname);
void onAvatarChanged(const Tp::Avatar &avatar);
void onAvatarChanged(const TpDBus::Avatar &avatar);
private:
Tp::AccountPtr m_account;
......
/*
* Button representing user's Avatar
* Button representing user's TpDBus::Avatar
*
* Copyright (C) 2011 Martin Klapetek <martin.klapetek@gmail.com>
*
......@@ -62,7 +62,7 @@ AvatarButton::~AvatarButton()
}
void AvatarButton::setAvatar(const Tp::Avatar &avatar)
void AvatarButton::setAvatar(const TpDBus::Avatar &avatar)
{
m_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;
}
......@@ -148,7 +148,7 @@ void AvatarButton::onLoadAvatarFromFile()
return;
}
Tp::Avatar avatar;
TpDBus::Avatar avatar;
avatar.MIMEType = QLatin1String("image/png");
QDataStream stream(&avatar.avatarData, QIODevice::WriteOnly);
if (!finalPixmap.save(stream.device(), "PNG")) {
......@@ -197,6 +197,6 @@ QPixmap AvatarButton::cropPixmap(const QPixmap &pixmap, int maxWidth, int maxHei
void AvatarButton::onClearAvatar()
{
setAvatar(Tp::Avatar());
setAvatar(TpDBus::Avatar());
Q_EMIT avatarChanged();
}
/*
* Button representing user's Avatar
* Button representing user's TpDBus::Avatar
*
* Copyright (C) 2011 Martin Klapetek <martin.klapetek@gmail.com>
*
......@@ -39,8 +39,8 @@ public:
void setAccount(const Tp::AccountPtr &account);
void setAvatar(const Tp::Avatar &avatar);
Tp::Avatar avatar() const;
void setAvatar(const TpDBus::Avatar &avatar);
TpDBus::Avatar avatar() const;
Q_SIGNALS:
void avatarChanged();
......@@ -53,7 +53,7 @@ private:
QPixmap cropPixmap(const QPixmap &pixmap, int maxWidth, int maxHeight,
int minWidth, int minHeight) const;
Tp::Avatar m_avatar;
TpDBus::Avatar m_avatar;
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