diff --git a/src/profileeditor.cpp b/src/profileeditor.cpp
new file mode 100644
index 0000000..9b75f50
--- /dev/null
+++ b/src/profileeditor.cpp
@@ -0,0 +1,104 @@
+/* -*- 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 "profileeditor.h"
+#include "ui_profileeditor.h"
+#include <QtSql/QSqlRecord>
+#include <QtSql/QSqlField>
+#include <QtSql/QSqlError>
+
+#ifndef Q_MOC_RUN
+#include "logging.h"
+#include "exception.h"
+#endif
+
+using namespace ndn;
+
+INIT_LOGGER("ProfileEditor");
+
+ProfileEditor::ProfileEditor(Ptr<ContactStorage> contactStorage, QWidget *parent) 
+    : QDialog(parent)
+    , ui(new Ui::ProfileEditor)
+    , m_tableModel(new QSqlTableModel())
+    , m_contactStorage(contactStorage)
+{
+    ui->setupUi(this);
+
+    connect(ui->addRowButton, SIGNAL(clicked()),
+            this, SLOT(onAddClicked()));
+    connect(ui->deleteRowButton, SIGNAL(clicked()),
+            this, SLOT(onDeleteClicked()));
+    connect(ui->okButton, SIGNAL(clicked()),
+            this, SLOT(onOkClicked()));
+    
+    m_tableModel->setEditStrategy(QSqlTableModel::OnManualSubmit);
+    m_tableModel->setTable("SelfProfile");
+    m_tableModel->select();
+    m_tableModel->setHeaderData(0, Qt::Horizontal, QObject::tr("Index"));
+    m_tableModel->setHeaderData(1, Qt::Horizontal, QObject::tr("Type"));
+    m_tableModel->setHeaderData(2, Qt::Horizontal, QObject::tr("Value"));
+
+    ui->profileTable->setModel(m_tableModel);
+    ui->profileTable->setColumnHidden(0, true);
+    ui->profileTable->show();
+
+}
+
+ProfileEditor::~ProfileEditor()
+{
+    delete ui;
+    delete m_tableModel;
+}
+
+void
+ProfileEditor::onAddClicked()
+{
+  int rowCount = m_tableModel->rowCount();
+
+  // QSqlRecord record;
+  // QSqlField typeField("profile_type", QVariant::String);
+  // QSqlField valueField("profile_value", QVariant::String);
+  // record.append(typeField);
+  // record.append(valueField);
+  // record.setValue("profile_type", QString("N/A"));
+  // record.setValue("profile_value", QString("N/A"));
+
+  // bool res = m_tableModel->insertRecord(-1, record);
+
+  // res = m_tableModel->submitAll();
+  m_tableModel->insertRow(rowCount);
+}
+
+void
+ProfileEditor::onDeleteClicked()
+{
+  QItemSelectionModel* selectionModel = ui->profileTable->selectionModel();
+  QModelIndexList indexList = selectionModel->selectedRows();
+
+  int i = indexList.size() - 1;  
+  for(; i >= 0; i--)
+    {
+      if(0 != indexList[i].row())
+        m_tableModel->removeRow(indexList[i].row());
+    }
+  m_tableModel->submitAll();
+}
+
+void
+ProfileEditor::onOkClicked()
+{
+  m_tableModel->submitAll();
+  this->hide();
+}
+
+#if WAF
+#include "profileeditor.moc"
+#include "profileeditor.cpp.moc"
+#endif
