QLPreviewPanel Class Reference
| Inherits from | |
| Conforms to | |
| Availability | Available in OS X v10.6 and later. |
| Companion guide | |
| Declared in | QLPreviewPanel.h |
Overview
The QLPreviewPanel class implements the Quick Look preview panel—a user interface object that displays the preview of a list of items.
Every application has a single shared instance of QLPreviewPanel (see sharedPreviewPanel). The preview panel follows the responder chain and adapts to the first responder willing to control it. A preview panel controller provides the content through methods defined in the QLPreviewPanelDataSource protocol.
You can not subclass QLPreviewPanel; you can, however, customize its behavior using a delegate (see delegate and the QLPreviewPanelDelegate informal protocol).
Tasks
Accessing the Shared Panel
Accessing the Preview Panel Controller
-
currentControllerproperty -
– updateController
Managing the Preview Items
-
dataSourceproperty -
– reloadData -
– refreshCurrentPreviewItem -
currentPreviewItemIndexproperty -
currentPreviewItemproperty -
displayStateproperty
The Panel’s Delegate
-
delegateproperty
Managing Full Screen Mode
Properties
currentController
The current first responder accepting to control the preview panel.
Discussion
You should never change the preview panel’s state (its delegate, datasource, and so on) if you are not controlling it.
Availability
- Available in OS X v10.6 and later.
Declared In
QLPreviewPanel.hcurrentPreviewItem
The currently previewed item.
Discussion
The value is nil if there is no current preview item.
Availability
- Available in OS X v10.6 and later.
Declared In
QLPreviewPanel.hcurrentPreviewItemIndex
The index of the current preview item.
Discussion
The value is NSNotFound if there is no current preview item.
Availability
- Available in OS X v10.6 and later.
Declared In
QLPreviewPanel.hdataSource
The preview panel data source.
Availability
- Available in OS X v10.6 and later.
Declared In
QLPreviewPanel.hdelegate
The preview panel’s delegate.
Availability
- Available in OS X v10.6 and later.
Declared In
QLPreviewPanel.hdisplayState
The preview panel’s display state.
Discussion
The value is an opaque object—you cannot create your own display state.
Availability
- Available in OS X v10.6 and later.
Declared In
QLPreviewPanel.hinFullScreenMode
Indicates whether the panel is in full screen mode.
Discussion
The value is YES if the panel is currently open and in full screen mode, otherwise it is NO.
Availability
- Available in OS X v10.6 and later.
Declared In
QLPreviewPanel.hClass Methods
sharedPreviewPanel
Returns the shared Quick Look preview panel instance.
Return Value
The shared Quick Look preview panel instance for the application.
Discussion
This method creates the panel if it doesn’t exist yet. Use sharedPreviewPanelExists if you want to determine whether the panel exists without creating it.
Availability
- Available in OS X v10.6 and later.
See Also
Declared In
QLPreviewPanel.hsharedPreviewPanelExists
Returns a Boolean value that indicates whether the shared Quick Look preview panel instance has been created.
Return Value
YES if the shared Quick Look preview panel instance has been created, otherwise NO.
Availability
- Available in OS X v10.6 and later.
See Also
Declared In
QLPreviewPanel.hInstance Methods
enterFullScreenMode:withOptions:
Instructs the panel to enter full screen mode.
Parameters
- screen
This parameter is not currently used—pass
nil.- options
This parameter is not currently used—pass
nil.
Return Value
YES if the panel was able to enter full screen mode, otherwise NO.
Discussion
If panel is not on-screen, the panel will go directly to full screen mode.
The panel will choose the appropriate screen depending on where the panel is or, if entering fullscreen directly, where the panel is supposed to zoom from (see QLPreviewPanelDelegate).
Availability
- Available in OS X v10.6 and later.
See Also
Declared In
QLPreviewPanel.hexitFullScreenModeWithOptions:
Instructs the panel to exit full screen mode.
Parameters
- options
This parameter is not currently used—pass
nil.
Availability
- Available in OS X v10.6 and later.
See Also
Declared In
QLPreviewPanel.hrefreshCurrentPreviewItem
Asks the preview panel to recompute the preview of the current preview item.
Discussion
This method does not refresh the visible item if it has not changed.
Availability
- Available in OS X v10.6 and later.
See Also
Declared In
QLPreviewPanel.hreloadData
Asks the preview panel to reload its data from its data source.
Discussion
This method does not refresh the visible item if it has not changed.
Availability
- Available in OS X v10.6 and later.
See Also
Declared In
QLPreviewPanel.hupdateController
Asks the preview panel to update its current controller.
Discussion
The preview panel automatically updates its controller (by searching the responder chain) whenever the main or key window changes. You should only invoke this method if the responder chain changes without explicit notice.
Availability
- Available in OS X v10.6 and later.
Declared In
QLPreviewPanel.h© 2009 Apple Inc. All Rights Reserved. (Last updated: 2009-07-09)