VR-Vantage
Loading...
Searching...
No Matches
exampleSymbolFacade

Overview

This example builds on the symbol facade and driver from the previous examples in this tutorial series, and shows additional steps that are necessary for deleting symbols using an item on the symbol's context menu.

Expected Result

Symbol Facade Result

Example details

A menu item for deleting the selected symbols was first created and registered with the menu assembler. The menu item should only be enabled if a symbol is selected, so the menu item's on_aboutToShow method performs this check.

void DtDeleteSymbolItem::on_aboutToShow()
{
// Get the symbol driver for determining if symbols are selected.
DtExampleSymbolDriver* symbolDriver = (DtExampleSymbolDriver*)
myDe.driverManager().findDriver( "DtExampleSymbolDriver" );
// Only enable the MenuItem if symbols are selected.
myAction->setEnabled( ! symbolDriver->selectedSymbols().empty() );
}

When the user clicks on the menu item, it tells the driver to delete the selected symbols.

// Tell the driver to delete the selected symbols.
DtExampleSymbolDriver* symbolDriver = (DtExampleSymbolDriver*)
myDe.driverManager().findDriver( "DtExampleSymbolDriver" );
symbolDriver->deleteSelectedSymbols();

The driver's deleteSelectedSymbols method was created to iterate over all selected objects and delete the symbols.

void DtExampleSymbolDriver::deleteSelectedSymbols()
{
SymbolList::iterator i = myCurrentlySelectedSymbols.begin();
SymbolList::iterator e = myCurrentlySelectedSymbols.end();
DtSelectionManager::IdSet idsToRemove;
DtElementID symbolId;
for ( ; i != e; ++i )
{
symbolId = (*i)->elementId();
idsToRemove.insert(symbolId);
delete *i;
mySymbolFacades.erase( symbolId );
reportElementDestroyed( symbolId );
}
DtSelectionManager::instance( myAgentManager.de() ).removeFromCurrentSelection(idsToRemove);
myCurrentlySelectedSymbols.clear();
}

The driver has the ability to set the size of the label in screen space pixels but it does not. Instead, the driver relies on the altitude-based sizes that are defined in the DtSymbolFacade class. The altitude-based sizes allow the dynamic sizing of the symbol based on the viewing camera's altitude which can be used to make the symbol appear further away when zooming out in 2D PVD mode.

The driver does toggle altitude-based sizes on specific symbol facades (as well as change their colors) based on the element's mouse cursor state.

&DtExampleSymbolDriver::slot_elementHasMouseCursorStateChanged,
this, boost::placeholders::_1, boost::placeholders::_2 ) );
return true;
}
bool DtExampleSymbolDriver::onStop()
{
// Stop listening for selection changes.
myConnections.disconnectSignals();
// Delete all created facades.
SymbolFacadeMap::iterator i = mySymbolFacades.begin();
SymbolFacadeMap::iterator e = mySymbolFacades.end();
for ( ; i != e; ++i )
{
reportElementDestroyed(i->first);
delete i->second;
}
// Clear the list of facades.
mySymbolFacades.clear();
// Apply changes manually since we're stopping the driver
if (myChanges.hasChanges())
{
myAgentManager.de().dataBank().elementData().applyChanges(myChanges);
myChanges.clear();
}
return true;
}

It also toggles altitude-based sizes on specific symbol facades (as well as change their colors) based on the element's selected state.

&DtExampleSymbolDriver::slot_currentSelectionChanged,
this, boost::placeholders::_1, boost::placeholders::_2, boost::placeholders::_3, boost::placeholders::_4 ) );
myConnections += selectionManager.signal_elementHasMouseCursorStateChanged.connect( boost::bind(
&DtExampleSymbolDriver::slot_elementHasMouseCursorStateChanged,
this, boost::placeholders::_1, boost::placeholders::_2 ) );
return true;
}
bool DtExampleSymbolDriver::onStop()
{
// Stop listening for selection changes.
myConnections.disconnectSignals();
// Delete all created facades.
SymbolFacadeMap::iterator i = mySymbolFacades.begin();
SymbolFacadeMap::iterator e = mySymbolFacades.end();
for ( ; i != e; ++i )
{
reportElementDestroyed(i->first);
delete i->second;
}
// Clear the list of facades.
mySymbolFacades.clear();
// Apply changes manually since we're stopping the driver
if (myChanges.hasChanges())
{
myAgentManager.de().dataBank().elementData().applyChanges(myChanges);
myChanges.clear();
}
return true;
}
bool DtExampleSymbolDriver::onTick()
{
return true;
}
DtSymbolFacade* DtExampleSymbolDriver::createSymbol(
const std::string& name, const DtVector& pos )
{
// Create symbol.
DtElementID elementId = myAgentManager.createNewUniqueId();
DtSymbolFacade* symbol = new DtSymbolFacade( myAgentManager, elementId );
// Store the symbol in the driver's symbol map.
mySymbolFacades.insert( std::make_pair(elementId,symbol) );
// Report that the symbol was created and report its name.
// These commands report to VR-Vantage that a new object has been created
// and that it should be managed as an object that may be visualized in various ways.
reportElementCreated( elementId, 0, DtSymbolFacade::elementType() );
reportElementAttribute( elementId, new DtElementAttributeDisplayName(name) );
reportElementAttribute( elementId, new DtElementAttributeDriverType( "Symbol Driver" ) );
// Position the symbol.
positionSymbol( symbol, pos );
return symbol;
}
DtSymbolFacade* DtExampleSymbolDriver::findSymbol( DtElementID symbolId )
{
SymbolFacadeMap::iterator itr = mySymbolFacades.find( symbolId );
if ( itr != mySymbolFacades.end() )
return itr->second;
return NULL;
}

The DtSymbolFacade sets the altitude-based sizes in DtSymbolFacade::initialize(). Note, the altitude-based sizes are denoted as ratios of the base size.

The base size is set using myWidgetLabelAgent->setSize(...) and the altitude-based sizes are set using myWidgetLabelAgent->setAltitudeBasedConfigurations(...).

myWidgetLabelAgent->setAltitudeBasedConfigurations(...) expects a std::map where the key is the minimum altitude, in meters, and the value is the ratio of the base size for this particular altitude-based size.

For example, with the following std::map: myImageScalesByMinimumAltitude.push_back({ std::numeric_limits<double>::min(), 1.0f }); myImageScalesByMinimumAltitude.push_back({ 7500, 0.75f }); myImageScalesByMinimumAltitude.push_back({ 50000, 0.50f });

If the viewing camera is at an altitude of 7,500 meters or higher, then the size of the symbol is 75% of the base size (32x32) which is 24x24. If the viewing camera is at an altitude of 50,000 meters or higher, then the size of the symbol is 50% of the base size (32x32) which is 16x16.

Building the Example

VR-Vantage includes pre-built versions of the example plug-in. To build it yourself, follow the instructions at Building VR-Vantage Examples, Applications, and Plug-ins.

Running the Example

This example is a plug-in. You can run it by running ./bin64/exampleSymbolFacade_stealth.bat (on Windows) or ./bin64/exampleSymbolFacade_stealth.sh (on Linux).
For more information about running examples, please see Running Applications and Examples.

Example Source Files


DtSymbolDriverToolbar.h

/*****************************************************************************
* Copyright (c) 2023 MAK Technologies, Inc.
* All rights reserved.
*****************************************************************************/
#pragma once
namespace makVrv
{
class DtDe;
class DtDriver;
}
namespace makVrv
{
namespace exampleSymbolFacade
{
class DT_DLL_exampleSymbolFacade DtSymbolDriverToolbar
{
public:
DtSymbolDriverToolbar( makVrv::DtDe& );
virtual ~DtSymbolDriverToolbar();
virtual QToolBar* createToolbar( makVrv::DtDe&, QWidget* parent );
};
class DT_DLL_exampleSymbolFacade DtAddSymbolItem : public makVrv::DtMenuItem
{
public:
DtAddSymbolItem( makVrv::DtDe& de );
virtual ~DtAddSymbolItem();
virtual QAction* createAction( makVrv::DtDe&, QWidget* parent );
virtual void slot_driverStopped(DtDriver&);
virtual void slot_driverStarted(DtDriver&);
virtual void slot_listenForDriverManagerSignals();
virtual void on_triggered();
protected:
QAction* myAction;
makVrv::DtDe& myDe;
DtSignalConnectionManager myConnectionManager;
vrvSignalsLib::connection myPostInitializeConnection;
};
class DT_DLL_exampleSymbolFacade DtRotateSymbolItem : public makVrv::DtMenuItem
{
public:
DtRotateSymbolItem( makVrv::DtDe& de );
virtual ~DtRotateSymbolItem();
virtual QAction* createAction( makVrv::DtDe&, QWidget* parent );
virtual void on_aboutToShow();
virtual void on_triggered();
protected:
QAction* myAction;
makVrv::DtDe& myDe;
};
class DT_DLL_exampleSymbolFacade DtHideSymbolItem : public makVrv::DtMenuItem
{
public:
DtHideSymbolItem( makVrv::DtDe& de );
virtual ~DtHideSymbolItem();
virtual QAction* createAction( makVrv::DtDe&, QWidget* parent );
virtual void on_aboutToShow();
virtual void on_triggered();
protected:
QAction* myAction;
makVrv::DtDe& myDe;
};
class DT_DLL_exampleSymbolFacade DtDeleteSymbolItem : public makVrv::DtMenuItem
{
public:
DtDeleteSymbolItem( makVrv::DtDe& de );
virtual ~DtDeleteSymbolItem();
virtual QAction* createAction( makVrv::DtDe&, QWidget* parent );
virtual void on_aboutToShow();
virtual void on_triggered();
protected:
QAction* myAction;
makVrv::DtDe& myDe;
};
{
public:
DtSymbolFacadeExampleMenu(DtDe& de);
virtual ~DtSymbolFacadeExampleMenu();
virtual QMenu* createMenu( DtDe& de, QWidget* parent );
};
}
}
Base class to provide boost signal/slot management.
Contains makVrv::DtToolbar class declaration.
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer,...
Definition DtDe.h:77
Definition DtMenuItem.h:24
The base class for VR-Vantage toolbars.
Definition DtToolbar.h:27
Menu item for deleting symbols. In this example, functionality is added so that symbols can be delete...
Definition DtSymbolDriverToolbar.h:182
Menu item for hiding symbols. This MenuItem is added to the context menu for symbols and hides the cu...
Definition DtSymbolDriverToolbar.h:146
Main menu that is used to place menu items from this example. Will be called "Example" on the toolbar...
Definition DtSymbolDriverToolbar.h:214
Export macro and initialization declarations for exampleSymbolFacade4.
#define DT_DLL_exampleSymbolFacade
Definition exampleSymbolFacade.h:20
Contains DtCreateSensorFieldOfViewCommand and DtCreateSensorFieldOfViewCommandCreator class declarati...
Definition DtGridLinesSettingsRecord.h:16

DtSymbolDriverToolbar.cxx

/*****************************************************************************
* Copyright (c) 2024 MAK Technologies, Inc.
* All rights reserved.
*****************************************************************************/
#include <DtSymbolFacade.h>
#include <vrvCore/DtDe.h>
#include <QtWidgets/QToolBar>
#include <QtWidgets/QAction>
#include <QtWidgets/QMenu>
#include <matrix/vlVector.h>
#include <time.h>
#include <math.h>
namespace makVrv
{
namespace exampleSymbolFacade
{
: DtToolbar( de, "DtSymbolDriverToolbar" )
{
}
DtSymbolDriverToolbar::~DtSymbolDriverToolbar()
{
}
QToolBar* DtSymbolDriverToolbar::createToolbar( DtDe&, QWidget* parent )
{
QToolBar* bar = new QToolBar( parent );
bar->setWindowTitle( QObject::tr("Symbol Driver Toolbar") );
bar->setObjectName( QObject::tr("Symbol Driver Toolbar") );
return bar;
}
DtAddSymbolItem::DtAddSymbolItem( DtDe& de )
: DtMenuItem( "DtAddSymbolItem" )
, myAction(0)
, myDe( de )
, myConnectionManager()
{
// Seed the random number generator.
srand( time(NULL ) );
// when de is initialized, listen to driver manager signals
myPostInitializeConnection = de.signal_postInitialize.connect(boost::bind(
&DtAddSymbolItem::slot_listenForDriverManagerSignals, this));
}
DtAddSymbolItem::~DtAddSymbolItem()
{
}
void DtAddSymbolItem::slot_listenForDriverManagerSignals()
{
myPostInitializeConnection.disconnect();
myConnectionManager.manageConnection(myDe.driverManager().signal_driverStopped.connect(boost::bind(&DtAddSymbolItem::slot_driverStopped, this, boost::placeholders::_1)));
myConnectionManager.manageConnection(myDe.driverManager().signal_driverStarted.connect(boost::bind(&DtAddSymbolItem::slot_driverStarted, this, boost::placeholders::_1)));
}
void DtAddSymbolItem::slot_driverStarted(DtDriver& d)
{
// A driver has been stopped - is it the one we care about?
if (d.className() == "DtExampleSymbolDriver")
{
myAction->setEnabled(true);
}
}
void DtAddSymbolItem::slot_driverStopped(DtDriver& d)
{
// A driver has been stopped - is it the one we care about?
if (d.className() == "DtExampleSymbolDriver")
{
myAction->setEnabled(false);
}
}
QAction* DtAddSymbolItem::createAction( DtDe&, QWidget* parent )
{
if (myAction)
{
return myAction;
}
myAction = new QAction(parent);
myAction->setText(DtMenuItem::tr("&Add new symbol..."));
myAction->setToolTip(DtMenuItem::tr("Create a new symbol..."));
// use the widget icon style manager so that the icon being used respects
// the application dark mode vs light mode setting
DtWidgetIconStyleManager::instance(myDe).manageWidget(myAction, "UtilityAdd.svg");
return myAction;
}
void DtAddSymbolItem::on_triggered()
{
// Keep track of how many symbols have been created.
static int numSymbolsCreated = 0;
// Give the symbol a unique name.
DtString symbolName( "Symbol #" );
symbolName += DtString(numSymbolsCreated);
// Put the symbol somewhere random on the ground db II terrain.
double rand_x = 500.0*((double)rand())/RAND_MAX;
double rand_y = 500.0*((double)rand())/RAND_MAX;
double rand_z = 500.0*((double)rand())/RAND_MAX;
DtVector location( rand_x, rand_y, rand_z );
// Get the driver and create the symbol
DtExampleSymbolDriver* symbolDriver = (DtExampleSymbolDriver*)
myDe.driverManager().findDriver( "DtExampleSymbolDriver" );
symbolDriver->createSymbol( symbolName.string(), location );
++numSymbolsCreated;
}
DtRotateSymbolItem::DtRotateSymbolItem( DtDe& de )
: DtMenuItem( "DtRotateSymbolItem" )
, myAction( 0 )
, myDe( de )
{
}
DtRotateSymbolItem::~DtRotateSymbolItem()
{
}
QAction* DtRotateSymbolItem::createAction( DtDe&, QWidget* parent )
{
if (myAction)
{
return myAction;
}
myAction = new QAction( parent );
myAction->setText( DtMenuItem::tr("&Rotate symbol...") );
myAction->setToolTip( DtMenuItem::tr("Rotate symbol...") );
// use the widget icon style manager so that the icon being used respects
// the application dark mode vs light mode setting
DtWidgetIconStyleManager::instance(myDe).manageWidget(myAction, "SetRestore.svg");
return myAction;
}
void DtRotateSymbolItem::on_aboutToShow()
{
// Get the symbol driver for determining if symbols are selected.
DtExampleSymbolDriver* symbolDriver = (DtExampleSymbolDriver*)
myDe.driverManager().findDriver( "DtExampleSymbolDriver" );
// Only enable the MenuItem if symbols are selected.
myAction->setEnabled( ! symbolDriver->selectedSymbols().empty() );
}
void DtRotateSymbolItem::on_triggered()
{
// Prompt the user for the amount to rotate by.
DtRotateSymbolDialog rotateDialog( myDe );
int retCode = rotateDialog.exec();
if ( retCode == QDialog::Rejected )
{
return;
}
// Get the list of selected symbols from the driver.
DtExampleSymbolDriver* symbolDriver = (DtExampleSymbolDriver*)
myDe.driverManager().findDriver( "DtExampleSymbolDriver" );
DtExampleSymbolDriver::SymbolList selectedSymbols =
symbolDriver->selectedSymbols();
// Apply the rotation to selected symbols.
DtExampleSymbolDriver::SymbolList::iterator i = selectedSymbols.begin();
DtExampleSymbolDriver::SymbolList::iterator e = selectedSymbols.end();
float angle = rotateDialog.selectedRotationAmount();
for ( ; i != e; ++i )
{
(*i)->setRotation( angle );
}
}
DtHideSymbolItem::DtHideSymbolItem( DtDe& de )
: DtMenuItem( "DtHideSymbolItem" )
, myAction( 0 )
, myDe( de )
{
}
DtHideSymbolItem::~DtHideSymbolItem()
{
}
QAction* DtHideSymbolItem::createAction( DtDe&, QWidget* parent )
{
if (myAction)
{
return myAction;
}
myAction = new QAction( parent );
myAction->setText( DtMenuItem::tr("&Hide symbol...") );
myAction->setToolTip( DtMenuItem::tr("Hide symbol...") );
// use the widget icon style manager so that the icon being used respects
// the application dark mode vs light mode setting
DtWidgetIconStyleManager::instance(myDe).manageWidget(myAction, "UtilityNotVisible.svg");
return myAction;
}
void DtHideSymbolItem::on_aboutToShow()
{
// Get the symbol driver for determining if symbols are selected.
DtExampleSymbolDriver* symbolDriver = (DtExampleSymbolDriver*)
myDe.driverManager().findDriver( "DtExampleSymbolDriver" );
// If no symbols are selected, disable the MenuItem.
if ( symbolDriver->selectedSymbols().empty() )
{
myAction->setEnabled( false );
return;
}
// Symbols are selected, enable the MenuItem.
myAction->setEnabled( true );
// Determine if any of the symbols are hidden.
DtExampleSymbolDriver::SymbolList::iterator i, e;
DtExampleSymbolDriver::SymbolList curSelSymbols =
symbolDriver->selectedSymbols();
bool hiddenSelected = false;
i = curSelSymbols.begin();
e = curSelSymbols.end();
for ( ; i != e; ++i )
{
if ( ! (*i)->visible() )
{
hiddenSelected = true;
}
}
// Update the MenuItem icon/text and store whether the
// item should show or hide the symbol(s) when triggered.
if ( hiddenSelected )
{
myAction->setText( DtMenuItem::tr("&Show symbol...") );
myAction->setToolTip( DtMenuItem::tr("Show symbol...") );
// use the widget icon style manager so that the icon being used respects
// the application dark mode vs light mode setting
DtWidgetIconStyleManager::instance(myDe).manageWidget(myAction, "UtilityVisible.svg");
myAction->setData( qVariantFromValue(hiddenSelected) );
}
else
{
myAction->setText( DtMenuItem::tr("&Hide symbol...") );
myAction->setToolTip( DtMenuItem::tr("Hide symbol...") );
// use the widget icon style manager so that the icon being used respects
// the application dark mode vs light mode setting
DtWidgetIconStyleManager::instance(myDe).manageWidget(myAction, "UtilityNotVisible.svg");
myAction->setData( qVariantFromValue(hiddenSelected) );
}
}
void DtHideSymbolItem::on_triggered()
{
// Get the list of selected symbols from the driver.
DtExampleSymbolDriver* symbolDriver = (DtExampleSymbolDriver*)
myDe.driverManager().findDriver( "DtExampleSymbolDriver" );
DtExampleSymbolDriver::SymbolList selectedSymbols =
symbolDriver->selectedSymbols();
// Apply the rotation to selected symbols.
DtExampleSymbolDriver::SymbolList::iterator i = selectedSymbols.begin();
DtExampleSymbolDriver::SymbolList::iterator e = selectedSymbols.end();
for ( ; i != e; ++i )
{
(*i)->setVisible( myAction->data().toBool() );
}
}
DtDeleteSymbolItem::DtDeleteSymbolItem( DtDe& de )
: DtMenuItem( "DtDeleteSymbolItem" )
, myAction( 0 )
, myDe( de )
{
}
DtDeleteSymbolItem::~DtDeleteSymbolItem()
{
}
QAction* DtDeleteSymbolItem::createAction( DtDe&, QWidget* parent )
{
if (myAction)
{
return myAction;
}
myAction = new QAction( parent );
myAction->setText( DtMenuItem::tr("&Delete symbol...") );
myAction->setToolTip( DtMenuItem::tr("Delete symbol...") );
// use the widget icon style manager so that the icon being used respects
// the application dark mode vs light mode setting
DtWidgetIconStyleManager::instance(myDe).manageWidget(myAction, "UtilityClose.svg");
return myAction;
}
void DtDeleteSymbolItem::on_aboutToShow()
{
// Get the symbol driver for determining if symbols are selected.
DtExampleSymbolDriver* symbolDriver = (DtExampleSymbolDriver*)
myDe.driverManager().findDriver( "DtExampleSymbolDriver" );
// Only enable the MenuItem if symbols are selected.
myAction->setEnabled( ! symbolDriver->selectedSymbols().empty() );
}
void DtDeleteSymbolItem::on_triggered()
{
// Tell the driver to delete the selected symbols.
DtExampleSymbolDriver* symbolDriver = (DtExampleSymbolDriver*)
myDe.driverManager().findDriver( "DtExampleSymbolDriver" );
symbolDriver->deleteSelectedSymbols();
}
DtSymbolFacadeExampleMenu::DtSymbolFacadeExampleMenu(DtDe& de)
: DtMenu(de, "DtSymbolFacadeExampleMenu")
{
}
DtSymbolFacadeExampleMenu::~DtSymbolFacadeExampleMenu()
{
}
QMenu* DtSymbolFacadeExampleMenu::createMenu( DtDe& de, QWidget* parent )
{
QMenu* menu = new QMenu(QObject::tr("Example"), parent);
return menu;
}
}
}
Contains makVrv::DtDe class.
Contains makVrv:DtMasterScene class.
Contains the DtExampleSymbolDriver class declaration.
Contains the DtRotateSymbolDialog class declaration.
Contains the DtSymbolDriverToolbar class declaration.
Contains the DtSymbolFacade class declaration.
Contains makVrv::DtWidgetIconStyleManager class declaration.

