Add ChatDialog
diff --git a/src/chatdialog.cpp b/src/chatdialog.cpp
new file mode 100644
index 0000000..1c3e37e
--- /dev/null
+++ b/src/chatdialog.cpp
@@ -0,0 +1,42 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2013, Regents of the University of California
+ * Yingdi Yu
+ *
+ * BSD license, See the LICENSE file for more information
+ *
+ * Author: Yingdi Yu <yingdi@cs.ucla.edu>
+ */
+
+#include "chatdialog.h"
+#include "ui_chatdialog.h"
+
+using namespace std;
+using namespace ndn;
+
+ChatDialog::ChatDialog(const Name& chatroomPrefix,
+ const Name& localPrefix,
+ QWidget *parent)
+ : QDialog(parent)
+ , m_chatroomPrefix(chatroomPrefix)
+ , m_localPrefix(localPrefix)
+ , ui(new Ui::ChatDialog)
+{
+ ui->setupUi(this);
+}
+
+ChatDialog::~ChatDialog()
+{
+ delete ui;
+}
+
+void
+ChatDialog::sendInvitation()
+{
+
+}
+
+#if WAF
+#include "chatdialog.moc"
+#include "chatdialog.cpp.moc"
+#endif
diff --git a/src/chatdialog.h b/src/chatdialog.h
new file mode 100644
index 0000000..77feea1
--- /dev/null
+++ b/src/chatdialog.h
@@ -0,0 +1,51 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2013, Regents of the University of California
+ * Yingdi Yu
+ *
+ * BSD license, See the LICENSE file for more information
+ *
+ * Author: Yingdi Yu <yingdi@cs.ucla.edu>
+ */
+
+#ifndef CHATDIALOG_H
+#define CHATDIALOG_H
+
+#include <QDialog>
+
+#ifndef Q_MOC_RUN
+#include <ndn.cxx/data.h>
+#endif
+
+namespace Ui {
+class ChatDialog;
+}
+
+class ChatDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ explicit ChatDialog(const ndn::Name& chatroomPrefix,
+ const ndn::Name& localPrefix,
+ QWidget *parent = 0);
+ ~ChatDialog();
+
+ const ndn::Name&
+ getChatroomPrefix() const
+ { return m_chatroomPrefix; }
+
+ const ndn::Name&
+ getLocalPrefix() const
+ { return m_localPrefix; }
+
+ void
+ sendInvitation();
+
+private:
+ Ui::ChatDialog *ui;
+ ndn::Name m_chatroomPrefix;
+ ndn::Name m_localPrefix;
+};
+
+#endif // ChatDIALOG_H
diff --git a/src/chatdialog.ui b/src/chatdialog.ui
new file mode 100644
index 0000000..2380f3d
--- /dev/null
+++ b/src/chatdialog.ui
@@ -0,0 +1,176 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>ChatDialog</class>
+ <widget class="QDialog" name="ChatDialog">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>838</width>
+ <height>600</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>ChronoChat -- Powered By ChronoSync</string>
+ </property>
+ <layout class="QVBoxLayout">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <item>
+ <layout class="QHBoxLayout">
+ <property name="spacing">
+ <number>-1</number>
+ </property>
+ <item>
+ <layout class="QVBoxLayout">
+ <item>
+ <widget class="QLabel" name="infoLabel">
+ <property name="focusPolicy">
+ <enum>Qt::NoFocus</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout">
+ <item>
+ <widget class="QLabel" name="prefixLabel">
+ <property name="focusPolicy">
+ <enum>Qt::NoFocus</enum>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <layout class="QVBoxLayout">
+ <property name="sizeConstraint">
+ <enum>QLayout::SetFixedSize</enum>
+ </property>
+ <item>
+ <widget class="QPushButton" name="treeButton">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>200</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>200</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="focusPolicy">
+ <enum>Qt::NoFocus</enum>
+ </property>
+ <property name="text">
+ <string>Show ChronoSync Tree</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout">
+ <item>
+ <widget class="QListView" name="listView">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>14</pointsize>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="focusPolicy">
+ <enum>Qt::NoFocus</enum>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">color: darkGreen;
+background: #F0F0F0;</string>
+ </property>
+ <property name="editTriggers">
+ <set>QAbstractItemView::NoEditTriggers</set>
+ </property>
+ <property name="showDropIndicator" stdset="0">
+ <bool>false</bool>
+ </property>
+ <property name="selectionMode">
+ <enum>QAbstractItemView::NoSelection</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QVBoxLayout">
+ <item>
+ <widget class="QGraphicsView" name="treeViewer">
+ <property name="focusPolicy">
+ <enum>Qt::NoFocus</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QTextEdit" name="textEdit">
+ <property name="focusPolicy">
+ <enum>Qt::NoFocus</enum>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout">
+ <item>
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Message:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="lineEdit"/>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>