Improved the Pulse Composer & the layout

* Hide by default the URL frame not yet used.
* Hide the Drag & Drop frame by default
* Layout improvements & stylesheets fixes
* Added placeholder text for the Text Edit field & fixed strings to be translate able
* Added the Edit profile button still not yet functional
This commit is contained in:
defnax 2020-12-28 13:00:27 +01:00
parent b4cbf2691f
commit b67ed7bce9
11 changed files with 341 additions and 97 deletions

View File

@ -22,6 +22,7 @@
#include <QtGui> #include <QtGui>
#include "PulseReply.h" #include "PulseReply.h"
#include "gui/gxs/GxsIdDetails.h"
#include "gui/common/FilesDefs.h" #include "gui/common/FilesDefs.h"
#include "PulseAddDialog.h" #include "PulseAddDialog.h"
@ -39,6 +40,10 @@ PulseAddDialog::PulseAddDialog(QWidget *parent)
connect(ui.pushButton_ClearDisplayAs, SIGNAL( clicked( void ) ), this, SLOT( clearDisplayAs( void ) ) ); connect(ui.pushButton_ClearDisplayAs, SIGNAL( clicked( void ) ), this, SLOT( clearDisplayAs( void ) ) );
connect(ui.pushButton_Cancel, SIGNAL( clicked( void ) ), this, SLOT( cancelPulse( void ) ) ); connect(ui.pushButton_Cancel, SIGNAL( clicked( void ) ), this, SLOT( cancelPulse( void ) ) );
connect(ui.textEdit_Pulse, SIGNAL( textChanged( void ) ), this, SLOT( pulseTextChanged( void ) ) ); connect(ui.textEdit_Pulse, SIGNAL( textChanged( void ) ), this, SLOT( pulseTextChanged( void ) ) );
connect(ui.pushButton_picture, SIGNAL(clicked()), this, SLOT( toggle()));
ui.pushButton_picture->setIcon(FilesDefs::getIconFromQtResourcePath(QString(":/icons/png/photo.png")));
ui.frame_picture->hide();
setAcceptDrops(true); setAcceptDrops(true);
} }
@ -47,6 +52,26 @@ void PulseAddDialog::setGroup(RsWireGroup &group)
{ {
ui.label_groupName->setText(QString::fromStdString(group.mMeta.mGroupName)); ui.label_groupName->setText(QString::fromStdString(group.mMeta.mGroupName));
ui.label_idName->setText(QString::fromStdString(group.mMeta.mAuthorId.toStdString())); ui.label_idName->setText(QString::fromStdString(group.mMeta.mAuthorId.toStdString()));
if (mGroup.mHeadshot.mData )
{
QPixmap pixmap;
if (GxsIdDetails::loadPixmapFromData(
mGroup.mHeadshot.mData,
mGroup.mHeadshot.mSize,
pixmap,GxsIdDetails::ORIGINAL))
{
pixmap = pixmap.scaled(50,50);
ui.headshot->setPixmap(pixmap);
}
}
else
{
// default.
QPixmap pixmap = FilesDefs::getPixmapFromQtResourcePath(":/icons/wire.png").scaled(50,50);
ui.headshot->setPixmap(pixmap);
}
mGroup = group; mGroup = group;
} }
@ -62,6 +87,8 @@ void PulseAddDialog::setGroup(const RsGxsGroupId &grpId)
void PulseAddDialog::cleanup() void PulseAddDialog::cleanup()
{ {
resize(700, 400 );
if (mIsReply) if (mIsReply)
{ {
std::cerr << "PulseAddDialog::cleanup() cleaning up old replyto"; std::cerr << "PulseAddDialog::cleanup() cleaning up old replyto";
@ -90,6 +117,7 @@ void PulseAddDialog::cleanup()
delete layout; delete layout;
mIsReply = false; mIsReply = false;
} }
ui.frame_reply->setVisible(false); ui.frame_reply->setVisible(false);
ui.comboBox_sentiment->setCurrentIndex(0); ui.comboBox_sentiment->setCurrentIndex(0);
ui.lineEdit_URL->setText(""); ui.lineEdit_URL->setText("");
@ -97,28 +125,34 @@ void PulseAddDialog::cleanup()
ui.textEdit_Pulse->setPlainText(""); ui.textEdit_Pulse->setPlainText("");
// disable URL until functionality finished. // disable URL until functionality finished.
ui.frame_URL->setEnabled(false); ui.frame_URL->setEnabled(false);
ui.frame_URL->hide();
ui.pushButton_Post->setEnabled(false); ui.pushButton_Post->setEnabled(false);
ui.pushButton_Post->setText("Post"); ui.pushButton_Post->setText(tr("Post"));
ui.frame_input->setVisible(true); ui.frame_input->setVisible(true);
ui.widget_sentiment->setVisible(true); ui.widget_sentiment->setVisible(true);
ui.pushButton_picture->show();
// cleanup images. // cleanup images.
mImage1.clear(); mImage1.clear();
ui.label_image1->clear(); ui.label_image1->clear();
ui.label_image1->setText("Drag and Drop Image"); ui.label_image1->setText(tr("Drag and Drop Image"));
mImage2.clear(); mImage2.clear();
ui.label_image2->clear(); ui.label_image2->clear();
ui.label_image2->setText("Drag and Drop Image"); ui.label_image2->setText(tr("Drag and Drop Image"));
mImage3.clear(); mImage3.clear();
ui.label_image3->clear(); ui.label_image3->clear();
ui.label_image3->setText("Drag and Drop Image"); ui.label_image3->setText(tr("Drag and Drop Image"));
mImage4.clear(); mImage4.clear();
ui.label_image4->clear(); ui.label_image4->clear();
ui.label_image4->setText("Drag and Drop Image"); ui.label_image4->setText(tr("Drag and Drop Image"));
// Hide Drag & Drop Frame
ui.frame_picture->hide();
ui.pushButton_picture->setChecked(false);
} }
void PulseAddDialog::pulseTextChanged() void PulseAddDialog::pulseTextChanged()
@ -136,6 +170,7 @@ void PulseAddDialog::setReplyTo(RsWirePulse &pulse, RsWirePulseSPtr pPulse, std:
mReplyToPulse = pulse; mReplyToPulse = pulse;
mReplyType = replyType; mReplyType = replyType;
ui.frame_reply->setVisible(true); ui.frame_reply->setVisible(true);
ui.pushButton_picture->show();
{ {
PulseReply *reply = new PulseReply(NULL, pPulse); PulseReply *reply = new PulseReply(NULL, pPulse);
@ -151,7 +186,8 @@ void PulseAddDialog::setReplyTo(RsWirePulse &pulse, RsWirePulseSPtr pPulse, std:
if (mReplyType & WIRE_PULSE_TYPE_REPLY) if (mReplyType & WIRE_PULSE_TYPE_REPLY)
{ {
ui.pushButton_Post->setText("Reply to Pulse"); ui.pushButton_Post->setText(tr("Reply to Pulse"));
ui.textEdit_Pulse->setPlaceholderText(tr("Pulse your reply"));
} }
else else
{ {
@ -160,10 +196,12 @@ void PulseAddDialog::setReplyTo(RsWirePulse &pulse, RsWirePulseSPtr pPulse, std:
ui.frame_input->setVisible(false); ui.frame_input->setVisible(false);
ui.widget_sentiment->setVisible(false); ui.widget_sentiment->setVisible(false);
if (mReplyType & WIRE_PULSE_TYPE_REPUBLISH) { if (mReplyType & WIRE_PULSE_TYPE_REPUBLISH) {
ui.pushButton_Post->setText("Republish Pulse"); ui.pushButton_Post->setText(tr("Republish Pulse"));
ui.pushButton_picture->hide();
} }
else if (mReplyType & WIRE_PULSE_TYPE_LIKE) { else if (mReplyType & WIRE_PULSE_TYPE_LIKE) {
ui.pushButton_Post->setText("Like Pulse"); ui.pushButton_Post->setText(tr("Like Pulse"));
ui.pushButton_picture->hide();
} }
} }
@ -464,3 +502,16 @@ void PulseAddDialog::addImage(const QString &path)
} }
} }
void PulseAddDialog::toggle()
{
if (ui.pushButton_picture->isChecked())
{
ui.frame_picture->show();
ui.pushButton_picture->setToolTip(tr("Hide Pictures"));
}
else
{
ui.frame_picture->hide();
ui.pushButton_picture->setToolTip(tr("Add Pictures"));
}
}

View File

@ -52,6 +52,7 @@ private slots:
void cancelPulse(); void cancelPulse();
void clearDialog(); void clearDialog();
void pulseTextChanged(); void pulseTextChanged();
void toggle();
private: private:
// OLD VERSIONs, private now. // OLD VERSIONs, private now.

View File

@ -7,13 +7,16 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>720</width> <width>720</width>
<height>493</height> <height>449</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string/> <string/>
</property> </property>
<layout class="QGridLayout" name="gridLayout_3"> <layout class="QGridLayout" name="gridLayout_3">
<property name="spacing">
<number>6</number>
</property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QFrame" name="frame"> <widget class="QFrame" name="frame">
<property name="sizePolicy"> <property name="sizePolicy">
@ -94,12 +97,68 @@
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_3"> <layout class="QVBoxLayout" name="verticalLayout_3">
<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>
<item> <item>
<widget class="QWidget" name="widget_replyto" native="true"/> <widget class="QWidget" name="widget_replyto" native="true"/>
</item> </item>
<item> <item>
<widget class="QWidget" name="widget_sentiment" native="true"> <widget class="QWidget" name="widget_sentiment" native="true">
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<property name="leftMargin">
<number>20</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>9</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="headshot">
<property name="minimumSize">
<size>
<width>50</width>
<height>51</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>50</width>
<height>50</height>
</size>
</property>
<property name="text">
<string>Head Shot</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<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> <item>
<widget class="QLabel" name="label_4"> <widget class="QLabel" name="label_4">
<property name="text"> <property name="text">
@ -143,19 +202,6 @@
</item> </item>
</widget> </widget>
</item> </item>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>238</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
@ -171,11 +217,24 @@
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_5"> <layout class="QVBoxLayout" name="verticalLayout_5">
<property name="topMargin">
<number>0</number>
</property>
<item> <item>
<widget class="QTextEdit" name="textEdit_Pulse"/> <widget class="QTextEdit" name="textEdit_Pulse">
<property name="font">
<font>
<family>MS Sans Serif</family>
<pointsize>10</pointsize>
</font>
</property>
<property name="placeholderText">
<string>Whats happening?</string>
</property>
</widget>
</item> </item>
<item> <item>
<widget class="QFrame" name="frame_2"> <widget class="QFrame" name="frame_picture">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>0</width> <width>0</width>
@ -301,6 +360,25 @@
</item> </item>
<item row="3" column="0"> <item row="3" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="leftMargin">
<number>6</number>
</property>
<item>
<widget class="QPushButton" name="pushButton_picture">
<property name="text">
<string/>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item> <item>
<spacer name="horizontalSpacer_2"> <spacer name="horizontalSpacer_2">
<property name="orientation"> <property name="orientation">

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>570</width> <width>570</width>
<height>376</height> <height>377</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -20,6 +20,12 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<property name="topMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item> <item>
<widget class="Line" name="line"> <widget class="Line" name="line">
<property name="minimumSize"> <property name="minimumSize">
@ -32,7 +38,7 @@
<enum>QFrame::Plain</enum> <enum>QFrame::Plain</enum>
</property> </property>
<property name="lineWidth"> <property name="lineWidth">
<number>5</number> <number>4</number>
</property> </property>
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>

View File

@ -49,6 +49,9 @@
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<property name="bottomMargin">
<number>0</number>
</property>
<item row="0" column="0" colspan="2"> <item row="0" column="0" colspan="2">
<widget class="QWidget" name="widget_prefix" native="true"> <widget class="QWidget" name="widget_prefix" native="true">
<property name="sizePolicy"> <property name="sizePolicy">
@ -98,6 +101,9 @@
<property name="text"> <property name="text">
<string>retweeted</string> <string>retweeted</string>
</property> </property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -158,6 +164,9 @@
<property name="toolButtonStyle"> <property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum> <enum>Qt::ToolButtonTextBesideIcon</enum>
</property> </property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -209,6 +218,9 @@
<property name="toolButtonStyle"> <property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum> <enum>Qt::ToolButtonTextBesideIcon</enum>
</property> </property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -260,6 +272,9 @@
<property name="toolButtonStyle"> <property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum> <enum>Qt::ToolButtonTextBesideIcon</enum>
</property> </property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -311,6 +326,9 @@
<property name="toolButtonStyle"> <property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum> <enum>Qt::ToolButtonTextBesideIcon</enum>
</property> </property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -429,6 +447,9 @@
<property name="text"> <property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; color:#555753;&quot;&gt;@sidler_here&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; color:#555753;&quot;&gt;@sidler_here&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -492,63 +513,61 @@
</widget> </widget>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_11"> <widget class="QWidget" name="widget" native="true">
<item> <layout class="QHBoxLayout" name="horizontalLayout_11">
<spacer name="horizontalSpacer_16"> <property name="topMargin">
<property name="orientation"> <number>0</number>
<enum>Qt::Horizontal</enum> </property>
</property> <property name="bottomMargin">
<property name="sizeType"> <number>1</number>
<enum>QSizePolicy::Minimum</enum> </property>
</property> <item>
<property name="sizeHint" stdset="0"> <spacer name="horizontalSpacer_16">
<size> <property name="orientation">
<width>5</width> <enum>Qt::Horizontal</enum>
<height>20</height> </property>
</size> <property name="sizeType">
</property> <enum>QSizePolicy::Minimum</enum>
</spacer> </property>
</item> <property name="sizeHint" stdset="0">
<item> <size>
<widget class="Line" name="line_replyLine"> <width>5</width>
<property name="orientation"> <height>20</height>
<enum>Qt::Vertical</enum> </size>
</property> </property>
</widget> </spacer>
</item> </item>
<item> <item>
<widget class="QWidget" name="widget" native="true"> <widget class="Line" name="line_replyLine">
<property name="sizePolicy"> <property name="frameShadow">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred"> <enum>QFrame::Plain</enum>
<horstretch>0</horstretch> </property>
<verstretch>0</verstretch> <property name="lineWidth">
</sizepolicy> <number>5</number>
</property> </property>
<property name="minimumSize"> <property name="orientation">
<size> <enum>Qt::Vertical</enum>
<width>1</width> </property>
<height>0</height> </widget>
</size> </item>
</property> <item>
</widget> <spacer name="horizontalSpacer_17">
</item> <property name="orientation">
<item> <enum>Qt::Horizontal</enum>
<spacer name="horizontalSpacer_17"> </property>
<property name="orientation"> <property name="sizeType">
<enum>Qt::Horizontal</enum> <enum>QSizePolicy::Minimum</enum>
</property> </property>
<property name="sizeType"> <property name="sizeHint" stdset="0">
<enum>QSizePolicy::Minimum</enum> <size>
</property> <width>5</width>
<property name="sizeHint" stdset="0"> <height>20</height>
<size> </size>
<width>5</width> </property>
<height>20</height> </spacer>
</size> </item>
</property> </layout>
</spacer> </widget>
</item>
</layout>
</item> </item>
</layout> </layout>
</item> </item>
@ -572,6 +591,9 @@
<property name="text"> <property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; color:#555753;&quot;&gt;Replying to @sidler&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; color:#555753;&quot;&gt;Replying to @sidler&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
</property>
</widget> </widget>
</item> </item>
<item> <item>

View File

@ -64,6 +64,18 @@
</size> </size>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_10"> <layout class="QHBoxLayout" name="horizontalLayout_10">
<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>
<item> <item>
<spacer name="horizontalSpacer_14"> <spacer name="horizontalSpacer_14">
<property name="orientation"> <property name="orientation">
@ -130,6 +142,9 @@
<height>24</height> <height>24</height>
</size> </size>
</property> </property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -150,6 +165,9 @@
<height>24</height> <height>24</height>
</size> </size>
</property> </property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -287,11 +305,8 @@
<iconset resource="TheWire_images.qrc"> <iconset resource="TheWire_images.qrc">
<normaloff>:/images/external-link.svg</normaloff>:/images/external-link.svg</iconset> <normaloff>:/images/external-link.svg</normaloff>:/images/external-link.svg</iconset>
</property> </property>
<property name="iconSize"> <property name="autoRaise">
<size> <bool>true</bool>
<width>24</width>
<height>24</height>
</size>
</property> </property>
</widget> </widget>
</item> </item>
@ -534,6 +549,9 @@
<property name="toolButtonStyle"> <property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum> <enum>Qt::ToolButtonTextBesideIcon</enum>
</property> </property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -585,6 +603,9 @@
<property name="toolButtonStyle"> <property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum> <enum>Qt::ToolButtonTextBesideIcon</enum>
</property> </property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -636,6 +657,9 @@
<property name="toolButtonStyle"> <property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum> <enum>Qt::ToolButtonTextBesideIcon</enum>
</property> </property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -687,6 +711,9 @@
<property name="toolButtonStyle"> <property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum> <enum>Qt::ToolButtonTextBesideIcon</enum>
</property> </property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget> </widget>
</item> </item>
<item> <item>

View File

@ -172,16 +172,26 @@ bool WireGroupDialog::service_loadGroup(const RsGxsGenericGroupData *data, Mode
const RsWireGroup &group = *pgroup; const RsWireGroup &group = *pgroup;
// description = QString::fromUtf8(group.mDescription.c_str()); // description = QString::fromUtf8(group.mDescription.c_str());
#if 0 if (group.mHeadshot.mData) {
if (group.mThumbnail.mData) {
QPixmap pixmap; QPixmap pixmap;
if (GxsIdDetails::loadPixmapFromData(group.mThumbnail.mData, group.mThumbnail.mSize, pixmap,GxsIdDetails::ORIGINAL)) { if (GxsIdDetails::loadPixmapFromData(group.mHeadshot.mData, group.mHeadshot.mSize, pixmap,GxsIdDetails::ORIGINAL)) {
setLogo(pixmap); setLogo(pixmap);
} }
} else { } else {
setLogo(FilesDefs::getPixmapFromQtResourcePath(":/images/album_create_64.png")); setLogo(FilesDefs::getPixmapFromQtResourcePath(":/images/album_create_64.png"));
}
// from Extra Widget.
mExtra->setTagline(group.mTagline);
mExtra->setLocation(group.mLocation);
if (group.mMasthead.mData){
QPixmap pixmap;
if (GxsIdDetails::loadPixmapFromData(group.mMasthead.mData, group.mMasthead.mSize, pixmap,GxsIdDetails::ORIGINAL))
{
mExtra->setMasthead(pixmap);
}
} }
#endif
return true; return true;
} }

