src: Initial reorganization for NFD Control Center

Change-Id: Ic8bc4b9168df83bd706f780187a5993292565f95
diff --git a/qt/Resources/emblem-dropbox-unsyncable.png b/qt/Resources/emblem-dropbox-unsyncable.png
new file mode 100644
index 0000000..0192e41
--- /dev/null
+++ b/qt/Resources/emblem-dropbox-unsyncable.png
Binary files differ
diff --git a/qt/Resources/emblem-system.png b/qt/Resources/emblem-system.png
new file mode 100644
index 0000000..5ebfb3a
--- /dev/null
+++ b/qt/Resources/emblem-system.png
Binary files differ
diff --git a/qt/Resources/emblem-web.png b/qt/Resources/emblem-web.png
new file mode 100644
index 0000000..1fd9f76
--- /dev/null
+++ b/qt/Resources/emblem-web.png
Binary files differ
diff --git a/qt/Resources/gnome-system.png b/qt/Resources/gnome-system.png
new file mode 100644
index 0000000..168dee0
--- /dev/null
+++ b/qt/Resources/gnome-system.png
Binary files differ
diff --git a/qt/Resources/icon-connected-white.png b/qt/Resources/icon-connected-white.png
new file mode 100644
index 0000000..55f0dc4
--- /dev/null
+++ b/qt/Resources/icon-connected-white.png
Binary files differ
diff --git a/qt/Resources/icon-disconnected-white.png b/qt/Resources/icon-disconnected-white.png
new file mode 100644
index 0000000..39997cd
--- /dev/null
+++ b/qt/Resources/icon-disconnected-white.png
Binary files differ
diff --git a/qt/Resources/mail-send-receive.png b/qt/Resources/mail-send-receive.png
new file mode 100644
index 0000000..20fcbe2
--- /dev/null
+++ b/qt/Resources/mail-send-receive.png
Binary files differ
diff --git a/qt/Resources/ndnx-main.png b/qt/Resources/ndnx-main.png
new file mode 100644
index 0000000..4597260
--- /dev/null
+++ b/qt/Resources/ndnx-main.png
Binary files differ
diff --git a/qt/Resources/ndnx-main.xpm b/qt/Resources/ndnx-main.xpm
new file mode 100644
index 0000000..06de4ce
--- /dev/null
+++ b/qt/Resources/ndnx-main.xpm
@@ -0,0 +1,285 @@
+/* XPM */
+static char *ndnx_main[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 247 2 ",
+"   c #1E2127",
+".  c #132435",
+"X  c #14273B",
+"o  c #1D2E3E",
+"O  c #293035",
+"+  c #092344",
+"@  c #132B47",
+"#  c #162E49",
+"$  c #182F49",
+"%  c #1C3043",
+"&  c #142F50",
+"*  c #163151",
+"=  c #1B3858",
+"-  c #253644",
+";  c #203448",
+":  c #263A4F",
+">  c #293A48",
+",  c #213B55",
+"<  c #2B3F53",
+"1  c #1A3B66",
+"2  c #213F60",
+"3  c #2D4254",
+"4  c #324454",
+"5  c #334758",
+"6  c #36495B",
+"7  c #244160",
+"8  c #2E4964",
+"9  c #24456D",
+"0  c #2C4C6C",
+"q  c #364D65",
+"w  c #394F64",
+"e  c #2A516F",
+"r  c #3C5366",
+"t  c #3B5469",
+"y  c #234672",
+"u  c #2A4C72",
+"i  c #244B78",
+"p  c #2C5171",
+"a  c #2A517F",
+"s  c #305A76",
+"d  c #345478",
+"f  c #345F79",
+"g  c #32617A",
+"h  c #435767",
+"j  c #40576A",
+"k  c #445A6C",
+"l  c #445E73",
+"z  c #405F7A",
+"x  c #456077",
+"c  c #496276",
+"v  c #45617B",
+"b  c #4A647B",
+"n  c #5C707B",
+"m  c #254E82",
+"M  c #2E5686",
+"N  c #275388",
+"B  c #2F5A8C",
+"V  c #325781",
+"C  c #335984",
+"Z  c #3A5D85",
+"A  c #305C8F",
+"S  c #2C5B95",
+"D  c #396088",
+"F  c #3A6495",
+"G  c #35659D",
+"H  c #38659C",
+"J  c #3F6C9B",
+"K  c #3D6CA4",
+"L  c #3A6DAA",
+"P  c #3D71AE",
+"I  c #3E74B3",
+"U  c #3C7ABE",
+"Y  c #446481",
+"T  c #4D6784",
+"R  c #4D6B85",
+"E  c #42658B",
+"W  c #4D6D8D",
+"Q  c #516F85",
+"!  c #526F8C",
+"~  c #4D708F",
+"^  c #51708C",
+"/  c #406690",
+"(  c #4C6E92",
+")  c #466F9A",
+"_  c #4C7594",
+"`  c #4C729D",
+"'  c #5D7B95",
+"]  c #547C9D",
+"[  c #5D7A99",
+"{  c #607682",
+"}  c #667A85",
+"|  c #416EA4",
+" . c #4C77A6",
+".. c #4274AB",
+"X. c #567EA3",
+"o. c #537DAA",
+"O. c #4174B0",
+"+. c #497BB3",
+"@. c #467CB9",
+"#. c #5F819B",
+"$. c #7D858C",
+"%. c #63829D",
+"&. c #5782A5",
+"*. c #5A84AB",
+"=. c #4F83B0",
+"-. c #4982BF",
+";. c #5C8AB7",
+":. c #5183BC",
+">. c #5C8DBD",
+",. c #6283A2",
+"<. c #6B8BA3",
+"1. c #6186AC",
+"2. c #628CAC",
+"3. c #6B8DAD",
+"4. c #7591AB",
+"5. c #7A92A8",
+"6. c #6793B0",
+"7. c #6E96BC",
+"8. c #6C9BBC",
+"9. c #7495B3",
+"0. c #7B9BB6",
+"q. c #7096BB",
+"w. c #759ABB",
+"e. c #7D9EBB",
+"r. c #7CA4BC",
+"t. c #4A84C5",
+"y. c #4A88CE",
+"u. c #5789C1",
+"i. c #5F8FC1",
+"p. c #538CCB",
+"a. c #5391C3",
+"s. c #5490CB",
+"d. c #5A93CD",
+"f. c #4B91D2",
+"g. c #5392D2",
+"h. c #5C9BD5",
+"j. c #539FDB",
+"k. c #5D9FDD",
+"l. c #6794C0",
+"z. c #6198CE",
+"x. c #699DCD",
+"c. c #6FA0CC",
+"v. c #75A4C5",
+"b. c #7DA3C6",
+"n. c #74A5CC",
+"m. c #7CA7CA",
+"M. c #77A8CF",
+"N. c #7BAACE",
+"B. c #65A0D6",
+"V. c #6DA5D7",
+"C. c #64A4D9",
+"Z. c #6BA9DA",
+"A. c #73A9D3",
+"S. c #7CACD2",
+"D. c #71ADDB",
+"F. c #7CB2DB",
+"G. c #57A8E8",
+"H. c #60A7E5",
+"J. c #6BB1E4",
+"K. c #7BB5E4",
+"L. c #72BBE6",
+"P. c #7CBCED",
+"I. c #7DC2F1",
+"U. c #8096A9",
+"Y. c #889FB3",
+"T. c #9CA8AF",
+"R. c #82A0BD",
+"E. c #88A2B9",
+"W. c #9EA9B0",
+"Q. c #95ACBF",
+"!. c #98ADBE",
+"~. c #A4ADB3",
+"^. c #ABB5BA",
+"/. c #82A5C3",
+"(. c #87A9C5",
+"). c #8DAAC1",
+"_. c #82A7C8",
+"`. c #84AACB",
+"'. c #8AADCB",
+"]. c #93AEC4",
+"[. c #8DB0CD",
+"{. c #9CB3C5",
+"}. c #94B1CB",
+"|. c #9FB7CA",
+" X c #9BBACB",
+".X c #81AFD2",
+"XX c #84B3D5",
+"oX c #89B5D6",
+"OX c #83B5DA",
+"+X c #88B5D8",
+"@X c #86B8DD",
+"#X c #8CBCDD",
+"$X c #92B4D2",
+"%X c #96B9D6",
+"&X c #9ABAD5",
+"*X c #93BDDE",
+"=X c #9DBFDA",
+"-X c #A1BCD5",
+";X c #84B9E2",
+":X c #8CBFE5",
+">X c #80BFED",
+",X c #91BFE0",
+"<X c #9EC2D5",
+"1X c #99C0DF",
+"2X c #ABC3D7",
+"3X c #A5C3DC",
+"4X c #AAC5DB",
+"5X c #8BC2E6",
+"6X c #8CC4EA",
+"7X c #8ACBEE",
+"8X c #94C2E3",
+"9X c #9FC6E3",
+"0X c #93C6E9",
+"qX c #9CCBEB",
+"wX c #99D1EE",
+"eX c #97D2F0",
+"rX c #9AD6F2",
+"tX c #9AD9F5",
+"yX c #A6CAE5",
+"uX c #B3CEE4",
+"iX c #ACD2EC",
+"pX c #B4D1E6",
+"aX c #BCD4E7",
+"sX c #B5D4EA",
+"dX c #BBD5EA",
+"fX c #BADAEF",
+"gX c #A2D4F1",
+"hX c #ADD7F0",
+"jX c #A5DBF4",
+"kX c #ADD9F2",
+"lX c #ABDEFD",
+"zX c #B4DBF3",
+"xX c #BBDDF2",
+"cX c #BCE1F6",
+"vX c #B2E6F9",
+"bX c #BBE5F8",
+"nX c #C3DBEE",
+"mX c #C4E5F6",
+"MX c #C3E6F9",
+"NX c #C7E8F9",
+"BX c #CCECFB",
+"VX c #D0EEFB",
+"CX c #CCF1FD",
+"ZX c #D2F3FE",
+"AX c #D6FCFF",
+"SX c #D8FDFF",
+"DX c None",
+/* pixels */
+"DXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDX",
+"DXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDX",
+"DXDXDXDXDXDXDXDXDXDXDXq.`.[.$X%X-X-X&X'.q.DXDXDXDXDXDXDXDXDXDXDX",
+"DXDXDXDXDXDXDXDXDXq.'.%X&X-X%X3X4X&XnXnXdX4X/.DXDXDXDXDXDXDXDXDX",
+"DXDXDXDXDXDXDXDX/.$X$X+X'.$XsXdXsXcXcXnXaXnXnX4XDXDXDXDXDXDXDXDX",
+"DXDXDXDXDXDX*./.[.[.[.+X8XiX8X+X%XyXxX8X*XuX-XnXuXe.DXDXDXDXDXDX",
+"DXDXDXDXDXX.r.(.`..X@X@X*X8X0XqX5X5X5XqXuXdXsX*XnXuXw.DXDXDXDXDX",
+"DXDXDXDXDX9.e.b.N..XF.;XyXzXcXmXhXtXjXrXwXNXmXsXdXaX4XDXDXDXDXDX",
+"DXDXDXDX3.9.q.n.A.F.K.qXzXbXcXcXMXBXBXVXbXzXBXiXuXdXuX$XDXDXDXDX",
+"DXDXDXDX3.3.q.c.A.D.:XzXzXzXcXMXNXBXBXVXBXtXMXxX0X$X4X4XDXDXDXDX",
+"DXDXDX,.,.1.l.x.Z.Z.:XzXhXzXcXMXBXBXBXZXZXbXtXBXmXM.7.2X].DXDXDX",
+"DXDXDX%.] *.i.z.B.C.0XhXhXzXcXmXBXBXCXCXBXCXtXgX@XV.>.R.E.DXDXDX",
+"DXDXDX' ( o.u.d.h.h.V.iXzXzXxXmXMXMXBXBXBXBXcX7XL.C.>.*.<.DXDXDX",
+"DXDX9.5.E  .:.p.g.k.H.K.:X>XI.lXZXAXSXSXAXAXCXcXJ.d.:.` ' ~ DXDX",
+"DXDXe.|.( F +.t.g.O.0 d u s g f { } } } } n  XP.j.s.+.E ! ! DXDX",
+"DXDX0.{.e.o.| @.y.` $.^.~.~.~.~.W.W.W.W.~.$.*.G.g.t.| Z R ~ DXDX",
+"DXDX4.{.].%X>.P -.P m.zXyXjXiXiXiXiXiXiXjX<Xa.f.-.I F d b ~ DXDX",
+"DXDX[ Q.].'.) G L A *.#XXXoXoXoXoXoXoXoX#Xr.=.U I H g 0 b Y DXDX",
+"DXDXDXY.].r.C A H N 2.#XXXoXoXoXoXoX+XoX#Xr.J -.K C y 8 b DXDXDX",
+"DXDXDX5.Q.4.p i A y &.#XXXoXXXoXF.oXoXoX#X&.i >.C e 7 q b DXDXDX",
+"DXDXDX' !.r = 9 i 1 &.#X.XoXoXXXoXF.oXS.#X&.y D 9 2 , r Y DXDXDX",
+"DXDXDXDX5.w $ $ * + _ #X.XS.F.S..X.XoX.X#X_ + & @ $ 3 b DXDXDXDX",
+"DXDXDXDXR k . #.8.2.v.F..XoXS.S.S.oXS.S.F.r.2.8.6.% r v DXDXDXDX",
+"DXDXDXDXDXb 3 r oX5XS.S.S.S.S.F.S..XS.S.S.S.#X#XQ 3 b DXDXDXDXDX",
+"DXDXDXDXDXDXv > o <.#XM.M.F.S.S.N.F.S.N.M.+Xe.3 - l DXDXDXDXDXDX",
+"DXDXDXDXDXDXDXc 6 X v oXF.M.M.M.M.M.M.S.+X' % 5 b DXDXDXDXDXDXDX",
+"DXDXDXDXDXDXDXDXv t : 5 0.F.v.M.M.M.F.N.x - r v DXDXDXDXDXDXDXDX",
+"DXDXDXDXDXDXDXDXDXDXr 5 6 <.oXM.M.F.0.j 5 t DXDXDXDXDXDXDXDXDXDX",
+"DXDXDXDXDXDXDXDXDXDXDX. : < Q N.S.%.< % . DXDXDXDXDXDXDXDXDXDXDX",
+"DXDXDXDXDXDXDXDXDXDXDXDXDXDXDX  O DXDXDXDXDXDXDXDXDXDXDXDXDXDXDX",
+"DXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDX",
+"DXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDXDX"
+};
diff --git a/qt/Resources/preferences-desktop.png b/qt/Resources/preferences-desktop.png
new file mode 100644
index 0000000..8dd7ba6
--- /dev/null
+++ b/qt/Resources/preferences-desktop.png
Binary files differ
diff --git a/qt/Resources/status-to-fib.xslt b/qt/Resources/status-to-fib.xslt
new file mode 100644
index 0000000..58f2fc7
--- /dev/null
+++ b/qt/Resources/status-to-fib.xslt
@@ -0,0 +1,29 @@
+<xsl:stylesheet version = '1.0'
+                xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
+
+<xsl:template match="/ndnd">
+<fibs>
+<xsl:apply-templates select="forwarding/fentry/dest" />
+</fibs>
+</xsl:template>
+
+<xsl:template match="dest">
+<fib>
+<xsl:apply-templates select="faceid" />
+<prefix><xsl:value-of select="../prefix"/></prefix>
+</fib>
+</xsl:template>
+
+<xsl:template match="faceid">
+<xsl:variable name="id"><xsl:value-of select="." /></xsl:variable>
+<faceID><xsl:copy-of select="$id" /></faceID>
+<ip>
+<xsl:choose>
+  <xsl:when test="count(//face/ip[../faceid=$id]) &gt; 0"><xsl:value-of select="//face/ip[../faceid=$id]" />
+  </xsl:when>
+  <xsl:otherwise>app</xsl:otherwise>
+</xsl:choose>
+</ip>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/qt/Resources/status.xslt b/qt/Resources/status.xslt
new file mode 100644
index 0000000..d64ea59
--- /dev/null
+++ b/qt/Resources/status.xslt
@@ -0,0 +1,20 @@
+<xsl:stylesheet version = '1.0'
+                xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
+
+<xsl:template match="/">
+<stats>
+  <data>
+    <in><xsl:value-of select="sum(/ndnd/faces/face/meters/datain/total)" /></in>
+    <out><xsl:value-of select="sum(/ndnd/faces/face/meters/dataout/total)" /></out>
+    <!-- <in><xsl:value-of select="sum(/ndnd/faces/face/meters/datain/persec)" /></in> -->
+    <!-- <out><xsl:value-of select="sum(/ndnd/faces/face/meters/dataout/persec)" /></out> -->
+  </data>
+  <interests>
+    <in><xsl:value-of select="sum(/ndnd/faces/face/meters/intrin/total)" /></in>
+    <out><xsl:value-of select="sum(/ndnd/faces/face/meters/introut/total)" /></out>
+    <!-- <in><xsl:value-of select="sum(/ndnd/faces/face/meters/intrin/persec)" /></in> -->
+    <!-- <out><xsl:value-of select="sum(/ndnd/faces/face/meters/introut/persec)" /></out> -->
+  </interests>
+</stats>
+</xsl:template>
+</xsl:stylesheet>
diff --git a/qt/Resources/system-run.png b/qt/Resources/system-run.png
new file mode 100644
index 0000000..17ceb32
--- /dev/null
+++ b/qt/Resources/system-run.png
Binary files differ
diff --git a/qt/disabled/fib-input-dialog.cpp b/qt/disabled/fib-input-dialog.cpp
new file mode 100644
index 0000000..69700db
--- /dev/null
+++ b/qt/disabled/fib-input-dialog.cpp
@@ -0,0 +1,87 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
+/*
+ * @copyright See LICENCE for copyright and license information.
+ *
+ * @author Ilya Moiseenko <iliamo@ucla.edu>
+ */
+
+#include "fib-input-dialog.hpp"
+
+#include <QVBoxLayout>
+#include <QHBoxLayout>
+
+FibInputDialog::FibInputDialog(QWidget *parent)
+  : QDialog(parent)
+{
+  prefixLabel = new QLabel(tr("NDN name (prefix): "));
+  prefixTextField = new QLineEdit;
+  prefixLabel->setBuddy(prefixTextField);
+
+  tunnelLabel = new QLabel(tr("Tunnel type: "));
+  tunnelComboBox = new QComboBox;
+  tunnelComboBox->addItem(tr("TCP"));
+  tunnelComboBox->addItem(tr("UDP"));
+  tunnelComboBox->setEditable(false);
+  tunnelComboBox->setCurrentIndex(0);
+
+  endpointLabel = new QLabel(tr("Endpoint (IP address): "));
+  endpointTextField = new QLineEdit;
+  endpointLabel->setBuddy(endpointTextField);
+
+  okButton = new QPushButton(tr("&Ok"));
+  cancelButton = new QPushButton(tr("&Cancel"));
+
+  connect(okButton,SIGNAL(pressed()), parent, SLOT(addFibEntry()));
+  connect(cancelButton,SIGNAL(pressed()), this, SLOT(hide()));
+
+  buttonBox = new QDialogButtonBox(Qt::Horizontal);
+  buttonBox->addButton(cancelButton, QDialogButtonBox::ActionRole);
+  buttonBox->addButton(okButton, QDialogButtonBox::ActionRole);
+
+  QHBoxLayout *hlayout = new QHBoxLayout;
+  hlayout->addWidget(tunnelLabel);
+  hlayout->addWidget(tunnelComboBox);
+
+  QVBoxLayout *layout = new QVBoxLayout;
+  layout->addWidget(prefixLabel);
+  layout->addWidget(prefixTextField);
+  layout->addLayout(hlayout);
+  layout->addWidget(endpointLabel);
+  layout->addWidget(endpointTextField);
+  layout->addWidget(buttonBox);
+
+  setLayout(layout);
+
+  setWindowTitle(tr("NDNx Control Center"));
+}
+
+QString
+FibInputDialog::getPrefixName()
+{
+  return prefixTextField->text();
+}
+
+QString
+FibInputDialog::getEndpoint()
+{
+  return endpointTextField->text();
+}
+
+QString
+FibInputDialog::getTunnelType()
+{
+  return tunnelComboBox->currentText();
+}
+
+void
+FibInputDialog::clear()
+{
+  prefixTextField->setText("");
+  tunnelComboBox->setCurrentIndex(0);
+  endpointTextField->setText("");
+}
+
+#if WAF
+#include "fib-input-dialog.moc"
+#include "fib-input-dialog.cpp.moc"
+#endif
diff --git a/qt/disabled/fib-input-dialog.hpp b/qt/disabled/fib-input-dialog.hpp
new file mode 100644
index 0000000..5486cbb
--- /dev/null
+++ b/qt/disabled/fib-input-dialog.hpp
@@ -0,0 +1,45 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
+/*
+ * @copyright See LICENCE for copyright and license information.
+ *
+ * @author Ilya Moiseenko <iliamo@ucla.edu>
+ */
+
+#include <QDialog>
+#include <QLabel>
+#include <QDialogButtonBox>
+#include <QPushButton>
+#include <QLineEdit>
+#include <QComboBox>
+#include <QString>
+
+#ifndef FIBINPUTDIALOG_H
+#define FIBINPUTDIALOG_H
+
+class FibInputDialog : public QDialog
+{
+    Q_OBJECT
+
+public:
+    FibInputDialog(QWidget *parent = 0);
+    void clear();
+    QString getPrefixName();
+    QString getEndpoint();
+    QString getTunnelType();
+
+private:
+    QLabel *prefixLabel;
+    QLineEdit *prefixTextField;
+
+    QLabel *tunnelLabel;
+    QComboBox *tunnelComboBox;
+
+    QLabel *endpointLabel;
+    QLineEdit *endpointTextField;
+
+    QDialogButtonBox *buttonBox;
+    QPushButton *okButton;
+    QPushButton *cancelButton;
+};
+
+#endif // FIBINPUTDIALOG_H
diff --git a/qt/main.cpp b/qt/main.cpp
new file mode 100644
index 0000000..5268e80
--- /dev/null
+++ b/qt/main.cpp
@@ -0,0 +1,32 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2013-2014, Regents of the University of California,
+ *
+ * This file is part of NFD Control Center.  See AUTHORS.md for complete list of NFD
+ * authors and contributors.
+ *
+ * NFD Control Center is free software: you can redistribute it and/or modify it under the
+ * terms of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NFD Control Center is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with NFD
+ * Control Center, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * \author Ilya Moiseenko <iliamo@ucla.edu>
+ */
+
+#include "tray-menu.hpp"
+
+#include <QtGui/QApplication>
+
+int main(int argc, char *argv[])
+{
+  QApplication a(argc, argv);
+  TrayMenu w;
+
+  return a.exec();
+}
diff --git a/qt/network-manager.cpp b/qt/network-manager.cpp
new file mode 100644
index 0000000..05bf378
--- /dev/null
+++ b/qt/network-manager.cpp
@@ -0,0 +1,79 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2013-2014, Regents of the University of California,
+ *
+ * This file is part of NFD Control Center.  See AUTHORS.md for complete list of NFD
+ * authors and contributors.
+ *
+ * NFD Control Center is free software: you can redistribute it and/or modify it under the
+ * terms of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NFD Control Center is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with NFD
+ * Control Center, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * \author Ilya Moiseenko <iliamo@ucla.edu>
+ */
+
+#include "network-manager.hpp"
+#include "config.hpp"
+
+NetworkManager::NetworkManager()
+  : isAutoconfigRunning(false)
+{
+  if (!QDBusConnection::systemBus().isConnected())
+    {
+      return;
+    }
+
+  autoconfigProcess = new QProcess(this);
+  connect(autoconfigProcess,SIGNAL(finished(int)),this,SLOT(autoconfigFinished()));
+  connect(autoconfigProcess, SIGNAL(error(QProcess::ProcessError)),
+          this, SLOT(autoconfigFinished()));
+
+  QDBusConnection::systemBus().connect("org.freedesktop.NetworkManager",
+                                       "/org/freedesktop/NetworkManager",
+                                       "org.freedesktop.NetworkManager",
+                                       "StateChanged", this, SLOT(stateChanged(uint)));
+
+  QDBusConnection::systemBus().connect("org.freedesktop.UPower",
+                                       "/org/freedesktop/UPower",
+                                       "org.freedesktop.UPower",
+                                       "Resuming", this, SLOT(autoconfigDaemon()));
+}
+
+void NetworkManager::stateChanged(uint state)
+{
+  if (state == NM_STATE_CONNECTED_GLOBAL)
+    autoconfigDaemon();
+}
+
+void NetworkManager::autoconfigDaemon()
+{
+  if (IsAutoconfigRunning())
+    return;
+
+  isAutoconfigRunning = true;
+
+  if (autoconfigProcess != 0)
+    autoconfigProcess->start(NFD_AUTOCONFIG_COMMAND);
+}
+
+void NetworkManager::autoconfigFinished()
+{
+  isAutoconfigRunning = false;
+}
+
+bool NetworkManager::IsAutoconfigRunning()
+{
+  return isAutoconfigRunning;
+}
+
+#if WAF
+#include "network-manager.moc"
+#include "network-manager.cpp.moc"
+#endif
diff --git a/qt/network-manager.hpp b/qt/network-manager.hpp
new file mode 100644
index 0000000..f111fc6
--- /dev/null
+++ b/qt/network-manager.hpp
@@ -0,0 +1,53 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2013-2014, Regents of the University of California,
+ *
+ * This file is part of NFD Control Center.  See AUTHORS.md for complete list of NFD
+ * authors and contributors.
+ *
+ * NFD Control Center is free software: you can redistribute it and/or modify it under the
+ * terms of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NFD Control Center is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with NFD
+ * Control Center, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * \author Ilya Moiseenko <iliamo@ucla.edu>
+ */
+
+#include <QtDBus>
+#include <QProcess>
+
+#ifndef NCC_QT_NETWORK_MANAGER_HPP
+#define NCC_QT_NETWORK_MANAGER_HPP
+
+#define NM_STATE_DISCONNECTED 20
+#define NM_STATE_CONNECTING 40
+#define NM_STATE_CONNECTED_GLOBAL 70
+
+class NetworkManager : public QObject
+{
+     Q_OBJECT
+
+public:
+    NetworkManager();
+    bool IsAutoconfigRunning();
+
+public slots:
+    void autoconfigDaemon();
+
+private:
+    QProcess *autoconfigProcess;
+    bool isAutoconfigRunning;
+
+private slots:
+    void stateChanged(uint state);
+    void autoconfigFinished();
+};
+
+
+#endif // NCC_QT_NETWORK_MANAGER_HPP
diff --git a/qt/nfd-control-center.desktop.in b/qt/nfd-control-center.desktop.in
new file mode 100644
index 0000000..742ae47
--- /dev/null
+++ b/qt/nfd-control-center.desktop.in
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Version=1.0
+Name=NDNx Control Center
+Keywords=Internet;NDN;NDNx
+Exec=@BINDIR@/@BINARY@
+Terminal=false
+X-MultipleArgs=false
+Type=Application
+Icon=@DATAROOTDIR@/ndnx-control-center/ndnx-main.png
+Categories=GNOME;GTK;Network;
+StartupNotify=true
+Actions=NewWindow;NewPrivateWindow;
diff --git a/qt/quit-dialog.cpp b/qt/quit-dialog.cpp
new file mode 100644
index 0000000..98e993f
--- /dev/null
+++ b/qt/quit-dialog.cpp
@@ -0,0 +1,60 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2013-2014, Regents of the University of California,
+ *
+ * This file is part of NFD Control Center.  See AUTHORS.md for complete list of NFD
+ * authors and contributors.
+ *
+ * NFD Control Center is free software: you can redistribute it and/or modify it under the
+ * terms of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NFD Control Center is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with NFD
+ * Control Center, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * \author Ilya Moiseenko <iliamo@ucla.edu>
+ */
+
+#include "quit-dialog.hpp"
+
+#include <QVBoxLayout>
+#include <QApplication>
+
+QuitDialog::QuitDialog(QWidget *parent)
+  : QDialog(parent)
+{
+  question = new QLabel(tr("Shutdown NDN daemon as well?"));
+  information = new QLabel(tr("All NDN operations will become unavailable."));
+
+  confirmButton = new QPushButton(tr("Yes"));
+  noButton = new QPushButton(tr("No"));
+  cancelButton = new QPushButton(tr("Cancel"));
+  cancelButton->setDefault(true);
+
+  buttonBox = new QDialogButtonBox(Qt::Horizontal);
+  buttonBox->addButton(cancelButton, QDialogButtonBox::ActionRole);
+  buttonBox->addButton(noButton, QDialogButtonBox::ActionRole);
+  buttonBox->addButton(confirmButton, QDialogButtonBox::ActionRole);
+
+  connect(confirmButton,SIGNAL(pressed()), parent, SLOT(terminateDaemonAndClose()));
+  connect(noButton,SIGNAL(pressed()), qApp, SLOT(quit()));
+  connect(cancelButton,SIGNAL(pressed()), this, SLOT(hide()));
+
+  QVBoxLayout *layout = new QVBoxLayout;
+  layout->addWidget(question);
+  layout->addWidget(information);
+  layout->addWidget(buttonBox);
+
+  setLayout(layout);
+
+  setWindowTitle(tr("NDNx Control Center"));
+}
+
+#if WAF
+#include "quit-dialog.moc"
+#include "quit-dialog.cpp.moc"
+#endif
diff --git a/qt/quit-dialog.hpp b/qt/quit-dialog.hpp
new file mode 100644
index 0000000..c28c300
--- /dev/null
+++ b/qt/quit-dialog.hpp
@@ -0,0 +1,46 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2013-2014, Regents of the University of California,
+ *
+ * This file is part of NFD Control Center.  See AUTHORS.md for complete list of NFD
+ * authors and contributors.
+ *
+ * NFD Control Center is free software: you can redistribute it and/or modify it under the
+ * terms of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NFD Control Center is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with NFD
+ * Control Center, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * \author Ilya Moiseenko <iliamo@ucla.edu>
+ */
+
+#include <QDialog>
+#include <QLabel>
+#include <QDialogButtonBox>
+#include <QPushButton>
+
+#ifndef NCC_QT_QUIT_DIALOG_H
+#define NCC_QT_QUIT_DIALOG_H
+
+class QuitDialog : public QDialog
+{
+  Q_OBJECT
+
+public:
+  QuitDialog(QWidget *parent = 0);
+
+private:
+  QLabel *question;
+  QLabel *information;
+  QDialogButtonBox *buttonBox;
+  QPushButton *confirmButton;
+  QPushButton *noButton;
+  QPushButton *cancelButton;
+};
+
+#endif // NCC_QT_QUIT_DIALOG_H
diff --git a/qt/resource.qrc b/qt/resource.qrc
new file mode 100644
index 0000000..e39ebb1
--- /dev/null
+++ b/qt/resource.qrc
@@ -0,0 +1,15 @@
+<RCC>
+    <qresource prefix="/resource">
+        <file>Resources/emblem-dropbox-unsyncable.png</file>
+        <file>Resources/emblem-system.png</file>
+        <file>Resources/emblem-web.png</file>
+        <file>Resources/gnome-system.png</file>
+        <file>Resources/mail-send-receive.png</file>
+        <file>Resources/preferences-desktop.png</file>
+        <file>Resources/system-run.png</file>
+        <file>Resources/icon-connected-white.png</file>
+        <file>Resources/icon-disconnected-white.png</file>
+        <file>Resources/status-to-fib.xslt</file>
+        <file>Resources/status.xslt</file>
+    </qresource>
+</RCC>
diff --git a/qt/tray-menu.cpp b/qt/tray-menu.cpp
new file mode 100644
index 0000000..da9874d
--- /dev/null
+++ b/qt/tray-menu.cpp
@@ -0,0 +1,605 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2013-2014, Regents of the University of California,
+ *
+ * This file is part of NFD Control Center.  See AUTHORS.md for complete list of NFD
+ * authors and contributors.
+ *
+ * NFD Control Center is free software: you can redistribute it and/or modify it under the
+ * terms of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NFD Control Center is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with NFD
+ * Control Center, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * \author Ilya Moiseenko <iliamo@ucla.edu>
+ */
+
+#include "config.hpp"
+
+#include "tray-menu.hpp"
+#include "ui_traymenu.h"   //generated from traymenu.ui
+
+#include "quit-dialog.hpp"
+// #include "fib-input-dialog.hpp"
+#include "network-manager.hpp"
+
+#include <QMenu>
+#include <QCloseEvent>
+#include <QDesktopServices>
+#include <QUrl>
+#include <QCheckBox>
+#include <QLabel>
+#include <QHBoxLayout>
+#include <QLineEdit>
+#include <QDir>
+#include <QScrollBar>
+#include <QHBoxLayout>
+#include <QVBoxLayout>
+
+TrayMenu::TrayMenu(QWidget *parent)
+  : QMainWindow(parent)
+  , ui(new Ui::TrayMenu)
+{
+  processLookup = new QProcess(this);
+  QStringList arguments;
+  arguments << "-al";
+  connect(processLookup,SIGNAL(finished(int)), this, SLOT(parseProcessLookup()));
+  processLookup->start("ps",arguments);
+
+  networkManager = new NetworkManager();
+
+  QCoreApplication::setOrganizationName("UCLA");
+  QCoreApplication::setOrganizationDomain("named-data.net");
+  QCoreApplication::setApplicationName("NDNx Control Center");
+
+  persistentSettings = new QSettings();
+
+  ui->setupUi(this);
+
+  createTrayIcon();
+  setIcon(true);
+  createToolbar();
+  createTableView();
+
+  loadSettings();
+
+  connect(ui->openTrafficMapButton, SIGNAL(pressed()), this, SLOT(openTrafficMap()));
+  connect(ui->openRoutingStatusButton, SIGNAL(pressed()), this, SLOT(openRoutingStatus()));
+  connect(ui->addFibButton, SIGNAL(pressed()), this, SLOT(showFibInputDialog()));
+  // connect(ui->deleteFibButton, SIGNAL(released()), this, SLOT(deleteFibEntry()));
+  connect(ui->hubDiscoveryCheckbox, SIGNAL(stateChanged(int)), this, SLOT(changeHubDiscovery()));
+  connect(ui->loginStartCheckbox, SIGNAL(stateChanged(int)), this, SLOT(changeLoginStart()));
+  connect(ui->tableView, SIGNAL(clicked(QModelIndex)), this, SLOT(selectTableRow()));
+  connect(ui->openNdnCertificationButton, SIGNAL(released()), this, SLOT(openCertificationPage()));
+
+  statusUpdateThread = new QThread();
+  statusUpdateThread->start();
+
+  // daemonStatusTimer = new QTimer(statusUpdateThread);
+  // connect(daemonStatusTimer, SIGNAL(timeout()), this, SLOT(daemonStatusUpdate()));
+  // daemonStatusTimer->start(2000);
+
+  trayIcon->show();
+  model = NULL;
+  // dialog = new FibInputDialog(this);
+
+  // urlManager = new QNetworkAccessManager(this);
+  // connect(urlManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(runXmlProc(QNetworkReply*)));
+}
+
+void TrayMenu::loadSettings()
+{
+  QVariant value;
+
+  value = persistentSettings->value(ENABLE_HUB_DISCOVERY);
+  if(!value.isNull())
+    {
+      enableHubDiscovery = value.toBool();
+      ui->hubDiscoveryCheckbox->setChecked(enableHubDiscovery);
+    }
+  else
+    {
+      ui->hubDiscoveryCheckbox->setChecked(true);
+      changeHubDiscovery();
+    }
+
+  value = persistentSettings->value(ENABLE_START_ON_LOGIN);
+  if(!value.isNull())
+    {
+      enableStartOnLogin = value.toBool();
+      ui->loginStartCheckbox->setChecked(enableStartOnLogin);
+    }
+  else
+    {
+      ui->loginStartCheckbox->setChecked(false);
+      changeLoginStart();
+    }
+}
+
+void TrayMenu::changeHubDiscovery()
+{
+  if(ui->hubDiscoveryCheckbox->isChecked())
+    {
+      enableHubDiscovery = true;
+      persistentSettings->setValue(ENABLE_HUB_DISCOVERY, true);
+    }
+  else
+    {
+      enableHubDiscovery = false;
+      persistentSettings->setValue(ENABLE_HUB_DISCOVERY, false);
+    }
+}
+
+void TrayMenu::changeLoginStart()
+{
+  if(ui->loginStartCheckbox->isChecked())
+    {
+      enableStartOnLogin = true;
+      persistentSettings->setValue(ENABLE_START_ON_LOGIN, true);
+      makeAutostartDirectory();
+    }
+  else
+    {
+      enableStartOnLogin = false;
+      persistentSettings->setValue(ENABLE_START_ON_LOGIN, false);
+
+      QProcess *process = new QProcess();
+      connect(process,SIGNAL(finished(int)),process, SLOT(deleteLater()));
+      QStringList arguments;
+      arguments << QDir::homePath() + AUTOSTART_DIRECTORY + SHORTCUT_FILE;
+      process->start("rm", arguments);
+    }
+}
+
+void TrayMenu::makeAutostartDirectory()
+{
+  QProcess *process = new QProcess();
+  connect(process, SIGNAL(finished(int)), this, SLOT(copyFile()));
+  connect(process,SIGNAL(finished(int)),process, SLOT(deleteLater()));
+  QStringList arguments;
+  arguments << QDir::homePath() + AUTOSTART_DIRECTORY;
+  process->start("mkdir", arguments);
+}
+
+void TrayMenu::copyFile()
+{
+  QProcess *process = new QProcess();
+  connect(process,SIGNAL(finished(int)),process, SLOT(deleteLater()));
+  QStringList arguments;
+  arguments << QString(RESOURCES_DIR) + "/" + SHORTCUT_FILE << QDir::homePath() + AUTOSTART_DIRECTORY;
+  process->start("cp",arguments);
+}
+
+void TrayMenu::showFibInputDialog()
+{
+  // dialog->clear();
+  // dialog->exec();
+}
+
+void TrayMenu::openTrafficMap()
+{
+  QDesktopServices::openUrl(QUrl("http://ndnmap.arl.wustl.edu/", QUrl::TolerantMode));
+}
+
+void TrayMenu::openRoutingStatus()
+{
+  QDesktopServices::openUrl(QUrl("http://netlab.cs.memphis.edu/script/htm/status.htm", QUrl::TolerantMode));
+}
+
+void TrayMenu::openCertificationPage()
+{
+  QDesktopServices::openUrl(QUrl("http://ndncert.named-data.net", QUrl::TolerantMode));
+}
+
+void TrayMenu::createTrayIcon()
+{
+  trayIconMenu = new QMenu(this);
+
+  statusIndicator = new QAction("Inactive", this);
+  trayIconMenu->addAction(statusIndicator);
+
+  trayIconMenu->addSeparator();
+
+  displayStatus = new QAction("                           Sent / Recv   ", this);
+  trayIconMenu->addAction(displayStatus);
+  interestSentRecv = new QAction("Interests      0 / 0", this);
+  trayIconMenu->addAction(interestSentRecv);
+  dataSentRecv = new QAction("Data               0 / 0", this);
+  trayIconMenu->addAction(dataSentRecv);
+
+  trayIconMenu->addSeparator();
+
+  open = new QAction("Preferences...", this);
+  connect(open, SIGNAL(triggered()), this, SLOT(show()));
+  trayIconMenu->addAction(open);
+
+  close = new QAction("Quit", this);
+  // connect(close, SIGNAL(triggered()), this, SLOT(confirmQuit()));
+  connect(close, SIGNAL(triggered()), qApp, SLOT(quit()));
+  trayIconMenu->addAction(close);
+
+  trayIcon = new QSystemTrayIcon(this);
+  trayIcon->setContextMenu(trayIconMenu);
+
+  connect(
+          trayIcon,
+          SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
+          this,
+          SLOT(trayIconClicked(QSystemTrayIcon::ActivationReason))
+          );
+}
+
+void TrayMenu::createToolbar()
+{
+  ui->toolBar->setFloatable(false);
+  ui->toolBar->setMovable(false);
+  ui->toolBar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
+  ui->toolBar->setAllowedAreas(Qt::TopToolBarArea);
+  ui->toolBar->setOrientation(Qt::Horizontal);
+  ui->toolBar->setIconSize(QSize(32,32));
+  ui->toolBar->resize(this->width(), 64);
+
+  openGeneralSettings = new QAction("General", this);
+  openGeneralSettings->setIcon(QIcon(":/resource/Resources/preferences-desktop.png"));
+  connect(openGeneralSettings,SIGNAL(triggered()),this, SLOT(generalSettingsClicked()));
+
+  openForwardingSettings = new QAction("Forwarding", this);
+  openForwardingSettings->setIcon(QIcon(":/resource/Resources/emblem-web.png"));
+  connect(openForwardingSettings,SIGNAL(triggered()),this, SLOT(forwardingSettingsClicked()));
+
+  openSecuritySettings = new QAction("Security", this);
+  openSecuritySettings->setIcon(QIcon(":/resource/Resources/emblem-system.png"));
+  connect(openSecuritySettings,SIGNAL(triggered()),this, SLOT(securitySettingsClicked()));
+
+  ui->toolBar->addAction(openGeneralSettings);
+  ui->toolBar->addAction(openForwardingSettings);
+  ui->toolBar->addAction(openSecuritySettings);
+}
+
+void TrayMenu::generalSettingsClicked()
+{
+  ui->generalSettingsWidget->show();
+  ui->forwardingSettingsWidget->hide();
+  ui->securitySettingsWidget->hide();
+}
+
+void TrayMenu::forwardingSettingsClicked()
+{
+  ui->generalSettingsWidget->hide();
+  ui->forwardingSettingsWidget->show();
+  ui->securitySettingsWidget->hide();
+}
+
+void TrayMenu::securitySettingsClicked()
+{
+  ui->generalSettingsWidget->hide();
+  ui->forwardingSettingsWidget->hide();
+  ui->securitySettingsWidget->show();
+}
+
+void TrayMenu::displayPopup()
+{
+  trayIcon->showMessage("NDNx Status", statusXml);
+}
+
+void TrayMenu::addFibEntry()
+{
+  // QString name = dialog->getPrefixName();
+  // QString tunnelType = dialog->getTunnelType();
+  // QString endpoint = dialog->getEndpoint();
+
+  // QStringList arguments;
+  // arguments << "add" << name << tunnelType << endpoint;
+
+  // dialog->hide();
+
+  // QProcess *process = new QProcess();
+  // connect(process,SIGNAL(finished(int)),process, SLOT(deleteLater()));
+  // process->start(NDND_FIB_COMMAND, arguments);
+}
+
+void TrayMenu::closeEvent(QCloseEvent *event)
+{
+  if (trayIcon->isVisible())
+    {
+      hide();
+      event->ignore();
+    }
+}
+
+void TrayMenu::showEvent(QShowEvent * event)
+{
+  ui->generalSettingsWidget->show();
+  ui->forwardingSettingsWidget->hide();
+  ui->securitySettingsWidget->hide();
+}
+
+void TrayMenu::trayIconClicked(QSystemTrayIcon::ActivationReason reason)
+{
+  if(reason == QSystemTrayIcon::Trigger)
+    this->show();
+}
+
+void TrayMenu::setIcon(bool isConnected)
+{
+  if(isConnected)
+    trayIcon->setIcon(QIcon(":/resource/Resources/icon-connected-white.png"));
+  else
+    trayIcon->setIcon(QIcon(":/resource/Resources/icon-disconnected-white.png"));
+}
+
+// void TrayMenu::daemonStatusUpdate()
+// {
+//   urlManager->get(QNetworkRequest(QUrl("http://localhost:6363/?f=xml")));
+// }
+
+// void TrayMenu::runXmlProc(QNetworkReply *reply)
+// {
+//   QByteArray buffer = reply->readAll();
+//   applyStatusXslt = new QProcess();
+
+//   QStringList arguments;
+//   arguments << QString(RESOURCES_DIR) + "/" + STATUS_XSLT_FILE << "-";
+//   connect(applyStatusXslt,SIGNAL(finished(int)), this, SLOT(parseStatusXml()));
+//   //connect(applyStatusXslt,SIGNAL(finished(int)), applyStatusXslt, SLOT(deleteLater()));
+//   applyStatusXslt->start(XSLTPROC,arguments);
+//   applyStatusXslt->write(buffer);
+//   applyStatusXslt->closeWriteChannel();
+
+//   applyFibXslt = new QProcess();
+//   QStringList args;
+//   args << QString(RESOURCES_DIR) + "/" + FIB_XSLT_FILE << "-";
+//   connect(applyFibXslt,SIGNAL(finished(int)), this, SLOT(parseFibXml()));
+//   //connect(applyFibXslt,SIGNAL(finished(int)), applyFibXslt, SLOT(deleteLater()));
+//   applyFibXslt->start(XSLTPROC,args);
+//   applyFibXslt->write(buffer);
+//   applyFibXslt->closeWriteChannel();
+// }
+
+// void TrayMenu::parseStatusXml()
+// {
+//   QByteArray stdout = applyStatusXslt->readAllStandardOutput();
+//   QByteArray stderr = applyStatusXslt->readAllStandardError();
+//   applyStatusXslt->deleteLater();
+
+//   statusXml = QString(stdout);
+
+//   if((statusXml == "") || (stderr.length()>0)) // there was an error during Query evaluation
+//     {
+//       daemonStarted = false;
+//       setIcon(false);
+//       statusIndicator->setText("Inactive");
+
+//       // QProcess *process = new QProcess();
+//       // if(enableHubDiscovery)
+//       //     connect(process, SIGNAL(finished(int)), networkManager, SLOT(autoconfigDaemon()));
+//       //
+//       // connect(process,SIGNAL(finished(int)), process, SLOT(deleteLater()));
+//       // process->start(NDND_START_COMMAND);
+//     }
+//   else
+//     {
+//       daemonStarted = true;
+//       setIcon(true);
+//       statusIndicator->setText("Active");
+
+//       QString interestIn = statusXml.mid(statusXml.indexOf("<in>")+4, statusXml.indexOf("</in>") - (statusXml.indexOf("<in>")+4));
+//       QString interestOut = statusXml.mid(statusXml.indexOf("<out>")+5, statusXml.indexOf("</out>") - (statusXml.indexOf("<out>")+5));
+//       QString dataIn = statusXml.mid(statusXml.lastIndexOf("<in>")+4, statusXml.lastIndexOf("</in>") - (statusXml.lastIndexOf("<in>")+4));
+//       QString dataOut = statusXml.mid(statusXml.lastIndexOf("<out>")+5, statusXml.lastIndexOf("</out>") - (statusXml.lastIndexOf("<out>")+5));
+
+//       int i = 0;
+//       int k = 0;
+//       if((dataOut.length() - interestOut.length()) > 0)
+//         {
+//           i = dataOut.length() - interestOut.length();
+//           i*=2; //because space takes less space than a letter
+//         }
+
+//       if((interestOut.length() - dataOut.length()) > 0)
+//         {
+//           k = interestOut.length() - dataOut.length();
+//           k*=2; //because space takes less space than a letter
+//         }
+
+//       QString interestStats = QString("%1%2%3%4").arg("Interests",-16,' ').arg(interestOut,6+i,' ').arg(" / ",3).arg(interestIn,-6,' ');
+//       QString dataStats = QString("%1%2%3%4").arg("Data",-20,' ').arg(dataOut,6+k,' ').arg(" / ",3).arg(dataIn,-6,' ');
+
+//       //Now I try to align header "Sent / Recv" centrally with the upper line
+//       QString padding;
+//       for(int j = 0; j < interestStats.indexOf(interestOut); j++)
+//         {
+//           if(interestStats.at(j)==' ')
+//             padding +=" ";
+//           else
+//             padding += "  "; //because space takes less space than a letter
+//         }
+
+//       QString header;
+//       int m = 0;
+//       if(interestOut.length() - QString("Sent").length() > 0)
+//         {
+//           m = interestOut.length() - QString("Sent").length();
+//           m *=3;
+//           header = QString("%1%2").arg(padding).arg("  Sent / Recv",QString("  Sent / Recv").length() + m,' ');
+//         }
+//       else if(interestOut.length() - QString("Sent").length() < 0)
+//         {
+//           padding.truncate(padding.length()-(QString("Sent").length() - interestOut.length()));
+//           header = padding + "Sent / Recv";
+//         }
+//       else
+//         {
+//           header = padding + "  Sent / Recv";
+//         }
+
+//       interestSentRecv->setText(interestStats);
+//       dataSentRecv->setText(dataStats);
+//       displayStatus->setText(header);
+//     }
+// }
+
+// void TrayMenu::parseFibXml()
+// {
+//   QByteArray stdout = applyFibXslt->readAllStandardOutput();
+//   QByteArray stderr = applyFibXslt->readAllStandardError();
+//   applyFibXslt->deleteLater();
+
+//   fibContentsXml = QString(stdout);
+
+//   if((stdout == "") || (stderr.length()>0))
+//     return;
+
+//   if ((enableHubDiscovery) && (fibContentsXml.indexOf("ndn:/autoconf-route",0,Qt::CaseInsensitive) == -1))
+//     {
+//       networkManager->autoconfigDaemon();
+//     }
+
+//   QDomDocument xmldoc;
+//   QDomElement root;
+
+//   xmldoc.setContent(fibContentsXml);
+//   root=xmldoc.documentElement();
+
+//   if(model != NULL)
+//     {
+//       scrollPosition = ui->tableView->verticalScrollBar()->value();
+//       model->clear();
+//       delete model;
+//     }
+
+//   model = new QStandardItemModel(root.childNodes().count(),3);
+//   model->setHorizontalHeaderItem(0, new QStandardItem("NDN prefix"));
+//   model->setHorizontalHeaderItem(1, new QStandardItem("Face ID"));
+//   model->setHorizontalHeaderItem(2, new QStandardItem("Endpoint"));
+
+//   int row = 0;
+//   QDomNode fibEntry=root.firstChild();
+
+//   while (!fibEntry.isNull())
+//     {
+//       QDomNodeList properties = fibEntry.childNodes();
+
+//       QDomNode faceID = properties.at(0);
+//       QDomNode ip =  properties.at(1);
+//       QDomNode prefix = properties.at(2);
+
+//       model->setItem(row, 0, new QStandardItem(prefix.toElement().text()));
+//       model->setItem(row, 1, new QStandardItem(faceID.toElement().text()));
+//       model->setItem(row, 2, new QStandardItem(ip.toElement().text()));
+
+//       fibEntry = fibEntry.nextSibling();
+//       row++;
+//     }
+
+//   ui->tableView->setModel(model);
+
+//   ui->tableView->setColumnWidth(0, ui->tableView->size().width() / 2 );
+//   ui->tableView->setColumnWidth(1, ui->tableView->size().width() / 6 );
+
+//   if(selectedRow >= 0)
+//     ui->tableView->selectRow(selectedRow);
+
+//   if(scrollPosition >= 0)
+//     ui->tableView->verticalScrollBar()->setValue(scrollPosition);
+// }
+
+void TrayMenu::createTableView()
+{
+  ui->tableView->horizontalHeader()->setResizeMode(QHeaderView::Fixed);
+  ui->tableView->horizontalHeader()->setStretchLastSection(true);
+  ui->tableView->setSelectionMode(QAbstractItemView::SingleSelection);
+  ui->tableView->setSelectionBehavior(QAbstractItemView::SelectRows);
+
+  selectedRow = -1;
+  scrollPosition = -1;
+
+  QHBoxLayout *hlayout = new QHBoxLayout();
+  hlayout->addWidget(ui->addFibButton,0, Qt::AlignLeft);
+  // hlayout->addWidget(ui->deleteFibButton, 20, Qt::AlignLeft);
+
+  QVBoxLayout *vlayout = new QVBoxLayout();
+  vlayout->addWidget(ui->label);
+  vlayout->addWidget(ui->tableView);
+  vlayout->addLayout(hlayout);
+
+  ui->forwardingSettingsWidget->setLayout(vlayout);
+
+  QVBoxLayout *expanding = new QVBoxLayout();
+  expanding->addWidget(ui->forwardingSettingsWidget);
+  ui->centralWidget->setLayout(expanding);
+}
+
+void TrayMenu::selectTableRow()
+{
+  selectedRow = ui->tableView->selectionModel()->selection().indexes().at(0).row();
+}
+
+// void TrayMenu::deleteFibEntry()
+// {
+//   if(selectedRow < 0)
+//     return;
+
+//   QStandardItem *prefix = model->item(selectedRow,0);
+//   if(prefix == NULL)
+//     return;
+
+//   QStandardItem *faceID = model->item(selectedRow,1);
+//   if(faceID == NULL)
+//     return;
+
+//   QStringList arguments;
+//   arguments << "del" << prefix->text() << "face" << faceID->text();
+
+//   QProcess *process = new QProcess();
+//   connect(process,SIGNAL(finished(int)), process, SLOT(deleteLater()));
+//   process->start(NDND_FIB_COMMAND, arguments);
+// }
+
+void TrayMenu::resizeEvent(QResizeEvent *  event)
+{
+  ui->tableView->setColumnWidth(0, ui->tableView->size().width() / 2);
+  ui->tableView->setColumnWidth(1, ui->tableView->size().width() / 6);
+}
+
+
+void TrayMenu::parseProcessLookup()
+{
+  QByteArray stdout = processLookup->readAllStandardOutput();
+  processLookup->deleteLater();
+
+  QString s = QString(stdout);
+
+  if(s == "")
+    return;
+  else if(s.indexOf("ndnx-control") != s.lastIndexOf("ndnx-control"))
+    qApp->quit();
+}
+
+TrayMenu::~TrayMenu()
+{
+  daemonStatusTimer->stop();
+  statusUpdateThread->exit(0);
+  delete ui;
+  delete trayIcon;
+  delete trayIconMenu;
+  delete open;
+  delete close;
+  delete openGeneralSettings;
+  delete openForwardingSettings;
+  delete openSecuritySettings;
+  delete statusUpdateThread;
+  // delete dialog;
+  delete networkManager;
+  delete persistentSettings;
+}
+
+#if WAF
+#include "tray-menu.moc"
+#include "tray-menu.cpp.moc"
+#endif
diff --git a/qt/tray-menu.hpp b/qt/tray-menu.hpp
new file mode 100644
index 0000000..966db12
--- /dev/null
+++ b/qt/tray-menu.hpp
@@ -0,0 +1,145 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2013-2014, Regents of the University of California,
+ *
+ * This file is part of NFD Control Center.  See AUTHORS.md for complete list of NFD
+ * authors and contributors.
+ *
+ * NFD Control Center is free software: you can redistribute it and/or modify it under the
+ * terms of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NFD Control Center is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with NFD
+ * Control Center, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * \author Ilya Moiseenko <iliamo@ucla.edu>
+ */
+
+#ifndef NCC_QT_TRAY_MENU_H
+#define NCC_QT_TRAY_MENU_H
+
+#include <QMainWindow>
+#include <QWidget>
+#include <QSystemTrayIcon>
+#include <QMenu>
+#include <QTimer>
+#include <QProcess>
+#include <QThread>
+#include <QStandardItemModel>
+#include <QtXml>
+#include <QThread>
+#include <QSettings>
+#include <QNetworkAccessManager>
+#include <QNetworkRequest>
+#include <QNetworkReply>
+
+// #include "fib-input-dialog.hpp"
+#include "quit-dialog.hpp"
+#include "network-manager.hpp"
+
+#define ALLOW_SOFTWARE_UPDATES "AllowAutomaticUpdates"
+#define ENABLE_HUB_DISCOVERY "EnableHubDiscovery"
+#define ENABLE_START_ON_LOGIN "enableStartOnLogin"
+#define SHUTDOWN_ON_EXIT "ShutdownOnExit"
+
+#define AUTOSTART_DIRECTORY "/.config/autostart/"
+#define SHORTCUT_FILE "ndnxcontrolcenter.desktop"
+#define STATUS_XSLT_FILE "status.xslt"
+#define FIB_XSLT_FILE "status-to-fib.xslt"
+
+namespace Ui {
+class TrayMenu;
+}
+
+class TrayMenu : public QMainWindow
+{
+  Q_OBJECT
+
+public:
+  explicit TrayMenu(QWidget *parent = 0);
+  ~TrayMenu();
+
+private:
+  Ui::TrayMenu *ui;
+
+  void createTrayIcon();
+  void setIcon(bool isConnected);
+  void createToolbar();
+  void createTableView();
+  void closeEvent(QCloseEvent *); // Overriding the window's close event
+  void showEvent(QShowEvent * event); //Overriding the window's show event
+
+  void loadSettings();
+  void makeAutostartDirectory();
+
+  void resizeEvent (QResizeEvent * event);
+
+  bool daemonStarted;
+
+  QSettings *persistentSettings;
+
+  QSystemTrayIcon *trayIcon;
+  QMenu *trayIconMenu;
+
+  QTimer *daemonStatusTimer;
+  QThread *statusUpdateThread;
+
+  QProcess *processLookup;
+  QProcess *applyStatusXslt;
+  QProcess *applyFibXslt;
+
+  QString statusXml;
+  QString fibContentsXml;
+
+  QStandardItemModel *model;
+  int selectedRow;
+  int scrollPosition;
+
+  QAction *statusIndicator;
+  QAction *displayStatus;
+  QAction *interestSentRecv;
+  QAction *dataSentRecv;
+  QAction *open;
+  QAction *close;
+  QAction *openGeneralSettings;
+  QAction *openForwardingSettings;
+  QAction *openSecuritySettings;
+
+  // FibInputDialog *dialog;
+
+  bool enableHubDiscovery;
+  bool enableStartOnLogin;
+
+  NetworkManager *networkManager;
+  QNetworkAccessManager *urlManager;
+
+private slots:
+  void trayIconClicked(QSystemTrayIcon::ActivationReason);
+  void generalSettingsClicked();
+  void forwardingSettingsClicked();
+  void securitySettingsClicked();
+  void openTrafficMap();
+  void openRoutingStatus();
+  void openCertificationPage();
+  void displayPopup();
+  // void confirmQuit();
+  void showFibInputDialog();
+  // void terminateDaemonAndClose();
+  void addFibEntry();
+  // void daemonStatusUpdate();
+  void selectTableRow();
+  // void deleteFibEntry();
+  void changeHubDiscovery();
+  void changeLoginStart();
+  void copyFile();
+  // void runXmlProc(QNetworkReply *reply);
+  // void parseStatusXml();
+  // void parseFibXml();
+  void parseProcessLookup();
+};
+
+#endif // NCC_QT_TRAY_MENU_H
diff --git a/qt/traymenu.ui b/qt/traymenu.ui
new file mode 100644
index 0000000..9861777
--- /dev/null
+++ b/qt/traymenu.ui
@@ -0,0 +1,353 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>TrayMenu</class>
+ <widget class="QMainWindow" name="TrayMenu">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>551</width>
+    <height>332</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Maximum" vsizetype="Expanding">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle">
+   <string>NDNx preferences</string>
+  </property>
+  <property name="animated">
+   <bool>true</bool>
+  </property>
+  <widget class="QWidget" name="centralWidget">
+   <property name="enabled">
+    <bool>true</bool>
+   </property>
+   <property name="sizePolicy">
+    <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+     <horstretch>0</horstretch>
+     <verstretch>0</verstretch>
+    </sizepolicy>
+   </property>
+   <property name="minimumSize">
+    <size>
+     <width>550</width>
+     <height>300</height>
+    </size>
+   </property>
+   <property name="baseSize">
+    <size>
+     <width>0</width>
+     <height>0</height>
+    </size>
+   </property>
+   <widget class="QWidget" name="generalSettingsWidget" native="true">
+    <property name="geometry">
+     <rect>
+      <x>10</x>
+      <y>0</y>
+      <width>520</width>
+      <height>240</height>
+     </rect>
+    </property>
+    <property name="sizePolicy">
+     <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+      <horstretch>0</horstretch>
+      <verstretch>0</verstretch>
+     </sizepolicy>
+    </property>
+    <property name="maximumSize">
+     <size>
+      <width>520</width>
+      <height>240</height>
+     </size>
+    </property>
+    <widget class="QGroupBox" name="groupBox">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>10</y>
+       <width>500</width>
+       <height>100</height>
+      </rect>
+     </property>
+     <property name="styleSheet">
+      <string notr="true">QGroupBox#groupBox { 
+border: 1px solid gray; 
+border-radius: 5px; 
+}</string>
+     </property>
+     <property name="title">
+      <string/>
+     </property>
+     <property name="flat">
+      <bool>false</bool>
+     </property>
+     <widget class="QCheckBox" name="hubDiscoveryCheckbox">
+      <property name="geometry">
+       <rect>
+        <x>10</x>
+        <y>50</y>
+        <width>431</width>
+        <height>22</height>
+       </rect>
+      </property>
+      <property name="font">
+       <font>
+        <pointsize>13</pointsize>
+       </font>
+      </property>
+      <property name="text">
+       <string>Discover nearest NDN-hub</string>
+      </property>
+     </widget>
+     <widget class="QCheckBox" name="loginStartCheckbox">
+      <property name="geometry">
+       <rect>
+        <x>10</x>
+        <y>20</y>
+        <width>451</width>
+        <height>22</height>
+       </rect>
+      </property>
+      <property name="font">
+       <font>
+        <pointsize>13</pointsize>
+       </font>
+      </property>
+      <property name="text">
+       <string>Automatically start NDNx Control Center at login</string>
+      </property>
+     </widget>
+    </widget>
+    <widget class="QGroupBox" name="groupBox_2">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>120</y>
+       <width>500</width>
+       <height>75</height>
+      </rect>
+     </property>
+     <property name="styleSheet">
+      <string notr="true">QGroupBox#groupBox_2 { 
+border: 1px solid gray; 
+border-radius: 5px; 
+}</string>
+     </property>
+     <property name="title">
+      <string/>
+     </property>
+     <widget class="QPushButton" name="openTrafficMapButton">
+      <property name="geometry">
+       <rect>
+        <x>10</x>
+        <y>10</y>
+        <width>241</width>
+        <height>27</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string>Open Testbed Traffic Map</string>
+      </property>
+     </widget>
+     <widget class="QPushButton" name="openRoutingStatusButton">
+      <property name="geometry">
+       <rect>
+        <x>10</x>
+        <y>40</y>
+        <width>241</width>
+        <height>27</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string>Open Testbed Routing Status</string>
+      </property>
+     </widget>
+    </widget>
+   </widget>
+   <widget class="QWidget" name="forwardingSettingsWidget" native="true">
+    <property name="geometry">
+     <rect>
+      <x>10</x>
+      <y>0</y>
+      <width>520</width>
+      <height>240</height>
+     </rect>
+    </property>
+    <property name="sizePolicy">
+     <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+      <horstretch>0</horstretch>
+      <verstretch>0</verstretch>
+     </sizepolicy>
+    </property>
+    <property name="minimumSize">
+     <size>
+      <width>520</width>
+      <height>240</height>
+     </size>
+    </property>
+    <widget class="QLabel" name="label">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>10</y>
+       <width>66</width>
+       <height>17</height>
+      </rect>
+     </property>
+     <property name="styleSheet">
+      <string notr="true">font: 18pt;</string>
+     </property>
+     <property name="text">
+      <string>FIB</string>
+     </property>
+    </widget>
+    <widget class="QTableView" name="tableView">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>30</y>
+       <width>500</width>
+       <height>180</height>
+      </rect>
+     </property>
+     <property name="sizePolicy">
+     <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+      <horstretch>0</horstretch>
+      <verstretch>0</verstretch>
+     </sizepolicy>
+     </property>
+    </widget>
+    <widget class="QToolButton" name="addFibButton">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>220</y>
+       <width>23</width>
+       <height>25</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>+</string>
+     </property>
+    </widget>
+    <widget class="QToolButton" name="deleteFibButton">
+     <property name="geometry">
+      <rect>
+       <x>40</x>
+       <y>220</y>
+       <width>23</width>
+       <height>25</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>-</string>
+     </property>
+    </widget>
+   </widget>
+   <widget class="QWidget" name="securitySettingsWidget" native="true">
+    <property name="geometry">
+     <rect>
+      <x>10</x>
+      <y>0</y>
+      <width>520</width>
+      <height>240</height>
+     </rect>
+    </property>
+    <property name="sizePolicy">
+     <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+      <horstretch>0</horstretch>
+      <verstretch>0</verstretch>
+     </sizepolicy>
+    </property>
+    <property name="maximumSize">
+     <size>
+      <width>520</width>
+      <height>240</height>
+     </size>
+    </property>
+    <widget class="QGroupBox" name="groupBox_3">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>10</y>
+       <width>500</width>
+       <height>75</height>
+      </rect>
+     </property>
+     <property name="styleSheet">
+      <string notr="true">QGroupBox#groupBox_3 { 
+border: 1px solid gray; 
+border-radius: 5px; 
+}</string>
+     </property>
+     <property name="title">
+      <string/>
+     </property>
+     <widget class="QPushButton" name="openNdnCertificationButton">
+      <property name="geometry">
+       <rect>
+        <x>10</x>
+        <y>20</y>
+        <width>201</width>
+        <height>27</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string>Obtain NDN Certificate</string>
+      </property>
+     </widget>
+    </widget>
+   </widget>
+  </widget>
+  <widget class="QStatusBar" name="statusBar"/>
+  <widget class="QToolBar" name="toolBar">
+   <property name="enabled">
+    <bool>true</bool>
+   </property>
+   <property name="sizePolicy">
+    <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+     <horstretch>0</horstretch>
+     <verstretch>0</verstretch>
+    </sizepolicy>
+   </property>
+   <property name="contextMenuPolicy">
+    <enum>Qt::DefaultContextMenu</enum>
+   </property>
+   <property name="autoFillBackground">
+    <bool>false</bool>
+   </property>
+   <property name="styleSheet">
+    <string notr="true"/>
+   </property>
+   <property name="movable">
+    <bool>false</bool>
+   </property>
+   <property name="allowedAreas">
+    <set>Qt::TopToolBarArea</set>
+   </property>
+   <property name="iconSize">
+    <size>
+     <width>25</width>
+     <height>17</height>
+    </size>
+   </property>
+   <property name="toolButtonStyle">
+    <enum>Qt::ToolButtonTextUnderIcon</enum>
+   </property>
+   <attribute name="toolBarArea">
+    <enum>TopToolBarArea</enum>
+   </attribute>
+   <attribute name="toolBarBreak">
+    <bool>false</bool>
+   </attribute>
+  </widget>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/qt/wscript b/qt/wscript
new file mode 100644
index 0000000..c1441e6
--- /dev/null
+++ b/qt/wscript
@@ -0,0 +1,46 @@
+# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
+
+from waflib import Logs, Utils, Task, TaskGen
+
+top = '..'
+
+def configure(conf):
+    conf.load(['gnu_dirs', 'qt4'])
+
+    # conf.find_program('xsltproc', mandatory=True)
+    # conf.define('XSLTPROC', conf.env['XSLTPROC'])
+
+    conf.define('RESOURCES_DIR', Utils.subst_vars("${DATAROOTDIR}/nfd-control-center", conf.env))
+
+    if Utils.unversioned_sys_platform() == "darwin":
+        conf.define('OSX_BUILD', 1)
+
+def build(bld):
+    app = bld(
+        features=['qt4', 'cxxprogram', 'cxx'],
+        includes = ".. .",
+
+        use = "QTCORE QTGUI QTXML QTXMLPATTERNS QTDBUS",
+
+        defines = "WAF",
+        source = bld.path.ant_glob(['*.cpp', '**/*.ui', '**/*.qrc']),
+        )
+
+    if Utils.unversioned_sys_platform() != "darwin":
+        app.target = "../nfd-control-center",
+
+        bld(features = "subst",
+             source = 'nfd-control-center.desktop.in',
+             target = 'nfd-control-center.desktop',
+             BINARY = "nfd-control-center",
+             install_path = "${DATAROOTDIR}/nfd-control-center"
+            )
+
+        bld.install_files("${DATAROOTDIR}/nfd-control-center",
+                      bld.path.ant_glob(['Resources/*']))
+    else:
+        app.target = "../NFD Control Center"
+        app.mac_app = True,
+        app.mac_plist = '../osx/Info.plist',
+        app.mac_resources = [i.path_from(bld.path)
+                               for i in bld.path.ant_glob('../osx/Resources/**/*')],