Added display labels to show positive and negative votes

This commit is contained in:
defnax 2017-01-03 16:43:31 +01:00
parent 0ba28a206d
commit 5469eb168d
2 changed files with 149 additions and 64 deletions

View File

@ -1855,6 +1855,9 @@ void IdDialog::insertIdDetails(uint32_t token)
frep_string = tr("No votes from friends") ;
ui->neighborNodesOpinion_TF->setText(frep_string) ;
ui->label_positive->setText(QString::number(info.mFriendsPositiveVotes));
ui->label_negative->setText(QString::number(info.mFriendsNegativeVotes));
switch(info.mOverallReputationLevel)
{

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>1269</width>
<height>1040</height>
<height>792</height>
</rect>
</property>
<property name="sizePolicy">
@ -131,7 +131,7 @@
</layout>
</widget>
</item>
<item row="1" column="0">
<item row="2" column="0">
<widget class="QSplitter" name="mainSplitter">
<property name="orientation">
<enum>Qt::Horizontal</enum>
@ -325,7 +325,7 @@
<property name="title">
<string>Identity info</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<widget class="QLabel" name="label_Nickname">
<property name="text">
@ -343,9 +343,9 @@
</property>
</widget>
</item>
<item row="0" column="2" rowspan="10">
<layout class="QVBoxLayout" name="detailAvatarVLayout">
<item>
<item row="0" column="2" rowspan="11">
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="avatarLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
@ -382,22 +382,104 @@
</property>
</widget>
</item>
<item>
<item row="1" column="0">
<widget class="QPushButton" name="inviteButton">
<property name="text">
<string>Send Invite</string>
</property>
</widget>
</item>
<item>
<spacer name="avatarVSpacer">
<item row="2" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="spacing">
<number>6</number>
</property>
<item>
<widget class="QLabel" name="label_4">
<property name="maximumSize">
<size>
<width>34</width>
<height>34</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../icons.qrc">:/icons/png/thumbs-up.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_positive">
<property name="font">
<font>
<pointsize>16</pointsize>
</font>
</property>
<property name="toolTip">
<string>Positive votes</string>
</property>
<property name="text">
<string>0</string>
</property>
</widget>
</item>
<item>
<widget class="Line" name="line_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_5">
<property name="maximumSize">
<size>
<width>34</width>
<height>34</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../icons.qrc">:/icons/png/thumbs-down.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_negative">
<property name="font">
<font>
<pointsize>16</pointsize>
</font>
</property>
<property name="toolTip">
<string>Negative votes</string>
</property>
<property name="text">
<string>0</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="3" column="0">
<spacer name="avatarVSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>2</height>
<width>118</width>
<height>17</height>
</size>
</property>
</spacer>
@ -482,57 +564,10 @@
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QLabel" name="banoption_label">
<item row="7" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Ban-option:</string>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QCheckBox" name="autoBanIdentities_CB">
<property name="text">
<string>Auto-Ban all identities signed by the same node</string>
</property>
</widget>
</item>
<item row="9" column="0">
<widget class="QLabel" name="neighborNodesOpinion_LB">
<property name="text">
<string>Friend votes:</string>
</property>
</widget>
</item>
<item row="9" column="1">
<widget class="QLineEdit" name="neighborNodesOpinion_TF">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Average opinion of neighbor nodes about this identity. Negative is bad,&lt;/p&gt;&lt;p&gt;positive is good. Zero is neutral.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="10" column="0">
<widget class="QLabel" name="overallOpinion_LB">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Overall:</string>
</property>
</widget>
</item>
<item row="10" column="1">
<widget class="QLineEdit" name="overallOpinion_TF">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Overall reputation score, accounting for yours and your friends'.&lt;/p&gt;&lt;p&gt;Negative is bad, positive is good. Zero is neutral. If the score is too low,&lt;/p&gt;&lt;p&gt;the identity is flagged as bad, and will be filtered out in forums, chat lobbies,&lt;/p&gt;&lt;p&gt;channels, etc.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="readOnly">
<bool>true</bool>
<string>Your opinion:</string>
</property>
</widget>
</item>
@ -592,10 +627,57 @@ p, li { white-space: pre-wrap; }
</item>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="label">
<item row="8" column="0">
<widget class="QLabel" name="banoption_label">
<property name="text">
<string>Your opinion:</string>
<string>Ban-option:</string>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QCheckBox" name="autoBanIdentities_CB">
<property name="text">
<string>Auto-Ban all identities signed by the same node</string>
</property>
</widget>
</item>
<item row="9" column="0">
<widget class="QLabel" name="neighborNodesOpinion_LB">
<property name="text">
<string>Friend votes:</string>
</property>
</widget>
</item>
<item row="9" column="1">
<widget class="QLineEdit" name="neighborNodesOpinion_TF">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Average opinion of neighbor nodes about this identity. Negative is bad,&lt;/p&gt;&lt;p&gt;positive is good. Zero is neutral.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="10" column="0">
<widget class="QLabel" name="overallOpinion_LB">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Overall:</string>
</property>
</widget>
</item>
<item row="10" column="1">
<widget class="QLineEdit" name="overallOpinion_TF">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Overall reputation score, accounting for yours and your friends'.&lt;/p&gt;&lt;p&gt;Negative is bad, positive is good. Zero is neutral. If the score is too low,&lt;/p&gt;&lt;p&gt;the identity is flagged as bad, and will be filtered out in forums, chat lobbies,&lt;/p&gt;&lt;p&gt;channels, etc.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>