![]() Qtopia Home - Classes - Hierachy - Annotated - Functions - Qt Embedded |
![]() |
People frequently want to associate data from one application with another application. Consider the following cases:
QDL | Qtopia Data Linking is the name given to the protocol/applications that govern data linking in the Qtopia environment. |
QDL Source | The application providing the link |
QDL Client | The application embedding the link |
Link ID | A number of superscript characters (0-9) that are logically connected to the non-user visible Data References. |
Qtopia needs a consistent, global, application-independent way of associating data from one application with another. The application embedding the link should not need special knowledge of the source application. A typical link embed operation is outlined below:
QDL-support is required in a text field since not all fields will be appropriate for data linking. This support will likely be via a flag in the text editing widgets. Support for linking is not likely to be restricted to text editing widgets, however such an implementation is outside the scope of this paper. An application must register itself as a QDL Source with the Qtopia services framework. It is assumed that any text can be sent to the Source as a hint. The Source is responsible for using the data in a sensible way. An example of a hint is typing someone's name before selecting the address book as the Source. Assuming a name was sent to the address book, it may be able to identify the record the user wants. The Source must prompt the user even if the hint makes it obvious what the user wants. A list of choices should be presented, allowing the user to select the desired record. For example, using the address book as the Source, the user would be shown the addresses address book thinks are likely matches (based on the hint) what the user wants. The Source should allow the user to easily select records that did not match the hint. The user will of course want to activate links that have been created. A typical link activation operation is outlined below:
Qtopia has a services mechanism whereby applications can notify the system that they support particular qcop messages. QDL Source applications will need to register as supporting the create link function in order to appear in the list of applications given to the user.
The link that is sent to the Client should include the following:
Application Reference | This identifies the Source. It is used when activating a link. This is not shown to the user. |
Data Reference | This uniquely identifies some data to the Source. It is used when activating a link. This is not shown to the user. |
Descriptive Text | This is added to the text field so the user is able to see what the link is to. |
Icon | This is shown in rich text views as part (possibly all) of the link. |
In order to maximise consistency between applications, the Client is expected to act in particular ways with regards to links. While these points are not requirements of using QDL, they are recommended to minimize user confusion.
When the user selects a link, the Client activates that link by sending a message to the Application Reference with the Data Reference. The Source should open itself and display the indicated record. If the Source cannot find a record to display it will display an error message to the user. The Source should try to minimize the chance that a link will become invalid. Deleting a linked record is an example that would cause a link to become invalid.
It should be obvious that the infrastructure required to support data linking also lends itself to a Global Find function. In this case, the Client is the find application and it requests links from all Sources. It then displays the possible choices to the user. When the user selects a link, the find application activates the link, taking the user to the record they searched for. The biggest problem with QDL for Global Find is the reliance on the Source to present the list of choices to the user. A special link request could be used to obtain a list of links from the Source. The descriptive text and icon should be enough for the user to identify the records. A get all links message will be required of a Source to work with Global Find.
Copyright © 2001-2005 Trolltech | Trademarks | Qtopia version 2.1.1
|