summaryrefslogtreecommitdiffstats
path: root/app/numbertype.h
diff options
context:
space:
mode:
authorMatt Porter <mporter@konsulko.com>2018-05-18 14:42:52 -0400
committerMatt Porter <mporter@konsulko.com>2018-05-21 11:20:36 -0400
commitb00822fe8b233f33adca86f93e5c1b90050983aa (patch)
tree50d78108535f2659e398d198564b28fd6462b8a0 /app/numbertype.h
parent4e454de545544526cbea9d787df9ba76cb99d889 (diff)
contacts: handle multiple numbers and types
The current contact model has a few fixed fields for phone numbers and only one is displayed and able to be dialed from the contacts view. Update the model to support an array of tuples indicating each phone number and type of phone number (mobile, home, work, other) associated with a contact entry. Also, update the ContactsView so we see all phone numbers for a given contact. Bug-AGL: SPEC-1435 Change-Id: Ie883d3f06c0e4102e79546395dbb1712741bac8b Signed-off-by: Matt Porter <mporter@konsulko.com>
Diffstat (limited to 'app/numbertype.h')
-rw-r--r--app/numbertype.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/app/numbertype.h b/app/numbertype.h
new file mode 100644
index 0000000..3c7e787
--- /dev/null
+++ b/app/numbertype.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2018 Konsulko Group
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <QObject>
+
+class NumberType
+{
+ Q_GADGET
+ public:
+ enum Value {
+ Mobile,
+ Work,
+ Home,
+ Other,
+ };
+ Q_ENUM(Value)
+
+ private:
+ NumberType();
+};