mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-27 02:11:27 -05:00
Added Notes button to view notes
This commit is contained in:
parent
4f3920a33a
commit
63d346f63d
@ -91,6 +91,7 @@ void PostedItem::setup()
|
|||||||
ui->newCommentLabel->hide();
|
ui->newCommentLabel->hide();
|
||||||
ui->frame_picture->hide();
|
ui->frame_picture->hide();
|
||||||
ui->commLabel->hide();
|
ui->commLabel->hide();
|
||||||
|
ui->frame_notes->hide();
|
||||||
|
|
||||||
/* general ones */
|
/* general ones */
|
||||||
connect(ui->clearButton, SIGNAL(clicked()), this, SLOT(removeItem()));
|
connect(ui->clearButton, SIGNAL(clicked()), this, SLOT(removeItem()));
|
||||||
@ -102,6 +103,7 @@ void PostedItem::setup()
|
|||||||
connect(ui->voteUpButton, SIGNAL(clicked()), this, SLOT(makeUpVote()));
|
connect(ui->voteUpButton, SIGNAL(clicked()), this, SLOT(makeUpVote()));
|
||||||
connect(ui->voteDownButton, SIGNAL(clicked()), this, SLOT( makeDownVote()));
|
connect(ui->voteDownButton, SIGNAL(clicked()), this, SLOT( makeDownVote()));
|
||||||
connect(ui->expandButton, SIGNAL(clicked()), this, SLOT( toggle()));
|
connect(ui->expandButton, SIGNAL(clicked()), this, SLOT( toggle()));
|
||||||
|
connect(ui->notesButton, SIGNAL(clicked()), this, SLOT( toggleNotes()));
|
||||||
|
|
||||||
connect(ui->readButton, SIGNAL(toggled(bool)), this, SLOT(readToggled(bool)));
|
connect(ui->readButton, SIGNAL(toggled(bool)), this, SLOT(readToggled(bool)));
|
||||||
|
|
||||||
@ -310,7 +312,7 @@ void PostedItem::fill()
|
|||||||
// FIX THIS UP LATER.
|
// FIX THIS UP LATER.
|
||||||
ui->notes->setText(QString::fromUtf8(mPost.mNotes.c_str()));
|
ui->notes->setText(QString::fromUtf8(mPost.mNotes.c_str()));
|
||||||
if(ui->notes->text().isEmpty())
|
if(ui->notes->text().isEmpty())
|
||||||
ui->frame_notes->hide();
|
ui->notesButton->hide();
|
||||||
// differences between Feed or Top of Comment.
|
// differences between Feed or Top of Comment.
|
||||||
if (mFeedHolder)
|
if (mFeedHolder)
|
||||||
{
|
{
|
||||||
@ -528,3 +530,16 @@ void PostedItem::copyMessageLink()
|
|||||||
RSLinkClipboard::copyLinks(urls);
|
RSLinkClipboard::copyLinks(urls);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PostedItem::toggleNotes()
|
||||||
|
{
|
||||||
|
if (ui->notesButton->isChecked())
|
||||||
|
{
|
||||||
|
ui->frame_notes->show();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ui->frame_notes->hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
@ -61,6 +61,7 @@ private slots:
|
|||||||
void readAndClearItem();
|
void readAndClearItem();
|
||||||
void toggle();
|
void toggle();
|
||||||
void copyMessageLink();
|
void copyMessageLink();
|
||||||
|
void toggleNotes();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void vote(const RsGxsGrpMsgIdPair& msgId, bool up);
|
void vote(const RsGxsGrpMsgIdPair& msgId, bool up);
|
||||||
|
@ -513,6 +513,26 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="notesButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Notes</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="Posted_images.qrc">
|
||||||
|
<normaloff>:/images/notes.png</normaloff>:/images/notes.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="toolButtonStyle">
|
||||||
|
<enum>Qt::ToolButtonTextBesideIcon</enum>
|
||||||
|
</property>
|
||||||
|
<property name="autoRaise">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer">
|
<spacer name="horizontalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
@ -630,23 +650,23 @@
|
|||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QFrame" name="frame_notes">
|
<widget class="QFrame" name="frame_notes">
|
||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
<enum>QFrame::NoFrame</enum>
|
<enum>QFrame::Box</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="frameShadow">
|
<property name="frameShadow">
|
||||||
<enum>QFrame::Sunken</enum>
|
<enum>QFrame::Sunken</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>1</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="topMargin">
|
<property name="topMargin">
|
||||||
<number>1</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="rightMargin">
|
<property name="rightMargin">
|
||||||
<number>1</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="bottomMargin">
|
<property name="bottomMargin">
|
||||||
<number>1</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>1</number>
|
<number>1</number>
|
||||||
|
@ -18,5 +18,6 @@
|
|||||||
<file>images/comments.png</file>
|
<file>images/comments.png</file>
|
||||||
<file>images/thumb-default.png</file>
|
<file>images/thumb-default.png</file>
|
||||||
<file>images/share.png</file>
|
<file>images/share.png</file>
|
||||||
|
<file>images/notes.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
BIN
retroshare-gui/src/gui/Posted/images/notes.png
Normal file
BIN
retroshare-gui/src/gui/Posted/images/notes.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
Loading…
x
Reference in New Issue
Block a user