mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-11-29 11:56:37 -05:00
Added for Channel Message composer a Image Attach button
Added for Channel Message composer a Image Attach button Added a Combobox for Sort in Posted links easyer with new icons Messengerwindow changed the button icons & display on status the status icon too.
This commit is contained in:
parent
2fc0c643ef
commit
6750e6140f
17 changed files with 503 additions and 176 deletions
|
|
@ -24,9 +24,11 @@
|
|||
#include <QMenu>
|
||||
#include <QDir>
|
||||
#include <QMimeData>
|
||||
#include <QTextDocumentFragment>
|
||||
|
||||
#include "CreateGxsChannelMsg.h"
|
||||
#include "gui/feeds/SubFileItem.h"
|
||||
#include "gui/settings/rsharesettings.h"
|
||||
#include "gui/RetroShareLink.h"
|
||||
#include "util/HandleRichText.h"
|
||||
#include "util/misc.h"
|
||||
|
|
@ -66,7 +68,8 @@ CreateGxsChannelMsg::CreateGxsChannelMsg(const RsGxsGroupId &cId, RsGxsMessageId
|
|||
connect(buttonBox, SIGNAL(rejected()), this, SLOT(cancelMsg()));
|
||||
|
||||
connect(addFileButton, SIGNAL(clicked() ), this , SLOT(addExtraFile()));
|
||||
connect(addfilepushButton, SIGNAL(clicked() ), this , SLOT(addExtraFile()));
|
||||
connect(addfilepushButton, SIGNAL(clicked() ), this , SLOT(addExtraFile()));
|
||||
connect(imageButton, SIGNAL(clicked()), this, SLOT(addImage()));
|
||||
connect(addThumbnailButton, SIGNAL(clicked() ), this , SLOT(addThumbnail()));
|
||||
connect(thumbNailCb, SIGNAL(toggled(bool)), this, SLOT(allowAutoMediaThumbNail(bool)));
|
||||
connect(tabWidget, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextMenu(QPoint)));
|
||||
|
|
@ -821,3 +824,17 @@ void CreateGxsChannelMsg::loadRequest(const TokenQueue *queue, const TokenReques
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CreateGxsChannelMsg::addImage()
|
||||
{
|
||||
QString file;
|
||||
if (misc::getOpenFileName(this, RshareSettings::LASTDIR_IMAGES, tr("Choose Image"), tr("Image Files supported (*.png *.jpeg *.jpg *.gif *.webp)"), file)) {
|
||||
QString encodedImage;
|
||||
if (RsHtml::makeEmbeddedImage(file, encodedImage, 640*480)) {
|
||||
QTextDocumentFragment fragment = QTextDocumentFragment::fromHtml(encodedImage);
|
||||
msgEdit->append("\n\n\n\n\n");
|
||||
msgEdit->textCursor().insertFragment(fragment);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ private slots:
|
|||
|
||||
void addThumbnail();
|
||||
void allowAutoMediaThumbNail(bool);
|
||||
void addImage();
|
||||
|
||||
private:
|
||||
void loadChannelInfo(const uint32_t &token);
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@
|
|||
</item>
|
||||
<item row="1" column="0">
|
||||
<layout class="QGridLayout" name="channelAttachGLayout">
|
||||
<item row="0" column="0" colspan="2">
|
||||
<item row="0" column="0" colspan="4">
|
||||
<widget class="QLabel" name="channelAttachLabel">
|
||||
<property name="text">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
|
|
@ -118,9 +118,15 @@ p, li { white-space: pre-wrap; }
|
|||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/add-share24.png</normaloff>:/images/add-share24.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="addThumbnailButton">
|
||||
<property name="text">
|
||||
<string>Add Channel Thumbnail</string>
|
||||
|
|
@ -129,6 +135,29 @@ p, li { white-space: pre-wrap; }
|
|||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/add_image24.png</normaloff>:/images/add_image24.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="imageButton">
|
||||
<property name="text">
|
||||
<string>Attach Picture</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/add_image24.png</normaloff>:/images/add_image24.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
|
@ -302,8 +331,8 @@ p, li { white-space: pre-wrap; }
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>767</width>
|
||||
<height>42</height>
|
||||
<width>63</width>
|
||||
<height>24</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
|
|
@ -390,17 +419,17 @@ p, li { white-space: pre-wrap; }
|
|||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>MimeTextEdit</class>
|
||||
<extends>QTextEdit</extends>
|
||||
<header location="global">gui/common/MimeTextEdit.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>HeaderFrame</class>
|
||||
<extends>QFrame</extends>
|
||||
<header>gui/common/HeaderFrame.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"/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue