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. * Boston, MA 02110-1301, USA.
****************************************************************/ ****************************************************************/
#include <QtGui> #include <QtGui>
#include <QDateTime>
#include "ChanMsgItem.h" #include "ChanMsgItem.h"
@ -91,6 +92,11 @@ void ChanMsgItem::updateItemStatic()
subjectLabel->setText(QString::fromStdWString(cmi.msg)); 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)); msgLabel->setText(QString::fromStdWString(cmi.msg));
std::list<FileInfo>::iterator it; std::list<FileInfo>::iterator it;

View File

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