The Menu Manipulation example demonstrates how to manipulate the menu, changing it from the system default.
using namespace makVrf;
{
virtual bool shouldAddCreationItem(
const DtEntityPaletteItem& item,
const QString& category,
const QString& deployedCountry,
int force)
const
{
if ((force == DtForceFriendly) && (item.
myMapperKey == DtEntityType(1, 1, 225, 1, 1, 3, 0)))
{
return false;
}
return true;
}
};
{
DtListItem* item = copySet.first();
while (item)
{
{
}
else if (entry->
label() ==
"Route")
{
}
item = item->next();
}
}
{
removeInformationItemFromSection("DtEntityInformation", "DtEntityCompactData", "DtEntityAltitude");
addInformationItemToSection("DtEntityInformation", "DtEntityCompactData", "DtEntityHeadingPitchRoll", 1, 3, 1, 1, 128);
}
{
(
boost::bind(&DtCreateMenuConfigurationLoaded, &de, _1, _2));
}
{
}
{
}
{
QMessageBox::information(NULL, QObject::tr("Example Menu Item Pressed"), QObject::tr("Your menu item works!"));
}
{
}
{
}
{
}
{
&exampleMenuItemTrigger);
}
{
}
{
removeMenuItems(*de);
reorganizeTaskMenuItems(*de);
reorganizeSetMenuItems(*de);
addToCreateMenu(*de);
addMenu(*de);
modifyRightClick(*de);
modifyInformationSection(*de);
return true;
}
{
}