View File

@ -24,6 +24,7 @@
#include <QBuffer> #include <QBuffer>
#include "WireGroupItem.h" #include "WireGroupItem.h"
#include "WireGroupDialog.h"
#include "gui/gxs/GxsIdDetails.h" #include "gui/gxs/GxsIdDetails.h"
#include "gui/common/FilesDefs.h" #include "gui/common/FilesDefs.h"
@ -39,6 +40,8 @@ WireGroupItem::WireGroupItem(WireGroupHolder *holder, const RsWireGroup &grp)
setAttribute ( Qt::WA_DeleteOnClose, true ); setAttribute ( Qt::WA_DeleteOnClose, true );
setup(); setup();
// disabled, still not yet functional Edit/Update
editButton->setEnabled(false);
} }
RsGxsGroupId &WireGroupItem::groupId() RsGxsGroupId &WireGroupItem::groupId()
@ -84,6 +87,7 @@ void WireGroupItem::setup()
connect(toolButton_show, SIGNAL(clicked()), this, SLOT(show())); connect(toolButton_show, SIGNAL(clicked()), this, SLOT(show()));
connect(toolButton_subscribe, SIGNAL(clicked()), this, SLOT(subscribe())); connect(toolButton_subscribe, SIGNAL(clicked()), this, SLOT(subscribe()));
connect(editButton, SIGNAL(clicked()), this, SLOT(editGroupDetails()));
setGroupSet(); setGroupSet();
} }
@ -93,16 +97,19 @@ void WireGroupItem::setGroupSet()
toolButton_type->setText("Own"); toolButton_type->setText("Own");
toolButton_subscribe->setText("N/A"); toolButton_subscribe->setText("N/A");
toolButton_subscribe->setEnabled(false); toolButton_subscribe->setEnabled(false);
editButton->show();
} }
else if (mGroup.mMeta.mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_SUBSCRIBED) else if (mGroup.mMeta.mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_SUBSCRIBED)
{ {
toolButton_type->setText("Following"); toolButton_type->setText("Following");
toolButton_subscribe->setText("Unfollow"); toolButton_subscribe->setText("Unfollow");
editButton->hide();
} }
else else
{ {
toolButton_type->setText("Other"); toolButton_type->setText("Other");
toolButton_subscribe->setText("Follow"); toolButton_subscribe->setText("Follow");
editButton->hide();
} }
} }
@ -174,3 +181,16 @@ const QPixmap *WireGroupItem::getPixmap()
return NULL; return NULL;
} }
void WireGroupItem::editGroupDetails()
{
RsGxsGroupId groupId = mGroup.mMeta.mGroupId;
if (groupId.isNull())
{
std::cerr << "WireGroupItem::editGroupDetails() No Group selected";
std::cerr << std::endl;
return;
}
WireGroupDialog wireEdit(GxsGroupDialog::MODE_EDIT, groupId, this);
wireEdit.exec ();
}