DtRotateSymbolDialog.h

/*****************************************************************************
* Copyright (c) 2019 MAK Technologies, Inc.
* All rights reserved.
*****************************************************************************/
#pragma once
#include <QtWidgets/QDialog>
namespace makVrv
{
namespace exampleSymbolFacade
{
class DT_DLL_exampleSymbolFacade DtRotateSymbolDialog : public QDialog
{ Q_OBJECT;
public:
DtRotateSymbolDialog( makVrv::DtDe& de, QWidget* parent = 0,
Qt::WindowFlags f = 0 );
virtual ~DtRotateSymbolDialog();
float selectedRotationAmount() const;
private:
DtRotateSymbolDialog( const DtRotateSymbolDialog& orig );
DtRotateSymbolDialog& operator = ( const DtRotateSymbolDialog& orig );
protected:
void setupGui();
protected:
QDoubleSpinBox* myRotationSpinner;
};
}
}

DtRotateSymbolDialog.cxx

/*****************************************************************************
* Copyright (c) 2019 MAK Technologies, Inc.
* All rights reserved.
*****************************************************************************/
#include <QtWidgets/QDoubleSpinBox>
#include <QtWidgets/QVBoxLayout>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QLabel>
namespace makVrv
{
namespace exampleSymbolFacade
{
QWidget* parent /*= 0*/, Qt::WindowFlags f /*= 0 */ )
: QDialog( parent, f )
, myRotationSpinner( 0 )
{
setupGui();
setWindowTitle(tr("Rotate Symbol"));
}
DtRotateSymbolDialog::~DtRotateSymbolDialog()
{
}
void DtRotateSymbolDialog::setupGui()
{
QVBoxLayout* dialogLayout = new QVBoxLayout();
QHBoxLayout* fieldLayout = new QHBoxLayout();
{
QLabel* fieldLabel = new QLabel();
fieldLabel->setText( "Rotation (deg):" );
fieldLayout->addWidget( fieldLabel );
myRotationSpinner = new QDoubleSpinBox();
myRotationSpinner->setMinimum( 0 );
myRotationSpinner->setDecimals( 1 );
myRotationSpinner->setMaximum( 360 );
fieldLayout->addWidget( myRotationSpinner );
}
dialogLayout->addLayout( fieldLayout );
QHBoxLayout* okCancelLayout = new QHBoxLayout();
{
okCancelLayout->addStretch( 1 );
QPushButton* okButton = new QPushButton();
okButton->setText( "OK" );
okButton->setDefault( true );
okCancelLayout->addWidget( okButton );
connect( okButton, SIGNAL(clicked()), this, SLOT(accept()) );
QPushButton* cancelButton = new QPushButton();
cancelButton->setText( "Cancel" );
cancelButton->setDefault( false );
okCancelLayout->addWidget( cancelButton );
connect( cancelButton, SIGNAL(clicked()), this, SLOT(reject()) );
okCancelLayout->addStretch( 1 );
}
dialogLayout->addLayout( okCancelLayout );
setLayout( dialogLayout );
}
float DtRotateSymbolDialog::selectedRotationAmount() const
{
return myRotationSpinner->value();
}
}
}
DtRotateSymbolDialog(makVrv::DtDe &de, QWidget *parent=0, Qt::WindowFlags f=0)
CTOR.

DtSymbolFacade.h

