mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04: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->frame_picture->hide();
|
||||
ui->commLabel->hide();
|
||||
ui->frame_notes->hide();
|
||||
|
||||
/* general ones */
|
||||
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->voteDownButton, SIGNAL(clicked()), this, SLOT( makeDownVote()));
|
||||
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)));
|
||||
|
||||
@ -310,7 +312,7 @@ void PostedItem::fill()
|
||||
// FIX THIS UP LATER.
|
||||
ui->notes->setText(QString::fromUtf8(mPost.mNotes.c_str()));
|
||||
if(ui->notes->text().isEmpty())
|
||||
ui->frame_notes->hide();
|
||||
ui->notesButton->hide();
|
||||
// differences between Feed or Top of Comment.
|
||||
if (mFeedHolder)
|
||||
{
|
||||
@ -528,3 +530,16 @@ void PostedItem::copyMessageLink()
|
||||
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 toggle();
|
||||
void copyMessageLink();
|
||||
void toggleNotes();
|
||||
|
||||
signals:
|
||||
void vote(const RsGxsGrpMsgIdPair& msgId, bool up);
|
||||
|
@ -513,6 +513,26 @@
|
||||
</property>
|
||||
</widget>
|
||||
</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>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
@ -630,23 +650,23 @@
|
||||
<item row="2" column="0">
|
||||
<widget class="QFrame" name="frame_notes">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
<enum>QFrame::Box</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Sunken</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="leftMargin">
|
||||
<number>1</number>
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>1</number>
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>1</number>
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>1</number>
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
|
@ -18,5 +18,6 @@
|
||||
<file>images/comments.png</file>
|
||||
<file>images/thumb-default.png</file>
|
||||
<file>images/share.png</file>
|
||||
<file>images/notes.png</file>
|
||||
</qresource>
|
||||
</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…
Reference in New Issue
Block a user