Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
Telepathy Accounts KCM
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Network
Telepathy Accounts KCM
Commits
9c9664f0
Commit
9c9664f0
authored
Apr 11, 2014
by
Leon Handreke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename generated struct moved to TpDBus namespace
parent
e0cae54a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
12 deletions
+12
-12
src/account-identity-dialog.cpp
src/account-identity-dialog.cpp
+2
-2
src/account-identity-dialog.h
src/account-identity-dialog.h
+1
-1
src/avatar-button.cpp
src/avatar-button.cpp
+5
-5
src/avatar-button.h
src/avatar-button.h
+4
-4
No files found.
src/account-identity-dialog.cpp
View file @
9c9664f0
...
@@ -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
(
Tp
DBus
::
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
Tp
DBus
::
Avatar
&
avatar
)
{
{
ui
->
accountAvatar
->
setAvatar
(
avatar
);
ui
->
accountAvatar
->
setAvatar
(
avatar
);
}
}
...
...
src/account-identity-dialog.h
View file @
9c9664f0
...
@@ -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
Tp
DBus
::
Avatar
&
avatar
);
private:
private:
Tp
::
AccountPtr
m_account
;
Tp
::
AccountPtr
m_account
;
...
...
src/avatar-button.cpp
View file @
9c9664f0
/*
/*
* 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
Tp
DBus
::
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
Tp
DBus
::
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
;
Tp
DBus
::
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
(
Tp
DBus
::
Avatar
());
Q_EMIT
avatarChanged
();
Q_EMIT
avatarChanged
();
}
}
src/avatar-button.h
View file @
9c9664f0
/*
/*
* 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
Tp
DBus
::
Avatar
&
avatar
);
Tp
::
Avatar
avatar
()
const
;
Tp
DBus
::
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
;
Tp
DBus
::
Avatar
m_avatar
;
Tp
::
AccountPtr
m_account
;
Tp
::
AccountPtr
m_account
;
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment