Tray application for Linux

Change-Id: I55862204ef71f69bc88c79fe2259f7cb8365699a
diff --git a/linux/quit-dialog.cpp b/linux/quit-dialog.cpp
new file mode 100644
index 0000000..bd53f24
--- /dev/null
+++ b/linux/quit-dialog.cpp
@@ -0,0 +1,40 @@
+/* -*- 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 "quit-dialog.h"
+#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"));
+}