diff --git a/retroshare-gui/src/gui/TheWire/PulseViewGroup.cpp b/retroshare-gui/src/gui/TheWire/PulseViewGroup.cpp
index 4ef0b6512..475c74034 100644
--- a/retroshare-gui/src/gui/TheWire/PulseViewGroup.cpp
+++ b/retroshare-gui/src/gui/TheWire/PulseViewGroup.cpp
@@ -26,6 +26,7 @@
#include "PulseViewGroup.h"
#include "CustomFrame.h"
+#include "WireGroupDialog.h"
#include "gui/gxs/GxsIdDetails.h"
#include "gui/common/FilesDefs.h"
#include "util/DateTime.h"
@@ -40,6 +41,9 @@ PulseViewGroup::PulseViewGroup(PulseViewHolder *holder, RsWireGroupSPtr group)
setupUi(this);
setAttribute ( Qt::WA_DeleteOnClose, true );
setup();
+
+ connect(editButton, SIGNAL(clicked()), this, SLOT(editProfile()));
+
}
void PulseViewGroup::setup()
@@ -89,14 +93,14 @@ void PulseViewGroup::setup()
mGroup->mHeadshot.mSize,
pixmap,GxsIdDetails::ORIGINAL))
{
- pixmap = pixmap.scaled(100,100);
+ pixmap = pixmap.scaled(100,100, Qt::KeepAspectRatio, Qt::SmoothTransformation);
label_headshot->setPixmap(pixmap);
}
}
else
{
// default.
- QPixmap pixmap = FilesDefs::getPixmapFromQtResourcePath(":/icons/png/posted.png").scaled(100,100);
+ QPixmap pixmap = FilesDefs::getPixmapFromQtResourcePath(":/icons/wire.png").scaled(100,100, Qt::KeepAspectRatio, Qt::SmoothTransformation);
label_headshot->setPixmap(pixmap);
}
@@ -121,6 +125,23 @@ void PulseViewGroup::setup()
widget_replies->setVisible(false);
}
}
+
+ setGroupSet();
+}
+
+void PulseViewGroup::setGroupSet()
+{
+ if (mGroup->mMeta.mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_ADMIN) {
+ editButton->show();
+ }
+ else if (mGroup->mMeta.mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_SUBSCRIBED)
+ {
+ editButton->hide();
+ }
+ else
+ {
+ editButton->hide();
+ }
}
void PulseViewGroup::actionFollow()
@@ -135,3 +156,17 @@ void PulseViewGroup::actionFollow()
}
}
+void PulseViewGroup::editProfile()
+{
+ RsGxsGroupId groupId = mGroup->mMeta.mGroupId;
+ if (groupId.isNull())
+ {
+ std::cerr << "PulseViewGroup::editProfile() No Group selected";
+ std::cerr << std::endl;
+ return;
+ }
+
+ WireGroupDialog wireEdit(GxsGroupDialog::MODE_EDIT, groupId, this);
+ wireEdit.exec ();
+}
+
diff --git a/retroshare-gui/src/gui/TheWire/PulseViewGroup.h b/retroshare-gui/src/gui/TheWire/PulseViewGroup.h
index 4d00090ca..62da0a228 100644
--- a/retroshare-gui/src/gui/TheWire/PulseViewGroup.h
+++ b/retroshare-gui/src/gui/TheWire/PulseViewGroup.h
@@ -35,10 +35,13 @@ public:
private slots:
void actionFollow();
+ void editProfile();
protected:
void setup();
+private:
+ void setGroupSet();
protected:
RsWireGroupSPtr mGroup;
diff --git a/retroshare-gui/src/gui/TheWire/PulseViewGroup.ui b/retroshare-gui/src/gui/TheWire/PulseViewGroup.ui
index 96f717656..79d9964f6 100644
--- a/retroshare-gui/src/gui/TheWire/PulseViewGroup.ui
+++ b/retroshare-gui/src/gui/TheWire/PulseViewGroup.ui
@@ -136,38 +136,6 @@
- -
-
-
- Qt::Horizontal
-
-
-
- 518
- 58
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 0
- 20
-
-
-
- <html><head/><body><p><span style=" color:#555753;">@sidler_here</span></p></body></html>
-
-
-
-
@@ -203,6 +171,45 @@
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 0
+ 20
+
+
+
+ <html><head/><body><p><span style=" color:#555753;">@sidler_here</span></p></body></html>
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 518
+ 58
+
+
+
+
+ -
+
+
+ Edit profile
+
+
+
@@ -227,41 +234,6 @@
- -
-
-
-
- 0
- 0
-
-
-
-
- 0
- 20
-
-
-
- <html><head/><body><p><span style=" color:#2e3436;">3:58 AM · Apr 13, 2020 ·</span></p></body></html>
-
-
-
- -
-
-
- Qt::Horizontal
-
-
- QSizePolicy::Fixed
-
-
-
- 20
- 20
-
-
-
-
-
@@ -281,19 +253,6 @@
- -
-
-
- Qt::Horizontal
-
-
-
- 2000
- 20
-
-
-
-
-
@@ -313,6 +272,54 @@
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 0
+ 20
+
+
+
+ <html><head/><body><p><span style=" color:#2e3436;">3:58 AM · Apr 13, 2020 ·</span></p></body></html>
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 2000
+ 20
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+ QSizePolicy::Fixed
+
+
+
+ 20
+ 20
+
+
+
+
@@ -530,6 +537,7 @@
12
+ 75
true
diff --git a/retroshare-gui/src/gui/TheWire/WireGroupExtra.cpp b/retroshare-gui/src/gui/TheWire/WireGroupExtra.cpp
index b6a1c5440..8ed6d4d4b 100644
--- a/retroshare-gui/src/gui/TheWire/WireGroupExtra.cpp
+++ b/retroshare-gui/src/gui/TheWire/WireGroupExtra.cpp
@@ -34,13 +34,19 @@ WireGroupExtra::~WireGroupExtra()
void WireGroupExtra::setUp()
{
- connect(ui.pushButton_masthead, SIGNAL(clicked() ), this , SLOT(addMasthead()));
-}
+ connect(ui.pushButton_masthead, SIGNAL(clicked() ), this , SLOT(addMasthead()));
+ int desired_height = ui.pushButton_masthead->height() + ui.removeButton->height() + ui.lineEdit_Tagline->height();
+ int desired_width = 3/1.0 * desired_height + ui.lineEdit_Tagline->width();
+
+ ui.label_masthead->setFixedSize(desired_width, desired_height);
+
+ setMasthead(QPixmap());
+}
void WireGroupExtra::addMasthead()
{
- QPixmap img = misc::getOpenThumbnailedPicture(this, tr("Load Masthead"), 400, 100);
+ QPixmap img = misc::getOpenThumbnailedPicture(this, tr("Load Masthead"), 800, 600);
if (img.isNull())
return;
@@ -48,7 +54,6 @@ void WireGroupExtra::addMasthead()
setMasthead(img);
}
-
void WireGroupExtra::setTagline(const std::string &str)
{
ui.lineEdit_Tagline->setText(QString::fromStdString(str));
@@ -61,8 +66,21 @@ void WireGroupExtra::setLocation(const std::string &str)
void WireGroupExtra::setMasthead(const QPixmap &pixmap)
{
- mMasthead = pixmap;
- ui.label_masthead->setPixmap(mMasthead);
+ mMasthead = pixmap;
+
+ if (!mMasthead.isNull()) {
+ ui.label_masthead->setPicture(mMasthead);
+ ui.label_masthead->setToolTip(tr("Use the mouse to zoom and adjust the image for your background."));
+ } else {
+ ui.label_masthead->setPicture(QPixmap());
+ ui.label_masthead->setText(tr("MastHead background Image"));
+ }
+}
+
+void WireGroupExtra::on_removeButton_clicked()
+{
+ ui.label_masthead->setPicture(QPixmap());
+ ui.label_masthead->setText(tr("MastHead background Image"));
}
std::string WireGroupExtra::getTagline()
@@ -77,7 +95,5 @@ std::string WireGroupExtra::getLocation()
QPixmap WireGroupExtra::getMasthead()
{
- return mMasthead;
+ return ui.label_masthead->extractCroppedScaledPicture();
}
-
-
diff --git a/retroshare-gui/src/gui/TheWire/WireGroupExtra.h b/retroshare-gui/src/gui/TheWire/WireGroupExtra.h
index ce606feb3..429be088b 100644
--- a/retroshare-gui/src/gui/TheWire/WireGroupExtra.h
+++ b/retroshare-gui/src/gui/TheWire/WireGroupExtra.h
@@ -34,7 +34,6 @@ public:
void setMasthead(const QPixmap &pixmap);
QPixmap getMasthead();
-
void setTagline(const std::string &str);
void setLocation(const std::string &str);
@@ -43,7 +42,7 @@ public:
private slots:
void addMasthead();
-
+ void on_removeButton_clicked();
private:
void setUp();
private:
diff --git a/retroshare-gui/src/gui/TheWire/WireGroupExtra.ui b/retroshare-gui/src/gui/TheWire/WireGroupExtra.ui
index fb1da5e73..4c03b8fe8 100644
--- a/retroshare-gui/src/gui/TheWire/WireGroupExtra.ui
+++ b/retroshare-gui/src/gui/TheWire/WireGroupExtra.ui
@@ -7,7 +7,7 @@
0
0
516
- 199
+ 133
@@ -19,50 +19,127 @@
Form
-
+
+
+ 0
+
+
+ 0
+
-
-
-
- Masthead
-
-
-
- -
-
-
- MastHead background Image
-
-
+
+
-
+
+
+ -
+
+
+ Tagline:
+
+
+
+ -
+
+
+ -
+
+
+ Remove
+
+
+
+ -
+
+
+ Location:
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 10
+
+
+
+
+ -
+
+
+ Select Image
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ QFrame::Plain
+
+
+ 1
+
+
+ MastHead background Image
+
+
+ Qt::PlainText
+
+
+ false
+
+
+ Qt::AlignCenter
+
+
+
+
-
-
-
- Select Image
+
+
+ Qt::Vertical
-
-
- -
-
-
- Tagline:
+
+
+ 20
+ 10
+
-
-
- -
-
-
- -
-
-
- Location:
-
-
-
- -
-
+
+
+
+ ZoomableLabel
+ QLabel
+ gui/gxschannels/GxsChannelPostThumbnail.h
+
+
diff --git a/retroshare-gui/src/gui/TheWire/WireGroupItem.cpp b/retroshare-gui/src/gui/TheWire/WireGroupItem.cpp
index c8abe3886..199800581 100644
--- a/retroshare-gui/src/gui/TheWire/WireGroupItem.cpp
+++ b/retroshare-gui/src/gui/TheWire/WireGroupItem.cpp
@@ -92,14 +92,14 @@ void WireGroupItem::setup()
QImage circleImage = getCirclePhoto(orginalImage,orginalImage.size().width());
pixmap.convertFromImage(circleImage);
- pixmap = pixmap.scaled(40,40);
+ pixmap = pixmap.scaled(40,40, Qt::KeepAspectRatio, Qt::SmoothTransformation);
label_headshot->setPixmap(pixmap);
}
}
else
{
// default.
- QPixmap pixmap = FilesDefs::getPixmapFromQtResourcePath(":/icons/wire.png").scaled(32,32);
+ QPixmap pixmap = FilesDefs::getPixmapFromQtResourcePath(":/icons/wire.png").scaled(32,32, Qt::KeepAspectRatio, Qt::SmoothTransformation);
label_headshot->setPixmap(pixmap);
}
diff --git a/retroshare-gui/src/gui/icons/svg/wire-notify.svg b/retroshare-gui/src/gui/icons/svg/wire-notify.svg
new file mode 100644
index 000000000..7f380879c
--- /dev/null
+++ b/retroshare-gui/src/gui/icons/svg/wire-notify.svg
@@ -0,0 +1,55 @@
+
+
+
+
diff --git a/retroshare-gui/src/gui/icons/svg/wire.svg b/retroshare-gui/src/gui/icons/svg/wire.svg
new file mode 100644
index 000000000..9a8029016
--- /dev/null
+++ b/retroshare-gui/src/gui/icons/svg/wire.svg
@@ -0,0 +1,56 @@
+
+
+
+
diff --git a/retroshare-gui/src/gui/qss/stylesheet/Standard_Dark.qss b/retroshare-gui/src/gui/qss/stylesheet/Standard_Dark.qss
index ee320a012..7497440c5 100644
--- a/retroshare-gui/src/gui/qss/stylesheet/Standard_Dark.qss
+++ b/retroshare-gui/src/gui/qss/stylesheet/Standard_Dark.qss
@@ -2552,3 +2552,10 @@ OpModeStatus[opMode="Minimal"] {
[WrongValue="true"] {
background-color: #702020;
}
+
+/**** The Wire ****/
+
+QLabel#label_masthead{
+ border: 2px solid #CCCCCC;
+ border-radius: 4px;
+}
diff --git a/retroshare-gui/src/gui/qss/stylesheet/Standard_Light.qss b/retroshare-gui/src/gui/qss/stylesheet/Standard_Light.qss
index 923477e11..061ca0518 100644
--- a/retroshare-gui/src/gui/qss/stylesheet/Standard_Light.qss
+++ b/retroshare-gui/src/gui/qss/stylesheet/Standard_Light.qss
@@ -2687,6 +2687,11 @@ PulseReply QLabel#label_groupName{
color: #5b7083;
}
+QLabel#label_masthead{
+ border: 2px solid #CCCCCC;
+ border-radius: 4px;
+}
+
/**** PhotoShare ****/
AlbumItem QFrame#albumFrame {
border: 2px solid #CCCCCC;
diff --git a/retroshare-gui/src/qss/retroclassic.qss b/retroshare-gui/src/qss/retroclassic.qss
index 02da3c18f..df8802f3a 100644
--- a/retroshare-gui/src/qss/retroclassic.qss
+++ b/retroshare-gui/src/qss/retroclassic.qss
@@ -178,3 +178,9 @@ IdDialog QWidget#idTreeWidget {
selection-background-color: #9FCBFF;
show-decoration-selected: 1;
}
+
+/* Wire */
+QLabel#label_masthead{
+ border: 2px solid #CCCCCC;
+ border-radius: 4px;
+}