summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/QtViewHistoryWindow.cpp')
-rw-r--r--Swift/QtUI/QtViewHistoryWindow.cpp22
1 files changed, 18 insertions, 4 deletions
diff --git a/Swift/QtUI/QtViewHistoryWindow.cpp b/Swift/QtUI/QtViewHistoryWindow.cpp
index 56543a2..b862971 100644
--- a/Swift/QtUI/QtViewHistoryWindow.cpp
+++ b/Swift/QtUI/QtViewHistoryWindow.cpp
@@ -18,26 +18,40 @@
#include <QStandardItemModel>
#include <boost/bind.hpp>
-#include <cstdio>
+#include <stdio.h>
+
+#include "boost/date_time/posix_time/posix_time.hpp"
namespace Swift {
QtViewHistoryWindow::QtViewHistoryWindow() {
ui.setupUi(this);
- QtChatTheme *theme = new QtChatTheme(""); // Where should I get the theme path from?
- messageLog_ = new QtChatView(theme, this);
- ui.chatView_ = messageLog_;
QStandardItemModel *dummyModel = new QStandardItemModel(1, 1);
QStandardItem *item = new QStandardItem(QString("test row, test column"));
dummyModel->setItem(0, 0, item);
QTreeView *userHistory = new QTreeView();
userHistory->setModel(dummyModel);
ui.userHistory_ = userHistory;
+ addDummyMessage();
connect(ui.periodPickerBefore_, SIGNAL(valueChanged(int)), this, SLOT(handleBeforeSliderValueChanged(int)));
connect(ui.periodPickerAfter_, SIGNAL(valueChanged(int)), this, SLOT(handleAfterSliderValueChanged(int)));
show();
}
+void QtViewHistoryWindow::addDummyMessage() {
+ QtChatTheme *theme = new QtChatTheme(""); // Where should I get the theme path from?
+ QString *htmlString = new QString("test");
+ boost::posix_time::ptime time = boost::posix_time::microsec_clock::universal_time();
+ QtChatView* messageLog_ = new QtChatView(theme, 0);
+ std::string id = "test";
+ std::string path = "";
+ messageLog_->addMessage(boost::shared_ptr <ChatSnippet>(new MessageSnippet(*htmlString, *htmlString, B2QDATE(time), P2QSTRING(path), true, false, theme, P2QSTRING(id))));
+ messageLog_->addMessage(boost::shared_ptr <ChatSnippet>(new MessageSnippet(*htmlString, *htmlString, B2QDATE(time), P2QSTRING(path), true, false, theme, P2QSTRING(id))));
+ messageLog_->addMessage(boost::shared_ptr <ChatSnippet>(new MessageSnippet(*htmlString, *htmlString, B2QDATE(time), P2QSTRING(path), true, false, theme, P2QSTRING(id))));
+ messageLog_->addMessage(boost::shared_ptr <ChatSnippet>(new MessageSnippet(*htmlString, *htmlString, B2QDATE(time), P2QSTRING(path), true, false, theme, P2QSTRING(id))));
+ ui.chatView_ = messageLog_;
+}
+
void QtViewHistoryWindow::show() {
QWidget::show();
QWidget::activateWindow();