/*****************************************************************************
* Copyright (c) 2025 MAK Technologies, Inc.
* All rights reserved.
*****************************************************************************/
#pragma once
#include <matrix/vlVector.h>
namespace makVrv
{
class DtSceneObjectAgent;
class DtWidgetLabelAgent;
class DtAgentManagerInterface;
class DtProjectedWidgetModelAgent;
}
namespace makVrv
{
namespace exampleSymbolFacade
{
class DT_DLL_exampleSymbolFacade DtSymbolFacade
{
public:
DtSymbolFacade( makVrv::DtAgentManagerInterface& sceneInterface,
virtual ~DtSymbolFacade();
virtual makVrv::DtElementID elementId() const;
virtual makVrv::DtWidgetLabelAgent& widgetLabelAgent();
virtual void setVisible( bool visible );
virtual bool visible() const;
virtual void setPosition( const DtVector& pos );
virtual void setRotation( float angleInDegrees );
protected:
// Sets up the sceneobject and widget agents.
// Non-virtual (Called from CTOR).
void initialize();
protected:
makVrv::DtElementID myElementId;
makVrv::DtSceneObjectAgent* mySceneObjectAgent;
makVrv::DtProjectedWidgetModelAgent* myProjectedWidgetModelAgent;
makVrv::DtWidgetLabelAgent* myWidgetLabelAgent;
};
}
}
Contains the DtAltitudeBasedScaleConfigurationRecord class declaration.
Contains makVrv::DtElementEntry class.
Contains makVrv::DtUniqueID type.
The abstract interface necessary for agents.
Definition DtAgentManagerInterface.h:34
ElementType
Definition DtElementEntry.h:27
Agent class for the scene object class: DtProjectedWidgetModel.
Definition DtProjectedWidgetModelAgent.hpp:26
Agent class for the scene object class: DtSceneObject.
Definition DtSceneObjectAgent.hpp:32
Agent class for the scene object class: DtWidgetLabel.
Definition DtWidgetLabelAgent.hpp:29
std::vector< DtAltitudeBasedScaleConfigurationRecord > DtAltitudeBasedScaleConfigurationRecordCollection
Definition DtAltitudeBasedScaleConfigurationRecord.h:45
DtUniqueID DtElementID
Definition DtUniqueID.h:23

DtSymbolFacade.cxx

/*****************************************************************************
* Copyright (c) 2025 MAK Technologies, Inc.
* All rights reserved.
*****************************************************************************/
#include <DtSymbolFacade.h>
#include <vlutil/vlUtil.h>
#include <matrix/vlMath.h>
namespace makVrv
{
namespace exampleSymbolFacade
{
DtAgentManagerInterface& sceneInterface, DtElementID id )
: myElementId( id )
, mySceneObjectAgent( DtSceneObjectAgent::create(sceneInterface) )
, myProjectedWidgetModelAgent( DtProjectedWidgetModelAgent::create(sceneInterface) )
, myWidgetLabelAgent( DtWidgetLabelAgent::create(sceneInterface) )
{
initialize();
}
DtSymbolFacade::~DtSymbolFacade()
{
// Remove the widget label agent from the PWMA and delete it.
myProjectedWidgetModelAgent->removeWidget( myWidgetLabelAgent );
DtDELETE( myWidgetLabelAgent );
// Remove the PWMA from the scene object and delete it.
mySceneObjectAgent->removeModel( myProjectedWidgetModelAgent );
DtDELETE( myProjectedWidgetModelAgent );
// Delete the scene object now that everything's been removed from it.
DtDELETE( mySceneObjectAgent );
}
void DtSymbolFacade::initialize()
{
// Make sure the agents were fully created.
if ( ! mySceneObjectAgent ) DtTHROW_NEW( DtCorruptedState, "Unable to create scene object agent." );
if ( ! myProjectedWidgetModelAgent ) DtTHROW_NEW( DtCorruptedState, "Unable to create projected widget model agent." );
if ( ! myWidgetLabelAgent ) DtTHROW_NEW( DtCorruptedState, "Unable to create widget label agent." );
// Initialize the scene object
mySceneObjectAgent->setModelSet( DtModelSetId::Icons2D ); // PVD
mySceneObjectAgent->setElementID( myElementId );
mySceneObjectAgent->addModel( myProjectedWidgetModelAgent, DtStateVisualizer::EntityVisualizerType );
// Initialize the label
myWidgetLabelAgent->setOverlay( DtOverlayManager::ModelSet_2D_Icons_Overlay );
myWidgetLabelAgent->setBackgroundImage( "$(SHARED_DATA_DIR)/images/ArrowCircle.png" );
myWidgetLabelAgent->setColor( 0.8f, 0.8f, 0.8f, 1.0f );
// The default Text Bounds Policy is ConstrainToLine which will size based on the text string set on the widget
// In this example, we do not set a text string but instead are setting an image and are specifying a size of 32 x 32.
// To use the specified size, use the ConstrainToBounds text bounds policy
myWidgetLabelAgent->setTextBoundsPolicy((int) DtWidgetLabel::TextBoundsPolicy::ConstrainToBounds);
// This will not be used unless the text bounds policy is set to ConstrainToBounds
myWidgetLabelAgent->setSize( 32, 32 );
// This is used to scale the symbol based on altitude.
// If the camera is at an altitude of 7500 meters or higher, then scale the image down to 75% of the base size
// If the camera is at an altitude of 50000 meters or higher, then scale the image down to 50% of the base size
myImageScalesByMinimumAltitude.push_back({ std::numeric_limits<double>::min(), 1.0f });
myImageScalesByMinimumAltitude.push_back({ 7500, 0.75f });
myImageScalesByMinimumAltitude.push_back({ 50000, 0.50f });
// This passes the scales to used by minimum altitudes set above to the widget
myWidgetLabelAgent->setAltitudeBasedConfigurations(myImageScalesByMinimumAltitude);
// Add the label to the projected widget model.
myProjectedWidgetModelAgent->addWidget( myWidgetLabelAgent );
// Enable events processing so symbols accept mouse input.
// Enabling events for the widget label agent allows mouse click
// events on the symbol to select them, as well as allowing for
// the context menu to be shown on right-click.
myWidgetLabelAgent->setEventsEnabled( true );
}
void DtSymbolFacade::setVisible( bool visible )
{
mySceneObjectAgent->setVisible( visible );
}
bool DtSymbolFacade::visible() const
{
DtSceneObject* obj =
mySceneObjectAgent->findObject();
if ( obj )
{
return obj->isVisible();
}
return false;
}
DtUniqueID DtSymbolFacade::elementId() const
{
return myElementId;
}
DtWidgetLabelAgent& DtSymbolFacade::widgetLabelAgent()
{
return *myWidgetLabelAgent;
}
void DtSymbolFacade::setPosition( const DtVector& pos )
{
mySceneObjectAgent->setPosition( 0, pos );
}
void DtSymbolFacade::setRotation( float angleInDegrees )
{
myWidgetLabelAgent->setRotation( DtDeg2Rad(angleInDegrees) );
}
// This is a static method that can be used to query what type of element
// DtSymbolFacades are. The returned value indicates whether the symbol
// is an entity, a prop, or a terrain (among other things).
// For this example we'll consider the symbol to be a Point Graphic.
DtElementEntry::ElementType DtSymbolFacade::elementType()
{
return DtElementEntry::GraphicPoint;
}
}
}
Contains vrvCore::DtObserverMode class.
Contains the DtObserverModeManager class declaration.
Contains makVrv::DtOverlayManager class.
Contains makVrv::DtSceneObject class.
Contains makVrv:DtStateVisualizer class.
Contains makVrv::DtWidgetSignaler class.
DtSymbolFacade(makVrv::DtAgentManagerInterface &sceneInterface, makVrv::DtElementID id)
CTOR Creates a symbol facade for the 2D model set.

