summaryrefslogtreecommitdiffstats
path: root/doc/src/declarative
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-06-10 05:59:41 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-06-10 05:59:41 (GMT)
commit5419a744c830003cb2e93e5de731e684a67930a2 (patch)
tree4bd15d3b7a4c2b06bc0f56c9e3c574fd74c2f5aa /doc/src/declarative
parent4dc4cfac667389efda4a43df5ff8cfa4ba305a2f (diff)
downloadQt-5419a744c830003cb2e93e5de731e684a67930a2.zip
Qt-5419a744c830003cb2e93e5de731e684a67930a2.tar.gz
Qt-5419a744c830003cb2e93e5de731e684a67930a2.tar.bz2
Ideas for full module support.
Diffstat (limited to 'doc/src/declarative')
-rw-r--r--doc/src/declarative/modules.qdoc94
1 files changed, 94 insertions, 0 deletions
diff --git a/doc/src/declarative/modules.qdoc b/doc/src/declarative/modules.qdoc
index 5933223..d84ad46 100644
--- a/doc/src/declarative/modules.qdoc
+++ b/doc/src/declarative/modules.qdoc
@@ -20,3 +20,97 @@ the component issuing the import.
The import statement cannot be used by remote content.
*/
+
+/*
+
+Ideas for full module support....
+
+
+* Modularity within applications
+
+This is the currently-supported mechanism.
+
+By using the "import" statement, a subdirectory of types can be added to the
+empty namespace. Alternatively, a type in a subdirectory can be referenced
+explicitly:
+
+ ./SubModule1/Type1.qml
+ ./SubModule2/Type1.qml
+ import "SubModule1"
+ Type1 { ... }
+ SubModule2.Type1 { ... }
+
+
+* System-installed modules (dependencies)
+
+To use system-installed modules, the dependency must be explicitly stated
+using the "require" statement. Types in required modules must still be
+explicitly qualified. Dependencies cannot be added to the empty namespace.
+
+ QMLPATH=/opt/Nokia/qml:/usr/share/lib/qml
+ /opt/Nokia/qml/Module1/Type1.qml
+ /usr/share/lib/qml/Module1/Type1.qml
+ require "Module1"
+ Module1.Type1 { ... }
+
+
+* Grouping of components within application modules
+
+Sub-sub directories allow further grouping of types.
+
+ ./SubModule1/Group1/*.qml
+ ./SubModule1/Group2/*.qml
+
+ SubModule1.Group1.Type1 { ... }
+ SubModule1.Group1.Type2 { ... }
+ SubModule1.Group2.Type1 { ... }
+ SubModule1.Group2.Type2 { ... }
+
+ import "SubModule1/Group1"
+ Type1 { ... }
+
+ import "SubModule1"
+ Group1.Type1 { ... }
+
+
+* Grouping of components within system-installed modules
+
+System-installed types may also be grouped into types. The hierarchy is a
+global namespace, so such grouping is recommended to reduce clashes.
+
+ /opt/Nokia/qml/Module1/Group1/*.qml
+ /opt/Nokia/qml/Module1/Group2/*.qml
+
+ require "Module1"
+ Module1.Group1.Type1 { ... }
+ Module1.Group1.Type2 { ... }
+ Module1.Group2.Type1 { ... }
+ Module1.Group2.Type2 { ... }
+
+ require "Module1/Group1"
+ Group1.Type1 { ... }
+
+ // Alternative syntax
+ /opt/qml/com/nokia/qml/Module1/Group1/*.qml
+ require "com.nokia.qml.Module1.Group1"
+ Group1.Type1 { ... }
+
+
+* Private sub-components
+
+Directories begining with _ cannot be referenced except by types in the
+directory immediately containing it.
+
+ /opt/Nokia/qml/Module1/_private/Type1.qml
+ ./SubModule1/_private/Type1.qml
+
+ SubModule1._private.Type1 { ... } // Not allowed
+ import "SubModule1._private" // Not allowed
+ require "SubModule1._private" // Not allowed
+ require "SubModule1"
+ Module1._private.Type1 { ... } // Not allowed
+
+ import "_private" // allowed
+ Type1 { ... }
+
+*/