added show of moderators in forum details

This commit is contained in:
csoler 2018-08-30 11:08:49 +02:00
parent 4c076b60aa
commit e12c17c6f0
No known key found for this signature in database
GPG Key ID: 7BCA522266C0804C
2 changed files with 171 additions and 136 deletions

View File

@ -376,6 +376,8 @@ void GxsGroupDialog::setupVisibility()
ui.pubKeyShare_cb->setVisible(mEnabledFlags & GXS_GROUP_FLAGS_SHAREKEYS); ui.pubKeyShare_cb->setVisible(mEnabledFlags & GXS_GROUP_FLAGS_SHAREKEYS);
ui.addAdmins_cb->setVisible(mEnabledFlags & GXS_GROUP_FLAGS_ADDADMINS); ui.addAdmins_cb->setVisible(mEnabledFlags & GXS_GROUP_FLAGS_ADDADMINS);
ui.label_8->setVisible(mEnabledFlags & GXS_GROUP_FLAGS_ADDADMINS);
ui.moderatorsLabel->setVisible(mEnabledFlags & GXS_GROUP_FLAGS_ADDADMINS);
ui.personalGroupBox->setVisible(mEnabledFlags & GXS_GROUP_FLAGS_PERSONALSIGN); ui.personalGroupBox->setVisible(mEnabledFlags & GXS_GROUP_FLAGS_PERSONALSIGN);
@ -867,6 +869,21 @@ void GxsGroupDialog::getSelectedModerators(std::set<RsGxsId>& ids)
void GxsGroupDialog::setSelectedModerators(const std::set<RsGxsId>& ids) void GxsGroupDialog::setSelectedModerators(const std::set<RsGxsId>& ids)
{ {
ui.adminsList->setSelectedIds<RsGxsId,FriendSelectionWidget::IDTYPE_GXS>(ids, false); ui.adminsList->setSelectedIds<RsGxsId,FriendSelectionWidget::IDTYPE_GXS>(ids, false);
QString moderatorsListString ;
RsIdentityDetails det;
for(auto it(ids.begin());it!=ids.end();++it)
{
rsIdentity->getIdDetails(*it,det);
if(!moderatorsListString.isNull())
moderatorsListString += ", " ;
moderatorsListString += det.mNickname.empty()?("[Unknown]"):QString::fromStdString(det.mNickname) ;
}
ui.moderatorsLabel->setText(moderatorsListString);
} }
/*********************************************************************************** /***********************************************************************************

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>1237</width> <width>1237</width>
<height>1145</height> <height>1189</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -44,7 +44,7 @@
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>1</number>
</property> </property>
<widget class="QWidget" name="createmode"> <widget class="QWidget" name="createmode">
<layout class="QGridLayout" name="gridLayout_8"> <layout class="QGridLayout" name="gridLayout_8">
@ -596,150 +596,168 @@
<property name="title"> <property name="title">
<string>Info</string> <string>Info</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QVBoxLayout" name="verticalLayout">
<item row="0" column="0"> <item>
<widget class="QLabel" name="label_3"> <layout class="QGridLayout" name="gridLayout_2">
<property name="text"> <item row="9" column="0">
<string>Name</string> <widget class="QLabel" name="label_8">
</property> <property name="text">
</widget> <string>Moderators:</string>
</item> </property>
<item row="0" column="1"> </widget>
<widget class="QLineEdit" name="nameline"> </item>
<property name="readOnly"> <item row="7" column="2">
<bool>true</bool> <layout class="QHBoxLayout" name="horizontalLayout_10">
</property> <item>
</widget> <widget class="QLabel" name="distributionValueLabel">
</item> <property name="text">
<item row="1" column="0"> <string>TextLabel</string>
<widget class="QLabel" name="label_10"> </property>
<property name="text"> </widget>
<string>Popularity</string> </item>
</property> <item>
</widget> <widget class="GxsCircleChooser" name="distributionCircleComboBox">
</item> <property name="sizePolicy">
<item row="1" column="1"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<widget class="QLineEdit" name="popline"> <horstretch>0</horstretch>
<property name="readOnly"> <verstretch>0</verstretch>
<bool>true</bool> </sizepolicy>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="0"> </layout>
<widget class="QLabel" name="label_6"> </item>
<property name="text"> <item row="2" column="2">
<string>Posts</string> <widget class="QLineEdit" name="postsline">
</property> <property name="text">
</widget> <string/>
</item> </property>
<item row="2" column="1"> <property name="readOnly">
<widget class="QLineEdit" name="postsline"> <bool>true</bool>
<property name="text"> </property>
<string/> </widget>
</property> </item>
<property name="readOnly"> <item row="1" column="2">
<bool>true</bool> <widget class="QLineEdit" name="popline">
</property> <property name="readOnly">
</widget> <bool>true</bool>
</item> </property>
<item row="3" column="0"> </widget>
<widget class="QLabel" name="label_11"> </item>
<property name="text"> <item row="2" column="0">
<string>Last Post</string> <widget class="QLabel" name="label_6">
</property> <property name="text">
</widget> <string>Posts</string>
</item> </property>
<item row="3" column="1"> </widget>
<widget class="QLineEdit" name="lastpostline"> </item>
<property name="readOnly"> <item row="4" column="2">
<bool>true</bool> <widget class="GxsIdLabel" name="authorLabel">
</property> <property name="text">
</widget> <string>GxsIdLabel</string>
</item> </property>
<item row="4" column="0"> </widget>
<widget class="QLabel" name="label_7"> </item>
<property name="text"> <item row="5" column="0">
<string>Author</string> <widget class="QLabel" name="label_4">
</property> <property name="text">
</widget> <string>ID</string>
</item> </property>
<item row="4" column="1"> </widget>
<widget class="GxsIdLabel" name="authorLabel"> </item>
<property name="text"> <item row="3" column="2">
<string>GxsIdLabel</string> <widget class="QLineEdit" name="lastpostline">
</property> <property name="readOnly">
</widget> <bool>true</bool>
</item> </property>
<item row="5" column="0"> </widget>
<widget class="QLabel" name="label_4"> </item>
<property name="text"> <item row="4" column="0">
<string>ID</string> <widget class="QLabel" name="label_7">
</property> <property name="text">
</widget> <string>Author</string>
</item> </property>
<item row="5" column="1"> </widget>
<widget class="QLineEdit" name="IDline"> </item>
<property name="readOnly"> <item row="8" column="2">
<bool>true</bool> <widget class="QLabel" name="antiSpamValueLabel">
</property>
</widget>
</item>
<item row="6" column="0" rowspan="2">
<widget class="QLabel" name="commentsLabel">
<property name="text">
<string>Comments:</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QLabel" name="commentsValueLabel">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item row="7" column="1" rowspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_10">
<item>
<widget class="QLabel" name="distributionValueLabel">
<property name="text"> <property name="text">
<string>TextLabel</string> <string>TextLabel</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="5" column="2">
<widget class="GxsCircleChooser" name="distributionCircleComboBox"> <widget class="QLineEdit" name="IDline">
<property name="sizePolicy"> <property name="readOnly">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> <bool>true</bool>
<horstretch>0</horstretch> </property>
<verstretch>0</verstretch> </widget>
</sizepolicy> </item>
<item row="6" column="0">
<widget class="QLabel" name="commentsLabel">
<property name="text">
<string>Comments:</string>
</property>
</widget>
</item>
<item row="6" column="2">
<widget class="QLabel" name="commentsValueLabel">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="distributionLabel">
<property name="text">
<string>Distribution:</string>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QLabel" name="antiSpamLabel">
<property name="text">
<string>Anti Spam:</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_11">
<property name="text">
<string>Last Post</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Name</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_10">
<property name="text">
<string>Popularity</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLineEdit" name="nameline">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="9" column="2">
<widget class="QLabel" name="moderatorsLabel">
<property name="text">
<string>TextLabel</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</item> </item>
<item row="8" column="0">
<widget class="QLabel" name="distributionLabel">
<property name="text">
<string>Distribution:</string>
</property>
</widget>
</item>
<item row="9" column="0">
<widget class="QLabel" name="antiSpamLabel">
<property name="text">
<string>Anti Spam:</string>
</property>
</widget>
</item>
<item row="9" column="1">
<widget class="QLabel" name="antiSpamValueLabel">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>