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 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;
|
||||
|
||||
/****************************************/
|
||||
|
@ -2134,7 +2134,6 @@ void p3GroupDistrib::publishDistribGroups()
|
||||
store->SendItem(grp); /* no delete */
|
||||
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 */
|
||||
@ -2521,6 +2520,7 @@ bool p3GroupDistrib::attemptPublishKeysRecvd()
|
||||
mRecvdPubKeys.erase(*sit);
|
||||
|
||||
|
||||
if(!toDelete.empty()) IndicateConfigChanged();
|
||||
|
||||
|
||||
return true;
|
||||
@ -3703,8 +3703,7 @@ bool p3GroupDistrib::locked_checkGroupInfo(GroupInfo &info, RsDistribGrp *newGr
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((info.distribGroup) &&
|
||||
((info.distribGroup->timestamp <= newGrp->timestamp) && !(newGrp->grpFlags & RS_DISTRIB_UPDATE)))
|
||||
if ((info.distribGroup) && (newGrp->timestamp <= info.distribGroup->timestamp))
|
||||
{
|
||||
#ifdef DISTRIB_DEBUG
|
||||
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;
|
||||
mGroupsRepublish = true;
|
||||
|
||||
// this is removed afterwards
|
||||
gi_curr->distribGroup->grpFlags |= RS_DISTRIB_UPDATE;
|
||||
|
||||
delete[] data;
|
||||
delete serialType;
|
||||
EVP_MD_CTX_destroy(mdctx);
|
||||
|
@ -639,6 +639,16 @@ bool p3Forums::locked_eventDuplicateMsg(GroupInfo */*grp*/, RsDistribMsg */*msg*
|
||||
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)
|
||||
{
|
||||
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 getMessageStatus(const std::string& fId, const std::string& mId, uint32_t& status);
|
||||
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 getMessageCount(const std::string &fId, unsigned int &newCount, unsigned int &unreadCount);
|
||||
|
@ -213,7 +213,7 @@ void ChannelFeed::editChannelDetail(){
|
||||
|
||||
void ChannelFeed::shareKey()
|
||||
{
|
||||
ShareKey shareUi(this, 0, mChannelId);
|
||||
ShareKey shareUi(this, 0, mChannelId, CHANNEL_KEY_SHARE);
|
||||
shareUi.exec();
|
||||
}
|
||||
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include "common/RSItemDelegate.h"
|
||||
#include "common/PopularityDefs.h"
|
||||
#include "RetroShareLink.h"
|
||||
#include "channels/ShareKey.h"
|
||||
|
||||
#include <retroshare/rspeers.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->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);
|
||||
connect( restoreKeysAct , SIGNAL( triggered() ), this, SLOT( restoreForumKeys() ) );
|
||||
|
||||
restoreKeysAct->setEnabled(!mCurrForumId.empty() && !IS_FORUM_ADMIN(subscribeFlags));
|
||||
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 bVisible = true;
|
||||
|
@ -99,6 +99,8 @@ private slots:
|
||||
void fillThreadFinished();
|
||||
void fillThreadProgress(int current, int count);
|
||||
|
||||
void shareKey();
|
||||
|
||||
private:
|
||||
void insertForums();
|
||||
void insertThreads();
|
||||
|
@ -25,12 +25,14 @@
|
||||
#include <algorithm>
|
||||
|
||||
#include <retroshare/rschannels.h>
|
||||
#include <retroshare/rsforums.h>
|
||||
#include <retroshare/rspeers.h>
|
||||
|
||||
#include "gui/common/PeerDefs.h"
|
||||
|
||||
ShareKey::ShareKey(QWidget *parent, Qt::WFlags flags, std::string chanId) :
|
||||
QDialog(parent, flags), mChannelId(chanId)
|
||||
ShareKey::ShareKey(QWidget *parent, Qt::WFlags flags, std::string grpId,
|
||||
int grpType) :
|
||||
QDialog(parent, flags), mGrpId(grpId), mGrpType(grpType)
|
||||
{
|
||||
ui = new Ui::ShareKey();
|
||||
ui->setupUi(this);
|
||||
@ -72,8 +74,7 @@ void ShareKey::changeEvent(QEvent *e)
|
||||
void ShareKey::shareKey()
|
||||
{
|
||||
|
||||
if(!rsChannels)
|
||||
return;
|
||||
|
||||
|
||||
if(mShareList.empty())
|
||||
{
|
||||
@ -83,12 +84,37 @@ void ShareKey::shareKey()
|
||||
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();
|
||||
return;
|
||||
|
@ -5,6 +5,8 @@
|
||||
|
||||
#include "ui_ShareKey.h"
|
||||
|
||||
#define CHANNEL_KEY_SHARE 0x00000001
|
||||
#define FORUM_KEY_SHARE 0x00000002
|
||||
|
||||
class ShareKey : public QDialog {
|
||||
Q_OBJECT
|
||||
@ -12,7 +14,8 @@ public:
|
||||
/*
|
||||
*@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();
|
||||
|
||||
|
||||
@ -27,9 +30,9 @@ private:
|
||||
|
||||
Ui::ShareKey *ui;
|
||||
|
||||
std::string mChannelId;
|
||||
std::string mGrpId;
|
||||
std::list<std::string> mShareList;
|
||||
|
||||
int mGrpType;
|
||||
|
||||
private slots:
|
||||
|
||||
|
@ -22,10 +22,13 @@
|
||||
#include <QMessageBox>
|
||||
|
||||
#include "util/misc.h"
|
||||
|
||||
#include "CreateForum.h"
|
||||
#include "gui/common/PeerDefs.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include <retroshare/rsforums.h>
|
||||
#include <retroshare/rspeers.h>
|
||||
|
||||
/** Constructor */
|
||||
CreateForum::CreateForum(QWidget *parent)
|
||||
@ -37,6 +40,16 @@ CreateForum::CreateForum(QWidget *parent)
|
||||
// connect up the buttons.
|
||||
connect( ui.cancelButton, SIGNAL( clicked ( bool ) ), this, SLOT( cancelForum( ) ) );
|
||||
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();
|
||||
}
|
||||
@ -47,11 +60,11 @@ void CreateForum::newForum()
|
||||
ui.typePublic->setChecked(true);
|
||||
|
||||
ui.typePrivate->setEnabled(false);
|
||||
ui.typeEncrypted->setEnabled(false);
|
||||
ui.typeEncrypted->setEnabled(true);
|
||||
|
||||
#ifdef RS_RELEASE_VERSION
|
||||
ui.typePrivate->setVisible(false);
|
||||
ui.typeEncrypted->setVisible(false);
|
||||
ui.typeEncrypted->setVisible(true);
|
||||
#endif
|
||||
|
||||
ui.msgAnon->setChecked(true);
|
||||
@ -61,6 +74,33 @@ void CreateForum::newForum()
|
||||
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()
|
||||
{
|
||||
QString name = misc::removeNewLine(ui.forumName->text());
|
||||
@ -100,12 +140,86 @@ void CreateForum::createForum()
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
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()
|
||||
{
|
||||
|
@ -45,6 +45,16 @@ private slots:
|
||||
void createForum();
|
||||
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
|
||||
|
@ -1,244 +1,374 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>CreateForum</class>
|
||||
<widget class="QDialog" name="CreateForum">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>500</width>
|
||||
<height>424</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Create new Forum</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/rstray3.png</normaloff>:/images/rstray3.png</iconset>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QFrame" name="frame_2">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>64</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame#frame_2{background-image: url(:/images/connect/connectFriendBanner.png);}</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="margin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="labelicon">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>48</width>
|
||||
<height>48</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../images.qrc">:/images/konversation64.png</pixmap>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="textlabelcreatforums">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; font-size:24pt; font-weight:600; color:#ffffff;">New Forum</span></p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QFrame" name="frame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_5">
|
||||
<item row="0" column="0" colspan="3">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Name</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="forumName"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="3">
|
||||
<layout class="QVBoxLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Description</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTextEdit" name="forumDesc"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="3">
|
||||
<widget class="QGroupBox" name="tyoeGroupBox">
|
||||
<property name="title">
|
||||
<string>Type:</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="_3">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="typePublic">
|
||||
<property name="text">
|
||||
<string>Public - Anyone can read and publish (Shared Publish Key)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="typePrivate">
|
||||
<property name="text">
|
||||
<string>Restricted - Anyone can read, limited publishing (Private Publish Key)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<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">
|
||||
<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="4" 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="4" column="1">
|
||||
<widget class="QPushButton" name="cancelButton">
|
||||
<property name="text">
|
||||
<string>Cancel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" 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>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>CreateForum</class>
|
||||
<widget class="QDialog" name="CreateForum">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>672</width>
|
||||
<height>495</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Create new Forum</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/rstray3.png</normaloff>:/images/rstray3.png</iconset>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QFrame" name="frame_2">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>64</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame#frame_2{background-image: url(:/images/connect/connectFriendBanner.png);}</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="margin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="labelicon">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>48</width>
|
||||
<height>48</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../images.qrc">:/images/konversation64.png</pixmap>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="textlabelcreatforums">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; font-size:24pt; font-weight:600; color:#ffffff;">New Forum</span></p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QFrame" name="frame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<item row="0" column="0" colspan="3">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Name</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="forumName"/>
|
||||
</item>
|
||||
</layout>
|
||||
</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">
|
||||
<layout class="QVBoxLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Description</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTextEdit" name="forumDesc"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="3">
|
||||
<widget class="QGroupBox" name="tyoeGroupBox">
|
||||
<property name="title">
|
||||
<string>Type:</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<property name="margin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QRadioButton" name="typePublic">
|
||||
<property name="text">
|
||||
<string>Public - Anyone can read and publish (Shared Publish Key)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QRadioButton" name="typePrivate">
|
||||
<property name="text">
|
||||
<string>Restricted - Anyone can read, limited publishing (Private Publish Key)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</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>
|
||||
|
Loading…
Reference in New Issue
Block a user