mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Added to change header image and text on Share Key Dialog.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7645 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
59ab1bdc52
commit
a5db669883
@ -38,7 +38,7 @@ GroupShareKey::GroupShareKey(QWidget *parent, const RsGxsGroupId &grpId, int grp
|
||||
ui->setupUi(this);
|
||||
|
||||
ui->headerFrame->setHeaderImage(QPixmap(":/images/user/agt_forum64.png"));
|
||||
ui->headerFrame->setHeaderText(tr("Share Channel"));
|
||||
ui->headerFrame->setHeaderText(tr("Share"));
|
||||
|
||||
connect( ui->buttonBox, SIGNAL(accepted()), this, SLOT(shareKey()));
|
||||
connect( ui->buttonBox, SIGNAL(rejected()), this, SLOT(close()));
|
||||
@ -48,6 +48,8 @@ GroupShareKey::GroupShareKey(QWidget *parent, const RsGxsGroupId &grpId, int grp
|
||||
ui->keyShareList->setModus(FriendSelectionWidget::MODUS_CHECK);
|
||||
ui->keyShareList->setShowType(FriendSelectionWidget::SHOW_GROUP | FriendSelectionWidget::SHOW_SSL);
|
||||
ui->keyShareList->start();
|
||||
|
||||
setTyp();
|
||||
}
|
||||
|
||||
GroupShareKey::~GroupShareKey()
|
||||
@ -67,6 +69,44 @@ void GroupShareKey::changeEvent(QEvent *e)
|
||||
}
|
||||
}
|
||||
|
||||
void GroupShareKey::setTyp()
|
||||
{
|
||||
|
||||
if (mGrpType == CHANNEL_KEY_SHARE)
|
||||
{
|
||||
if (!rsGxsChannels)
|
||||
return;
|
||||
|
||||
ui->headerFrame->setHeaderImage(QPixmap(":/images/channels.png"));
|
||||
ui->headerFrame->setHeaderText(tr("Share Channel"));
|
||||
|
||||
|
||||
}
|
||||
else if(mGrpType == FORUM_KEY_SHARE)
|
||||
{
|
||||
|
||||
ui->headerFrame->setHeaderImage(QPixmap(":/images/konversation64.png"));
|
||||
ui->headerFrame->setHeaderText(tr("Share Forum"));
|
||||
|
||||
}
|
||||
else if (mGrpType == POSTED_KEY_SHARE)
|
||||
{
|
||||
if (!rsPosted)
|
||||
return;
|
||||
|
||||
ui->headerFrame->setHeaderImage(QPixmap(":/images/posted_64.png"));
|
||||
ui->headerFrame->setHeaderText(tr("Share Posted"));
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
// incorrect type
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void GroupShareKey::shareKey()
|
||||
{
|
||||
std::list<RsPeerId> shareList;
|
||||
|
@ -25,7 +25,7 @@ protected:
|
||||
|
||||
private slots:
|
||||
void shareKey();
|
||||
|
||||
void setTyp();
|
||||
private:
|
||||
RsGxsGroupId mGrpId;
|
||||
int mGrpType;
|
||||
|
Loading…
Reference in New Issue
Block a user