VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
makVrf::DtMapScaleInstance Class Reference

Will show a map scale given the overserver position and screen DPI. More...

Inheritance diagram for makVrf::DtMapScaleInstance:
Inheritance graph
[legend]

Public Member Functions

 DtMapScaleInstance (makVrv::DtDe &de)
 CTOR. More...
 
virtual ~DtMapScaleInstance ()
 DTOR. More...
 
virtual void getSize (int &width, int &height)
 Returns the maximal width/height of this object. More...
 
- Public Member Functions inherited from makVrf::DtMapInformationOverlayInstance
 DtMapInformationOverlayInstance (makVrv::DtDe &de)
 CTOR. More...
 
virtual ~DtMapInformationOverlayInstance ()
 DTOR. More...
 
virtual void setModelDefinition (const std::string &modelDefinition)
 Set the model definition; note that this (potentially) includes all the other parameters enumeration below. More...
 
virtual void setVisible (bool isVisible)
 Set the grid line visibility state. More...
 
bool visible () const
 
virtual void setChannel (makVrv::DtChannel *)
 
virtual void setOrigin (int left, int bottom)
 Sets the origin of where this overlay should be displayed in screen space. More...
 
virtual void setGeometry (int left, int bottom, int width, int height)
 Sets the geometry of the object. More...
 
virtual void updateDisplay ()
 Sets flag to update display on next tick. More...
 

Protected Member Functions

virtual void channelUpdated ()
 Called when the channel is updated. More...
 
virtual void destroyVisuals ()
 Overrides needed to be implemented by subclasses. More...
 
virtual void createVisuals ()
 Create any visuals needed for the overlay. More...
 
virtual void reloadTextFonts ()
 Subclasses should re implement this function to reset the font on any allocated text items to support runtime font size changes. More...
 
virtual double findDistanceFromResolution (double viewResolution, makVrv::DtUnicode &label) const
 Given a view resoltion (meters/pixel) get a distance that will be used to display on the screen. More...
 
virtual void slot_onUnitChanged (int attribute, int from, int old)
 Connected to signal_displayUnitChanged on DtDisplayUnitsSettingsSignaler. More...
 
virtual double roundToMeter (double metersDistance, makVrv::DtUnicode &label, bool changeToKm=true) const
 Rounds the current distance to a displayabe meter (or kilometer) representation. More...
 
virtual double roundToFeet (double metersDistance, makVrv::DtUnicode &label) const
 Rounds using feet as measurement, however, will still return meters as a result. More...
 
virtual double roundToNauticalMiles (double metersDistance, makVrv::DtUnicode &label) const
 Rounds using nauticalMiles as measurement, however, will still return meters as a result. More...
 
virtual void setGroup (float)
 Sets the overlay group. More...
 
- Protected Member Functions inherited from makVrf::DtMapInformationOverlayInstance
virtual void setupFont ()
 
virtual DtGuiEventProcessorguiEventProcessor () const
 
virtual void slot_windowPixelRatioChanged (float pixelRatio)
 Reloads fonts on map scale when high dpi scaling changes screens. More...
 

Protected Attributes

bool myFirstFrame
 
double myPreviousViewResolution
 
makVrv::DtLineSegmentmyHorizontalLine
 
makVrv::DtLineSegmentmyLeftEdge
 
makVrv::DtLineSegmentmyRightEdge
 
makVrv::DtTextProxymyScaleText
 
int myLabelTextWidth
 
- Protected Attributes inherited from makVrf::DtMapInformationOverlayInstance
makVrv::DtDemyDe
 
makVrv::DtSignalConnectionManager myConnections
 
makVrv::DtSignalConnectionManager myPixelRatioConnection
 
makVrv::DtOsgChannelmyChannel
 
makVrv::DtOverlayRenderermyOverlayRenderer
 
std::string myModelDefinitionName
 
bool myVisible
 
float myGroup
 
std::string myLabelFont
 
int myLabelPointSize
 
int myLabelTextHeight
 
bool myParamsChanged
 
int myBottomOffset
 
makVrv::DtFontSP myFont
 
int myLeft
 
int myBottom
 
int myRight
 
int myTop
 
DtGuiEventProcessormyGuiEventProcessor
 

Private Member Functions

 DtMapScaleInstance (const DtMapScaleInstance &orig)
 Unimplemented copy constructor. More...
 
