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:
chrisparker126 2011-08-29 21:20:48 +00:00
parent 35a059c44c
commit 3ff69a1be5
12 changed files with 578 additions and 268 deletions

View File

@ -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;
/****************************************/ /****************************************/

View File

@ -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);

View File

@ -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;

View File

@ -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);

View File

@ -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();
} }

View File

@ -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;

View File

@ -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();

View File

@ -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,12 +84,37 @@ 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;
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;
}
std::cerr << "Failed to share keys!" << std::endl;
return;
}
close(); close();
return; return;

View File

@ -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:

View File

@ -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()
{ {

View File

@ -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

View File

@ -1,244 +1,374 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>CreateForum</class> <class>CreateForum</class>
<widget class="QDialog" name="CreateForum"> <widget class="QDialog" name="CreateForum">
<property name="geometry"> <property name="geometry">
<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">
<string>Create new Forum</string> <string>Create new Forum</string>
</property> </property>
<property name="windowIcon"> <property name="windowIcon">
<iconset resource="../images.qrc"> <iconset resource="../images.qrc">
<normaloff>:/images/rstray3.png</normaloff>:/images/rstray3.png</iconset> <normaloff>:/images/rstray3.png</normaloff>:/images/rstray3.png</iconset>
</property> </property>
<layout class="QGridLayout" name="gridLayout_3"> <layout class="QGridLayout" name="gridLayout_3">
<property name="margin"> <property name="margin">
<number>0</number> <number>0</number>
</property> </property>
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QFrame" name="frame_2"> <widget class="QFrame" name="frame_2">
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>16777215</width> <width>16777215</width>
<height>64</height> <height>64</height>
</size> </size>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">QFrame#frame_2{background-image: url(:/images/connect/connectFriendBanner.png);}</string> <string notr="true">QFrame#frame_2{background-image: url(:/images/connect/connectFriendBanner.png);}</string>
</property> </property>
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::NoFrame</enum> <enum>QFrame::NoFrame</enum>
</property> </property>
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<property name="margin"> <property name="margin">
<number>6</number> <number>6</number>
</property> </property>
<property name="spacing"> <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="labelicon"> <widget class="QLabel" name="labelicon">
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>48</width> <width>48</width>
<height>48</height> <height>48</height>
</size> </size>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true"/> <string notr="true"/>
</property> </property>
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
<property name="pixmap"> <property name="pixmap">
<pixmap resource="../images.qrc">:/images/konversation64.png</pixmap> <pixmap resource="../images.qrc">:/images/konversation64.png</pixmap>
</property> </property>
<property name="scaledContents"> <property name="scaledContents">
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QLabel" name="textlabelcreatforums"> <widget class="QLabel" name="textlabelcreatforums">
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">color: rgb(255, 255, 255);</string> <string notr="true">color: rgb(255, 255, 255);</string>
</property> </property>
<property name="text"> <property name="text">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt; <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt; &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; } p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt; &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Arial'; font-size:24pt; font-weight:600; color:#ffffff;&quot;&gt;New Forum&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Arial'; font-size:24pt; font-weight:600; color:#ffffff;&quot;&gt;New Forum&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QFrame" name="frame"> <widget class="QFrame" name="frame">
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::NoFrame</enum> <enum>QFrame::NoFrame</enum>
</property> </property>
<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>
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="text"> <property name="text">
<string>Name</string> <string>Name</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLineEdit" name="forumName"/> <widget class="QLineEdit" name="forumName"/>
</item> </item>
</layout> </layout>
</item> </item>
<item row="1" column="0" colspan="3"> <item row="0" column="3" rowspan="6">
<layout class="QVBoxLayout"> <widget class="QDockWidget" name="contactsdockWidget">
<item> <property name="enabled">
<widget class="QLabel" name="label_5"> <bool>true</bool>
<property name="text"> </property>
<string>Description</string> <property name="sizePolicy">
</property> <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
</widget> <horstretch>0</horstretch>
</item> <verstretch>0</verstretch>
<item> </sizepolicy>
<widget class="QTextEdit" name="forumDesc"/> </property>
</item> <property name="maximumSize">
</layout> <size>
</item> <width>300</width>
<item row="2" column="0" colspan="3"> <height>524287</height>
<widget class="QGroupBox" name="tyoeGroupBox"> </size>
<property name="title"> </property>
<string>Type:</string> <property name="sizeIncrement">
</property> <size>
<layout class="QVBoxLayout" name="_3"> <width>220</width>
<property name="spacing"> <height>0</height>
<number>0</number> </size>
</property> </property>
<property name="margin"> <property name="baseSize">
<number>6</number> <size>
</property> <width>0</width>
<item> <height>0</height>
<widget class="QRadioButton" name="typePublic"> </size>
<property name="text"> </property>
<string>Public - Anyone can read and publish (Shared Publish Key)</string> <property name="toolTip">
</property> <string>check peers you would like to share private publish key with</string>
</widget> </property>
</item> <property name="floating">
<item> <bool>false</bool>
<widget class="QRadioButton" name="typePrivate"> </property>
<property name="text"> <property name="features">
<string>Restricted - Anyone can read, limited publishing (Private Publish Key)</string> <set>QDockWidget::NoDockWidgetFeatures</set>
</property> </property>
</widget> <property name="windowTitle">
</item> <string>Share Key With</string>
<item> </property>
<widget class="QRadioButton" name="typeEncrypted"> <widget class="QWidget" name="dockWidgetContents">
<property name="text"> <layout class="QGridLayout" name="_2">
<string>Private - (Private Publish Key required to view Messages)</string> <property name="margin">
</property> <number>0</number>
</widget> </property>
</item> <property name="spacing">
</layout> <number>0</number>
</widget> </property>
</item> <item row="0" column="0">
<item row="3" column="0" colspan="3"> <widget class="QTreeWidget" name="keyShareList">
<widget class="QGroupBox" name="msgGroupBox"> <property name="sizePolicy">
<property name="title"> <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<string>Allowed Messages</string> <horstretch>0</horstretch>
</property> <verstretch>4</verstretch>
<layout class="QVBoxLayout" name="_4"> </sizepolicy>
<property name="spacing"> </property>
<number>0</number> <property name="minimumSize">
</property> <size>
<property name="margin"> <width>20</width>
<number>6</number> <height>0</height>
</property> </size>
<item> </property>
<widget class="QRadioButton" name="msgAuth"> <property name="maximumSize">
<property name="text"> <size>
<string>Authenticated Messages</string> <width>300</width>
</property> <height>16777215</height>
</widget> </size>
</item> </property>
<item> <property name="sizeIncrement">
<widget class="QRadioButton" name="msgAnon"> <size>
<property name="text"> <width>220</width>
<string>Anonymous Messages</string> <height>0</height>
</property> </size>
</widget> </property>
</item> <property name="baseSize">
<item> <size>
<spacer name="verticalSpacer_2"> <width>200</width>
<property name="orientation"> <height>0</height>
<enum>Qt::Vertical</enum> </size>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sortingEnabled">
<size> <bool>true</bool>
<width>20</width> </property>
<height>40</height> <column>
</size> <property name="text">
</property> <string>Contacts:</string>
</spacer> </property>
</item> </column>
</layout> </widget>
</widget> </item>
</item> </layout>
<item row="4" column="0"> </widget>
<spacer> </widget>
<property name="orientation"> </item>
<enum>Qt::Horizontal</enum> <item row="1" column="0" colspan="3">
</property> <layout class="QVBoxLayout">
<property name="sizeHint" stdset="0"> <item>
<size> <widget class="QLabel" name="label_5">
<width>238</width> <property name="text">
<height>20</height> <string>Description</string>
</size> </property>
</property> </widget>
</spacer> </item>
</item> <item>
<item row="4" column="1"> <widget class="QTextEdit" name="forumDesc"/>
<widget class="QPushButton" name="cancelButton"> </item>
<property name="text"> </layout>
<string>Cancel</string> </item>
</property> <item row="2" column="0" colspan="3">
</widget> <widget class="QGroupBox" name="tyoeGroupBox">
</item> <property name="title">
<item row="4" column="2"> <string>Type:</string>
<widget class="QPushButton" name="createButton"> </property>
<property name="text"> <layout class="QGridLayout" name="gridLayout_2">
<string>Create</string> <property name="margin">
</property> <number>6</number>
<property name="default"> </property>
<bool>true</bool> <item row="0" column="0">
</property> <widget class="QRadioButton" name="typePublic">
</widget> <property name="text">
</item> <string>Public - Anyone can read and publish (Shared Publish Key)</string>
</layout> </property>
</widget> </widget>
</item> </item>
</layout> <item row="1" column="0">
</widget> <widget class="QRadioButton" name="typePrivate">
<resources> <property name="text">
<include location="../images.qrc"/> <string>Restricted - Anyone can read, limited publishing (Private Publish Key)</string>
</resources> </property>
<connections/> </widget>
</ui> </item>
<item row="2" column="0">
<widget class="QRadioButton" name="typeEncrypted">
<property name="text">
<string>Private - (Private Publish Key required to view Messages)</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<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">
<property name="title">
<string>Allowed Messages</string>
</property>
<layout class="QVBoxLayout" name="_4">
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<number>6</number>
</property>
<item>
<widget class="QRadioButton" name="msgAuth">
<property name="text">
<string>Authenticated Messages</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="msgAnon">
<property name="text">
<string>Anonymous Messages</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<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="5" column="0">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>238</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="5" column="1">
<widget class="QPushButton" name="cancelButton">
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
<item row="5" column="2">
<widget class="QPushButton" name="createButton">
<property name="text">
<string>Create</string>
</property>
<property name="default">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<resources>
<include location="../images.qrc"/>
</resources>
<connections/>
</ui>