Added Timestamp for each Channel Message

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2067 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2010-01-17 22:25:37 +00:00
parent c9764e5f00
commit 28882efe03
2 changed files with 38 additions and 9 deletions

View File

@ -19,6 +19,7 @@
* Boston, MA 02110-1301, USA.
****************************************************************/
#include <QtGui>
#include <QDateTime>
#include "ChanMsgItem.h"
@ -90,6 +91,11 @@ void ChanMsgItem::updateItemStatic()
titleLabel->setText(QString::fromStdWString(cmi.subject));
subjectLabel->setText(QString::fromStdWString(cmi.msg));
}
QDateTime qtime;
qtime.setTime_t(cmi.ts);
QString timestamp = qtime.toString("dd.MMMM yyyy hh:mm:ss");
datetimelabel->setText(timestamp);
msgLabel->setText(QString::fromStdWString(cmi.msg));

View File

@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>515</width>
<width>558</width>
<height>213</height>
</rect>
</property>
@ -82,7 +82,7 @@ border-radius: 10px;}</string>
</item>
<item row="0" column="1">
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" colspan="6">
<item row="0" column="0" colspan="3">
<widget class="QLabel" name="titleLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
@ -107,7 +107,24 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="1" column="0" colspan="6">
<item row="0" column="3" colspan="4">
<widget class="QLabel" name="datetimelabel">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<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; color:#666666;&quot;&gt;DateTime&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="7">
<widget class="QLabel" name="subjectLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Expanding">
@ -116,7 +133,11 @@ p, li { white-space: pre-wrap; }
</sizepolicy>
</property>
<property name="text">
<string>Short Description</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:400; 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; color:#666666;&quot;&gt;Short Description&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
@ -141,13 +162,13 @@ p, li { white-space: pre-wrap; }
</property>
<property name="sizeHint" stdset="0">
<size>
<width>18</width>
<width>67</width>
<height>21</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="2">
<item row="2" column="2" colspan="2">
<widget class="QPushButton" name="unsubscribeButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
@ -167,7 +188,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="2" column="3">
<item row="2" column="4">
<widget class="QPushButton" name="clearButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
@ -187,7 +208,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="2" column="4">
<item row="2" column="5">
<widget class="QPushButton" name="playButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
@ -207,7 +228,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="2" column="5">
<item row="2" column="6">
<widget class="QPushButton" name="expandButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
@ -298,6 +319,8 @@ border-radius: 10px;}</string>
<include location="../images.qrc"/>
<include location="../images.qrc"/>
<include location="../images.qrc"/>
<include location="../images.qrc"/>
<include location="../images.qrc"/>
</resources>
<connections/>
</ui>