Added PlaceHolderText for Name/Description (gxs Group Dialog)

Set the description Text field to read only for the Show Mode
Display at Header Channel name (Show Mode)
Display Subscribers on Channels

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7793 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2014-12-25 17:05:26 +00:00
parent 6c3a6f161f
commit 83ecc4e8b4
7 changed files with 150 additions and 45 deletions

View File

@ -322,8 +322,8 @@ void GxsGroupDialog::setupReadonly()
//ui.groupLogo->setEnabled(!(mReadonlyFlags & GXS_GROUP_FLAGS_ICON));
ui.addLogoButton->setEnabled(!(mReadonlyFlags & GXS_GROUP_FLAGS_ICON));
ui.groupDesc->setEnabled(!(mReadonlyFlags & GXS_GROUP_FLAGS_DESCRIPTION));
ui.groupDescLabel->setEnabled(!(mReadonlyFlags & GXS_GROUP_FLAGS_DESCRIPTION));
ui.groupDesc->setReadOnly(mReadonlyFlags & GXS_GROUP_FLAGS_DESCRIPTION);
//ui.groupDescLabel->setEnabled(!(mReadonlyFlags & GXS_GROUP_FLAGS_DESCRIPTION));
ui.distribGroupBox->setEnabled(!(mReadonlyFlags & GXS_GROUP_FLAGS_DISTRIBUTION));
@ -367,6 +367,7 @@ void GxsGroupDialog::updateFromExistingMeta(const QString &description)
/* setup name */
ui.groupName->setText(QString::fromUtf8(mGrpMeta.mGroupName.c_str()));
ui.headerFrame->setHeaderText(QString::fromUtf8(mGrpMeta.mGroupName.c_str()));
/* set description */
ui.groupDesc->setPlainText(description);

View File

@ -7,14 +7,23 @@
<x>0</x>
<y>0</y>
<width>695</width>
<height>588</height>
<height>542</height>
</rect>
</property>
<property name="windowTitle">
<string notr="true">Create New</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<property name="spacing">
@ -41,7 +50,16 @@
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<property name="leftMargin">
<number>4</number>
</property>
<property name="topMargin">
<number>4</number>
</property>
<property name="rightMargin">
<number>4</number>
</property>
<property name="bottomMargin">
<number>4</number>
</property>
<item>
@ -96,7 +114,11 @@
</widget>
</item>
<item>
<widget class="QLineEdit" name="groupName"/>
<widget class="QLineEdit" name="groupName">
<property name="placeholderText">
<string>Set a descriptive title here</string>
</property>
</widget>
</item>
</layout>
</item>
@ -105,7 +127,16 @@
<property name="spacing">
<number>9</number>
</property>
<property name="margin">
<property name="leftMargin">
<number>3</number>
</property>
<property name="topMargin">
<number>3</number>
</property>
<property name="rightMargin">
<number>3</number>
</property>
<property name="bottomMargin">
<number>3</number>
</property>
<item>
@ -205,7 +236,16 @@
</property>
<widget class="QWidget" name="dockWidgetContents">
<layout class="QGridLayout" name="_2">
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<property name="spacing">
@ -249,20 +289,6 @@
</widget>
</widget>
</item>
<item row="1" column="0">
<layout class="QVBoxLayout">
<item>
<widget class="QLabel" name="groupDescLabel">
<property name="text">
<string>Description</string>
</property>
</widget>
</item>
<item>
<widget class="QTextEdit" name="groupDesc"/>
</item>
</layout>
</item>
<item row="3" column="0">
<widget class="QGroupBox" name="publishGroupBox">
<property name="title">
@ -272,7 +298,16 @@
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<property name="leftMargin">
<number>4</number>
</property>
<property name="topMargin">
<number>4</number>
</property>
<property name="rightMargin">
<number>4</number>
</property>
<property name="bottomMargin">
<number>4</number>
</property>
<item>
@ -315,7 +350,16 @@
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<property name="leftMargin">
<number>4</number>
</property>
<property name="topMargin">
<number>4</number>
</property>
<property name="rightMargin">
<number>4</number>
</property>
<property name="bottomMargin">
<number>4</number>
</property>
<item>
@ -351,7 +395,16 @@
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<property name="leftMargin">
<number>4</number>
</property>
<property name="topMargin">
<number>4</number>
</property>
<property name="rightMargin">
<number>4</number>
</property>
<property name="bottomMargin">
<number>4</number>
</property>
<item>
@ -486,6 +539,26 @@
</layout>
</widget>
</item>
<item row="1" column="0">
<widget class="QGroupBox" name="groupBox">
<layout class="QVBoxLayout">
<item>
<widget class="QLabel" name="groupDescLabel">
<property name="text">
<string>Description</string>
</property>
</widget>
</item>
<item>
<widget class="MimeTextEdit" name="groupDesc">
<property name="placeholderText">
<string>Set a descriptive description here</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
@ -514,6 +587,11 @@
<header>gui/common/FriendSelectionWidget.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>MimeTextEdit</class>
<extends>QTextEdit</extends>
<header location="global">gui/common/MimeTextEdit.h</header>
</customwidget>
</customwidgets>
<resources>
<include location="../images.qrc"/>

View File

@ -227,6 +227,8 @@ void GxsChannelPostsWidget::insertChannelDetails(const RsGxsChannelGroup &group)
chanImage = QPixmap(CHAN_DEFAULT_IMAGE);
}
ui->logoLabel->setPixmap(chanImage);
ui->subscribersLabel->setText(QString::number( group.mMeta.mPop)) ;
if (group.mMeta.mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_PUBLISH)
{

View File

@ -14,16 +14,7 @@
<property name="spacing">
<number>4</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<property name="margin">
<number>0</number>
</property>
<item>
@ -35,16 +26,7 @@
<enum>QFrame::Sunken</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="leftMargin">
<number>4</number>
</property>
<property name="topMargin">
<number>4</number>
</property>
<property name="rightMargin">
<number>4</number>
</property>
<property name="bottomMargin">
<property name="margin">
<number>4</number>
</property>
<item>
@ -121,11 +103,46 @@
<property name="text">
<string notr="true">Subscribe</string>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/RSS_004_32.png</normaloff>:/images/RSS_004_32.png</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="subscribersLabel">
<property name="minimumSize">
<size>
<width>30</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Subscribers</string>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="postButton">
<property name="focusPolicy">

View File

@ -1,6 +1,7 @@
<RCC>
<qresource prefix="/">
<file>images/add_chat24.png</file>
<file>images/RSS_004_32.png</file>
<file>images/mail-encrypted-full.png</file>
<file>images/decrypt-mail.png</file>
<file>images/inbox_22.png</file>

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

View File

@ -579,3 +579,9 @@ QLabel#sharekeyinfo_label{
background: #FFFFD7;
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #FFFFD7, stop:1 #FFFFB2);
}
QLabel#subscribersLabel{
border: 1px solid #CCCCCC;
border-radius: 6px;
}