DtExampleSymbolDriver.h

/*****************************************************************************
* Copyright (c) 2025 MAK Technologies, Inc.
* All rights reserved.
*****************************************************************************/
#pragma once
#include <unordered_set>
#include <matrix/vlVector.h>
namespace makVrv
{
namespace exampleSymbolFacade
{
class DtSymbolFacade;
class DT_DLL_exampleSymbolFacade DtExampleSymbolDriver
{
public:
typedef std::unordered_set<DtSymbolFacade*> SymbolList;
public:
DtExampleSymbolDriver( makVrv::DtAgentManager& am );
virtual ~DtExampleSymbolDriver();
virtual const std::string& className() const;
virtual bool onStart();
virtual bool onStop();
virtual bool onTick();
virtual DtSymbolFacade* createSymbol( const std::string& name,
const DtVector& pos );
virtual DtSymbolFacade* findSymbol( makVrv::DtElementID id );
virtual SymbolList selectedSymbols() const;
virtual void deleteSelectedSymbols();
protected:
virtual void positionSymbol( DtSymbolFacade* symbol, const DtVector& pos );
virtual void slot_currentSelectionChanged(
virtual void slot_elementHasMouseCursorStateChanged(const DtElementID& entityId, bool hasMouseCursor);
virtual void slot_displayEngineAdded( const makVrv::DtDeRecord& igRecord );
protected:
typedef std::unordered_map<makVrv::DtElementID,DtSymbolFacade*> SymbolFacadeMap;
SymbolFacadeMap mySymbolFacades;
SymbolList myCurrentlySelectedSymbols;
DtSignalConnectionManager myConnections;
};
}
}
Contains makVrv:DtDriver class.
Contains makVrv:DtSelectionManager class.
The DtAgentManager manages the distributed scene object framework. This includes the objects and upda...
Definition DtAgentManager.h:39
A Record of an IG instance.
Definition DtDeRecord.h:25
The DtDriver is an abstract class. Developers derive from this to create logic that "directs" things ...
Definition DtDriver.h:32
std::set< DtUniqueID > IdSet
Definition DtSelectionManager.h:32
SelectionType
The nature of the current selection.
Definition DtSelectionManager.h:43

DtExampleSymbolDriver.cxx

/*****************************************************************************
* Copyright (c) 2025 MAK Technologies, Inc.
* All rights reserved.
*****************************************************************************/
#include <vrvCore/DtDe.h>
#include <matrix/vlVector.h>
#include <DtSymbolFacade.h>
namespace makVrv
{
namespace exampleSymbolFacade
{
: makVrv::DtDriver( am, "DtExampleSymbolDriver" )
{
// intentional noop
}
DtExampleSymbolDriver::~DtExampleSymbolDriver()
{
DtExampleSymbolDriver::onStop();
}
const std::string& DtExampleSymbolDriver::className() const
{
static std::string name = "DtExampleSymbolDriver";
return name;
}
bool DtExampleSymbolDriver::onStart()
{
// Change observer mode to Plan View - before loading the terrain so we use the
// terrain's default Plan View observer view
DtObserver* obs = myAgentManager.de().driverManager().inputDriver().currentObserver();
if (obs != nullptr)
{
obs->setObserverMode(DtObserverModeManager::instance(myAgentManager.de()).lookupObserverModeKey("Plan View"));
}
// Load Ground_DB II programatically.
DtScene& sceneDriver = myAgentManager.de().scene();
std::string groundDbPath = myAgentManager.de().dePathConfiguration().sharedDataPath();
groundDbPath += "/TerrainData/TerrainConfiguration/Ground_DB II.mtf";
sceneDriver.loadTerrain( groundDbPath );
// Listen for selection changes.
DtSelectionManager& selectionManager =
DtSelectionManager::instance( myAgentManager.de() );
myConnections += selectionManager.signal_currentSelectionChanged.connect( boost::bind(
&DtExampleSymbolDriver::slot_currentSelectionChanged,
this, boost::placeholders::_1, boost::placeholders::_2, boost::placeholders::_3, boost::placeholders::_4 ) );
myConnections += selectionManager.signal_elementHasMouseCursorStateChanged.connect( boost::bind(
&DtExampleSymbolDriver::slot_elementHasMouseCursorStateChanged,
this, boost::placeholders::_1, boost::placeholders::_2 ) );
return true;
}
bool DtExampleSymbolDriver::onStop()
{
// Stop listening for selection changes.
myConnections.disconnectSignals();
// Delete all created facades.
SymbolFacadeMap::iterator i = mySymbolFacades.begin();
SymbolFacadeMap::iterator e = mySymbolFacades.end();
for ( ; i != e; ++i )
{
reportElementDestroyed(i->first);
delete i->second;
}
// Clear the list of facades.
mySymbolFacades.clear();
// Apply changes manually since we're stopping the driver
if (myChanges.hasChanges())
{
myAgentManager.de().dataBank().elementData().applyChanges(myChanges);
myChanges.clear();
}
return true;
}
bool DtExampleSymbolDriver::onTick()
{
return true;
}
DtSymbolFacade* DtExampleSymbolDriver::createSymbol(
const std::string& name, const DtVector& pos )
{
// Create symbol.
DtElementID elementId = myAgentManager.createNewUniqueId();
DtSymbolFacade* symbol = new DtSymbolFacade( myAgentManager, elementId );
// Store the symbol in the driver's symbol map.
mySymbolFacades.insert( std::make_pair(elementId,symbol) );
// Report that the symbol was created and report its name.
// These commands report to VR-Vantage that a new object has been created
// and that it should be managed as an object that may be visualized in various ways.
reportElementCreated( elementId, 0, DtSymbolFacade::elementType() );
reportElementAttribute( elementId, new DtElementAttributeDisplayName(name) );
reportElementAttribute( elementId, new DtElementAttributeDriverType( "Symbol Driver" ) );
// Position the symbol.
positionSymbol( symbol, pos );
return symbol;
}
DtSymbolFacade* DtExampleSymbolDriver::findSymbol( DtElementID symbolId )
{
SymbolFacadeMap::iterator itr = mySymbolFacades.find( symbolId );
if ( itr != mySymbolFacades.end() )
return itr->second;
return NULL;
}
DtExampleSymbolDriver::SymbolList
DtExampleSymbolDriver::selectedSymbols() const
{
return myCurrentlySelectedSymbols;
}
void DtExampleSymbolDriver::deleteSelectedSymbols()
{
SymbolList::iterator i = myCurrentlySelectedSymbols.begin();
SymbolList::iterator e = myCurrentlySelectedSymbols.end();
DtSelectionManager::IdSet idsToRemove;
DtElementID symbolId;
for ( ; i != e; ++i )
{
symbolId = (*i)->elementId();
idsToRemove.insert(symbolId);
delete *i;
mySymbolFacades.erase( symbolId );
reportElementDestroyed( symbolId );
}
DtSelectionManager::instance( myAgentManager.de() ).removeFromCurrentSelection(idsToRemove);
myCurrentlySelectedSymbols.clear();
}
void DtExampleSymbolDriver::positionSymbol(
DtSymbolFacade* symbol, const DtVector& pos )
{
// Initialize the coordinate converter with the position.
DtCoordinateConverter* coordConverter =
myAgentManager.de().sharedState().coordinateSystem().converter();
coordConverter->setupTopoFrame( pos );
// Convert the position (from ENU) to our local database (CIG) coordinate system.
DtVector position;
coordConverter->enuToCig_coordTrans( pos, position );
symbol->setPosition( position );
}
void DtExampleSymbolDriver::slot_currentSelectionChanged(
const DtSelectionManager::IdSet& selected,
const DtSelectionManager::IdSet& deselected,
DtSelectionManager::SelectionType newType,
DtSelectionManager::SelectionType oldType )
{
DtSelectionManager::IdSet::const_iterator i, e;
// Update selected symbols to indicate they're selected.
e = selected.end();
i = selected.begin();
for ( ; i != e; ++i )
{
SymbolFacadeMap::iterator itr = mySymbolFacades.find( *i );
if ( itr != mySymbolFacades.end() )
{
DtWidgetLabelAgent& label = itr->second->widgetLabelAgent();
label.setColor( 1.0f, 1.0f, 1.0f, 1.0f );
label.setIsForcedAltitudeBasedFontScaleEnabled(true);
}
}
// Revert deselected symbols to the default (unselected) look.
e = deselected.end();
i = deselected.begin();
for ( ; i != e; ++i )
{
SymbolFacadeMap::iterator itr = mySymbolFacades.find( *i );
if ( itr != mySymbolFacades.end() )
{
DtWidgetLabelAgent& label = itr->second->widgetLabelAgent();
label.setColor( 0.8f, 0.8f, 0.8f, 1.0f );
label.setIsForcedAltitudeBasedFontScaleEnabled(false);
}
}
// Don't try to maintain set of selected entities using the selected
// and deselected lists passed in, just update using selection manager.
DtSelectionManager& selMgr =
DtSelectionManager::instance( myAgentManager.de() );
const DtSelectionManager::IdSet& curSel = selMgr.currentSelections();
DtSelectionManager::IdSet::const_iterator selItr = curSel.begin();
DtSelectionManager::IdSet::const_iterator selEnd = curSel.end();
myCurrentlySelectedSymbols.clear();
for ( ; selItr != selEnd; ++selItr )
{
DtSymbolFacade* symbol = findSymbol(*selItr);
if ( symbol )
{
myCurrentlySelectedSymbols.insert( symbol );
}
}
}
void DtExampleSymbolDriver::slot_elementHasMouseCursorStateChanged(const DtElementID& entityId, bool hasMouseCursor)
{
SymbolFacadeMap::iterator itr = mySymbolFacades.find(entityId);
if (itr != mySymbolFacades.end())
{
DtWidgetLabelAgent& label = itr->second->widgetLabelAgent();
if (hasMouseCursor)
{
label.setColor(1.0f, 1.0f, 1.0f, 1.0f);
label.setIsForcedAltitudeBasedFontScaleEnabled(true);
}
else if (myCurrentlySelectedSymbols.find(itr->second) == myCurrentlySelectedSymbols.end())
{
label.setColor(0.8f, 0.8f, 0.8f, 1.0f);
label.setIsForcedAltitudeBasedFontScaleEnabled(false);
}
}
}
void DtExampleSymbolDriver::slot_displayEngineAdded( const DtDeRecord& igRecord )
{
// When a new display engine is connected to our driver, the driver
// must be re-started in order to ensure the terrain and all symbols
// are properly loaded on all connected De's.
stop();
start();
}
}
}
Contains makVrv:DtAgentManager class.
Contains makVrv::DtDataBank class.
Contains makVrv::DtDeSharedState class.
Contains makVrv::DtElementAttributes class.
Contains makVrv::DtInputDriver class.
Contains makVrv::DtObserver class.
Contains makVrv::DtScene class.
DtExampleSymbolDriver(makVrv::DtAgentManager &am)
CTOR.
DtUniqueElementAttribute< std::string, DtElementAttributes::DisplayName > DtElementAttributeDisplayName
Definition DtElementAttributes.h:88
DtUniqueElementAttribute< std::string, DtElementAttributes::DriverType > DtElementAttributeDriverType
Definition DtElementAttributes.h:118

exampleSymbolFacade.h

/*****************************************************************************
* Copyright (c) 2019 MAK Technologies, Inc.
* All rights reserved.
*****************************************************************************/
#pragma once
// Plugin export macro.
#ifdef _WIN32
# ifdef exampleSymbolFacade_EXPORTS
# define DT_DLL_exampleSymbolFacade __declspec ( dllexport )
# else
# define DT_DLL_exampleSymbolFacade __declspec ( dllimport )
# endif
#else
# define DT_DLL_exampleSymbolFacade
#endif
// Declare & export the plugin initialization function (bool initDeModule(DtDe* de))
#define DT_DE_PLUGIN_EXPORT_MACRO DT_DLL_exampleSymbolFacade
// Plugin initialization methods.
DT_DLL_EXAMPLEACCESSORY void init(makVrv::DtDe &de)
DT_DLL_EXAMPLEPROJECTILE void installDriver(makVrv::DtDe &de)
DT_DE_PLUGIN_EXPORT_MACRO bool initDeModule(makVrv::DtDe *de)

exampleSymbolFacade.cxx

/*****************************************************************************
* Copyright (c) 2024 MAK Technologies, Inc.
* All rights reserved.
*****************************************************************************/
#include <vrvCore/DtDe.h>
// Use the VR-Vantage namespace.
// All classes in VR-Vantage are in this namespace.
using namespace makVrv;
static vrvSignalsLib::connection postInitializeConnection;
bool initDeModule( DtDe* de )
{
// Setup the plug-in.
init( *de );
return true;
}
void init( DtDe& de )
{
// Ensure that init only gets called once
// (not strictly necessary here, but this is good practice in general)
// Make sure that the vrvCoreQt and vrvOsgEarthQt module are init'ed.
// Don't show the startup dialog for selecting a terrain.
DtQtDeMainWindow& mainWindow = dynamic_cast<DtQtDeMainWindow&>(mw);
mainWindow.hideStartupDialog();
//Add example menu and example page item.
if ( igApp )
{
// Register the toolbar and MenuItems so they can be created where they're placed.
DtQtToolbarAssembler::instance(de).registerToolbar( new DtSymbolDriverToolbar(de) );
DtQtMenuAssembler::instance(de).registerMenu( new DtDeleteSymbolItem(de) );
DtQtMenuAssembler::instance(de).registerMenu( new DtRotateSymbolItem(de) );
DtQtMenuAssembler::instance(de).registerMenu( new DtHideSymbolItem(de) );
DtQtMenuAssembler::instance(de).registerMenu( new DtAddSymbolItem(de) );
// Add a new main menu to place example menu items that are also placed on the right click
// context menu. The new menu will be placed before the help menu
DtMenuPath::mainMenu("DtSymbolFacadeExampleMenu"), DtMenuPath::mainMenu("DtHelpMenu"));
DtMenuPath::mainMenu("DtSymbolFacadeExampleMenu").item("DtAddSymbolItem") );
DtMenuPath::mainMenu("DtSymbolFacadeExampleMenu").item("DtRotateSymbolItem") );
DtMenuPath::mainMenu("DtSymbolFacadeExampleMenu").item("DtHideSymbolItem") );
DtMenuPath::mainMenu("DtSymbolFacadeExampleMenu").item("DtDeleteSymbolItem") );
// Add the buttons to the toolbar and context menu.
DtToolbarPath::toolbar("DtSymbolDriverToolbar").item("DtAddSymbolItem") );
DtMenuPath::popupMenu("DtObjectContextMenu").item("DtRotateSymbolItem") );
DtMenuPath::popupMenu("DtObjectContextMenu").item("DtHideSymbolItem") );
DtMenuPath::popupMenu("DtObjectContextMenu").item("DtDeleteSymbolItem") );
}
// We only want to create the driver if we are running in master mode.
if ( de.isInMasterMode() )
{
// The accessory must be created after the DE's initialization is
// finished, to make sure all the objects it uses exist.
postInitializeConnection = de.signal_postInitialize.connect( boost::bind(
&installDriver, std::ref(de) ) );
}
}
void installDriver( DtDe& de )
{
// Create DtExampleDriver.
// The driver is now owned by the display engine. Do not delete it.
de.driverManager().addDriver( driver );
// Start the driver, creating the agent.
de.driverManager().startDriver( driver );
}
#define DT_DE_INIT_ONCE(de)
This macro is called by modules in their init() function. This macro ensures that the module is only ...
Definition DtDe.h:30
Contains makVrv::DtDeMainWindow class.
Contains makVrv::DtQtDeMainWindow class.
Contains makVrv::DtQtToolbarAssembler class.
Contains makVrv::DtToolbarPath class.
Contains makVrv::DtVrvApplication implementation.
DtAgentManager & agentManager()
Get the scene manager.
virtual bool isInMasterMode() const
Returns true if the DtDe is in master mode.
virtual DtDriverManager & driverManager()
The DtMasterScene accessor. The function will throw before the initialize function is called.
boost::signalslib::signal< void()> signal_postInitialize
Definition DtDe.h:535
The abstract main window class.
Definition DtDeMainWindow.h:25
static DtDeMainWindowProvider & instance(DtDe &de)
Get the main window provider instance for a DtDe.
void addDriver(DtDriver *driver)
Add a host driver to the master scene. The host is now owned by the Master Scene.
void startDriver(DtDriver *driver)
Start a driver driver modifying the scene.
void addMenuPathBefore(const DtMenuPath &newPath, const DtMenuPath &relativeTo, const MenuSortFlags &sortFlagsIfMenu=(MenuSortFlags)(SortAllAlphabetically|SortWithinSubmenus|SortBetweenSeparators))
Adds the menu path before a relative (they must share the same parent).
void addMenuPath(const DtMenuPath &, const MenuSortFlags &sortFlagsIfMenu=(MenuSortFlags)(SortAllAlphabetically|SortWithinSubmenus|SortBetweenSeparators))
Adds the menu path (as well as its entire family).
static MenuPathBuilder popupMenu(const std::string &name)
static MenuPathBuilder mainMenu(const std::string &name)
The Qt main window. There will be only one of these per DtDe instance. Note, this window will be dest...
Definition DtQtDeMainWindow.h:46
virtual void hideStartupDialog()
Hide startup dialog.
static DtQtMenuAssembler & instance(DtDe &de)
Get an instance of the assembler.
static DtQtToolbarAssembler & instance(DtDe &de)
Get an instance of the assembler.
void addToolbarPath(const DtToolbarPath &)
Adds the toolbar path (as well as its entire family).
static ToolbarPathBuilder toolbar(const std::string &name)
The Root IG Application object. To run the IG simply create one, initialize it and call run.
Definition DtVrvApplication.h:58
DtMenuConfiguration & masterModeMenuConfiguration()
Get the menu configuration which may be altered by plugins.
static DtVrvApplication * findFromDe(DtDe &)
DtToolbarConfiguration & masterModeToolbarConfiguration()
Get the toolbar configuration which may be altered by plugins.
Definition DtSymbolDriverToolbar.h:60
Definition DtExampleSymbolDriver.h:43
Menu item for rotating symbols. This MenuItem is added to the context menu for symbols and prompts th...
Definition DtSymbolDriverToolbar.h:108
Definition DtSymbolDriverToolbar.h:40
Definition DtExampleSymbolDriver.h:29
DT_DLL_VRVCOREQT void init(DtDe &de)
Contains DLL export macros.