few design improvements for Feeds Peer Item

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2228 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2010-02-07 17:40:22 +00:00
parent dcfdaf44e0
commit 9aae5520e9
2 changed files with 67 additions and 78 deletions

View File

@ -176,10 +176,10 @@ void PeerItem::updateItem()
ipLabel->setText(QString::fromStdString(out.str()));
}
time_t now = time(NULL);
connLabel->setText(QString::fromStdString(details.autoconnect));
lastLabel->setText(QString::fromStdString(
RsPeerLastConnectString(now - details.lastConnect)));
QDateTime date = QDateTime::fromTime_t(details.lastConnect);
QString stime = date.toString(Qt::LocalDate);
lastLabel-> setText(stime);
/* do buttons */
chatButton->setEnabled(details.state & RS_PEER_STATE_CONNECTED);

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>652</width>
<height>323</height>
<height>282</height>
</rect>
</property>
<property name="windowTitle">
@ -263,7 +263,7 @@ border-radius: 10px}</string>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/ddeny.png</normaloff>:/images/ddeny.png</iconset>
<normaloff>:/images/removefriend16.png</normaloff>:/images/removefriend16.png</iconset>
</property>
</widget>
</item>
@ -349,11 +349,11 @@ border-radius: 10px}</string>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QVBoxLayout">
<item>
<layout class="QHBoxLayout">
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<layout class="QVBoxLayout">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="label_3">
<property name="font">
@ -376,7 +376,11 @@ border-radius: 10px}</string>
</font>
</property>
<property name="text">
<string>RsId:</string>
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:600; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;Peer Id:&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
@ -419,10 +423,49 @@ border-radius: 10px}</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_8">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>IP Address</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_9">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Connection Method</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_10">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Last Contact:</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QLabel" name="nameLabel">
<property name="sizePolicy">
@ -488,73 +531,6 @@ border-radius: 10px}</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout">
<item>
<layout class="QVBoxLayout">
<item>
<widget class="QLabel" name="label_8">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>IP Address</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_9">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Connection Method</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_10">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Last Contact:</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout">
<item>
<widget class="QLabel" name="ipLabel">
<property name="sizePolicy">
@ -598,6 +574,19 @@ border-radius: 10px}</string>
</item>
</layout>
</item>
<item row="1" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>