mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-11-30 04:16:40 -05:00
Replaced scroll area in NewsFeed with RSFeedWidget.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7680 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
dcabaf780d
commit
dee39a8840
20 changed files with 477 additions and 290 deletions
|
|
@ -39,8 +39,8 @@
|
|||
****/
|
||||
|
||||
/** Constructor */
|
||||
MsgItem::MsgItem(FeedHolder *parent, uint32_t feedId, const std::string &msgId, bool isHome)
|
||||
:QWidget(NULL), mParent(parent), mFeedId(feedId), mMsgId(msgId), mIsHome(isHome)
|
||||
MsgItem::MsgItem(FeedHolder *parent, uint32_t feedId, const std::string &msgId, bool isHome) :
|
||||
FeedItem(NULL), mParent(parent), mFeedId(feedId), mMsgId(msgId), mIsHome(isHome)
|
||||
{
|
||||
/* Invoke the Qt Designer generated object setup routine */
|
||||
setupUi(this);
|
||||
|
|
@ -194,24 +194,34 @@ void MsgItem::updateItem()
|
|||
|
||||
void MsgItem::toggle()
|
||||
{
|
||||
mParent->lockLayout(this, true);
|
||||
expand(expandFrame->isHidden());
|
||||
}
|
||||
|
||||
if (expandFrame->isHidden())
|
||||
void MsgItem::expand(bool open)
|
||||
{
|
||||
if (mParent) {
|
||||
mParent->lockLayout(this, true);
|
||||
}
|
||||
|
||||
if (open)
|
||||
{
|
||||
expandFrame->show();
|
||||
expandButton->setIcon(QIcon(QString(":/images/edit_remove24.png")));
|
||||
expandButton->setToolTip(tr("Hide"));
|
||||
expandButton->setToolTip(tr("Hide"));
|
||||
}
|
||||
else
|
||||
{
|
||||
expandFrame->hide();
|
||||
expandButton->setIcon(QIcon(QString(":/images/edit_add24.png")));
|
||||
expandButton->setToolTip(tr("Expand"));
|
||||
expandButton->setIcon(QIcon(QString(":/images/edit_add24.png")));
|
||||
expandButton->setToolTip(tr("Expand"));
|
||||
}
|
||||
|
||||
mParent->lockLayout(this, false);
|
||||
}
|
||||
emit sizeChanged(this);
|
||||
|
||||
if (mParent) {
|
||||
mParent->lockLayout(this, false);
|
||||
}
|
||||
}
|
||||
|
||||
void MsgItem::removeItem()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue