mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
added private groups option to forums
fix for grp edit in p3distrib git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4579 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
35a059c44c
commit
3ff69a1be5
@ -148,6 +148,14 @@ virtual bool ForumMessageSend(ForumMsgInfo &info) = 0;
|
|||||||
virtual bool forumRestoreKeys(const std::string& fId) = 0;
|
virtual bool forumRestoreKeys(const std::string& fId) = 0;
|
||||||
virtual bool forumSubscribe(const std::string &fId, bool subscribe) = 0;
|
virtual bool forumSubscribe(const std::string &fId, bool subscribe) = 0;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* shares keys with peers
|
||||||
|
*@param fId the forum for which private publish keys will be shared
|
||||||
|
*@param peers list of peers to be sent keys
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
virtual bool forumShareKeys(std::string fId, std::list<std::string>& peers) = 0;
|
||||||
|
|
||||||
virtual bool getMessageCount(const std::string &fId, unsigned int &newCount, unsigned int &unreadCount) = 0;
|
virtual bool getMessageCount(const std::string &fId, unsigned int &newCount, unsigned int &unreadCount) = 0;
|
||||||
|
|
||||||
/****************************************/
|
/****************************************/
|
||||||
|
@ -2134,7 +2134,6 @@ void p3GroupDistrib::publishDistribGroups()
|
|||||||
store->SendItem(grp); /* no delete */
|
store->SendItem(grp); /* no delete */
|
||||||
grp->PeerId(tempPeerId);
|
grp->PeerId(tempPeerId);
|
||||||
|
|
||||||
grp->grpFlags &= (~RS_DISTRIB_UPDATE); // if this is an update, ensure flag is removed after publication
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if they have public keys, publish these too */
|
/* if they have public keys, publish these too */
|
||||||
@ -2521,6 +2520,7 @@ bool p3GroupDistrib::attemptPublishKeysRecvd()
|
|||||||
mRecvdPubKeys.erase(*sit);
|
mRecvdPubKeys.erase(*sit);
|
||||||
|
|
||||||
|
|
||||||
|
if(!toDelete.empty()) IndicateConfigChanged();
|
||||||
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -3703,8 +3703,7 @@ bool p3GroupDistrib::locked_checkGroupInfo(GroupInfo &info, RsDistribGrp *newGr
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((info.distribGroup) &&
|
if ((info.distribGroup) && (newGrp->timestamp <= info.distribGroup->timestamp))
|
||||||
((info.distribGroup->timestamp <= newGrp->timestamp) && !(newGrp->grpFlags & RS_DISTRIB_UPDATE)))
|
|
||||||
{
|
{
|
||||||
#ifdef DISTRIB_DEBUG
|
#ifdef DISTRIB_DEBUG
|
||||||
std::cerr << "p3GroupDistrib::locked_checkGroupInfo() Group Data Old/Same";
|
std::cerr << "p3GroupDistrib::locked_checkGroupInfo() Group Data Old/Same";
|
||||||
@ -3846,9 +3845,6 @@ bool p3GroupDistrib::locked_editGroup(std::string grpId, GroupInfo& gi){
|
|||||||
gi_curr->grpChanged = true;
|
gi_curr->grpChanged = true;
|
||||||
mGroupsRepublish = true;
|
mGroupsRepublish = true;
|
||||||
|
|
||||||
// this is removed afterwards
|
|
||||||
gi_curr->distribGroup->grpFlags |= RS_DISTRIB_UPDATE;
|
|
||||||
|
|
||||||
delete[] data;
|
delete[] data;
|
||||||
delete serialType;
|
delete serialType;
|
||||||
EVP_MD_CTX_destroy(mdctx);
|
EVP_MD_CTX_destroy(mdctx);
|
||||||
|
@ -639,6 +639,16 @@ bool p3Forums::locked_eventDuplicateMsg(GroupInfo */*grp*/, RsDistribMsg */*msg*
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool p3Forums::forumShareKeys(std::string fId, std::list<std::string>& peers)
|
||||||
|
{
|
||||||
|
|
||||||
|
#ifdef FORUM_DEBUG
|
||||||
|
std::cerr << "p3Forums::forumShareKeys() " << fId << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return sharePubKey(fId, peers);
|
||||||
|
}
|
||||||
|
|
||||||
bool p3Forums::locked_eventNewMsg(GroupInfo */*grp*/, RsDistribMsg *msg, const std::string& /*id*/, bool historical)
|
bool p3Forums::locked_eventNewMsg(GroupInfo */*grp*/, RsDistribMsg *msg, const std::string& /*id*/, bool historical)
|
||||||
{
|
{
|
||||||
std::string grpId = msg->grpId;
|
std::string grpId = msg->grpId;
|
||||||
|
@ -59,7 +59,7 @@ virtual bool ForumMessageSend(ForumMsgInfo &info);
|
|||||||
virtual bool setMessageStatus(const std::string& fId, const std::string& mId, const uint32_t status, const uint32_t statusMask);
|
virtual bool setMessageStatus(const std::string& fId, const std::string& mId, const uint32_t status, const uint32_t statusMask);
|
||||||
virtual bool getMessageStatus(const std::string& fId, const std::string& mId, uint32_t& status);
|
virtual bool getMessageStatus(const std::string& fId, const std::string& mId, uint32_t& status);
|
||||||
virtual bool forumRestoreKeys(const std::string& fId);
|
virtual bool forumRestoreKeys(const std::string& fId);
|
||||||
|
virtual bool forumShareKeys(std::string fId, std::list<std::string>& peers);
|
||||||
virtual bool forumSubscribe(const std::string &fId, bool subscribe);
|
virtual bool forumSubscribe(const std::string &fId, bool subscribe);
|
||||||
|
|
||||||
virtual bool getMessageCount(const std::string &fId, unsigned int &newCount, unsigned int &unreadCount);
|
virtual bool getMessageCount(const std::string &fId, unsigned int &newCount, unsigned int &unreadCount);
|
||||||
|
@ -213,7 +213,7 @@ void ChannelFeed::editChannelDetail(){
|
|||||||
|
|
||||||
void ChannelFeed::shareKey()
|
void ChannelFeed::shareKey()
|
||||||
{
|
{
|
||||||
ShareKey shareUi(this, 0, mChannelId);
|
ShareKey shareUi(this, 0, mChannelId, CHANNEL_KEY_SHARE);
|
||||||
shareUi.exec();
|
shareUi.exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
#include "common/RSItemDelegate.h"
|
#include "common/RSItemDelegate.h"
|
||||||
#include "common/PopularityDefs.h"
|
#include "common/PopularityDefs.h"
|
||||||
#include "RetroShareLink.h"
|
#include "RetroShareLink.h"
|
||||||
|
#include "channels/ShareKey.h"
|
||||||
|
|
||||||
#include <retroshare/rspeers.h>
|
#include <retroshare/rspeers.h>
|
||||||
#include <retroshare/rsforums.h>
|
#include <retroshare/rsforums.h>
|
||||||
@ -295,9 +296,13 @@ void ForumsDialog::forumListCustomPopupMenu( QPoint /*point*/ )
|
|||||||
action = contextMnu.addAction(QIcon(":/images/settings16.png"), tr("Edit Forum Details"), this, SLOT(editForumDetails()));
|
action = contextMnu.addAction(QIcon(":/images/settings16.png"), tr("Edit Forum Details"), this, SLOT(editForumDetails()));
|
||||||
action->setEnabled (!mCurrForumId.empty () && IS_FORUM_ADMIN(subscribeFlags));
|
action->setEnabled (!mCurrForumId.empty () && IS_FORUM_ADMIN(subscribeFlags));
|
||||||
|
|
||||||
|
QAction *shareKeyAct = new QAction(QIcon(":/images/gpgp_key_generate.png"), tr("Share Forum"), &contextMnu);
|
||||||
|
connect( shareKeyAct, SIGNAL( triggered() ), this, SLOT( shareKey() ) );
|
||||||
|
shareKeyAct->setEnabled(!mCurrForumId.empty() && IS_FORUM_ADMIN(subscribeFlags));
|
||||||
|
contextMnu.addAction( shareKeyAct);
|
||||||
|
|
||||||
QAction *restoreKeysAct = new QAction(QIcon(":/images/settings16.png"), tr("Restore Publish Rights for Forum" ), &contextMnu);
|
QAction *restoreKeysAct = new QAction(QIcon(":/images/settings16.png"), tr("Restore Publish Rights for Forum" ), &contextMnu);
|
||||||
connect( restoreKeysAct , SIGNAL( triggered() ), this, SLOT( restoreForumKeys() ) );
|
connect( restoreKeysAct , SIGNAL( triggered() ), this, SLOT( restoreForumKeys() ) );
|
||||||
|
|
||||||
restoreKeysAct->setEnabled(!mCurrForumId.empty() && !IS_FORUM_ADMIN(subscribeFlags));
|
restoreKeysAct->setEnabled(!mCurrForumId.empty() && !IS_FORUM_ADMIN(subscribeFlags));
|
||||||
contextMnu.addAction( restoreKeysAct);
|
contextMnu.addAction( restoreKeysAct);
|
||||||
|
|
||||||
@ -1508,6 +1513,12 @@ void ForumsDialog::FilterItems()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ForumsDialog::shareKey()
|
||||||
|
{
|
||||||
|
ShareKey shareUi(this, 0, mCurrForumId, FORUM_KEY_SHARE);
|
||||||
|
shareUi.exec();
|
||||||
|
}
|
||||||
|
|
||||||
bool ForumsDialog::FilterItem(QTreeWidgetItem *pItem, QString &sPattern, int filterColumn)
|
bool ForumsDialog::FilterItem(QTreeWidgetItem *pItem, QString &sPattern, int filterColumn)
|
||||||
{
|
{
|
||||||
bool bVisible = true;
|
bool bVisible = true;
|
||||||
|
@ -99,6 +99,8 @@ private slots:
|
|||||||
void fillThreadFinished();
|
void fillThreadFinished();
|
||||||
void fillThreadProgress(int current, int count);
|
void fillThreadProgress(int current, int count);
|
||||||
|
|
||||||
|
void shareKey();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void insertForums();
|
void insertForums();
|
||||||
void insertThreads();
|
void insertThreads();
|
||||||
|
@ -25,12 +25,14 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include <retroshare/rschannels.h>
|
#include <retroshare/rschannels.h>
|
||||||
|
#include <retroshare/rsforums.h>
|
||||||
#include <retroshare/rspeers.h>
|
#include <retroshare/rspeers.h>
|
||||||
|
|
||||||
#include "gui/common/PeerDefs.h"
|
#include "gui/common/PeerDefs.h"
|
||||||
|
|
||||||
ShareKey::ShareKey(QWidget *parent, Qt::WFlags flags, std::string chanId) :
|
ShareKey::ShareKey(QWidget *parent, Qt::WFlags flags, std::string grpId,
|
||||||
QDialog(parent, flags), mChannelId(chanId)
|
int grpType) :
|
||||||
|
QDialog(parent, flags), mGrpId(grpId), mGrpType(grpType)
|
||||||
{
|
{
|
||||||
ui = new Ui::ShareKey();
|
ui = new Ui::ShareKey();
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
@ -72,8 +74,7 @@ void ShareKey::changeEvent(QEvent *e)
|
|||||||
void ShareKey::shareKey()
|
void ShareKey::shareKey()
|
||||||
{
|
{
|
||||||
|
|
||||||
if(!rsChannels)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if(mShareList.empty())
|
if(mShareList.empty())
|
||||||
{
|
{
|
||||||
@ -83,13 +84,38 @@ void ShareKey::shareKey()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!rsChannels->channelShareKeys(mChannelId, mShareList)){
|
if(mGrpType & CHANNEL_KEY_SHARE)
|
||||||
|
{
|
||||||
|
if(!rsChannels)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if(!rsChannels->channelShareKeys(mGrpId, mShareList)){
|
||||||
|
|
||||||
std::cerr << "Failed to share keys!" << std::endl;
|
std::cerr << "Failed to share keys!" << std::endl;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}else if(mGrpType & FORUM_KEY_SHARE)
|
||||||
|
{
|
||||||
|
if(!rsForums)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if(!rsForums->forumShareKeys(mGrpId, mShareList)){
|
||||||
|
|
||||||
|
std::cerr << "Failed to share keys!" << std::endl;
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
}else{
|
||||||
|
|
||||||
|
// incorrect type
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
close();
|
close();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
|
|
||||||
#include "ui_ShareKey.h"
|
#include "ui_ShareKey.h"
|
||||||
|
|
||||||
|
#define CHANNEL_KEY_SHARE 0x00000001
|
||||||
|
#define FORUM_KEY_SHARE 0x00000002
|
||||||
|
|
||||||
class ShareKey : public QDialog {
|
class ShareKey : public QDialog {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -12,7 +14,8 @@ public:
|
|||||||
/*
|
/*
|
||||||
*@param chanId The channel id to send request for
|
*@param chanId The channel id to send request for
|
||||||
*/
|
*/
|
||||||
ShareKey(QWidget *parent = 0, Qt::WFlags flags = 0, std::string chanId = "");
|
ShareKey(QWidget *parent = 0, Qt::WFlags flags = 0,
|
||||||
|
std::string grpId = "", int grpType = 0);
|
||||||
~ShareKey();
|
~ShareKey();
|
||||||
|
|
||||||
|
|
||||||
@ -27,9 +30,9 @@ private:
|
|||||||
|
|
||||||
Ui::ShareKey *ui;
|
Ui::ShareKey *ui;
|
||||||
|
|
||||||
std::string mChannelId;
|
std::string mGrpId;
|
||||||
std::list<std::string> mShareList;
|
std::list<std::string> mShareList;
|
||||||
|
int mGrpType;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
|
||||||
|
@ -22,10 +22,13 @@
|
|||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
|
||||||
#include "util/misc.h"
|
#include "util/misc.h"
|
||||||
|
|
||||||
#include "CreateForum.h"
|
#include "CreateForum.h"
|
||||||
|
#include "gui/common/PeerDefs.h"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
#include <retroshare/rsforums.h>
|
#include <retroshare/rsforums.h>
|
||||||
|
#include <retroshare/rspeers.h>
|
||||||
|
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
CreateForum::CreateForum(QWidget *parent)
|
CreateForum::CreateForum(QWidget *parent)
|
||||||
@ -37,6 +40,16 @@ CreateForum::CreateForum(QWidget *parent)
|
|||||||
// connect up the buttons.
|
// connect up the buttons.
|
||||||
connect( ui.cancelButton, SIGNAL( clicked ( bool ) ), this, SLOT( cancelForum( ) ) );
|
connect( ui.cancelButton, SIGNAL( clicked ( bool ) ), this, SLOT( cancelForum( ) ) );
|
||||||
connect( ui.createButton, SIGNAL( clicked ( bool ) ), this, SLOT( createForum( ) ) );
|
connect( ui.createButton, SIGNAL( clicked ( bool ) ), this, SLOT( createForum( ) ) );
|
||||||
|
connect( ui.pubKeyShare_cb, SIGNAL( clicked() ), this, SLOT( setShareList( ) ));
|
||||||
|
connect( ui.keyShareList, SIGNAL(itemChanged( QTreeWidgetItem *, int ) ),
|
||||||
|
this, SLOT(togglePersonItem( QTreeWidgetItem *, int ) ));
|
||||||
|
|
||||||
|
if(!ui.pubKeyShare_cb->isChecked()){
|
||||||
|
|
||||||
|
ui.contactsdockWidget->hide();
|
||||||
|
this->resize(this->size().width() - ui.contactsdockWidget->size().width(),
|
||||||
|
this->size().height());
|
||||||
|
}
|
||||||
|
|
||||||
newForum();
|
newForum();
|
||||||
}
|
}
|
||||||
@ -47,11 +60,11 @@ void CreateForum::newForum()
|
|||||||
ui.typePublic->setChecked(true);
|
ui.typePublic->setChecked(true);
|
||||||
|
|
||||||
ui.typePrivate->setEnabled(false);
|
ui.typePrivate->setEnabled(false);
|
||||||
ui.typeEncrypted->setEnabled(false);
|
ui.typeEncrypted->setEnabled(true);
|
||||||
|
|
||||||
#ifdef RS_RELEASE_VERSION
|
#ifdef RS_RELEASE_VERSION
|
||||||
ui.typePrivate->setVisible(false);
|
ui.typePrivate->setVisible(false);
|
||||||
ui.typeEncrypted->setVisible(false);
|
ui.typeEncrypted->setVisible(true);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ui.msgAnon->setChecked(true);
|
ui.msgAnon->setChecked(true);
|
||||||
@ -61,6 +74,33 @@ void CreateForum::newForum()
|
|||||||
ui.forumDesc->clear();
|
ui.forumDesc->clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CreateForum::togglePersonItem( QTreeWidgetItem *item, int /*col*/ )
|
||||||
|
{
|
||||||
|
|
||||||
|
/* extract id */
|
||||||
|
std::string id = (item -> text(1)).toStdString();
|
||||||
|
|
||||||
|
/* get state */
|
||||||
|
bool checked = (Qt::Checked == item -> checkState(0)); /* alway column 0 */
|
||||||
|
|
||||||
|
/* call control fns */
|
||||||
|
std::list<std::string>::iterator lit = std::find(mShareList.begin(), mShareList.end(), id);
|
||||||
|
|
||||||
|
if(checked && (lit == mShareList.end())){
|
||||||
|
|
||||||
|
// make sure ids not added already
|
||||||
|
mShareList.push_back(id);
|
||||||
|
|
||||||
|
}else
|
||||||
|
if(lit != mShareList.end()){
|
||||||
|
|
||||||
|
mShareList.erase(lit);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
void CreateForum::createForum()
|
void CreateForum::createForum()
|
||||||
{
|
{
|
||||||
QString name = misc::removeNewLine(ui.forumName->text());
|
QString name = misc::removeNewLine(ui.forumName->text());
|
||||||
@ -100,12 +140,86 @@ void CreateForum::createForum()
|
|||||||
|
|
||||||
if (rsForums)
|
if (rsForums)
|
||||||
{
|
{
|
||||||
rsForums->createForum(name.toStdWString(), desc.toStdWString(), flags);
|
std::string forumId = rsForums->createForum(name.toStdWString(),
|
||||||
|
desc.toStdWString(), flags);
|
||||||
|
|
||||||
|
if(ui.pubKeyShare_cb->isChecked())
|
||||||
|
rsForums->forumShareKeys(forumId, mShareList);
|
||||||
}
|
}
|
||||||
|
|
||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CreateForum::setShareList(){
|
||||||
|
|
||||||
|
if(ui.pubKeyShare_cb->isChecked()){
|
||||||
|
this->resize(this->size().width() + ui.contactsdockWidget->size().width(),
|
||||||
|
this->size().height());
|
||||||
|
ui.contactsdockWidget->show();
|
||||||
|
|
||||||
|
|
||||||
|
if (!rsPeers)
|
||||||
|
{
|
||||||
|
/* not ready yet! */
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::list<std::string> peers;
|
||||||
|
std::list<std::string>::iterator it;
|
||||||
|
|
||||||
|
rsPeers->getFriendList(peers);
|
||||||
|
|
||||||
|
/* get a link to the table */
|
||||||
|
QTreeWidget *shareWidget = ui.keyShareList;
|
||||||
|
|
||||||
|
QList<QTreeWidgetItem *> items;
|
||||||
|
|
||||||
|
for(it = peers.begin(); it != peers.end(); it++)
|
||||||
|
{
|
||||||
|
|
||||||
|
RsPeerDetails detail;
|
||||||
|
if (!rsPeers->getPeerDetails(*it, detail))
|
||||||
|
{
|
||||||
|
continue; /* BAD */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* make a widget per friend */
|
||||||
|
QTreeWidgetItem *item = new QTreeWidgetItem((QTreeWidget*)0);
|
||||||
|
|
||||||
|
item -> setText(0, PeerDefs::nameWithLocation(detail));
|
||||||
|
if (detail.state & RS_PEER_STATE_CONNECTED) {
|
||||||
|
item -> setTextColor(0,(Qt::darkBlue));
|
||||||
|
}
|
||||||
|
item -> setSizeHint(0, QSize( 17,17 ) );
|
||||||
|
|
||||||
|
item -> setText(1, QString::fromStdString(detail.id));
|
||||||
|
|
||||||
|
item -> setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
|
||||||
|
item -> setCheckState(0, Qt::Unchecked);
|
||||||
|
|
||||||
|
|
||||||
|
/* add to the list */
|
||||||
|
items.append(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* remove old items */
|
||||||
|
shareWidget->clear();
|
||||||
|
shareWidget->setColumnCount(1);
|
||||||
|
|
||||||
|
/* add the items in! */
|
||||||
|
shareWidget->insertTopLevelItems(0, items);
|
||||||
|
|
||||||
|
shareWidget->update(); /* update display */
|
||||||
|
|
||||||
|
}else{ // hide share widget
|
||||||
|
ui.contactsdockWidget->hide();
|
||||||
|
this->resize(this->size().width() - ui.contactsdockWidget->size().width(),
|
||||||
|
this->size().height());
|
||||||
|
mShareList.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void CreateForum::cancelForum()
|
void CreateForum::cancelForum()
|
||||||
{
|
{
|
||||||
|
@ -45,6 +45,16 @@ private slots:
|
|||||||
void createForum();
|
void createForum();
|
||||||
void cancelForum();
|
void cancelForum();
|
||||||
|
|
||||||
|
// set private forum key share list
|
||||||
|
void setShareList();
|
||||||
|
|
||||||
|
// when user checks a person in share list checkboxes
|
||||||
|
void togglePersonItem(QTreeWidgetItem* item, int col);
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
std::list<std::string> mShareList;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>500</width>
|
<width>672</width>
|
||||||
<height>424</height>
|
<height>495</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -95,7 +95,7 @@ p, li { white-space: pre-wrap; }
|
|||||||
<property name="frameShadow">
|
<property name="frameShadow">
|
||||||
<enum>QFrame::Raised</enum>
|
<enum>QFrame::Raised</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_5">
|
<layout class="QGridLayout" name="gridLayout_4">
|
||||||
<item row="0" column="0" colspan="3">
|
<item row="0" column="0" colspan="3">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<item>
|
<item>
|
||||||
@ -110,6 +110,101 @@ p, li { white-space: pre-wrap; }
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="0" column="3" rowspan="6">
|
||||||
|
<widget class="QDockWidget" name="contactsdockWidget">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>300</width>
|
||||||
|
<height>524287</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="sizeIncrement">
|
||||||
|
<size>
|
||||||
|
<width>220</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="baseSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>check peers you would like to share private publish key with</string>
|
||||||
|
</property>
|
||||||
|
<property name="floating">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="features">
|
||||||
|
<set>QDockWidget::NoDockWidgetFeatures</set>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Share Key With</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="dockWidgetContents">
|
||||||
|
<layout class="QGridLayout" name="_2">
|
||||||
|
<property name="margin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="spacing">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QTreeWidget" name="keyShareList">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>4</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>300</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="sizeIncrement">
|
||||||
|
<size>
|
||||||
|
<width>220</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="baseSize">
|
||||||
|
<size>
|
||||||
|
<width>200</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="sortingEnabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>Contacts:</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="1" column="0" colspan="3">
|
<item row="1" column="0" colspan="3">
|
||||||
<layout class="QVBoxLayout">
|
<layout class="QVBoxLayout">
|
||||||
<item>
|
<item>
|
||||||
@ -129,28 +224,25 @@ p, li { white-space: pre-wrap; }
|
|||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Type:</string>
|
<string>Type:</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="_3">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
<property name="spacing">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
<property name="margin">
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item row="0" column="0">
|
||||||
<widget class="QRadioButton" name="typePublic">
|
<widget class="QRadioButton" name="typePublic">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Public - Anyone can read and publish (Shared Publish Key)</string>
|
<string>Public - Anyone can read and publish (Shared Publish Key)</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="1" column="0">
|
||||||
<widget class="QRadioButton" name="typePrivate">
|
<widget class="QRadioButton" name="typePrivate">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Restricted - Anyone can read, limited publishing (Private Publish Key)</string>
|
<string>Restricted - Anyone can read, limited publishing (Private Publish Key)</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="2" column="0">
|
||||||
<widget class="QRadioButton" name="typeEncrypted">
|
<widget class="QRadioButton" name="typeEncrypted">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Private - (Private Publish Key required to view Messages)</string>
|
<string>Private - (Private Publish Key required to view Messages)</string>
|
||||||
@ -161,6 +253,44 @@ p, li { white-space: pre-wrap; }
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0" colspan="3">
|
<item row="3" column="0" colspan="3">
|
||||||
|
<widget class="QGroupBox" name="msgGroupBox_2">
|
||||||
|
<property name="title">
|
||||||
|
<string>Key Sharing</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="_5">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="margin">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="pubKeyShare_cb">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Key recipients can publish to restricted-type channels, and can view and publish for private-type channels </string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Share Private Publish Key</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_3">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0" colspan="3">
|
||||||
<widget class="QGroupBox" name="msgGroupBox">
|
<widget class="QGroupBox" name="msgGroupBox">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Allowed Messages</string>
|
<string>Allowed Messages</string>
|
||||||
@ -202,7 +332,7 @@ p, li { white-space: pre-wrap; }
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0">
|
<item row="5" column="0">
|
||||||
<spacer>
|
<spacer>
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
@ -215,14 +345,14 @@ p, li { white-space: pre-wrap; }
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="1">
|
<item row="5" column="1">
|
||||||
<widget class="QPushButton" name="cancelButton">
|
<widget class="QPushButton" name="cancelButton">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Cancel</string>
|
<string>Cancel</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="2">
|
<item row="5" column="2">
|
||||||
<widget class="QPushButton" name="createButton">
|
<widget class="QPushButton" name="createButton">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Create</string>
|
<string>Create</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user