Requirements and Installation¶
System requirements¶
Macintosh or Windows PC running 4D v16 or later. 4D v17/64 or later recommended. Project mode on 4Dv18 or later supported.
On Windows make sure the PC has a video card with 512 MB or more video RAM.
Package Contents¶
Q2Pix consists of a number of 4D extensions (plug-ins and components).
The distribution package contents are:
- Components/ - Compiled components
- Q2PixLib.4dbase - Additional functionality (common dialogs, higher-level methods), as well as 4D-object-based wrappers of JSON-based plug-in methods.
- Q2ImgControl.4dbase - The
ImgControl
widget.- Q2XMPLib.4dbase - XMP-related utility functions and a generic XMP data editor.
- Q2Utils.4dbase - Utility functions used by other components.
- Q2Pix Manual.4dbase - The documentation, packaged as a component for easy access from 4D’s
Help
menu.- QLMLib.4dbase - Support library for the License Manager.
- Components - Project Mode/ - Components specific to 4D’s new project mode.
- QLMProjectMode.4dbase - Support library for the License Manager.
- Components - Sources/ - Component source code.
- Q2PixLib.4dbase
- Q2ImgControl.4dbase
- Q2XMPLib.4dbase
- Q2Utils.4dbase
- Plugins/ - Notarized plug-ins, for 4Dv17 or later.
- Q2Pix.bundle - The Q2Pix plug-in. Provides the core API and plug-in area.
- 0QLM.bundle - The Licence Manager plug-in.
- Plugins - 4Dv16/ - Plug-ins for 4Dv16.
- Q2Pix.bundle
- 0QLM.bundle
Installation¶
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.
When running 4Dv16, the plug-ins in the Plugins - 4Dv16/ folder in the package must be used. On 4Dv17 or later, use the ones in the Plugins/ folder.
Additionally, when using 4D’s project mode (4Dv18 or later), the QLMProjectMode.4dbase
component must be installed.
Components Q2ImgControl.4dbase
and Q2XMPLib.4dbase
are optional but recommended.
Component Initialization/Finalization¶
Components Q2PixLib.4dbase
, Q2ImgControl.4dbase
and Q2XMPLib.4dbase
must be
initialized and finalized. This can be done in either of these 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 respectively.
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 for manual initialization/finalization:
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 |