diff options
author | Vlad Voicu <vladvoic@gmail.com> | 2011-05-31 19:30:55 (GMT) |
---|---|---|
committer | Vlad Voicu <vladvoic@gmail.com> | 2011-05-31 19:30:55 (GMT) |
commit | 4c7bc4e22039f5b6c98eea584ec7103bfe04c155 (patch) | |
tree | 985dde55252b5c01143051abd90fe086f9d271ac /Swift/QtUI/QtViewHistoryWindow.cpp | |
parent | fc873c7c00066f787b027717fdc9870c0d61f877 (diff) | |
download | swift-contrib-vladv/history.zip swift-contrib-vladv/history.tar.bz2 |
Added dummy messages that workvladv/history
Diffstat (limited to 'Swift/QtUI/QtViewHistoryWindow.cpp')
-rw-r--r-- | Swift/QtUI/QtViewHistoryWindow.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Swift/QtUI/QtViewHistoryWindow.cpp b/Swift/QtUI/QtViewHistoryWindow.cpp index b862971..e81eabd 100644 --- a/Swift/QtUI/QtViewHistoryWindow.cpp +++ b/Swift/QtUI/QtViewHistoryWindow.cpp @@ -26,12 +26,12 @@ namespace Swift { QtViewHistoryWindow::QtViewHistoryWindow() { ui.setupUi(this); - QStandardItemModel *dummyModel = new QStandardItemModel(1, 1); + QStandardItemModel *dummyModel = new QStandardItemModel(2, 2); QStandardItem *item = new QStandardItem(QString("test row, test column")); + QStandardItem *item2 = new QStandardItem(QString("test row2, test column2")); dummyModel->setItem(0, 0, item); - QTreeView *userHistory = new QTreeView(); - userHistory->setModel(dummyModel); - ui.userHistory_ = userHistory; + dummyModel->setItem(0, 1, item2); + ui.userHistory_->setModel(dummyModel); addDummyMessage(); connect(ui.periodPickerBefore_, SIGNAL(valueChanged(int)), this, SLOT(handleBeforeSliderValueChanged(int))); connect(ui.periodPickerAfter_, SIGNAL(valueChanged(int)), this, SLOT(handleAfterSliderValueChanged(int))); @@ -42,14 +42,14 @@ 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); + QtChatView* messageLog_ = new QtChatView(theme, NULL); 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_; + ui.chatView_->addWidget(messageLog_); } void QtViewHistoryWindow::show() { |