mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-24 22:30:42 -04:00
Switch PhotoService to use GxsComments
WIP improvements to PhotoService: - switch p3photoservice to use gxcommentservice - clean out old RsPhotoComment classes - redesign PhotoDialog to use standard GxsCommentService classes - remove unneeded old Comment classes from GUI - fix indenting for PhotoDialog and p3photoservice.h - fix layout issue in Extra Widgets for GxsGroupDialog
This commit is contained in:
parent
01b39bfe63
commit
fe62dc1345
16 changed files with 484 additions and 1210 deletions
|
@ -25,8 +25,10 @@
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <list>
|
#include <list>
|
||||||
#include "rsgxsservice.h"
|
#include "retroshare/rsgxsservice.h"
|
||||||
#include "rsgxscommon.h"
|
#include "retroshare/rsgxscommon.h"
|
||||||
|
#include "retroshare/rsgxsifacehelper.h"
|
||||||
|
|
||||||
|
|
||||||
/* The Main Interface Class - for information about your Peers */
|
/* The Main Interface Class - for information about your Peers */
|
||||||
class RsPhoto;
|
class RsPhoto;
|
||||||
|
@ -135,30 +137,13 @@ class RsPhotoAlbum
|
||||||
uint32_t mModFlags;
|
uint32_t mModFlags;
|
||||||
};
|
};
|
||||||
|
|
||||||
class RsGxsPhotoCommentItem;
|
|
||||||
class RsPhotoComment
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
RsPhotoComment();
|
|
||||||
|
|
||||||
explicit RsPhotoComment(const RsGxsPhotoCommentItem& comment);
|
|
||||||
|
|
||||||
RsPhotoComment& operator=(const RsGxsPhotoCommentItem& comment);
|
|
||||||
|
|
||||||
RsMsgMetaData mMeta;
|
|
||||||
|
|
||||||
std::string mComment;
|
|
||||||
uint32_t mCommentFlag;
|
|
||||||
};
|
|
||||||
|
|
||||||
std::ostream &operator<<(std::ostream &out, const RsPhotoPhoto &photo);
|
std::ostream &operator<<(std::ostream &out, const RsPhotoPhoto &photo);
|
||||||
std::ostream &operator<<(std::ostream &out, const RsPhotoAlbum &album);
|
std::ostream &operator<<(std::ostream &out, const RsPhotoAlbum &album);
|
||||||
|
|
||||||
typedef std::map<RsGxsGroupId, std::vector<RsPhotoPhoto> > PhotoResult;
|
typedef std::map<RsGxsGroupId, std::vector<RsPhotoPhoto> > PhotoResult;
|
||||||
typedef std::map<RsGxsGroupId, std::vector<RsPhotoComment> > PhotoCommentResult;
|
|
||||||
typedef std::map<RsGxsGrpMsgIdPair, std::vector<RsPhotoComment> > PhotoRelatedCommentResult;
|
|
||||||
|
|
||||||
class RsPhoto
|
class RsPhoto: public RsGxsIfaceHelper, public RsGxsCommentService
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -168,7 +153,7 @@ public:
|
||||||
static const uint32_t FLAG_MSG_TYPE_MASK;
|
static const uint32_t FLAG_MSG_TYPE_MASK;
|
||||||
|
|
||||||
|
|
||||||
RsPhoto() { return; }
|
explicit RsPhoto(RsGxsIface &gxs) : RsGxsIfaceHelper(gxs) { return; }
|
||||||
|
|
||||||
virtual ~RsPhoto() { return; }
|
virtual ~RsPhoto() { return; }
|
||||||
|
|
||||||
|
@ -235,7 +220,7 @@ public:
|
||||||
virtual bool getMsgSummary(const uint32_t &token,
|
virtual bool getMsgSummary(const uint32_t &token,
|
||||||
MsgMetaResult &msgInfo) = 0;
|
MsgMetaResult &msgInfo) = 0;
|
||||||
|
|
||||||
/* Specific Service Data */
|
/* Specific Service Data */
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @param token token to be redeemed for album request
|
* @param token token to be redeemed for album request
|
||||||
|
@ -252,22 +237,6 @@ public:
|
||||||
virtual bool getPhoto(const uint32_t &token,
|
virtual bool getPhoto(const uint32_t &token,
|
||||||
PhotoResult &photo) = 0;
|
PhotoResult &photo) = 0;
|
||||||
|
|
||||||
/* details are updated in album - to choose Album ID, and storage path */
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* @param token token to be redeemed for photo request
|
|
||||||
* @param photo the photo returned for given request token
|
|
||||||
* @return false if request token is invalid, check token status for error report
|
|
||||||
*/
|
|
||||||
virtual bool getPhotoComment(const uint32_t &token,
|
|
||||||
PhotoCommentResult& comments) = 0;
|
|
||||||
/*!
|
|
||||||
* @param token token to be redeemed for photo request
|
|
||||||
* @param photo the photo returned for given request token
|
|
||||||
* @return false if request token is invalid, check token status for error report
|
|
||||||
*/
|
|
||||||
virtual bool getPhotoRelatedComment(const uint32_t &token, PhotoRelatedCommentResult &comments) = 0;
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* submits album, which returns a token that needs
|
* submits album, which returns a token that needs
|
||||||
* to be acknowledge to get album grp id
|
* to be acknowledge to get album grp id
|
||||||
|
@ -284,16 +253,6 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual bool submitPhoto(uint32_t& token, RsPhotoPhoto &photo) = 0;
|
virtual bool submitPhoto(uint32_t& token, RsPhotoPhoto &photo) = 0;
|
||||||
|
|
||||||
/*!
|
|
||||||
* submits photo comment, which returns a token that needs
|
|
||||||
* to be acknowledged to get photo msg-grp id pair
|
|
||||||
* The mParentId needs to be set to an existing msg for which
|
|
||||||
* commenting is enabled
|
|
||||||
* @param token token to redeem for acknowledgement
|
|
||||||
* @param comment comment to be submitted
|
|
||||||
*/
|
|
||||||
virtual bool submitComment(uint32_t& token, RsPhotoComment &photo) = 0;
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* subscribes to group, and returns token which can be used
|
* subscribes to group, and returns token which can be used
|
||||||
* to be acknowledged to get group Id
|
* to be acknowledged to get group Id
|
||||||
|
|
|
@ -33,11 +33,10 @@ RsItem *RsGxsPhotoSerialiser::create_item(uint16_t service, uint8_t item_sub_id)
|
||||||
|
|
||||||
switch(item_sub_id)
|
switch(item_sub_id)
|
||||||
{
|
{
|
||||||
case RS_PKT_SUBTYPE_PHOTO_COMMENT_ITEM: return new RsGxsPhotoCommentItem() ;
|
|
||||||
case RS_PKT_SUBTYPE_PHOTO_SHOW_ITEM: return new RsGxsPhotoPhotoItem() ;
|
case RS_PKT_SUBTYPE_PHOTO_SHOW_ITEM: return new RsGxsPhotoPhotoItem() ;
|
||||||
case RS_PKT_SUBTYPE_PHOTO_ITEM: return new RsGxsPhotoAlbumItem() ;
|
case RS_PKT_SUBTYPE_PHOTO_ITEM: return new RsGxsPhotoAlbumItem() ;
|
||||||
default:
|
default:
|
||||||
return NULL ;
|
return RsGxsCommentSerialiser::create_item(service,item_sub_id) ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,11 +67,6 @@ void RsGxsPhotoPhotoItem::serial_process(RsGenericSerializer::SerializeJob j,RsG
|
||||||
|
|
||||||
photo.mThumbnail.serial_process(j, ctx);
|
photo.mThumbnail.serial_process(j, ctx);
|
||||||
}
|
}
|
||||||
void RsGxsPhotoCommentItem::serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx)
|
|
||||||
{
|
|
||||||
RsTypeSerializer::serial_process (j,ctx,TLV_TYPE_STR_COMMENT,comment.mComment,"mComment");
|
|
||||||
RsTypeSerializer::serial_process<uint32_t>(j,ctx,comment.mCommentFlag,"mCommentFlag");
|
|
||||||
}
|
|
||||||
|
|
||||||
void RsGxsPhotoAlbumItem::clear()
|
void RsGxsPhotoAlbumItem::clear()
|
||||||
{
|
{
|
||||||
|
@ -88,12 +82,6 @@ void RsGxsPhotoAlbumItem::clear()
|
||||||
album.mThumbnail.clear();
|
album.mThumbnail.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void RsGxsPhotoCommentItem::clear()
|
|
||||||
{
|
|
||||||
comment.mComment.clear();
|
|
||||||
comment.mCommentFlag = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void RsGxsPhotoPhotoItem::clear()
|
void RsGxsPhotoPhotoItem::clear()
|
||||||
{
|
{
|
||||||
photo.mCaption.clear();
|
photo.mCaption.clear();
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
|
|
||||||
#include "rsitems/rsserviceids.h"
|
#include "rsitems/rsserviceids.h"
|
||||||
#include "rsitems/rsgxsitems.h"
|
#include "rsitems/rsgxsitems.h"
|
||||||
|
#include "rsitems/rsgxscommentitems.h"
|
||||||
|
|
||||||
#include "serialiser/rsserial.h"
|
#include "serialiser/rsserial.h"
|
||||||
#include "serialiser/rsserializer.h"
|
#include "serialiser/rsserializer.h"
|
||||||
|
@ -34,7 +35,6 @@
|
||||||
|
|
||||||
const uint8_t RS_PKT_SUBTYPE_PHOTO_ITEM = 0x02;
|
const uint8_t RS_PKT_SUBTYPE_PHOTO_ITEM = 0x02;
|
||||||
const uint8_t RS_PKT_SUBTYPE_PHOTO_SHOW_ITEM = 0x03;
|
const uint8_t RS_PKT_SUBTYPE_PHOTO_SHOW_ITEM = 0x03;
|
||||||
const uint8_t RS_PKT_SUBTYPE_PHOTO_COMMENT_ITEM = 0x04;
|
|
||||||
|
|
||||||
class RsGxsPhotoAlbumItem : public RsGxsGrpItem
|
class RsGxsPhotoAlbumItem : public RsGxsGrpItem
|
||||||
{
|
{
|
||||||
|
@ -66,24 +66,11 @@ public:
|
||||||
RsPhotoPhoto photo;
|
RsPhotoPhoto photo;
|
||||||
};
|
};
|
||||||
|
|
||||||
class RsGxsPhotoCommentItem : public RsGxsMsgItem
|
class RsGxsPhotoSerialiser : public RsGxsCommentSerialiser
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
RsGxsPhotoCommentItem(): RsGxsMsgItem(RS_SERVICE_GXS_TYPE_PHOTO, RS_PKT_SUBTYPE_PHOTO_COMMENT_ITEM) {}
|
RsGxsPhotoSerialiser() :RsGxsCommentSerialiser(RS_SERVICE_GXS_TYPE_PHOTO) {}
|
||||||
virtual ~RsGxsPhotoCommentItem() {}
|
|
||||||
void clear();
|
|
||||||
|
|
||||||
virtual void serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx);
|
|
||||||
|
|
||||||
RsPhotoComment comment;
|
|
||||||
};
|
|
||||||
|
|
||||||
class RsGxsPhotoSerialiser : public RsServiceSerializer
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
RsGxsPhotoSerialiser() :RsServiceSerializer(RS_SERVICE_GXS_TYPE_PHOTO) {}
|
|
||||||
virtual ~RsGxsPhotoSerialiser() {}
|
virtual ~RsGxsPhotoSerialiser() {}
|
||||||
|
|
||||||
virtual RsItem *create_item(uint16_t service, uint8_t item_sub_id) const;
|
virtual RsItem *create_item(uint16_t service, uint8_t item_sub_id) const;
|
||||||
|
|
|
@ -42,18 +42,6 @@ RsPhotoAlbum::RsPhotoAlbum()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
RsPhotoComment::RsPhotoComment()
|
|
||||||
: mComment(""), mCommentFlag(0) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
RsPhotoComment::RsPhotoComment(const RsGxsPhotoCommentItem &comment)
|
|
||||||
: mComment(""), mCommentFlag(0) {
|
|
||||||
|
|
||||||
*this = comment.comment;
|
|
||||||
(*this).mMeta = comment.meta;
|
|
||||||
|
|
||||||
}
|
|
||||||
std::ostream &operator<<(std::ostream &out, const RsPhotoPhoto &photo)
|
std::ostream &operator<<(std::ostream &out, const RsPhotoPhoto &photo)
|
||||||
{
|
{
|
||||||
out << "RsPhotoPhoto [ ";
|
out << "RsPhotoPhoto [ ";
|
||||||
|
@ -62,7 +50,6 @@ std::ostream &operator<<(std::ostream &out, const RsPhotoPhoto &photo)
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::ostream &operator<<(std::ostream &out, const RsPhotoAlbum &album)
|
std::ostream &operator<<(std::ostream &out, const RsPhotoAlbum &album)
|
||||||
{
|
{
|
||||||
out << "RsPhotoAlbum [ ";
|
out << "RsPhotoAlbum [ ";
|
||||||
|
@ -73,8 +60,10 @@ std::ostream &operator<<(std::ostream &out, const RsPhotoAlbum &album)
|
||||||
|
|
||||||
p3PhotoService::p3PhotoService(RsGeneralDataService* gds, RsNetworkExchangeService* nes, RsGixs* gixs)
|
p3PhotoService::p3PhotoService(RsGeneralDataService* gds, RsNetworkExchangeService* nes, RsGixs* gixs)
|
||||||
: RsGenExchange(gds, nes, new RsGxsPhotoSerialiser(), RS_SERVICE_GXS_TYPE_PHOTO, gixs, photoAuthenPolicy()),
|
: RsGenExchange(gds, nes, new RsGxsPhotoSerialiser(), RS_SERVICE_GXS_TYPE_PHOTO, gixs, photoAuthenPolicy()),
|
||||||
|
RsPhoto(static_cast<RsGxsIface&>(*this)),
|
||||||
mPhotoMutex(std::string("Photo Mutex"))
|
mPhotoMutex(std::string("Photo Mutex"))
|
||||||
{
|
{
|
||||||
|
mCommentService = new p3GxsCommentService(this, RS_SERVICE_GXS_TYPE_PHOTO);
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string GXS_PHOTO_APP_NAME = "gxsphoto";
|
const std::string GXS_PHOTO_APP_NAME = "gxsphoto";
|
||||||
|
@ -93,8 +82,6 @@ RsServiceInfo p3PhotoService::getServiceInfo()
|
||||||
GXS_PHOTO_MIN_MINOR_VERSION);
|
GXS_PHOTO_MIN_MINOR_VERSION);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
uint32_t p3PhotoService::photoAuthenPolicy()
|
uint32_t p3PhotoService::photoAuthenPolicy()
|
||||||
{
|
{
|
||||||
uint32_t policy = 0;
|
uint32_t policy = 0;
|
||||||
|
@ -124,11 +111,10 @@ bool p3PhotoService::updated()
|
||||||
|
|
||||||
void p3PhotoService::service_tick()
|
void p3PhotoService::service_tick()
|
||||||
{
|
{
|
||||||
|
mCommentService->comment_tick();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void p3PhotoService::groupsChanged(std::list<RsGxsGroupId>& grpIds)
|
void p3PhotoService::groupsChanged(std::list<RsGxsGroupId>& grpIds)
|
||||||
{
|
{
|
||||||
RsStackMutex stack(mPhotoMutex);
|
RsStackMutex stack(mPhotoMutex);
|
||||||
|
@ -267,54 +253,6 @@ bool p3PhotoService::getPhoto(const uint32_t& token, PhotoResult& photos)
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool p3PhotoService::getPhotoComment(const uint32_t &token, PhotoCommentResult &comments)
|
|
||||||
{
|
|
||||||
GxsMsgDataMap msgData;
|
|
||||||
bool ok = RsGenExchange::getMsgData(token, msgData);
|
|
||||||
|
|
||||||
if(ok)
|
|
||||||
{
|
|
||||||
GxsMsgDataMap::iterator mit = msgData.begin();
|
|
||||||
|
|
||||||
for(; mit != msgData.end(); ++mit)
|
|
||||||
{
|
|
||||||
RsGxsGroupId grpId = mit->first;
|
|
||||||
std::vector<RsGxsMsgItem*>& msgItems = mit->second;
|
|
||||||
std::vector<RsGxsMsgItem*>::iterator vit = msgItems.begin();
|
|
||||||
|
|
||||||
for(; vit != msgItems.end(); ++vit)
|
|
||||||
{
|
|
||||||
RsGxsPhotoCommentItem* item = dynamic_cast<RsGxsPhotoCommentItem*>(*vit);
|
|
||||||
|
|
||||||
if(item)
|
|
||||||
{
|
|
||||||
RsPhotoComment comment = item->comment;
|
|
||||||
comment.mMeta = item->meta;
|
|
||||||
comments[grpId].push_back(comment);
|
|
||||||
delete item;
|
|
||||||
}else
|
|
||||||
{
|
|
||||||
std::cerr << "Not a comment Item, deleting!" << std::endl;
|
|
||||||
delete *vit;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return ok;
|
|
||||||
}
|
|
||||||
|
|
||||||
RsPhotoComment& RsPhotoComment::operator=(const RsGxsPhotoCommentItem& comment)
|
|
||||||
{
|
|
||||||
*this = comment.comment;
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool p3PhotoService::getPhotoRelatedComment(const uint32_t &token, PhotoRelatedCommentResult &comments)
|
|
||||||
{
|
|
||||||
return RsGenExchange::getMsgRelatedDataT<RsGxsPhotoCommentItem, RsPhotoComment>(token, comments);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool p3PhotoService::submitAlbumDetails(uint32_t& token, RsPhotoAlbum& album)
|
bool p3PhotoService::submitAlbumDetails(uint32_t& token, RsPhotoAlbum& album)
|
||||||
{
|
{
|
||||||
RsGxsPhotoAlbumItem* albumItem = new RsGxsPhotoAlbumItem();
|
RsGxsPhotoAlbumItem* albumItem = new RsGxsPhotoAlbumItem();
|
||||||
|
@ -324,8 +262,6 @@ bool p3PhotoService::submitAlbumDetails(uint32_t& token, RsPhotoAlbum& album)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void p3PhotoService::notifyChanges(std::vector<RsGxsNotify*>& changes)
|
void p3PhotoService::notifyChanges(std::vector<RsGxsNotify*>& changes)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -363,17 +299,6 @@ bool p3PhotoService::submitPhoto(uint32_t& token, RsPhotoPhoto& photo)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool p3PhotoService::submitComment(uint32_t &token, RsPhotoComment &comment)
|
|
||||||
{
|
|
||||||
RsGxsPhotoCommentItem* commentItem = new RsGxsPhotoCommentItem();
|
|
||||||
commentItem->comment = comment;
|
|
||||||
commentItem->meta = comment.mMeta;
|
|
||||||
commentItem->meta.mMsgFlags = FLAG_MSG_TYPE_PHOTO_COMMENT;
|
|
||||||
|
|
||||||
RsGenExchange::publishMsg(token, commentItem);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool p3PhotoService::acknowledgeMsg(const uint32_t& token,
|
bool p3PhotoService::acknowledgeMsg(const uint32_t& token,
|
||||||
std::pair<RsGxsGroupId, RsGxsMessageId>& msgId)
|
std::pair<RsGxsGroupId, RsGxsMessageId>& msgId)
|
||||||
{
|
{
|
||||||
|
@ -397,4 +322,3 @@ bool p3PhotoService::subscribeToAlbum(uint32_t &token, const RsGxsGroupId &grpId
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -24,122 +24,154 @@
|
||||||
|
|
||||||
#include "gxs/rsgenexchange.h"
|
#include "gxs/rsgenexchange.h"
|
||||||
#include "retroshare/rsphoto.h"
|
#include "retroshare/rsphoto.h"
|
||||||
|
#include "services/p3gxscommon.h"
|
||||||
|
|
||||||
class p3PhotoService : public RsPhoto, public RsGenExchange
|
class p3PhotoService : public RsGenExchange, public RsPhoto
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
p3PhotoService(RsGeneralDataService* gds, RsNetworkExchangeService* nes, RsGixs* gixs);
|
p3PhotoService(RsGeneralDataService* gds, RsNetworkExchangeService* nes, RsGixs* gixs);
|
||||||
virtual RsServiceInfo getServiceInfo();
|
virtual RsServiceInfo getServiceInfo();
|
||||||
|
|
||||||
static uint32_t photoAuthenPolicy();
|
static uint32_t photoAuthenPolicy();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @return true if a change has occured
|
* @return true if a change has occured
|
||||||
*/
|
*/
|
||||||
bool updated();
|
bool updated();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void service_tick();
|
void service_tick();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
void notifyChanges(std::vector<RsGxsNotify*>& changes);
|
void notifyChanges(std::vector<RsGxsNotify*>& changes);
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/** Requests **/
|
/** Requests **/
|
||||||
|
|
||||||
void groupsChanged(std::list<RsGxsGroupId>& grpIds);
|
void groupsChanged(std::list<RsGxsGroupId>& grpIds);
|
||||||
|
|
||||||
|
|
||||||
void msgsChanged(GxsMsgIdResult& msgs);
|
void msgsChanged(GxsMsgIdResult& msgs);
|
||||||
|
|
||||||
RsTokenService* getTokenService();
|
RsTokenService* getTokenService();
|
||||||
|
|
||||||
bool getGroupList(const uint32_t &token,
|
bool getGroupList(const uint32_t &token, std::list<RsGxsGroupId> &groupIds);
|
||||||
std::list<RsGxsGroupId> &groupIds);
|
bool getMsgList(const uint32_t &token, GxsMsgIdResult& msgIds);
|
||||||
bool getMsgList(const uint32_t &token,
|
|
||||||
GxsMsgIdResult& msgIds);
|
|
||||||
|
|
||||||
/* Generic Summary */
|
/* Generic Summary */
|
||||||
bool getGroupSummary(const uint32_t &token,
|
bool getGroupSummary(const uint32_t &token, std::list<RsGroupMetaData> &groupInfo);
|
||||||
std::list<RsGroupMetaData> &groupInfo);
|
|
||||||
|
|
||||||
bool getMsgSummary(const uint32_t &token,
|
bool getMsgSummary(const uint32_t &token, MsgMetaResult &msgInfo);
|
||||||
MsgMetaResult &msgInfo);
|
|
||||||
|
|
||||||
/* Specific Service Data */
|
/* Specific Service Data */
|
||||||
bool getAlbum(const uint32_t &token, std::vector<RsPhotoAlbum> &albums);
|
bool getAlbum(const uint32_t &token, std::vector<RsPhotoAlbum> &albums);
|
||||||
bool getPhoto(const uint32_t &token, PhotoResult &photos);
|
bool getPhoto(const uint32_t &token, PhotoResult &photos);
|
||||||
bool getPhotoComment(const uint32_t &token, PhotoCommentResult &comments);
|
|
||||||
bool getPhotoRelatedComment(const uint32_t &token, PhotoRelatedCommentResult &comments);
|
public:
|
||||||
|
/* Comment service - Provide RsGxsCommentService - redirect to p3GxsCommentService */
|
||||||
|
virtual bool getCommentData(uint32_t token, std::vector<RsGxsComment> &msgs) override
|
||||||
|
{
|
||||||
|
return mCommentService->getGxsCommentData(token, msgs);
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual bool getRelatedComments( uint32_t token, std::vector<RsGxsComment> &msgs ) override
|
||||||
|
{
|
||||||
|
return mCommentService->getGxsRelatedComments(token, msgs);
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual bool createNewComment(uint32_t &token, RsGxsComment &msg) override
|
||||||
|
{
|
||||||
|
return mCommentService->createGxsComment(token, msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual bool createNewVote(uint32_t &token, RsGxsVote &msg) override
|
||||||
|
{
|
||||||
|
return mCommentService->createGxsVote(token, msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual bool acknowledgeComment(uint32_t token, std::pair<RsGxsGroupId, RsGxsMessageId>& msgId) override
|
||||||
|
{
|
||||||
|
return acknowledgeMsg(token, msgId);
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual bool acknowledgeVote(uint32_t token, std::pair<RsGxsGroupId, RsGxsMessageId>& msgId) override
|
||||||
|
{
|
||||||
|
if (mCommentService->acknowledgeVote(token, msgId))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return acknowledgeMsg(token, msgId);
|
||||||
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/** Modifications **/
|
/** Modifications **/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* submits album, which returns a token that needs
|
* submits album, which returns a token that needs
|
||||||
* to be acknowledge to get album grp id
|
* to be acknowledge to get album grp id
|
||||||
* @param token token to redeem for acknowledgement
|
* @param token token to redeem for acknowledgement
|
||||||
* @param album album to be submitted
|
* @param album album to be submitted
|
||||||
*/
|
*/
|
||||||
bool submitAlbumDetails(uint32_t& token, RsPhotoAlbum &album);
|
bool submitAlbumDetails(uint32_t& token, RsPhotoAlbum &album);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* submits photo, which returns a token that needs
|
* submits photo, which returns a token that needs
|
||||||
* to be acknowledge to get photo msg-grp id pair
|
* to be acknowledge to get photo msg-grp id pair
|
||||||
* @param token token to redeem for acknowledgement
|
* @param token token to redeem for acknowledgement
|
||||||
* @param photo photo to be submitted
|
* @param photo photo to be submitted
|
||||||
*/
|
*/
|
||||||
bool submitPhoto(uint32_t& token, RsPhotoPhoto &photo);
|
bool submitPhoto(uint32_t& token, RsPhotoPhoto &photo);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* submits photo comment, which returns a token that needs
|
* submits photo comment, which returns a token that needs
|
||||||
* to be acknowledged to get photo msg-grp id pair
|
* to be acknowledged to get photo msg-grp id pair
|
||||||
* The mParentId needs to be set to an existing msg for which
|
* The mParentId needs to be set to an existing msg for which
|
||||||
* commenting is enabled
|
* commenting is enabled
|
||||||
* @param token token to redeem for acknowledgement
|
* @param token token to redeem for acknowledgement
|
||||||
* @param comment comment to be submitted
|
* @param comment comment to be submitted
|
||||||
*/
|
*/
|
||||||
bool submitComment(uint32_t& token, RsPhotoComment &photo);
|
// bool submitComment(uint32_t& token, RsPhotoComment &photo);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* subscribes to group, and returns token which can be used
|
* subscribes to group, and returns token which can be used
|
||||||
* to be acknowledged to get group Id
|
* to be acknowledged to get group Id
|
||||||
* @param token token to redeem for acknowledgement
|
* @param token token to redeem for acknowledgement
|
||||||
* @param grpId the id of the group to subscribe to
|
* @param grpId the id of the group to subscribe to
|
||||||
*/
|
*/
|
||||||
bool subscribeToAlbum(uint32_t& token, const RsGxsGroupId& grpId, bool subscribe);
|
bool subscribeToAlbum(uint32_t& token, const RsGxsGroupId& grpId, bool subscribe);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* This allows the client service to acknowledge that their msgs has
|
* This allows the client service to acknowledge that their msgs has
|
||||||
* been created/modified and retrieve the create/modified msg ids
|
* been created/modified and retrieve the create/modified msg ids
|
||||||
* @param token the token related to modification/create request
|
* @param token the token related to modification/create request
|
||||||
* @param msgIds map of grpid->msgIds of message created/modified
|
* @param msgIds map of grpid->msgIds of message created/modified
|
||||||
* @return true if token exists false otherwise
|
* @return true if token exists false otherwise
|
||||||
*/
|
*/
|
||||||
bool acknowledgeMsg(const uint32_t& token, std::pair<RsGxsGroupId, RsGxsMessageId>& msgId);
|
bool acknowledgeMsg(const uint32_t& token, std::pair<RsGxsGroupId, RsGxsMessageId>& msgId);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* This allows the client service to acknowledge that their grps has
|
* This allows the client service to acknowledge that their grps has
|
||||||
* been created/modified and retrieve the create/modified grp ids
|
* been created/modified and retrieve the create/modified grp ids
|
||||||
* @param token the token related to modification/create request
|
* @param token the token related to modification/create request
|
||||||
* @param msgIds vector of ids of groups created/modified
|
* @param msgIds vector of ids of groups created/modified
|
||||||
* @return true if token exists false otherwise
|
* @return true if token exists false otherwise
|
||||||
*/
|
*/
|
||||||
bool acknowledgeGrp(const uint32_t& token, RsGxsGroupId& grpId);
|
bool acknowledgeGrp(const uint32_t& token, RsGxsGroupId& grpId);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
p3GxsCommentService* mCommentService;
|
||||||
|
|
||||||
std::vector<RsGxsGroupChange*> mGroupChange;
|
std::vector<RsGxsGroupChange*> mGroupChange;
|
||||||
std::vector<RsGxsMsgChange*> mMsgChange;
|
std::vector<RsGxsMsgChange*> mMsgChange;
|
||||||
|
|
||||||
RsMutex mPhotoMutex;
|
RsMutex mPhotoMutex;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // P3PHOTOSERVICEV2_H
|
#endif // P3PHOTOSERVICEV2_H
|
||||||
|
|
|
@ -1,39 +0,0 @@
|
||||||
/*******************************************************************************
|
|
||||||
* retroshare-gui/src/gui/PhotoShare/AddCommentDialog.cpp *
|
|
||||||
* *
|
|
||||||
* Copyright (C) 2018 by Retroshare Team <retroshare.project@gmail.com> *
|
|
||||||
* *
|
|
||||||
* This program is free software: you can redistribute it and/or modify *
|
|
||||||
* it under the terms of the GNU Affero General Public License as *
|
|
||||||
* published by the Free Software Foundation, either version 3 of the *
|
|
||||||
* License, or (at your option) any later version. *
|
|
||||||
* *
|
|
||||||
* This program is distributed in the hope that it will be useful, *
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
||||||
* GNU Affero General Public License for more details. *
|
|
||||||
* *
|
|
||||||
* You should have received a copy of the GNU Affero General Public License *
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
|
|
||||||
* *
|
|
||||||
*******************************************************************************/
|
|
||||||
|
|
||||||
#include "AddCommentDialog.h"
|
|
||||||
#include "ui_AddCommentDialog.h"
|
|
||||||
|
|
||||||
AddCommentDialog::AddCommentDialog(QWidget *parent) :
|
|
||||||
QDialog(parent),
|
|
||||||
ui(new Ui::AddCommentDialog)
|
|
||||||
{
|
|
||||||
ui->setupUi(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
AddCommentDialog::~AddCommentDialog()
|
|
||||||
{
|
|
||||||
delete ui;
|
|
||||||
}
|
|
||||||
|
|
||||||
QString AddCommentDialog::getComment() const
|
|
||||||
{
|
|
||||||
return ui->textEditAddComment->document()->toPlainText();
|
|
||||||
}
|
|
|
@ -1,43 +0,0 @@
|
||||||
/*******************************************************************************
|
|
||||||
* retroshare-gui/src/gui/PhotoShare/AddCommentDialog.h *
|
|
||||||
* *
|
|
||||||
* Copyright (C) 2018 by Retroshare Team <retroshare.project@gmail.com> *
|
|
||||||
* *
|
|
||||||
* This program is free software: you can redistribute it and/or modify *
|
|
||||||
* it under the terms of the GNU Affero General Public License as *
|
|
||||||
* published by the Free Software Foundation, either version 3 of the *
|
|
||||||
* License, or (at your option) any later version. *
|
|
||||||
* *
|
|
||||||
* This program is distributed in the hope that it will be useful, *
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
||||||
* GNU Affero General Public License for more details. *
|
|
||||||
* *
|
|
||||||
* You should have received a copy of the GNU Affero General Public License *
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
|
|
||||||
* *
|
|
||||||
*******************************************************************************/
|
|
||||||
|
|
||||||
#ifndef ADDCOMMENTDIALOG_H
|
|
||||||
#define ADDCOMMENTDIALOG_H
|
|
||||||
|
|
||||||
#include <QDialog>
|
|
||||||
|
|
||||||
namespace Ui {
|
|
||||||
class AddCommentDialog;
|
|
||||||
}
|
|
||||||
|
|
||||||
class AddCommentDialog : public QDialog
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit AddCommentDialog(QWidget *parent = 0);
|
|
||||||
~AddCommentDialog();
|
|
||||||
QString getComment() const;
|
|
||||||
|
|
||||||
private:
|
|
||||||
Ui::AddCommentDialog *ui;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // ADDCOMMENTDIALOG_H
|
|
|
@ -1,67 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>AddCommentDialog</class>
|
|
||||||
<widget class="QDialog" name="AddCommentDialog">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>370</width>
|
|
||||||
<height>118</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>Add Comment</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QTextEdit" name="textEditAddComment"/>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="standardButtons">
|
|
||||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<resources/>
|
|
||||||
<connections>
|
|
||||||
<connection>
|
|
||||||
<sender>buttonBox</sender>
|
|
||||||
<signal>accepted()</signal>
|
|
||||||
<receiver>AddCommentDialog</receiver>
|
|
||||||
<slot>accept()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>248</x>
|
|
||||||
<y>254</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>157</x>
|
|
||||||
<y>274</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
|
||||||
<sender>buttonBox</sender>
|
|
||||||
<signal>rejected()</signal>
|
|
||||||
<receiver>AddCommentDialog</receiver>
|
|
||||||
<slot>reject()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>316</x>
|
|
||||||
<y>260</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>286</x>
|
|
||||||
<y>274</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
</connections>
|
|
||||||
</ui>
|
|
|
@ -1,52 +0,0 @@
|
||||||
/*******************************************************************************
|
|
||||||
* retroshare-gui/src/gui/PhotoShare/PhotoCommentItem.cpp *
|
|
||||||
* *
|
|
||||||
* Copyright (C) 2018 by Retroshare Team <retroshare.project@gmail.com> *
|
|
||||||
* *
|
|
||||||
* This program is free software: you can redistribute it and/or modify *
|
|
||||||
* it under the terms of the GNU Affero General Public License as *
|
|
||||||
* published by the Free Software Foundation, either version 3 of the *
|
|
||||||
* License, or (at your option) any later version. *
|
|
||||||
* *
|
|
||||||
* This program is distributed in the hope that it will be useful, *
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
||||||
* GNU Affero General Public License for more details. *
|
|
||||||
* *
|
|
||||||
* You should have received a copy of the GNU Affero General Public License *
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
|
|
||||||
* *
|
|
||||||
*******************************************************************************/
|
|
||||||
|
|
||||||
#include <QDateTime>
|
|
||||||
|
|
||||||
#include "PhotoCommentItem.h"
|
|
||||||
#include "ui_PhotoCommentItem.h"
|
|
||||||
|
|
||||||
|
|
||||||
PhotoCommentItem::PhotoCommentItem(const RsPhotoComment& comment, QWidget *parent):
|
|
||||||
QWidget(parent),
|
|
||||||
ui(new Ui::PhotoCommentItem), mComment(comment)
|
|
||||||
{
|
|
||||||
ui->setupUi(this);
|
|
||||||
setUp();
|
|
||||||
}
|
|
||||||
|
|
||||||
PhotoCommentItem::~PhotoCommentItem()
|
|
||||||
{
|
|
||||||
delete ui;
|
|
||||||
}
|
|
||||||
|
|
||||||
const RsPhotoComment& PhotoCommentItem::getComment()
|
|
||||||
{
|
|
||||||
return mComment;
|
|
||||||
}
|
|
||||||
|
|
||||||
void PhotoCommentItem::setUp()
|
|
||||||
{
|
|
||||||
ui->labelComment->setText(QString::fromUtf8(mComment.mComment.c_str()));
|
|
||||||
QDateTime qtime;
|
|
||||||
qtime.setTime_t(mComment.mMeta.mPublishTs);
|
|
||||||
QString timestamp = qtime.toString("dd.MMMM yyyy hh:mm");
|
|
||||||
ui->datetimelabel->setText(timestamp);
|
|
||||||
}
|
|
|
@ -1,49 +0,0 @@
|
||||||
/*******************************************************************************
|
|
||||||
* retroshare-gui/src/gui/PhotoShare/PhotoCommentItem.h *
|
|
||||||
* *
|
|
||||||
* Copyright (C) 2018 by Retroshare Team <retroshare.project@gmail.com> *
|
|
||||||
* *
|
|
||||||
* This program is free software: you can redistribute it and/or modify *
|
|
||||||
* it under the terms of the GNU Affero General Public License as *
|
|
||||||
* published by the Free Software Foundation, either version 3 of the *
|
|
||||||
* License, or (at your option) any later version. *
|
|
||||||
* *
|
|
||||||
* This program is distributed in the hope that it will be useful, *
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
||||||
* GNU Affero General Public License for more details. *
|
|
||||||
* *
|
|
||||||
* You should have received a copy of the GNU Affero General Public License *
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
|
|
||||||
* *
|
|
||||||
*******************************************************************************/
|
|
||||||
|
|
||||||
#ifndef PHOTOCOMMENTITEM_H
|
|
||||||
#define PHOTOCOMMENTITEM_H
|
|
||||||
|
|
||||||
#include <QWidget>
|
|
||||||
#include "retroshare/rsphoto.h"
|
|
||||||
|
|
||||||
namespace Ui {
|
|
||||||
class PhotoCommentItem;
|
|
||||||
}
|
|
||||||
|
|
||||||
class PhotoCommentItem : public QWidget
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit PhotoCommentItem(const RsPhotoComment& comment, QWidget *parent = 0);
|
|
||||||
~PhotoCommentItem();
|
|
||||||
|
|
||||||
const RsPhotoComment& getComment();
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
void setUp();
|
|
||||||
private:
|
|
||||||
Ui::PhotoCommentItem *ui;
|
|
||||||
RsPhotoComment mComment;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // PHOTOCOMMENTITEM_H
|
|
|
@ -1,200 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>PhotoCommentItem</class>
|
|
||||||
<widget class="QWidget" name="PhotoCommentItem">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>338</width>
|
|
||||||
<height>60</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>Form</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
|
||||||
<property name="margin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QFrame" name="expandFrame">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>400</width>
|
|
||||||
<height>71</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="palette">
|
|
||||||
<palette>
|
|
||||||
<active>
|
|
||||||
<colorrole role="Base">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>255</red>
|
|
||||||
<green>255</green>
|
|
||||||
<blue>255</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
<colorrole role="Window">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>237</red>
|
|
||||||
<green>239</green>
|
|
||||||
<blue>244</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
</active>
|
|
||||||
<inactive>
|
|
||||||
<colorrole role="Base">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>255</red>
|
|
||||||
<green>255</green>
|
|
||||||
<blue>255</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
<colorrole role="Window">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>237</red>
|
|
||||||
<green>239</green>
|
|
||||||
<blue>244</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
</inactive>
|
|
||||||
<disabled>
|
|
||||||
<colorrole role="Base">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>237</red>
|
|
||||||
<green>239</green>
|
|
||||||
<blue>244</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
<colorrole role="Window">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>237</red>
|
|
||||||
<green>239</green>
|
|
||||||
<blue>244</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
</disabled>
|
|
||||||
</palette>
|
|
||||||
</property>
|
|
||||||
<property name="autoFillBackground">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true"/>
|
|
||||||
</property>
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::StyledPanel</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShadow">
|
|
||||||
<enum>QFrame::Raised</enum>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
|
||||||
<property name="margin">
|
|
||||||
<number>2</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing">
|
|
||||||
<number>2</number>
|
|
||||||
</property>
|
|
||||||
<item row="0" column="0" rowspan="2">
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<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/>
|
|
||||||
</property>
|
|
||||||
<property name="pixmap">
|
|
||||||
<pixmap resource="../images.qrc">:/images/no_avatar_70.png</pixmap>
|
|
||||||
</property>
|
|
||||||
<property name="scaledContents">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1" rowspan="2" colspan="2">
|
|
||||||
<widget class="QLabel" name="labelComment">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="openExternalLinks">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="textInteractionFlags">
|
|
||||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<spacer name="verticalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>29</width>
|
|
||||||
<height>13</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1" colspan="2">
|
|
||||||
<widget class="QLabel" name="datetimelabel">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
|
||||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
|
||||||
p, li { white-space: pre-wrap; }
|
|
||||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:600; font-style:normal;">
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt; color:#666666;">DateTime</span></p></body></html></string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<resources>
|
|
||||||
<include location="../images.qrc"/>
|
|
||||||
</resources>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
|
@ -23,235 +23,168 @@
|
||||||
#include "PhotoDialog.h"
|
#include "PhotoDialog.h"
|
||||||
#include "ui_PhotoDialog.h"
|
#include "ui_PhotoDialog.h"
|
||||||
#include "retroshare/rsidentity.h"
|
#include "retroshare/rsidentity.h"
|
||||||
#include "AddCommentDialog.h"
|
#include "gui/gxs/GxsCommentDialog.h"
|
||||||
|
|
||||||
PhotoDialog::PhotoDialog(RsPhoto *rs_photo, const RsPhotoPhoto &photo, QWidget *parent) :
|
PhotoDialog::PhotoDialog(RsPhoto *rs_photo, const RsPhotoPhoto &photo, QWidget *parent) :
|
||||||
QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint),
|
QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint),
|
||||||
ui(new Ui::PhotoDialog), mRsPhoto(rs_photo), mPhotoQueue(new TokenQueue(mRsPhoto->getTokenService(), this)),
|
ui(new Ui::PhotoDialog), mRsPhoto(rs_photo), mPhotoQueue(new TokenQueue(mRsPhoto->getTokenService(), this)),
|
||||||
mPhotoDetails(photo)
|
mPhotoDetails(photo),
|
||||||
|
mCommentsCreated(false)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
setAttribute ( Qt::WA_DeleteOnClose, true );
|
setAttribute ( Qt::WA_DeleteOnClose, true );
|
||||||
|
|
||||||
connect(ui->pushButton_AddComment, SIGNAL(clicked()), this, SLOT(createComment()));
|
connect(ui->fullscreenButton, SIGNAL(clicked()),this, SLOT(setFullScreen()));
|
||||||
connect(ui->pushButton_AddCommentDlg, SIGNAL(clicked()), this, SLOT(addComment()));
|
connect(ui->commentsButton, SIGNAL(clicked()),this, SLOT(toggleComments()));
|
||||||
connect(ui->fullscreenButton, SIGNAL(clicked()),this, SLOT(setFullScreen()));
|
connect(ui->detailsButton, SIGNAL(clicked()),this, SLOT(toggleDetails()));
|
||||||
|
|
||||||
#if QT_VERSION >= 0x040700
|
setUp();
|
||||||
ui->lineEdit->setPlaceholderText(tr("Write a comment...")) ;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
setUp();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PhotoDialog::~PhotoDialog()
|
PhotoDialog::~PhotoDialog()
|
||||||
{
|
{
|
||||||
delete ui;
|
delete ui;
|
||||||
delete mPhotoQueue;
|
delete mPhotoQueue;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PhotoDialog::setUp()
|
void PhotoDialog::setUp()
|
||||||
{
|
{
|
||||||
QPixmap qtn;
|
QPixmap qtn;
|
||||||
qtn.loadFromData(mPhotoDetails.mThumbnail.mData, mPhotoDetails.mThumbnail.mSize, "PNG");
|
qtn.loadFromData(mPhotoDetails.mThumbnail.mData, mPhotoDetails.mThumbnail.mSize, "PNG");
|
||||||
ui->label_Photo->setPixmap(qtn);
|
ui->label_Photo->setPixmap(qtn);
|
||||||
ui->lineEdit_Title->setText(QString::fromStdString(mPhotoDetails.mMeta.mMsgName));
|
ui->label_Photo->setVisible(true);
|
||||||
|
|
||||||
requestComments();
|
// set size of label to match image.
|
||||||
|
ui->label_Photo->setMinimumSize(ui->label_Photo->sizeHint());
|
||||||
|
// alternative is to scale contents.
|
||||||
|
// ui->label_Photo->setScaledContents(true);
|
||||||
|
// Neither are ideal. sizeHint is potentially too large.
|
||||||
|
// scaled contents - doesn't respect Aspect Ratio...
|
||||||
|
//
|
||||||
|
// Ideal soln:
|
||||||
|
// Allow both, depending on Zoom Factor.
|
||||||
|
// Auto: use Scale, with correct aspect ratio.
|
||||||
|
// answer here: https://stackoverflow.com/questions/8211982/qt-resizing-a-qlabel-containing-a-qpixmap-while-keeping-its-aspect-ratio
|
||||||
|
// Fixed %, then manually scale to that, with scroll area.
|
||||||
|
|
||||||
|
ui->lineEdit_Title->setText(QString::fromStdString(mPhotoDetails.mMeta.mMsgName));
|
||||||
|
ui->frame_comments->setVisible(false);
|
||||||
|
ui->frame_details->setVisible(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PhotoDialog::addComment()
|
void PhotoDialog::toggleDetails()
|
||||||
{
|
{
|
||||||
AddCommentDialog dlg(this);
|
if (ui->frame_details->isVisible()) {
|
||||||
if (dlg.exec() == QDialog::Accepted) {
|
ui->frame_details->setVisible(false);
|
||||||
RsPhotoComment comment;
|
} else {
|
||||||
comment.mComment = dlg.getComment().toUtf8().constData();
|
ui->frame_details->setVisible(true);
|
||||||
|
}
|
||||||
uint32_t token;
|
|
||||||
comment.mMeta.mGroupId = mPhotoDetails.mMeta.mGroupId;
|
|
||||||
comment.mMeta.mParentId = mPhotoDetails.mMeta.mOrigMsgId;
|
|
||||||
mRsPhoto->submitComment(token, comment);
|
|
||||||
mPhotoQueue->queueRequest(token, TOKENREQ_MSGINFO, RS_TOKREQ_ANSTYPE_ACK, 0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void PhotoDialog::clearComments()
|
void PhotoDialog::toggleComments()
|
||||||
{
|
{
|
||||||
//QLayout* l = ui->scrollAreaWidgetContents->layout();
|
if (ui->frame_comments->isVisible()) {
|
||||||
QSetIterator<PhotoCommentItem*> sit(mComments);
|
ui->frame_comments->setVisible(false);
|
||||||
while(sit.hasNext())
|
} else {
|
||||||
{
|
if (mCommentsCreated) {
|
||||||
PhotoCommentItem* item = sit.next();
|
ui->frame_comments->setVisible(true);
|
||||||
ui->verticalLayout->removeWidget(item);
|
} else {
|
||||||
item->setParent(NULL);
|
// create CommentDialog.
|
||||||
delete item;
|
RsGxsCommentService *commentService = dynamic_cast<RsGxsCommentService *>(mRsPhoto);
|
||||||
}
|
GxsCommentDialog *commentDialog = new GxsCommentDialog(this, mRsPhoto->getTokenService(), commentService);
|
||||||
|
|
||||||
mComments.clear();
|
// TODO: Need to fetch all msg versions, otherwise - won't get all the comments.
|
||||||
|
// For the moment - use current msgid.
|
||||||
|
// Needs to be passed to PhotoDialog, or fetched here.
|
||||||
|
|
||||||
|
RsGxsGroupId grpId = mPhotoDetails.mMeta.mGroupId;
|
||||||
|
RsGxsMessageId msgId = mPhotoDetails.mMeta.mMsgId;
|
||||||
|
|
||||||
|
std::set<RsGxsMessageId> msgv;
|
||||||
|
msgv.insert(msgId);
|
||||||
|
msgv.insert(mPhotoDetails.mMeta.mOrigMsgId); // if duplicate will be ignored.
|
||||||
|
|
||||||
|
commentDialog->commentLoad(grpId, msgv,msgId);
|
||||||
|
|
||||||
|
// insert into frame.
|
||||||
|
QVBoxLayout *vbox = new QVBoxLayout();
|
||||||
|
|
||||||
|
vbox->addWidget(commentDialog);
|
||||||
|
ui->frame_comments->setLayout(vbox);
|
||||||
|
|
||||||
|
ui->frame_comments->setVisible(true);
|
||||||
|
mCommentsCreated = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PhotoDialog::resetComments()
|
|
||||||
{
|
|
||||||
QSetIterator<PhotoCommentItem*> sit(mComments);
|
|
||||||
//QLayout* l = ui->scrollAreaWidgetContents->layout();
|
|
||||||
while(sit.hasNext())
|
|
||||||
{
|
|
||||||
PhotoCommentItem* item = sit.next();
|
|
||||||
ui->verticalLayout->insertWidget(0,item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void PhotoDialog::requestComments()
|
|
||||||
{
|
|
||||||
RsTokReqOptions opts;
|
|
||||||
opts.mMsgFlagMask = RsPhoto::FLAG_MSG_TYPE_MASK;
|
|
||||||
opts.mMsgFlagFilter = RsPhoto::FLAG_MSG_TYPE_PHOTO_COMMENT;
|
|
||||||
|
|
||||||
opts.mReqType = GXS_REQUEST_TYPE_MSG_IDS;
|
|
||||||
opts.mReqType = GXS_REQUEST_TYPE_MSG_RELATED_DATA;
|
|
||||||
opts.mOptions = RS_TOKREQOPT_MSG_PARENT | RS_TOKREQOPT_MSG_LATEST;
|
|
||||||
RsGxsGrpMsgIdPair msgId;
|
|
||||||
uint32_t token;
|
|
||||||
msgId.first = mPhotoDetails.mMeta.mGroupId;
|
|
||||||
msgId.second = mPhotoDetails.mMeta.mMsgId;
|
|
||||||
std::vector<RsGxsGrpMsgIdPair> msgIdV;
|
|
||||||
msgIdV.push_back(msgId);
|
|
||||||
mPhotoQueue->requestMsgRelatedInfo(token, RS_TOKREQ_ANSTYPE_DATA, opts, msgIdV, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void PhotoDialog::createComment()
|
|
||||||
{
|
|
||||||
RsPhotoComment comment;
|
|
||||||
QString commentString = ui->lineEdit->text();
|
|
||||||
|
|
||||||
comment.mComment = commentString.toUtf8().constData();
|
|
||||||
|
|
||||||
uint32_t token;
|
|
||||||
comment.mMeta.mGroupId = mPhotoDetails.mMeta.mGroupId;
|
|
||||||
comment.mMeta.mParentId = mPhotoDetails.mMeta.mOrigMsgId;
|
|
||||||
mRsPhoto->submitComment(token, comment);
|
|
||||||
mPhotoQueue->queueRequest(token, TOKENREQ_MSGINFO, RS_TOKREQ_ANSTYPE_ACK, 0);
|
|
||||||
|
|
||||||
ui->lineEdit->clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*************** message loading **********************/
|
/*************** message loading **********************/
|
||||||
|
|
||||||
void PhotoDialog::loadRequest(const TokenQueue *queue, const TokenRequest &req)
|
void PhotoDialog::loadRequest(const TokenQueue *queue, const TokenRequest &req)
|
||||||
{
|
{
|
||||||
std::cerr << "PhotoShare::loadRequest()";
|
std::cerr << "PhotoShare::loadRequest()";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
|
||||||
if (queue == mPhotoQueue)
|
if (queue == mPhotoQueue)
|
||||||
{
|
{
|
||||||
/* now switch on req */
|
/* now switch on req */
|
||||||
switch(req.mType)
|
switch(req.mType)
|
||||||
{
|
{
|
||||||
case TOKENREQ_MSGINFO:
|
case TOKENREQ_MSGINFO:
|
||||||
{
|
{
|
||||||
switch(req.mAnsType)
|
switch(req.mAnsType)
|
||||||
{
|
{
|
||||||
case RS_TOKREQ_ANSTYPE_DATA:
|
case RS_TOKREQ_ANSTYPE_LIST:
|
||||||
loadComment(req.mToken);
|
loadList(req.mToken);
|
||||||
break;
|
break;
|
||||||
case RS_TOKREQ_ANSTYPE_LIST:
|
default:
|
||||||
loadList(req.mToken);
|
std::cerr << "PhotoShare::loadRequest() ERROR: MSG INVALID TYPE";
|
||||||
break;
|
std::cerr << std::endl;
|
||||||
case RS_TOKREQ_ANSTYPE_ACK:
|
break;
|
||||||
acknowledgeComment(req.mToken);
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
}
|
||||||
std::cerr << "PhotoShare::loadRequest() ERROR: MSG INVALID TYPE";
|
|
||||||
std::cerr << std::endl;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
std::cerr << "PhotoShare::loadRequest() ERROR: INVALID TYPE";
|
std::cerr << "PhotoShare::loadRequest() ERROR: INVALID TYPE";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void PhotoDialog::loadComment(uint32_t token)
|
|
||||||
{
|
|
||||||
|
|
||||||
clearComments();
|
|
||||||
|
|
||||||
PhotoRelatedCommentResult results;
|
|
||||||
mRsPhoto->getPhotoRelatedComment(token, results);
|
|
||||||
|
|
||||||
PhotoRelatedCommentResult::iterator mit = results.begin();
|
|
||||||
|
|
||||||
for(; mit != results.end(); ++mit)
|
|
||||||
{
|
|
||||||
const std::vector<RsPhotoComment>& commentV = mit->second;
|
|
||||||
std::vector<RsPhotoComment>::const_iterator vit = commentV.begin();
|
|
||||||
|
|
||||||
for(; vit != commentV.end(); ++vit)
|
|
||||||
{
|
|
||||||
addComment(*vit);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
resetComments();
|
|
||||||
}
|
|
||||||
|
|
||||||
void PhotoDialog::loadList(uint32_t token)
|
void PhotoDialog::loadList(uint32_t token)
|
||||||
{
|
{
|
||||||
GxsMsgReq msgIds;
|
GxsMsgReq msgIds;
|
||||||
mRsPhoto->getMsgList(token, msgIds);
|
mRsPhoto->getMsgList(token, msgIds);
|
||||||
RsTokReqOptions opts;
|
RsTokReqOptions opts;
|
||||||
|
|
||||||
// just use data as no need to worry about getting comments
|
// just use data as no need to worry about getting comments
|
||||||
opts.mReqType = GXS_REQUEST_TYPE_MSG_DATA;
|
opts.mReqType = GXS_REQUEST_TYPE_MSG_DATA;
|
||||||
uint32_t reqToken;
|
uint32_t reqToken;
|
||||||
mPhotoQueue->requestMsgInfo(reqToken, RS_TOKREQ_ANSTYPE_DATA, opts, msgIds, 0);
|
mPhotoQueue->requestMsgInfo(reqToken, RS_TOKREQ_ANSTYPE_DATA, opts, msgIds, 0);
|
||||||
}
|
|
||||||
|
|
||||||
void PhotoDialog::addComment(const RsPhotoComment &comment)
|
|
||||||
{
|
|
||||||
PhotoCommentItem* item = new PhotoCommentItem(comment);
|
|
||||||
mComments.insert(item);
|
|
||||||
}
|
|
||||||
|
|
||||||
void PhotoDialog::acknowledgeComment(uint32_t token)
|
|
||||||
{
|
|
||||||
RsGxsGrpMsgIdPair msgId;
|
|
||||||
mRsPhoto->acknowledgeMsg(token, msgId);
|
|
||||||
|
|
||||||
if(msgId.first.isNull() || msgId.second.isNull()){
|
|
||||||
|
|
||||||
}else
|
|
||||||
{
|
|
||||||
requestComments();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void PhotoDialog::setFullScreen()
|
void PhotoDialog::setFullScreen()
|
||||||
{
|
{
|
||||||
if (!isFullScreen()) {
|
if (!isFullScreen()) {
|
||||||
// hide menu & toolbars
|
// hide menu & toolbars
|
||||||
|
|
||||||
#ifdef Q_OS_LINUX
|
#ifdef Q_OS_LINUX
|
||||||
show();
|
show();
|
||||||
raise();
|
raise();
|
||||||
setWindowState( windowState() | Qt::WindowFullScreen );
|
setWindowState( windowState() | Qt::WindowFullScreen );
|
||||||
#else
|
#else
|
||||||
setWindowState( windowState() | Qt::WindowFullScreen );
|
setWindowState( windowState() | Qt::WindowFullScreen );
|
||||||
show();
|
show();
|
||||||
raise();
|
raise();
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
setWindowState( windowState() ^ Qt::WindowFullScreen );
|
setWindowState( windowState() ^ Qt::WindowFullScreen );
|
||||||
show();
|
show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,58 +25,40 @@
|
||||||
#include <QSet>
|
#include <QSet>
|
||||||
#include "retroshare/rsphoto.h"
|
#include "retroshare/rsphoto.h"
|
||||||
#include "util/TokenQueue.h"
|
#include "util/TokenQueue.h"
|
||||||
#include "PhotoCommentItem.h"
|
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class PhotoDialog;
|
class PhotoDialog;
|
||||||
}
|
}
|
||||||
|
|
||||||
class PhotoDialog : public QDialog, public TokenResponse
|
class PhotoDialog : public QDialog, public TokenResponse
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit PhotoDialog(RsPhoto* rs_photo, const RsPhotoPhoto& photo, QWidget *parent = 0);
|
explicit PhotoDialog(RsPhoto* rs_photo, const RsPhotoPhoto& photo, QWidget *parent = 0);
|
||||||
~PhotoDialog();
|
~PhotoDialog();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
|
||||||
void addComment();
|
|
||||||
void createComment();
|
|
||||||
void setFullScreen();
|
void setFullScreen();
|
||||||
|
void toggleDetails();
|
||||||
|
void toggleComments();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void loadRequest(const TokenQueue *queue, const TokenRequest &req);
|
void loadRequest(const TokenQueue *queue, const TokenRequest &req);
|
||||||
private:
|
private:
|
||||||
void setUp();
|
void setUp();
|
||||||
|
|
||||||
/*!
|
void loadList(uint32_t token);
|
||||||
* clears comments
|
|
||||||
* and places them back in dialog
|
|
||||||
*/
|
|
||||||
void resetComments();
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* Request comments
|
|
||||||
*/
|
|
||||||
void requestComments();
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* Simply removes comments but doesn't place them back in dialog
|
|
||||||
*/
|
|
||||||
void clearComments();
|
|
||||||
|
|
||||||
void acknowledgeComment(uint32_t token);
|
|
||||||
void loadComment(uint32_t token);
|
|
||||||
void loadList(uint32_t token);
|
|
||||||
void addComment(const RsPhotoComment& comment);
|
|
||||||
private:
|
private:
|
||||||
Ui::PhotoDialog *ui;
|
Ui::PhotoDialog *ui;
|
||||||
|
|
||||||
RsPhoto* mRsPhoto;
|
RsPhoto* mRsPhoto;
|
||||||
TokenQueue* mPhotoQueue;
|
TokenQueue* mPhotoQueue;
|
||||||
RsPhotoPhoto mPhotoDetails;
|
RsPhotoPhoto mPhotoDetails;
|
||||||
QSet<PhotoCommentItem*> mComments;
|
|
||||||
|
bool mCommentsCreated;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // PHOTODIALOG_H
|
#endif // PHOTODIALOG_H
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>594</width>
|
<width>790</width>
|
||||||
<height>572</height>
|
<height>824</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
@ -16,313 +16,239 @@
|
||||||
<property name="sizeGripEnabled">
|
<property name="sizeGripEnabled">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
<item row="0" column="0" colspan="2">
|
<item>
|
||||||
<widget class="QGroupBox" name="albumGroup">
|
<widget class="QSplitter" name="splitter">
|
||||||
<property name="sizePolicy">
|
<property name="orientation">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
<enum>Qt::Horizontal</enum>
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>1</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="title">
|
<widget class="QWidget" name="widget" native="true">
|
||||||
<string>Photo</string>
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
</property>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<widget class="QGroupBox" name="albumGroup">
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_Photo">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>200</width>
|
|
||||||
<height>300</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>TextLabel</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="2" rowspan="2" colspan="2">
|
|
||||||
<widget class="QFrame" name="frame">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="palette">
|
|
||||||
<palette>
|
|
||||||
<active>
|
|
||||||
<colorrole role="Base">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>255</red>
|
|
||||||
<green>255</green>
|
|
||||||
<blue>255</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
<colorrole role="Window">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>255</red>
|
|
||||||
<green>255</green>
|
|
||||||
<blue>255</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
</active>
|
|
||||||
<inactive>
|
|
||||||
<colorrole role="Base">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>255</red>
|
|
||||||
<green>255</green>
|
|
||||||
<blue>255</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
<colorrole role="Window">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>255</red>
|
|
||||||
<green>255</green>
|
|
||||||
<blue>255</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
</inactive>
|
|
||||||
<disabled>
|
|
||||||
<colorrole role="Base">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>255</red>
|
|
||||||
<green>255</green>
|
|
||||||
<blue>255</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
<colorrole role="Window">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>255</red>
|
|
||||||
<green>255</green>
|
|
||||||
<blue>255</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
</disabled>
|
|
||||||
</palette>
|
|
||||||
</property>
|
|
||||||
<property name="autoFillBackground">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::StyledPanel</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShadow">
|
|
||||||
<enum>QFrame::Raised</enum>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
|
||||||
<item row="0" column="0" colspan="2">
|
|
||||||
<widget class="QScrollArea" name="scrollArea">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>300</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="widgetResizable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<widget class="QWidget" name="scrollAreaWidgetContents">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>328</width>
|
|
||||||
<height>20</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>1</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Album / Photo Name</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QScrollArea" name="scrollArea">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>100</width>
|
||||||
|
<height>100</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="widgetResizable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="scrollAreaWidgetContents">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>558</width>
|
||||||
|
<height>551</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_Photo">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>200</width>
|
||||||
|
<height>300</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>TextLabel</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="widget_2" native="true">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="fullscreenButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>...</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../images.qrc">
|
||||||
|
<normaloff>:/images/window_fullscreen.png</normaloff>:/images/window_fullscreen.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="autoRaise">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="detailsButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Details \/</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="comboBox">
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>50 %</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>75 %</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>100 %</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>200 %</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="commentsButton">
|
||||||
|
<property name="text">
|
||||||
|
<string><N> Comments >></string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QFrame" name="frame_details">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Minimum">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<property name="minimumSize">
|
||||||
<item>
|
<size>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<width>50</width>
|
||||||
<property name="spacing">
|
<height>0</height>
|
||||||
<number>1</number>
|
</size>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QLineEdit" name="lineEdit_Title">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
</layout>
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_8">
|
||||||
|
<property name="text">
|
||||||
|
<string>Caption</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QLineEdit" name="lineEdit_Caption">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_5">
|
||||||
|
<property name="text">
|
||||||
|
<string>Where:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QLineEdit" name="lineEdit_Where">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QLineEdit" name="lineEdit_When">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label_9">
|
||||||
|
<property name="text">
|
||||||
|
<string>Photo Title:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="label_6">
|
||||||
|
<property name="text">
|
||||||
|
<string>When</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</item>
|
||||||
</item>
|
</layout>
|
||||||
<item row="1" column="0">
|
</widget>
|
||||||
<widget class="QLineEdit" name="lineEdit"/>
|
<widget class="QFrame" name="frame_comments">
|
||||||
</item>
|
<property name="frameShape">
|
||||||
<item row="1" column="1">
|
<enum>QFrame::StyledPanel</enum>
|
||||||
<widget class="QPushButton" name="pushButton_AddComment">
|
</property>
|
||||||
<property name="text">
|
<property name="frameShadow">
|
||||||
<string>Comment</string>
|
<enum>QFrame::Raised</enum>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0" colspan="2">
|
|
||||||
<widget class="QGroupBox" name="groupBox_2">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>50</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>Summary</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_3">
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLineEdit" name="lineEdit_Title">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="label_8">
|
|
||||||
<property name="text">
|
|
||||||
<string>Caption</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QLineEdit" name="lineEdit_Caption">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="label_5">
|
|
||||||
<property name="text">
|
|
||||||
<string>Where:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QLineEdit" name="lineEdit_Where">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="QLineEdit" name="lineEdit_When">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label_9">
|
|
||||||
<property name="text">
|
|
||||||
<string>Photo Title:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QLabel" name="label_6">
|
|
||||||
<property name="text">
|
|
||||||
<string>When</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QToolButton" name="fullscreenButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>...</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../images.qrc">
|
|
||||||
<normaloff>:/images/window_fullscreen.png</normaloff>:/images/window_fullscreen.png</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="autoRaise">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1" colspan="2">
|
|
||||||
<spacer name="horizontalSpacer">
|
|
||||||
<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 row="2" column="3">
|
|
||||||
<widget class="QPushButton" name="pushButton_AddCommentDlg">
|
|
||||||
<property name="text">
|
|
||||||
<string>Add Comment</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
|
|
@ -165,7 +165,6 @@ void GxsGroupDialog::injectExtraWidget(QWidget *widget)
|
||||||
// add extra widget into layout.
|
// add extra widget into layout.
|
||||||
QVBoxLayout *vbox = new QVBoxLayout();
|
QVBoxLayout *vbox = new QVBoxLayout();
|
||||||
vbox->addWidget(widget);
|
vbox->addWidget(widget);
|
||||||
vbox->addStretch(1);
|
|
||||||
ui.extraFrame->setLayout(vbox);
|
ui.extraFrame->setLayout(vbox);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1164,10 +1164,8 @@ gxsphotoshare {
|
||||||
gui/PhotoShare/PhotoShareItemHolder.h \
|
gui/PhotoShare/PhotoShareItemHolder.h \
|
||||||
gui/PhotoShare/PhotoShare.h \
|
gui/PhotoShare/PhotoShare.h \
|
||||||
gui/PhotoShare/PhotoSlideShow.h \
|
gui/PhotoShare/PhotoSlideShow.h \
|
||||||
gui/PhotoShare/PhotoDialog.h \
|
gui/PhotoShare/PhotoDialog.h
|
||||||
gui/PhotoShare/PhotoCommentItem.h \
|
|
||||||
gui/PhotoShare/AddCommentDialog.h
|
|
||||||
|
|
||||||
FORMS += \
|
FORMS += \
|
||||||
gui/PhotoShare/AlbumExtra.ui \
|
gui/PhotoShare/AlbumExtra.ui \
|
||||||
gui/PhotoShare/PhotoItem.ui \
|
gui/PhotoShare/PhotoItem.ui \
|
||||||
|
@ -1176,10 +1174,8 @@ gxsphotoshare {
|
||||||
gui/PhotoShare/AlbumDialog.ui \
|
gui/PhotoShare/AlbumDialog.ui \
|
||||||
gui/PhotoShare/AlbumCreateDialog.ui \
|
gui/PhotoShare/AlbumCreateDialog.ui \
|
||||||
gui/PhotoShare/PhotoShare.ui \
|
gui/PhotoShare/PhotoShare.ui \
|
||||||
gui/PhotoShare/PhotoSlideShow.ui \
|
gui/PhotoShare/PhotoSlideShow.ui
|
||||||
gui/PhotoShare/PhotoCommentItem.ui \
|
|
||||||
gui/PhotoShare/AddCommentDialog.ui
|
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
gui/PhotoShare/AlbumGroupDialog.cpp \
|
gui/PhotoShare/AlbumGroupDialog.cpp \
|
||||||
gui/PhotoShare/AlbumExtra.cpp \
|
gui/PhotoShare/AlbumExtra.cpp \
|
||||||
|
@ -1191,10 +1187,8 @@ gxsphotoshare {
|
||||||
gui/PhotoShare/AlbumCreateDialog.cpp \
|
gui/PhotoShare/AlbumCreateDialog.cpp \
|
||||||
gui/PhotoShare/PhotoShareItemHolder.cpp \
|
gui/PhotoShare/PhotoShareItemHolder.cpp \
|
||||||
gui/PhotoShare/PhotoShare.cpp \
|
gui/PhotoShare/PhotoShare.cpp \
|
||||||
gui/PhotoShare/PhotoSlideShow.cpp \
|
gui/PhotoShare/PhotoSlideShow.cpp
|
||||||
gui/PhotoShare/PhotoCommentItem.cpp \
|
|
||||||
gui/PhotoShare/AddCommentDialog.cpp
|
|
||||||
|
|
||||||
RESOURCES += gui/PhotoShare/Photo_images.qrc
|
RESOURCES += gui/PhotoShare/Photo_images.qrc
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue