Developer Documentation

Information Interface

Click InformationInterface for a detailed overview of all provided slots in the interface.

Derive from the information interface in order to provide information on objects of a specific data type. To clarify this, we will give a short example. Assuming we want to provide information on all mesh objects (namely objects of type DATA_TRIANGLE_MESH and DATA_POLY_MESH). In our plugin, we first have to override the slot that fetches the supported data types:

DataType MyInfoPlugin::supportedDataTypes() {
return DataType(DATA_TRIANGLE_MESH | DATA_POLY_MESH);
}

It's as simple as that. Now, each time an object is clicked in identifier mode, slot slotInformationRequested() is called. We ovveride this slot in order to do the actual picking and displaying the gathered information in a dialog box:

void MyInfoPlugin::slotInformationRequested(const QPoint _clickedPoint, const DataType _type) {
// We only respond to requests for our data type
if((_type != DATA_TRIANGLE_MESH) && (_type != DATA_POLY_MESH)) return;
// Do the picking...
// Display dialog box with all the information...
}