mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-28 08:59:37 -05:00
Added remove Avatar functionality
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7882 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
d2d0b2ae61
commit
6be1cb82b9
@ -83,6 +83,8 @@ IdEditDialog::IdEditDialog(QWidget *parent)
|
|||||||
connect(ui.toolButton_Tag4, SIGNAL(clicked(bool)), this, SLOT(rmTag4()));
|
connect(ui.toolButton_Tag4, SIGNAL(clicked(bool)), this, SLOT(rmTag4()));
|
||||||
connect(ui.toolButton_Tag5, SIGNAL(clicked(bool)), this, SLOT(rmTag5()));
|
connect(ui.toolButton_Tag5, SIGNAL(clicked(bool)), this, SLOT(rmTag5()));
|
||||||
connect(ui.avatarButton, SIGNAL(clicked(bool)), this, SLOT(changeAvatar()));
|
connect(ui.avatarButton, SIGNAL(clicked(bool)), this, SLOT(changeAvatar()));
|
||||||
|
connect(ui.removeButton, SIGNAL(clicked(bool)), this, SLOT(removeAvatar()));
|
||||||
|
|
||||||
|
|
||||||
mIdQueue = new TokenQueue(rsIdentity->getTokenService(), this);
|
mIdQueue = new TokenQueue(rsIdentity->getTokenService(), this);
|
||||||
ui.pushButton_Tag->setEnabled(false);
|
ui.pushButton_Tag->setEnabled(false);
|
||||||
@ -537,3 +539,16 @@ void IdEditDialog::loadRequest(const TokenQueue */*queue*/, const TokenRequest &
|
|||||||
// only one here!
|
// only one here!
|
||||||
loadExistingId(req.mToken);
|
loadExistingId(req.mToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void IdEditDialog::removeAvatar()
|
||||||
|
{
|
||||||
|
/* submit updated details */
|
||||||
|
std::string groupname = ui.lineEdit_Nickname->text().toUtf8().constData();
|
||||||
|
|
||||||
|
mEditGroup.mMeta.mGroupName = groupname;
|
||||||
|
mEditGroup.mImage.clear();
|
||||||
|
ui.avatarLabel->setPixmap(NULL);
|
||||||
|
|
||||||
|
uint32_t dummyToken = 0;
|
||||||
|
rsIdentity->updateIdentity(dummyToken, mEditGroup);
|
||||||
|
}
|
@ -55,6 +55,8 @@ private slots:
|
|||||||
void submit();
|
void submit();
|
||||||
|
|
||||||
void changeAvatar() ;
|
void changeAvatar() ;
|
||||||
|
void removeAvatar();
|
||||||
|
|
||||||
void addRecognTag();
|
void addRecognTag();
|
||||||
void checkNewTag();
|
void checkNewTag();
|
||||||
void rmTag1();
|
void rmTag1();
|
||||||
|
@ -197,7 +197,7 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="avatarLabel">
|
<widget class="QLabel" name="avatarLabel">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -229,6 +229,11 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="avatarButton">
|
<widget class="QPushButton" name="avatarButton">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -237,13 +242,35 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="verticalSpacer_3">
|
<widget class="QPushButton" name="removeButton">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>24</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Remove Avatar</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../images.qrc">
|
||||||
|
<normaloff>:/images/delete.png</normaloff>:/images/delete.png</iconset>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_4">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>20</width>
|
<width>138</width>
|
||||||
<height>40</height>
|
<height>40</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
Loading…
Reference in New Issue
Block a user