+
+ connect(field1, SIGNAL(editTextChanged(const QString &)), this, SLOT(NewItem(const QString &)));
+ connect(field1, SIGNAL(highlighted(int)), this, SLOT(ExistingItem(int)));
+}
+
+
+// Here we make some assumptions:
+// - If the user types something in, they probably are creating a new category.
+// - If the user selects something, they probably want to use an existing one.
+
+void ContactEditWidget::NewItem(const QString &)
+{
+ newContactType = true;
+}
+
+
+void ContactEditWidget::ExistingItem(int)
+{
+ newContactType = false;