Multiple interface and functionality improvements

- Enable start of the control center after login
- Enable start of the bundled NFD when the center starts
- Slightly refactored implementation of how ndn-autoconfig starting is
  handled
- Add ability to stop NFD when the center stops

Change-Id: Ieb19b8c0a3e75a5a91961e87c8ccffad364d5170
diff --git a/src/main.qml b/src/main.qml
index 7ef1990..b051c6c 100644
--- a/src/main.qml
+++ b/src/main.qml
@@ -40,14 +40,27 @@
                         anchors.rightMargin: 10
                         CheckBox {
                             id: startOnLogin
-                            enabled: false
-                            text: "Automatically start NFD Control Center on login"
+                            text: "Launch NFD Control Center on login"
+                            checked: trayModel.isNccAutoStartEnabled()
+                            onCheckedChanged: trayModel.enableDisableNccAutoStart(this.checked)
+                        }
+                        CheckBox {
+                            id: autoStart
+                            text: "Automatically start NFD"
+                            checked: trayModel.isNfdAutoStartEnabled()
+                            onCheckedChanged: trayModel.enableDisableNfdAutoStart(this.checked)
                         }
                         CheckBox {
                             id: autoConfig
                             text: "Automatically start NDN auto configuration"
-                            checked: trayModel.isAutoConfigEnabled()
-                            onCheckedChanged: trayModel.startStopAutoConfig(this.checked)
+                            checked: trayModel.isNdnAutoConfigEnabled()
+                            onCheckedChanged: trayModel.enableDisableNdnAutoConfig(this.checked)
+                        }
+                        CheckBox {
+                            id: shutdownOnQuit
+                            text: "Shutdown NFD daemon on quit"
+                            checked: trayModel.isNfdStopOnExitEnabled()
+                            onCheckedChanged: trayModel.enableDisableNfdStopOnExit(this.checked)
                         }
                     }
                 }
@@ -78,20 +91,6 @@
                         }
                     }
                 }
-                Button {
-                    id: startStopButton
-                    text: startStopButtonText
-
-                    anchors.top: status.bottom
-                    anchors.left: parent.left
-                    anchors.right: parent.right
-                    anchors.topMargin: 20
-                    anchors.leftMargin: 20
-                    anchors.rightMargin: 20
-                    anchors.bottomMargin: 20
-
-                    onClicked: trayModel.startStopNfd(autoConfig.checked)
-                }
             }
         }
         // Tab {
@@ -144,14 +143,14 @@
         Tab {
             title: "Auto-config status"
             TextArea {
-                id: autoConfigText
+                id: ndnAutoConfigTextId
                 anchors.fill: parent
                 anchors.topMargin: 20
                 anchors.bottomMargin: 20
                 anchors.leftMargin: 20
                 anchors.rightMargin: 20
                 readOnly: true
-                text: acText
+                text: ndnAutoConfigText
             }
         }
         Tab {