Add SettingDialog
diff --git a/src/settingdialog.cpp b/src/settingdialog.cpp
new file mode 100644
index 0000000..291d7e6
--- /dev/null
+++ b/src/settingdialog.cpp
@@ -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>
+ */
+
+#include "settingdialog.h"
+#include "ui_settingdialog.h"
+
+using namespace std;
+
+SettingDialog::SettingDialog(QWidget *parent) :
+    QDialog(parent),
+    ui(new Ui::SettingDialog)
+{
+    ui->setupUi(this);
+}
+
+SettingDialog::~SettingDialog()
+{
+    delete ui;
+}
+
+void
+setIdentity(const std::string& identity)
+{ 
+  m_identity = identity;
+  ui->identityLine->setText(QString::fromUtf8(m_identity.c_str()));
+}
+
+void
+SettingDialog::onOkClicked()
+{
+  QString text = ui->identityLine->text();
+  string identity = text.toUtf8().constData();
+  if(identity != m_identity)
+    {
+      m_identity = identity;
+      emit identitySet(text);
+    }
+}
+
+
+#if WAF
+#include "settingdialog.moc"
+#include "settingdialog.cpp.moc"
+#endif