mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
commit
4f23343c91
@ -64,6 +64,7 @@ enum class RsServiceType : uint16_t
|
|||||||
GXS_TRANS = 0x0230,
|
GXS_TRANS = 0x0230,
|
||||||
JSONAPI = 0x0240,
|
JSONAPI = 0x0240,
|
||||||
FORUMS_CONFIG = 0x0315,
|
FORUMS_CONFIG = 0x0315,
|
||||||
|
POSTED_CONFIG = 0x0316,
|
||||||
CHANNELS_CONFIG = 0x0317,
|
CHANNELS_CONFIG = 0x0317,
|
||||||
RTT = 0x1011, /// Round Trip Time
|
RTT = 0x1011, /// Round Trip Time
|
||||||
|
|
||||||
@ -123,7 +124,9 @@ RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_GXS_TYPE_REPUTATION
|
|||||||
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_TYPE_GXS_RECOGN = 0x0220;
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_TYPE_GXS_RECOGN = 0x0220;
|
||||||
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_TYPE_GXS_TRANS = 0x0230;
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_TYPE_GXS_TRANS = 0x0230;
|
||||||
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_TYPE_JSONAPI = 0x0240;
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_TYPE_JSONAPI = 0x0240;
|
||||||
|
/// used to save notification records in GXS and possible other service-based configuration
|
||||||
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_GXS_TYPE_FORUMS_CONFIG = 0x0315;
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_GXS_TYPE_FORUMS_CONFIG = 0x0315;
|
||||||
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_GXS_TYPE_POSTED_CONFIG = 0x0316;
|
||||||
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_GXS_TYPE_CHANNELS_CONFIG = 0x0317;
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_GXS_TYPE_CHANNELS_CONFIG = 0x0317;
|
||||||
|
|
||||||
// Experimental Services.
|
// Experimental Services.
|
||||||
|
@ -1632,6 +1632,7 @@ int RsServer::StartupRetroShare()
|
|||||||
mConfigMgr->addConfiguration("gxschannels_srv.cfg", mGxsChannels);
|
mConfigMgr->addConfiguration("gxschannels_srv.cfg", mGxsChannels);
|
||||||
mConfigMgr->addConfiguration("gxscircles.cfg" , gxscircles_ns);
|
mConfigMgr->addConfiguration("gxscircles.cfg" , gxscircles_ns);
|
||||||
mConfigMgr->addConfiguration("posted.cfg" , posted_ns);
|
mConfigMgr->addConfiguration("posted.cfg" , posted_ns);
|
||||||
|
mConfigMgr->addConfiguration("gxsposted_srv.cfg", mPosted);
|
||||||
#ifdef RS_USE_WIKI
|
#ifdef RS_USE_WIKI
|
||||||
mConfigMgr->addConfiguration("wiki.cfg", wiki_ns);
|
mConfigMgr->addConfiguration("wiki.cfg", wiki_ns);
|
||||||
#endif
|
#endif
|
||||||
|
@ -136,14 +136,14 @@ uint32_t p3GxsChannels::channelsAuthenPolicy()
|
|||||||
static const uint32_t GXS_CHANNELS_CONFIG_MAX_TIME_NOTIFY_STORAGE = 86400*30*2 ; // ignore notifications for 2 months
|
static const uint32_t GXS_CHANNELS_CONFIG_MAX_TIME_NOTIFY_STORAGE = 86400*30*2 ; // ignore notifications for 2 months
|
||||||
static const uint8_t GXS_CHANNELS_CONFIG_SUBTYPE_NOTIFY_RECORD = 0x01 ;
|
static const uint8_t GXS_CHANNELS_CONFIG_SUBTYPE_NOTIFY_RECORD = 0x01 ;
|
||||||
|
|
||||||
struct RsGxsGroupNotifyRecordsItem: public RsItem
|
struct RsGxsChannelNotifyRecordsItem: public RsItem
|
||||||
{
|
{
|
||||||
|
|
||||||
RsGxsGroupNotifyRecordsItem()
|
RsGxsChannelNotifyRecordsItem()
|
||||||
: RsItem(RS_PKT_VERSION_SERVICE,RS_SERVICE_GXS_TYPE_CHANNELS_CONFIG,GXS_CHANNELS_CONFIG_SUBTYPE_NOTIFY_RECORD)
|
: RsItem(RS_PKT_VERSION_SERVICE,RS_SERVICE_GXS_TYPE_CHANNELS_CONFIG,GXS_CHANNELS_CONFIG_SUBTYPE_NOTIFY_RECORD)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
virtual ~RsGxsGroupNotifyRecordsItem() {}
|
virtual ~RsGxsChannelNotifyRecordsItem() {}
|
||||||
|
|
||||||
void serial_process( RsGenericSerializer::SerializeJob j,
|
void serial_process( RsGenericSerializer::SerializeJob j,
|
||||||
RsGenericSerializer::SerializeContext& ctx )
|
RsGenericSerializer::SerializeContext& ctx )
|
||||||
@ -167,7 +167,7 @@ public:
|
|||||||
|
|
||||||
switch(item_sub_id)
|
switch(item_sub_id)
|
||||||
{
|
{
|
||||||
case GXS_CHANNELS_CONFIG_SUBTYPE_NOTIFY_RECORD: return new RsGxsGroupNotifyRecordsItem();
|
case GXS_CHANNELS_CONFIG_SUBTYPE_NOTIFY_RECORD: return new RsGxsChannelNotifyRecordsItem();
|
||||||
default:
|
default:
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -178,7 +178,7 @@ bool p3GxsChannels::saveList(bool &cleanup, std::list<RsItem *>&saveList)
|
|||||||
{
|
{
|
||||||
cleanup = true ;
|
cleanup = true ;
|
||||||
|
|
||||||
RsGxsGroupNotifyRecordsItem *item = new RsGxsGroupNotifyRecordsItem ;
|
RsGxsChannelNotifyRecordsItem *item = new RsGxsChannelNotifyRecordsItem ;
|
||||||
|
|
||||||
{
|
{
|
||||||
RS_STACK_MUTEX(mKnownChannelsMutex);
|
RS_STACK_MUTEX(mKnownChannelsMutex);
|
||||||
@ -198,7 +198,7 @@ bool p3GxsChannels::loadList(std::list<RsItem *>& loadList)
|
|||||||
|
|
||||||
rstime_t now = time(NULL);
|
rstime_t now = time(NULL);
|
||||||
|
|
||||||
RsGxsGroupNotifyRecordsItem *fnr = dynamic_cast<RsGxsGroupNotifyRecordsItem*>(item) ;
|
RsGxsChannelNotifyRecordsItem *fnr = dynamic_cast<RsGxsChannelNotifyRecordsItem*>(item) ;
|
||||||
|
|
||||||
if(fnr)
|
if(fnr)
|
||||||
{
|
{
|
||||||
@ -206,7 +206,7 @@ bool p3GxsChannels::loadList(std::list<RsItem *>& loadList)
|
|||||||
mKnownChannels.clear();
|
mKnownChannels.clear();
|
||||||
|
|
||||||
for(auto it(fnr->records.begin());it!=fnr->records.end();++it)
|
for(auto it(fnr->records.begin());it!=fnr->records.end();++it)
|
||||||
if( it->second + GXS_CHANNELS_CONFIG_MAX_TIME_NOTIFY_STORAGE < now)
|
if( now < it->second + GXS_CHANNELS_CONFIG_MAX_TIME_NOTIFY_STORAGE)
|
||||||
mKnownChannels.insert(*it) ;
|
mKnownChannels.insert(*it) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,14 +96,14 @@ uint32_t p3GxsForums::forumsAuthenPolicy()
|
|||||||
static const uint32_t GXS_FORUMS_CONFIG_MAX_TIME_NOTIFY_STORAGE = 86400*30*2 ; // ignore notifications for 2 months
|
static const uint32_t GXS_FORUMS_CONFIG_MAX_TIME_NOTIFY_STORAGE = 86400*30*2 ; // ignore notifications for 2 months
|
||||||
static const uint8_t GXS_FORUMS_CONFIG_SUBTYPE_NOTIFY_RECORD = 0x01 ;
|
static const uint8_t GXS_FORUMS_CONFIG_SUBTYPE_NOTIFY_RECORD = 0x01 ;
|
||||||
|
|
||||||
struct RsGxsGroupNotifyRecordsItem: public RsItem
|
struct RsGxsForumNotifyRecordsItem: public RsItem
|
||||||
{
|
{
|
||||||
|
|
||||||
RsGxsGroupNotifyRecordsItem()
|
RsGxsForumNotifyRecordsItem()
|
||||||
: RsItem(RS_PKT_VERSION_SERVICE,RS_SERVICE_GXS_TYPE_FORUMS_CONFIG,GXS_FORUMS_CONFIG_SUBTYPE_NOTIFY_RECORD)
|
: RsItem(RS_PKT_VERSION_SERVICE,RS_SERVICE_GXS_TYPE_FORUMS_CONFIG,GXS_FORUMS_CONFIG_SUBTYPE_NOTIFY_RECORD)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
virtual ~RsGxsGroupNotifyRecordsItem() {}
|
virtual ~RsGxsForumNotifyRecordsItem() {}
|
||||||
|
|
||||||
void serial_process( RsGenericSerializer::SerializeJob j,
|
void serial_process( RsGenericSerializer::SerializeJob j,
|
||||||
RsGenericSerializer::SerializeContext& ctx )
|
RsGenericSerializer::SerializeContext& ctx )
|
||||||
@ -127,7 +127,7 @@ public:
|
|||||||
|
|
||||||
switch(item_sub_id)
|
switch(item_sub_id)
|
||||||
{
|
{
|
||||||
case GXS_FORUMS_CONFIG_SUBTYPE_NOTIFY_RECORD: return new RsGxsGroupNotifyRecordsItem();
|
case GXS_FORUMS_CONFIG_SUBTYPE_NOTIFY_RECORD: return new RsGxsForumNotifyRecordsItem();
|
||||||
default:
|
default:
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -138,7 +138,7 @@ bool p3GxsForums::saveList(bool &cleanup, std::list<RsItem *>&saveList)
|
|||||||
{
|
{
|
||||||
cleanup = true ;
|
cleanup = true ;
|
||||||
|
|
||||||
RsGxsGroupNotifyRecordsItem *item = new RsGxsGroupNotifyRecordsItem ;
|
RsGxsForumNotifyRecordsItem *item = new RsGxsForumNotifyRecordsItem ;
|
||||||
|
|
||||||
item->records = mKnownForums ;
|
item->records = mKnownForums ;
|
||||||
|
|
||||||
@ -155,14 +155,14 @@ bool p3GxsForums::loadList(std::list<RsItem *>& loadList)
|
|||||||
|
|
||||||
rstime_t now = time(NULL);
|
rstime_t now = time(NULL);
|
||||||
|
|
||||||
RsGxsGroupNotifyRecordsItem *fnr = dynamic_cast<RsGxsGroupNotifyRecordsItem*>(item) ;
|
RsGxsForumNotifyRecordsItem *fnr = dynamic_cast<RsGxsForumNotifyRecordsItem*>(item) ;
|
||||||
|
|
||||||
if(fnr != NULL)
|
if(fnr != NULL)
|
||||||
{
|
{
|
||||||
mKnownForums.clear();
|
mKnownForums.clear();
|
||||||
|
|
||||||
for(auto it(fnr->records.begin());it!=fnr->records.end();++it)
|
for(auto it(fnr->records.begin());it!=fnr->records.end();++it)
|
||||||
if( it->second + GXS_FORUMS_CONFIG_MAX_TIME_NOTIFY_STORAGE < now)
|
if( now < it->second + GXS_FORUMS_CONFIG_MAX_TIME_NOTIFY_STORAGE)
|
||||||
mKnownForums.insert(*it) ;
|
mKnownForums.insert(*it) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -158,14 +158,25 @@ void p3PostBase::notifyChanges(std::vector<RsGxsNotify *> &changes)
|
|||||||
|
|
||||||
for (auto git = grpList.begin(); git != grpList.end(); ++git)
|
for (auto git = grpList.begin(); git != grpList.end(); ++git)
|
||||||
{
|
{
|
||||||
#ifdef POSTBASE_DEBUG
|
if(mKnownPosted.find(*git) == mKnownPosted.end())
|
||||||
std::cerr << "p3PostBase::notifyChanges() Incoming Group: " << *git;
|
{
|
||||||
std::cerr << std::endl;
|
mKnownPosted.insert(std::make_pair(*git, time(nullptr)));
|
||||||
#endif
|
IndicateConfigChanged();
|
||||||
|
|
||||||
auto ev = std::make_shared<RsGxsPostedEvent>();
|
auto ev = std::make_shared<RsGxsPostedEvent>();
|
||||||
ev->mPostedGroupId = *git;
|
ev->mPostedGroupId = *git;
|
||||||
ev->mPostedEventCode = RsPostedEventCode::NEW_POSTED_GROUP;
|
ev->mPostedEventCode = RsPostedEventCode::NEW_POSTED_GROUP;
|
||||||
rsEvents->postEvent(ev);
|
rsEvents->postEvent(ev);
|
||||||
|
|
||||||
|
#ifdef POSTBASE_DEBUG
|
||||||
|
std::cerr << "p3PostBase::notifyChanges() Incoming Group: " << *git;
|
||||||
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
else
|
||||||
|
RsInfo() << __PRETTY_FUNCTION__
|
||||||
|
<< " Not notifying already known forum "
|
||||||
|
<< *git << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -828,3 +839,89 @@ void p3PostBase::handleResponse(uint32_t token, uint32_t req_type)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const uint32_t GXS_POSTED_CONFIG_MAX_TIME_NOTIFY_STORAGE = 86400*30*2 ; // ignore notifications for 2 months
|
||||||
|
static const uint8_t GXS_POSTED_CONFIG_SUBTYPE_NOTIFY_RECORD = 0x01 ;
|
||||||
|
|
||||||
|
struct RsGxsPostedNotifyRecordsItem: public RsItem
|
||||||
|
{
|
||||||
|
|
||||||
|
RsGxsPostedNotifyRecordsItem()
|
||||||
|
: RsItem(RS_PKT_VERSION_SERVICE,RS_SERVICE_GXS_TYPE_POSTED_CONFIG,GXS_POSTED_CONFIG_SUBTYPE_NOTIFY_RECORD)
|
||||||
|
{}
|
||||||
|
|
||||||
|
virtual ~RsGxsPostedNotifyRecordsItem() {}
|
||||||
|
|
||||||
|
void serial_process( RsGenericSerializer::SerializeJob j,
|
||||||
|
RsGenericSerializer::SerializeContext& ctx )
|
||||||
|
{ RS_SERIAL_PROCESS(records); }
|
||||||
|
|
||||||
|
void clear() {}
|
||||||
|
|
||||||
|
std::map<RsGxsGroupId,rstime_t> records;
|
||||||
|
};
|
||||||
|
|
||||||
|
class GxsPostedConfigSerializer : public RsServiceSerializer
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
GxsPostedConfigSerializer() : RsServiceSerializer(RS_SERVICE_GXS_TYPE_POSTED_CONFIG) {}
|
||||||
|
virtual ~GxsPostedConfigSerializer() {}
|
||||||
|
|
||||||
|
RsItem* create_item(uint16_t service_id, uint8_t item_sub_id) const
|
||||||
|
{
|
||||||
|
if(service_id != RS_SERVICE_GXS_TYPE_POSTED_CONFIG)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
switch(item_sub_id)
|
||||||
|
{
|
||||||
|
case GXS_POSTED_CONFIG_SUBTYPE_NOTIFY_RECORD: return new RsGxsPostedNotifyRecordsItem();
|
||||||
|
default:
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
bool p3PostBase::saveList(bool &cleanup, std::list<RsItem *>&saveList)
|
||||||
|
{
|
||||||
|
cleanup = true ;
|
||||||
|
|
||||||
|
RsGxsPostedNotifyRecordsItem *item = new RsGxsPostedNotifyRecordsItem ;
|
||||||
|
|
||||||
|
item->records = mKnownPosted ;
|
||||||
|
|
||||||
|
saveList.push_back(item) ;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool p3PostBase::loadList(std::list<RsItem *>& loadList)
|
||||||
|
{
|
||||||
|
while(!loadList.empty())
|
||||||
|
{
|
||||||
|
RsItem *item = loadList.front();
|
||||||
|
loadList.pop_front();
|
||||||
|
|
||||||
|
rstime_t now = time(NULL);
|
||||||
|
|
||||||
|
RsGxsPostedNotifyRecordsItem *fnr = dynamic_cast<RsGxsPostedNotifyRecordsItem*>(item) ;
|
||||||
|
|
||||||
|
if(fnr != NULL)
|
||||||
|
{
|
||||||
|
mKnownPosted.clear();
|
||||||
|
|
||||||
|
for(auto it(fnr->records.begin());it!=fnr->records.end();++it)
|
||||||
|
if( now < it->second + GXS_POSTED_CONFIG_MAX_TIME_NOTIFY_STORAGE)
|
||||||
|
mKnownPosted.insert(*it) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
delete item ;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
RsSerialiser* p3PostBase::setupSerialiser()
|
||||||
|
{
|
||||||
|
RsSerialiser* rss = new RsSerialiser;
|
||||||
|
rss->addSerialType(new GxsPostedConfigSerializer());
|
||||||
|
|
||||||
|
return rss;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ bool encodePostCache(std::string &str, const PostStats &s);
|
|||||||
bool extractPostCache(const std::string &str, PostStats &s);
|
bool extractPostCache(const std::string &str, PostStats &s);
|
||||||
|
|
||||||
|
|
||||||
class p3PostBase: public RsGenExchange, public GxsTokenQueue, public RsTickEvent
|
class p3PostBase: public RsGenExchange, public GxsTokenQueue, public RsTickEvent, public p3Config
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -82,6 +82,11 @@ virtual void handleResponse(uint32_t token, uint32_t req_type);
|
|||||||
// Overloaded from RsTickEvent.
|
// Overloaded from RsTickEvent.
|
||||||
virtual void handle_event(uint32_t event_type, const std::string &elabel);
|
virtual void handle_event(uint32_t event_type, const std::string &elabel);
|
||||||
|
|
||||||
|
// overloads p3Config
|
||||||
|
virtual RsSerialiser* setupSerialiser() override; // @see p3Config::setupSerialiser()
|
||||||
|
virtual bool saveList(bool &cleanup, std::list<RsItem *>&saveList) override; // @see p3Config::saveList(bool &cleanup, std::list<RsItem *>&)
|
||||||
|
virtual bool loadList(std::list<RsItem *>& loadList) override; // @see p3Config::loadList(std::list<RsItem *>&)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
@ -123,6 +128,7 @@ static uint32_t postBaseAuthenPolicy();
|
|||||||
std::list<RsGxsGroupId> mBgGroupList;
|
std::list<RsGxsGroupId> mBgGroupList;
|
||||||
std::map<RsGxsMessageId, PostStats> mBgStatsMap;
|
std::map<RsGxsMessageId, PostStats> mBgStatsMap;
|
||||||
|
|
||||||
|
std::map<RsGxsGroupId,rstime_t> mKnownPosted;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -16,90 +16,20 @@
|
|||||||
<property name="sizeGripEnabled">
|
<property name="sizeGripEnabled">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
<layout class="QGridLayout" name="gridLayout_5">
|
||||||
<item>
|
<item row="0" column="0" colspan="2">
|
||||||
<widget class="HeaderFrame" name="headerFrame">
|
<widget class="HeaderFrame" name="headerFrame">
|
||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
<enum>QFrame::StyledPanel</enum>
|
<enum>QFrame::NoFrame</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="frameShadow">
|
<property name="frameShadow">
|
||||||
<enum>QFrame::Raised</enum>
|
<enum>QFrame::Plain</enum>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="1" column="0">
|
||||||
<widget class="QFrame" name="frame">
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
<property name="sizePolicy">
|
<item row="0" column="0">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::StyledPanel</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShadow">
|
|
||||||
<enum>QFrame::Raised</enum>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3" stretch="0,10,0">
|
|
||||||
<item>
|
|
||||||
<widget class="QFrame" name="frame_2">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
|
|
||||||
<horstretch>10</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
|
||||||
<property name="horizontalSpacing">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="verticalSpacing">
|
|
||||||
<number>2</number>
|
|
||||||
</property>
|
|
||||||
<item row="0" column="2">
|
|
||||||
<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="1">
|
|
||||||
<widget class="QLabel" name="label_7">
|
|
||||||
<property name="text">
|
|
||||||
<string>Category:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="2">
|
|
||||||
<widget class="QLineEdit" name="lineEdit_Category">
|
|
||||||
<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" rowspan="3">
|
|
||||||
<widget class="QFrame" name="albumGroup">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>1</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_thumbNail">
|
<widget class="QLabel" name="label_thumbNail">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
@ -112,7 +42,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="1" column="0">
|
||||||
<spacer name="verticalSpacer">
|
<spacer name="verticalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
@ -120,16 +50,20 @@
|
|||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>20</width>
|
<width>20</width>
|
||||||
<height>40</height>
|
<height>12</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="2">
|
<item row="1" column="1">
|
||||||
<widget class="QLineEdit" name="lineEdit_Caption">
|
<layout class="QGridLayout" name="gridLayout_4">
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QLineEdit" name="lineEdit_Category">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
@ -142,26 +76,80 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="2" 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="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_7">
|
||||||
|
<property name="text">
|
||||||
|
<string>Category:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
<widget class="QLabel" name="label_8">
|
<widget class="QLabel" name="label_8">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Caption</string>
|
<string>Caption</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="label_9">
|
<widget class="QLabel" name="label_9">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Album Title:</string>
|
<string>Album Title:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
<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>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="3" column="1">
|
||||||
<widget class="QWidget" name="widget" native="true">
|
<spacer name="verticalSpacer_2">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<property name="orientation">
|
||||||
<item>
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>568</width>
|
||||||
|
<height>6</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0" colspan="2">
|
||||||
|
<widget class="QFrame" name="frame">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>1</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="label_10">
|
<widget class="QLabel" name="label_10">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||||
@ -172,7 +160,7 @@ p, li { white-space: pre-wrap; }
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="1" column="0">
|
||||||
<widget class="QScrollArea" name="scrollAreaPhotos">
|
<widget class="QScrollArea" name="scrollAreaPhotos">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
@ -197,8 +185,8 @@ p, li { white-space: pre-wrap; }
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>737</width>
|
<width>757</width>
|
||||||
<height>315</height>
|
<height>395</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -217,8 +205,20 @@ p, li { white-space: pre-wrap; }
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="3" column="0" colspan="2">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="pushButton_AddPhoto">
|
<widget class="QPushButton" name="pushButton_AddPhoto">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -271,9 +271,6 @@ p, li { white-space: pre-wrap; }
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>PhotoDrop</class>
|
<class>PhotoDrop</class>
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>229</width>
|
<width>230</width>
|
||||||
<height>234</height>
|
<height>217</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -28,7 +28,25 @@ border-radius: 10px}</string>
|
|||||||
<property name="frameShadow">
|
<property name="frameShadow">
|
||||||
<enum>QFrame::Raised</enum>
|
<enum>QFrame::Raised</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Preferred</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>18</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_Thumbnail">
|
<widget class="QLabel" name="label_Thumbnail">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -37,6 +55,24 @@ border-radius: 10px}</string>
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Preferred</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>18</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
@ -91,7 +127,7 @@ p, li { white-space: pre-wrap; }
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="2" column="0">
|
||||||
<spacer name="verticalSpacer">
|
<spacer name="verticalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
|
@ -25,6 +25,11 @@
|
|||||||
#include "retroshare/rsidentity.h"
|
#include "retroshare/rsidentity.h"
|
||||||
#include "gui/gxs/GxsCommentDialog.h"
|
#include "gui/gxs/GxsCommentDialog.h"
|
||||||
|
|
||||||
|
#define IMAGE_FULLSCREEN ":/icons/fullscreen.png"
|
||||||
|
#define IMAGE_FULLSCREENEXIT ":/icons/fullscreen-exit.png"
|
||||||
|
#define IMAGE_SHOW ":/icons/png/down-arrow.png"
|
||||||
|
#define IMAGE_HIDE ":/icons/png/up-arrow.png"
|
||||||
|
|
||||||
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)),
|
||||||
@ -76,8 +81,10 @@ void PhotoDialog::toggleDetails()
|
|||||||
{
|
{
|
||||||
if (ui->frame_details->isVisible()) {
|
if (ui->frame_details->isVisible()) {
|
||||||
ui->frame_details->setVisible(false);
|
ui->frame_details->setVisible(false);
|
||||||
|
ui->detailsButton->setIcon(QIcon(IMAGE_SHOW));
|
||||||
} else {
|
} else {
|
||||||
ui->frame_details->setVisible(true);
|
ui->frame_details->setVisible(true);
|
||||||
|
ui->detailsButton->setIcon(QIcon(IMAGE_HIDE));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -182,9 +189,11 @@ void PhotoDialog::setFullScreen()
|
|||||||
show();
|
show();
|
||||||
raise();
|
raise();
|
||||||
#endif
|
#endif
|
||||||
|
ui->fullscreenButton->setIcon(QIcon(IMAGE_FULLSCREENEXIT));
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
setWindowState( windowState() ^ Qt::WindowFullScreen );
|
setWindowState( windowState() ^ Qt::WindowFullScreen );
|
||||||
show();
|
show();
|
||||||
|
ui->fullscreenButton->setIcon(QIcon(IMAGE_FULLSCREEN));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>790</width>
|
<width>790</width>
|
||||||
<height>824</height>
|
<height>509</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -52,11 +52,24 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>558</width>
|
<width>540</width>
|
||||||
<height>551</height>
|
<height>318</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<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="QLabel" name="label_Photo">
|
<widget class="QLabel" name="label_Photo">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -74,8 +87,24 @@
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string>TextLabel</string>
|
<string>TextLabel</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
@ -92,8 +121,8 @@
|
|||||||
<string>...</string>
|
<string>...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../images.qrc">
|
<iconset resource="../icons.qrc">
|
||||||
<normaloff>:/images/window_fullscreen.png</normaloff>:/images/window_fullscreen.png</iconset>
|
<normaloff>:/icons/fullscreen.png</normaloff>:/icons/fullscreen.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="autoRaise">
|
<property name="autoRaise">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
@ -103,7 +132,11 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="detailsButton">
|
<widget class="QPushButton" name="detailsButton">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Details \/</string>
|
<string>Details</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../icons.qrc">
|
||||||
|
<normaloff>:/icons/png/down-arrow.png</normaloff>:/icons/png/down-arrow.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -136,6 +169,10 @@
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string><N> Comments >></string>
|
<string><N> Comments >></string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../icons.qrc">
|
||||||
|
<normaloff>:/icons/png/comment.png</normaloff>:/icons/png/comment.png</iconset>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
@ -255,6 +292,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../images.qrc"/>
|
<include location="../images.qrc"/>
|
||||||
|
<include location="../icons.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
@ -38,8 +38,8 @@
|
|||||||
<string>Create Album</string>
|
<string>Create Album</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../images.qrc">
|
<iconset resource="Photo_images.qrc">
|
||||||
<normaloff>:/images/add_image24.png</normaloff>:/images/add_image24.png</iconset>
|
<normaloff>:/images/album_create_64.png</normaloff>:/images/album_create_64.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
@ -62,7 +62,7 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../images.qrc">
|
<iconset resource="../images.qrc">
|
||||||
<normaloff>:/images/add_image24.png</normaloff>:/images/add_image24.png</iconset>
|
<normaloff>:/images/edit_16.png</normaloff>:/images/edit_16.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
@ -73,6 +73,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>
|
||||||
@ -283,7 +286,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>804</width>
|
<width>804</width>
|
||||||
<height>197</height>
|
<height>208</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
@ -319,7 +322,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>804</width>
|
<width>804</width>
|
||||||
<height>196</height>
|
<height>208</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
|
@ -22,6 +22,9 @@
|
|||||||
#include "gui/PhotoShare/PhotoDrop.h"
|
#include "gui/PhotoShare/PhotoDrop.h"
|
||||||
#include "gui/gxs/GxsIdDetails.h"
|
#include "gui/gxs/GxsIdDetails.h"
|
||||||
|
|
||||||
|
#define IMAGE_FULLSCREEN ":/icons/fullscreen.png"
|
||||||
|
#define IMAGE_FULLSCREENEXIT ":/icons/fullscreen-exit.png"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
@ -300,10 +303,12 @@ void PhotoSlideShow::setFullScreen()
|
|||||||
show();
|
show();
|
||||||
raise();
|
raise();
|
||||||
#endif
|
#endif
|
||||||
|
ui.fullscreenButton->setIcon(QIcon(IMAGE_FULLSCREENEXIT));
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
setWindowState( windowState() ^ Qt::WindowFullScreen );
|
setWindowState( windowState() ^ Qt::WindowFullScreen );
|
||||||
show();
|
show();
|
||||||
|
ui.fullscreenButton->setIcon(QIcon(IMAGE_FULLSCREEN));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,8 +98,8 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../images.qrc">
|
<iconset resource="../icons.qrc">
|
||||||
<normaloff>:/images/window_fullscreen.png</normaloff>:/images/window_fullscreen.png</iconset>
|
<normaloff>:/icons/fullscreen.png</normaloff>:/icons/fullscreen.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="autoRaise">
|
<property name="autoRaise">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
@ -157,6 +157,7 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<include location="Photo_images.qrc"/>
|
<include location="Photo_images.qrc"/>
|
||||||
<include location="../images.qrc"/>
|
<include location="../images.qrc"/>
|
||||||
|
<include location="../icons.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
@ -316,5 +316,7 @@
|
|||||||
<file>icons/textedit/smile.png</file>
|
<file>icons/textedit/smile.png</file>
|
||||||
<file>icons/textedit/font-increase.png</file>
|
<file>icons/textedit/font-increase.png</file>
|
||||||
<file>icons/textedit/code.png</file>
|
<file>icons/textedit/code.png</file>
|
||||||
|
<file>icons/fullscreen.png</file>
|
||||||
|
<file>icons/fullscreen-exit.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
BIN
retroshare-gui/src/gui/icons/fullscreen-exit.png
Normal file
BIN
retroshare-gui/src/gui/icons/fullscreen-exit.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
BIN
retroshare-gui/src/gui/icons/fullscreen.png
Normal file
BIN
retroshare-gui/src/gui/icons/fullscreen.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
Loading…
Reference in New Issue
Block a user