The Modify Task example demonstrates the following:
- How to build a plugin module for the VR-Forces Gui
- How to override existing task dialog functionality and replace with your own
- How to register a task dialog to override an existing task dialog
This example adds a new label to the dialog called "Modified By Example" to show how an existing dialog can be modified.
#include <vrvCore/DtDe.h>
#include <QtGui/QGroupBox>
#include <QtGui/QLabel>
#include <QtGui/QLayout>
{
public:
MyTaskMoveToDialog(makVrv::DtDe& de,
QWidget* parent,
const Qt::WindowFlags& flags = 0)
: makVrf::DtTaskMoveToDialog(de, parent, flags)
{
}
protected:
{
QLabel* label = new QLabel(tr("Modified By Example"), canvas);
((QVBoxLayout*)canvas->layout())->insertWidget(2, label);
return canvas;
}
};
{
public:
{
}
};
{
return true;
}
{
info.
pluginDescription =
"This example shows how to modify an existing task dialog (Move To Waypoint...) to add your own functionality.";
}