From a9b976c3c68e246f1d6ab83d02715ab81fb4dd6a Mon Sep 17 00:00:00 2001 From: Ian Walters Date: Tue, 28 Apr 2009 10:38:48 +1000 Subject: Use namespaces to reduce file duplication Also add some alternate 'chapter 2, step 1' examples to demonstrate loading by file name and using namespaces --- .../tutorials/contacts/2_Reuse/1a/ContactField.qml | 20 +++++ .../tutorials/contacts/2_Reuse/1a/RemoveButton.qml | 70 ++++++++++++++++ .../tutorials/contacts/2_Reuse/1b/ContactField.qml | 19 +++++ .../contacts/2_Reuse/1b/lib/RemoveButton.qml | 70 ++++++++++++++++ .../tutorials/contacts/3_Collections/1/Button.qml | 38 --------- .../tutorials/contacts/3_Collections/1/Contact.qml | 28 ------- .../contacts/3_Collections/1/ContactField.qml | 35 -------- .../contacts/3_Collections/1/ContactView.qml | 1 + .../contacts/3_Collections/1/FieldText.qml | 96 ---------------------- .../contacts/3_Collections/1/RemoveButton.qml | 80 ------------------ .../tutorials/contacts/3_Collections/2/Button.qml | 38 --------- .../tutorials/contacts/3_Collections/2/Contact.qml | 28 ------- .../contacts/3_Collections/2/ContactField.qml | 35 -------- .../contacts/3_Collections/2/ContactView.qml | 1 + .../contacts/3_Collections/2/FieldText.qml | 96 ---------------------- .../contacts/3_Collections/2/RemoveButton.qml | 80 ------------------ .../tutorials/contacts/3_Collections/3/Button.qml | 38 --------- .../tutorials/contacts/3_Collections/3/Contact.qml | 28 ------- .../contacts/3_Collections/3/ContactField.qml | 35 -------- .../contacts/3_Collections/3/ContactView.qml | 1 + .../contacts/3_Collections/3/FieldText.qml | 96 ---------------------- .../contacts/3_Collections/3/RemoveButton.qml | 80 ------------------ .../contacts/3_Collections/lib/Button.qml | 38 +++++++++ .../contacts/3_Collections/lib/Contact.qml | 28 +++++++ .../contacts/3_Collections/lib/ContactField.qml | 35 ++++++++ .../contacts/3_Collections/lib/FieldText.qml | 96 ++++++++++++++++++++++ .../contacts/3_Collections/lib/RemoveButton.qml | 80 ++++++++++++++++++ 27 files changed, 459 insertions(+), 831 deletions(-) create mode 100644 examples/declarative/tutorials/contacts/2_Reuse/1a/ContactField.qml create mode 100644 examples/declarative/tutorials/contacts/2_Reuse/1a/RemoveButton.qml create mode 100644 examples/declarative/tutorials/contacts/2_Reuse/1b/ContactField.qml create mode 100644 examples/declarative/tutorials/contacts/2_Reuse/1b/lib/RemoveButton.qml delete mode 100644 examples/declarative/tutorials/contacts/3_Collections/1/Button.qml delete mode 100644 examples/declarative/tutorials/contacts/3_Collections/1/Contact.qml delete mode 100644 examples/declarative/tutorials/contacts/3_Collections/1/ContactField.qml delete mode 100644 examples/declarative/tutorials/contacts/3_Collections/1/FieldText.qml delete mode 100644 examples/declarative/tutorials/contacts/3_Collections/1/RemoveButton.qml delete mode 100644 examples/declarative/tutorials/contacts/3_Collections/2/Button.qml delete mode 100644 examples/declarative/tutorials/contacts/3_Collections/2/Contact.qml delete mode 100644 examples/declarative/tutorials/contacts/3_Collections/2/ContactField.qml delete mode 100644 examples/declarative/tutorials/contacts/3_Collections/2/FieldText.qml delete mode 100644 examples/declarative/tutorials/contacts/3_Collections/2/RemoveButton.qml delete mode 100644 examples/declarative/tutorials/contacts/3_Collections/3/Button.qml delete mode 100644 examples/declarative/tutorials/contacts/3_Collections/3/Contact.qml delete mode 100644 examples/declarative/tutorials/contacts/3_Collections/3/ContactField.qml delete mode 100644 examples/declarative/tutorials/contacts/3_Collections/3/FieldText.qml delete mode 100644 examples/declarative/tutorials/contacts/3_Collections/3/RemoveButton.qml create mode 100644 examples/declarative/tutorials/contacts/3_Collections/lib/Button.qml create mode 100644 examples/declarative/tutorials/contacts/3_Collections/lib/Contact.qml create mode 100644 examples/declarative/tutorials/contacts/3_Collections/lib/ContactField.qml create mode 100644 examples/declarative/tutorials/contacts/3_Collections/lib/FieldText.qml create mode 100644 examples/declarative/tutorials/contacts/3_Collections/lib/RemoveButton.qml diff --git a/examples/declarative/tutorials/contacts/2_Reuse/1a/ContactField.qml b/examples/declarative/tutorials/contacts/2_Reuse/1a/ContactField.qml new file mode 100644 index 0000000..ee860b0 --- /dev/null +++ b/examples/declarative/tutorials/contacts/2_Reuse/1a/ContactField.qml @@ -0,0 +1,20 @@ + + + + + diff --git a/examples/declarative/tutorials/contacts/2_Reuse/1a/RemoveButton.qml b/examples/declarative/tutorials/contacts/2_Reuse/1a/RemoveButton.qml new file mode 100644 index 0000000..ddb3507 --- /dev/null +++ b/examples/declarative/tutorials/contacts/2_Reuse/1a/RemoveButton.qml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/declarative/tutorials/contacts/2_Reuse/1b/ContactField.qml b/examples/declarative/tutorials/contacts/2_Reuse/1b/ContactField.qml new file mode 100644 index 0000000..bff68b9 --- /dev/null +++ b/examples/declarative/tutorials/contacts/2_Reuse/1b/ContactField.qml @@ -0,0 +1,19 @@ + + + + + + diff --git a/examples/declarative/tutorials/contacts/2_Reuse/1b/lib/RemoveButton.qml b/examples/declarative/tutorials/contacts/2_Reuse/1b/lib/RemoveButton.qml new file mode 100644 index 0000000..524bde2 --- /dev/null +++ b/examples/declarative/tutorials/contacts/2_Reuse/1b/lib/RemoveButton.qml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/declarative/tutorials/contacts/3_Collections/1/Button.qml b/examples/declarative/tutorials/contacts/3_Collections/1/Button.qml deleted file mode 100644 index 8290d35..0000000 --- a/examples/declarative/tutorials/contacts/3_Collections/1/Button.qml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/declarative/tutorials/contacts/3_Collections/1/Contact.qml b/examples/declarative/tutorials/contacts/3_Collections/1/Contact.qml deleted file mode 100644 index 293b3a5..0000000 --- a/examples/declarative/tutorials/contacts/3_Collections/1/Contact.qml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - diff --git a/examples/declarative/tutorials/contacts/3_Collections/1/ContactField.qml b/examples/declarative/tutorials/contacts/3_Collections/1/ContactField.qml deleted file mode 100644 index 819914c..0000000 --- a/examples/declarative/tutorials/contacts/3_Collections/1/ContactField.qml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/declarative/tutorials/contacts/3_Collections/1/ContactView.qml b/examples/declarative/tutorials/contacts/3_Collections/1/ContactView.qml index d48aa02..5f9abc7 100644 --- a/examples/declarative/tutorials/contacts/3_Collections/1/ContactView.qml +++ b/examples/declarative/tutorials/contacts/3_Collections/1/ContactView.qml @@ -1,3 +1,4 @@ + diff --git a/examples/declarative/tutorials/contacts/3_Collections/1/FieldText.qml b/examples/declarative/tutorials/contacts/3_Collections/1/FieldText.qml deleted file mode 100644 index 068590a..0000000 --- a/examples/declarative/tutorials/contacts/3_Collections/1/FieldText.qml +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/declarative/tutorials/contacts/3_Collections/1/RemoveButton.qml b/examples/declarative/tutorials/contacts/3_Collections/1/RemoveButton.qml deleted file mode 100644 index ad488c1..0000000 --- a/examples/declarative/tutorials/contacts/3_Collections/1/RemoveButton.qml +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/declarative/tutorials/contacts/3_Collections/2/Button.qml b/examples/declarative/tutorials/contacts/3_Collections/2/Button.qml deleted file mode 100644 index 8290d35..0000000 --- a/examples/declarative/tutorials/contacts/3_Collections/2/Button.qml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/declarative/tutorials/contacts/3_Collections/2/Contact.qml b/examples/declarative/tutorials/contacts/3_Collections/2/Contact.qml deleted file mode 100644 index 293b3a5..0000000 --- a/examples/declarative/tutorials/contacts/3_Collections/2/Contact.qml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - diff --git a/examples/declarative/tutorials/contacts/3_Collections/2/ContactField.qml b/examples/declarative/tutorials/contacts/3_Collections/2/ContactField.qml deleted file mode 100644 index 819914c..0000000 --- a/examples/declarative/tutorials/contacts/3_Collections/2/ContactField.qml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/declarative/tutorials/contacts/3_Collections/2/ContactView.qml b/examples/declarative/tutorials/contacts/3_Collections/2/ContactView.qml index c72d9ce..99d0bbb 100644 --- a/examples/declarative/tutorials/contacts/3_Collections/2/ContactView.qml +++ b/examples/declarative/tutorials/contacts/3_Collections/2/ContactView.qml @@ -1,3 +1,4 @@ + diff --git a/examples/declarative/tutorials/contacts/3_Collections/2/FieldText.qml b/examples/declarative/tutorials/contacts/3_Collections/2/FieldText.qml deleted file mode 100644 index 068590a..0000000 --- a/examples/declarative/tutorials/contacts/3_Collections/2/FieldText.qml +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/declarative/tutorials/contacts/3_Collections/2/RemoveButton.qml b/examples/declarative/tutorials/contacts/3_Collections/2/RemoveButton.qml deleted file mode 100644 index ad488c1..0000000 --- a/examples/declarative/tutorials/contacts/3_Collections/2/RemoveButton.qml +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/declarative/tutorials/contacts/3_Collections/3/Button.qml b/examples/declarative/tutorials/contacts/3_Collections/3/Button.qml deleted file mode 100644 index 8290d35..0000000 --- a/examples/declarative/tutorials/contacts/3_Collections/3/Button.qml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/declarative/tutorials/contacts/3_Collections/3/Contact.qml b/examples/declarative/tutorials/contacts/3_Collections/3/Contact.qml deleted file mode 100644 index 293b3a5..0000000 --- a/examples/declarative/tutorials/contacts/3_Collections/3/Contact.qml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - diff --git a/examples/declarative/tutorials/contacts/3_Collections/3/ContactField.qml b/examples/declarative/tutorials/contacts/3_Collections/3/ContactField.qml deleted file mode 100644 index 819914c..0000000 --- a/examples/declarative/tutorials/contacts/3_Collections/3/ContactField.qml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/declarative/tutorials/contacts/3_Collections/3/ContactView.qml b/examples/declarative/tutorials/contacts/3_Collections/3/ContactView.qml index ec9ff57..a8c5cd0 100644 --- a/examples/declarative/tutorials/contacts/3_Collections/3/ContactView.qml +++ b/examples/declarative/tutorials/contacts/3_Collections/3/ContactView.qml @@ -1,3 +1,4 @@ + diff --git a/examples/declarative/tutorials/contacts/3_Collections/3/FieldText.qml b/examples/declarative/tutorials/contacts/3_Collections/3/FieldText.qml deleted file mode 100644 index 068590a..0000000 --- a/examples/declarative/tutorials/contacts/3_Collections/3/FieldText.qml +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/declarative/tutorials/contacts/3_Collections/3/RemoveButton.qml b/examples/declarative/tutorials/contacts/3_Collections/3/RemoveButton.qml deleted file mode 100644 index ad488c1..0000000 --- a/examples/declarative/tutorials/contacts/3_Collections/3/RemoveButton.qml +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/declarative/tutorials/contacts/3_Collections/lib/Button.qml b/examples/declarative/tutorials/contacts/3_Collections/lib/Button.qml new file mode 100644 index 0000000..8290d35 --- /dev/null +++ b/examples/declarative/tutorials/contacts/3_Collections/lib/Button.qml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/declarative/tutorials/contacts/3_Collections/lib/Contact.qml b/examples/declarative/tutorials/contacts/3_Collections/lib/Contact.qml new file mode 100644 index 0000000..293b3a5 --- /dev/null +++ b/examples/declarative/tutorials/contacts/3_Collections/lib/Contact.qml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + diff --git a/examples/declarative/tutorials/contacts/3_Collections/lib/ContactField.qml b/examples/declarative/tutorials/contacts/3_Collections/lib/ContactField.qml new file mode 100644 index 0000000..819914c --- /dev/null +++ b/examples/declarative/tutorials/contacts/3_Collections/lib/ContactField.qml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/declarative/tutorials/contacts/3_Collections/lib/FieldText.qml b/examples/declarative/tutorials/contacts/3_Collections/lib/FieldText.qml new file mode 100644 index 0000000..068590a --- /dev/null +++ b/examples/declarative/tutorials/contacts/3_Collections/lib/FieldText.qml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/declarative/tutorials/contacts/3_Collections/lib/RemoveButton.qml b/examples/declarative/tutorials/contacts/3_Collections/lib/RemoveButton.qml new file mode 100644 index 0000000..ad488c1 --- /dev/null +++ b/examples/declarative/tutorials/contacts/3_Collections/lib/RemoveButton.qml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v0.12