View File

@ -55,6 +55,7 @@ public:
private slots: private slots:
void show(); void show();
void subscribe(); void subscribe();
void editGroupDetails();
protected: protected:
void mousePressEvent(QMouseEvent *event); void mousePressEvent(QMouseEvent *event);

View File

@ -136,6 +136,20 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QPushButton" name="editButton">
<property name="toolTip">
<string>Edit Profile</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../icons.qrc">
<normaloff>:/icons/mail/compose.png</normaloff>:/icons/mail/compose.png</iconset>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>

View File

@ -143,7 +143,7 @@ PulseViewGroup QToolButton#toolButton_follow{
color: white; color: white;
background: #0099cc; background: #0099cc;
border-radius: 4px; border-radius: 4px;
max-height: 27px; max-height: 20px;
min-width: 4em; min-width: 4em;
padding: 2px; padding: 2px;
padding-left: 6px; padding-left: 6px;
@ -220,7 +220,7 @@ PulseAddDialog QPushButton#pushButton_Post:disabled {
color: white; color: white;
background: #d40000; background: #d40000;
border-radius: 4px; border-radius: 4px;
max-height: 27px; max-height: 20px;
min-width: 4em; min-width: 4em;
padding-left: 6px; padding-left: 6px;
padding-right: 6px; padding-right: 6px;
@ -1110,6 +1110,20 @@ PulseTopLevel QFrame#frame, PulseViewGroup QFrame#frame, PulseReply QFrame#frame
background: white; background: white;
} }
ChatLobbyWidget QTreeWidget#lobbyTreeWidget{ PulseAddDialog QTextEdit#textEdit_Pulse {
font-size: 10pt; border: 2px solid #7ecbfb;
border-radius: 6px;
background: white;
}
PulseAddDialog QFrame#frame_input, QFrame#frame_reply {
border: 0px;
}
PulseReply #line_replyLine , PulseMessage #line{
color: #7ecbfb;
}
WireDialog QLabel#label_viewMode {
font-size: 12pt;
} }