add include directory
diff --git a/demo/chatdialog.cpp b/demo/chatdialog.cpp
index 9dac70b..0163df9 100644
--- a/demo/chatdialog.cpp
+++ b/demo/chatdialog.cpp
@@ -13,6 +13,11 @@
m_nick = "Tester";
m_chatroom = "Test";
+ DigestTreeScene *scene = new DigestTreeScene();
+
+ treeViewer->setScene(scene);
+ scene->plot();
+
connect(lineEdit, SIGNAL(returnPressed()), this, SLOT(returnPressed()));
}
diff --git a/demo/chatdialog.h b/demo/chatdialog.h
index 4c24335..b4c4b24 100644
--- a/demo/chatdialog.h
+++ b/demo/chatdialog.h
@@ -1,5 +1,8 @@
#ifndef CHATDIALOG_H
#define CHATDIALOG_H
+#include <boost/function.hpp>
+#include <vector>
+#include "digesttreescene.h"
#include "ui_chatdialog.h"
#include "chatbuf.pb.h"
@@ -9,17 +12,19 @@
public:
ChatDialog(QWidget *parent = 0);
-
-public slots:
void appendMessage(const SyncDemo::ChatMessage &msg);
- void updateTreeView();
+ void processData(const std::vector<MisingDataInfo> &, SyncAppSocket *);
+
+private:
+ void formChatMessage(const QString &text, SyncDemo::ChatMessage &msg);
private slots:
void returnPressed();
- void formChatMessage(const QString &text, SyncDemo::ChatMessage &msg);
private:
QString m_nick;
QString m_chatroom;
+ QString m_prefix;
+ Sync::SyncAppSocket *m_sock;
};
#endif
diff --git a/demo/chatdialog.ui b/demo/chatdialog.ui
index 072d139..b7a6747 100644
--- a/demo/chatdialog.ui
+++ b/demo/chatdialog.ui
@@ -25,7 +25,7 @@
<number>6</number>
</property>
<item>
- <widget class="DigestTreeViewer" name="treeViewer">
+ <widget class="QGraphicsView" name="treeViewer">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
diff --git a/demo/digesttreeviewer.cpp b/demo/digesttreeviewer.cpp
deleted file mode 100644
index 631ab92..0000000
--- a/demo/digesttreeviewer.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
-#include "digesttreeviewer.h"
-#include "digesttreescene.h"
-#include <QtGui>
-
-DigestTreeViewer::DigestTreeViewer(QWidget *parent)
- : QGraphicsView(parent)
-{
- DigestTreeScene *scene = new DigestTreeScene(this);
- setScene(scene);
- scene->plot();
- scene->plot();
-}
diff --git a/demo/digesttreeviewer.h b/demo/digesttreeviewer.h
deleted file mode 100644
index 0f09f67..0000000
--- a/demo/digesttreeviewer.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef DIGESTTREEVIEWER_H
-#define DIGESTTREEVIEWER_H
-#include <QtGui/QGraphicsView>
-
-class DigestTreeViewer : public QGraphicsView
-{
- Q_OBJECT
-
-public:
- DigestTreeViewer(QWidget *parent = 0);
-};
-
-#endif
diff --git a/demo/sync-demo.pro b/demo/sync-demo.pro
index ce3ac5a..402fee2 100644
--- a/demo/sync-demo.pro
+++ b/demo/sync-demo.pro
@@ -1,12 +1,10 @@
TEMPLATE = app
TARGET = sync-demo
HEADERS = chatdialog.h \
- digesttreeviewer.h \
digesttreescene.h
SOURCES = main.cpp \
chatdialog.cpp \
- digesttreeviewer.cpp \
digesttreescene.cpp
FORMS = chatdialog.ui