Skip to main content

ESCAPE

QDrop: easy drag & drop that works

QDrop allows drag and drop of desktop files and folders into 4D forms. It lets you build intuitive, user-friendly interfaces for all kinds of 4D applications. With QDrop your software becomes simpler and more appealing to end-users.

What does it do?

QDrop offers a plug-in area that you can put on any 4D form and use as a drop zone. The plug-in area can be made big enough to cover the entire form window, or it can be placed behind specific form objects, other plug-in areas, and so on. QDrop can easily revamp those parts of a database that involve working with desktop files and folders.

When implemented in image databases and document management applications, QDrop adds simplicity and intuitiveness to standard operations such as importing files and folders into the database.

How does it work?

Each QDrop area can be configured to accept specific classes of files, using either filename extensions (on both platforms), or Uniform Type Identifiers (only on MacOS X).

Instead of specifying individual filename extensions, QDrop provides special constants called "magic file types" to collectively represent entire classes of files.

Magic file types are:

  • any* denotes that all files are accepted
  • fold denotes that folders are accepted
  • qti* means that all images understood by QuickTime are accepted (requires QuickTime)
  • qtm* accepts all movie formats understood by QuickTime (requires QuickTime)

For example...

To use QDrop for importing image files that you will subsequently handle with QPix, you don't need to configure the drop area separately for JPEG, GIF, PICT, TIFF, etc files. Simply configure it for "qti*" and all these types will be accepted. UTIs are also very handy for doing this (using, e.g. the "public/image" type), but they exist only on MacOS X.

Visual feedback as a result of accepted drop actions is customizable by the developer (width, color, inset).

Once accepted drag types are configured, the QDrop area will automatically react to matching objects and also:

  • users will get a visual feedback that the drop is accepted
  • developers will receive a drop event to handle the drop action.