DtMapScaleInstanceoperator= (const DtMapScaleInstance &rhs)
 Unimplemented assignment operator. More...
 

Additional Inherited Members

- Public Attributes inherited from makVrf::DtMapInformationOverlayInstance
boost::signals2::signal< void()> signal_needsUpdate
 Emit this signal when an update/layout change is needed. More...
 

Detailed Description

Will show a map scale given the overserver position and screen DPI.

Constructor & Destructor Documentation

makVrf::DtMapScaleInstance::DtMapScaleInstance ( makVrv::DtDe de)

CTOR.

virtual makVrf::DtMapScaleInstance::~DtMapScaleInstance ( )
virtual

DTOR.

makVrf::DtMapScaleInstance::DtMapScaleInstance ( const DtMapScaleInstance orig)
private

Unimplemented copy constructor.

Member Function Documentation

virtual void makVrf::DtMapScaleInstance::getSize ( int width,
int height 
)
virtual

Returns the maximal width/height of this object.

Implements makVrf::DtMapInformationOverlayInstance.

virtual void makVrf::DtMapScaleInstance::channelUpdated ( )
protectedvirtual

Called when the channel is updated.

Implements makVrf::DtMapInformationOverlayInstance.

virtual void makVrf::DtMapScaleInstance::destroyVisuals ( )
protectedvirtual

Overrides needed to be implemented by subclasses.

Destroy any visuals created for the overlay

Implements makVrf::DtMapInformationOverlayInstance.

virtual void makVrf::DtMapScaleInstance::createVisuals ( )
protectedvirtual

Create any visuals needed for the overlay.

Implements makVrf::DtMapInformationOverlayInstance.

virtual void makVrf::DtMapScaleInstance::reloadTextFonts ( )
protectedvirtual

Subclasses should re implement this function to reset the font on any allocated text items to support runtime font size changes.

Reimplemented from makVrf::DtMapInformationOverlayInstance.

virtual double makVrf::DtMapScaleInstance::findDistanceFromResolution ( double  viewResolution,
makVrv::DtUnicode label 
) const
protectedvirtual

Given a view resoltion (meters/pixel) get a distance that will be used to display on the screen.

virtual void makVrf::DtMapScaleInstance::slot_onUnitChanged ( int  attribute,
int  from,
int  old 
)
protectedvirtual

Connected to signal_displayUnitChanged on DtDisplayUnitsSettingsSignaler.

Calls refreshLabels if the attribute is Distance

virtual double makVrf::DtMapScaleInstance::roundToMeter ( double  metersDistance,
makVrv::DtUnicode label,
bool  changeToKm = true 
) const
protectedvirtual

Rounds the current distance to a displayabe meter (or kilometer) representation.

virtual double makVrf::DtMapScaleInstance::roundToFeet ( double  metersDistance,
makVrv::DtUnicode label 
) const
protectedvirtual

Rounds using feet as measurement, however, will still return meters as a result.

It is the label that is at issue in this calculation

virtual double makVrf::DtMapScaleInstance::roundToNauticalMiles ( double  metersDistance,
makVrv::DtUnicode label 
) const
protectedvirtual

Rounds using nauticalMiles as measurement, however, will still return meters as a result.

It is the label that is at issue in this calculation

virtual void makVrf::DtMapScaleInstance::setGroup ( float  )
protectedvirtual

Sets the overlay group.

Reimplemented from makVrf::DtMapInformationOverlayInstance.

DtMapScaleInstance& makVrf::DtMapScaleInstance::operator= ( const DtMapScaleInstance rhs)
private

Unimplemented assignment operator.

Member Data Documentation

bool makVrf::DtMapScaleInstance::myFirstFrame
protected
double makVrf::DtMapScaleInstance::myPreviousViewResolution
protected
makVrv::DtLineSegment* makVrf::DtMapScaleInstance::myHorizontalLine
protected
makVrv::DtLineSegment* makVrf::DtMapScaleInstance::myLeftEdge
protected
makVrv::DtLineSegment* makVrf::DtMapScaleInstance::myRightEdge
protected
makVrv::DtTextProxy* makVrf::DtMapScaleInstance::myScaleText
protected
int makVrf::DtMapScaleInstance::myLabelTextWidth
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)