summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-06-10 16:49:49 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-06-10 16:49:49 (GMT)
commit7214d768dca85a6d43892169d5008898249dce73 (patch)
tree0f8b2820c9cb58f058263c78306987d934fec526 /Swift/QtUI/SystemMessageSnippet.cpp
parentfd89da91d12b270d56f60544cad6f1ddc809af28 (diff)
downloadswift-7214d768dca85a6d43892169d5008898249dce73.zip
swift-7214d768dca85a6d43892169d5008898249dce73.tar.bz2
Moved UI/Qt -> Swift/QtUI.
Diffstat (limited to 'Swift/QtUI/SystemMessageSnippet.cpp')
-rw-r--r--Swift/QtUI/SystemMessageSnippet.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/Swift/QtUI/SystemMessageSnippet.cpp b/Swift/QtUI/SystemMessageSnippet.cpp
new file mode 100644
index 0000000..d8feddc
--- /dev/null
+++ b/Swift/QtUI/SystemMessageSnippet.cpp
@@ -0,0 +1,15 @@
+#include "SystemMessageSnippet.h"
+
+#include <QDateTime>
+
+namespace Swift {
+
+SystemMessageSnippet::SystemMessageSnippet(const QString& message, const QDateTime& time, bool appendToPrevious) : ChatSnippet(appendToPrevious) {
+ content_ = loadTemplate(":/themes/Default/Status.html");
+
+ content_.replace("%message%", escape(message));
+ content_.replace("%shortTime%", escape(time.toString("h:mm")));
+ content_.replace("%time%", escape(time.toString("h:mm")));
+}
+
+}