Requirements and Installation

System requirements

Q2Pix works with 4D v15 or later, 4D v16/64 recommended. On Windows make sure the PC has 512 MB or more video RAM.

Installation

Q2Pix consists of a number of 4D extensions:

Name Kind Contains Install?
Q2Pix.bundle Plug-in Core API and plug-in area. Required
Q2PixLib.4dbase Component Additional functionality (common dialogs, higher-level methods), as well as 4D-object-based wrappers of JSON-based plug-in methods. Required
Q2ImgControl.4dbase Component The ImgControl widget. Recommended
Q2XMPLib.4dbase Component XMP-related utility functions and a generic XMP data editor. Recommended
Q2Utils.4dbase Component Utility functions used by other components. Required
Q2Pix Manual.4dbase Component The documentation (made into a codeless component for easy access from 4D’s Help menu). Optional
0QLM.bundle Plug-in Plug-in that controls licensing for all Escape plug-ins. Required
QLMLib.4dbase Component Support library for 0QLM.bundle. Required

At the very least, the Q2Pix.bundle, 0QLM.bundle plug-ins, and the Q2PixLib.4dbase, Q2Utils.4dbase, QLMLib.4dbase components must be placed in the database’s Plugins and Components folders respectively.

The Q2ImgControl.4dbase and XMPLib.4dbase components are optional.

Initialization/Finalization

All installed components, except Q2Utils.4dbase, Q2Pix Manual.4dbase and QLMLib.4dbase, must be initialized and finalized. This can be done in two ways:

Using the “On Host Database Event” option

The easiest way is to enable the Execute "On Host Database Event" method of the components option in the Security tab of the Database Settings dialog. All components initialize and finalize themselves through this event, so no code is necessary.

If you are concerned about the security implications of this setting, you can initialize and finalize the components manually:

Manually

Every <ComponentName>.4dbase component includes <ComponentName>_Initialize and <ComponentName>_Finalize methods. Call these methods from your On Startup and On Exit database methods repsectively.

If you will be using any of the components on the server side, do the same from the On Server Startup and On Server Shutdown methods.

Example database methods:

1
2
3
4
// "On Startup" database method
Q2PixLib_Initialize
Q2ImgControl_Initialize
Q2XMPLib_Initialize
1
2
3
4
// "On Exit" database method
Q2PixLib_Finalize
Q2ImgControl_Finalize
Q2XMPLib_Finalize