Vvidget Code Reference Manual

Vvidget Code > Programming > Plug-in > Line Graph QuickLook

This section details the Line Graph QuickLook plug-in described in the Tutorial section.

You can download the plug-in project described in the tutorial by clicking: LineGraphQuickLook.zip. After downloading, building and installing it will translate appropriately formatted contents of data files with extension linegraphdata into an image for the Finder. For example, a data file named sample2.linegraphdata with the following content of x y pairs:

1   2   2   5   3   20   4   9
1   1   2   3   3   10

is converted to a Cover Flow view shown as a line graph, along with views of similarly formatted files as shown in the following figure.

Example

Thus with little effort you can make an integrated data visualization browser to browse through files of data points. In terms of the Line Graph QuickLook plugin the important lines of code are:

[constructor VC_append_key:"data_format_type" unsigned_value:0U];
[constructor VC_append_key:"data_reference_type" unsigned_value:1U];
[constructor VC_append_key:"data_values" string_value:[NSString stringWithUTF8String:filePath]];

The value of the data_values key defines the actual points of the data and is usually a string of numbers. However, the data_reference_type value specifies that the data_values value is a string with a file path and the actual data values are contained in the file at that path. The data_format_type key value specifies the interpretation of the data.

If you have a specially formatted file then you can simply leave out the data_reference_type key and instead read the data according to your exact needs and insert that data into a string and pass it as the value of the data_values key. There are also other ways to get your data into a QuickLook plug-in. For example, you can setup a SQL query string within Vvidget Builder on a document basis and simply image that document to see values from a database server. That functionality is provided in the stock Vvidget QuickLook plug-in.

Please help improve this documentation. If a section is hard to understand, there is a typo, you would like a new section added, or you detect any other improvement that can be made then please email support@vvi.com with your information.




© Copyright 1993-2011 by VVimaging, Inc. (VVI); All Rights Reserved. Please email support@vvi.com with any comments you have concerning this documentation. See Legal for trademark and legal information.