QLPreviewPanelDataSource Protocol Reference

Availability
Available in OS X v10.6 and later.
Companion guide
Declared in
QLPreviewPanel.h
Related sample code

Overview

The QLPreviewPanelDataSource protocol declares the methods that the Quick Look preview panel (QLPreviewPanel) uses to access the contents of its data source object.

Tasks

Required Methods

Instance Methods

numberOfPreviewItemsInPreviewPanel

Returns the number of items that the preview panel should preview. (required)

- (NSInteger)numberOfPreviewItemsInPreviewPanel:(QLPreviewPanel *)panel
Parameters
panel

The preview panel.

Return Value

The number of items that the preview panel should preview.

previewPanel:previewItemAtIndex:

Returns the item that the preview panel should preview at a given index. (required)

- (id <QLPreviewItem>)previewPanel:(QLPreviewPanel *)panel previewItemAtIndex:(NSInteger)index
Parameters
panel

The preview panel.

index

The index of the item to preview.

Return Value

The item that the preview panel should preview at index index.

Availability
  • Available in OS X v10.6 and later.
Declared In
QLPreviewPanel.h