bug+codestyle: Fix compile bugs and adjust code style
Change-Id: I008bb538441c099fa25b8b967fbf23ffce13a220
diff --git a/src/add-contact-panel.hpp b/src/add-contact-panel.hpp
new file mode 100644
index 0000000..545cd02
--- /dev/null
+++ b/src/add-contact-panel.hpp
@@ -0,0 +1,69 @@
+/* -*- 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 CHRONOS_ADD_CONTACT_PANEL_HPP
+#define CHRONOS_ADD_CONTACT_PANEL_HPP
+
+#include <QDialog>
+#include <QTableWidgetItem>
+
+#ifndef Q_MOC_RUN
+#include "endorse-info.pb.h"
+#endif
+
+namespace Ui {
+class AddContactPanel;
+}
+
+namespace chronos {
+
+class AddContactPanel : public QDialog
+{
+ Q_OBJECT
+
+public:
+ explicit
+ AddContactPanel(QWidget* parent = 0);
+
+ ~AddContactPanel();
+
+public slots:
+ void
+ onContactEndorseInfoReady(const Chronos::EndorseInfo& endorseInfo);
+
+private slots:
+ void
+ onCancelClicked();
+
+ void
+ onSearchClicked();
+
+ void
+ onAddClicked();
+
+signals:
+ void
+ fetchInfo(const QString& identity);
+
+ void
+ addContact(const QString& identity);
+
+private:
+ Ui::AddContactPanel* ui;
+ QString m_searchIdentity;
+
+ QTableWidgetItem* m_typeHeader;
+ QTableWidgetItem* m_valueHeader;
+ QTableWidgetItem* m_endorseHeader;
+};
+
+} // namespace chronos
+
+#endif // CHRONOS_ADD_CONTACT_PANEL_HPP