mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-27 00:19:25 -05:00
Merge remote-tracking branch 'upstream/master' into v0.6-CacheTests
This commit is contained in:
commit
a6010beab3
@ -258,8 +258,7 @@ int p3discovery2::handleIncoming()
|
|||||||
|
|
||||||
++nhandled;
|
++nhandled;
|
||||||
|
|
||||||
Dbg4() << __PRETTY_FUNCTION__ << " Received item: " << std::endl
|
Dbg4() << __PRETTY_FUNCTION__ << " Received item: " << *item << std::endl;
|
||||||
<< *item << std::endl;
|
|
||||||
|
|
||||||
if((contact = dynamic_cast<RsDiscContactItem *>(item)) != nullptr)
|
if((contact = dynamic_cast<RsDiscContactItem *>(item)) != nullptr)
|
||||||
{
|
{
|
||||||
@ -269,29 +268,25 @@ int p3discovery2::handleIncoming()
|
|||||||
processContactInfo(item->PeerId(), contact);
|
processContactInfo(item->PeerId(), contact);
|
||||||
}
|
}
|
||||||
else if( (gxsidlst = dynamic_cast<RsDiscIdentityListItem *>(item)) != nullptr )
|
else if( (gxsidlst = dynamic_cast<RsDiscIdentityListItem *>(item)) != nullptr )
|
||||||
{
|
|
||||||
recvIdentityList(item->PeerId(),gxsidlst->ownIdentityList);
|
recvIdentityList(item->PeerId(),gxsidlst->ownIdentityList);
|
||||||
delete item;
|
|
||||||
}
|
|
||||||
else if((pgpkey = dynamic_cast<RsDiscPgpKeyItem *>(item)) != nullptr)
|
else if((pgpkey = dynamic_cast<RsDiscPgpKeyItem *>(item)) != nullptr)
|
||||||
recvPGPCertificate(item->PeerId(), pgpkey);
|
recvPGPCertificate(item->PeerId(), pgpkey);
|
||||||
else if((pgpcert = dynamic_cast<RsDiscPgpCertItem *>(item)) != nullptr)
|
else if((pgpcert = dynamic_cast<RsDiscPgpCertItem *>(item)) != nullptr)
|
||||||
// sink
|
RsWarn() << "Received a deprecated RsDiscPgpCertItem. Will not be handled." << std::endl; // nothing to do.
|
||||||
delete pgpcert;
|
|
||||||
else if((pgplist = dynamic_cast<RsDiscPgpListItem *>(item)) != nullptr)
|
else if((pgplist = dynamic_cast<RsDiscPgpListItem *>(item)) != nullptr)
|
||||||
{
|
{
|
||||||
if (pgplist->mode == RsGossipDiscoveryPgpListMode::FRIENDS)
|
if (pgplist->mode == RsGossipDiscoveryPgpListMode::FRIENDS)
|
||||||
processPGPList(pgplist->PeerId(), pgplist);
|
processPGPList(pgplist->PeerId(), pgplist);
|
||||||
else if (pgplist->mode == RsGossipDiscoveryPgpListMode::GETCERT)
|
else if (pgplist->mode == RsGossipDiscoveryPgpListMode::GETCERT)
|
||||||
recvPGPCertificateRequest(pgplist->PeerId(), pgplist);
|
recvPGPCertificateRequest(pgplist->PeerId(), pgplist);
|
||||||
else delete item;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
RsWarn() << __PRETTY_FUNCTION__ << " Received unknown item type " << (int)item->PacketSubType() << "! " << std::endl ;
|
RsWarn() << __PRETTY_FUNCTION__ << " Received unknown item type " << (int)item->PacketSubType() << "! " << std::endl ;
|
||||||
RsWarn() << item << std::endl;
|
RsWarn() << item << std::endl;
|
||||||
delete item;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
delete item;
|
||||||
}
|
}
|
||||||
|
|
||||||
return nhandled;
|
return nhandled;
|
||||||
@ -350,8 +345,6 @@ void p3discovery2::sendOwnContactInfo(const RsPeerId &sslid)
|
|||||||
|
|
||||||
void p3discovery2::recvOwnContactInfo(const RsPeerId &fromId, const RsDiscContactItem *item)
|
void p3discovery2::recvOwnContactInfo(const RsPeerId &fromId, const RsDiscContactItem *item)
|
||||||
{
|
{
|
||||||
std::unique_ptr<const RsDiscContactItem> pitem(item); // ensures that item will be destroyed whichever door we leave through
|
|
||||||
|
|
||||||
#ifdef P3DISC_DEBUG
|
#ifdef P3DISC_DEBUG
|
||||||
std::cerr << "p3discovery2::recvOwnContactInfo()";
|
std::cerr << "p3discovery2::recvOwnContactInfo()";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
@ -678,7 +671,6 @@ void p3discovery2::processPGPList(const RsPeerId &fromId, const RsDiscPgpListIte
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// cleanup.
|
// cleanup.
|
||||||
delete item;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -716,9 +708,6 @@ void p3discovery2::processPGPList(const RsPeerId &fromId, const RsDiscPgpListIte
|
|||||||
|
|
||||||
it->second.mergeFriendList(item->pgpIdSet.ids);
|
it->second.mergeFriendList(item->pgpIdSet.ids);
|
||||||
updatePeers_locked(fromId);
|
updatePeers_locked(fromId);
|
||||||
|
|
||||||
// cleanup.
|
|
||||||
delete item;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -913,7 +902,6 @@ void p3discovery2::processContactInfo(const RsPeerId &fromId, const RsDiscContac
|
|||||||
if(sockaddr_storage_isExternalNet(item->currentConnectAddress.addr))
|
if(sockaddr_storage_isExternalNet(item->currentConnectAddress.addr))
|
||||||
mPeerMgr->addCandidateForOwnExternalAddress(item->PeerId(), item->currentConnectAddress.addr);
|
mPeerMgr->addCandidateForOwnExternalAddress(item->PeerId(), item->currentConnectAddress.addr);
|
||||||
|
|
||||||
delete item;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -942,7 +930,6 @@ void p3discovery2::processContactInfo(const RsPeerId &fromId, const RsDiscContac
|
|||||||
/* inform NetMgr that we know this peer */
|
/* inform NetMgr that we know this peer */
|
||||||
mNetMgr->netAssistKnownPeer(item->sslId, item->extAddrV4.addr, NETASSIST_KNOWN_PEER_FOF | NETASSIST_KNOWN_PEER_OFFLINE);
|
mNetMgr->netAssistKnownPeer(item->sslId, item->extAddrV4.addr, NETASSIST_KNOWN_PEER_FOF | NETASSIST_KNOWN_PEER_OFFLINE);
|
||||||
}
|
}
|
||||||
delete item;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -991,8 +978,6 @@ void p3discovery2::processContactInfo(const RsPeerId &fromId, const RsDiscContac
|
|||||||
|
|
||||||
if(should_notify_discovery)
|
if(should_notify_discovery)
|
||||||
RsServer::notify()->notifyDiscInfoChanged();
|
RsServer::notify()->notifyDiscInfoChanged();
|
||||||
|
|
||||||
delete item;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* we explictly request certificates, instead of getting them all the time
|
/* we explictly request certificates, instead of getting them all the time
|
||||||
@ -1041,8 +1026,6 @@ void p3discovery2::recvPGPCertificateRequest( const RsPeerId& fromId, const RsDi
|
|||||||
sendPGPCertificate(pgpId, fromId);
|
sendPGPCertificate(pgpId, fromId);
|
||||||
else
|
else
|
||||||
std::cerr << "(WW) not sending certificate " << pgpId << " asked by friend " << fromId << " because this either this cert is not a friend, or discovery is off" << std::endl;
|
std::cerr << "(WW) not sending certificate " << pgpId << " asked by friend " << fromId << " because this either this cert is not a friend, or discovery is off" << std::endl;
|
||||||
|
|
||||||
delete item;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1119,7 +1102,6 @@ void p3discovery2::recvPGPCertificate(const RsPeerId& fromId, RsDiscPgpKeyItem*
|
|||||||
#endif
|
#endif
|
||||||
// now that will add the key *and* set the skip_signature_validation flag at once
|
// now that will add the key *and* set the skip_signature_validation flag at once
|
||||||
rsPeers->loadPgpKeyFromBinaryData((unsigned char*)item->bin_data,item->bin_len, tmp_pgp_id,error_string); // no error should occur at this point because we called loadDetailsFromStringCert() already
|
rsPeers->loadPgpKeyFromBinaryData((unsigned char*)item->bin_data,item->bin_len, tmp_pgp_id,error_string); // no error should occur at this point because we called loadDetailsFromStringCert() already
|
||||||
delete item;
|
|
||||||
|
|
||||||
// Make sure we allow connections after the key is added. This is not the case otherwise. We only do that if the peer is non validated peer, since
|
// Make sure we allow connections after the key is added. This is not the case otherwise. We only do that if the peer is non validated peer, since
|
||||||
// otherwise the connection should already be accepted. This only happens when the short invite peer sends its own PGP key.
|
// otherwise the connection should already be accepted. This only happens when the short invite peer sends its own PGP key.
|
||||||
|
@ -121,9 +121,9 @@ class p3GxsTunnelService: public RsGxsTunnelService, public RsTurtleClientServic
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit p3GxsTunnelService(RsGixs *pids) ;
|
explicit p3GxsTunnelService(RsGixs *pids) ;
|
||||||
virtual void connectToTurtleRouter(p3turtle *) ;
|
virtual void connectToTurtleRouter(p3turtle *) override;
|
||||||
|
|
||||||
uint16_t serviceId() const { return RS_SERVICE_TYPE_GXS_TUNNEL ; }
|
uint16_t serviceId() const override { return RS_SERVICE_TYPE_GXS_TUNNEL ; }
|
||||||
|
|
||||||
// Creates the invite if the public key of the distant peer is available.
|
// Creates the invite if the public key of the distant peer is available.
|
||||||
// Om success, stores the invite in the map above, so that we can respond to tunnel requests.
|
// Om success, stores the invite in the map above, so that we can respond to tunnel requests.
|
||||||
@ -137,8 +137,8 @@ public:
|
|||||||
|
|
||||||
// derived from p3service
|
// derived from p3service
|
||||||
|
|
||||||
virtual int tick();
|
virtual int tick() override;
|
||||||
virtual RsServiceInfo getServiceInfo();
|
virtual RsServiceInfo getServiceInfo() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void flush() ;
|
void flush() ;
|
||||||
@ -147,15 +147,15 @@ private:
|
|||||||
class GxsTunnelPeerInfo
|
class GxsTunnelPeerInfo
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
GxsTunnelPeerInfo() : last_contact(0), last_keep_alive_sent(0), status(0), direction(0)
|
GxsTunnelPeerInfo()
|
||||||
|
: last_contact(0), last_keep_alive_sent(0), status(0), direction(0)
|
||||||
|
, total_sent(0), total_received(0)
|
||||||
#ifndef V07_NON_BACKWARD_COMPATIBLE_CHANGE_004
|
#ifndef V07_NON_BACKWARD_COMPATIBLE_CHANGE_004
|
||||||
, accepts_fast_turtle_items(false)
|
, accepts_fast_turtle_items(false)
|
||||||
|
, already_probed_for_fast_items(false)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
memset(aes_key, 0, GXS_TUNNEL_AES_KEY_SIZE);
|
memset(aes_key, 0, GXS_TUNNEL_AES_KEY_SIZE);
|
||||||
|
|
||||||
total_sent = 0 ;
|
|
||||||
total_received = 0 ;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
rstime_t last_contact ; // used to keep track of working connexion
|
rstime_t last_contact ; // used to keep track of working connexion
|
||||||
@ -213,10 +213,10 @@ private:
|
|||||||
|
|
||||||
// Overloaded from RsTurtleClientService
|
// Overloaded from RsTurtleClientService
|
||||||
|
|
||||||
virtual bool handleTunnelRequest(const RsFileHash &hash,const RsPeerId& peer_id) ;
|
virtual bool handleTunnelRequest(const RsFileHash &hash,const RsPeerId& peer_id) override;
|
||||||
virtual void receiveTurtleData(const RsTurtleGenericTunnelItem *item,const RsFileHash& hash,const RsPeerId& virtual_peer_id,RsTurtleGenericTunnelItem::Direction direction) ;
|
virtual void receiveTurtleData(const RsTurtleGenericTunnelItem *item,const RsFileHash& hash,const RsPeerId& virtual_peer_id,RsTurtleGenericTunnelItem::Direction direction) override;
|
||||||
void addVirtualPeer(const TurtleFileHash&, const TurtleVirtualPeerId&,RsTurtleGenericTunnelItem::Direction dir) ;
|
void addVirtualPeer(const TurtleFileHash&, const TurtleVirtualPeerId&,RsTurtleGenericTunnelItem::Direction dir) override;
|
||||||
void removeVirtualPeer(const TurtleFileHash&, const TurtleVirtualPeerId&) ;
|
void removeVirtualPeer(const TurtleFileHash&, const TurtleVirtualPeerId&) override;
|
||||||
|
|
||||||
// session handling handles
|
// session handling handles
|
||||||
|
|
||||||
|
@ -1864,6 +1864,8 @@ bool PGPHandler::locked_writePrivateTrustDatabase()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
PrivateTrustPacket trustpacket ;
|
PrivateTrustPacket trustpacket ;
|
||||||
|
/* Clear PrivateTrustPacket struct to suppress valgrind warnings due to the compiler extra padding*/
|
||||||
|
memset(&trustpacket, 0, sizeof(PrivateTrustPacket));
|
||||||
|
|
||||||
for( std::map<RsPgpId,PGPCertificateInfo>::iterator it =
|
for( std::map<RsPgpId,PGPCertificateInfo>::iterator it =
|
||||||
_public_keyring_map.begin(); it!=_public_keyring_map.end(); ++it )
|
_public_keyring_map.begin(); it!=_public_keyring_map.end(); ++it )
|
||||||
|
@ -1238,14 +1238,6 @@ int AuthSSLimpl::VerifyX509Callback(int /*preverify_ok*/, X509_STORE_CTX* ctx)
|
|||||||
|
|
||||||
RsErr() << __PRETTY_FUNCTION__ << " " << errMsg << std::endl;
|
RsErr() << __PRETTY_FUNCTION__ << " " << errMsg << std::endl;
|
||||||
|
|
||||||
// if(rsEvents)
|
|
||||||
// {
|
|
||||||
// ev->mErrorMsg = errMsg;
|
|
||||||
// ev->mErrorCode = RsAuthSslConnectionAutenticationEvent::NO_CERTIFICATE_SUPPLIED;
|
|
||||||
//
|
|
||||||
// rsEvents->postEvent(std::move(ev));
|
|
||||||
// }
|
|
||||||
|
|
||||||
return verificationFailed;
|
return verificationFailed;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1400,7 +1392,6 @@ int AuthSSLimpl::VerifyX509Callback(int /*preverify_ok*/, X509_STORE_CTX* ctx)
|
|||||||
return verificationFailed;
|
return verificationFailed;
|
||||||
}
|
}
|
||||||
|
|
||||||
//setCurrentConnectionAttemptInfo(pgpId, sslId, sslCn);
|
|
||||||
LocalStoreCert(x509Cert);
|
LocalStoreCert(x509Cert);
|
||||||
|
|
||||||
RsInfo() << __PRETTY_FUNCTION__ << " authentication successfull for "
|
RsInfo() << __PRETTY_FUNCTION__ << " authentication successfull for "
|
||||||
@ -1410,9 +1401,7 @@ int AuthSSLimpl::VerifyX509Callback(int /*preverify_ok*/, X509_STORE_CTX* ctx)
|
|||||||
return verificationSuccess;
|
return verificationSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AuthSSLimpl::parseX509DetailsFromFile(
|
bool AuthSSLimpl::parseX509DetailsFromFile( const std::string& certFilePath, RsPeerId& certId, RsPgpId& issuer, std::string& location )
|
||||||
const std::string& certFilePath, RsPeerId& certId,
|
|
||||||
RsPgpId& issuer, std::string& location )
|
|
||||||
{
|
{
|
||||||
FILE* tmpfp = RsDirUtil::rs_fopen(certFilePath.c_str(), "r");
|
FILE* tmpfp = RsDirUtil::rs_fopen(certFilePath.c_str(), "r");
|
||||||
if(!tmpfp)
|
if(!tmpfp)
|
||||||
@ -1433,10 +1422,13 @@ bool AuthSSLimpl::parseX509DetailsFromFile(
|
|||||||
}
|
}
|
||||||
|
|
||||||
uint32_t diagnostic = 0;
|
uint32_t diagnostic = 0;
|
||||||
|
|
||||||
if(!AuthX509WithGPG(x509,false, diagnostic))
|
if(!AuthX509WithGPG(x509,false, diagnostic))
|
||||||
{
|
{
|
||||||
RsErr() << __PRETTY_FUNCTION__ << " AuthX509WithGPG failed with "
|
RsErr() << __PRETTY_FUNCTION__ << " AuthX509WithGPG failed with "
|
||||||
<< "diagnostic: " << diagnostic << std::endl;
|
<< "diagnostic: " << diagnostic << std::endl;
|
||||||
|
|
||||||
|
X509_free(x509);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1805,7 +1797,8 @@ bool AuthSSLimpl::loadList(std::list<RsItem*>& load)
|
|||||||
for(it = load.begin(); it != load.end(); ++it) {
|
for(it = load.begin(); it != load.end(); ++it) {
|
||||||
RsConfigKeyValueSet *vitem = dynamic_cast<RsConfigKeyValueSet *>(*it);
|
RsConfigKeyValueSet *vitem = dynamic_cast<RsConfigKeyValueSet *>(*it);
|
||||||
|
|
||||||
if(vitem) {
|
if(vitem)
|
||||||
|
{
|
||||||
#ifdef AUTHSSL_DEBUG
|
#ifdef AUTHSSL_DEBUG
|
||||||
std::cerr << "AuthSSLimpl::loadList() General Variable Config Item:" << std::endl;
|
std::cerr << "AuthSSLimpl::loadList() General Variable Config Item:" << std::endl;
|
||||||
vitem->print(std::cerr, 10);
|
vitem->print(std::cerr, 10);
|
||||||
@ -1813,7 +1806,8 @@ bool AuthSSLimpl::loadList(std::list<RsItem*>& load)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::list<RsTlvKeyValue>::iterator kit;
|
std::list<RsTlvKeyValue>::iterator kit;
|
||||||
for(kit = vitem->tlvkvs.pairs.begin(); kit != vitem->tlvkvs.pairs.end(); ++kit) {
|
for(kit = vitem->tlvkvs.pairs.begin(); kit != vitem->tlvkvs.pairs.end(); ++kit)
|
||||||
|
{
|
||||||
if (RsPeerId(kit->key) == mOwnId) {
|
if (RsPeerId(kit->key) == mOwnId) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -1821,10 +1815,10 @@ bool AuthSSLimpl::loadList(std::list<RsItem*>& load)
|
|||||||
X509 *peer = loadX509FromPEM(kit->value);
|
X509 *peer = loadX509FromPEM(kit->value);
|
||||||
/* authenticate it */
|
/* authenticate it */
|
||||||
uint32_t diagnos ;
|
uint32_t diagnos ;
|
||||||
if (AuthX509WithGPG(peer,false,diagnos))
|
if (peer && AuthX509WithGPG(peer,false,diagnos))
|
||||||
{
|
|
||||||
LocalStoreCert(peer);
|
LocalStoreCert(peer);
|
||||||
}
|
|
||||||
|
X509_free(peer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
delete (*it);
|
delete (*it);
|
||||||
|
@ -2206,7 +2206,7 @@ bool p3MsgService::notifyGxsTransSendStatus( RsGxsTransId mailId,
|
|||||||
|
|
||||||
if( status == GxsTransSendStatus::RECEIPT_RECEIVED )
|
if( status == GxsTransSendStatus::RECEIPT_RECEIVED )
|
||||||
{
|
{
|
||||||
pEvent->mMailStatusEventCode = RsMailStatusEventCode::NEW_MESSAGE;
|
pEvent->mMailStatusEventCode = RsMailStatusEventCode::MESSAGE_RECEIVED_ACK;
|
||||||
uint32_t msg_id;
|
uint32_t msg_id;
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
#include "gui/common/AvatarDefs.h"
|
#include "gui/common/AvatarDefs.h"
|
||||||
#include "gui/common/FilesDefs.h"
|
#include "gui/common/FilesDefs.h"
|
||||||
#include "util/qtthreadsutils.h"
|
#include "util/qtthreadsutils.h"
|
||||||
|
#include "util/misc.h"
|
||||||
#include "gui/Circles/CreateCircleDialog.h"
|
#include "gui/Circles/CreateCircleDialog.h"
|
||||||
#include "gui/gxs/GxsIdDetails.h"
|
#include "gui/gxs/GxsIdDetails.h"
|
||||||
#include "gui/Identity/IdDialog.h"
|
#include "gui/Identity/IdDialog.h"
|
||||||
@ -53,24 +54,11 @@ CreateCircleDialog::CreateCircleDialog()
|
|||||||
/* Invoke the Qt Designer generated object setup routine */
|
/* Invoke the Qt Designer generated object setup routine */
|
||||||
ui.setupUi(this);
|
ui.setupUi(this);
|
||||||
|
|
||||||
|
setAttribute(Qt::WA_DeleteOnClose, false);
|
||||||
|
|
||||||
/* Setup Queue */
|
/* Setup Queue */
|
||||||
ui.headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/circles.png"));
|
ui.headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/circles.png"));
|
||||||
|
|
||||||
// connect up the buttons.
|
|
||||||
connect(ui.addButton, SIGNAL(clicked()), this, SLOT(addMember()));
|
|
||||||
connect(ui.removeButton, SIGNAL(clicked()), this, SLOT(removeMember()));
|
|
||||||
|
|
||||||
connect(ui.createButton, SIGNAL(clicked()), this, SLOT(createCircle()));
|
|
||||||
connect(ui.cancelButton, SIGNAL(clicked()), this, SLOT(close()));
|
|
||||||
|
|
||||||
connect(ui.treeWidget_membership, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), this, SLOT(selectedMember(QTreeWidgetItem*, QTreeWidgetItem*)));
|
|
||||||
connect(ui.treeWidget_IdList, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), this, SLOT(selectedId(QTreeWidgetItem*, QTreeWidgetItem*)));
|
|
||||||
|
|
||||||
connect(ui.treeWidget_IdList, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(IdListCustomPopupMenu(QPoint)));
|
|
||||||
connect(ui.treeWidget_membership, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(MembershipListCustomPopupMenu(QPoint)));
|
|
||||||
|
|
||||||
connect(ui.IdFilter, SIGNAL(textChanged(QString)), this, SLOT(filterChanged(QString)));
|
|
||||||
|
|
||||||
//connect(ui.toolButton_NewId, SIGNAL(clicked()), this, SLOT(createNewGxsId()));
|
//connect(ui.toolButton_NewId, SIGNAL(clicked()), this, SLOT(createNewGxsId()));
|
||||||
|
|
||||||
/* Add filter actions */
|
/* Add filter actions */
|
||||||
@ -88,15 +76,6 @@ CreateCircleDialog::CreateCircleDialog()
|
|||||||
ui.removeButton->setEnabled(false);
|
ui.removeButton->setEnabled(false);
|
||||||
ui.addButton->setEnabled(false);
|
ui.addButton->setEnabled(false);
|
||||||
ui.radioButton_ListAll->setChecked(true);
|
ui.radioButton_ListAll->setChecked(true);
|
||||||
|
|
||||||
QObject::connect(ui.radioButton_ListAll, SIGNAL(toggled(bool)), this, SLOT(idTypeChanged())) ;
|
|
||||||
QObject::connect(ui.radioButton_ListAllPGP, SIGNAL(toggled(bool)), this, SLOT(idTypeChanged())) ;
|
|
||||||
QObject::connect(ui.radioButton_ListFriendPGP, SIGNAL(toggled(bool)), this, SLOT(idTypeChanged())) ;
|
|
||||||
|
|
||||||
QObject::connect(ui.radioButton_Public, SIGNAL(toggled(bool)), this, SLOT(updateCircleType(bool))) ;
|
|
||||||
QObject::connect(ui.radioButton_Self, SIGNAL(toggled(bool)), this, SLOT(updateCircleType(bool))) ;
|
|
||||||
QObject::connect(ui.radioButton_Restricted, SIGNAL(toggled(bool)), this, SLOT(updateCircleType(bool))) ;
|
|
||||||
|
|
||||||
ui.radioButton_Public->setChecked(true) ;
|
ui.radioButton_Public->setChecked(true) ;
|
||||||
|
|
||||||
mIsExistingCircle = false;
|
mIsExistingCircle = false;
|
||||||
@ -107,9 +86,32 @@ CreateCircleDialog::CreateCircleDialog()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
ui.treeWidget_IdList->setColumnHidden(RSCIRCLEID_COL_KEYID,true); // no need to show this. the tooltip will do it.
|
ui.treeWidget_IdList->setColumnHidden(RSCIRCLEID_COL_KEYID,true); // no need to show this. the tooltip will do it.
|
||||||
|
|
||||||
//ui.idChooser->loadIds(0,RsGxsId());
|
|
||||||
ui.circleComboBox->loadCircles(RsGxsCircleId());
|
ui.circleComboBox->loadCircles(RsGxsCircleId());
|
||||||
|
ui.circleComboBox->hide();
|
||||||
|
|
||||||
|
// connect up the buttons.
|
||||||
|
connect(ui.addButton, SIGNAL(clicked()), this, SLOT(addMember()));
|
||||||
|
connect(ui.removeButton, SIGNAL(clicked()), this, SLOT(removeMember()));
|
||||||
|
|
||||||
|
connect(ui.createButton, SIGNAL(clicked()), this, SLOT(createCircle()));
|
||||||
|
connect(ui.cancelButton, SIGNAL(clicked()), this, SLOT(close()));
|
||||||
|
|
||||||
|
connect(ui.treeWidget_membership, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), this, SLOT(selectedMember(QTreeWidgetItem*, QTreeWidgetItem*)));
|
||||||
|
connect(ui.treeWidget_IdList, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), this, SLOT(selectedId(QTreeWidgetItem*, QTreeWidgetItem*)));
|
||||||
|
|
||||||
|
connect(ui.treeWidget_IdList, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(IdListCustomPopupMenu(QPoint)));
|
||||||
|
connect(ui.treeWidget_membership, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(MembershipListCustomPopupMenu(QPoint)));
|
||||||
|
|
||||||
|
connect(ui.IdFilter, SIGNAL(textChanged(QString)), this, SLOT(filterChanged(QString)));
|
||||||
|
|
||||||
|
|
||||||
|
QObject::connect(ui.radioButton_ListAll, SIGNAL(toggled(bool)), this, SLOT(idTypeChanged())) ;
|
||||||
|
QObject::connect(ui.radioButton_ListAllPGP, SIGNAL(toggled(bool)), this, SLOT(idTypeChanged())) ;
|
||||||
|
QObject::connect(ui.radioButton_ListFriendPGP, SIGNAL(toggled(bool)), this, SLOT(idTypeChanged())) ;
|
||||||
|
|
||||||
|
QObject::connect(ui.radioButton_Public, SIGNAL(toggled(bool)), this, SLOT(updateCircleType(bool))) ;
|
||||||
|
QObject::connect(ui.radioButton_Self, SIGNAL(toggled(bool)), this, SLOT(updateCircleType(bool))) ;
|
||||||
|
QObject::connect(ui.radioButton_Restricted, SIGNAL(toggled(bool)), this, SLOT(updateCircleType(bool))) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
CreateCircleDialog::~CreateCircleDialog()
|
CreateCircleDialog::~CreateCircleDialog()
|
||||||
@ -575,7 +577,7 @@ void CreateCircleDialog::updateCircleGUI()
|
|||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ui.circleName->setText(QString::fromUtf8(mCircleGroup.mMeta.mGroupName.c_str()));
|
whileBlocking(ui.circleName)->setText(QString::fromUtf8(mCircleGroup.mMeta.mGroupName.c_str()));
|
||||||
|
|
||||||
bool isExternal = true;
|
bool isExternal = true;
|
||||||
#ifdef DEBUG_CREATE_CIRCLE_DIALOG
|
#ifdef DEBUG_CREATE_CIRCLE_DIALOG
|
||||||
@ -583,9 +585,9 @@ void CreateCircleDialog::updateCircleGUI()
|
|||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ui.radioButton_Public->setChecked(false);
|
whileBlocking(ui.radioButton_Public)->setChecked(false);
|
||||||
ui.radioButton_Self->setChecked(false);
|
whileBlocking(ui.radioButton_Self)->setChecked(false);
|
||||||
ui.radioButton_Restricted->setChecked(false);
|
whileBlocking(ui.radioButton_Restricted)->setChecked(false);
|
||||||
|
|
||||||
switch(mCircleGroup.mMeta.mCircleType)
|
switch(mCircleGroup.mMeta.mCircleType)
|
||||||
{
|
{
|
||||||
@ -604,7 +606,7 @@ void CreateCircleDialog::updateCircleGUI()
|
|||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ui.radioButton_Public->setChecked(true);
|
whileBlocking(ui.radioButton_Public)->setChecked(true);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GXS_CIRCLE_TYPE_EXT_SELF:
|
case GXS_CIRCLE_TYPE_EXT_SELF:
|
||||||
@ -618,11 +620,11 @@ void CreateCircleDialog::updateCircleGUI()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (RsGxsGroupId(mCircleGroup.mMeta.mCircleId) == mCircleGroup.mMeta.mGroupId)
|
if (RsGxsGroupId(mCircleGroup.mMeta.mCircleId) == mCircleGroup.mMeta.mGroupId)
|
||||||
ui.radioButton_Self->setChecked(true);
|
whileBlocking(ui.radioButton_Self)->setChecked(true);
|
||||||
else
|
else
|
||||||
ui.radioButton_Restricted->setChecked(true);
|
whileBlocking(ui.radioButton_Restricted)->setChecked(true);
|
||||||
|
|
||||||
ui.circleComboBox->loadCircles(mCircleGroup.mMeta.mCircleId);
|
whileBlocking(ui.circleComboBox)->loadCircles(mCircleGroup.mMeta.mCircleId);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -696,6 +698,8 @@ void CreateCircleDialog::loadCircle(const RsGxsGroupId& groupId)
|
|||||||
|
|
||||||
void CreateCircleDialog::loadIdentities()
|
void CreateCircleDialog::loadIdentities()
|
||||||
{
|
{
|
||||||
|
std::cerr << "Loading identities..." << std::endl;
|
||||||
|
|
||||||
RsThread::async([this]()
|
RsThread::async([this]()
|
||||||
{
|
{
|
||||||
std::list<RsGroupMetaData> ids_meta;
|
std::list<RsGroupMetaData> ids_meta;
|
||||||
@ -707,23 +711,30 @@ void CreateCircleDialog::loadIdentities()
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::set<RsGxsId> ids;
|
std::set<RsGxsId> ids;
|
||||||
for(auto& meta:ids_meta) ids.insert(RsGxsId(meta.mGroupId));
|
for(auto& meta:ids_meta)
|
||||||
|
ids.insert(RsGxsId(meta.mGroupId));
|
||||||
|
|
||||||
|
// Needs a pointer on the heap, to pass to postToObject, otherwise it will get deleted before
|
||||||
|
// the posted method will actually run. Memory ownership is left to the posted method.
|
||||||
|
|
||||||
|
auto id_groups = new std::vector<RsGxsIdGroup>();
|
||||||
|
|
||||||
auto id_groups = std::make_unique<std::vector<RsGxsIdGroup>>();
|
|
||||||
if(!rsIdentity->getIdentitiesInfo(ids, *id_groups))
|
if(!rsIdentity->getIdentitiesInfo(ids, *id_groups))
|
||||||
{
|
{
|
||||||
RS_ERR("failed to retrieve identities group info for all identities");
|
RS_ERR("failed to retrieve identities group info for all identities");
|
||||||
|
delete id_groups;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
RsQThreadUtils::postToObject(
|
RsQThreadUtils::postToObject( [id_groups, this]()
|
||||||
[id_groups = std::move(id_groups), this]()
|
|
||||||
{
|
{
|
||||||
/* Here it goes any code you want to be executed on the Qt Gui
|
/* Here it goes any code you want to be executed on the Qt Gui
|
||||||
* thread, for example to update the data model with new information
|
* thread, for example to update the data model with new information
|
||||||
* after a blocking call to RetroShare API complete */
|
* after a blocking call to RetroShare API complete */
|
||||||
|
|
||||||
fillIdentitiesList(*id_groups);
|
fillIdentitiesList(*id_groups);
|
||||||
|
|
||||||
|
delete id_groups;
|
||||||
}, this );
|
}, this );
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -154,8 +154,8 @@ SearchDialog::SearchDialog(QWidget *parent)
|
|||||||
// To allow a proper sorting, be careful to pad at right with spaces. This
|
// To allow a proper sorting, be careful to pad at right with spaces. This
|
||||||
// is achieved by using QString("%1").arg(number,15,10).
|
// is achieved by using QString("%1").arg(number,15,10).
|
||||||
//
|
//
|
||||||
ui.searchResultWidget->setItemDelegateForColumn(SR_SIZE_COL, new RSHumanReadableSizeDelegate()) ;
|
ui.searchResultWidget->setItemDelegateForColumn(SR_SIZE_COL, mSizeColumnDelegate=new RSHumanReadableSizeDelegate()) ;
|
||||||
ui.searchResultWidget->setItemDelegateForColumn(SR_AGE_COL, new RSHumanReadableAgeDelegate()) ;
|
ui.searchResultWidget->setItemDelegateForColumn(SR_AGE_COL, mAgeColumnDelegate=new RSHumanReadableAgeDelegate()) ;
|
||||||
|
|
||||||
/* make it extended selection */
|
/* make it extended selection */
|
||||||
ui.searchResultWidget -> setSelectionMode(QAbstractItemView::ExtendedSelection);
|
ui.searchResultWidget -> setSelectionMode(QAbstractItemView::ExtendedSelection);
|
||||||
@ -225,12 +225,17 @@ SearchDialog::~SearchDialog()
|
|||||||
// save settings
|
// save settings
|
||||||
processSettings(false);
|
processSettings(false);
|
||||||
|
|
||||||
if (compareSummaryRole) {
|
if (compareSummaryRole)
|
||||||
delete(compareSummaryRole);
|
delete(compareSummaryRole);
|
||||||
}
|
|
||||||
if (compareResultRole) {
|
if (compareResultRole)
|
||||||
delete(compareResultRole);
|
delete(compareResultRole);
|
||||||
}
|
|
||||||
|
delete mSizeColumnDelegate;
|
||||||
|
delete mAgeColumnDelegate;
|
||||||
|
|
||||||
|
ui.searchResultWidget->setItemDelegateForColumn(SR_SIZE_COL, nullptr);
|
||||||
|
ui.searchResultWidget->setItemDelegateForColumn(SR_AGE_COL, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SearchDialog::processSettings(bool bLoad)
|
void SearchDialog::processSettings(bool bLoad)
|
||||||
|
@ -156,6 +156,9 @@ private:
|
|||||||
RSTreeWidgetItemCompareRole *compareSummaryRole;
|
RSTreeWidgetItemCompareRole *compareSummaryRole;
|
||||||
RSTreeWidgetItemCompareRole *compareResultRole;
|
RSTreeWidgetItemCompareRole *compareResultRole;
|
||||||
|
|
||||||
|
QAbstractItemDelegate *mAgeColumnDelegate;
|
||||||
|
QAbstractItemDelegate *mSizeColumnDelegate;
|
||||||
|
|
||||||
/* Color definitions (for standard see qss.default) */
|
/* Color definitions (for standard see qss.default) */
|
||||||
QColor mTextColorLocal;
|
QColor mTextColorLocal;
|
||||||
QColor mTextColorDownloading;
|
QColor mTextColorDownloading;
|
||||||
|
@ -1128,6 +1128,12 @@ TransfersDialog::~TransfersDialog()
|
|||||||
|
|
||||||
// save settings
|
// save settings
|
||||||
processSettings(false);
|
processSettings(false);
|
||||||
|
|
||||||
|
ui.uploadsList->setItemDelegate(nullptr);
|
||||||
|
ui.downloadList->setItemDelegate(nullptr);
|
||||||
|
|
||||||
|
delete ULDelegate;
|
||||||
|
delete DLDelegate;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TransfersDialog::activatePage(TransfersDialog::Page page)
|
void TransfersDialog::activatePage(TransfersDialog::Page page)
|
||||||
|
@ -505,16 +505,16 @@ void IdDialog::updateCircles()
|
|||||||
|
|
||||||
/* This can be big so use a smart pointer to just copy the pointer
|
/* This can be big so use a smart pointer to just copy the pointer
|
||||||
* instead of copying the whole list accross the lambdas */
|
* instead of copying the whole list accross the lambdas */
|
||||||
auto circle_metas = std::make_unique<std::list<RsGroupMetaData>>();
|
auto circle_metas = new std::list<RsGroupMetaData>();
|
||||||
|
|
||||||
if(!rsGxsCircles->getCirclesSummaries(*circle_metas))
|
if(!rsGxsCircles->getCirclesSummaries(*circle_metas))
|
||||||
{
|
{
|
||||||
RS_ERR("failed to retrieve circles group info list");
|
RS_ERR("failed to retrieve circles group info list");
|
||||||
|
delete circle_metas;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
RsQThreadUtils::postToObject(
|
RsQThreadUtils::postToObject( [circle_metas, this]()
|
||||||
[circle_metas = std::move(circle_metas), this]()
|
|
||||||
{
|
{
|
||||||
/* Here it goes any code you want to be executed on the Qt Gui
|
/* Here it goes any code you want to be executed on the Qt Gui
|
||||||
* thread, for example to update the data model with new information
|
* thread, for example to update the data model with new information
|
||||||
@ -522,6 +522,7 @@ void IdDialog::updateCircles()
|
|||||||
|
|
||||||
loadCircles(*circle_metas);
|
loadCircles(*circle_metas);
|
||||||
|
|
||||||
|
delete circle_metas;
|
||||||
}, this );
|
}, this );
|
||||||
|
|
||||||
});
|
});
|
||||||
@ -1316,17 +1317,19 @@ void IdDialog::updateIdList()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto ids_set = std::make_unique<std::map<RsGxsGroupId,RsGxsIdGroup>>();
|
auto ids_set = new std::map<RsGxsGroupId,RsGxsIdGroup>();
|
||||||
|
|
||||||
for(auto it(groups.begin()); it!=groups.end(); ++it)
|
for(auto it(groups.begin()); it!=groups.end(); ++it)
|
||||||
(*ids_set)[(*it).mMeta.mGroupId] = *it;
|
(*ids_set)[(*it).mMeta.mGroupId] = *it;
|
||||||
|
|
||||||
RsQThreadUtils::postToObject(
|
RsQThreadUtils::postToObject( [ids_set, this] ()
|
||||||
[ids_set = std::move(ids_set), this] ()
|
|
||||||
{
|
{
|
||||||
/* Here it goes any code you want to be executed on the Qt Gui
|
/* Here it goes any code you want to be executed on the Qt Gui
|
||||||
* thread, for example to update the data model with new information
|
* thread, for example to update the data model with new information
|
||||||
* after a blocking call to RetroShare API complete */
|
* after a blocking call to RetroShare API complete */
|
||||||
loadIdentities(*ids_set);
|
loadIdentities(*ids_set);
|
||||||
|
delete ids_set;
|
||||||
|
|
||||||
}, this );
|
}, this );
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -375,6 +375,9 @@ MainWindow::~MainWindow()
|
|||||||
delete soundStatus;
|
delete soundStatus;
|
||||||
delete toasterDisable;
|
delete toasterDisable;
|
||||||
delete sysTrayStatus;
|
delete sysTrayStatus;
|
||||||
|
delete trayIcon;
|
||||||
|
delete trayMenu;
|
||||||
|
delete notifyMenu;
|
||||||
#ifdef MESSENGER_WINDOW
|
#ifdef MESSENGER_WINDOW
|
||||||
MessengerWindow::releaseInstance();
|
MessengerWindow::releaseInstance();
|
||||||
#endif
|
#endif
|
||||||
@ -602,7 +605,7 @@ void MainWindow::displayDiskSpaceWarning(int loc,int size_limit_mb)
|
|||||||
void MainWindow::createTrayIcon()
|
void MainWindow::createTrayIcon()
|
||||||
{
|
{
|
||||||
/** Tray icon Menu **/
|
/** Tray icon Menu **/
|
||||||
QMenu *trayMenu = new QMenu(this);
|
trayMenu = new QMenu(this);
|
||||||
if (sysTrayStatus) sysTrayStatus->trayMenu = trayMenu;
|
if (sysTrayStatus) sysTrayStatus->trayMenu = trayMenu;
|
||||||
QObject::connect(trayMenu, SIGNAL(aboutToShow()), this, SLOT(updateMenu()));
|
QObject::connect(trayMenu, SIGNAL(aboutToShow()), this, SLOT(updateMenu()));
|
||||||
toggleVisibilityAction = trayMenu->addAction(QIcon(IMAGE_RETROSHARE), tr("Show/Hide"), this, SLOT(toggleVisibilitycontextmenu()));
|
toggleVisibilityAction = trayMenu->addAction(QIcon(IMAGE_RETROSHARE), tr("Show/Hide"), this, SLOT(toggleVisibilitycontextmenu()));
|
||||||
|
@ -284,6 +284,7 @@ private:
|
|||||||
|
|
||||||
QSystemTrayIcon *trayIcon;
|
QSystemTrayIcon *trayIcon;
|
||||||
QMenu *notifyMenu;
|
QMenu *notifyMenu;
|
||||||
|
QMenu *trayMenu;
|
||||||
QString notifyToolTip;
|
QString notifyToolTip;
|
||||||
QAction *toggleVisibilityAction, *toolAct;
|
QAction *toggleVisibilityAction, *toolAct;
|
||||||
QList<UserNotify*> userNotifyList;
|
QList<UserNotify*> userNotifyList;
|
||||||
|
@ -101,3 +101,8 @@ void PhotoView::copyMessageLink()
|
|||||||
QMessageBox::information(NULL,tr("information"),tr("The Retrohare link was copied to your clipboard.")) ;
|
QMessageBox::information(NULL,tr("information"),tr("The Retrohare link was copied to your clipboard.")) ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PhotoView::setGroupNameString(const QString& name)
|
||||||
|
{
|
||||||
|
ui->nameLabel->setText("@" + name);
|
||||||
|
}
|
||||||
|
@ -48,6 +48,7 @@ public slots:
|
|||||||
void setTime(const QString& text);
|
void setTime(const QString& text);
|
||||||
void setGroupId(const RsGxsGroupId &groupId);
|
void setGroupId(const RsGxsGroupId &groupId);
|
||||||
void setMessageId(const RsGxsMessageId& messageId);
|
void setMessageId(const RsGxsMessageId& messageId);
|
||||||
|
void setGroupNameString(const QString& name);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void copyMessageLink();
|
void copyMessageLink();
|
||||||
|
@ -699,7 +699,7 @@ PostedListWidgetWithModel::~PostedListWidgetWithModel()
|
|||||||
|
|
||||||
void PostedListWidgetWithModel::processSettings(bool load)
|
void PostedListWidgetWithModel::processSettings(bool load)
|
||||||
{
|
{
|
||||||
Settings->beginGroup(QString("ChannelPostsWidget"));
|
Settings->beginGroup(QString("BoardPostsWidget"));
|
||||||
|
|
||||||
if (load)
|
if (load)
|
||||||
{
|
{
|
||||||
|
@ -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,28 @@ 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 (group.mHeadshot.mData )
|
||||||
|
{
|
||||||
|
QPixmap pixmap;
|
||||||
|
if (GxsIdDetails::loadPixmapFromData(
|
||||||
|
group.mHeadshot.mData,
|
||||||
|
group.mHeadshot.mSize,
|
||||||
|
pixmap,GxsIdDetails::ORIGINAL))
|
||||||
|
{
|
||||||
|
pixmap = pixmap.scaled(50,50);
|
||||||
|
ui.headshot->setPixmap(pixmap);
|
||||||
|
ui.topheadshot->setPixmap(pixmap);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// default.
|
||||||
|
QPixmap pixmap = FilesDefs::getPixmapFromQtResourcePath(":/icons/wire.png").scaled(50,50);
|
||||||
|
ui.headshot->setPixmap(pixmap);
|
||||||
|
ui.topheadshot->setPixmap(pixmap);
|
||||||
|
}
|
||||||
|
|
||||||
mGroup = group;
|
mGroup = group;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,6 +89,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 +119,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 +127,36 @@ 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.textEdit_Pulse->setPlaceholderText(tr("Whats happening?"));
|
||||||
ui.frame_input->setVisible(true);
|
ui.frame_input->setVisible(true);
|
||||||
ui.widget_sentiment->setVisible(true);
|
ui.widget_sentiment->setVisible(true);
|
||||||
|
ui.pushButton_picture->show();
|
||||||
|
ui.topheadshot->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 +174,8 @@ 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();
|
||||||
|
ui.topheadshot->hide();
|
||||||
|
|
||||||
{
|
{
|
||||||
PulseReply *reply = new PulseReply(NULL, pPulse);
|
PulseReply *reply = new PulseReply(NULL, pPulse);
|
||||||
@ -151,7 +191,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 +201,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 +507,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"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -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.
|
||||||
|
@ -7,13 +7,19 @@
|
|||||||
<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="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<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">
|
||||||
@ -35,6 +41,9 @@
|
|||||||
<enum>QFrame::Raised</enum>
|
<enum>QFrame::Raised</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_4">
|
<layout class="QGridLayout" name="gridLayout_4">
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
@ -51,25 +60,18 @@
|
|||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Post From:</string>
|
<string>From:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="3">
|
||||||
<widget class="QLabel" name="label_groupName">
|
|
||||||
<property name="text">
|
|
||||||
<string>GroupLabel</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="2">
|
|
||||||
<widget class="GxsIdLabel" name="label_idName">
|
<widget class="GxsIdLabel" name="label_idName">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>IDLabel</string>
|
<string>IDLabel</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="3">
|
<item row="0" column="4">
|
||||||
<spacer name="horizontalSpacer">
|
<spacer name="horizontalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
@ -82,6 +84,35 @@
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<widget class="QLabel" name="label_groupName">
|
||||||
|
<property name="text">
|
||||||
|
<string>GroupLabel</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QLabel" name="topheadshot">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>32</width>
|
||||||
|
<height>32</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>32</width>
|
||||||
|
<height>32</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Head</string>
|
||||||
|
</property>
|
||||||
|
<property name="scaledContents">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -94,12 +125,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 +230,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 +245,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 +388,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">
|
||||||
|
@ -19,6 +19,8 @@
|
|||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
#include "PulseMessage.h"
|
#include "PulseMessage.h"
|
||||||
|
#include "gui/Posted/PhotoView.h"
|
||||||
|
#include "util/misc.h"
|
||||||
|
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
|
|
||||||
@ -26,6 +28,11 @@ PulseMessage::PulseMessage(QWidget *parent)
|
|||||||
:QWidget(parent)
|
:QWidget(parent)
|
||||||
{
|
{
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
|
|
||||||
|
connect(label_image1, SIGNAL(clicked()), this, SLOT(viewPicture()));
|
||||||
|
connect(label_image2, SIGNAL(clicked()), this, SLOT(viewPicture()));
|
||||||
|
connect(label_image3, SIGNAL(clicked()), this, SLOT(viewPicture()));
|
||||||
|
connect(label_image4, SIGNAL(clicked()), this, SLOT(viewPicture()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void PulseMessage::setup(RsWirePulseSPtr pulse)
|
void PulseMessage::setup(RsWirePulseSPtr pulse)
|
||||||
@ -34,6 +41,8 @@ void PulseMessage::setup(RsWirePulseSPtr pulse)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mPulse = pulse;
|
||||||
|
|
||||||
setMessage(QString::fromStdString(pulse->mPulseText));
|
setMessage(QString::fromStdString(pulse->mPulseText));
|
||||||
|
|
||||||
// show indent if republish (both RESPONSE or REF)
|
// show indent if republish (both RESPONSE or REF)
|
||||||
@ -139,3 +148,46 @@ void PulseMessage::setRefImageCount(uint32_t count)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PulseMessage::viewPicture()
|
||||||
|
{
|
||||||
|
PhotoView *photoView = new PhotoView(this);
|
||||||
|
|
||||||
|
if (!mPulse->mImage1.empty()) {
|
||||||
|
// install image.
|
||||||
|
QPixmap pixmap;
|
||||||
|
pixmap.loadFromData(mPulse->mImage1.mData, mPulse->mImage1.mSize);
|
||||||
|
photoView->setPixmap(pixmap);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!mPulse->mImage2.empty()) {
|
||||||
|
// install image.
|
||||||
|
QPixmap pixmap;
|
||||||
|
pixmap.loadFromData(mPulse->mImage2.mData, mPulse->mImage2.mSize);
|
||||||
|
photoView->setPixmap(pixmap);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!mPulse->mImage3.empty()) {
|
||||||
|
// install image.
|
||||||
|
QPixmap pixmap;
|
||||||
|
pixmap.loadFromData(mPulse->mImage3.mData, mPulse->mImage3.mSize);
|
||||||
|
photoView->setPixmap(pixmap);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!mPulse->mImage4.empty()) {
|
||||||
|
// install image.
|
||||||
|
QPixmap pixmap;
|
||||||
|
pixmap.loadFromData(mPulse->mImage4.mData, mPulse->mImage4.mSize);
|
||||||
|
photoView->setPixmap(pixmap);
|
||||||
|
}
|
||||||
|
|
||||||
|
QString timestamp = misc::timeRelativeToNow(mPulse->mRefPublishTs);
|
||||||
|
|
||||||
|
photoView->setTitle(QString::fromStdString(mPulse->mPulseText));
|
||||||
|
photoView->setGroupNameString(QString::fromStdString(mPulse->mRefGroupName));
|
||||||
|
photoView->setTime(timestamp);
|
||||||
|
//photoView->setGroupId(mPulse->mRefGroupId);
|
||||||
|
|
||||||
|
photoView->show();
|
||||||
|
|
||||||
|
/* window will destroy itself! */
|
||||||
|
}
|
||||||
|
@ -35,6 +35,13 @@ public:
|
|||||||
void setup(RsWirePulseSPtr pulse);
|
void setup(RsWirePulseSPtr pulse);
|
||||||
void setMessage(QString msg);
|
void setMessage(QString msg);
|
||||||
void setRefImageCount(uint32_t count);
|
void setRefImageCount(uint32_t count);
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void viewPicture();
|
||||||
|
|
||||||
|
private:
|
||||||
|
RsWirePulseSPtr mPulse;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -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>
|
||||||
@ -43,7 +49,14 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QTextBrowser" name="textBrowser"/>
|
<widget class="QTextBrowser" name="textBrowser">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>MS Sans Serif</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
<item row="1" column="1">
|
||||||
<widget class="QFrame" name="frame_expand">
|
<widget class="QFrame" name="frame_expand">
|
||||||
@ -55,13 +68,16 @@
|
|||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="label_image1">
|
<widget class="ClickableLabel" name="label_image1">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>128</width>
|
<width>128</width>
|
||||||
<height>128</height>
|
<height>128</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Click to view picture</string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Image</string>
|
<string>Image</string>
|
||||||
</property>
|
</property>
|
||||||
@ -71,13 +87,16 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QLabel" name="label_image2">
|
<widget class="ClickableLabel" name="label_image2">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>128</width>
|
<width>128</width>
|
||||||
<height>128</height>
|
<height>128</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Click to view picture</string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Image</string>
|
<string>Image</string>
|
||||||
</property>
|
</property>
|
||||||
@ -87,13 +106,16 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="label_image3">
|
<widget class="ClickableLabel" name="label_image3">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>128</width>
|
<width>128</width>
|
||||||
<height>128</height>
|
<height>128</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Click to view picture</string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Image</string>
|
<string>Image</string>
|
||||||
</property>
|
</property>
|
||||||
@ -103,13 +125,16 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
<item row="1" column="1">
|
||||||
<widget class="QLabel" name="label_image4">
|
<widget class="ClickableLabel" name="label_image4">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>128</width>
|
<width>128</width>
|
||||||
<height>128</height>
|
<height>128</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Click to view picture</string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Image</string>
|
<string>Image</string>
|
||||||
</property>
|
</property>
|
||||||
@ -123,6 +148,13 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>ClickableLabel</class>
|
||||||
|
<extends>QLabel</extends>
|
||||||
|
<header>util/ClickableLabel.h</header>
|
||||||
|
</customwidget>
|
||||||
|
</customwidgets>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
@ -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">
|
||||||
@ -64,6 +67,12 @@
|
|||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_10">
|
<layout class="QHBoxLayout" name="horizontalLayout_10">
|
||||||
|
<property name="topMargin">
|
||||||
|
<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">
|
||||||
@ -95,9 +104,18 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_2">
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>MS Sans Serif</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
<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>
|
||||||
@ -131,21 +149,11 @@
|
|||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer_8">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="toolButton_reply">
|
<widget class="QToolButton" name="toolButton_reply">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -158,6 +166,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 +220,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 +274,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 +328,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>
|
||||||
@ -419,6 +439,12 @@
|
|||||||
<layout class="QHBoxLayout" name="horizontalLayout_12">
|
<layout class="QHBoxLayout" name="horizontalLayout_12">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_authorName">
|
<widget class="QLabel" name="label_authorName">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>MS Sans Serif</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string><html><head/><body><p><span style=" font-weight:600;">Sidler</span></p></body></html></string>
|
<string><html><head/><body><p><span style=" font-weight:600;">Sidler</span></p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
@ -426,9 +452,20 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_groupName">
|
<widget class="QLabel" name="label_groupName">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Segoe UI</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string><html><head/><body><p><span style=" color:#555753;">@sidler_here</span></p></body></html></string>
|
<string><html><head/><body><p><span style=" color:#555753;">@sidler_here</span></p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="textInteractionFlags">
|
||||||
|
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -449,6 +486,12 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_date">
|
<widget class="QLabel" name="label_date">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>MS Sans Serif</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string><html><head/><body><p><span style=" color:#2e3436;">· Apr 13 ·</span></p></body></html></string>
|
<string><html><head/><body><p><span style=" color:#2e3436;">· Apr 13 ·</span></p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
@ -492,7 +535,14 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
<widget class="QWidget" name="widget" native="true">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_11">
|
<layout class="QHBoxLayout" name="horizontalLayout_11">
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer_16">
|
<spacer name="horizontalSpacer_16">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
@ -511,27 +561,17 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="Line" name="line_replyLine">
|
<widget class="Line" name="line_replyLine">
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Plain</enum>
|
||||||
|
</property>
|
||||||
|
<property name="lineWidth">
|
||||||
|
<number>5</number>
|
||||||
|
</property>
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="widget" native="true">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>1</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer_17">
|
<spacer name="horizontalSpacer_17">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
@ -549,6 +589,7 @@
|
|||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
@ -567,11 +608,29 @@
|
|||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_13">
|
<layout class="QHBoxLayout" name="horizontalLayout_13">
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_reference">
|
<widget class="QLabel" name="label_reference">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>MS Sans Serif</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string><html><head/><body><p><span style=" color:#555753;">Replying to @sidler</span></p></body></html></string>
|
<string><html><head/><body><p><span style=" color:#555753;">Replying to @sidler</span></p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
|
||||||
|
</property>
|
||||||
|
<property name="textInteractionFlags">
|
||||||
|
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
@ -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>
|
||||||
|
@ -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"));
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
// 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -22,14 +22,40 @@
|
|||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
#include <QBuffer>
|
#include <QBuffer>
|
||||||
|
#include <QPixmap>
|
||||||
|
#include <QImage>
|
||||||
|
#include <QSize>
|
||||||
|
#include <QPainter>
|
||||||
|
|
||||||
#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"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
static QImage getCirclePhoto(const QImage original, int sizePhoto)
|
||||||
|
{
|
||||||
|
QImage target(sizePhoto, sizePhoto, QImage::Format_ARGB32_Premultiplied);
|
||||||
|
target.fill(Qt::transparent);
|
||||||
|
|
||||||
|
QPainter painter(&target);
|
||||||
|
painter.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform);
|
||||||
|
painter.setBrush(QBrush(Qt::white));
|
||||||
|
auto scaledPhoto = original
|
||||||
|
.scaled(sizePhoto, sizePhoto, Qt::KeepAspectRatioByExpanding, Qt::SmoothTransformation)
|
||||||
|
.convertToFormat(QImage::Format_ARGB32_Premultiplied);
|
||||||
|
int margin = 0;
|
||||||
|
if (scaledPhoto.width() > sizePhoto) {
|
||||||
|
margin = (scaledPhoto.width() - sizePhoto) / 2;
|
||||||
|
}
|
||||||
|
painter.drawEllipse(0, 0, sizePhoto, sizePhoto);
|
||||||
|
painter.setCompositionMode(QPainter::CompositionMode_SourceIn);
|
||||||
|
painter.drawImage(0, 0, scaledPhoto, margin, 0);
|
||||||
|
return target;
|
||||||
|
}
|
||||||
|
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
|
|
||||||
WireGroupItem::WireGroupItem(WireGroupHolder *holder, const RsWireGroup &grp)
|
WireGroupItem::WireGroupItem(WireGroupHolder *holder, const RsWireGroup &grp)
|
||||||
@ -39,6 +65,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()
|
||||||
@ -60,7 +88,12 @@ void WireGroupItem::setup()
|
|||||||
mGroup.mHeadshot.mSize,
|
mGroup.mHeadshot.mSize,
|
||||||
pixmap,GxsIdDetails::ORIGINAL))
|
pixmap,GxsIdDetails::ORIGINAL))
|
||||||
{
|
{
|
||||||
pixmap = pixmap.scaled(32,32);
|
//make avatar as circle avatar
|
||||||
|
QImage orginalImage = pixmap.toImage();
|
||||||
|
QImage circleImage = getCirclePhoto(orginalImage,orginalImage.size().width());
|
||||||
|
pixmap.convertFromImage(circleImage);
|
||||||
|
|
||||||
|
pixmap = pixmap.scaled(40,40);
|
||||||
label_headshot->setPixmap(pixmap);
|
label_headshot->setPixmap(pixmap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -84,6 +117,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 +127,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 +211,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 ();
|
||||||
|
}
|
||||||
|
@ -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);
|
||||||
|
@ -35,14 +35,32 @@
|
|||||||
<enum>QFrame::Raised</enum>
|
<enum>QFrame::Raised</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_headshot">
|
<widget class="QLabel" name="label_headshot">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>32</width>
|
<width>40</width>
|
||||||
<height>32</height>
|
<height>40</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -55,6 +73,12 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_groupName">
|
<widget class="QLabel" name="label_groupName">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Segoe UI</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>WireGroupName</string>
|
<string>WireGroupName</string>
|
||||||
</property>
|
</property>
|
||||||
@ -136,6 +160,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>
|
||||||
|
@ -696,7 +696,7 @@ void ChatLobbyDialog::participantsTreeWidgetDoubleClicked(QTreeWidgetItem *item,
|
|||||||
|
|
||||||
if(column == COLUMN_NAME)
|
if(column == COLUMN_NAME)
|
||||||
{
|
{
|
||||||
getChatWidget()->pasteText("@" + RsHtml::plainText(item->text(COLUMN_NAME))) ;
|
getChatWidget()->pasteText("@" + RsHtml::plainText(item->text(COLUMN_NAME)) + " ") ;
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1842,13 +1842,16 @@ void ChatWidget::updateTitle()
|
|||||||
ui->titleLabel->setText(RsHtml::plainText(name) + "@" + RsHtml::plainText(title));
|
ui->titleLabel->setText(RsHtml::plainText(name) + "@" + RsHtml::plainText(title));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChatWidget::updatePeersCustomStateString(const QString& /*peer_id*/, const QString& /*status_string*/)
|
void ChatWidget::updatePeersCustomStateString(const QString& peer_id, const QString& status_string)
|
||||||
{
|
{
|
||||||
|
if (chatType() != CHATTYPE_PRIVATE )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
QString status_text;
|
QString status_text;
|
||||||
|
|
||||||
// TODO: fix peer_id and types and eveyrhing
|
if (RsPeerId(peer_id.toStdString()) == chatId.toPeerId()) {
|
||||||
/*
|
|
||||||
if (RsPeerId(peer_id.toStdString()) == peerId) {
|
|
||||||
// the peers status string has changed
|
// the peers status string has changed
|
||||||
if (status_string.isEmpty()) {
|
if (status_string.isEmpty()) {
|
||||||
ui->statusMessageLabel->hide();
|
ui->statusMessageLabel->hide();
|
||||||
@ -1863,7 +1866,6 @@ void ChatWidget::updatePeersCustomStateString(const QString& /*peer_id*/, const
|
|||||||
ui->statusLabel->setAlignment ( Qt::AlignVCenter );
|
ui->statusLabel->setAlignment ( Qt::AlignVCenter );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChatWidget::updateStatusString(const QString &statusMask, const QString &statusString, bool permanent)
|
void ChatWidget::updateStatusString(const QString &statusMask, const QString &statusString, bool permanent)
|
||||||
|
@ -256,17 +256,20 @@ void FriendSelectionWidget::loadIdentities()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto ids = std::make_unique<std::vector<RsGxsGroupId>>();
|
auto ids = new std::vector<RsGxsGroupId>();
|
||||||
for(auto& meta: ids_meta) ids->push_back(meta.mGroupId);
|
|
||||||
|
|
||||||
RsQThreadUtils::postToObject(
|
for(auto& meta: ids_meta)
|
||||||
[ids = std::move(ids), this]()
|
ids->push_back(meta.mGroupId);
|
||||||
|
|
||||||
|
RsQThreadUtils::postToObject( [ids, this]()
|
||||||
{
|
{
|
||||||
// We do that is the GUI thread. Dont try it on another thread!
|
// We do that is the GUI thread. Dont try it on another thread!
|
||||||
gxsIds = *ids;
|
gxsIds = *ids;
|
||||||
/* TODO: To furter optimize away a copy gxsIds could be a unique_ptr
|
/* TODO: To furter optimize away a copy gxsIds could be a unique_ptr
|
||||||
* too */
|
* too */
|
||||||
fillList();
|
fillList();
|
||||||
|
|
||||||
|
delete ids;
|
||||||
}, this );
|
}, this );
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -264,6 +264,8 @@ void NewFriendList::handleEvent(std::shared_ptr<const RsEvent> /*e*/)
|
|||||||
NewFriendList::~NewFriendList()
|
NewFriendList::~NewFriendList()
|
||||||
{
|
{
|
||||||
rsEvents->unregisterEventsHandler(mEventHandlerId);
|
rsEvents->unregisterEventsHandler(mEventHandlerId);
|
||||||
|
delete mModel;
|
||||||
|
delete mProxyModel;
|
||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -190,7 +190,7 @@ void PGPKeyDialog::load()
|
|||||||
ui.trustlevel_CB->hide();
|
ui.trustlevel_CB->hide();
|
||||||
|
|
||||||
ui.is_signing_me->hide();
|
ui.is_signing_me->hide();
|
||||||
ui.signersBox->setTitle(tr("This is your own PGP key, and it is signed by :")+" ");
|
ui.signersLabel->setText(tr("This is your own PGP key, and it is signed by :")+" ");
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -198,7 +198,7 @@ void PGPKeyDialog::load()
|
|||||||
ui.web_of_trust_label->show();
|
ui.web_of_trust_label->show();
|
||||||
ui.trustlevel_CB->show();
|
ui.trustlevel_CB->show();
|
||||||
ui.is_signing_me->show();
|
ui.is_signing_me->show();
|
||||||
ui.signersBox->setTitle(tr("This key is signed by :")+" ");
|
ui.signersLabel->setText(tr("This key is signed by :")+" ");
|
||||||
|
|
||||||
if (detail.accept_connection)
|
if (detail.accept_connection)
|
||||||
{
|
{
|
||||||
|
@ -7,33 +7,66 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>600</width>
|
<width>600</width>
|
||||||
<height>500</height>
|
<height>401</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Dialog</string>
|
<string>Retroshare profile</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_3">
|
<layout class="QGridLayout" name="gridLayout_4">
|
||||||
<item row="0" column="0">
|
<property name="leftMargin">
|
||||||
<widget class="HeaderFrame" name="headerFrame">
|
<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">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QFrame" name="frame">
|
||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
<enum>QFrame::NoFrame</enum>
|
<enum>QFrame::StyledPanel</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="frameShadow">
|
<property name="frameShadow">
|
||||||
<enum>QFrame::Plain</enum>
|
<enum>QFrame::Raised</enum>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="standardButtons">
|
||||||
|
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QTabWidget" name="stabWidget">
|
<widget class="QTabWidget" name="stabWidget">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>2</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tab">
|
<widget class="QWidget" name="tab">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Profile info</string>
|
<string>Profile info</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="verticalSpacing">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
<item>
|
<item>
|
||||||
@ -201,45 +234,16 @@ p, li { white-space: pre-wrap; }
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="is_signing_me">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>This profile has signed your own profile key</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QGroupBox" name="signersBox">
|
|
||||||
<property name="title">
|
|
||||||
<string>Key signatures :</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="_11">
|
|
||||||
<item>
|
|
||||||
<widget class="RSTextBrowser" name="signers">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string><html><head/><body><p><span style=" font-size:10pt;">Signing a friend's key is a way to express your trust into this friend, to your other friends. The signatures below cryptographically attest that owners of the listed keys recognise the current PGP key as authentic.</span></p></body></html></string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
<item row="3" column="0">
|
||||||
<layout class="QHBoxLayout" name="friendAndSignLayout">
|
<layout class="QHBoxLayout" name="friendAndSignLayout">
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="topMargin">
|
<property name="topMargin">
|
||||||
<number>6</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="rightMargin">
|
<property name="rightMargin">
|
||||||
<number>6</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="bottomMargin">
|
<property name="bottomMargin">
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
@ -317,6 +321,43 @@ p, li { white-space: pre-wrap; }
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="signersLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="RSTextBrowser" name="signers">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><html><head/><body><p><span style=" font-size:10pt;">Signing a friend's key is a way to express your trust into this friend, to your other friends. The signatures below cryptographically attest that owners of the listed keys recognise the current PGP key as authentic.</span></p></body></html></string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="is_signing_me">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>This profile has signed your own profile key</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="widget">
|
<widget class="QWidget" name="widget">
|
||||||
@ -471,13 +512,16 @@ p, li { white-space: pre-wrap; }
|
|||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
</layout>
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
</widget>
|
||||||
<property name="orientation">
|
</item>
|
||||||
<enum>Qt::Horizontal</enum>
|
<item row="1" column="0">
|
||||||
|
<widget class="HeaderFrame" name="headerFrame">
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::NoFrame</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="standardButtons">
|
<property name="frameShadow">
|
||||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
<enum>QFrame::Plain</enum>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -12,16 +12,16 @@
|
|||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout">
|
<layout class="QGridLayout">
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>0</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="topMargin">
|
<property name="topMargin">
|
||||||
<number>0</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="rightMargin">
|
<property name="rightMargin">
|
||||||
<number>0</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="bottomMargin">
|
<property name="bottomMargin">
|
||||||
<number>0</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QFrame" name="frame">
|
<widget class="QFrame" name="frame">
|
||||||
|
@ -127,14 +127,40 @@ CreateGxsForumMsg::CreateGxsForumMsg(const RsGxsGroupId &fId, const RsGxsMessage
|
|||||||
ui.generateCheckBox->hide();
|
ui.generateCheckBox->hide();
|
||||||
ui.generateSpinBox->hide();
|
ui.generateSpinBox->hide();
|
||||||
#endif
|
#endif
|
||||||
|
processSettings(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
CreateGxsForumMsg::~CreateGxsForumMsg()
|
CreateGxsForumMsg::~CreateGxsForumMsg()
|
||||||
{
|
{
|
||||||
|
processSettings(false);
|
||||||
delete(mForumQueue);
|
delete(mForumQueue);
|
||||||
delete(mCirclesQueue);
|
delete(mCirclesQueue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CreateGxsForumMsg::processSettings(bool load)
|
||||||
|
{
|
||||||
|
Settings->beginGroup(QString("ForumPostsWidget"));
|
||||||
|
|
||||||
|
if (load)
|
||||||
|
{
|
||||||
|
// state of ID Chooser combobox
|
||||||
|
RsGxsId gxs_id(Settings->value("IDChooser", QString::fromStdString(RsGxsId().toStdString())).toString().toStdString());
|
||||||
|
|
||||||
|
if(!gxs_id.isNull() && rsIdentity->isOwnId(gxs_id))
|
||||||
|
ui.idChooser->setChosenId(gxs_id);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// state of ID Chooser combobox
|
||||||
|
RsGxsId id;
|
||||||
|
|
||||||
|
if(ui.idChooser->getChosenId(id))
|
||||||
|
Settings->setValue("IDChooser", QString::fromStdString(id.toStdString()));
|
||||||
|
}
|
||||||
|
|
||||||
|
Settings->endGroup();
|
||||||
|
}
|
||||||
|
|
||||||
void CreateGxsForumMsg::newMsg()
|
void CreateGxsForumMsg::newMsg()
|
||||||
{
|
{
|
||||||
/* clear all */
|
/* clear all */
|
||||||
|
@ -59,6 +59,7 @@ protected:
|
|||||||
void closeEvent (QCloseEvent * event);
|
void closeEvent (QCloseEvent * event);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void processSettings(bool load);
|
||||||
void loadFormInformation();
|
void loadFormInformation();
|
||||||
|
|
||||||
void loadForumInfo(const uint32_t &token);
|
void loadForumInfo(const uint32_t &token);
|
||||||
|
@ -273,6 +273,7 @@ GxsForumThreadWidget::GxsForumThreadWidget(const RsGxsGroupId &forumId, QWidget
|
|||||||
connect(ui->versions_CB, SIGNAL(currentIndexChanged(int)), this, SLOT(changedVersion()));
|
connect(ui->versions_CB, SIGNAL(currentIndexChanged(int)), this, SLOT(changedVersion()));
|
||||||
connect(ui->threadTreeWidget, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(threadListCustomPopupMenu(QPoint)));
|
connect(ui->threadTreeWidget, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(threadListCustomPopupMenu(QPoint)));
|
||||||
connect(ui->postText, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextMenuTextBrowser(QPoint)));
|
connect(ui->postText, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextMenuTextBrowser(QPoint)));
|
||||||
|
connect(ui->forumName, SIGNAL(clicked()), this, SLOT(showForumInfo()));
|
||||||
|
|
||||||
ui->subscribeToolButton->hide() ;
|
ui->subscribeToolButton->hide() ;
|
||||||
connect(ui->subscribeToolButton, SIGNAL(subscribe(bool)), this, SLOT(subscribeGroup(bool)));
|
connect(ui->subscribeToolButton, SIGNAL(subscribe(bool)), this, SLOT(subscribeGroup(bool)));
|
||||||
@ -396,6 +397,13 @@ void GxsForumThreadWidget::handleEvent_main_thread(std::shared_ptr<const RsEvent
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GxsForumThreadWidget::showForumInfo()
|
||||||
|
{
|
||||||
|
mThreadId.clear();
|
||||||
|
ui->threadTreeWidget->selectionModel()->clear();
|
||||||
|
updateForumDescription(true);
|
||||||
|
}
|
||||||
|
|
||||||
void GxsForumThreadWidget::blank()
|
void GxsForumThreadWidget::blank()
|
||||||
{
|
{
|
||||||
ui->subscribeToolButton->hide();
|
ui->subscribeToolButton->hide();
|
||||||
|
@ -110,6 +110,7 @@ private slots:
|
|||||||
void threadListCustomPopupMenu(QPoint point);
|
void threadListCustomPopupMenu(QPoint point);
|
||||||
void contextMenuTextBrowser(QPoint point);
|
void contextMenuTextBrowser(QPoint point);
|
||||||
void headerContextMenuRequested(const QPoint& pos);
|
void headerContextMenuRequested(const QPoint& pos);
|
||||||
|
void showForumInfo();
|
||||||
|
|
||||||
void changedSelection(const QModelIndex &, const QModelIndex &);
|
void changedSelection(const QModelIndex &, const QModelIndex &);
|
||||||
void changedThread(QModelIndex index);
|
void changedThread(QModelIndex index);
|
||||||
|
@ -112,30 +112,15 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="ElidedLabel" name="forumName">
|
<widget class="QPushButton" name="forumName">
|
||||||
<property name="sizePolicy">
|
<property name="toolTip">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
<string><html><head/><body><p>Click here to clear current selected thread and display more information about this forum.</p></body></html></string>
|
||||||
<horstretch>2</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>1677215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string notr="true">Forum name</string>
|
<string>PushButton</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="textInteractionFlags">
|
<property name="flat">
|
||||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -532,16 +517,16 @@
|
|||||||
</action>
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
|
||||||
<class>LineEditClear</class>
|
|
||||||
<extends>QLineEdit</extends>
|
|
||||||
<header>gui/common/LineEditClear.h</header>
|
|
||||||
</customwidget>
|
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>RSTextBrowser</class>
|
<class>RSTextBrowser</class>
|
||||||
<extends>QTextBrowser</extends>
|
<extends>QTextBrowser</extends>
|
||||||
<header>gui/common/RSTextBrowser.h</header>
|
<header>gui/common/RSTextBrowser.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>LineEditClear</class>
|
||||||
|
<extends>QLineEdit</extends>
|
||||||
|
<header>gui/common/LineEditClear.h</header>
|
||||||
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>SubscribeToolButton</class>
|
<class>SubscribeToolButton</class>
|
||||||
<extends>QToolButton</extends>
|
<extends>QToolButton</extends>
|
||||||
@ -552,12 +537,6 @@
|
|||||||
<extends>QLabel</extends>
|
<extends>QLabel</extends>
|
||||||
<header>gui/gxs/GxsIdLabel.h</header>
|
<header>gui/gxs/GxsIdLabel.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
|
||||||
<class>ElidedLabel</class>
|
|
||||||
<extends>QLabel</extends>
|
|
||||||
<header location="global">gui/common/ElidedLabel.h</header>
|
|
||||||
<container>1</container>
|
|
||||||
</customwidget>
|
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>RSImageBlockWidget</class>
|
<class>RSImageBlockWidget</class>
|
||||||
<extends>QWidget</extends>
|
<extends>QWidget</extends>
|
||||||
@ -566,8 +545,8 @@
|
|||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../icons.qrc"/>
|
|
||||||
<include location="../images.qrc"/>
|
<include location="../images.qrc"/>
|
||||||
|
<include location="../icons.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
@ -92,7 +92,7 @@ void ImHistoryBrowserCreateItemsThread::run()
|
|||||||
|
|
||||||
/** Default constructor */
|
/** Default constructor */
|
||||||
ImHistoryBrowser::ImHistoryBrowser(const ChatId &chatId, QTextEdit *edit,const QString &chatTitle, QWidget *parent)
|
ImHistoryBrowser::ImHistoryBrowser(const ChatId &chatId, QTextEdit *edit,const QString &chatTitle, QWidget *parent)
|
||||||
: QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint)
|
: QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint)
|
||||||
{
|
{
|
||||||
/* Invoke Qt Designer generated QObject setup routine */
|
/* Invoke Qt Designer generated QObject setup routine */
|
||||||
ui.setupUi(this);
|
ui.setupUi(this);
|
||||||
|
@ -219,7 +219,11 @@ MessageComposer::MessageComposer(QWidget *parent, Qt::WindowFlags flags)
|
|||||||
/* initialize friends list */
|
/* initialize friends list */
|
||||||
ui.friendSelectionWidget->setHeaderText(tr("Send To:"));
|
ui.friendSelectionWidget->setHeaderText(tr("Send To:"));
|
||||||
ui.friendSelectionWidget->setModus(FriendSelectionWidget::MODUS_MULTI);
|
ui.friendSelectionWidget->setModus(FriendSelectionWidget::MODUS_MULTI);
|
||||||
ui.friendSelectionWidget->setShowType(FriendSelectionWidget::SHOW_GXS);
|
ui.friendSelectionWidget->setShowType(FriendSelectionWidget::SHOW_GXS
|
||||||
|
#ifdef RS_DIRECT_CHAT
|
||||||
|
| FriendSelectionWidget::SHOW_SSL
|
||||||
|
#endif // RS_DIRECT_CHAT
|
||||||
|
);
|
||||||
ui.friendSelectionWidget->start();
|
ui.friendSelectionWidget->start();
|
||||||
|
|
||||||
QActionGroup *grp = new QActionGroup(this);
|
QActionGroup *grp = new QActionGroup(this);
|
||||||
@ -265,6 +269,9 @@ MessageComposer::MessageComposer(QWidget *parent, Qt::WindowFlags flags)
|
|||||||
/* Add filter types */
|
/* Add filter types */
|
||||||
ui.filterComboBox->addItem(tr("All people"));
|
ui.filterComboBox->addItem(tr("All people"));
|
||||||
ui.filterComboBox->addItem(tr("My contacts"));
|
ui.filterComboBox->addItem(tr("My contacts"));
|
||||||
|
#ifdef RS_DIRECT_CHAT
|
||||||
|
ui.filterComboBox->addItem(tr("Friend Nodes"));
|
||||||
|
#endif // RS_DIRECT_CHAT
|
||||||
ui.filterComboBox->setCurrentIndex(0);
|
ui.filterComboBox->setCurrentIndex(0);
|
||||||
|
|
||||||
if(rsIdentity->nbRegularContacts() > 0)
|
if(rsIdentity->nbRegularContacts() > 0)
|
||||||
@ -1056,8 +1063,25 @@ MessageComposer *MessageComposer::newMsg(const std::string &msgId /* = ""*/)
|
|||||||
|
|
||||||
QString MessageComposer::buildReplyHeader(const MessageInfo &msgInfo)
|
QString MessageComposer::buildReplyHeader(const MessageInfo &msgInfo)
|
||||||
{
|
{
|
||||||
RetroShareLink link = RetroShareLink::createMessage(msgInfo.rspeerid_srcId, "");
|
RetroShareLink link;
|
||||||
QString from = link.toHtml();
|
|
||||||
|
QString from;
|
||||||
|
if(msgInfo.msgflags & RS_MSG_DISTANT)
|
||||||
|
{
|
||||||
|
link = RetroShareLink::createMessage(msgInfo.rsgxsid_srcId, "");
|
||||||
|
if (link.valid())
|
||||||
|
{
|
||||||
|
from += link.toHtml();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
link = RetroShareLink::createMessage(msgInfo.rspeerid_srcId, "");
|
||||||
|
if (link.valid())
|
||||||
|
{
|
||||||
|
from += link.toHtml();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
QString to;
|
QString to;
|
||||||
for ( std::set<RsPeerId>::const_iterator it = msgInfo.rspeerid_msgto.begin(); it != msgInfo.rspeerid_msgto.end(); ++it)
|
for ( std::set<RsPeerId>::const_iterator it = msgInfo.rspeerid_msgto.begin(); it != msgInfo.rspeerid_msgto.end(); ++it)
|
||||||
@ -2608,6 +2632,11 @@ void MessageComposer::filterComboBoxChanged(int i)
|
|||||||
case 1:
|
case 1:
|
||||||
ui.friendSelectionWidget->setShowType(FriendSelectionWidget::SHOW_CONTACTS);
|
ui.friendSelectionWidget->setShowType(FriendSelectionWidget::SHOW_CONTACTS);
|
||||||
break;
|
break;
|
||||||
|
#ifdef RS_DIRECT_CHAT
|
||||||
|
case 2:
|
||||||
|
ui.friendSelectionWidget->setShowType(FriendSelectionWidget::SHOW_SSL);
|
||||||
|
break;
|
||||||
|
#endif // RS_DIRECT_CHAT
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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;
|
||||||
@ -228,7 +228,7 @@ PulseAddDialog QPushButton#pushButton_Post:disabled {
|
|||||||
|
|
||||||
/* Forums */
|
/* Forums */
|
||||||
|
|
||||||
GxsForumThreadWidget QLabel#forumName
|
GxsForumThreadWidget QPushButton#forumName
|
||||||
{
|
{
|
||||||
font: bold;
|
font: bold;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
@ -1109,3 +1109,34 @@ PulseTopLevel QFrame#frame, PulseViewGroup QFrame#frame, PulseReply QFrame#frame
|
|||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
background: white;
|
background: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PulseAddDialog QTextEdit#textEdit_Pulse {
|
||||||
|
border: 2px solid #7ecbfb;
|
||||||
|
border-radius: 6px;
|
||||||
|
background: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
PulseAddDialog QFrame#frame_input, QFrame#frame_reply, QFrame#frame {
|
||||||
|
border: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
PulseAddDialog QLabel#label_groupName {
|
||||||
|
font-size: 12pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
PulseReply #line_replyLine , PulseMessage #line{
|
||||||
|
color: #7ecbfb;
|
||||||
|
}
|
||||||
|
|
||||||
|
PulseReply QLabel#label_groupName{
|
||||||
|
color: #5b7083;
|
||||||
|
}
|
||||||
|
|
||||||
|
WireDialog QLabel#label_viewMode {
|
||||||
|
font-size: 12pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
WireGroupDialog QFrame#frame {
|
||||||
|
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #9BDBF9, stop:1 #1592CD);
|
||||||
|
border: 0px;
|
||||||
|
}
|
||||||
|
@ -42,8 +42,6 @@ BandwidthStatsWidget::BandwidthStatsWidget(QWidget *parent)
|
|||||||
ui.unit_CB->addItem(tr("KB/s")) ;
|
ui.unit_CB->addItem(tr("KB/s")) ;
|
||||||
ui.unit_CB->addItem(tr("Count")) ;
|
ui.unit_CB->addItem(tr("Count")) ;
|
||||||
|
|
||||||
ui.logScale_CB->setChecked(true) ;
|
|
||||||
|
|
||||||
ui.bwgraph_BW->setSelector(BWGraphSource::SELECTOR_TYPE_FRIEND,BWGraphSource::GRAPH_TYPE_SUM) ;
|
ui.bwgraph_BW->setSelector(BWGraphSource::SELECTOR_TYPE_FRIEND,BWGraphSource::GRAPH_TYPE_SUM) ;
|
||||||
ui.bwgraph_BW->setSelector(BWGraphSource::SELECTOR_TYPE_SERVICE,BWGraphSource::GRAPH_TYPE_SUM) ;
|
ui.bwgraph_BW->setSelector(BWGraphSource::SELECTOR_TYPE_SERVICE,BWGraphSource::GRAPH_TYPE_SUM) ;
|
||||||
ui.bwgraph_BW->setUnit(BWGraphSource::UNIT_KILOBYTES) ;
|
ui.bwgraph_BW->setUnit(BWGraphSource::UNIT_KILOBYTES) ;
|
||||||
|
@ -192,7 +192,7 @@ BwCtrlWindow::BwCtrlWindow(QWidget *parent)
|
|||||||
/* Set header resize modes and initial section sizes Peer TreeView*/
|
/* Set header resize modes and initial section sizes Peer TreeView*/
|
||||||
QHeaderView * _header = bwTreeWidget->header () ;
|
QHeaderView * _header = bwTreeWidget->header () ;
|
||||||
// _header->resizeSection ( COLUMN_RSNAME, 170*fact );
|
// _header->resizeSection ( COLUMN_RSNAME, 170*fact );
|
||||||
QHeaderView_setSectionResizeMode(_header, QHeaderView::ResizeToContents);
|
QHeaderView_setSectionResizeMode(_header, QHeaderView::Interactive);
|
||||||
}
|
}
|
||||||
|
|
||||||
BwCtrlWindow::~BwCtrlWindow()
|
BwCtrlWindow::~BwCtrlWindow()
|
||||||
|
@ -109,7 +109,7 @@ void DhtWindow::updateDisplay()
|
|||||||
|
|
||||||
RsAutoUpdatePage::unlockAllEvents() ;
|
RsAutoUpdatePage::unlockAllEvents() ;
|
||||||
|
|
||||||
QHeaderView_setSectionResizeMode(ui.peerTreeWidget->header(), QHeaderView::ResizeToContents);
|
//QHeaderView_setSectionResizeMode(ui.peerTreeWidget->header(), QHeaderView::ResizeToContents);
|
||||||
QHeaderView_setSectionResizeMode(ui.dhtTreeWidget->header(), QHeaderView::ResizeToContents);
|
QHeaderView_setSectionResizeMode(ui.dhtTreeWidget->header(), QHeaderView::ResizeToContents);
|
||||||
QHeaderView_setSectionResizeMode(ui.relayTreeWidget->header(), QHeaderView::ResizeToContents);
|
QHeaderView_setSectionResizeMode(ui.relayTreeWidget->header(), QHeaderView::ResizeToContents);
|
||||||
}
|
}
|
||||||
|
@ -203,6 +203,8 @@ void GlobalRouterStatistics::updateContent()
|
|||||||
item -> setData(COL_DUPLICATION_FACTOR, Qt::DisplayRole, QString::number(cache_infos[i].duplication_factor));
|
item -> setData(COL_DUPLICATION_FACTOR, Qt::DisplayRole, QString::number(cache_infos[i].duplication_factor));
|
||||||
item -> setData(COL_RECEIVEDTIME, Qt::DisplayRole, QString::number(now - cache_infos[i].routing_time));
|
item -> setData(COL_RECEIVEDTIME, Qt::DisplayRole, QString::number(now - cache_infos[i].routing_time));
|
||||||
item -> setData(COL_SENDTIME, Qt::DisplayRole, QString::number(now - cache_infos[i].last_sent_time));
|
item -> setData(COL_SENDTIME, Qt::DisplayRole, QString::number(now - cache_infos[i].last_sent_time));
|
||||||
|
|
||||||
|
item->setTextAlignment(COL_DATASIZE, Qt::AlignRight );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -464,17 +464,16 @@ void GxsTransportStatistics::loadGroups()
|
|||||||
#ifdef DEBUG_FORUMS
|
#ifdef DEBUG_FORUMS
|
||||||
std::cerr << "Retrieving post data for post " << mThreadId << std::endl;
|
std::cerr << "Retrieving post data for post " << mThreadId << std::endl;
|
||||||
#endif
|
#endif
|
||||||
auto stats = std::make_unique<
|
auto stats = new std::map<RsGxsGroupId,RsGxsTransGroupStatistics>();
|
||||||
std::map<RsGxsGroupId,RsGxsTransGroupStatistics> >();
|
|
||||||
|
|
||||||
if(!rsGxsTrans->getGroupStatistics(*stats))
|
if(!rsGxsTrans->getGroupStatistics(*stats))
|
||||||
{
|
{
|
||||||
RS_ERR("Cannot retrieve group statistics in GxsTransportStatistics");
|
RS_ERR("Cannot retrieve group statistics in GxsTransportStatistics");
|
||||||
|
delete stats;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
RsQThreadUtils::postToObject(
|
RsQThreadUtils::postToObject( [stats, this]()
|
||||||
[stats = std::move(stats), this]()
|
|
||||||
{
|
{
|
||||||
/* Here it goes any code you want to be executed on the Qt Gui
|
/* Here it goes any code you want to be executed on the Qt Gui
|
||||||
* thread, for example to update the data model with new information
|
* thread, for example to update the data model with new information
|
||||||
@ -485,6 +484,7 @@ void GxsTransportStatistics::loadGroups()
|
|||||||
updateContent();
|
updateContent();
|
||||||
mStateHelper->setLoading(GXSTRANS_GROUP_META, false);
|
mStateHelper->setLoading(GXSTRANS_GROUP_META, false);
|
||||||
|
|
||||||
|
delete stats;
|
||||||
}, this );
|
}, this );
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -121,7 +121,7 @@ RttStatisticsGraph::RttStatisticsGraph(QWidget *parent)
|
|||||||
|
|
||||||
src->setCollectionTimeLimit(10*60*1000) ; // 10 mins
|
src->setCollectionTimeLimit(10*60*1000) ; // 10 mins
|
||||||
src->setCollectionTimePeriod(1000) ; // collect every second
|
src->setCollectionTimePeriod(1000) ; // collect every second
|
||||||
src->setDigits(1) ;
|
src->setDigits(3) ;
|
||||||
src->start() ;
|
src->start() ;
|
||||||
|
|
||||||
setSource(src) ;
|
setSource(src) ;
|
||||||
|
@ -1969,7 +1969,7 @@ GxsChannelPostItem > QFrame#mainFrame[new=true] {
|
|||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
GxsForumThreadWidget QLabel#forumName
|
GxsForumThreadWidget QPushButton#forumName
|
||||||
{
|
{
|
||||||
qproperty-fontSizeFactor: 140;
|
qproperty-fontSizeFactor: 140;
|
||||||
color: #0099cc;
|
color: #0099cc;
|
||||||
@ -2277,3 +2277,11 @@ PulseTopLevel QFrame#frame, PulseViewGroup QFrame#frame, PulseReply QFrame#frame
|
|||||||
MainWindow QListWidget {
|
MainWindow QListWidget {
|
||||||
font-size: 12pt;
|
font-size: 12pt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ChatLobbyWidget QTreeWidget#lobbyTreeWidget{
|
||||||
|
font-size: 10pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
NewFriendList QTreeView#peerTreeWidget {
|
||||||
|
font-size: 12pt;
|
||||||
|
}
|
||||||
|
@ -1373,7 +1373,7 @@ PostedCreatePostDialog QPushButton#submitButton:hover {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GxsForumThreadWidget QLabel#forumName
|
GxsForumThreadWidget QPushButton#forumName
|
||||||
{
|
{
|
||||||
qproperty-fontSizeFactor: 140;
|
qproperty-fontSizeFactor: 140;
|
||||||
color: #0099cc;
|
color: #0099cc;
|
||||||
@ -1498,3 +1498,11 @@ PulseTopLevel QFrame#frame, PulseViewGroup QFrame#frame, PulseReply QFrame#frame
|
|||||||
MainWindow QListWidget {
|
MainWindow QListWidget {
|
||||||
font-size: 12pt;
|
font-size: 12pt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ChatLobbyWidget QTreeWidget#lobbyTreeWidget{
|
||||||
|
font-size: 10pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
NewFriendList QTreeView#peerTreeWidget {
|
||||||
|
font-size: 12pt;
|
||||||
|
}
|
||||||
|
@ -305,7 +305,7 @@ QPixmap misc::getOpenThumbnailedPicture(QWidget *parent, const QString &caption,
|
|||||||
{
|
{
|
||||||
// Let the user choose an picture file
|
// Let the user choose an picture file
|
||||||
QString fileName;
|
QString fileName;
|
||||||
if (!getOpenFileName(parent, RshareSettings::LASTDIR_IMAGES, caption, tr("Pictures (*.png *.jpeg *.xpm *.jpg *.tiff *.gif)"), fileName))
|
if (!getOpenFileName(parent, RshareSettings::LASTDIR_IMAGES, caption, tr("Pictures (*.png *.jpeg *.xpm *.jpg *.tiff *.gif *.webp)"), fileName))
|
||||||
return QPixmap();
|
return QPixmap();
|
||||||
|
|
||||||
if(width > 0 && height > 0)
|
if(width > 0 && height > 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user